@transmitsecurity/platform-web-sdk 2.4.0 → 2.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/idv.js CHANGED
@@ -1 +1 @@
1
- "undefined"==typeof globalThis&&("undefined"!=typeof window?(window.globalThis=window,window.global=window):"undefined"!=typeof self&&(self.globalThis=self,self.global=self));import t from"./common.js";import{initialize as e}from"./common.js";export{initialize}from"./common.js";function r(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function o(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?n(Object(o),!0).forEach((function(e){r(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):n(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function a(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var s={},u={};function c(t){let e=t.length;for(;--e>=0;)t[e]=0}const l=256,d=286,h=30,f=15,p=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),g=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),m=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),y=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),w=new Array(576);c(w);const _=new Array(60);c(_);const v=new Array(512);c(v);const E=new Array(256);c(E);const b=new Array(29);c(b);const A=new Array(h);function C(t,e,r,n,o){this.static_tree=t,this.extra_bits=e,this.extra_base=r,this.elems=n,this.max_length=o,this.has_stree=t&&t.length}let I,S,T;function D(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}c(A);const O=t=>t<256?v[t]:v[256+(t>>>7)],R=(t,e)=>{t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},M=(t,e,r)=>{t.bi_valid>16-r?(t.bi_buf|=e<<t.bi_valid&65535,R(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=r-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=r)},N=(t,e,r)=>{M(t,r[2*e],r[2*e+1])},k=(t,e)=>{let r=0;do{r|=1&t,t>>>=1,r<<=1}while(--e>0);return r>>>1},x=(t,e,r)=>{const n=new Array(16);let o,i,a=0;for(o=1;o<=f;o++)n[o]=a=a+r[o-1]<<1;for(i=0;i<=e;i++){let e=t[2*i+1];0!==e&&(t[2*i]=k(n[e]++,e))}},P=t=>{let e;for(e=0;e<d;e++)t.dyn_ltree[2*e]=0;for(e=0;e<h;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0},B=t=>{t.bi_valid>8?R(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},F=(t,e,r,n)=>{const o=2*e,i=2*r;return t[o]<t[i]||t[o]===t[i]&&n[e]<=n[r]},L=(t,e,r)=>{const n=t.heap[r];let o=r<<1;for(;o<=t.heap_len&&(o<t.heap_len&&F(e,t.heap[o+1],t.heap[o],t.depth)&&o++,!F(e,n,t.heap[o],t.depth));)t.heap[r]=t.heap[o],r=o,o<<=1;t.heap[r]=n},z=(t,e,r)=>{let n,o,i,a,s=0;if(0!==t.last_lit)do{n=t.pending_buf[t.d_buf+2*s]<<8|t.pending_buf[t.d_buf+2*s+1],o=t.pending_buf[t.l_buf+s],s++,0===n?N(t,o,e):(i=E[o],N(t,i+l+1,e),a=p[i],0!==a&&(o-=b[i],M(t,o,a)),n--,i=O(n),N(t,i,r),a=g[i],0!==a&&(n-=A[i],M(t,n,a)))}while(s<t.last_lit);N(t,256,e)},U=(t,e)=>{const r=e.dyn_tree,n=e.stat_desc.static_tree,o=e.stat_desc.has_stree,i=e.stat_desc.elems;let a,s,u,c=-1;for(t.heap_len=0,t.heap_max=573,a=0;a<i;a++)0!==r[2*a]?(t.heap[++t.heap_len]=c=a,t.depth[a]=0):r[2*a+1]=0;for(;t.heap_len<2;)u=t.heap[++t.heap_len]=c<2?++c:0,r[2*u]=1,t.depth[u]=0,t.opt_len--,o&&(t.static_len-=n[2*u+1]);for(e.max_code=c,a=t.heap_len>>1;a>=1;a--)L(t,r,a);u=i;do{a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],L(t,r,1),s=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=s,r[2*u]=r[2*a]+r[2*s],t.depth[u]=(t.depth[a]>=t.depth[s]?t.depth[a]:t.depth[s])+1,r[2*a+1]=r[2*s+1]=u,t.heap[1]=u++,L(t,r,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],((t,e)=>{const r=e.dyn_tree,n=e.max_code,o=e.stat_desc.static_tree,i=e.stat_desc.has_stree,a=e.stat_desc.extra_bits,s=e.stat_desc.extra_base,u=e.stat_desc.max_length;let c,l,d,h,p,g,m=0;for(h=0;h<=f;h++)t.bl_count[h]=0;for(r[2*t.heap[t.heap_max]+1]=0,c=t.heap_max+1;c<573;c++)l=t.heap[c],h=r[2*r[2*l+1]+1]+1,h>u&&(h=u,m++),r[2*l+1]=h,l>n||(t.bl_count[h]++,p=0,l>=s&&(p=a[l-s]),g=r[2*l],t.opt_len+=g*(h+p),i&&(t.static_len+=g*(o[2*l+1]+p)));if(0!==m){do{for(h=u-1;0===t.bl_count[h];)h--;t.bl_count[h]--,t.bl_count[h+1]+=2,t.bl_count[u]--,m-=2}while(m>0);for(h=u;0!==h;h--)for(l=t.bl_count[h];0!==l;)d=t.heap[--c],d>n||(r[2*d+1]!==h&&(t.opt_len+=(h-r[2*d+1])*r[2*d],r[2*d+1]=h),l--)}})(t,e),x(r,c,t.bl_count)},V=(t,e,r)=>{let n,o,i=-1,a=e[1],s=0,u=7,c=4;for(0===a&&(u=138,c=3),e[2*(r+1)+1]=65535,n=0;n<=r;n++)o=a,a=e[2*(n+1)+1],++s<u&&o===a||(s<c?t.bl_tree[2*o]+=s:0!==o?(o!==i&&t.bl_tree[2*o]++,t.bl_tree[32]++):s<=10?t.bl_tree[34]++:t.bl_tree[36]++,s=0,i=o,0===a?(u=138,c=3):o===a?(u=6,c=3):(u=7,c=4))},H=(t,e,r)=>{let n,o,i=-1,a=e[1],s=0,u=7,c=4;for(0===a&&(u=138,c=3),n=0;n<=r;n++)if(o=a,a=e[2*(n+1)+1],!(++s<u&&o===a)){if(s<c)do{N(t,o,t.bl_tree)}while(0!=--s);else 0!==o?(o!==i&&(N(t,o,t.bl_tree),s--),N(t,16,t.bl_tree),M(t,s-3,2)):s<=10?(N(t,17,t.bl_tree),M(t,s-3,3)):(N(t,18,t.bl_tree),M(t,s-11,7));s=0,i=o,0===a?(u=138,c=3):o===a?(u=6,c=3):(u=7,c=4)}};let j=!1;const G=(t,e,r,n)=>{M(t,0+(n?1:0),3),((t,e,r,n)=>{B(t),n&&(R(t,r),R(t,~r)),t.pending_buf.set(t.window.subarray(e,e+r),t.pending),t.pending+=r})(t,e,r,!0)};u._tr_init=t=>{j||((()=>{let t,e,r,n,o;const i=new Array(16);for(r=0,n=0;n<28;n++)for(b[n]=r,t=0;t<1<<p[n];t++)E[r++]=n;for(E[r-1]=n,o=0,n=0;n<16;n++)for(A[n]=o,t=0;t<1<<g[n];t++)v[o++]=n;for(o>>=7;n<h;n++)for(A[n]=o<<7,t=0;t<1<<g[n]-7;t++)v[256+o++]=n;for(e=0;e<=f;e++)i[e]=0;for(t=0;t<=143;)w[2*t+1]=8,t++,i[8]++;for(;t<=255;)w[2*t+1]=9,t++,i[9]++;for(;t<=279;)w[2*t+1]=7,t++,i[7]++;for(;t<=287;)w[2*t+1]=8,t++,i[8]++;for(x(w,287,i),t=0;t<h;t++)_[2*t+1]=5,_[2*t]=k(t,5);I=new C(w,p,257,d,f),S=new C(_,g,0,h,f),T=new C(new Array(0),m,0,19,7)})(),j=!0),t.l_desc=new D(t.dyn_ltree,I),t.d_desc=new D(t.dyn_dtree,S),t.bl_desc=new D(t.bl_tree,T),t.bi_buf=0,t.bi_valid=0,P(t)},u._tr_stored_block=G,u._tr_flush_block=(t,e,r,n)=>{let o,i,a=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=(t=>{let e,r=4093624447;for(e=0;e<=31;e++,r>>>=1)if(1&r&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<l;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0})(t)),U(t,t.l_desc),U(t,t.d_desc),a=(t=>{let e;for(V(t,t.dyn_ltree,t.l_desc.max_code),V(t,t.dyn_dtree,t.d_desc.max_code),U(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*y[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e})(t),o=t.opt_len+3+7>>>3,i=t.static_len+3+7>>>3,i<=o&&(o=i)):o=i=r+5,r+4<=o&&-1!==e?G(t,e,r,n):4===t.strategy||i===o?(M(t,2+(n?1:0),3),z(t,w,_)):(M(t,4+(n?1:0),3),((t,e,r,n)=>{let o;for(M(t,e-257,5),M(t,r-1,5),M(t,n-4,4),o=0;o<n;o++)M(t,t.bl_tree[2*y[o]+1],3);H(t,t.dyn_ltree,e-1),H(t,t.dyn_dtree,r-1)})(t,t.l_desc.max_code+1,t.d_desc.max_code+1,a+1),z(t,t.dyn_ltree,t.dyn_dtree)),P(t),n&&B(t)},u._tr_tally=(t,e,r)=>(t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&r,t.last_lit++,0===e?t.dyn_ltree[2*r]++:(t.matches++,e--,t.dyn_ltree[2*(E[r]+l+1)]++,t.dyn_dtree[2*O(e)]++),t.last_lit===t.lit_bufsize-1),u._tr_align=t=>{M(t,2,3),N(t,256,w),(t=>{16===t.bi_valid?(R(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)})(t)};var W=(t,e,r,n)=>{let o=65535&t,i=t>>>16&65535,a=0;for(;0!==r;){a=r>2e3?2e3:r,r-=a;do{o=o+e[n++]|0,i=i+o|0}while(--a);o%=65521,i%=65521}return o|i<<16};const X=new Uint32Array((()=>{let t,e=[];for(var r=0;r<256;r++){t=r;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e})());var Y=(t,e,r,n)=>{const o=X,i=n+r;t^=-1;for(let r=n;r<i;r++)t=t>>>8^o[255&(t^e[r])];return~t},Z={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},q={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:K,_tr_stored_block:$,_tr_flush_block:J,_tr_tally:Q,_tr_align:tt}=u,et=W,rt=Y,nt=Z,{Z_NO_FLUSH:ot,Z_PARTIAL_FLUSH:it,Z_FULL_FLUSH:at,Z_FINISH:st,Z_BLOCK:ut,Z_OK:ct,Z_STREAM_END:lt,Z_STREAM_ERROR:dt,Z_DATA_ERROR:ht,Z_BUF_ERROR:ft,Z_DEFAULT_COMPRESSION:pt,Z_FILTERED:gt,Z_HUFFMAN_ONLY:mt,Z_RLE:yt,Z_FIXED:wt,Z_DEFAULT_STRATEGY:_t,Z_UNKNOWN:vt,Z_DEFLATED:Et}=q,bt=258,At=262,Ct=103,It=113,St=666,Tt=(t,e)=>(t.msg=nt[e],e),Dt=t=>(t<<1)-(t>4?9:0),Ot=t=>{let e=t.length;for(;--e>=0;)t[e]=0};let Rt=(t,e,r)=>(e<<t.hash_shift^r)&t.hash_mask;const Mt=t=>{const e=t.state;let r=e.pending;r>t.avail_out&&(r=t.avail_out),0!==r&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+r),t.next_out),t.next_out+=r,e.pending_out+=r,t.total_out+=r,t.avail_out-=r,e.pending-=r,0===e.pending&&(e.pending_out=0))},Nt=(t,e)=>{J(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,Mt(t.strm)},kt=(t,e)=>{t.pending_buf[t.pending++]=e},xt=(t,e)=>{t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},Pt=(t,e,r,n)=>{let o=t.avail_in;return o>n&&(o=n),0===o?0:(t.avail_in-=o,e.set(t.input.subarray(t.next_in,t.next_in+o),r),1===t.state.wrap?t.adler=et(t.adler,e,o,r):2===t.state.wrap&&(t.adler=rt(t.adler,e,o,r)),t.next_in+=o,t.total_in+=o,o)},Bt=(t,e)=>{let r,n,o=t.max_chain_length,i=t.strstart,a=t.prev_length,s=t.nice_match;const u=t.strstart>t.w_size-At?t.strstart-(t.w_size-At):0,c=t.window,l=t.w_mask,d=t.prev,h=t.strstart+bt;let f=c[i+a-1],p=c[i+a];t.prev_length>=t.good_match&&(o>>=2),s>t.lookahead&&(s=t.lookahead);do{if(r=e,c[r+a]===p&&c[r+a-1]===f&&c[r]===c[i]&&c[++r]===c[i+1]){i+=2,r++;do{}while(c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&i<h);if(n=bt-(h-i),i=h-bt,n>a){if(t.match_start=e,a=n,n>=s)break;f=c[i+a-1],p=c[i+a]}}}while((e=d[e&l])>u&&0!=--o);return a<=t.lookahead?a:t.lookahead},Ft=t=>{const e=t.w_size;let r,n,o,i,a;do{if(i=t.window_size-t.lookahead-t.strstart,t.strstart>=e+(e-At)){t.window.set(t.window.subarray(e,e+e),0),t.match_start-=e,t.strstart-=e,t.block_start-=e,n=t.hash_size,r=n;do{o=t.head[--r],t.head[r]=o>=e?o-e:0}while(--n);n=e,r=n;do{o=t.prev[--r],t.prev[r]=o>=e?o-e:0}while(--n);i+=e}if(0===t.strm.avail_in)break;if(n=Pt(t.strm,t.window,t.strstart+t.lookahead,i),t.lookahead+=n,t.lookahead+t.insert>=3)for(a=t.strstart-t.insert,t.ins_h=t.window[a],t.ins_h=Rt(t,t.ins_h,t.window[a+1]);t.insert&&(t.ins_h=Rt(t,t.ins_h,t.window[a+3-1]),t.prev[a&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=a,a++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<At&&0!==t.strm.avail_in)},Lt=(t,e)=>{let r,n;for(;;){if(t.lookahead<At){if(Ft(t),t.lookahead<At&&e===ot)return 1;if(0===t.lookahead)break}if(r=0,t.lookahead>=3&&(t.ins_h=Rt(t,t.ins_h,t.window[t.strstart+3-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==r&&t.strstart-r<=t.w_size-At&&(t.match_length=Bt(t,r)),t.match_length>=3)if(n=Q(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=Rt(t,t.ins_h,t.window[t.strstart+3-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=Rt(t,t.ins_h,t.window[t.strstart+1]);else n=Q(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(Nt(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,e===st?(Nt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Nt(t,!1),0===t.strm.avail_out)?1:2},zt=(t,e)=>{let r,n,o;for(;;){if(t.lookahead<At){if(Ft(t),t.lookahead<At&&e===ot)return 1;if(0===t.lookahead)break}if(r=0,t.lookahead>=3&&(t.ins_h=Rt(t,t.ins_h,t.window[t.strstart+3-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==r&&t.prev_length<t.max_lazy_match&&t.strstart-r<=t.w_size-At&&(t.match_length=Bt(t,r),t.match_length<=5&&(t.strategy===gt||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){o=t.strstart+t.lookahead-3,n=Q(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=o&&(t.ins_h=Rt(t,t.ins_h,t.window[t.strstart+3-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,n&&(Nt(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if(n=Q(t,0,t.window[t.strstart-1]),n&&Nt(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=Q(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,e===st?(Nt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Nt(t,!1),0===t.strm.avail_out)?1:2};function Ut(t,e,r,n,o){this.good_length=t,this.max_lazy=e,this.nice_length=r,this.max_chain=n,this.func=o}const Vt=[new Ut(0,0,0,0,((t,e)=>{let r=65535;for(r>t.pending_buf_size-5&&(r=t.pending_buf_size-5);;){if(t.lookahead<=1){if(Ft(t),0===t.lookahead&&e===ot)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;const n=t.block_start+r;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,Nt(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-At&&(Nt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===st?(Nt(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(Nt(t,!1),t.strm.avail_out),1)})),new Ut(4,4,8,4,Lt),new Ut(4,5,16,8,Lt),new Ut(4,6,32,32,Lt),new Ut(4,4,16,16,zt),new Ut(8,16,32,32,zt),new Ut(8,16,128,128,zt),new Ut(8,32,128,256,zt),new Ut(32,128,258,1024,zt),new Ut(32,258,258,4096,zt)];function Ht(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Et,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),Ot(this.dyn_ltree),Ot(this.dyn_dtree),Ot(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),Ot(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),Ot(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const jt=t=>{if(!t||!t.state)return Tt(t,dt);t.total_in=t.total_out=0,t.data_type=vt;const e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:It,t.adler=2===e.wrap?0:1,e.last_flush=ot,K(e),ct},Gt=t=>{const e=jt(t);return e===ct&&(t=>{t.window_size=2*t.w_size,Ot(t.head),t.max_lazy_match=Vt[t.level].max_lazy,t.good_match=Vt[t.level].good_length,t.nice_match=Vt[t.level].nice_length,t.max_chain_length=Vt[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=2,t.match_available=0,t.ins_h=0})(t.state),e},Wt=(t,e,r,n,o,i)=>{if(!t)return dt;let a=1;if(e===pt&&(e=6),n<0?(a=0,n=-n):n>15&&(a=2,n-=16),o<1||o>9||r!==Et||n<8||n>15||e<0||e>9||i<0||i>wt)return Tt(t,dt);8===n&&(n=9);const s=new Ht;return t.state=s,s.strm=t,s.wrap=a,s.gzhead=null,s.w_bits=n,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=o+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+3-1)/3),s.window=new Uint8Array(2*s.w_size),s.head=new Uint16Array(s.hash_size),s.prev=new Uint16Array(s.w_size),s.lit_bufsize=1<<o+6,s.pending_buf_size=4*s.lit_bufsize,s.pending_buf=new Uint8Array(s.pending_buf_size),s.d_buf=1*s.lit_bufsize,s.l_buf=3*s.lit_bufsize,s.level=e,s.strategy=i,s.method=r,Gt(t)};s.deflateInit=(t,e)=>Wt(t,e,Et,15,8,_t),s.deflateInit2=Wt,s.deflateReset=Gt,s.deflateResetKeep=jt,s.deflateSetHeader=(t,e)=>t&&t.state?2!==t.state.wrap?dt:(t.state.gzhead=e,ct):dt,s.deflate=(t,e)=>{let r,n;if(!t||!t.state||e>ut||e<0)return t?Tt(t,dt):dt;const o=t.state;if(!t.output||!t.input&&0!==t.avail_in||o.status===St&&e!==st)return Tt(t,0===t.avail_out?ft:dt);o.strm=t;const i=o.last_flush;if(o.last_flush=e,42===o.status)if(2===o.wrap)t.adler=0,kt(o,31),kt(o,139),kt(o,8),o.gzhead?(kt(o,(o.gzhead.text?1:0)+(o.gzhead.hcrc?2:0)+(o.gzhead.extra?4:0)+(o.gzhead.name?8:0)+(o.gzhead.comment?16:0)),kt(o,255&o.gzhead.time),kt(o,o.gzhead.time>>8&255),kt(o,o.gzhead.time>>16&255),kt(o,o.gzhead.time>>24&255),kt(o,9===o.level?2:o.strategy>=mt||o.level<2?4:0),kt(o,255&o.gzhead.os),o.gzhead.extra&&o.gzhead.extra.length&&(kt(o,255&o.gzhead.extra.length),kt(o,o.gzhead.extra.length>>8&255)),o.gzhead.hcrc&&(t.adler=rt(t.adler,o.pending_buf,o.pending,0)),o.gzindex=0,o.status=69):(kt(o,0),kt(o,0),kt(o,0),kt(o,0),kt(o,0),kt(o,9===o.level?2:o.strategy>=mt||o.level<2?4:0),kt(o,3),o.status=It);else{let e=Et+(o.w_bits-8<<4)<<8,r=-1;r=o.strategy>=mt||o.level<2?0:o.level<6?1:6===o.level?2:3,e|=r<<6,0!==o.strstart&&(e|=32),e+=31-e%31,o.status=It,xt(o,e),0!==o.strstart&&(xt(o,t.adler>>>16),xt(o,65535&t.adler)),t.adler=1}if(69===o.status)if(o.gzhead.extra){for(r=o.pending;o.gzindex<(65535&o.gzhead.extra.length)&&(o.pending!==o.pending_buf_size||(o.gzhead.hcrc&&o.pending>r&&(t.adler=rt(t.adler,o.pending_buf,o.pending-r,r)),Mt(t),r=o.pending,o.pending!==o.pending_buf_size));)kt(o,255&o.gzhead.extra[o.gzindex]),o.gzindex++;o.gzhead.hcrc&&o.pending>r&&(t.adler=rt(t.adler,o.pending_buf,o.pending-r,r)),o.gzindex===o.gzhead.extra.length&&(o.gzindex=0,o.status=73)}else o.status=73;if(73===o.status)if(o.gzhead.name){r=o.pending;do{if(o.pending===o.pending_buf_size&&(o.gzhead.hcrc&&o.pending>r&&(t.adler=rt(t.adler,o.pending_buf,o.pending-r,r)),Mt(t),r=o.pending,o.pending===o.pending_buf_size)){n=1;break}n=o.gzindex<o.gzhead.name.length?255&o.gzhead.name.charCodeAt(o.gzindex++):0,kt(o,n)}while(0!==n);o.gzhead.hcrc&&o.pending>r&&(t.adler=rt(t.adler,o.pending_buf,o.pending-r,r)),0===n&&(o.gzindex=0,o.status=91)}else o.status=91;if(91===o.status)if(o.gzhead.comment){r=o.pending;do{if(o.pending===o.pending_buf_size&&(o.gzhead.hcrc&&o.pending>r&&(t.adler=rt(t.adler,o.pending_buf,o.pending-r,r)),Mt(t),r=o.pending,o.pending===o.pending_buf_size)){n=1;break}n=o.gzindex<o.gzhead.comment.length?255&o.gzhead.comment.charCodeAt(o.gzindex++):0,kt(o,n)}while(0!==n);o.gzhead.hcrc&&o.pending>r&&(t.adler=rt(t.adler,o.pending_buf,o.pending-r,r)),0===n&&(o.status=Ct)}else o.status=Ct;if(o.status===Ct&&(o.gzhead.hcrc?(o.pending+2>o.pending_buf_size&&Mt(t),o.pending+2<=o.pending_buf_size&&(kt(o,255&t.adler),kt(o,t.adler>>8&255),t.adler=0,o.status=It)):o.status=It),0!==o.pending){if(Mt(t),0===t.avail_out)return o.last_flush=-1,ct}else if(0===t.avail_in&&Dt(e)<=Dt(i)&&e!==st)return Tt(t,ft);if(o.status===St&&0!==t.avail_in)return Tt(t,ft);if(0!==t.avail_in||0!==o.lookahead||e!==ot&&o.status!==St){let r=o.strategy===mt?((t,e)=>{let r;for(;;){if(0===t.lookahead&&(Ft(t),0===t.lookahead)){if(e===ot)return 1;break}if(t.match_length=0,r=Q(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(Nt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===st?(Nt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Nt(t,!1),0===t.strm.avail_out)?1:2})(o,e):o.strategy===yt?((t,e)=>{let r,n,o,i;const a=t.window;for(;;){if(t.lookahead<=bt){if(Ft(t),t.lookahead<=bt&&e===ot)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(o=t.strstart-1,n=a[o],n===a[++o]&&n===a[++o]&&n===a[++o])){i=t.strstart+bt;do{}while(n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&o<i);t.match_length=bt-(i-o),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(r=Q(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=Q(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(Nt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===st?(Nt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Nt(t,!1),0===t.strm.avail_out)?1:2})(o,e):Vt[o.level].func(o,e);if(3!==r&&4!==r||(o.status=St),1===r||3===r)return 0===t.avail_out&&(o.last_flush=-1),ct;if(2===r&&(e===it?tt(o):e!==ut&&($(o,0,0,!1),e===at&&(Ot(o.head),0===o.lookahead&&(o.strstart=0,o.block_start=0,o.insert=0))),Mt(t),0===t.avail_out))return o.last_flush=-1,ct}return e!==st?ct:o.wrap<=0?lt:(2===o.wrap?(kt(o,255&t.adler),kt(o,t.adler>>8&255),kt(o,t.adler>>16&255),kt(o,t.adler>>24&255),kt(o,255&t.total_in),kt(o,t.total_in>>8&255),kt(o,t.total_in>>16&255),kt(o,t.total_in>>24&255)):(xt(o,t.adler>>>16),xt(o,65535&t.adler)),Mt(t),o.wrap>0&&(o.wrap=-o.wrap),0!==o.pending?ct:lt)},s.deflateEnd=t=>{if(!t||!t.state)return dt;const e=t.state.status;return 42!==e&&69!==e&&73!==e&&91!==e&&e!==Ct&&e!==It&&e!==St?Tt(t,dt):(t.state=null,e===It?Tt(t,ht):ct)},s.deflateSetDictionary=(t,e)=>{let r=e.length;if(!t||!t.state)return dt;const n=t.state,o=n.wrap;if(2===o||1===o&&42!==n.status||n.lookahead)return dt;if(1===o&&(t.adler=et(t.adler,e,r,0)),n.wrap=0,r>=n.w_size){0===o&&(Ot(n.head),n.strstart=0,n.block_start=0,n.insert=0);let t=new Uint8Array(n.w_size);t.set(e.subarray(r-n.w_size,r),0),e=t,r=n.w_size}const i=t.avail_in,a=t.next_in,s=t.input;for(t.avail_in=r,t.next_in=0,t.input=e,Ft(n);n.lookahead>=3;){let t=n.strstart,e=n.lookahead-2;do{n.ins_h=Rt(n,n.ins_h,n.window[t+3-1]),n.prev[t&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=t,t++}while(--e);n.strstart=t,n.lookahead=2,Ft(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,t.next_in=a,t.input=s,t.avail_in=i,n.wrap=o,ct},s.deflateInfo="pako deflate (from Nodeca project)";var Xt={};const Yt=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);Xt.assign=function(t){const e=Array.prototype.slice.call(arguments,1);for(;e.length;){const r=e.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(const e in r)Yt(r,e)&&(t[e]=r[e])}}return t},Xt.flattenChunks=t=>{let e=0;for(let r=0,n=t.length;r<n;r++)e+=t[r].length;const r=new Uint8Array(e);for(let e=0,n=0,o=t.length;e<o;e++){let o=t[e];r.set(o,n),n+=o.length}return r};var Zt={};let qt=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){qt=!1}const Kt=new Uint8Array(256);for(let t=0;t<256;t++)Kt[t]=t>=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;Kt[254]=Kt[254]=1,Zt.string2buf=t=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);let e,r,n,o,i,a=t.length,s=0;for(o=0;o<a;o++)r=t.charCodeAt(o),55296==(64512&r)&&o+1<a&&(n=t.charCodeAt(o+1),56320==(64512&n)&&(r=65536+(r-55296<<10)+(n-56320),o++)),s+=r<128?1:r<2048?2:r<65536?3:4;for(e=new Uint8Array(s),i=0,o=0;i<s;o++)r=t.charCodeAt(o),55296==(64512&r)&&o+1<a&&(n=t.charCodeAt(o+1),56320==(64512&n)&&(r=65536+(r-55296<<10)+(n-56320),o++)),r<128?e[i++]=r:r<2048?(e[i++]=192|r>>>6,e[i++]=128|63&r):r<65536?(e[i++]=224|r>>>12,e[i++]=128|r>>>6&63,e[i++]=128|63&r):(e[i++]=240|r>>>18,e[i++]=128|r>>>12&63,e[i++]=128|r>>>6&63,e[i++]=128|63&r);return e};Zt.buf2string=(t,e)=>{const r=e||t.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(t.subarray(0,e));let n,o;const i=new Array(2*r);for(o=0,n=0;n<r;){let e=t[n++];if(e<128){i[o++]=e;continue}let a=Kt[e];if(a>4)i[o++]=65533,n+=a-1;else{for(e&=2===a?31:3===a?15:7;a>1&&n<r;)e=e<<6|63&t[n++],a--;a>1?i[o++]=65533:e<65536?i[o++]=e:(e-=65536,i[o++]=55296|e>>10&1023,i[o++]=56320|1023&e)}}return((t,e)=>{if(e<65534&&t.subarray&&qt)return String.fromCharCode.apply(null,t.length===e?t:t.subarray(0,e));let r="";for(let n=0;n<e;n++)r+=String.fromCharCode(t[n]);return r})(i,o)},Zt.utf8border=(t,e)=>{(e=e||t.length)>t.length&&(e=t.length);let r=e-1;for(;r>=0&&128==(192&t[r]);)r--;return r<0||0===r?e:r+Kt[t[r]]>e?r:e};const $t=s,Jt=Xt,Qt=Zt,te=Z,ee=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0},re=Object.prototype.toString,{Z_NO_FLUSH:ne,Z_SYNC_FLUSH:oe,Z_FULL_FLUSH:ie,Z_FINISH:ae,Z_OK:se,Z_STREAM_END:ue,Z_DEFAULT_COMPRESSION:ce,Z_DEFAULT_STRATEGY:le,Z_DEFLATED:de}=q;function he(t){this.options=Jt.assign({level:ce,method:de,chunkSize:16384,windowBits:15,memLevel:8,strategy:le},t||{});let e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new ee,this.strm.avail_out=0;let r=$t.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(r!==se)throw new Error(te[r]);if(e.header&&$t.deflateSetHeader(this.strm,e.header),e.dictionary){let t;if(t="string"==typeof e.dictionary?Qt.string2buf(e.dictionary):"[object ArrayBuffer]"===re.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,r=$t.deflateSetDictionary(this.strm,t),r!==se)throw new Error(te[r]);this._dict_set=!0}}he.prototype.push=function(t,e){const r=this.strm,n=this.options.chunkSize;let o,i;if(this.ended)return!1;for(i=e===~~e?e:!0===e?ae:ne,"string"==typeof t?r.input=Qt.string2buf(t):"[object ArrayBuffer]"===re.call(t)?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;;)if(0===r.avail_out&&(r.output=new Uint8Array(n),r.next_out=0,r.avail_out=n),(i===oe||i===ie)&&r.avail_out<=6)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else{if(o=$t.deflate(r,i),o===ue)return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),o=$t.deflateEnd(this.strm),this.onEnd(o),this.ended=!0,o===se;if(0!==r.avail_out){if(i>0&&r.next_out>0)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else if(0===r.avail_in)break}else this.onData(r.output)}return!0},he.prototype.onData=function(t){this.chunks.push(t)},he.prototype.onEnd=function(t){t===se&&(this.result=Jt.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var fe=function(t,e){return(e=e||{}).gzip=!0,function(t,e){const r=new he(e);if(r.push(t,!0),r.err)throw r.msg||te[r.err];return r.result}(t,e)};const pe=["enabled","userId","serverPath"];function ge(t,e){return t-=437,ye()[t]}var me=ge;function ye(){var t=["80RHjtOk","2OevLtt","4mHygDT","21bcfTaY","1334706qGPVJq","drs","171569UjnFlN","65763wSPxMs","2326446mybjLb","2655936etvUrk","3148160ktzNuV","485881glPFWK"];return(ye=function(){return t})()}!function(){for(var t=ge,e=ye();;)try{if(463707==parseInt(t(437))/1*(parseInt(t(444))/2)+-parseInt(t(439))/3+parseInt(t(445))/4*(parseInt(t(441))/5)+parseInt(t(447))/6*(parseInt(t(446))/7)+-parseInt(t(440))/8+parseInt(t(438))/9*(parseInt(t(443))/10)+parseInt(t(442))/11)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();var we=new t(me(448));function _e(t,e){return t-=413,Ee()[t]}const ve=_e;function Ee(){const t=["241368ERhlIK","setClientId","5962630fYlShm","setItemSessionStorageSafe","setItemLocalStorageSafe","getItemLocalStorageSafe","3107724mvFvCC","FALLBACK_SESSION_STORAGE","clientId","removeItemLocalStorageSafe","1549734VEJnHN","localStorage","getClientId","878095exqgKw","4242164esjXFz","getFullStorageKey","FALLBACK_LOCAL_STORAGE","6004145WSBdId","removeItemSessionStorageSafe","sessionStorage","removeItem","setItem","getItemSessionStorageSafe"];return(Ee=function(){return t})()}!function(){const t=_e,e=Ee();for(;;)try{if(802223==parseInt(t(428))/1+-parseInt(t(415))/2+parseInt(t(425))/3+parseInt(t(429))/4+-parseInt(t(417))/5+parseInt(t(421))/6+-parseInt(t(432))/7)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class be{constructor(t){const e=_e;this.FALLBACK_SESSION_STORAGE={},this[e(431)]={},this[e(423)]=t}[ve(427)](){return this[ve(423)]}[ve(416)](t){this[ve(423)]=t}[ve(430)](t){return this.clientId+"_"+t}[ve(414)](t){const e=ve,r=this.getFullStorageKey(t);try{return window[e(434)].getItem(r)}catch(t){return this[e(422)][r]}}[ve(418)](t,e){const r=ve,n=this[r(430)](t);try{window[r(434)][r(413)](n,e)}catch(t){this[r(422)][n]=e}}[ve(433)](t){const e=ve,r=this[e(430)](t);try{window[e(434)].removeItem(r)}catch(t){this[e(422)][r]=void 0}}[ve(420)](t){const e=ve,r=this.getFullStorageKey(t);try{return window[e(426)].getItem(r)}catch(t){return this[e(431)][r]}}[ve(419)](t,e){const r=ve,n=this.getFullStorageKey(t);try{window[r(426)][r(413)](n,e)}catch(t){this.FALLBACK_LOCAL_STORAGE[n]=e}}[ve(424)](t){const e=ve,r=this[e(430)](t);try{window[e(426)][e(435)](r)}catch(t){this[e(431)][r]=void 0}}}const Ae=Ce;function Ce(t,e){return t-=122,Se()[t]}!function(){const t=Ce,e=Se();for(;;)try{if(660694==parseInt(t(128))/1*(parseInt(t(127))/2)+-parseInt(t(138))/3+-parseInt(t(140))/4*(-parseInt(t(126))/5)+parseInt(t(135))/6+parseInt(t(147))/7+parseInt(t(141))/8*(parseInt(t(144))/9)+-parseInt(t(143))/10)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class Ie{constructor(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const e=Ce;this[e(130)]=t,this[e(134)]=e(142),this[e(133)]=1e4,this.logs=[],this[e(132)]=[]}[Ae(146)](t,e){this[Ae(124)](3,t,e)}[Ae(122)](t,e){this[Ae(124)](4,t,e)}error(t,e){this.pushLog(5,t,e)}[Ae(129)](){const t=Ae,e=this[t(139)];return this[t(139)]=[],e}[Ae(124)](t,e,r){const n=Ae;this[n(130)]&&console[n(137)](n(131),this[n(134)],e,JSON[n(123)](r)),this[n(139)].push({timestamp:Date[n(136)](),severity:t,text:JSON[n(123)](o(o({},r),{},{message:e}),this.formatter)}),this[n(139)][n(125)]>this.logsLimit&&this[n(139)][n(145)]();const i=this[n(132)].map((t=>t()));Promise.all(i).catch((()=>{}))}formatter(t,e){if(e instanceof Error){const{name:t,stack:r,message:n}=e;return{name:t,stack:r,message:n}}return e}}function Se(){const t=["warn","stringify","pushLog","length","65XMUxGR","2etInQr","753119eHxeEt","flush","enabled","%s %s %s","middlewares","logsLimit","logPrefix","7723650YPCtkj","now","log","2963340qxZKmX","logs","252716XDKLPM","228584VqwLoy","[AccountProtection SDK]","19124760PEZeZs","18ByFZUz","unshift","info","4494581XxAniL"];return(Se=function(){return t})()}const Te=new Ie;function De(){var t=["race","model","setTimeout","40168NDLgiZ","wow64","239752Dkiatd","10okZhkm","77488UiGOAX","54zoZNYJ","resolve","userAgentData","2002066jpmjSM","warn","name","1395304aEiFWp","1884koDxai","getHighEntropyValues","240lJgFwA","171iBInVQ","mobile","catch","4461009bbufFX","finally","executor reached timeout"];return(De=function(){return t})()}function Oe(){var t,e=Re;return null===(t=navigator[e(363)])||void 0===t?void 0:t[e(369)](["architecture",e(354),"platform","platformVersion","fullVersionList","bitness",e(348),e(357),"uaFullVersion"])}function Re(t,e){return t-=348,De()[t]}function Me(t,e){var r=Re;let n;const o=[Promise[r(362)](t()).catch((()=>{})),new Promise(((t,o)=>n=window[r(355)](o,e)))];return Promise[r(353)](o)[r(349)]((()=>Te[r(365)](r(352),{fnName:t[r(366)]})))[r(351)]((()=>clearTimeout(n)))}!function(){for(var t=Re,e=De();;)try{if(765105==-parseInt(t(360))/1+parseInt(t(356))/2*(parseInt(t(371))/3)+-parseInt(t(358))/4+parseInt(t(370))/5*(-parseInt(t(368))/6)+parseInt(t(350))/7+parseInt(t(367))/8*(-parseInt(t(361))/9)+-parseInt(t(359))/10*(-parseInt(t(364))/11))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();const Ne=xe;function ke(){const t=["label","getPerformanceTiming","5788zONujP","sin","__lastWatirConfirm","getOpenDatabase","Serifa","MS Mincho","cdc_adoQpoasnfa76pfcZLmcfl_Symbol","MS Reference Specialty","getProductSub","oncomplete","isPointInPath","11RUftjE","Humanst521 BT","addBehavior","angle","isNodeReachable_","oprt","tan","inverted","sans-serif","isArray","Bitstream Vera Sans Mono","reduce","Buffer","392MKINui","spawn","sdkDeviceDataCollectionIgnoreList","brave","hasSequentum","__webdriverFunc","__driver_evaluate","onLine","getFIDOEnabled","cache_","colorDepth","style","plugins","asin","driver-evaluate",'11pt "Times New Roman"',"userAgentData","visibility","getDeviceData","start","SCRIPTINA","values","getSessionStorage","Clarendon","getScreen","getInstalledRelatedApps","#f2f","Array","Microsoft Uighur","getOwnPropertyDescriptor","exp","getCryptoBindingData","languages","TRAJAN PRO","windowDocumentAuxVarsTest","worker throw error","AvantGarde Bk BT","crypto","fmget_targets","sinh","485235VSPzeG","__lastWatirAlert","enumerateDevices","getPlatform","getNavigatorProduct","fillRect","dataPoints","10px","Vrinda","platform","getContext","sqrt","external","indexedDB","description","product","kind","more","getBattery","evenodd","getMediaMatch","chargingTime","permissions","webdriver","dataPointsExtractor","__webdriver_script_func","webgl-experimental","getExtension","__webdriver_unwrapped","localStorage","Arabic Typesetting","collectPromisesData","__webdriver_evaluate","chrome","oscpu","HELV","__yb","calledSelenium","getCodesTests","EUROSTILE","cookieEnabled","100","getTimezoneOffset","Arial Unicode MS","CDPRuntimeDomainTest","__webdriver_script_function","getTimezone","webdriver-evaluate-response","getIndexedDB","beginPath","configManager","isBrave","getFloatTimeDomainData","webgl","__fxdriver_evaluate","maxTouchPoints","some","getTouchSupport","disconnect","forced","getCpuClass","high","reduction","stack","fontFamily","getAudioFingerprint","worker promise rejected","storageManager","prototype","callPhantom","release","MYRIAD PRO","replace","spynner_additional_js_loaded","getItemLocalStorageSafe","webRTCDisabled","Symbol","function","bind","ZWAdobeF","Menlo","selenium-evaluate","2199svWBZw","getBuildID","DocumentTouch","MS Outlook","18pt Arial","__nightmare","getOsCpu","getWindowOrientation","deviceDataCalculationExpiry","groupId","BankGothic Md BT","getHash","awesomium","font","Object","windowConstructorAliasTest","memory","ChromeDriverw","__gCrWeb","getBrave","log","__edgeTrackingPreventionStatistics","15NaggNa","test","sort","getOwnPropertyDescriptors","Lucida Bright","no-preference","WEBGL_debug_renderer_info","getPublicData","getMathFingerprint","getConfValue","getPlugins","left","tanh","standard","storeItem","hidden","8467570BRhUqC","getVendor","toString","129BycZNg","resolve","cosh","UNMASKED_RENDERER_WEBGL","createElement","low","Monotype Corsiva","getDocumentBasedKeys","map","fillText","getReferrer","getNavigatorPrototype","callSelenium","Franklin Gothic","offsetWidth","Helvetica Neue","name","geb","cos","canvas","body","closePath","knee","_WEBDRIVER_ELEM_CACHE","_phantom","height","DateTimeFormat","getRandomValues","offsetHeight","toDataURL","subarray","console","fillStyle","Calibri","getCanvasFingerprint","getCryptoRandomValues","attack","getLocalStorage","sendBeacon","Sequentum","hashCodeString","fontSize","__crWeb","dischargingTime","Minion Pro","document","state","navigatorOnLine","defineProperty","_Selenium_IDE_Recorder","getWebDriver","Agency FB","calledPhantom","__phantomas","setItemLocalStorageSafe","mediaDevices","__lastWatirPrompt","Segoe UI Light","getAudioFingerprintExtended","Haettenschweiler","createAnalyser","geolocation","charging","1000","PublicKeyCredential","3288789dcNVNI","SimHei","getCookieEnabled","msMaxTouchPoints","storage","getAddBehavior","getMediaDevices","availHeight","webdriverCommand","referrer","#069","less","yandex","__$webdriverAsyncExecutor","__selenium_evaluate","hardwareConcurrency","#f60","alphabetic","samsungAr","triangle","$chrome_asyncScriptInfo","ucweb","matches","timing","Staccato222 BT","domAutomationController","Small Fonts","log1p","Letter Gothic","Promise","rect","active","destination","__selenium_unwrapped","connect","Pristina","indexOf","width","invalidPublicKeyId","push","video/mp4;;Codecs =avc1.42E01E","devicePixelRatio","debug","lastDeviceData","Levenim MT","position","isSendBeaconFunction","threshold","frequency","cryptoBinding","Century","warn","retrieveItem","webkitOfflineAudioContext","startRendering","getPrototypeOf","Futura Md BT","length","ARNO PRO","Marlett","cdc_adoQpoasnfa76pfcZLmcfl_Promise","startPromisesLoop","textBaseline","renderedBuffer","rgba(102, 204, 0, 0.2)","__firefox__","isMobile","_selenium","fill","query","#f9c","serif","userAgent","absolute","acos","sessionStorage","url","3354704RbHhNR","value","top","type","getWindowOuter","every","puffinDevice","vendor","isGeoLocationExists","webkit","monospace","getConnection","now","credentials","level","createDynamicsCompressor","appendChild","serviceWorker","getHardwareConcurrency","MS UI Gothic","navigatorIsUserActive","entries","get","div","navigatorStorageEstimation","cpuClass","__fxdriver_unwrapped","includes","canPlayType","ontouchstart","productSub","getNavigatorUserAgent","abs","sans-serif-thin","__webdriverFuncgeb","outerWidth","filter","__driver_unwrapped","#ff2","orientation","webdriver-evaluate","getDeviceMemory","expm1","getNavigatorUAData","getOwnPropertyNames","frequencyBinCount","charCodeAt","OfflineAudioContext","none","cdc_adoQpoasnfa76pfcZLmcfl_Array","getPerformanceMemory","getNavigatorBasedKeys","53160IVRpOj","matchMedia","fftSize","__webdriver_script_fn","getNavigatorPermissionsState","Meiryo UI","RTCPeerConnection","getWindowBasedKeys","Leelawadee","GOTHAM","timeZone","createOscillator","__ybro","arc"];return(ke=function(){return t})()}function xe(t,e){return t-=343,ke()[t]}!function(){const t=xe,e=ke();for(;;)try{if(330696==parseInt(t(724))/1*(parseInt(t(602))/2)+-parseInt(t(368))/3*(parseInt(t(578))/4)+parseInt(t(349))/5*(-parseInt(t(562))/6)+parseInt(t(433))/7+parseInt(t(510))/8+-parseInt(t(642))/9+parseInt(t(365))/10*(-parseInt(t(589))/11))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();const Pe=Ne(604),Be=Ne(732),Fe=t=>t?[...t][Ne(600)](((t,e)=>t+Math[Ne(542)](e)),0):0;class Le{constructor(t,e,r){const n=Ne;this[n(709)]=t,this.configManager=e,this[n(482)]=r}async calculate(){const t=Ne,e=this[t(692)][t(358)](Pe,[]),r=this.configManager[t(358)](Be,36e5),n=await new ze(e,this[t(482)]).dataPointsExtractor();return this.lastDeviceData=n,this[t(709)][t(422)](Be,Date[t(522)]()+r),n}async[Ne(620)](){const t=Ne;return Number(this[t(709)][t(716)](Be))<Date.now()||!this[t(476)]?await this.calculate()||{}:this.lastDeviceData||{}}}class ze{constructor(t,e){const r=Ne;this.sdkDeviceDataCollectionIgnoreList=t,this[r(482)]=e,this[r(648)]={battery:this.getBattery,brave:this[r(346)],canvas:this[r(402)],codecs:this[r(680)],connection:this[r(521)],cookieEnabled:this.getCookieEnabled,cryptoRandomValues:this[r(403)],deviceMemory:this[r(551)],documentBasedKeys:this[r(375)],hardwareConcurrency:this[r(528)],indexedDB:this[r(690)],fidoEnabled:this.getFIDOEnabled,languages:this.getLanguages,language:this.getLanguage,timezoneOffset:this.getTimezoneOffset,localStorage:this[r(405)],navigatorBasedKeys:this.getNavigatorBasedKeys,navigatorProduct:this[r(646)],navigatorUserAgent:this[r(541)],navigatorUAData:this[r(553)],navigatorHighEntropyData:this.getNavigatorHighEntropyData,navigatorStorageEstimation:this[r(534)],navigatorOnLine:this.navigatorOnLine,navigatorIsUserActive:this.navigatorIsUserActive,math:this[r(357)],mediaMatch:this[r(662)],openDatabase:this[r(581)],windowOrientation:this[r(731)],platform:this.getPlatform,cpuClass:this[r(702)],osClass:this[r(730)],addBehavior:this.getAddBehavior,productSub:this[r(586)],mediaDevices:this[r(439)],audioFingerprint:this[r(707)],audioFingerprintExtended:this[r(426)],fonts:this.getFonts,performanceTiming:this.getPerformanceTiming,performanceMemory:this.getPerformanceMemory,plugins:this[r(359)],screen:this.getScreen,sequentum:this[r(606)],sessionStorage:this[r(624)],referrer:this.getReferrer,timezone:this[r(688)],touchSupport:this.getTouchSupport,vendor:this.getVendor,buildID:this[r(725)],webdriver:this[r(418)],webGlRenderer:this.getWebGlRenderer,windowBasedKeys:this[r(569)],windowOuter:this[r(514)],webRTCDisabled:this[r(717)],cryptoBindingData:this[r(633)].bind(this),notificationState:this[r(566)][r(720)](this,"notifications"),geolocationState:this[r(566)][r(720)](this,r(429)),isGeoLocationExists:this[r(518)],isSendBeaconExists:this[r(479)],navigatorPrototype:this[r(379)],installedRelatedApps:this[r(627)],windowConstructorAliasTest:this[r(739)],windowDocumentAuxVarsTest:this[r(636)],CDPRuntimeDomainTest:this[r(686)]}}[Ne(686)](){const t=Ne;let e=!1;const r=new window.Error;return window[t(738)][t(416)](r,"stack",{configurable:!1,enumerable:!1,get:function(){return e=!0,""}}),window[t(399)][t(475)](r[t(705)]),e}[Ne(636)](){const t=Ne;for(const e of window.Object[t(554)](window[t(413)]))if(e==t(453)||/^\$cdc_[a-zA-Z0-9]{22}_$/[t(350)](e))return!0;for(const e of window[t(738)][t(623)](window.Object[t(352)](window[t(413)]))){if(!e[t(511)]||void 0===e.value[t(611)])continue;const r=window[t(738)][t(554)](window[t(738)].getPrototypeOf(e[t(511)])),n=[t(363),t(485),t(593)];if(r.sort(),n[t(351)](),r[t(515)](((t,e)=>t==n[e])))return!0}return!1}[Ne(739)](){const t=Ne,e=window[t(738)][t(554)](window);for(const r of e){if(/^cdc_[a-zA-Z0-9]{22}_(Array|Promise|Symbol)$/[t(350)](r))return!0;for(const e of[window[t(629)],window[t(462)],window[t(718)]])if(r!=(null==e?void 0:e[t(384)])&&"token"!=r&&"getAsyncToken"!=r&&window[r]===e)return!0}return!1}async[Ne(666)](){const t=Ne,e=this[t(494)]();return await this[t(673)](e)}[Ne(494)](){const t=Ne,e={};for(const[r,n]of Object[t(531)](this[t(648)]))if(!this[t(604)][t(537)](r))try{e[r]=Me(n,100)}catch(n){Te[t(484)](t(637),{e:n,key:r}),e[r]=Promise[t(369)]()}return e}async[Ne(673)](t){const e=Ne,r={};for(const[n,o]of Object[e(531)](t))try{r[n]=await o}catch(t){Te.warn(e(708),{e:t,key:n}),r[n]=void 0}return r}[Ne(435)](){const t=navigator[Ne(682)];return Promise.resolve(t)}async[Ne(610)](){const t=Ne;return!!navigator[t(523)]&&await window[t(432)].isUserVerifyingPlatformAuthenticatorAvailable()}getCryptoRandomValues(){const t=Ne,e=window[t(639)][t(395)](new Uint8Array(16));return Array.from(e)}[Ne(717)](){const t=Ne,e=null==window[t(568)];return Promise[t(369)](e)}[Ne(569)](){const t=Ne,e=[t(675),"safari",t(410),t(345),t(445),t(678),t(574),t(498),t(348),t(519),t(594),t(451),t(454),"UCShellJava",t(516),t(392),t(421),t(711),t(601),"emit",t(603),t(458),"domAutomation",t(729),t(500),"calledSelenium",t(380),t(417),t(446),t(608),t(547),t(696),t(536),"__lastWatirAlert",t(580),"__lastWatirPrompt",t(447),t(466),"__webdriver__chr",t(674),t(565),t(667),t(687),t(670),t(544),t(736),t(420),t(559),t(493),t(584),"chrome_asyncScriptInfo",t(640),t(385),"OSMJIF",t(715),"watinExpressionError","watinExpressionResult"],r=[];for(const n of e){const e=window[n];void 0!==e&&null!=e&&r[t(472)](n)}return Promise[t(369)](r)}[Ne(662)](){const t=Ne,e={"dynamic-range":["high",t(362)],"prefers-reduced-motion":[t(354),"reduce"],"prefers-contrast":[t(354),t(703),t(373),t(659),t(444),t(701)],"max-monochrome":["0","10",t(683),t(431)],"forced-colors":[t(464),"none"],"inverted-colors":[t(596),t(558)],"color-gamut":["rec2020","p3","srgb"]},r={};for(const[n,o]of Object[t(531)](e))for(const e of o)r[n[t(714)](/-/g,"_")+"_"+e[t(714)](/-/g,"_")]=window[t(563)]("("+n+": "+e+")").matches;return Promise[t(369)](r)}[Ne(357)](){const t=Ne,e=[Math[t(507)](.12312423423423424),Math.acosh(1e308),(r=1e154,Math.log(r+Math[t(653)](r*r-1))),Math[t(615)](.12312423423423424),Math.asinh(1),Math[t(347)](1+Math[t(653)](2)),Math.atanh(.5),Math[t(347)](3)/2,Math.atan(.5),Math[t(579)](-1e300),Math[t(641)](1),Math[t(632)](1)-1/Math[t(632)](1)/2,Math[t(386)](10.000000000123),Math[t(370)](1),(Math.exp(1)+1/Math[t(632)](1))/2,Math[t(595)](-1e300),Math[t(361)](1),(Math[t(632)](2)-1)/(Math[t(632)](2)+1),Math[t(632)](1),Math[t(552)](1),Math[t(632)](1)-1,Math[t(460)](10),Math.log(11),Math.PI**-100];var r;let n="";for(let r=0;r<e[t(490)];r++)n+=e[r].toString();return Promise[t(369)](ze.hashCodeString(n))}[Ne(521)](){const{connection:t}=navigator,e=(t=>{let{downlink:e,effectiveType:r,rtt:n,saveData:o}=t;return{downlink:e,effectiveType:r,rtt:n,saveData:o}})(t);return Promise.resolve(e)}[Ne(624)](){const t=Ne;return Promise[t(369)](!!window[t(508)])}[Ne(405)](){const t=Ne;return Promise[t(369)](!!window[t(671)])}[Ne(606)](){const t=Ne;return-1!==window[t(654)][t(367)]()[t(469)](t(407))}[Ne(561)](){const t=Ne;return[t(665),t(608),"__webdriver_evaluate","__selenium_evaluate",t(696),t(547),"__webdriver_unwrapped",t(466),t(536),t(417),t(500),t(679),t(391),t(344),t(616),t(550),t(723),t(441),t(689),t(607),"__webdriver_script_fn","__$webdriverAsyncExecutor",t(643),"__lastWatirConfirm",t(424),t(453),"$cdc_asdjflasutopfhvcZLmcfl_",t(527)].filter((t=>navigator[t]))}[Ne(646)](){const t=Ne,e=navigator[t(657)];return Promise[t(369)](e)}getNavigatorUserAgent(){return navigator[Ne(505)]}[Ne(553)](){return navigator[Ne(618)]}getNavigatorHighEntropyData(){return Oe()}navigatorStorageEstimation(){return navigator[Ne(437)].estimate()}[Ne(415)](){return navigator[Ne(609)]}[Ne(530)](){return navigator.userActivation.isActive}async[Ne(566)](t){const e=Ne;try{const r=await navigator[e(664)][e(502)]({name:t});return null==r?void 0:r[e(414)]}catch(t){}}[Ne(518)](){return!!navigator[Ne(429)]}isSendBeaconFunction(){const t=Ne;return typeof navigator[t(406)]===t(719)}[Ne(379)](){const t=Ne;return{hardwareConcurrency:Object[t(631)](Object[t(488)](navigator),t(448))[t(532)].toString(),languages:Object[t(631)](Object[t(488)](navigator),t(634))[t(532)][t(367)]()}}async[Ne(627)](){const t=Ne;if(typeof navigator[t(627)]===t(719))try{const{related_applications:e}=await navigator[t(627)]();if(e&&Array[t(598)](e))return e[t(376)]((e=>{const r=t;return{platform:e[r(651)],url:e[r(509)]}}))}catch(t){}}[Ne(378)](){return document[Ne(442)]}[Ne(577)](){return performance[Ne(456)]}[Ne(560)](){const t=Ne,{jsHeapSizeLimit:e,totalJSHeapSize:r,usedJSHeapSize:n}=performance[t(343)];return{jsHeapSizeLimit:e,totalJSHeapSize:r,usedJSHeapSize:n}}[Ne(690)](){const t=Ne;return Promise[t(369)](!!window[t(655)])}[Ne(581)](){const t=Ne,{openDatabase:e}=window;return Promise[t(369)](!!e)}[Ne(699)](){const t=Ne,e=window[t(726)]&&document instanceof DocumentTouch,r={maxTouchPoints:navigator[t(697)]||navigator[t(436)]||0,documentTouch:e,ontouchstart:t(539)in window};return Promise[t(369)](r)}[Ne(359)](){const t=Ne;function e(t){const e=xe,r=[];for(let n=0;n<t[e(490)];++n)r.push({type:t[n].type,suffixes:t[n].suffixes});return r}const r=[];for(let n=0;n<navigator.plugins.length;++n){const o=navigator[t(614)][n];o&&r[t(472)]({name:o.name,description:o[t(656)],mimeTypes:e(o)})}return Promise.resolve(r)}[Ne(626)](){const t=Ne,e=window.screen||screen,{availLeft:r}=e,{availTop:n}=e,o={availHeight:e[t(440)],availLeft:r,availTop:n,availWidth:e.availWidth,colorDepth:e[t(612)],height:e.height,width:e.width,pixelDepth:e.pixelDepth,orientationAngle:e[t(549)]&&e[t(549)][t(592)],orientationType:e[t(549)]&&e[t(549)][t(513)],devicePixelRatio:window[t(474)]};return Promise[t(369)](o)}static[Ne(408)](t){const e=Ne;if(null==t)return;let r=0,n=0;const o=t[e(490)];for(;n<o;)r=(r<<5)-r+t[e(556)](n++)|0;return r}[Ne(514)](){const t=Ne,e={outerWidth:window[t(545)],outerHeight:window.outerHeight};return Promise[t(369)](e)}getWebDriver(){const t=Ne,e=navigator.webdriver;return Promise[t(369)](e)}[Ne(731)](){const t=window[Ne(549)];return Promise.resolve(t)}[Ne(645)](){const t=Ne,e=navigator[t(651)];return Promise[t(369)](e)}getCpuClass(){const t=Ne,e=navigator[t(535)];return Promise[t(369)](e)}[Ne(730)](){const t=Ne,e=navigator[t(676)];return Promise[t(369)](e)}[Ne(438)](){const t=Ne,e=!!window.HTMLElement[t(710)][t(591)];return Promise[t(369)](e)}[Ne(586)](){const t=Ne,e=navigator[t(540)];return Promise[t(369)](e)}async[Ne(439)](){const t=Ne,e=await navigator[t(423)][t(644)](),r=[];for(const n of e)r[t(472)]({kind:n[t(658)],label:n[t(576)],deviceId:n.deviceId,groupId:n[t(733)]});return r}async[Ne(707)](){const t=Ne,e=window[t(557)]||window[t(486)];if(!e)return-1;const r=new e(1,5e3,44100),n=r[t(573)]();n[t(513)]=t(452),n.frequency[t(511)]=1e4;const o=r[t(525)]();o[t(480)][t(511)]=-50,o[t(390)][t(511)]=40,o.ratio[t(511)]=12,o[t(404)][t(511)]=0,o[t(712)][t(511)]=.25,n.connect(o),o.connect(r.destination),n.start(0);const i=new Promise((async(e,n)=>{const o=t;r[o(587)]=t=>e(t[o(496)]);try{await r[o(487)]()}catch(t){n(t)}})),a=(await i).getChannelData(0)[t(398)](4500);return ze.getHash(a)}async getAudioFingerprintExtended(){const t=Ne;var e;const r=window.OfflineAudioContext||window[t(486)];if(!r)return{};const n=new r(1,5e3,44100),o=n[t(573)]();o[t(513)]="triangle",o[t(481)][t(511)]=1e4;const i=n[t(525)]();i[t(480)][t(511)]=-50,i[t(390)][t(511)]=40,i[t(404)].value=0;const a=n[t(428)]();o.connect(i),i[t(467)](a),i[t(467)](n[t(465)]),o[t(621)](0);try{await n[t(487)](),i[t(700)](),o[t(700)]();const r=new Float32Array(a[t(555)]);null===(e=a.getFloatFrequencyData)||void 0===e||e.call(a,r);const s=new Float32Array(a[t(564)]);return t(694)in a&&a[t(694)](s),{gain:i.reduction.value||i[t(704)],freq:Fe(r),time:Fe(s)}}catch(t){return{}}}static[Ne(735)](t){const e=Ne;let r=0;for(let n=0;n<t[e(490)];++n)r+=Math[e(542)](t[n]);return r}getFonts(){const t=Ne,e=[t(520),t(597),t(504)],r=[t(543),t(491),t(419),t(672),t(685),t(638),t(734),"Batang",t(599),t(401),t(483),"Century Gothic",t(625),t(681),t(381),"Futura Bk BT",t(489),t(571),"Gill Sans",t(677),t(427),t(383),t(590),t(570),t(461),t(477),t(353),"Lucida Sans",t(722),t(583),t(727),t(585),t(529),"MT Extra",t(713),t(492),t(567),t(630),t(412),t(374),"PMingLiU",t(468),t(622),t(425),t(582),t(434),t(459),t(457),t(635),"Univers CE 55 Medium",t(650),t(721)],n=document[t(372)](t(533));n[t(613)][t(619)]=t(364);const o={},i={},a=e=>{const r=t,o=document[r(372)]("span"),{style:i}=o;return i[r(478)]=r(506),i[r(512)]="0",i[r(360)]="0",i[r(706)]=e,i[r(409)]=r(649),o.textContent="mmMwWLliI0O&1",n.appendChild(o),o},s=e[t(376)](a),u=(()=>{const n=t,o={};for(const t of r)o[t]=e[n(376)]((e=>a("'"+t+"',"+e)));return o})();document[t(388)][t(526)](n);try{for(let r=0;r<e[t(490)];r++)o[e[r]]=s[r][t(382)],i[e[r]]=s[r][t(396)];const n=r.filter((r=>(r=>{const n=t;return e[n(698)](((t,e)=>r[e][n(382)]!==o[t]||r[e][n(396)]!==i[t]))})(u[r])));return Promise[t(369)](n)}finally{document[t(388)].removeChild(n)}}[Ne(684)](){const t=Ne,e=(new Date)[t(684)]();return Promise[t(369)](e)}getLanguage(){const t=Ne,e=navigator.language;return Promise[t(369)](e)}getLanguages(){const t=Ne,e=navigator.languages;return Promise[t(369)](e)}getHardwareConcurrency(){const t=Ne,e=navigator[t(448)];return Promise[t(369)](e)}getDeviceMemory(){const t=Ne,e=navigator.deviceMemory;return Promise[t(369)](e)}[Ne(375)](){const t=Ne;return[t(674),t(447),t(687),"__webdriver_script_func","__webdriver_script_fn",t(696),"__driver_unwrapped","__webdriver_unwrapped",t(608),t(466),t(536)][t(546)]((t=>document[t]))}[Ne(688)](){const t=Ne,e=Intl[t(394)]().resolvedOptions()[t(572)];return Promise[t(369)](e)}[Ne(366)](){const t=Ne,e=navigator[t(517)];return Promise[t(369)](e)}getBuildID(){const t=Ne,e=navigator.buildID;return Promise[t(369)](e)}async getCanvasFingerprint(){const t=Ne,e=document.createElement(t(387));e.width=1,e.height=1;const r=e.getContext("2d"),n={winding:function(t){const e=xe;return t[e(463)](0,0,10,10),t[e(463)](2,2,6,6),!t[e(588)](5,5,e(661))}(r),geometry:function(t,e){const r=xe;t[r(470)]=122,t[r(393)]=110,e.globalCompositeOperation="multiply";const n=[[r(628),40,40],["#2ff",80,40],[r(548),60,80]];for(const[t,o,i]of n)e[r(400)]=t,e[r(691)](),e[r(575)](o,i,40,0,2*Math.PI,!0),e[r(389)](),e[r(501)]();return e.fillStyle=r(503),e[r(575)](60,60,60,0,2*Math.PI,!0),e.arc(60,60,20,0,2*Math.PI,!0),e[r(501)](r(661)),ze[r(408)](t[r(397)]())}(e,r),text:function(t,e){const r=xe;t[r(470)]=240,t[r(393)]=60,e[r(495)]=r(450),e.fillStyle=r(449),e[r(647)](100,1,62,20),e.fillStyle=r(443),e[r(737)]=r(617);const n="Cwm fjordbank gly "+String.fromCharCode(55357,56835);return e[r(377)](n,2,15),e.fillStyle=r(497),e.font=r(728),e[r(377)](n,4,45),ze[r(408)](t.toDataURL())}(e,r)};return Promise[t(369)](n)}async getBattery(){const t=Ne,e=await navigator[t(660)]();return{charging:e[t(430)],chargingTime:e[t(663)],dischargingTime:e[t(411)],level:e[t(524)]}}async[Ne(346)](){const t=Ne;return!!navigator[t(605)]&&await navigator[t(605)][t(693)]()}async getWebGlRenderer(){const t=Ne,e=document.createElement(t(387)),r=e[t(652)](t(695))||e[t(652)](t(668)),n=r[t(669)](t(355));return Promise[t(369)](r.getParameter(n[t(371)]))}async[Ne(680)](){const t=Ne,e=document.createElement("video"),r={basic:""===e[t(538)]('video/mp4; codecs="avc1.42E01E"'),advanced:""===e[t(538)](t(473))};return Promise[t(369)](r)}async getCryptoBindingData(){const t=Ne,{publicKey:e,keyIdentifier:r,errors:n}=await this.cryptoBinding[t(356)](),o={publicKey:e,keyIdentifier:r};return(null==n?void 0:n[0])&&(o[t(471)]=n[0]),o}static[Ne(499)](){const t=Ne;return/iPhone|iPad|iPod|Android|MiuiBrowser/i.test(navigator[t(505)])||null!=window[t(549)]||window[t(563)]("only screen and (max-width: 600px)")[t(455)]}}const Ue=je;var Ve;!function(){const t=je,e=We();for(;;)try{if(341031==parseInt(t(128))/1*(parseInt(t(140))/2)+parseInt(t(130))/3+parseInt(t(136))/4*(parseInt(t(131))/5)+parseInt(t(138))/6+-parseInt(t(125))/7*(-parseInt(t(142))/8)+-parseInt(t(143))/9*(-parseInt(t(129))/10)+-parseInt(t(124))/11*(parseInt(t(132))/12))break;e.push(e.shift())}catch(t){e.push(e.shift())}}(),function(t){const e=je;t[e(135)]=e(126),t[e(133)]=e(139),t[e(134)]="interaction",t[e(123)]=e(137),t[e(141)]="action_result"}(Ve||(Ve={}));const He="desktop_web";function je(t,e){return t-=123,We()[t]}const Ge=Ue(127);function We(){const t=["mobile_web","1DmOloV","3692960VwgNyK","924909csWGvF","3292100JeUgXB","12KXeaNR","EVENT_TYPE_DEVICE","EVENT_TYPE_INTERACTION","EVENT_TYPE_ACTION","4DHHIcF","identification","2928030dYGHPV","device","439594fMgLVr","EVENT_TYPE_ACTION_RESULT","1816216vCzajy","9oJeDWp","EVENT_TYPE_IDENTIFICATION","21227987rNFUMN","7EfrOWp","action"];return(We=function(){return t})()}const Xe=Ke;function Ye(){const t=["device/conf?tenantId=","error fetching config","186228DSROEL","98RVVseV","setItemLocalStorageSafe","getConfValue","conf","21973743pcLfvL","error","6CNclCv","439912otWUJz","shouldUpdateConf","fetchConf","2428120RhMzOC","refreshConf","error loading config","loadConf","timestamp","storageManager","207436PmxEDw","stringify","3813136rlnhUe","isMobile","now","requestsManager","keys","getData","403474AkaNLL"];return(Ye=function(){return t})()}!function(){const t=Ke,e=Ye();for(;;)try{if(253202==-parseInt(t(168))/1+-parseInt(t(185))/2*(parseInt(t(167))/3)+parseInt(t(177))/4+-parseInt(t(171))/5+-parseInt(t(188))/6*(parseInt(t(189))/7)+-parseInt(t(179))/8+parseInt(t(193))/9)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();const Ze=Xe(175);class qe{constructor(t,e){const r=Xe;this.storageManager=t,this[r(182)]=e,this.conf=this[r(174)]()}async fetchConf(t){const e=Xe;try{const r=ze[e(180)]()?Ge:He,n=e(186)+t+"&type="+r,o=await this[e(182)][e(184)](n);return null!=o?o:{}}catch(r){return Te[e(166)](e(187),{clientId:t,error:r}),{}}}[Xe(174)](){const t=Xe,e=this[t(176)].getItemLocalStorageSafe("ric");if(null!=e)try{return JSON.parse(e)}catch(e){Te[t(166)](t(173),{error:e})}return{}}shouldUpdateConf(){const t=Xe,e=this[t(191)](Ze,0);return Date[t(181)]()-e>36e5}async[Xe(172)](t){const e=Xe;if(!this[e(169)]())return!1;let r=await this[e(170)](t);return 0==Object[e(183)](r).length?r=this.loadConf():this.storageManager[e(190)]("ric",JSON[e(178)](r)),this[e(192)]=r,!0}[Xe(191)](t,e){const r=Xe,n=void 0!==this[r(192)]?this[r(192)][t]:void 0;return null!=n?n:e}}function Ke(t,e){return t-=166,Ye()[t]}function $e(t,e){return t-=211,tr()[t]}const Je=$e;!function(){const t=$e,e=tr();for(;;)try{if(266472==parseInt(t(226))/1+-parseInt(t(224))/2*(-parseInt(t(217))/3)+parseInt(t(216))/4+-parseInt(t(222))/5*(parseInt(t(219))/6)+-parseInt(t(218))/7+parseInt(t(214))/8+-parseInt(t(228))/9*(-parseInt(t(227))/10))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class Qe{static maintainLastXItems(t,e,r){const n=$e;return t.length>=e&&t[n(221)](0,1),t[n(225)](r),t}static[Je(213)](t){const e=Je;var r,n;return(null!==(r=performance[e(215)])&&void 0!==r?r:Date[e(223)]()-performance[e(223)]())+(null!==(n=null==t?void 0:t[e(229)])&&void 0!==n?n:performance[e(223)]())}static base64UrlEncode(t){const e=Je,r=(new TextEncoder)[e(212)](t),n=String.fromCharCode(...r);return btoa(n)[e(211)](/\+/g,"-")[e(211)](/\//g,"_").replace(/=/g,"")}static[Je(220)](t){const e=Je;return t.replace(/\+/g,"-").replace(/\//g,"_")[e(211)](/=/g,"")}}function tr(){const t=["274782mocrNp","base64ToBase64Url","splice","55MQLkEt","now","2BOgnUb","push","110478IQfoFW","10LYRIES","767889yMXdaZ","timeStamp","replace","encode","getEventHighResTimestamp","2386400TZrXwz","timeOrigin","1313540wFNSUZ","641499svFKoT","1862546ngrTdo"];return(tr=function(){return t})()}function er(){const t=["function","cancelable","3388470ygJfjA","165456ZqfVWz","shiftKey","extractEventData","22926filQCk","metaKey","getEventHighResTimestamp","length","inputType","1227624FihvTp","maintainLastXItems","collect","composed","data","extractButtonsPressedData","detail","buffer","1379181kPSjEx","270571wKsMZI","sourceCapabilities","firesTouchEvents","altKey","getCoalescedEvents","parentId","ctrlKey","164460TUKYIw","offsetY","bufferSize","forEach","8PVLGmc","now","target","buttons","getData","offsetX","view","isTrusted"];return(er=function(){return t})()}const rr=nr;function nr(t,e){return t-=335,er()[t]}!function(){const t=nr,e=er();for(;;)try{if(301781==parseInt(t(343))/1+parseInt(t(340))/2+parseInt(t(356))/3+parseInt(t(348))/4+parseInt(t(364))/5+-parseInt(t(339))/6+-parseInt(t(357))/7*(parseInt(t(368))/8))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class or{constructor(t){const e=nr;this[e(352)]=[],this[e(355)]=t}[rr(350)](t){const e=rr,r=this[e(342)](t);Qe[e(349)](this.data,this[e(355)],r)}getData(){return this.data}[rr(342)](t){const e=rr;return o({x:t.x,y:t.y,tspl:Date[e(369)]()},this[e(353)](t))}extractButtonsPressedData(t){const e=rr;return o(o(o(o({},t[e(363)]&&{ctrlKey:!0}),t[e(360)]&&{altKey:!0}),t[e(341)]&&{shiftKey:!0}),0!=t[e(371)]&&{buttons:t.buttons})}}class ir{constructor(t){const e=rr;this.data=[],this[e(366)]=t}collect(t){const e=rr,r=Qe[e(345)](t);if(typeof t[e(361)]===e(337)){const n=t[e(361)]();if(n&&n[e(346)]>0)return void n[e(367)]((t=>{const n=e,o=this[n(342)](t,r,!0);Qe[n(349)](this[n(352)],this[n(366)],o)}))}const n=this[e(342)](t,r,!1);Qe[e(349)](this.data,this.bufferSize,n)}getData(){return this[rr(352)]}[rr(342)](t,e,r){const n=rr,i=o({x:t.x,y:t.y,timestampHighRes:Qe.getEventHighResTimestamp(t)},this[n(353)](t));return r&&(i[n(362)]=e),i}[rr(353)](t){const e=rr;return o(o(o(o({},t.ctrlKey&&{ctrlKey:!0}),t.altKey&&{altKey:!0}),t[e(341)]&&{shiftKey:!0}),0!=t[e(371)]&&{buttons:t[e(371)]})}}class ar{constructor(t){const e=rr;this[e(352)]=[],this[e(355)]=t}[rr(350)](t){const e=rr;var r;const n={x:t.x,y:t.y,timestamp:Date.now(),mouseButtonType:t[e(354)],offsetX:t[e(373)],offsetY:t[e(365)],isPressed:null==(null===(r=t.sourceCapabilities)||void 0===r?void 0:r.firesTouchEvents)?null:!t[e(358)].firesTouchEvents,target_id:t[e(370)].id};Qe.maintainLastXItems(this[e(352)],this[e(355)],n)}[rr(372)](){const t=[...this[rr(352)]];return this.data=[],t}}class sr{constructor(t){const e=rr;this[e(352)]=[],this[e(366)]=t}[rr(350)](t){const e=rr;var r;const n={isTrusted:t.isTrusted,cancelable:t.cancelable,composed:t[e(351)],isView:!!t[e(335)],shiftKey:t.shiftKey,metaKey:t[e(344)],ctrlKey:t[e(363)],altKey:t[e(360)],firesTouchEvents:null===(r=t[e(358)])||void 0===r?void 0:r[e(359)],timestamp:Date.now()};Qe[e(349)](this.data,this.bufferSize,n)}[rr(372)](){const t=rr,e=[...this.data];return this[t(352)]=[],e}}class ur{constructor(t){const e=rr;this[e(352)]=[],this[e(366)]=t}[rr(350)](t){const e=rr;var r;const n={isTrusted:t[e(336)],cancelable:t[e(338)],composed:t[e(351)],isView:!!t[e(335)],location:t.location,shiftKey:t[e(341)],ctrlKey:t.ctrlKey,altKey:t.altKey,firesTouchEvents:null===(r=t[e(358)])||void 0===r?void 0:r[e(359)],timestamp:Date[e(369)]()};Qe[e(349)](this.data,this[e(366)],n)}[rr(372)](){const t=rr,e=this[t(352)];return this[t(352)]=[],e}}class cr{constructor(t){const e=rr;this[e(352)]=[],this[e(366)]=t}[rr(350)](t){const e=rr,r={isTrusted:t.isTrusted,cancelable:t[e(338)],composed:t[e(351)],inputType:t[e(347)],isView:!!t[e(335)],timestamp:Date[e(369)]()};Qe[e(349)](this.data,this.bufferSize,r)}getData(){const t=rr,e=this.data;return this[t(352)]=[],e}}class lr{constructor(t){const e=rr;this[e(352)]=[],this[e(366)]=t}[rr(350)](t){const e=rr,r={isTrusted:t[e(336)],cancelable:t[e(338)],composed:t[e(351)],timestamp:Date[e(369)]()};Qe[e(349)](this[e(352)],this[e(366)],r)}[rr(372)](){const t=rr,e=this.data;return this[t(352)]=[],e}}const dr=Pr;function hr(){const t=["getGenericAttributes","selectMoveEventTypeBasedOnRollout","input","10947640ItJMDM","moveEventType","persistRolloutAndMoveEventTypeSelections","focus","PointerEvent","cancelable","keyup","error","mouseEventsCollectionBuffer","visibilitychange","addEventListener","href","getStoredMoveEventType","firesTouchEvents","deviceEventDataCollectionIgnoreList","filter","interactionEventsCollectorsData","pecrp","cmet","getData","SELECT","Error while adding listener","getAttachedData","virtualKeyboard","getItemLocalStorageSafe","INPUT","clipboardData","isTrusted","pointermove","100ODiELc","offsetY","mouseup","paste","target","change","989030aCtfqJ","composed","keydown","addSafeInteractionListener","sourceCapabilities","visibilityState","1172612gjmEDE","overlaysContent","getEventHighResTimestamp","208218msgxDx","tagName","hasFocus","storageManager","3266240NleYgq","includes","dropEffect","forEach","setItemLocalStorageSafe","pagehide","TEXTAREA","offsetX","handleEvent","eventTypesToAttach","random","pointerMoveRolloutPercentage","inputTypeFilter","undefined","448976xraPNk","pageshow","detectMoveEventType","effectAllowed","click","blur","collect","pointerevents","mousemove","keys","submit","54642oFXrIJ","error adding interaction listener","entries","safeEventCallback"];return(hr=function(){return t})()}!function(){const t=Pr,e=hr();for(;;)try{if(451766==-parseInt(t(509))/1+-parseInt(t(482))/2+-parseInt(t(440))/3+-parseInt(t(495))/4+-parseInt(t(476))/5*(-parseInt(t(491))/6)+parseInt(t(488))/7+parseInt(t(447))/8)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();const fr=dr(481),pr=dr(513),gr=dr(479),mr=dr(437),yr=dr(475),wr=dr(478),_r="mousedown",vr=dr(439),Er=dr(453),br=dr(484),Ar=dr(446),Cr="focusout",Ir=dr(450),Sr=dr(514),Tr=dr(456),Dr=dr(500),Or=dr(510),Rr=dr(436),Mr=[dr(472),dr(467),dr(501)],Nr=dr(464),kr=dr(465);class xr{constructor(t,e,r,n,i){const a=dr;this[a(494)]=n,this[a(461)]=t,this[a(455)]=e,this[a(443)]=r,this[a(506)]=i,this[a(448)]=this[a(511)](),this[a(463)]={[pr]:{eventTypesToAttach:[this[a(448)],wr,_r],attributesMapper:t=>{const e=a;var r;return{x:t.x,y:t.y,mouseButtonType:t.detail,isPressed:null==(null===(r=t[e(486)])||void 0===r?void 0:r[e(460)])?null:!t[e(486)][e(460)],offsetX:t[e(502)],offsetY:t[e(477)],target_id:t[e(480)].id}}},[gr]:{attributesMapper:t=>{const e=a;return{target_id:t.target.id,isTrusted:t[e(474)],cancelable:t[e(452)],composed:t[e(483)],dropEffect:t[e(473)][e(497)],effectAllowed:t[e(473)][e(512)]}}},[vr]:{attributesMapper:t=>({target_id:t[a(480)].id})},[mr]:{continousCollectors:[new or(this[a(455)])]},[yr]:{continousCollectors:[new ir(this.mouseEventsCollectionBuffer)]},[wr]:{continousCollectors:[new ar(1)]},[_r]:{continousCollectors:[new ar(1)]},[Cr]:{eventTypesToAttach:[Ar,Er,br,fr],filter:this[a(507)],attributesMapper:t=>{const e=a,{target:r,isTrusted:n,cancelable:i,composed:s}=t;return o({target_id:r.id,dataset_keys:Object[e(438)](r.dataset||{}),isTrusted:n,cancelable:i,composed:s},navigator[e(470)]&&{navigator_virtualKeyboard:navigator[e(470)][e(489)]})}},[Ar]:{filter:this.inputTypeFilter,continousCollectors:[new cr(50)]},[Er]:{filter:this[a(507)],continousCollectors:[new ur(50)]},[br]:{filter:this[a(507)],continousCollectors:[new sr(50)]},[fr]:{continousCollectors:[new lr(50)]},[Ir]:{attributesMapper:t=>{const e=a;var r;return{visibilityState:document[e(487)],hasFocus:document[e(493)](),timestampHighRes:Qe[e(490)](t),target_id:null===(r=t.target)||void 0===r?void 0:r.id}}},[Sr]:{attributesMapper:t=>{const e=a;var r;return{visibilityState:document.visibilityState,hasFocus:document[e(493)](),timestampHighRes:Qe[e(490)](t),target_id:null===(r=t[e(480)])||void 0===r?void 0:r.id}}},[Tr]:{attributesMapper:t=>{const e=a;return{visibilityState:document[e(487)],hasFocus:document[e(493)](),timestampHighRes:Qe[e(490)](t)}}},[Dr]:{attributesMapper:t=>{const e=a;return{visibilityState:document.visibilityState,hasFocus:document[e(493)](),timestampHighRes:Qe[e(490)](t)}}},[Or]:{attributesMapper:t=>{const e=a;return{visibilityState:document[e(487)],hasFocus:document[e(493)](),timestampHighRes:Qe[e(490)](t)}}}}}[dr(511)](){const t=dr;return typeof window!==t(508)&&window[t(451)]?this[t(445)]():mr}selectMoveEventTypeBasedOnRollout(){const t=dr,e=this.storageManager[t(471)](Nr);if((null!=e?Number(e):null)!==this.pointerMoveRolloutPercentage){const e=Math[t(505)]()<this.pointerMoveRolloutPercentage/100?yr:mr;return this[t(449)](e),e}return this[t(459)]()}[dr(449)](t){const e=dr;this.storageManager[e(499)](Nr,this.pointerMoveRolloutPercentage),this[e(494)].setItemLocalStorageSafe(kr,t)}[dr(459)](){const t=this[dr(494)].getItemLocalStorageSafe(kr);return(e=t)===yr||e===mr?t:mr;var e}[dr(507)](t){const e=dr;var r;const n=null===(r=t[e(480)])||void 0===r?void 0:r[e(492)];return Mr.includes(n)}registerEventListeners(){const t=dr;for(const[e,r]of Object[t(442)](this[t(463)]))if(!this[t(461)][t(496)](e)&&!(e===mr&&this[t(448)]===yr||e===yr&&this[t(448)]===mr))try{this.addSafeInteractionListener(e,r)}catch(r){Te[t(454)](t(468),{error:r,eventType:e})}}[dr(462)](t,e){const r=dr;return!t.filter||t[r(462)](e)}async[dr(503)](t,e,r){const n=dr,{attributesMapper:i,continousCollectors:a}=t;if(!this[n(462)](t,e))return!1;if(a)a.forEach((t=>{t[n(515)](e)}));else{const t=this[n(444)](),a=this[n(469)](r),s=o(o(o({},t),i(e)),a&&{attachedEventsData:a});await this.safeEventCallback(r,s)}return!0}[dr(485)](t,e){const r=dr;window[r(457)](t,(async n=>{const o=r;try{await this[o(503)](e,n,t)}catch(t){Te[o(454)](o(441),{error:t})}}),t===Ir||t===Sr)}[dr(469)](t){const e=dr;let r;const n=this[e(463)][t][e(504)];return n&&(r={},n[e(498)]((t=>{const n=e,{continousCollectors:o}=this[n(463)][t];if(o){const e=t===yr?Rr:t;o[n(498)]((t=>r[e]=t[n(466)]()))}}))),r}[dr(444)](){const t=dr;return{location:window.location[t(458)]}}}function Pr(t,e){return t-=436,hr()[t]}function Br(t,e){return t-=402,Fr()[t]}function Fr(){var t=["70443LQNIlU","510455gmfSoO","compressed","1928MUqsbD","9IhXwmx","compress","158JpldRY","589360wezGtx","ALLOW","TRUST","uncompressed","CHALLENGE","4fssBIU","DENY","672wqVEQO","5141961naToty","5418mogKSs","533140aXYoUF"];return(Fr=function(){return t})()}var Lr,zr,Ur,Vr,Hr,jr;function Gr(t,e){return t-=139,Wr()[t]}function Wr(){const t=["6IoRakW","encrypt","exportKey","3091yAhlbY","crypto","encryptPayload","importPublicKey","string","21ZefatE","375105zdHDlv","fromCharCode","decrypt","7QoNBiD","encryptSymKeyBundle","crypto is not supported","parse","arrayBufferToBase64","btoa","17001HpmaEx","590ZAuGNk","SHA-256","stringify","subtle","31606BrgOLB","getRandomValues","byteLength","3382424zJubRI","AES-GCM","encode","generateKey","raw","22332LWNSTk","jwk","662470QbBeYL","configManager","1131756QCXCJK"];return(Wr=function(){return t})()}!function(){for(var t=Br,e=Fr();;)try{if(227039==-parseInt(t(411))/1*(parseInt(t(414))/2)+parseInt(t(408))/3+parseInt(t(402))/4*(parseInt(t(409))/5)+-parseInt(t(406))/6*(parseInt(t(404))/7)+-parseInt(t(415))/8*(parseInt(t(412))/9)+-parseInt(t(407))/10+parseInt(t(405))/11)break;e.push(e.shift())}catch(t){e.push(e.shift())}}(),(zr=Lr||(Lr={}))[(Ur=Br)(413)]=Ur(410),zr[Ur(418)]="uncompressed",jr=Br,(Hr=Vr||(Vr={})).ALLOW=jr(416),Hr[jr(419)]=jr(419),Hr[jr(403)]=jr(403),Hr[jr(417)]=jr(417);const Xr=Gr;!function(){const t=Gr,e=Wr();for(;;)try{if(219918==parseInt(t(154))/1*(-parseInt(t(169))/2)+parseInt(t(155))/3+parseInt(t(145))/4+-parseInt(t(143))/5*(-parseInt(t(146))/6)+-parseInt(t(158))/7*(-parseInt(t(172))/8)+parseInt(t(164))/9*(parseInt(t(165))/10)+parseInt(t(149))/11*(-parseInt(t(141))/12))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class Yr{constructor(t){this[Gr(144)]=t}generateSymKey(){const t=Gr;return window[t(150)].subtle[t(139)]({name:t(173),length:256},!0,[t(147),t(157)])}async[Xr(151)](t,e){const r=Xr,n=typeof t===r(153)?(new TextEncoder).encode(t):t,o=window[r(150)][r(170)](new Uint8Array(12)),i={name:r(173),iv:o},a=await window[r(150)].subtle[r(147)](i,e,n);return{payloadCipherText:this[r(162)](a),iv:o}}async[Xr(159)](t,e,r){const n=Xr,o=await window[n(150)][n(168)][n(148)](n(140),t),i=this[n(162)](o),a=this[n(162)](e),s=(new TextEncoder)[n(174)](JSON[n(167)]({symKey:i,iv:a})),u=await window[n(150)][n(168)][n(147)]({name:"RSA-OAEP"},r,s);return this[n(162)](u)}[Xr(162)](t){const e=Xr;let r="";const n=new Uint8Array(t),o=n[e(171)];for(let t=0;t<o;t++)r+=String[e(156)](n[t]);return window[e(163)](r)}[Xr(152)](t){const e=Xr;return window[e(150)][e(168)].importKey(e(142),JSON[e(161)](t),{name:"RSA-OAEP",hash:e(166)},!0,[e(147)])}async encrypt(t,e){const r=Xr;if(!window[r(150)]||!window[r(150)].subtle)throw new Error(r(160));const n=await this.generateSymKey(),{payloadCipherText:o,iv:i}=await this[r(151)](e,n),a=await this[r(152)](t);return{encryptedData:o,encryptedKey:await this.encryptSymKeyBundle(n,i,a)}}}var Zr,qr,Kr,$r=Jr;function Jr(t,e){return t-=366,Qr()[t]}function Qr(){var t=["145siJtkj",", errorCode: ","160aIRYAM","2191244uOkLrj","390uQWNaz","COMMUNICATION","SERVER","1126584rSasqx","toString","7055667iNVHTq","error","errorCode","CLIENT","toLog","113154kUsjXr","1121180BHpjdG","errorSpace","name","message","63HTTxWi",", errorSpace: ","communication","323hshBeZ","736821RiXfQK","server"];return(Qr=function(){return t})()}!function(){for(var t=Jr,e=Qr();;)try{if(686656==parseInt(t(384))/1*(parseInt(t(366))/2)+-parseInt(t(385))/3+parseInt(t(377))/4+-parseInt(t(387))/5*(parseInt(t(376))/6)+parseInt(t(381))/7*(-parseInt(t(369))/8)+-parseInt(t(371))/9+-parseInt(t(389))/10*(-parseInt(t(390))/11))break;e.push(e.shift())}catch(t){e.push(e.shift())}}(),(qr=Zr||(Zr={}))[(Kr=Jr)(374)]="client",qr[Kr(368)]=Kr(386),qr[Kr(367)]=Kr(383);class tn extends Error{constructor(t,e,r){var n,o,i=Jr;super(),this[i(372)]=t,this[i(378)]=e,this[i(373)]=r,this[i(380)]=(null===(n=this[i(372)])||void 0===n?void 0:n.message)||this[i(372)].toString(),this.name=(null===(o=this.error)||void 0===o?void 0:o[i(379)])||tn[i(379)]}[$r(370)](){var t=$r;return"SDKError: "+this[t(380)]+(this[t(378)]?t(382)+this.errorSpace:"")+(this[t(373)]?t(388)+this[t(373)]:"")}[$r(375)](){var t=$r;return o(o({name:this[t(379)],message:this[t(380)]},this.errorSpace&&{errorSpace:this[t(378)]}),this[t(373)]&&{errorCode:this[t(373)]})}}function en(t,e){return t-=282,rn()[t]}function rn(){const t=["21746784pWaMmG","join","148WfoOCj","1185686fWDRrz","140665VWmfWD","20gNHtdY","195752VlKwIl","7917720emygJs","11woIVkf","1960422OLizPB","645444ieBpgO","3ruJqxP","21DbXLjq"];return(rn=function(){return t})()}!function(){const t=en,e=rn();for(;;)try{if(527156==parseInt(t(287))/1+parseInt(t(284))/2*(-parseInt(t(292))/3)+-parseInt(t(283))/4*(parseInt(t(285))/5)+-parseInt(t(290))/6*(parseInt(t(293))/7)+parseInt(t(288))/8+-parseInt(t(291))/9*(-parseInt(t(286))/10)+parseInt(t(289))/11*(parseInt(t(294))/12))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();const nn=on;function on(t,e){return t-=109,an()[t]}function an(){const t=["localStoredEventTypes","EVENT_TYPE_ACTION_RESULT","getDeviceId","addEventToLocalStorage","EVENT_TYPE_IDENTIFICATION","catch","setSessionToken","Error while emitting event","[Lightweight] getPayload() can only be called in lightweight mode","mouseEventsCollectionBuffer","removeItemLocalStorageSafe","flushLock","[Lightweight] Failed to collect device data","setUserId","token","get","map","getItemLocalStorageSafe","interactionEventsManager","uncompressed","storageManager","actionToken","size","1482LAOxxJ","device/events","setDeviceId","timestamp","[Lightweight] clearQueue() called in standard mode - ignoring","parse","getClientId","ACTION_TOKEN_CACHE_MAX_SIZE","Crypto-binding is not supported. ","page_load","pointerEventRolloutPercentage","EVENT_TYPE_INTERACTION","forEach","toString","info","eventIndex","getRotationData","add","lightweight","key_rotation_data","safeEventCallback","1372HRhLxU","EVENT_TYPE_DEVICE","bufferSize","increaseEventIndex","Failed to compress data, sending the data to the service uncompressed","Error while emitting event (delayed flush)","push","emitEvent","setItemLocalStorageSafe","pollingInterval","1102bvxCjU","keyIdentifier","delete","isNaN","now","min","identityManager","126zEmzUC","value","eventTypesToStore","processingEvents","getConfValue","61810omNmOK","has","history","index","deviceDataManager","getPublicData","registerEventListeners","eventIdMap","799421onEswr","events","Failed to refresh data","no need to send device event","type","fetchEventsFromLocalStorage","getPayload","key_rotation_status","crypto","enablePendingQueue","sessionToken","rei","length","warn","publicKeyId","error","configManager","headers","popAllEvents","getTabId","performance","publicKey","correlationId","cacheActionToken","stringify","userId","pop","actionTokenCache","extractWindowRespurces","isTokenExpired","encrypt","navigatorHighEntropyData","generateEventIdentifier","attributes","referrer","207TliPEf","errorCode","buildEncryptedRequestBody","lastDeviceInDeviceEvent","[Lightweight] Event queue cleared","flushTimeoutHandle","standard","filter","6751870RDxLfv","serverPath","next","ACTION_TOKEN_CACHE_TTL","deviceId","cleanupSentEvents","includes","cleanLocalStorageEvents","pendingQueueEnabled","sort","EVENT_TYPE_ACTION","location","refreshSessionToken","find","maxLocalStoredEvents","[Lightweight] Building fresh device payload","set","maintainLastXItems","requestsManager","COMMUNICATION","getUserId","isMobile","cryptoBinding","isArray","maxEventStored","tabId","sdkVersion","eventsQueue","enableSessionToken","getActionEventCacheKey","pollingSessionToken","sendDeviceDataEvent","getEntriesByType","platform","flush","compress","getDeviceData","shouldSendDeviceEvent","50504cGoZqm","lse","tier","getCachedActionToken","569862vefvxJ","data","parseInt","Failed to polling data","ddls"];return(an=function(){return t})()}!function(){const t=on,e=an();for(;;)try{if(176658==-parseInt(t(246))/1*(parseInt(t(191))/2)+-parseInt(t(160))/3*(parseInt(t(181))/4)+-parseInt(t(203))/5*(parseInt(t(198))/6)+parseInt(t(211))/7+-parseInt(t(128))/8+-parseInt(t(132))/9+parseInt(t(254))/10)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();const sn=nn(136),un=nn(249),cn=nn(222),ln=nn(129),dn=nn(146),hn="deviceEventDataCollectionIgnoreList",fn=nn(232),pn=nn(183),gn=[Ve[nn(264)],Ve.EVENT_TYPE_IDENTIFICATION,Ve[nn(182)],Ve[nn(138)]],mn=[Ve.EVENT_TYPE_ACTION,Ve[nn(141)]],yn=nn(137),wn=nn(268),_n=nn(179),vn=nn(218),En=nn(170);class bn{get[nn(262)](){const t=nn;return this[t(227)][t(202)](t(220),!1)}constructor(t,e,r,n,i,a,s,u){let c=arguments.length>8&&void 0!==arguments[8]?arguments[8]:nn(252);const l=nn;this[l(227)]=t,this[l(157)]=e,this[l(207)]=r,this[l(272)]=n,this.identityManager=i,this[l(112)]=a,this[l(255)]=s,this[l(118)]=u,this[l(130)]=c,this[l(175)]=null,this[l(210)]=new WeakMap,this.flushLock=!1,this[l(201)]=new Map,this.actionTokenCache=new Map,this[l(257)]=36e5,this[l(167)]=100,this[l(251)]=null,this[l(180)]=async(t,e)=>{const r=l;try{const n=o({},o({interaction_type:t},e)),i={type:Ve[r(171)],attributes:n};return await this[r(188)](i)}catch(t){}},this.enableSessionToken=u,this[l(117)]=[],this[l(219)]=new Yr(t),this.interactionEventsManager=new xr(this[l(227)][l(202)](hn,[]),this[l(227)].getConfValue(dn,100),this[l(180)],this[l(157)],this[l(227)][l(202)](En,0)),this[l(111)]=ze[l(111)](),this.eventTypesToStore=this[l(227)][l(202)](yn,[Ve[l(264)],Ve[l(182)]]),this[l(114)]=this[l(227)][l(202)](wn,4),this[l(190)]=36e4,this.tier!==l(178)&&this.pollingSessionToken()}[nn(243)](t){const e=nn;var r;if(this[e(210)].has(t))return this[e(210)][e(152)](t);const n=function(t,e,r,n,o,i,a){const s=en;return[t,e,r,n,o,void 0!==i?i:"",a||""].filter((t=>""!==t))[s(282)]("-")}(t[e(215)]||"",this[e(197)][e(166)](),this[e(197)].getDeviceId()||"",this[e(197)][e(110)]()||"",t[e(163)],t[e(206)],null===(r=t[e(244)])||void 0===r?void 0:r.action_type);return this.eventIdMap[e(270)](t,n),n}[nn(119)](t){const e=nn;var r;return((null==t?void 0:t.type)||"")+"-"+(this[e(197)].getClientId()||"")+"-"+(this.identityManager[e(139)]()||"")+"-"+((null==t?void 0:t[e(236)])||this[e(197)].getUserId()||"")+"-"+((null==t?void 0:t.timestamp)||"")+"-"+((null==t?void 0:t.index)||"")+"-"+((null===(r=null==t?void 0:t[e(244)])||void 0===r?void 0:r.action_type)||(null==t?void 0:t[e(233)])||"")}[nn(131)](t){const e=nn;if(!mn.includes(null==t?void 0:t[e(215)]))return null;const r=this[e(119)](t),n=this[e(238)][e(152)](r);return n?Date[e(195)]()-n[e(163)]>this[e(257)]?(this.actionTokenCache[e(193)](r),null):n[e(151)]:null}[nn(234)](t,e){const r=nn;if(!mn[r(260)](null==t?void 0:t[r(215)])||!e)return;if(this.actionTokenCache[r(159)]>=this.ACTION_TOKEN_CACHE_MAX_SIZE){const t=this.actionTokenCache.keys()[r(256)]()[r(199)];this[r(238)][r(193)](t)}const n=this[r(119)](t);this[r(238)].set(n,{token:e,timestamp:Date[r(195)]()})}async emitEvent(t){const e=nn;if(this[e(262)]&&mn[e(260)](null==t?void 0:t[e(215)])){const r=this[e(131)](t);if(r)return Te[e(174)]("Returning cached action token",{actionType:t[e(215)],correlationId:t[e(233)]}),{actionToken:r}}t[e(206)]=this[e(184)](),t[e(265)]=location[e(173)](),t[e(123)]=navigator[e(123)],t[e(116)]="2.4.0",t[e(255)]=this[e(255)],t[e(115)]=this.identityManager[e(230)](),t[e(163)]=Date[e(195)](),await this.enrichUADataIfDoesNotExist(t);let r=0;if(this[e(200)].includes(t[e(215)])?r=this.addEventToLocalStorage(t):this.eventsQueue.push(t),this.tier===e(178))return{};const n=this.configManager[e(202)](pn,2);if(this.eventsQueue[e(223)]+r>=n||gn.includes(t.type)){this[e(251)]&&(clearTimeout(this[e(251)]),this[e(251)]=null);try{return await this[e(124)]()}catch(r){throw Te[e(226)](e(144),{clientId:this[e(197)].getClientId(),eventType:t[e(215)],error:r.errorCode?r.toLog():r}),r}}if(!this[e(251)]&&this[e(117)][e(223)]>0){const r=this[e(227)][e(202)]("bufferInterval",2),n=Math[e(196)](r,30);this[e(251)]=setTimeout((()=>{const r=e;this[r(251)]=null,this[r(124)]()[r(142)]((e=>{const n=r;Te.error(n(186),{clientId:this[n(197)][n(166)](),eventType:t[n(215)],error:e[n(247)]?e.toLog():e})}))}),1e3*n)}return{}}async[nn(266)](){const t=nn;try{return this.eventsQueue.length>0||await this[t(121)](!0),await this[t(124)]()}catch(e){Te[t(226)](t(213),{e:e})}}async[nn(120)](){const t=nn;try{this[t(197)][t(240)]()&&await this[t(266)]()}catch(e){Te.error(t(135),{e:e})}finally{setTimeout((async()=>{const e=t;await this[e(120)]()}),this[t(190)])}}async enrichUADataIfDoesNotExist(t){const e=nn;var r;if(!(null===(r=t[e(244)])||void 0===r?void 0:r[e(242)]))try{t[e(244)][e(242)]=await Oe()}catch(t){}}[nn(229)](){const t=nn;if(this[t(262)]){const e=[],r=new Set;for(;this[t(117)][t(223)];){const n=this.eventsQueue[t(237)]();if(!n)break;const o=this.generateEventIdentifier(n);this.processingEvents.has(o)||!r[t(204)](o)&&(r.add(o),e[t(187)](n))}const n=this[t(216)]();return(null==n?void 0:n[t(223)])&&n[t(172)]((n=>{const o=t,i=this.generateEventIdentifier(n);this[o(201)][o(204)](i)||!r.has(i)&&(r[o(177)](i),e.push(n))})),e[t(263)](((e,r)=>e[t(163)]-r[t(163)]))}{const e=[],r=this[t(216)]();for(;this.eventsQueue.length;){const r=this.eventsQueue[t(237)]();if(!r)break;e[t(187)](r)}return(null==r?void 0:r[t(223)])&&e[t(187)](...r),e[t(263)](((e,r)=>e[t(163)]-r[t(163)]))}}async[nn(124)](){const t=nn;let e=[];if(this.pendingQueueEnabled){for(;this[t(148)];)await new Promise((t=>setTimeout(t,10)));this[t(148)]=!0;try{if(e=this.popAllEvents(),0===e[t(223)])return{};e[t(172)]((e=>{const r=t,n=this[r(243)](e);this[r(201)][r(270)](n,e)}))}finally{this[t(148)]=!1}}else if(e=this[t(229)](),0===e[t(223)])return{};const r={};r.clientId=this[t(197)][t(166)](),r[t(258)]=this.identityManager.getDeviceId(),r[t(236)]=this[t(197)][t(110)](),r.sdkPlatform=this.isMobile?Ge:He,r[t(212)]=e;try{const{keyIdentifier:e,publicKeyId:n}=await this[t(112)][t(208)]();r[t(192)]=e,r[t(225)]=n}catch(e){Te[t(224)](t(168)+e)}this[t(118)]&&(r[t(221)]=!0);try{const n=await this[t(248)](r,!0),i=await this[t(112)][t(176)]();let a;i&&(a=[{type:_n,data:i[t(133)],signature:i.signature}]);const s=await this.requestsManager.postData(t(161),o(o({},n),a?{headers:a}:{}));if(s[t(228)]){const e=s.headers[t(267)]((e=>e[t(215)]===vn));e&&e[t(199)]&&this[t(112)].handleRotateResponse(e[t(199)])}return s[t(258)]&&this.identityManager[t(162)](s[t(258)]),s[t(221)]&&this.identityManager[t(143)](s.sessionToken),s.userId&&this[t(197)][t(150)](s[t(236)]),this[t(262)]?(e.forEach((e=>{const r=t;mn[r(260)](e[r(215)])&&s.actionToken&&this[r(234)](e,s[r(158)])})),this[t(259)](e),e[t(172)]((e=>{const r=t,n=this[r(243)](e);this.processingEvents[r(193)](n)}))):this.cleanLocalStorageEvents(),s}catch(r){throw this[t(262)]&&e.forEach((e=>{const r=t,n=this[r(243)](e);this[r(201)][r(193)](n)})),r}}async[nn(248)](t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const r=nn,n=this.configManager[r(202)](fn,null);if(null===n&&e)return await this[r(227)].refreshConf(this[r(197)][r(166)]()),await this[r(248)](t);if(null===n)throw new tn(new Error("Encryption error - missing public key"),Zr[r(109)]);try{const e=JSON.stringify(t),o=this.compressData(e),i=o||e,{encryptedData:a,encryptedKey:s}=await this.crypto[r(241)](n,i);return{data:a,key:s,dataType:o?Lr[r(125)]:Lr[r(156)]}}catch(t){throw new tn(t,Zr.CLIENT)}}compressData(t){const e=nn;try{return fe(t)}catch(t){Te[e(226)](e(185),{clientId:this[e(197)][e(166)](),error:t})}}[nn(184)](){const t=nn;if(null===this[t(175)]){const e=this[t(157)][t(154)](cn),r=Number[t(134)](e);this[t(175)]=Number[t(194)](r)?-1:r}return this[t(175)]++,this.storageManager[t(189)](cn,this[t(175)][t(173)]()),this[t(175)]}[nn(127)](){const t=nn,e=this[t(157)].getItemLocalStorageSafe(sn),r=this[t(157)][t(154)](un);return!e||!r||Date.now()-e>864e5||r!=this[t(197)].getDeviceId()}async[nn(121)](t){const e=nn;if(!t&&!this[e(127)]())return Te.info(e(214)),!1;const r=await this[e(207)].getDeviceData(),n={type:Ve[e(182)],attributes:r},o=await this[e(188)](n);return o&&(this[e(157)][e(189)](sn,Date[e(195)]()),this[e(157)][e(189)](un,this[e(197)][e(139)]())),o}async sendPageLoadEvent(){const t=nn,e=t(169);if(this.configManager[t(202)](hn,[])[t(260)](e))return!1;const r=this[t(239)]();return await this[t(188)]({type:Ve[t(171)],attributes:o(o({interaction_type:e,location:window[t(265)].href,referrer:document[t(245)]},window[t(205)]&&{window_historyLength:window.history.length}),r&&{windowResources:r})}),!0}extractWindowRespurces(){const t=nn;try{const e=window[t(231)][t(122)]("resources");return e&&Array[t(113)](e)?e[t(153)]((t=>({name:t.name,initiatorType:t.initiatorType}))):void 0}catch(t){}}registerEventListeners(){const t=nn;this[t(155)][t(209)](),this[t(197)].registerEventListeners()}async[nn(217)](){const t=nn;if(this[t(130)]!==t(178))throw new Error(t(145));let e;Te[t(174)](t(269));try{e=await this.deviceDataManager[t(126)]()}catch(e){throw Te[t(226)](t(149),{error:e}),new Error(t(149))}const r=[{type:Ve[t(182)],attributes:e,timestamp:Date[t(195)](),index:this.increaseEventIndex(),location:location[t(173)](),platform:navigator[t(123)],sdkVersion:"2.4.0",serverPath:this[t(255)],tabId:this[t(197)][t(230)]()}],n=this[t(197)][t(139)]();return{clientId:this.identityManager[t(166)](),deviceId:n||void 0,userId:this.identityManager[t(110)]()||null,sdkPlatform:this[t(111)]?"mobile_web":"desktop_web",events:r}}clearQueue(){const t=nn;this[t(130)]===t(178)?(this[t(117)]=[],this[t(157)].removeItemLocalStorageSafe(ln),Te[t(174)](t(250))):Te[t(224)](t(164))}[nn(216)](){const t=nn,e=this[t(157)][t(154)](ln);if(!e)return[];try{return JSON[t(165)](e)}catch(t){return Te.error("Failed to parse events from localStorage",{error:t}),[]}}[nn(140)](t){const e=nn,r=this[e(216)]();return Qe[e(271)](r,this[e(114)],t),this[e(157)][e(189)](ln,JSON[e(235)](r)),r[e(223)]}[nn(261)](){const t=nn;this[t(157)][t(147)](ln)}[nn(259)](t){const e=nn;if(0===t[e(223)])return;const r=this[e(216)]();if(!r||0===r[e(223)])return;const n=new Set;for(const r of t)n[e(177)](this[e(243)](r));const o=r[e(253)]((t=>!n[e(204)](this.generateEventIdentifier(t))));o[e(223)]!==r.length&&(o[e(223)]>0?this[e(157)][e(189)](ln,JSON[e(235)](o)):this[e(157)][e(147)](ln))}}function An(){const t=["getPublicData","Failed to generate secure session token:","setClientId","setDeviceId","rdi","loadDeviceId","loadTabId","actionType","setItemSessionStorageSafe","7476teCuMC","Updating DeviceId","1766472Bmdavd","base64UrlEncode","split","411awDIxM","toString","1.0","JWT","setItemLocalStorageSafe","877616lsvkJD","setCryptoBinding","stringify","removeItemLocalStorageSafe","RS256","removeItemSessionStorageSafe","27OVPmda","rci","info","rdit","2675230yBPNBF","getDeviceId","exp","removeUserId","tabId","isTokenExpired","saveTabIdOnUnload","getSessionToken","registerEventListeners","getUserId","getItemSessionStorageSafe","rui","load","addEventListener","storageManager","CryptoBinding not available for secure session token generation","configManager","getConfValue","2449132kjaTih","error","warn","now","3089152tEhipR","floor","setUserId","rst","12286beDcia","iat","deviceId","setSessionToken","clientId","getClientId","getItemLocalStorageSafe","userIdStorageExpiry","MAX_SAFE_INTEGER","cryptoBinding"];return(An=function(){return t})()}const Cn=In;function In(t,e){return t-=294,An()[t]}!function(){const t=In,e=An();for(;;)try{if(446452==parseInt(t(311))/1+-parseInt(t(330))/2*(-parseInt(t(335))/3)+parseInt(t(307))/4+-parseInt(t(350))/5+-parseInt(t(332))/6+-parseInt(t(303))/7+-parseInt(t(340))/8*(-parseInt(t(346))/9))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();const Sn=Cn(296),Tn=Cn(347),Dn=Cn(325),On=Cn(349),Rn="rti",Mn=Cn(310),Nn=Cn(318),kn=Cn(337);class xn{constructor(t,e,r){const n=Cn;this[n(299)]=t,this[n(301)]=e,this[n(315)]=r,this[n(320)]=null,this[n(323)](this[n(315)])}[Cn(341)](t){this[Cn(320)]=t}[Cn(297)](){const t=Cn;this[t(326)](),this[t(327)]()}[Cn(358)](){const t=Cn;window[t(298)]("beforeunload",(async()=>this[t(356)]()))}[Cn(351)](){return this.deviceId}[Cn(324)](t){const e=Cn;this[e(313)]!==t&&(Te[e(348)](e(331),{deviceId:t}),this.deviceId=t,this[e(299)][e(329)](Dn,t),this.storageManager.setItemLocalStorageSafe(Dn,t))}[Cn(326)](){const t=Cn,e=this[t(299)][t(295)](Dn)||this[t(299)][t(317)](Dn);return null!=e&&this[t(324)](e),e}[Cn(316)](){return this.clientId}[Cn(323)](t){this[Cn(299)].getClientId()!=t&&this.storageManager.setClientId(t),this.storageManager.setItemSessionStorageSafe(Tn,t)}[Cn(294)](){const t=Cn;if(Number(this[t(299)][t(317)](On))+this[t(301)][t(302)](Nn,864e5)<Date.now())return this[t(353)](),null;const e=this[t(299)][t(295)](Sn);return null!=e?e:this.storageManager.getItemLocalStorageSafe(Sn)}[Cn(309)](t){const e=Cn;this.userId=t,this[e(299)][e(329)](Sn,t),this.storageManager[e(339)](Sn,t),this[e(299)].setItemLocalStorageSafe(On,Date[e(306)]())}removeUserId(){const t=Cn;this[t(299)][t(345)](Sn),this[t(299)][t(343)](Sn),this[t(299)].removeItemLocalStorageSafe(On)}loadTabId(){const t=Cn,e=this[t(299)][t(295)](Rn);e?(this[t(299)][t(345)](Rn),this[t(354)]=e):this[t(354)]=Math[t(308)](Math.random()*Number[t(319)])[t(336)]()}getTabId(){return this[Cn(354)]}saveTabIdOnUnload(){const t=Cn;this.storageManager[t(329)](Rn,this[t(354)])}[Cn(314)](t){const e=Cn;this.storageManager[e(339)](Mn,t)}[Cn(357)](){const t=Cn;return this.storageManager[t(317)](Mn)||this[t(299)][t(295)](Mn)}async getSecureSessionToken(t){const e=Cn;var r,n;const i=null!==(r=null==t?void 0:t[e(328)])&&void 0!==r?r:null,a=null!==(n=null==t?void 0:t.expirationSeconds)&&void 0!==n?n:300;if(!this[e(320)])return Te[e(305)](e(300)),null;const s=this[e(357)]();if(!s)return Te[e(305)]("No backend session token available"),null;try{const{publicKey:t}=await this[e(320)][e(321)](),r=Math[e(308)](Date.now()/1e3),n=r+a,u=o({backendSessionToken:s,securedToken:!0,version:kn,clientParams:{clientId:this[e(316)](),deviceId:this[e(351)](),userId:this[e(294)]()},iat:r,exp:n,publicKey:t},i&&{actionType:i}),c={alg:e(344),typ:e(338)},l=Qe[e(333)](JSON.stringify(c))+"."+Qe.base64UrlEncode(JSON[e(342)](u)),d=await this[e(320)].sign(l);return l+"."+Qe.base64ToBase64Url(d)}catch(t){return Te[e(304)](e(322),{error:t}),null}}[Cn(355)](){const t=Cn;var e;const r=this[t(357)]();if(!r)return!0;try{const n=JSON.parse(atob(r[t(334)](".")[1]));let o=(null!==(e=n[t(352)])&&void 0!==e?e:n[t(312)])*(n[t(352)]&&n[t(352)]<1e12?1e3:1);return!n.exp&&(o+=9e5),Date[t(306)]()>=o}catch(e){return Te[t(304)]("Invalid JWT:",{error:e}),!0}}}const Pn=Bn;function Bn(t,e){return t-=431,Fn()[t]}function Fn(){const t=["3404NRRDTq","COMMUNICATION","include","postDataFromURL","POST","fetch","getData","status","258217vkbnAH","serverPath","987yRvBoi","statusText","application/json","1489176anExuU","6688835pKnIXW","callServer","9aioGuL","GET","CLIENT","20409810QLmkIh","1034352JlkncC","49IwSAlz","548382wRvNCI"];return(Fn=function(){return t})()}!function(){const t=Bn,e=Fn();for(;;)try{if(700491==-parseInt(t(441))/1+parseInt(t(446))/2+parseInt(t(443))/3*(parseInt(t(433))/4)+-parseInt(t(447))/5+-parseInt(t(432))/6*(parseInt(t(431))/7)+-parseInt(t(453))/8+-parseInt(t(449))/9*(-parseInt(t(452))/10))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class Ln{constructor(t){this[Bn(442)]=t}async postData(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=Bn;return this[n(436)](this[n(442)]+t,e,r)}async[Pn(436)](t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=Pn,i={method:n(437),credentials:n(435),headers:new Headers(o({"Content-Type":n(445)},r)),body:JSON.stringify(e)};return await this[n(448)](t,i)}async[Pn(439)](t){const e=Pn,r=this[e(442)]+t,n={method:e(450),credentials:e(435)};return await this.callServer(r,n)}async[Pn(448)](t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=Pn;if(!(r(438)in window))throw new tn(new Error("fetch-api is not supported"),Zr[r(451)]);try{const n=await fetch(t,e),o=await n.json();if(n.ok)return o;throw new tn(new Error(o.message||n[r(444)]),Zr.SERVER,n[r(440)])}catch(t){if(!(t instanceof tn))throw new tn(new Error(t.message),Zr[r(434)]);throw t}}}const zn=Vn;function Un(){const t=["info","4610322ZZqhff","21XlydEp","835508KbpKCO","throwError","14PBCade","serverPath","filter","string","logIfInvalid","641364LEzIgP","REQUIRED_SDK_PARAMS","options","10129032nLQaJx","4080465WEmtKm","throwOrReturnResult","10840544xttsmA","109443GaFKNX","Invalid SDK params was provided: ","length","tier","push"];return(Un=function(){return t})()}function Vn(t,e){return t-=241,Un()[t]}!function(){const t=Vn,e=Un();for(;;)try{if(941963==parseInt(t(259))/1+parseInt(t(252))/2+parseInt(t(244))/3*(parseInt(t(245))/4)+parseInt(t(256))/5+-parseInt(t(243))/6*(parseInt(t(247))/7)+-parseInt(t(258))/8+parseInt(t(255))/9)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class Hn{constructor(){const t=Vn;this[t(253)]={clientId:t(250)}}[zn(257)](t,e,r){const n=zn;if(!t&&((null==e?void 0:e[n(251)])&&Te[n(242)](r),null==e?void 0:e[n(246)]))throw new Error(r);return t}validateSDKParams(t,e){const r=zn;var n,o,i,a;const s=Object.keys(this[r(253)])[r(249)]((e=>typeof t[e]!=this[r(253)][e]));if("lightweight"!==(null!==(n=t[r(262)])&&void 0!==n?n:null===(o=t[r(254)])||void 0===o?void 0:o[r(262)])){const e=null!==(a=null===(i=t.options)||void 0===i?void 0:i[r(248)])&&void 0!==a?a:t[r(248)];("string"!=typeof e||!e)&&s[r(241)](r(248))}return this[r(257)](0==s[r(261)],e,r(260)+JSON.stringify(s))}}const jn=Wn;function Gn(){const t=["2003553pDeinw","enableLogsReporting","logsMinimumBatch","logsMinimumDelay","middlewares","9059116fbpuGg","logs","reportLogs","lastTimeLogsSent","flush","identityManager","configManager","16ahYjNY","length","now","6372776GpxexQ","511672nJFASf","getConfValue","305697vcZlJi","getClientId","requestsManager","942610LbyVVa","logMiddleware","push","platform","10FxbGXk","1398iLFVWs","3795jRqZpC","36sOdZnO"];return(Gn=function(){return t})()}function Wn(t,e){return t-=320,Gn()[t]}!function(){const t=Wn,e=Gn();for(;;)try{if(532911==parseInt(t(320))/1+-parseInt(t(330))/2*(parseInt(t(331))/3)+-parseInt(t(345))/4*(parseInt(t(325))/5)+parseInt(t(332))/6*(parseInt(t(322))/7)+parseInt(t(348))/8+-parseInt(t(333))/9+parseInt(t(329))/10*(parseInt(t(338))/11))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class Xn{constructor(t,e,r){const n=Wn;this[n(324)]=t,this[n(343)]=e,this[n(344)]=r,this[n(341)]=0,this[n(326)]=async()=>{const t=n;try{await this[t(340)]()}catch(t){}},Te[n(337)][n(327)](this.logMiddleware)}async[jn(340)](){const t=jn;if(!this.configManager[t(321)](t(334),!1))return;const e=this[t(344)][t(321)](t(335),6),r=this[t(344)].getConfValue(t(336),12e4);if(Te[t(339)][t(346)]<e||this[t(341)]+r>Date[t(347)]())return;this[t(341)]=Date[t(347)]();const n=Te[t(342)](),o=this[t(343)][t(323)](),i=Math.floor(Date[t(347)]()/1e3),a={sdkVersion:"2.4.0",platform:navigator[t(328)],clientId:o,timestamp:i,logEntries:n};await this[t(324)].postData("device/logs",a)}}function Yn(t,e){return t-=432,$n()[t]}const Zn=Yn;!function(){const t=Yn,e=$n();for(;;)try{if(511117==-parseInt(t(433))/1+parseInt(t(435))/2+-parseInt(t(432))/3+-parseInt(t(446))/4+parseInt(t(438))/5+-parseInt(t(441))/6+parseInt(t(439))/7*(parseInt(t(451))/8))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();const qn=Zn(445);class Kn{constructor(t,e,r){const n=Zn;this[n(436)]=t,this[n(448)]=e,this[n(443)]=r}async[Zn(434)](t){const e=Zn;if(this[e(443)][e(442)](qn)!=e(450)){const r=this.identityManager.getDeviceId(),n=this[e(436)].getClientId(),o=(t[e(444)]("/")?t:t+"/")+e(437),i=await this.requestsManager[e(440)](o,{deviceId:r,clientId:n});i[e(447)]&&i[e(447)]==r&&this[e(443)][e(449)](qn,e(450))}}}function $n(){const t=["storageManager","endsWith","rimd","989412HCaFqm","deviceId","requestsManager","setItemLocalStorageSafe","true","4518704JwyJLt","1756227XlPjdB","803531XeZwNk","migrateIdentifiers","157604WnhiQd","identityManager","device/migrate-identifiers","3117345oVRKoa","21ylWglJ","postDataFromURL","1496250PJBmuK","getItemLocalStorageSafe"];return($n=function(){return t})()}const Jn=to;function Qn(){const t=["getActions","isTokenExpired","identifiersMigrationEnabled","unknown","idbWriteTimeoutMs","string","enabled","[Lightweight] SDK initialized in lightweight mode","serverPath","warn","ssn","getDeviceData","standard","28691810KpYiFl","phone_number","3723044cGGVth","reportActionResult failed to send","2111346DAhGsG","message","config_disabled","options","sign","enableSessionToken","5yaaKAR","RiskID","errorSpace","disabledReason","extensionMetadata","_error_","reportActionResult","eventsManager","[Lightweight] triggerActionEvent() cannot be used in lightweight tier. Use getPayload() instead.","actions","getSecureSessionToken","initializedInstance","enableIdentifiersMigration","sendDeviceDataEvent","action","validateSDKParams","national_id","other","startedAt","uploadFile","[Lightweight] Setting deviceId from backend","extensionDeviceAttributes","hasOwnClientId","mainEntry","createCryptoBinding","configManager","crypto","getSessionToken","10229121qbtecF","EVENT_TYPE_ACTION","RiskIDReady","challengeType","toString","Invalid action type","claimedUserId","_error_'invalid action type - ","SDK disabled","keyRotation","keys","sdk init started","enableDeviceAttributesInActions","includes","Session token is not enabled","suspiciousContext","cryptoBinding","init","unexpected_error_","email","migrationsManager","migrateIdentifiers","identifyUser","userId","registerEventListeners","fallbackClientId","[Lightweight] Skipping auto-event collection and event listeners","40elmZNy","invalid_params","reportActionResult called without actionToken or result","clearUser","invalid_claimed_user_id_type_","init_not_called","tier","triggerActionEvent","setDeviceId","identityManager","[Lightweight] getPayload() can only be used in lightweight tier","initialize","deviceDataManager","expiryDays","setUserId","drivers_license_number","passport_number","transactionData","errorCode","claimedUserIdType","setAuthenticatedUser","SDK already initialized","refreshConf","[Lightweight] getSecureSessionToken() cannot be used in lightweight tier. Session tokens are not supported in lightweight mode.","storageManager","generateDisabledToken","identifyUser called without a valid userid","session","CLIENT","Invalid claimedUserIdType","sdk init done","SERVER","TSAccountProtectionReady","dispatchEvent","2ywJDpw","TSAccountProtection","sendPageLoadEvent","deviceId","customAttributes","EVENT_TYPE_ACTION_RESULT","__UNIFIED_SDK_VERSIONS__","flush","info","setCryptoBinding","downloadFile","clearQueue","clientId","stringify","serverPath is required","account_id","isInitialized","requestsManager","refreshSessionToken","getUserId","slice","correlationId","removeUserId","1538999ZMdurM","lightweight","validationManager","getConfValue","publicKey","now","getPayload","logsReporter","verbose","[Lightweight] deviceId must be a non-empty string","trim","disabled_sdk_","firstPartyMigrationUrl","unified-platform","catch","object","length","emitEvent","3166644OonIod","tenantId","initializationPromise","1167268hWJtwI","updateUserId","[Lightweight] reportActionResult() cannot be used in lightweight tier.","privateUserIdentifier"];return(Qn=function(){return t})()}function to(t,e){return t-=269,Qn()[t]}!function(){const t=to,e=Qn();for(;;)try{if(761045==parseInt(t(389))/1*(parseInt(t(345))/2)+-parseInt(t(386))/3+-parseInt(t(408))/4*(-parseInt(t(416))/5)+parseInt(t(410))/6+parseInt(t(368))/7*(parseInt(t(311))/8)+parseInt(t(284))/9+-parseInt(t(406))/10)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();const eo=[null,void 0,"undefined","",0],ro=Jn(397),no=Jn(428),oo=Jn(376),io=Jn(296),ao=Jn(425),so=[Jn(303),Jn(407),Jn(360),Jn(403),Jn(272),Jn(327),Jn(326),Jn(273)];class uo{constructor(t,e){const r=Jn;var n,o;if(this.initializationPromise=null,this[r(419)]=null,this[r(415)]=!1,this[r(395)]=!1,this.firstPartyMigrationUrl=null,this[r(278)]=!1,this.tier="standard",this[r(370)]=new Hn,uo.initializedInstance)throw new Error(r(332));uo[r(427)]=!0;const i="string"==typeof e;this.clientId=i?e:t,this[r(413)]=i?{serverPath:t}:e,this[r(317)]=(null===(n=this.options)||void 0===n?void 0:n[r(317)])||r(405);const a=typeof(null===(o=this[r(413)])||void 0===o?void 0:o.serverPath)===r(398)&&this[r(413)][r(401)][r(378)]()[r(384)]>0;if("lightweight"!==this[r(317)]&&!a)throw new Error(r(359));a&&(this.options[r(401)]=new URL(this[r(413)][r(401)])[r(288)]()),this[r(380)]=this.options.firstPartyMigrationUrl||null,"lightweight"===this[r(317)]&&Te[r(353)](r(400),{serverPath:this[r(413)][r(401)]}),Te[r(399)]=!!this[r(413)][r(376)],!this.validationManager[r(271)](this,{throwError:!0,logIfInvalid:!0})&&(this[r(419)]=r(312)),this[r(335)]=new be(this.clientId),this[r(362)]=new Ln(this[r(413)][r(401)]),this[r(281)]=new qe(this[r(335)],this[r(362)]),this[r(320)]=new xn(this[r(335)],this[r(281)],this[r(357)]),this.identityManager.load(),this[r(304)]=new Kn(this[r(320)],this[r(362)],this[r(335)]),this[r(415)]=this.options[r(415)]||!1,this[r(278)]=this[r(413)][r(278)]||!1,this[r(375)]=new Xn(this[r(362)],this[r(320)],this.configManager)}[Jn(336)](t){const e=Jn,r=Date[e(373)]();return e(379)+(this[e(419)]||e(396))+"_"+t+"_"+r}get[Jn(425)](){return this[Jn(281)].getConfValue(ao,[])}async[Jn(393)](){const t=Jn;return await this.isInitialized(),this[t(425)]}async[Jn(283)](){const t=Jn;if(this[t(317)]===t(369))throw new Error("[Lightweight] getSessionToken() cannot be used in lightweight tier. Session tokens are not supported in lightweight mode.");if(!this[t(415)])throw new Error(t(298));return await this[t(361)]()?(this[t(320)][t(394)]()&&await this[t(423)].refreshSessionToken(),this.identityManager.getSessionToken()):(Te[t(353)]("SDK disabled"),this.generateDisabledToken(t(338)))}async[Jn(374)](){const t=Jn;if(this[t(317)]!==t(369))throw new Error(t(321));return await this[t(361)](),await this[t(423)][t(374)]()}[Jn(356)](){const t=Jn;if(this[t(317)]!==t(369))throw new Error("[Lightweight] clearQueue() can only be used in lightweight tier");this[t(423)].clearQueue()}[Jn(319)](t){const e=Jn;if(this.tier!==e(369))throw new Error("[Lightweight] setDeviceId() can only be used in lightweight tier");if(!t||"string"!=typeof t)throw new Error(e(377));Te[e(353)](e(276),{deviceId:t}),this.identityManager.setDeviceId(t)}async[Jn(301)](t){const e=Jn,r=typeof t!==e(383)?t:null==t?void 0:t[e(307)];return Te[e(353)](e(295)),this[e(388)]=(async()=>{const t=e;this.tier!==t(369)&&await this[t(281)][t(333)](this.identityManager.getClientId());const n=this.configManager.getConfValue(t(387),null),o=this[t(281)][t(371)](t(293),null),i=this[t(281)].getConfValue(ro,void 0),a={};if((null==o?void 0:o.isEnabled)&&(a[t(293)]={isEnabled:!0,expiryDays:o[t(324)],startedAt:o[t(274)],tenantId:n}),void 0!==i&&(a[t(397)]=i),this[t(278)]&&(a[t(309)]=this[t(357)]),this[t(300)]=we[t(282)][t(280)](t(414),Object[t(294)](a)[t(384)]>0?a:void 0),this[t(320)][t(354)](this.cryptoBinding),this.deviceDataManager=new Le(this.storageManager,this[t(281)],this[t(300)]),this[t(423)]=new bn(this[t(281)],this.storageManager,this[t(323)],this[t(362)],this[t(320)],this[t(300)],this[t(413)][t(401)],this.enableSessionToken,this[t(317)]),null!==this.disabledReason)return!1;const s=this.configManager[t(371)]("sdkEnabled",void 0);return s?(this[t(395)]=this.identifiersMigrationEnabled||this[t(281)][t(371)](no,!1),this[t(395)]&&this[t(380)]&&await this[t(304)][t(305)](this[t(380)]),Te[t(399)]=Te[t(399)]||!!this[t(281)][t(371)](oo,!1),this.tier!==t(369)?(await this[t(423)][t(269)]()[t(382)]((()=>{})),await this[t(423)][t(347)]()[t(382)]((()=>{})),await this[t(390)](r)[t(382)]((()=>{})),this[t(423)][t(308)](),await this[t(423)][t(352)]()[t(382)]((()=>{}))):Te.info(t(310)),Te.info(t(341)),!0):(this[t(419)]=void 0===s?"missing_config":t(412),!1)})(),await this[e(388)]}async[Jn(361)](){const t=Jn;if(null===this[t(388)])return!this[t(419)]&&(this[t(419)]=t(316)),!1;const e=await this.initializationPromise;return!e&&!this[t(419)]&&(this[t(419)]="init_failed"),e}async[Jn(318)](t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=Jn;var n;if(this[r(317)]===r(369))throw new Error(r(424));const i=Date[r(373)]();if(!await this.isInitialized())return Te.info(r(292)),{actionToken:this[r(336)](r(270))};if(!this[r(425)][r(297)](t))return Te[r(402)](r(289),{actionType:t}),{actionToken:Zr[r(339)]+r(291)+t+"'_"+i};const a=null==e?void 0:e[r(330)];if(a&&!so.includes(a))return Te[r(402)](r(340),{claimedUserIdType:a}),{actionToken:r(315)+a+"_"+i};let s;this[r(281)][r(371)](io,!1)&&(s=await this[r(323)][r(404)]());const u=o({type:Ve[r(285)],attributes:o(o(o(o(o(o(o(o(o(o(o(o(o({action_type:t},(null==e?void 0:e.correlationId)&&{correlation_id:e[r(366)]}),(null==e?void 0:e[r(290)])&&{claimed_user_id:e[r(290)]}),a&&{claimed_user_id_type:a}),(null==e?void 0:e[r(372)])&&{public_key:e[r(372)]}),(null==e?void 0:e[r(420)])&&{extension_metadata:e[r(420)]}),(null==e?void 0:e[r(277)])&&{extension_device_attributes:e.extensionDeviceAttributes}),(null==e?void 0:e.suspiciousSignals)&&{suspicious_signals:e.suspiciousSignals}),(null==e?void 0:e[r(299)])&&{suspicious_context:e.suspiciousContext}),(null==e?void 0:e[r(355)])&&{download_file:e[r(355)]}),(null==e?void 0:e.uploadFile)&&{upload_file:e[r(275)]}),(null==e?void 0:e.transactionData)&&{transactionData:e[r(328)]}),"undefined"!=typeof globalThis&&(null===(n=globalThis[r(351)])||void 0===n?void 0:n[r(381)])&&{platform_sdk_version:globalThis[r(351)][r(381)]}),s)},(null==e?void 0:e.customAttributes)&&{customAttributes:e[r(349)]});try{const t=await this[r(423)][r(385)](u),{actionToken:e}=t;if(!e)throw new tn(new Error("Unhandled SDK error. Received eventResponse: "+(typeof t==r(383)?JSON[r(358)](t)[r(365)](15):t)),Zr.CLIENT);return t}catch(e){return{actionToken:e instanceof tn?e[r(418)]===Zr[r(342)]?e[r(418)]+r(421)+t+"_"+e[r(329)]+"_'"+e[r(411)]+"'_"+i:e[r(418)]+"_error_"+t+"_'"+e[r(411)]+"'_"+i:r(302)+t+"_"+i}}}async[Jn(390)](t){const e=Jn;if(eo[e(297)](t))return Te[e(353)](e(337),{userId:t}),!1;t=t[e(288)](),Te.info(e(306),{userId:t});const r=this[e(320)][e(364)]();return r===t||(this.identityManager[e(325)](t),!!(await this[e(423)].emitEvent({type:Ve.EVENT_TYPE_IDENTIFICATION,attributes:{previous_user_id:r,user_id:t}}))[e(348)])}async[Jn(331)](t){const e=Jn;return await this[e(361)]()?this.updateUserId(t):(Te[e(353)](e(292)),!1)}async[Jn(422)](t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=Jn;if(this.tier===n(369))throw new Error(n(391));if(!await this[n(361)]())return Te[n(353)]("SDK disabled"),!1;if(!t||!e)return Te[n(402)](n(313),{result:e}),!1;const i={type:Ve[n(350)],attributes:o(o(o({action_token:t,result_feedback:e},(null==r?void 0:r[n(287)])&&{challenge_type:r[n(287)]}),(null==r?void 0:r.userId)&&{user_id:r[n(307)]}),(null==r?void 0:r[n(392)])&&{privateUserIdentifier:r.privateUserIdentifier})};try{const t=await this[n(423)][n(385)](i);return typeof t===n(383)&&null!==t}catch(t){return Te.warn(n(409),{error:t}),!1}}async[Jn(314)](){const t=Jn;if(!await this[t(361)]())return Te[t(353)]("SDK disabled"),!1;const e=this[t(320)][t(364)]();return null!=e&&this[t(320)][t(367)](),!!(await this[t(423)].emitEvent({type:Ve.EVENT_TYPE_IDENTIFICATION,attributes:{previous_user_id:e}}))[t(348)]}async[Jn(426)](){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:300;const r=Jn;if("lightweight"===this.tier)throw new Error(r(334));if(!this[r(415)])throw new Error(r(298));return await this.isInitialized()?(this.identityManager[r(394)]()&&await this[r(423)][r(363)](),await this[r(320)][r(426)]({actionType:t,expirationSeconds:e})||this[r(336)](r(338))):(Te[r(353)](r(292)),this[r(336)](r(338)))}}uo.initializedInstance=!1,document.dispatchEvent(new CustomEvent(Jn(343)));const co=lo;function lo(t,e){return t-=145,fo()[t]}!function(){const t=lo,e=fo();for(;;)try{if(299018==parseInt(t(149))/1*(parseInt(t(157))/2)+-parseInt(t(162))/3+-parseInt(t(169))/4+-parseInt(t(171))/5+-parseInt(t(170))/6+parseInt(t(168))/7*(-parseInt(t(161))/8)+parseInt(t(159))/9)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();let ho=null;function fo(){const t=["clientId","init","27167PxLlLt","134564zuaxMD","2631084EcZLNV","1321915xtxjKC","not_initialized","identityManager","getSessionToken","eventsManager","reportActionResult","getActions","513019NxijEZ","events","getSecureSessionToken","MODULE_INITIALIZED","getPayload","moduleMetadata","flush","triggerActionEvent","2GNNvLY","utils","8878941bkdrhK","getInitConfig","880sRVXTI","111306lSyvch","TsError","setAuthenticatedUser","getDeviceId"];return(fo=function(){return t})()}we[co(150)].on(we.events[co(152)],(()=>{const t=co,{clientId:e,drs:r}=we[t(154)][t(160)](),n=r||{},{enabled:i,userId:a,serverPath:s}=n,u=function(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(-1!==e.indexOf(n))continue;r[n]=t[n]}return r}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],-1===e.indexOf(r)&&{}.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}(n,pe);if(!1===i)return;const c=(null==r?void 0:r.clientId)||e,l=!!(null==r?void 0:r[t(166)]);ho=new uo(c,o(o({},u),{},{hasOwnClientId:l,serverPath:s})),ho[t(167)]({userId:a})}));const po=function(){const t=co;return function(t){const e=co;if(!t)throw new(we[e(158)].exceptions[e(163)])(e(172),"tsPlatform not initialized")}(ho),ho[t(145)]()};class go extends Error{constructor(t,e,r){super(r),this.name="ApiError",this.url=e.url,this.status=e.status,this.statusText=e.statusText,this.body=e.body,this.request=t}}const mo={BASE:window.location.origin,VERSION:"",WITH_CREDENTIALS:!1,CREDENTIALS:"include",TOKEN:void 0,USERNAME:void 0,PASSWORD:void 0,HEADERS:void 0,ENCODE_PATH:void 0};var yo,wo,_o,vo;!function(t){var e;(e=t.feedback||(t.feedback={})).OK="ok",e.OTHER="other",e.DOCUMENT_NOT_FOUND="document_not_found",e.FACE_NOT_FOUND="face_not_found",e.DOCUMENT_FACE_NOT_FOUND="document_face_not_found",e.OBSTRUCTED="obstructed",e.BLUR="blur",e.GLARE="glare",e.DOCUMENT_NOT_SUPPORTED="document_not_supported",e.DOCUMENT_NOT_MATCHING="document_not_matching",e.WRONG_DOCUMENT_SIDE="wrong_document_side",e.MULTI_FACE="multi_face",e.FACE_ROTATED="face_rotated",e.FACE_TOO_SMALL="face_too_small",e.FACE_TOO_CLOSE="face_too_close",e.CLOSED_EYES="closed_eyes",e.FACE_ANGLE_TOO_LARGE="face_angle_too_large",e.FACE_CLOSE_TO_BORDER="face_close_to_border",e.FACE_OCCLUDED="face_occluded",e.FACE_CROPPED="face_cropped",e.BARCODE_NOT_FOUND="barcode_not_found",e.GLARE_SELFIE="glare_selfie",e.BLUR_SELFIE="blur_selfie",e.RESTRICTED_CRITERIA="restricted_criteria",e.UNCLASSIFIABLE="unclassifiable"}(yo||(yo={})),function(t){var e;(e=t.image_type||(t.image_type={})).DOCUMENT_FRONT="document_front",e.DOCUMENT_BACK="document_back",e.SELFIE="selfie"}(wo||(wo={})),function(t){var e,r;(e=t.status||(t.status={})).PENDING="pending",e.CAPTURING="capturing",e.PROCESSING="processing",e.RECAPTURE="recapture",e.COMPLETE="complete",e.ERROR="error",e.EXPIRED="expired",(r=t.recapture_reason||(t.recapture_reason={})).IMAGE_MISSING="image_missing",r.DOCUMENT_EXPIRED="document_expired",r.DOCUMENT_NOT_SUPPORTED="document_not_supported",r.DOCUMENT_DAMAGED="document_damaged",r.POOR_IMAGE_QUALITY="poor_image_quality",r.DOCUMENT_NOT_FOUND="document_not_found",r.OBSTRUCTED="obstructed",r.BLUR="blur",r.GLARE="glare",r.DOCUMENT_NOT_MATCHING="document_not_matching",r.WRONG_DOCUMENT_SIDE="wrong_document_side",r.FACE_NOT_FOUND="face_not_found",r.DOCUMENT_FACE_NOT_FOUND="document_face_not_found",r.INVALID_INPUT="invalid_input",r.MULTI_FACE="multi_face",r.FACE_ROTATED="face_rotated",r.FACE_TOO_SMALL="face_too_small",r.FACE_TOO_CLOSE="face_too_close",r.CLOSED_EYES="closed_eyes",r.FACE_ANGLE_TOO_LARGE="face_angle_too_large",r.FACE_CLOSE_TO_BORDER="face_close_to_border",r.FACE_OCCLUDED="face_occluded",r.FACE_CROPPED="face_cropped",r.BARCODE_NOT_FOUND="barcode_not_found",r.GLARE_SELFIE="glare_selfie",r.BLUR_SELFIE="blur_selfie",r.NO_FACE="no_face",r.DOCUMENT_TYPE_RESTRICTED="document_type_restricted"}(_o||(_o={})),function(t){var e;(e=t.client_type||(t.client_type={})).HOSTED_APP="hosted_app",e.MOBILE_SDK="mobile_sdk"}(vo||(vo={}));var Eo,bo,Ao={},Co={get exports(){return Ao},set exports(t){Ao=t}};Eo=Co,bo=Ao,function(t,e){var r="function",n="undefined",o="object",i="string",a="major",s="model",u="name",c="type",l="vendor",d="version",h="architecture",f="console",p="mobile",g="tablet",m="smarttv",y="wearable",w="embedded",_="Amazon",v="Apple",E="ASUS",b="BlackBerry",A="Browser",C="Chrome",I="Firefox",S="Google",T="Huawei",D="LG",O="Microsoft",R="Motorola",M="Opera",N="Samsung",k="Sharp",x="Sony",P="Xiaomi",B="Zebra",F="Facebook",L="Chromium OS",z="Mac OS",U=" Browser",V=function(t){for(var e={},r=0;r<t.length;r++)e[t[r].toUpperCase()]=t[r];return e},H=function(t,e){return typeof t===i&&-1!==j(e).indexOf(j(t))},j=function(t){return t.toLowerCase()},G=function(t,e){if(typeof t===i)return t=t.replace(/^\s\s*/,""),typeof e===n?t:t.substring(0,500)},W=function(t,n){for(var i,a,s,u,c,l,d=0;d<n.length&&!c;){var h=n[d],f=n[d+1];for(i=a=0;i<h.length&&!c&&h[i];)if(c=h[i++].exec(t))for(s=0;s<f.length;s++)l=c[++a],typeof(u=f[s])===o&&u.length>0?2===u.length?typeof u[1]==r?this[u[0]]=u[1].call(this,l):this[u[0]]=u[1]:3===u.length?typeof u[1]!==r||u[1].exec&&u[1].test?this[u[0]]=l?l.replace(u[1],u[2]):e:this[u[0]]=l?u[1].call(this,l,u[2]):e:4===u.length&&(this[u[0]]=l?u[3].call(this,l.replace(u[1],u[2])):e):this[u]=l||e;d+=2}},X=function(t,r){for(var n in r)if(typeof r[n]===o&&r[n].length>0){for(var i=0;i<r[n].length;i++)if(H(r[n][i],t))return"?"===n?e:n}else if(H(r[n],t))return"?"===n?e:n;return r.hasOwnProperty("*")?r["*"]:t},Y={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},Z={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[d,[u,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[d,[u,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[u,d],[/opios[\/ ]+([\w\.]+)/i],[d,[u,M+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[d,[u,M+" GX"]],[/\bopr\/([\w\.]+)/i],[d,[u,M]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[d,[u,"Baidu"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\w\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[u,d],[/quark(?:pc)?\/([-\w\.]+)/i],[d,[u,"Quark"]],[/\bddg\/([\w\.]+)/i],[d,[u,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[d,[u,"UC"+A]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[d,[u,"WeChat"]],[/konqueror\/([\w\.]+)/i],[d,[u,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[d,[u,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[d,[u,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[d,[u,"Smart Lenovo "+A]],[/(avast|avg)\/([\w\.]+)/i],[[u,/(.+)/,"$1 Secure "+A],d],[/\bfocus\/([\w\.]+)/i],[d,[u,I+" Focus"]],[/\bopt\/([\w\.]+)/i],[d,[u,M+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[d,[u,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[d,[u,"Dolphin"]],[/coast\/([\w\.]+)/i],[d,[u,M+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[d,[u,"MIUI "+A]],[/fxios\/([-\w\.]+)/i],[d,[u,I]],[/\bqihu|(qi?ho?o?|360)browser/i],[[u,"360"+U]],[/\b(qq)\/([\w\.]+)/i],[[u,/(.+)/,"$1Browser"],d],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[u,/(.+)/,"$1"+U],d],[/samsungbrowser\/([\w\.]+)/i],[d,[u,N+" Internet"]],[/(comodo_dragon)\/([\w\.]+)/i],[[u,/_/g," "],d],[/metasr[\/ ]?([\d\.]+)/i],[d,[u,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[u,"Sogou Mobile"],d],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i],[u,d],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[u],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[u,F],d],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[u,d],[/\bgsa\/([\w\.]+) .*safari\//i],[d,[u,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[d,[u,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[d,[u,C+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[u,C+" WebView"],d],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[d,[u,"Android "+A]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[u,d],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[d,[u,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[d,u],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[u,[d,X,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[u,d],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[u,"Netscape"],d],[/(wolvic)\/([\w\.]+)/i],[u,d],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[d,[u,I+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[u,[d,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[u,[d,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[h,"amd64"]],[/(ia32(?=;))/i],[[h,j]],[/((?:i[346]|x)86)[;\)]/i],[[h,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[h,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[h,"armhf"]],[/windows (ce|mobile); ppc;/i],[[h,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[h,/ower/,"",j]],[/(sun4\w)[;\)]/i],[[h,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[h,j]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[s,[l,N],[c,g]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[s,[l,N],[c,p]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[s,[l,v],[c,p]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[s,[l,v],[c,g]],[/(macintosh);/i],[s,[l,v]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[s,[l,k],[c,p]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[s,[l,T],[c,g]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[s,[l,T],[c,p]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i],[[s,/_/g," "],[l,P],[c,p]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[s,/_/g," "],[l,P],[c,g]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[s,[l,"OPPO"],[c,p]],[/\b(opd2\d{3}a?) bui/i],[s,[l,"OPPO"],[c,g]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[s,[l,"Vivo"],[c,p]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[s,[l,"Realme"],[c,p]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[s,[l,R],[c,p]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[s,[l,R],[c,g]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[s,[l,D],[c,g]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[s,[l,D],[c,p]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[s,[l,"Lenovo"],[c,g]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[s,/_/g," "],[l,"Nokia"],[c,p]],[/(pixel c)\b/i],[s,[l,S],[c,g]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[s,[l,S],[c,p]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[s,[l,x],[c,p]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[s,"Xperia Tablet"],[l,x],[c,g]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[s,[l,"OnePlus"],[c,p]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[s,[l,_],[c,g]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[s,/(.+)/g,"Fire Phone $1"],[l,_],[c,p]],[/(playbook);[-\w\),; ]+(rim)/i],[s,l,[c,g]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[s,[l,b],[c,p]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[s,[l,E],[c,g]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[s,[l,E],[c,p]],[/(nexus 9)/i],[s,[l,"HTC"],[c,g]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[l,[s,/_/g," "],[c,p]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[s,[l,"TCL"],[c,g]],[/(itel) ((\w+))/i],[[l,j],s,[c,X,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[s,[l,"Acer"],[c,g]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[s,[l,"Meizu"],[c,p]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[s,[l,"Ulefone"],[c,p]],[/droid.+; (a(?:015|06[35]|142p?))/i],[s,[l,"Nothing"],[c,p]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[l,s,[c,p]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[l,s,[c,g]],[/(surface duo)/i],[s,[l,O],[c,g]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[s,[l,"Fairphone"],[c,p]],[/(u304aa)/i],[s,[l,"AT&T"],[c,p]],[/\bsie-(\w*)/i],[s,[l,"Siemens"],[c,p]],[/\b(rct\w+) b/i],[s,[l,"RCA"],[c,g]],[/\b(venue[\d ]{2,7}) b/i],[s,[l,"Dell"],[c,g]],[/\b(q(?:mv|ta)\w+) b/i],[s,[l,"Verizon"],[c,g]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[s,[l,"Barnes & Noble"],[c,g]],[/\b(tm\d{3}\w+) b/i],[s,[l,"NuVision"],[c,g]],[/\b(k88) b/i],[s,[l,"ZTE"],[c,g]],[/\b(nx\d{3}j) b/i],[s,[l,"ZTE"],[c,p]],[/\b(gen\d{3}) b.+49h/i],[s,[l,"Swiss"],[c,p]],[/\b(zur\d{3}) b/i],[s,[l,"Swiss"],[c,g]],[/\b((zeki)?tb.*\b) b/i],[s,[l,"Zeki"],[c,g]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[l,"Dragon Touch"],s,[c,g]],[/\b(ns-?\w{0,9}) b/i],[s,[l,"Insignia"],[c,g]],[/\b((nxa|next)-?\w{0,9}) b/i],[s,[l,"NextBook"],[c,g]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[l,"Voice"],s,[c,p]],[/\b(lvtel\-)?(v1[12]) b/i],[[l,"LvTel"],s,[c,p]],[/\b(ph-1) /i],[s,[l,"Essential"],[c,p]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[s,[l,"Envizen"],[c,g]],[/\b(trio[-\w\. ]+) b/i],[s,[l,"MachSpeed"],[c,g]],[/\btu_(1491) b/i],[s,[l,"Rotor"],[c,g]],[/(shield[\w ]+) b/i],[s,[l,"Nvidia"],[c,g]],[/(sprint) (\w+)/i],[l,s,[c,p]],[/(kin\.[onetw]{3})/i],[[s,/\./g," "],[l,O],[c,p]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[s,[l,B],[c,g]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[s,[l,B],[c,p]],[/smart-tv.+(samsung)/i],[l,[c,m]],[/hbbtv.+maple;(\d+)/i],[[s,/^/,"SmartTV"],[l,N],[c,m]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[l,D],[c,m]],[/(apple) ?tv/i],[l,[s,v+" TV"],[c,m]],[/crkey/i],[[s,C+"cast"],[l,S],[c,m]],[/droid.+aft(\w+)( bui|\))/i],[s,[l,_],[c,m]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[s,[l,k],[c,m]],[/(bravia[\w ]+)( bui|\))/i],[s,[l,x],[c,m]],[/(mitv-\w{5}) bui/i],[s,[l,P],[c,m]],[/Hbbtv.*(technisat) (.*);/i],[l,s,[c,m]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[l,G],[s,G],[c,m]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[c,m]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[l,s,[c,f]],[/droid.+; (shield) bui/i],[s,[l,"Nvidia"],[c,f]],[/(playstation [345portablevi]+)/i],[s,[l,x],[c,f]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[s,[l,O],[c,f]],[/\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i],[s,[l,N],[c,y]],[/((pebble))app/i],[l,s,[c,y]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[s,[l,v],[c,y]],[/droid.+; (glass) \d/i],[s,[l,S],[c,y]],[/droid.+; (wt63?0{2,3})\)/i],[s,[l,B],[c,y]],[/(quest( \d| pro)?)/i],[s,[l,F],[c,y]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[l,[c,w]],[/(aeobc)\b/i],[s,[l,_],[c,w]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[s,[c,p]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[s,[c,g]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[c,g]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[c,p]],[/(android[-\w\. ]{0,9});.+buil/i],[s,[l,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[d,[u,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[d,[u,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[u,d],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[d,u]],os:[[/microsoft (windows) (vista|xp)/i],[u,d],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[u,[d,X,Y]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[d,X,Y],[u,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[d,/_/g,"."],[u,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[u,z],[d,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[d,u],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[u,d],[/\(bb(10);/i],[d,[u,b]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[d,[u,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[d,[u,I+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[d,[u,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[d,[u,"watchOS"]],[/crkey\/([\d\.]+)/i],[d,[u,C+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[u,L],d],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[u,d],[/(sunos) ?([\w\.\d]*)/i],[[u,"Solaris"],d],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[u,d]]},q=function(f,m){if(typeof f===o&&(m=f,f=e),!(this instanceof q))return new q(f,m).getResult();var y=typeof t!==n&&t.navigator?t.navigator:e,w=f||(y&&y.userAgent?y.userAgent:""),_=y&&y.userAgentData?y.userAgentData:e,v=m?function(t,e){var r={};for(var n in t)e[n]&&e[n].length%2==0?r[n]=e[n].concat(t[n]):r[n]=t[n];return r}(Z,m):Z,E=y&&y.userAgent==w;return this.getBrowser=function(){var t={};return t[u]=e,t[d]=e,W.call(t,w,v.browser),t[a]=function(t){return typeof t===i?t.replace(/[^\d\.]/g,"").split(".")[0]:e}(t[d]),E&&y&&y.brave&&typeof y.brave.isBrave==r&&(t[u]="Brave"),t},this.getCPU=function(){var t={};return t[h]=e,W.call(t,w,v.cpu),t},this.getDevice=function(){var t={};return t[l]=e,t[s]=e,t[c]=e,W.call(t,w,v.device),E&&!t[c]&&_&&_.mobile&&(t[c]=p),E&&"Macintosh"==t[s]&&y&&typeof y.standalone!==n&&y.maxTouchPoints&&y.maxTouchPoints>2&&(t[s]="iPad",t[c]=g),t},this.getEngine=function(){var t={};return t[u]=e,t[d]=e,W.call(t,w,v.engine),t},this.getOS=function(){var t={};return t[u]=e,t[d]=e,W.call(t,w,v.os),E&&!t[u]&&_&&_.platform&&"Unknown"!=_.platform&&(t[u]=_.platform.replace(/chrome os/i,L).replace(/macos/i,z)),t},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return w},this.setUA=function(t){return w=typeof t===i&&t.length>500?G(t,500):t,this},this.setUA(w),this};q.VERSION="1.0.39",q.BROWSER=V([u,d,a]),q.CPU=V([h]),q.DEVICE=V([s,l,c,f,p,m,g,y,w]),q.ENGINE=q.OS=V([u,d]),Eo.exports&&(bo=Eo.exports=q),bo.UAParser=q;var K=typeof t!==n&&(t.jQuery||t.Zepto);if(K&&!K.ua){var $=new q;K.ua=$.getResult(),K.ua.get=function(){return $.getUA()},K.ua.set=function(t){$.setUA(t);var e=$.getResult();for(var r in e)K.ua[r]=e[r]}}}("object"==typeof window?window:i);const Io="1.5.0",So=Ao.UAParser(),To=Io;function Do(t,e){var r,n,o,i,a;return{Authorization:`Bearer ${e}`,"ts-sdk-version":To,"ts-client-id":t,"ts-user-agent":navigator.userAgent,"ts-platform":"web-sdk","ts-os":null===(r=null==So?void 0:So.os)||void 0===r?void 0:r.name,"ts-os-version":null===(n=null==So?void 0:So.os)||void 0===n?void 0:n.version,"ts-device-model":null===(o=null==So?void 0:So.device)||void 0===o?void 0:o.model,"ts-manufacturer":null===(i=null==So?void 0:So.device)||void 0===i?void 0:i.vendor,"ts-browser":null===(a=null==So?void 0:So.browser)||void 0===a?void 0:a.name,"Content-Type":"application/json","X-TS-client-time":(new Date).toUTCString(),"X-TS-ua":navigator.userAgent}}var Oo="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},Ro=[],Mo=[],No="undefined"!=typeof Uint8Array?Uint8Array:Array,ko=!1;function xo(){ko=!0;for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0;e<64;++e)Ro[e]=t[e],Mo[t.charCodeAt(e)]=e;Mo["-".charCodeAt(0)]=62,Mo["_".charCodeAt(0)]=63}function Po(t,e,r){for(var n,o,i=[],a=e;a<r;a+=3)n=(t[a]<<16)+(t[a+1]<<8)+t[a+2],i.push(Ro[(o=n)>>18&63]+Ro[o>>12&63]+Ro[o>>6&63]+Ro[63&o]);return i.join("")}function Bo(t){var e;ko||xo();for(var r=t.length,n=r%3,o="",i=[],a=16383,s=0,u=r-n;s<u;s+=a)i.push(Po(t,s,s+a>u?u:s+a));return 1===n?(e=t[r-1],o+=Ro[e>>2],o+=Ro[e<<4&63],o+="=="):2===n&&(e=(t[r-2]<<8)+t[r-1],o+=Ro[e>>10],o+=Ro[e>>4&63],o+=Ro[e<<2&63],o+="="),i.push(o),i.join("")}function Fo(t,e,r,n,o){var i,a,s=8*o-n-1,u=(1<<s)-1,c=u>>1,l=-7,d=r?o-1:0,h=r?-1:1,f=t[e+d];for(d+=h,i=f&(1<<-l)-1,f>>=-l,l+=s;l>0;i=256*i+t[e+d],d+=h,l-=8);for(a=i&(1<<-l)-1,i>>=-l,l+=n;l>0;a=256*a+t[e+d],d+=h,l-=8);if(0===i)i=1-c;else{if(i===u)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,n),i-=c}return(f?-1:1)*a*Math.pow(2,i-n)}function Lo(t,e,r,n,o,i){var a,s,u,c=8*i-o-1,l=(1<<c)-1,d=l>>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:i-1,p=n?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=l):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),(e+=a+d>=1?h/u:h*Math.pow(2,1-d))*u>=2&&(a++,u/=2),a+d>=l?(s=0,a=l):a+d>=1?(s=(e*u-1)*Math.pow(2,o),a+=d):(s=e*Math.pow(2,d-1)*Math.pow(2,o),a=0));o>=8;t[r+f]=255&s,f+=p,s/=256,o-=8);for(a=a<<o|s,c+=o;c>0;t[r+f]=255&a,f+=p,a/=256,c-=8);t[r+f-p]|=128*g}var zo={}.toString,Uo=Array.isArray||function(t){return"[object Array]"==zo.call(t)};function Vo(){return jo.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Ho(t,e){if(Vo()<e)throw new RangeError("Invalid typed array length");return jo.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=jo.prototype:(null===t&&(t=new jo(e)),t.length=e),t}function jo(t,e,r){if(!(jo.TYPED_ARRAY_SUPPORT||this instanceof jo))return new jo(t,e,r);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return Xo(this,t)}return Go(this,t,e,r)}function Go(t,e,r,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,r,n){if(e.byteLength,r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");e=void 0===r&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,r):new Uint8Array(e,r,n);jo.TYPED_ARRAY_SUPPORT?(t=e).__proto__=jo.prototype:t=Yo(t,e);return t}(t,e,r,n):"string"==typeof e?function(t,e,r){"string"==typeof r&&""!==r||(r="utf8");if(!jo.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|Ko(e,r);t=Ho(t,n);var o=t.write(e,r);o!==n&&(t=t.slice(0,o));return t}(t,e,r):function(t,e){if(qo(e)){var r=0|Zo(e.length);return 0===(t=Ho(t,r)).length||e.copy(t,0,0,r),t}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(n=e.length)!=n?Ho(t,0):Yo(t,e);if("Buffer"===e.type&&Uo(e.data))return Yo(t,e.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function Wo(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function Xo(t,e){if(Wo(e),t=Ho(t,e<0?0:0|Zo(e)),!jo.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)t[r]=0;return t}function Yo(t,e){var r=e.length<0?0:0|Zo(e.length);t=Ho(t,r);for(var n=0;n<r;n+=1)t[n]=255&e[n];return t}function Zo(t){if(t>=Vo())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Vo().toString(16)+" bytes");return 0|t}function qo(t){return!(null==t||!t._isBuffer)}function Ko(t,e){if(qo(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return Ai(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return Ci(t).length;default:if(n)return Ai(t).length;e=(""+e).toLowerCase(),n=!0}}function $o(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return hi(this,e,r);case"utf8":case"utf-8":return ui(this,e,r);case"ascii":return li(this,e,r);case"latin1":case"binary":return di(this,e,r);case"base64":return si(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return fi(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function Jo(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function Qo(t,e,r,n,o){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=o?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(o)return-1;r=t.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof e&&(e=jo.from(e,n)),qo(e))return 0===e.length?-1:ti(t,e,r,n,o);if("number"==typeof e)return e&=255,jo.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):ti(t,[e],r,n,o);throw new TypeError("val must be string, number or Buffer")}function ti(t,e,r,n,o){var i,a=1,s=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;a=2,s/=2,u/=2,r/=2}function c(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(o){var l=-1;for(i=r;i<s;i++)if(c(t,i)===c(e,-1===l?0:i-l)){if(-1===l&&(l=i),i-l+1===u)return l*a}else-1!==l&&(i-=i-l),l=-1}else for(r+u>s&&(r=s-u),i=r;i>=0;i--){for(var d=!0,h=0;h<u;h++)if(c(t,i+h)!==c(e,h)){d=!1;break}if(d)return i}return-1}function ei(t,e,r,n){r=Number(r)||0;var o=t.length-r;n?(n=Number(n))>o&&(n=o):n=o;var i=e.length;if(i%2!=0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var a=0;a<n;++a){var s=parseInt(e.substr(2*a,2),16);if(isNaN(s))return a;t[r+a]=s}return a}function ri(t,e,r,n){return Ii(Ai(e,t.length-r),t,r,n)}function ni(t,e,r,n){return Ii(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function oi(t,e,r,n){return ni(t,e,r,n)}function ii(t,e,r,n){return Ii(Ci(e),t,r,n)}function ai(t,e,r,n){return Ii(function(t,e){for(var r,n,o,i=[],a=0;a<t.length&&!((e-=2)<0);++a)n=(r=t.charCodeAt(a))>>8,o=r%256,i.push(o),i.push(n);return i}(e,t.length-r),t,r,n)}function si(t,e,r){return 0===e&&r===t.length?Bo(t):Bo(t.slice(e,r))}function ui(t,e,r){r=Math.min(t.length,r);for(var n=[],o=e;o<r;){var i,a,s,u,c=t[o],l=null,d=c>239?4:c>223?3:c>191?2:1;if(o+d<=r)switch(d){case 1:c<128&&(l=c);break;case 2:128==(192&(i=t[o+1]))&&(u=(31&c)<<6|63&i)>127&&(l=u);break;case 3:i=t[o+1],a=t[o+2],128==(192&i)&&128==(192&a)&&(u=(15&c)<<12|(63&i)<<6|63&a)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:i=t[o+1],a=t[o+2],s=t[o+3],128==(192&i)&&128==(192&a)&&128==(192&s)&&(u=(15&c)<<18|(63&i)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(l=u)}null===l?(l=65533,d=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),o+=d}return function(t){var e=t.length;if(e<=ci)return String.fromCharCode.apply(String,t);var r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=ci));return r}(n)}jo.TYPED_ARRAY_SUPPORT=void 0===Oo.TYPED_ARRAY_SUPPORT||Oo.TYPED_ARRAY_SUPPORT,Vo(),jo.poolSize=8192,jo._augment=function(t){return t.__proto__=jo.prototype,t},jo.from=function(t,e,r){return Go(null,t,e,r)},jo.TYPED_ARRAY_SUPPORT&&(jo.prototype.__proto__=Uint8Array.prototype,jo.__proto__=Uint8Array),jo.alloc=function(t,e,r){return function(t,e,r,n){return Wo(e),e<=0?Ho(t,e):void 0!==r?"string"==typeof n?Ho(t,e).fill(r,n):Ho(t,e).fill(r):Ho(t,e)}(null,t,e,r)},jo.allocUnsafe=function(t){return Xo(null,t)},jo.allocUnsafeSlow=function(t){return Xo(null,t)},jo.isBuffer=function(t){return null!=t&&(!!t._isBuffer||Si(t)||function(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&Si(t.slice(0,0))}(t))},jo.compare=function(t,e){if(!qo(t)||!qo(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,n=e.length,o=0,i=Math.min(r,n);o<i;++o)if(t[o]!==e[o]){r=t[o],n=e[o];break}return r<n?-1:n<r?1:0},jo.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},jo.concat=function(t,e){if(!Uo(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return jo.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=jo.allocUnsafe(e),o=0;for(r=0;r<t.length;++r){var i=t[r];if(!qo(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(n,o),o+=i.length}return n},jo.byteLength=Ko,jo.prototype._isBuffer=!0,jo.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)Jo(this,e,e+1);return this},jo.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)Jo(this,e,e+3),Jo(this,e+1,e+2);return this},jo.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)Jo(this,e,e+7),Jo(this,e+1,e+6),Jo(this,e+2,e+5),Jo(this,e+3,e+4);return this},jo.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?ui(this,0,t):$o.apply(this,arguments)},jo.prototype.equals=function(t){if(!qo(t))throw new TypeError("Argument must be a Buffer");return this===t||0===jo.compare(this,t)},jo.prototype.inspect=function(){var t="";return this.length>0&&(t=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(t+=" ... ")),"<Buffer "+t+">"},jo.prototype.compare=function(t,e,r,n,o){if(!qo(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),e<0||r>t.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&e>=r)return 0;if(n>=o)return-1;if(e>=r)return 1;if(this===t)return 0;for(var i=(o>>>=0)-(n>>>=0),a=(r>>>=0)-(e>>>=0),s=Math.min(i,a),u=this.slice(n,o),c=t.slice(e,r),l=0;l<s;++l)if(u[l]!==c[l]){i=u[l],a=c[l];break}return i<a?-1:a<i?1:0},jo.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},jo.prototype.indexOf=function(t,e,r){return Qo(this,t,e,r,!0)},jo.prototype.lastIndexOf=function(t,e,r){return Qo(this,t,e,r,!1)},jo.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var o=this.length-e;if((void 0===r||r>o)&&(r=o),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return ei(this,t,e,r);case"utf8":case"utf-8":return ri(this,t,e,r);case"ascii":return ni(this,t,e,r);case"latin1":case"binary":return oi(this,t,e,r);case"base64":return ii(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ai(this,t,e,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},jo.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var ci=4096;function li(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;o<r;++o)n+=String.fromCharCode(127&t[o]);return n}function di(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;o<r;++o)n+=String.fromCharCode(t[o]);return n}function hi(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var o="",i=e;i<r;++i)o+=bi(t[i]);return o}function fi(t,e,r){for(var n=t.slice(e,r),o="",i=0;i<n.length;i+=2)o+=String.fromCharCode(n[i]+256*n[i+1]);return o}function pi(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function gi(t,e,r,n,o,i){if(!qo(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||e<i)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function mi(t,e,r,n){e<0&&(e=65535+e+1);for(var o=0,i=Math.min(t.length-r,2);o<i;++o)t[r+o]=(e&255<<8*(n?o:1-o))>>>8*(n?o:1-o)}function yi(t,e,r,n){e<0&&(e=4294967295+e+1);for(var o=0,i=Math.min(t.length-r,4);o<i;++o)t[r+o]=e>>>8*(n?o:3-o)&255}function wi(t,e,r,n,o,i){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function _i(t,e,r,n,o){return o||wi(t,0,r,4),Lo(t,e,r,n,23,4),r+4}function vi(t,e,r,n,o){return o||wi(t,0,r,8),Lo(t,e,r,n,52,8),r+8}jo.prototype.slice=function(t,e){var r,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t),jo.TYPED_ARRAY_SUPPORT)(r=this.subarray(t,e)).__proto__=jo.prototype;else{var o=e-t;r=new jo(o,void 0);for(var i=0;i<o;++i)r[i]=this[i+t]}return r},jo.prototype.readUIntLE=function(t,e,r){t|=0,e|=0,r||pi(t,e,this.length);for(var n=this[t],o=1,i=0;++i<e&&(o*=256);)n+=this[t+i]*o;return n},jo.prototype.readUIntBE=function(t,e,r){t|=0,e|=0,r||pi(t,e,this.length);for(var n=this[t+--e],o=1;e>0&&(o*=256);)n+=this[t+--e]*o;return n},jo.prototype.readUInt8=function(t,e){return e||pi(t,1,this.length),this[t]},jo.prototype.readUInt16LE=function(t,e){return e||pi(t,2,this.length),this[t]|this[t+1]<<8},jo.prototype.readUInt16BE=function(t,e){return e||pi(t,2,this.length),this[t]<<8|this[t+1]},jo.prototype.readUInt32LE=function(t,e){return e||pi(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},jo.prototype.readUInt32BE=function(t,e){return e||pi(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},jo.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||pi(t,e,this.length);for(var n=this[t],o=1,i=0;++i<e&&(o*=256);)n+=this[t+i]*o;return n>=(o*=128)&&(n-=Math.pow(2,8*e)),n},jo.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||pi(t,e,this.length);for(var n=e,o=1,i=this[t+--n];n>0&&(o*=256);)i+=this[t+--n]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*e)),i},jo.prototype.readInt8=function(t,e){return e||pi(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},jo.prototype.readInt16LE=function(t,e){e||pi(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},jo.prototype.readInt16BE=function(t,e){e||pi(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},jo.prototype.readInt32LE=function(t,e){return e||pi(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},jo.prototype.readInt32BE=function(t,e){return e||pi(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},jo.prototype.readFloatLE=function(t,e){return e||pi(t,4,this.length),Fo(this,t,!0,23,4)},jo.prototype.readFloatBE=function(t,e){return e||pi(t,4,this.length),Fo(this,t,!1,23,4)},jo.prototype.readDoubleLE=function(t,e){return e||pi(t,8,this.length),Fo(this,t,!0,52,8)},jo.prototype.readDoubleBE=function(t,e){return e||pi(t,8,this.length),Fo(this,t,!1,52,8)},jo.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||gi(this,t,e,r,Math.pow(2,8*r)-1,0);var o=1,i=0;for(this[e]=255&t;++i<r&&(o*=256);)this[e+i]=t/o&255;return e+r},jo.prototype.writeUIntBE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||gi(this,t,e,r,Math.pow(2,8*r)-1,0);var o=r-1,i=1;for(this[e+o]=255&t;--o>=0&&(i*=256);)this[e+o]=t/i&255;return e+r},jo.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||gi(this,t,e,1,255,0),jo.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},jo.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||gi(this,t,e,2,65535,0),jo.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):mi(this,t,e,!0),e+2},jo.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||gi(this,t,e,2,65535,0),jo.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):mi(this,t,e,!1),e+2},jo.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||gi(this,t,e,4,4294967295,0),jo.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):yi(this,t,e,!0),e+4},jo.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||gi(this,t,e,4,4294967295,0),jo.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):yi(this,t,e,!1),e+4},jo.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var o=Math.pow(2,8*r-1);gi(this,t,e,r,o-1,-o)}var i=0,a=1,s=0;for(this[e]=255&t;++i<r&&(a*=256);)t<0&&0===s&&0!==this[e+i-1]&&(s=1),this[e+i]=(t/a|0)-s&255;return e+r},jo.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var o=Math.pow(2,8*r-1);gi(this,t,e,r,o-1,-o)}var i=r-1,a=1,s=0;for(this[e+i]=255&t;--i>=0&&(a*=256);)t<0&&0===s&&0!==this[e+i+1]&&(s=1),this[e+i]=(t/a|0)-s&255;return e+r},jo.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||gi(this,t,e,1,127,-128),jo.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},jo.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||gi(this,t,e,2,32767,-32768),jo.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):mi(this,t,e,!0),e+2},jo.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||gi(this,t,e,2,32767,-32768),jo.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):mi(this,t,e,!1),e+2},jo.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||gi(this,t,e,4,2147483647,-2147483648),jo.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):yi(this,t,e,!0),e+4},jo.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||gi(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),jo.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):yi(this,t,e,!1),e+4},jo.prototype.writeFloatLE=function(t,e,r){return _i(this,t,e,!0,r)},jo.prototype.writeFloatBE=function(t,e,r){return _i(this,t,e,!1,r)},jo.prototype.writeDoubleLE=function(t,e,r){return vi(this,t,e,!0,r)},jo.prototype.writeDoubleBE=function(t,e,r){return vi(this,t,e,!1,r)},jo.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var o,i=n-r;if(this===t&&r<e&&e<n)for(o=i-1;o>=0;--o)t[o+e]=this[o+r];else if(i<1e3||!jo.TYPED_ARRAY_SUPPORT)for(o=0;o<i;++o)t[o+e]=this[o+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+i),e);return i},jo.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===t.length){var o=t.charCodeAt(0);o<256&&(t=o)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!jo.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var i;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(i=e;i<r;++i)this[i]=t;else{var a=qo(t)?t:Ai(new jo(t,n).toString()),s=a.length;for(i=0;i<r-e;++i)this[i+e]=a[i%s]}return this};var Ei=/[^+\/0-9A-Za-z-_]/g;function bi(t){return t<16?"0"+t.toString(16):t.toString(16)}function Ai(t,e){var r;e=e||1/0;for(var n=t.length,o=null,i=[],a=0;a<n;++a){if((r=t.charCodeAt(a))>55295&&r<57344){if(!o){if(r>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(a+1===n){(e-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(e-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((e-=1)<0)break;i.push(r)}else if(r<2048){if((e-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function Ci(t){return function(t){var e,r,n,o,i,a;ko||xo();var s=t.length;if(s%4>0)throw new Error("Invalid string. Length must be a multiple of 4");i="="===t[s-2]?2:"="===t[s-1]?1:0,a=new No(3*s/4-i),n=i>0?s-4:s;var u=0;for(e=0,r=0;e<n;e+=4,r+=3)o=Mo[t.charCodeAt(e)]<<18|Mo[t.charCodeAt(e+1)]<<12|Mo[t.charCodeAt(e+2)]<<6|Mo[t.charCodeAt(e+3)],a[u++]=o>>16&255,a[u++]=o>>8&255,a[u++]=255&o;return 2===i?(o=Mo[t.charCodeAt(e)]<<2|Mo[t.charCodeAt(e+1)]>>4,a[u++]=255&o):1===i&&(o=Mo[t.charCodeAt(e)]<<10|Mo[t.charCodeAt(e+1)]<<4|Mo[t.charCodeAt(e+2)]>>2,a[u++]=o>>8&255,a[u++]=255&o),a}(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(Ei,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function Ii(t,e,r,n){for(var o=0;o<n&&!(o+r>=e.length||o>=t.length);++o)e[o+r]=t[o];return o}function Si(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}const Ti=t=>null!=t,Di=t=>"string"==typeof t,Oi=t=>Di(t)&&""!==t,Ri=t=>"object"==typeof t&&"string"==typeof t.type&&"function"==typeof t.stream&&"function"==typeof t.arrayBuffer&&"function"==typeof t.constructor&&"string"==typeof t.constructor.name&&/^(Blob|File)$/.test(t.constructor.name)&&/^(Blob|File)$/.test(t[Symbol.toStringTag]),Mi=t=>t instanceof FormData,Ni=t=>{const e=[],r=(t,n)=>{Ti(n)&&(Array.isArray(n)?n.forEach((e=>{r(t,e)})):"object"==typeof n?Object.entries(n).forEach((e=>{let[n,o]=e;r(`${t}[${n}]`,o)})):((t,r)=>{e.push(`${encodeURIComponent(t)}=${encodeURIComponent(String(r))}`)})(t,n))};return Object.entries(t).forEach((t=>{let[e,n]=t;r(e,n)})),e.length>0?`?${e.join("&")}`:""},ki=async(t,e)=>"function"==typeof e?e(t):e,xi=async(t,e)=>{const r=await ki(e,t.TOKEN),n=await ki(e,t.USERNAME),i=await ki(e,t.PASSWORD),a=await ki(e,t.HEADERS),s=Object.entries(o(o({Accept:"application/json"},a),e.headers)).filter((t=>{let[e,r]=t;return Ti(r)})).reduce(((t,e)=>{let[r,n]=e;return o(o({},t),{},{[r]:String(n)})}),{});if(Oi(r)&&(s.Authorization=`Bearer ${r}`),Oi(n)&&Oi(i)){const t=(t=>{try{return btoa(t)}catch(e){return jo.from(t).toString("base64")}})(`${n}:${i}`);s.Authorization=`Basic ${t}`}return e.body&&(e.mediaType?s["Content-Type"]=e.mediaType:Ri(e.body)?s["Content-Type"]=e.body.type||"application/octet-stream":Di(e.body)?s["Content-Type"]="text/plain":Mi(e.body)||(s["Content-Type"]="application/json")),new Headers(s)},Pi=(t,e)=>new Promise((async(r,n)=>{try{const n=((t,e)=>{const r=t.ENCODE_PATH||encodeURI,n=null==e?void 0:e.url.replace("{api-version}",t.VERSION).replace(/{(.*?)}/g,((t,n)=>{var o;return(null===(o=null==e?void 0:e.path)||void 0===o?void 0:o.hasOwnProperty(n))?r(String(e.path[n])):t})),o=`${t.BASE}${n}`;return e.query?`${o}${Ni(e.query)}`:o})(t,e),i=(t=>{if(t.formData){const e=new FormData,r=(t,r)=>{Di(r)||Ri(r)?e.append(t,r):e.append(t,JSON.stringify(r))};return Object.entries(t.formData).filter((t=>{let[e,r]=t;return Ti(r)})).forEach((t=>{let[e,n]=t;Array.isArray(n)?n.forEach((t=>r(e,t))):r(e,n)})),e}})(e),a=(t=>{var e;if(void 0!==t.body)return(null===(e=t.mediaType)||void 0===e?void 0:e.includes("/json"))?JSON.stringify(t.body):Di(t.body)||Ri(t.body)||Mi(t.body)?t.body:JSON.stringify(t.body)})(e),s=await xi(t,e),u=await(async(t,e,r,n,o,i)=>{const a=new AbortController,s={headers:i,body:null!=n?n:o,method:e.method,signal:a.signal};return t.WITH_CREDENTIALS&&(s.credentials=t.CREDENTIALS),await fetch(r,s)})(t,e,n,a,i,s),c=await(async t=>{if(204!==t.status)try{const e=t.headers.get("Content-Type");if(e)return["application/json","application/problem+json"].some((t=>e.toLowerCase().startsWith(t)))?await t.json():await t.text()}catch(t){console.error(t)}})(u),l=((t,e)=>{if(e){const r=t.headers.get(e);if(Di(r))return r}})(u,e.responseHeader),d={url:n,ok:u.ok,status:u.status,statusText:u.statusText,headers:u.headers,body:null!=l?l:c};((t,e)=>{var r,n;const i=o({400:"Bad Request",401:"Unauthorized",403:"Forbidden",404:"Not Found",500:"Internal Server Error",502:"Bad Gateway",503:"Service Unavailable"},t.errors)[e.status];if(i)throw new go(t,e,i);if(!e.ok){const o=null!==(r=e.status)&&void 0!==r?r:"unknown",i=null!==(n=e.statusText)&&void 0!==n?n:"unknown",a=(()=>{try{return JSON.stringify(e.body,null,2)}catch(t){return}})();throw new go(t,e,`Generic Error: status: ${o}; status text: ${i}; body: ${a}`)}})(e,d),r(d)}catch(t){n(t)}})),Bi=new t("idv"),Fi=Symbol(),Li=Symbol(),zi="verify-id-sdk";function Ui(t){return sessionStorage.getItem(t)}const Vi=new Map;function Hi(t,e){const r=Vi.get(t);Bi.events.emit(r,e)}function ji(t){Hi(Fi,t)}function Gi(t,e){ji({type:"session-id-acquired",step:t,sessionId:e})}function Wi(t,e,r,n,o){ji({type:"verification-result",status:e,step:t,state:n,callbackUrl:o,sessionId:r})}function Xi(t,e){ji({type:"capture-error",errorCode:e,step:t})}function Yi(t,e,r){ji({type:"api-request-error",errorCode:e,step:t,error:r})}function Zi(t,e){return Pi(mo,t).catch((r=>(t.url.endsWith("/events")||Yi(e,"request-error",r.message),Promise.reject(r))))}async function qi(t){var e;mo.HEADERS=Do(t);const r=await function(t){return Zi({keepalive:!0,method:"GET",url:`/verify/api/v1/sdk-settings?clientId=${t}`},"init")}(t);return{autocapture_settings:null!==(e=r.body.autocapture_settings)&&void 0!==e?e:void 0,autocapture_enabled:r.body.autocapture_enabled,strings:r.body.strings,flowType:r.body.flowType}}Vi.set(Fi,Fi),Vi.set(Li,Li);var Ki={setStep(t,e){t.commit("setStep",e)},setSessionId(t,e){t.commit("setSessionId",e)},setIsCapturingProcessStarted(t,e){t.commit("setIsCapturingProcessStarted",e)},setServerPath(t,e){t.commit("setServerPath",e)},setStartToken(t,e){t.commit("setStartToken",e)},setRootElement(t,e){t.commit("setRootElement",e)},setLanguage(t,e){t.commit("setLanguage",e)},setCallback(t,e){t.commit("setCallback",e)},setUserToken(t,e){t.commit("setUserToken",e)},setConsentVersion(t,e){t.commit("setConsentVersion",e)},setMissingImages(t,e){t.commit("setMissingImages",e)},setClientId(t,e){t.commit("setClientId",e)},setStatus(t,e){t.commit("setStatus",e)},setMarkdownSupportText(t,e){t.commit("setMarkdownSupportText",e)},setVideoCaptureSettings(t,e){t.commit("setVideoCaptureSettings",e)},setCdnHost(t,e){t.commit("setCdnHost",e)},setIsImageSigningEnabled(t,e){t.commit("setIsImageSigningEnabled",e)},setAutoCaptureSettings(t,e){t.commit("setAutoCaptureSettings",e)},setFlowType(t,e){t.commit("setFlowType",e)}},$i={setStep:(t,e)=>(t.step=e,t),setSessionId:(t,e)=>(t.sessionId=e,t),setIsCapturingProcessStarted:(t,e)=>(t.isCapturingProcessStarted=e,t),setServerPath:(t,e)=>(t.serverPath=e,t),setStartToken:(t,e)=>(t.startToken=e,t),setRootElement:(t,e)=>(t.rootElementId=e,t),setLanguage:(t,e)=>(t.language=e,t),setCallback:(t,e)=>(t.callback=e,t),setUserToken:(t,e)=>(t.userToken=e,t),setConsentVersion:(t,e)=>(t.consentVersion=e,t),setMissingImages:(t,e)=>(t.missingImages=e,t),setClientId:(t,e)=>(t.clientId=e,t),setStatus:(t,e)=>(t.verificationStatus=e,t),setMarkdownSupportText:(t,e)=>(t.markdownSupportText=e,t),setVideoCaptureSettings:(t,e)=>(t.videoCaptureSettings=e,t),setCdnHost:(t,e)=>(t.cdnHost=e,t),setIsImageSigningEnabled:(t,e)=>(t.isImageSigningEnabled=e,t),setAutoCaptureSettings:(t,e)=>(t.autoCaptureSettings=e,t),setFlowType:(t,e)=>(t.flowType=e,t)};const Ji=new class{constructor(t){this.actions={},this.mutations={},this.state={},this.status="resting",Object.prototype.hasOwnProperty.call(t,"actions")&&(this.actions=t.actions),Object.prototype.hasOwnProperty.call(t,"mutations")&&(this.mutations=t.mutations);const e=this;this.state=new Proxy(t.state||{},{get:function(t,e){return t[e]},set:function(t,r,n){return t[r]=n,Hi(Li,{key:r,state:t}),"mutation"!==e.status&&console.warn(`You should use a mutation to set ${String(r)}`),e.status="resting",!0}})}dispatch(t,e){return"function"!=typeof this.actions[t]?(console.error(`Action "${t} doesn't exist.`),!1):(this.status="action",this.actions[t](this,e),!0)}commit(t,e){if("function"!=typeof this.mutations[t])return console.info(`Mutation "${t}" doesn't exist`),!1;this.status="mutation";const r=this.mutations[t](this.state,e);return this.state=r,!0}}({actions:Ki,mutations:$i,state:{step:"",sessionId:"",serverPath:"",startToken:"",rootElementId:"",language:"en",callback:()=>null,userToken:"",missingImages:[],consentVersion:"",clientId:"",verificationStatus:"pending",markdownSupportText:"",isImageSigningEnabled:!0,isCapturingProcessStarted:!1}});var Qi;function ta(t){const e=[],r=function(t){var e,r,n,o;const i=t.stats.get(Qi.BLUR_DETECTION),a=t.stats.get(Qi.GLARE_DETECTION);if(!i&&!a||0===(null==i?void 0:i.durations.length)&&0===(null==a?void 0:a.durations.length))return;const s=na(null!==(e=null==i?void 0:i.durations)&&void 0!==e?e:null==a?void 0:a.durations),u=i&&a?Math.min(i.countSuccess,a.countSuccess):null!==(r=null==i?void 0:i.countSuccess)&&void 0!==r?r:null==a?void 0:a.countSuccess;return{name:ra(Qi.BLUR_DETECTION),count_success:u,count_failure_glare:null!==(n=null==a?void 0:a.countFailed)&&void 0!==n?n:0,count_failure_blur:null!==(o=null==i?void 0:i.countFailed)&&void 0!==o?o:0,avg_duration:s.duration_avg,std_duration:s.duration_std}}(t);r&&e.push(r);const n=function(t){var e,r;const n=t.stats.get(Qi.FACE_DETECTION),o=t.stats.get(Qi.FACE_POSITION);if(!n||0===n.durations.length)return;const i=na(n.durations);return{name:ra(Qi.FACE_DETECTION),count_success:null!==(e=null==o?void 0:o.countSuccess)&&void 0!==e?e:n.countSuccess,count_failure:n.countFailed+(null!==(r=null==o?void 0:o.countFailed)&&void 0!==r?r:0),avg_duration:i.duration_avg,std_duration:i.duration_std}}(t);n&&e.push(n);for(const[r,n]of t.stats.entries())r!==Qi.BLUR_DETECTION&&r!==Qi.GLARE_DETECTION&&r!==Qi.FACE_DETECTION&&r!==Qi.FACE_POSITION&&n.durations.length>0&&e.push(ea(n,r));return t.frameHandleDurations.length>0&&e.push(function(t){const e=na(t.frameHandleDurations);return{name:"stability_manager",avg_stable_count:Math.round(t.stableCounts.reduce(((t,e)=>t+e),0)/t.stableCounts.length),avg_duration:e.duration_avg,std_duration:e.duration_std}}(t)),e}function ea(t,e){const r=na(t.durations);return{name:ra(e),count_success:t.countSuccess,count_failure:t.countFailed,avg_duration:r.duration_avg,std_duration:r.duration_std}}function ra(t){switch(t){case Qi.BLUR_DETECTION:case Qi.GLARE_DETECTION:return"blur_glare_detector";case Qi.DOCUMENT_DETECTION:return"doc_detector";case Qi.DOCUMENT_POSITION:return"frame_detector";case Qi.BARCODE_DETECTION:return"barcode_detector";case Qi.FACE_DETECTION:case Qi.FACE_POSITION:return"face_detector";default:return t}}function na(t){var e;if(t.length<2)return{duration_avg:null!==(e=t[0])&&void 0!==e?e:0,duration_std:0};const r=t.length,n=t.reduce(((t,e)=>t+e),0)/r;let o=0;for(let e=0;e<r;e++){const r=t[e];o+=Math.pow(r-n,2)}const i=Math.sqrt(o/(r-1));return{duration_avg:Math.round(n),duration_std:Math.round(i)}}!function(t){t.DOCUMENT_DETECTION="document_detection",t.DOCUMENT_POSITION="document_position",t.GLARE_DETECTION="glare_detection",t.BLUR_DETECTION="blur_detection",t.BARCODE_DETECTION="barcode_detection",t.FACE_DETECTION="face_detection",t.FACE_POSITION="face_position"}(Qi||(Qi={}));const oa=new class{createUploadImageEvent(t,e,r,n){return{event_type:"upload_image",upload_image_req:{process_result:"success",image_type:t,request_total_time_ms:String(e),request_processing_time_ms:String(r),request_build_time_ms:String(n)}}}createPageViewEvent(t){return{event_type:"page_view",page_view_req:{page_name:t}}}createProcessingCompleteEvent(){return{event_type:"processing_complete",processing_complete_req:{status:"complete"}}}createSdkInitEvent(t,e){return{event_type:"sdk_init",sdk_init_req:{user_wait_time:Math.round(t),model_stats:this.convertModelStats(e)}}}convertModelStats(t){return t.map((t=>({model_name:t.modelName,init_duration:Math.round(t.initDuration),download_duration:Math.round(t.downloadDuration)})))}async createCaptureStartEvent(t,e){var r,n,i;const a=await async function(){var t,e,r,n,o,i,a,s;const u=Ao.UAParser(),c={vendor:null===(t=u.device)||void 0===t?void 0:t.vendor,model:null===(e=u.device)||void 0===e?void 0:e.model,type:null===(r=u.device)||void 0===r?void 0:r.type,os:null===(n=u.os)||void 0===n?void 0:n.name,os_version:null===(o=u.os)||void 0===o?void 0:o.version,browser:null===(i=u.browser)||void 0===i?void 0:i.name,browser_version:null===(a=u.browser)||void 0===a?void 0:a.version},l=navigator.userAgentData;if(!l)return c;try{const t=await l.getHighEntropyValues(["model","platformVersion","fullVersionList"]);t.model&&(c.model=t.model),l.platform&&(c.os=l.platform),t.platformVersion&&(c.os_version=t.platformVersion);const e=(null!==(s=t.fullVersionList)&&void 0!==s?s:[]).find((t=>!t.brand.includes("Not")&&"Chromium"!==t.brand));e&&(c.browser=e.brand,c.browser_version=e.version)}catch(t){}return c}();return{event_type:"capture_start",capture_start_req:{page_name:t,autocapture_enabled:null!==(i=null===(n=null===(r=Ji.state)||void 0===r?void 0:r.autoCaptureSettings)||void 0===n?void 0:n.enabled)&&void 0!==i&&i,camera:o({},e),device:a}}}createUserActionEvent(t,e,r){var n,o,i;const a={user_action_type:t,page_name:e,autocapture:!!r,autocapture_enabled:null!==(i=null===(o=null===(n=Ji.state)||void 0===n?void 0:n.autoCaptureSettings)||void 0===o?void 0:o.enabled)&&void 0!==i&&i};if(r){const t=ta(r);a.stats=t}return{event_type:"user_action",user_action_req:a}}createErrorEvent(t,e,r){return{event_type:"error",error_req:{error_name:e,error_description:t,step:r}}}createCameraNotAllowedEvent(t,e){return{event_type:"error",error_req:{error_name:"camera_not_allowed",error_description:t,step:e}}}createDrsInitFailureEvent(t,e){return{event_type:"error",error_req:{error_name:"missing_drs_action_token",error_description:t,step:e}}}};async function ia(t,e,r,n,o){r?(mo.HEADERS=Do(n,e),await function(t,e,r){return Zi({keepalive:!0,method:"POST",url:`/verify/api/v1/verification/${t}/events`,path:{sid:t},body:e},r)}(r,o,t)):console.error("cannot send event, sessionId or startToken is not set")}const aa=new class{handelEventData(t){if("session-id-acquired"===t.type)this.sendRiskSessionToken()}sendRiskSessionToken(){try{const t=`${mo.BASE}/verify/api/v1/verification/${Ji.state.sessionId}/risk-session-token`,e=Ji.state.clientId,r=Do(e,Ji.state.userToken);po().then((e=>{Bi.http.httpPost(t,{session_token:e},null,r).catch((e=>{throw console.log("unable to send session token to IDV",t),console.error(e),e}))})).catch((e=>{var r,n,o,i;console.log("unable to get session token from DRS",t),console.error(e);const a=(null==e?void 0:e.message)||"failed to initialize DRS",s=oa.createDrsInitFailureEvent(a,"init");ia(null===(r=Ji.state)||void 0===r?void 0:r.step,null===(n=Ji.state)||void 0===n?void 0:n.userToken,null===(o=Ji.state)||void 0===o?void 0:o.sessionId,null===(i=Ji.state)||void 0===i?void 0:i.clientId,s).then((()=>{ji({type:"failed-to-init-drs",errorCode:"other",step:"init"})}))}))}catch(t){throw console.log("Error sending risk session token"),console.error(t),t}}};async function sa(t,e,r){const n=oa.createErrorEvent(t,e,r);await ua(r,n)}async function ua(t,e){var r,n,o,i,a;const s=null===(r=Ji.state)||void 0===r?void 0:r.userToken,u=(null===(n=Ji.state)||void 0===n?void 0:n.sessionId)||(null===(o=Ji.state)||void 0===o?void 0:o.startToken),c=null===(i=Ji.state)||void 0===i?void 0:i.clientId,l=(null===(a=Ji.state)||void 0===a?void 0:a.step)||t;await ia(l,s,u,c,e)}const ca={blur_message:"Please focus camera on the document before capturing",blur_title:"Blurred image",document_incorrect_position_message:"Please make sure the document is fully within the frame, and nothing covers it",document_incorrect_position_title:"Incorrect document position",document_not_found_message:"Make sure you capture a valid government issued ID",document_not_found_title:"Document not detected",document_not_matching_message:"Please make sure to capture the back side of the document",document_not_matching_title:"Back image mismatch",document_not_supported_message:"Please use a different government issued ID instead",document_not_supported_title:"Document not supported",capturing_in_progress_message:"Capturing, stay steady",capturing_in_progress_title:"Capturing in progress",face_not_found_message:"Ensure your face is not covered and fully visible",face_not_found_title:"Face not detected",glare_message:"Avoid any direct light reflecting with glare",glare_title:"Glare detected",main_title_document_back:"Back side",main_title_document_face:"Selfie",main_title_document_front:"Front side",obstructed_message:"Some of the document parts are covered or missing",obstructed_title:"Missing information",other_error_code_message:"Please try again",other_error_code_title:"An error occurred",page_header_document:"Scan document",loading_screen_small_title:"Preparing...",page_header_face:"Face Recognition",second_title_document_back:"Please place your document on a solid surface, back side up.",second_title_document_face:"Please position your face in the center of the oval below.",second_title_document_front:"Please place your document on a solid surface, photo side up.",wrong_document_side_message:"The wrong document side has been detected",wrong_document_side_title:"Wrong document side detected",face_angle_too_large_title:"your face is not directly aligned with the camera",face_angle_too_large_message:"Please take another photo with your face fully visible for accurate detection",face_close_to_border_title:"Your face is too close to the edge",face_close_to_border_message:"Please adjust your position and make sure your entire face is within the frame",face_too_small_title:"Your face is too distant from the edge",face_too_small_message:"Please move closer to the camera so your face is clearer and easier to detect",face_too_close_title:"Your face is too close ",face_too_close_message:"Please adjust your position and make sure your entire face is within the frame",face_cropped_title:"Your face is partially cropped",face_cropped_message:"Please adjust your position and make sure your entire face is within the frame for optimal",no_face_title:"Face not found",no_face_message:"Please move closer to the camera or adjust your position so your face is clearer and easier to detect",multi_face_title:"Multiple faces detected",multi_face_message:"Please make sure only one face is visible in the frame to proceed",blur_selfie_title:"The selfie is out of focus",blur_selfie_message:"Please try taking another one with clearer focus for better detection",glare_selfie_title:"Too much reflection in your selfie",glare_selfie_message:"Please try taking another photo with better lighting and without glare for accurate detection",closed_eyes_title:"It looks like your eyes are closed",closed_eyes_message:"Please retake the photo with your eyes open",face_occluded_title:"Your face is partially hidden",face_occluded_message:"Please take another photo with your face fully visible for accurate detection",face_rotated_title:"Your face is not directly aligned with the camera",face_rotated_message:"Please take another photo with your face fully visible for accurate detection",barcode_not_found_title:"We are having trouble capturing some important elements of your document, Please try placing it in a clearer spot",barcode_not_found_message:"We are having trouble capturing some important elements of your document, Please try placing it in a clearer spot",searching_document_autocapture:"Searching for document",capturing_document_autocapture:"Capturing, please hold steady",click_manual_autocapture:"Click to capture manually",glare_blur_issues_autocapture:"Please make sure there are no light reflections, and try again",doc_not_in_frame_issues_autocapture:"Please bring the document closer and ensure it is fully within the capture frame for a clear image.",doc_not_found_autocapture:"Looking for document",capturing_face_issue_closer:"Please move closer to the frame",second_title_face_autocapture:"Get ready! Your selfie will be auto-captured, or tap to capture it manually",capturing_face_autocapture3:"Capturing... please, hold steady for 3",capturing_face_autocapture2:"Capturing... please, hold steady for 2",capturing_face_autocapture1:"Capturing... please, hold steady for 1",selfie_approval_autocapture:"Great job! Approve your selfie to continue",approve_button:"Approve",retake_button:"Retake"};const la=new class{constructor(t){this.translations=t,this.translations=new Proxy(this.translations,{get:function(t,e){return t[e]},set:function(t,e,r){return t[e]=r,!0}})}overrideLanguage(t){Object.assign(this.translations,t)}translate(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];let o=this.translations[t];return o||(o=t),o.replace(/{(\d+)}/g,(function(t,e){return void 0!==r[e]?r[e]:t}))}}(ca),da={en:ca,es:{blur_message:"Favor enfoca la cámara en tú cédula antes de la captura",blur_title:"Imagen borrosa",document_incorrect_position_message:"Asegúrate de que la cédula esté completamente dentro del marco y nada la cubra",document_incorrect_position_title:"Posición incorrecta del documento",capturing_in_progress_title:"Capturando en progreso",capturing_in_progress_message:"Capturando, mantente estable",document_not_found_message:"Asegúrate de utilizar una cédula valida",document_not_found_title:"Cédula no detectada",document_not_matching_message:"Favor Asegúrate de capturar la parte trasera de tu cédula",document_not_matching_title:"Parte trasera no corresponde",document_not_supported_message:"Favor utliza tu cédula",document_not_supported_title:"Cédula no compatible",face_not_found_message:"Asegurase de no tapar su rostro",face_not_found_title:"Selfie no detectada",glare_message:"Evite luz directa que pueda generar brillo",glare_title:"Demasiado brillo",main_title_document_back:"Parte trasera de tu cédula",main_title_document_face:"Tómate un Selfie",main_title_document_front:"Parte frontal de tu cédula",obstructed_message:"Parte de la cédula documento no está visible o falta información",obstructed_title:"Falta información",other_error_code_message:"Intenta nuevamente",other_error_code_title:"Ha ocurrido un error",page_header_document:"Escanéa tu cédula",page_header_face:"Reconocimiento Facial",second_title_document_back:"Asegúrate de poner su cédula en una superfice plana con la parte trasera visible.",second_title_document_face:"Asegúrate de posicionar tu rostro en el centro del circulo.",second_title_document_front:"Asegúrate de poner su cédula en una superfice plana con la parte frontal visible.",wrong_document_side_message:"Lado incorrecto de tu cédula ha sido detectado",wrong_document_side_title:"Lado de tu cédula incorrecto",face_angle_too_large_title:"Tu rostro no está directamente alineado con la cámara.",face_angle_too_large_message:"Por favor, toma otra foto con tu rostro completamente visible para una detección precisa.",face_close_to_border_title:"Tu rostro está demasiado cerca del borde.",face_close_to_border_message:"Por favor, cambia la posicion de tu rostro y asegúrate de que todo tu rostro esté dentro del marco.",face_too_small_title:"Tu rostro está demasiado lejos del borde.",face_too_small_message:"Por favor, acércate más a la cámara para que tu rostro esté más claro y sea más fácil de detectar.",face_too_close_title:"Tu rostro está demasiado cerca",face_too_close_message:"Acomode la posición y asegúrese de que toda su rostro esté dentro del marco.",face_cropped_title:"Tu rostro está parcialmente recortado.",face_cropped_message:"Por favor, cambia tu posición y asegúrate de que todo tu rostro esté dentro del marco para una detección óptima.",no_face_title:"Rostro no encontrado.",no_face_message:"Por favor, acércate más a la cámara o ajusta tu posición para que tu rostro esté más claro y sea más fácil de detectar.",multi_face_title:"Se detectaron múltiples rostros.",multi_face_message:"Por favor, asegúrate de que solo haya un rostro visible en el marco para continuar.",blur_selfie_title:"El autorretrato está fuera de foco.",blur_selfie_message:"Por favor, intenta tomar una nueva imagen con un enfoque más claro para una mejor detección.",glare_selfie_title:"Demasiado reflejo en tu autorretrato.",glare_selfie_message:"Por favor, intenta tomar otra foto con una mejor iluminación y sin brillos para una detección precisa.",closed_eyes_title:"Parece que tienes los ojos cerrados.",closed_eyes_message:"Por favor, vuelve a tomar la foto con los ojos abiertos.",face_occluded_title:"Tu rostro está parcialmente oculto.",face_occluded_message:"Por favor, toma otra foto con tu rostro completamente visible para una detección precisa.",face_rotated_title:"Tu rostro está fuera de foco.",face_rotated_message:"Por favor, intenta tomar otro con un enfoque más claro para una mejor detección.",barcode_not_found_title:"Estamos teniendo problemas para capturar algunos elementos importantes de su documento, Intente colocarlo en un lugar más despejado.",barcode_not_found_message:"Estamos teniendo problemas para capturar algunos elementos importantes de su documento, Intente colocarlo en un lugar más despejado.",searching_document_autocapture:"Buscando la cedula",capturing_document_autocapture:"Capturando, por favor mantente quieto",click_manual_autocapture:"Haz clic para capturar manualmente",glare_blur_issues_autocapture:"Por favor, asegúrate de que no haya reflejos de luz antes de intentarlo de nuevo",doc_not_in_frame_issues_autocapture:"Por favor, acerque la cedula y asegúrese de que esté completamente dentro del marco de captura para obtener una imagen clara",second_title_face_autocapture:"¡Prepárate! Tu selfie se capturará automáticamente, o toca para capturarla manualmente",capturing_face_autocapture3:"Capturando... por favor, mantente quieto durante 3",capturing_face_autocapture2:"Capturando... por favor, mantente quieto durante 2",capturing_face_autocapture1:"Capturando... por favor, mantente quieto durante 1",selfie_approval_autocapture:"¡Buen trabajo! Aprueba tu selfie para continuar",approve_button:"Aprobar",retake_button:"Volver a tomar"},pt:{blur_message:"Por favor, foque a câmera no documento antes de capturar",blur_title:"Imagem borrada",document_incorrect_position_message:"Certifique-se de que o documento esteja totalmente dentro do quadro e nada o cubra",document_incorrect_position_title:"Posição incorreta do documento",document_not_found_message:"Certifique-se de capturar um documento válido emitido pelo governo",document_not_found_title:"Documento não detectado",document_not_matching_message:"Por favor, certifique-se de capturar o verso do documento",document_not_matching_title:"Imagem do verso incorreta",document_not_supported_message:"Por favor, utilize um documento diferente emitido pelo governo",document_not_supported_title:"Documento não suportado",capturing_in_progress_message:"Capturando, mantenha-se firme",capturing_in_progress_title:"Captura em andamento",face_not_found_message:"Certifique-se de que seu rosto não esteja coberto e esteja totalmente visível",face_not_found_title:"Rosto não detectado",glare_message:"Evite qualquer luz direta refletindo com brilho",glare_title:"Brilho detectado",main_title_document_back:"Verso",main_title_document_face:"Selfie",main_title_document_front:"Frente",obstructed_message:"Algumas partes do documento estão encobertas ou ausentes",obstructed_title:"Informações incompletas",other_error_code_message:"Por favor, tente novamente",other_error_code_title:"Ocorreu um eprro",page_header_document:"Digitalizar o documento",page_header_face:"Reconhecimento facial",second_title_document_back:"Coloque o documento em uma superfície sólida, com o verso voltado para cima.",second_title_document_face:"Por favor, posicione seu rosto no centro do oval abaixo.",second_title_document_front:"Coloque o documento em uma superfície sólida, com a foto voltada para cima.",wrong_document_side_message:"O lado errado do documento foi detectado",wrong_document_side_title:"Lado incorreto do documento identificado",face_angle_too_large_title:"Seu rosto não está diretamente alinhado com a câmera.",face_angle_too_large_message:"Tire outra foto com seu rosto totalmente visível para uma detecção precisa.",face_close_to_border_title:"Seu rosto está muito próximo da borda.",face_close_to_border_message:"Por favor, reposicione seu rosto e certifique-se de que todo o seu rosto esteja dentro da moldura.",face_too_small_title:"Seu rosto está muito longe da borda.",face_too_small_message:"Aproxime-se da câmera para que seu rosto fique mais claro e fácil de detectar.",face_too_close_title:"Seu rosto está muito perto",face_too_close_message:"Ajuste a posição e certifique-se de que todo o seu rosto esteja dentro da moldura.",face_cropped_title:"Seu rosto está parcialmente cortado.",face_cropped_message:"Mude sua posição e certifique-se de que todo o seu rosto esteja dentro do enquadramento para uma detecção ideal.",no_face_title:"Rosto não encontrado..",no_face_message:"Aproxime-se da câmera ou ajuste sua posição para que seu rosto fique mais claro e fácil de detectar.",multi_face_title:"Vários rostos foram detectados.",multi_face_message:"Certifique-se de que haja apenas um rosto visível no quadro para continuar.",blur_selfie_title:"O autorretrato está fora de foco.",blur_selfie_message:"Tente tirar uma nova imagem com foco mais claro para melhor detecção.",glare_selfie_title:"Muita reflexão em seu autorretrato.",glare_selfie_message:"Tente tirar outra foto com melhor iluminação e sem brilho para uma detecção precisa.",closed_eyes_title:"Parece que seus olhos estão fechados.",closed_eyes_message:"Por favor, tire a foto novamente com os olhos abertos.",face_occluded_title:"Seu rosto está parcialmente oculto.",face_occluded_message:"Tire outra foto com seu rosto totalmente visível para uma detecção precisa.",face_rotated_title:"Seu rosto está fora de foco.",face_rotated_message:"Por favor, tente pegar outro com foco mais claro para melhor detecção.",barcode_not_found_title:"Estamos tendo problemas para capturar alguns elementos importantes do seu documento, Experimente colocá-lo em um local mais claro.",barcode_not_found_message:"Estamos tendo problemas para capturar alguns elementos importantes do seu documento, Experimente colocá-lo em um local mais claro.",searching_document_autocapture:"Buscando o documento",capturing_document_autocapture:"Capturando, por favor mantenha-se imóvel",click_manual_autocapture:"Clique para capturar manualmente.",glare_blur_issues_autocapture:"Por favor, certifique-se de que não há reflexos de luz antes de tentar novamente",doc_not_in_frame_issues_autocapture:"Por favor, aproxime o documento e certifique-se de que está totalmente dentro da moldura de captura para uma imagem nítida",second_title_face_autocapture:"Prepare-se! Sua selfie será capturada automaticamente, ou toque para capturá-la manualmente",capturing_face_autocapture3:"Capturando... por favor, fique parado por 3",capturing_face_autocapture2:"Capturando... por favor, fique parado por 2",capturing_face_autocapture1:"Capturando... por favor, fique parado por 1",selfie_approval_autocapture:"Ótimo trabalho! Aprove sua selfie para continuar",approve_button:"Aprovar",retake_button:"Tirar novamente"},frCa:{blur_message:"Veuillez faire la mise au point de l’appareil photo sur le document avant de le capturer",blur_title:"Image floue",document_not_found_message:"Munissez-vous d’une pièce d’identité valide délivrée par le gouvernement",document_not_found_title:"Document non détecté",document_not_matching_message:"Veillez à capturer le verso du document",document_not_matching_title:"Non-concordance entre les images du recto et du verso",document_not_supported_message:"Veuillez utiliser une autre pièce d’identité délivrée par le gouvernement",document_not_supported_title:"Document non pris en charge",face_not_found_message:"Assurez-vous que votre visage n’est pas couvert et qu’il est entièrement visible",face_not_found_title:"Visage non détecté",glare_message:"Évitez la lumière directe qui pourrait se refléter sur le document",glare_title:"Reflet détecté",main_title_document_back:"Verso",main_title_document_face:"Égoportrait",main_title_document_front:"Face avant",obstructed_message:"Le document comporte des parties manquantes ou couvertes",obstructed_title:"Informations manquantes",other_error_code_message:"Veuillez réessayer",other_error_code_title:"Une erreur s’est produite",page_header_document:"Numériser le document",page_header_face:"Reconnaissance faciale",second_title_document_back:"Veuillez placer votre document sur une surface solide, le verso vers le haut.",second_title_document_face:"Veuillez positionner votre visage au centre de l’ovale ci-dessous.",second_title_document_front:"Veuillez placer votre document sur une surface solide, photo vers le haut.",wrong_document_side_message:"Le mauvais côté du document a été détecté",wrong_document_side_title:"Mauvais côté du document détecté",face_angle_too_large_title:"votre visage n’est pas directement aligné avec l’appareil photo",face_angle_too_large_message:"Veuillez prendre une autre photo avec votre visage entièrement visible pour une détection précise",face_close_to_border_title:"Votre visage est trop près du bord",face_close_to_border_message:"Veuillez ajuster votre position et vous assurer que l’ensemble de votre visage se trouve dans le cadre",face_too_small_title:"Votre visage est trop éloigné du bord",face_too_small_message:"Veuillez vous rapprocher de la caméra pour que votre visage soit plus clair et plus facile à détecter",face_too_close_title:"Votre visage est trop proche",face_too_close_message:"Veuillez ajuster votre position et vous assurer que l’ensemble de votre visage se trouve dans le cadre",face_cropped_title:"Votre visage est partiellement rogné",face_cropped_message:"Veuillez ajuster votre position et vous assurer que l’ensemble de votre visage se trouve dans le cadre pour optimiser",no_face_title:"Visage introuvable",no_face_message:"Veuillez vous rapprocher de la caméra ou ajuster votre position pour que votre visage soit plus clair et plus facile à détecter",multi_face_title:"Plusieurs visages détectés",multi_face_message:"Veuillez vous assurer qu’un seul visage est visible dans le cadre pour continuer",blur_selfie_title:"L’égoportrait n’est pas net",blur_selfie_message:"Essayez d’en prendre un autre avec une mise au point plus claire pour une meilleure détection",glare_selfie_title:"Trop de reflets sur votre égoportrait",glare_selfie_message:"Veuillez essayer de prendre une autre photo avec un meilleur éclairage et sans reflet pour une détection précise",closed_eyes_title:"Il semble que vos yeux soient fermés.",closed_eyes_message:"Veuillez reprendre la photo avec les yeux ouverts",face_occluded_title:"Votre visage est partiellement caché.",face_occluded_message:"Veuillez prendre une autre photo avec votre visage entièrement visible pour une détection précise",face_rotated_title:"votre visage n’est pas directement aligné avec l’appareil photo",face_rotated_message:"Veuillez prendre une autre photo avec votre visage entièrement visible pour une détection précise",barcode_not_found_title:"Nous avons des difficultés à capturer certains éléments importants de votre document. Veuillez essayer de le placer à un endroit plus clair",barcode_not_found_message:"Nous avons des difficultés à capturer certains éléments importants de votre document. Veuillez essayer de le placer à un endroit plus clair",searching_document_autocapture:"Recherche du document",capturing_document_autocapture:"Capture en cours, veuillez rester immobile",click_manual_autocapture:"Cliquez pour capturer manuellement",glare_blur_issues_autocapture:"Veuillez vous assurer qu’il n’y a pas de reflets de lumière avant de réessayer",doc_not_in_frame_issues_autocapture:"Veuillez rapprocher le document et assurez-vous qu’il soit entièrement dans le cadre de capture pour une image claire",second_title_face_autocapture:"Préparez-vous! Votre selfie sera capturé automatiquement, ou appuyez pour le capturer manuellement",capturing_face_autocapture3:"Capture... en cours, veuillez rester immobile pendant 3",capturing_face_autocapture2:"Capture... en cours, veuillez rester immobile pendant 2",capturing_face_autocapture1:"Capture... en cours, veuillez rester immobile pendant 1",selfie_approval_autocapture:"Bon travail! Approuvez votre selfie pour continuer",approve_button:"Approuver",retake_button:"Reprendre"}};const ha=function(){var t,e;(null===(e=null===(t=Ji.state.autoCaptureSettings)||void 0===t?void 0:t.settings)||void 0===e?void 0:e.debug)&&console.log(...arguments)};var fa;!function(t){t.DOCUMENT_DETECTOR="document_detector",t.BLUR_GLARE_CLASSIFIER="blur_glare_classifier",t.FACE_LANDMARK="face_landmark"}(fa||(fa={}));var pa,ga,ma=(pa=function(t,e){return pa=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},pa(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}pa(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),ya=function(t){function e(e,r){var n,o,i,a=this.constructor,s=t.call(this,e,r)||this;return Object.defineProperty(s,"name",{value:a.name,enumerable:!1,configurable:!0}),n=s,o=a.prototype,(i=Object.setPrototypeOf)?i(n,o):n.__proto__=o,function(t,e){void 0===e&&(e=t.constructor);var r=Error.captureStackTrace;r&&r(t,e)}(s),s}return ma(e,t),e}(Error),wa=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),_a=function(t){function e(e){void 0===e&&(e=void 0);var r=t.call(this,e)||this;return r.message=e,r}return wa(e,t),e.prototype.getKind=function(){return this.constructor.kind},e.kind="Exception",e}(ya),va=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ea=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return va(e,t),e.kind="ArgumentException",e}(_a),ba=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Aa=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ba(e,t),e.kind="IllegalArgumentException",e}(_a),Ca=function(){function t(t){if(this.binarizer=t,null===t)throw new Aa("Binarizer must be non-null.")}return t.prototype.getWidth=function(){return this.binarizer.getWidth()},t.prototype.getHeight=function(){return this.binarizer.getHeight()},t.prototype.getBlackRow=function(t,e){return this.binarizer.getBlackRow(t,e)},t.prototype.getBlackMatrix=function(){return null!==this.matrix&&void 0!==this.matrix||(this.matrix=this.binarizer.getBlackMatrix()),this.matrix},t.prototype.isCropSupported=function(){return this.binarizer.getLuminanceSource().isCropSupported()},t.prototype.crop=function(e,r,n,o){var i=this.binarizer.getLuminanceSource().crop(e,r,n,o);return new t(this.binarizer.createBinarizer(i))},t.prototype.isRotateSupported=function(){return this.binarizer.getLuminanceSource().isRotateSupported()},t.prototype.rotateCounterClockwise=function(){var e=this.binarizer.getLuminanceSource().rotateCounterClockwise();return new t(this.binarizer.createBinarizer(e))},t.prototype.rotateCounterClockwise45=function(){var e=this.binarizer.getLuminanceSource().rotateCounterClockwise45();return new t(this.binarizer.createBinarizer(e))},t.prototype.toString=function(){try{return this.getBlackMatrix().toString()}catch(t){return""}},t}(),Ia=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Sa=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Ia(e,t),e.getChecksumInstance=function(){return new e},e.kind="ChecksumException",e}(_a),Ta=function(){function t(t){this.source=t}return t.prototype.getLuminanceSource=function(){return this.source},t.prototype.getWidth=function(){return this.source.getWidth()},t.prototype.getHeight=function(){return this.source.getHeight()},t}(),Da=function(){function t(){}return t.arraycopy=function(t,e,r,n,o){for(;o--;)r[n++]=t[e++]},t.currentTimeMillis=function(){return Date.now()},t}(),Oa=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ra=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Oa(e,t),e.kind="IndexOutOfBoundsException",e}(_a),Ma=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Na=function(t){function e(e,r){void 0===e&&(e=void 0),void 0===r&&(r=void 0);var n=t.call(this,r)||this;return n.index=e,n.message=r,n}return Ma(e,t),e.kind="ArrayIndexOutOfBoundsException",e}(Ra),ka=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},xa=function(){function t(){}return t.fill=function(t,e){for(var r=0,n=t.length;r<n;r++)t[r]=e},t.fillWithin=function(e,r,n,o){t.rangeCheck(e.length,r,n);for(var i=r;i<n;i++)e[i]=o},t.rangeCheck=function(t,e,r){if(e>r)throw new Aa("fromIndex("+e+") > toIndex("+r+")");if(e<0)throw new Na(e);if(r>t)throw new Na(r)},t.asList=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t},t.create=function(t,e,r){return Array.from({length:t}).map((function(t){return Array.from({length:e}).fill(r)}))},t.createInt32Array=function(t,e,r){return Array.from({length:t}).map((function(t){return Int32Array.from({length:e}).fill(r)}))},t.equals=function(t,e){if(!t)return!1;if(!e)return!1;if(!t.length)return!1;if(!e.length)return!1;if(t.length!==e.length)return!1;for(var r=0,n=t.length;r<n;r++)if(t[r]!==e[r])return!1;return!0},t.hashCode=function(t){var e,r;if(null===t)return 0;var n=1;try{for(var o=ka(t),i=o.next();!i.done;i=o.next()){n=31*n+i.value}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}return n},t.fillUint8Array=function(t,e){for(var r=0;r!==t.length;r++)t[r]=e},t.copyOf=function(t,e){return t.slice(0,e)},t.copyOfUint8Array=function(t,e){if(t.length<=e){var r=new Uint8Array(e);return r.set(t),r}return t.slice(0,e)},t.copyOfRange=function(t,e,r){var n=r-e,o=new Int32Array(n);return Da.arraycopy(t,e,o,0,n),o},t.binarySearch=function(e,r,n){void 0===n&&(n=t.numberComparator);for(var o=0,i=e.length-1;o<=i;){var a=i+o>>1,s=n(r,e[a]);if(s>0)o=a+1;else{if(!(s<0))return a;i=a-1}}return-o-1},t.numberComparator=function(t,e){return t-e},t}(),Pa=function(){function t(){}return t.numberOfTrailingZeros=function(t){var e;if(0===t)return 32;var r=31;return 0!==(e=t<<16)&&(r-=16,t=e),0!==(e=t<<8)&&(r-=8,t=e),0!==(e=t<<4)&&(r-=4,t=e),0!==(e=t<<2)&&(r-=2,t=e),r-(t<<1>>>31)},t.numberOfLeadingZeros=function(t){if(0===t)return 32;var e=1;return t>>>16==0&&(e+=16,t<<=16),t>>>24==0&&(e+=8,t<<=8),t>>>28==0&&(e+=4,t<<=4),t>>>30==0&&(e+=2,t<<=2),e-=t>>>31},t.toHexString=function(t){return t.toString(16)},t.toBinaryString=function(t){return String(parseInt(String(t),2))},t.bitCount=function(t){return t=(t=(858993459&(t-=t>>>1&1431655765))+(t>>>2&858993459))+(t>>>4)&252645135,t+=t>>>8,63&(t+=t>>>16)},t.truncDivision=function(t,e){return Math.trunc(t/e)},t.parseInt=function(t,e){return void 0===e&&(e=void 0),parseInt(t,e)},t.MIN_VALUE_32_BITS=-2147483648,t.MAX_VALUE=Number.MAX_SAFE_INTEGER,t}(),Ba=function(){function t(e,r){void 0===e?(this.size=0,this.bits=new Int32Array(1)):(this.size=e,this.bits=null==r?t.makeArray(e):r)}return t.prototype.getSize=function(){return this.size},t.prototype.getSizeInBytes=function(){return Math.floor((this.size+7)/8)},t.prototype.ensureCapacity=function(e){if(e>32*this.bits.length){var r=t.makeArray(e);Da.arraycopy(this.bits,0,r,0,this.bits.length),this.bits=r}},t.prototype.get=function(t){return!!(this.bits[Math.floor(t/32)]&1<<(31&t))},t.prototype.set=function(t){this.bits[Math.floor(t/32)]|=1<<(31&t)},t.prototype.flip=function(t){this.bits[Math.floor(t/32)]^=1<<(31&t)},t.prototype.getNextSet=function(t){var e=this.size;if(t>=e)return e;var r=this.bits,n=Math.floor(t/32),o=r[n];o&=~((1<<(31&t))-1);for(var i=r.length;0===o;){if(++n===i)return e;o=r[n]}var a=32*n+Pa.numberOfTrailingZeros(o);return a>e?e:a},t.prototype.getNextUnset=function(t){var e=this.size;if(t>=e)return e;var r=this.bits,n=Math.floor(t/32),o=~r[n];o&=~((1<<(31&t))-1);for(var i=r.length;0===o;){if(++n===i)return e;o=~r[n]}var a=32*n+Pa.numberOfTrailingZeros(o);return a>e?e:a},t.prototype.setBulk=function(t,e){this.bits[Math.floor(t/32)]=e},t.prototype.setRange=function(t,e){if(e<t||t<0||e>this.size)throw new Aa;if(e!==t){e--;for(var r=Math.floor(t/32),n=Math.floor(e/32),o=this.bits,i=r;i<=n;i++){var a=(2<<(i<n?31:31&e))-(1<<(i>r?0:31&t));o[i]|=a}}},t.prototype.clear=function(){for(var t=this.bits.length,e=this.bits,r=0;r<t;r++)e[r]=0},t.prototype.isRange=function(t,e,r){if(e<t||t<0||e>this.size)throw new Aa;if(e===t)return!0;e--;for(var n=Math.floor(t/32),o=Math.floor(e/32),i=this.bits,a=n;a<=o;a++){var s=(2<<(a<o?31:31&e))-(1<<(a>n?0:31&t))&4294967295;if((i[a]&s)!==(r?s:0))return!1}return!0},t.prototype.appendBit=function(t){this.ensureCapacity(this.size+1),t&&(this.bits[Math.floor(this.size/32)]|=1<<(31&this.size)),this.size++},t.prototype.appendBits=function(t,e){if(e<0||e>32)throw new Aa("Num bits must be between 0 and 32");this.ensureCapacity(this.size+e);for(var r=e;r>0;r--)this.appendBit(1==(t>>r-1&1))},t.prototype.appendBitArray=function(t){var e=t.size;this.ensureCapacity(this.size+e);for(var r=0;r<e;r++)this.appendBit(t.get(r))},t.prototype.xor=function(t){if(this.size!==t.size)throw new Aa("Sizes don't match");for(var e=this.bits,r=0,n=e.length;r<n;r++)e[r]^=t.bits[r]},t.prototype.toBytes=function(t,e,r,n){for(var o=0;o<n;o++){for(var i=0,a=0;a<8;a++)this.get(t)&&(i|=1<<7-a),t++;e[r+o]=i}},t.prototype.getBitArray=function(){return this.bits},t.prototype.reverse=function(){for(var t=new Int32Array(this.bits.length),e=Math.floor((this.size-1)/32),r=e+1,n=this.bits,o=0;o<r;o++){var i=n[o];i=(i=(i=(i=(i=i>>1&1431655765|(1431655765&i)<<1)>>2&858993459|(858993459&i)<<2)>>4&252645135|(252645135&i)<<4)>>8&16711935|(16711935&i)<<8)>>16&65535|(65535&i)<<16,t[e-o]=i}if(this.size!==32*r){var a=32*r-this.size,s=t[0]>>>a;for(o=1;o<r;o++){var u=t[o];s|=u<<32-a,t[o-1]=s,s=u>>>a}t[r-1]=s}this.bits=t},t.makeArray=function(t){return new Int32Array(Math.floor((t+31)/32))},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.size===r.size&&xa.equals(this.bits,r.bits)},t.prototype.hashCode=function(){return 31*this.size+xa.hashCode(this.bits)},t.prototype.toString=function(){for(var t="",e=0,r=this.size;e<r;e++)7&e||(t+=" "),t+=this.get(e)?"X":".";return t},t.prototype.clone=function(){return new t(this.size,this.bits.slice())},t.prototype.toArray=function(){for(var t=[],e=0,r=this.size;e<r;e++)t.push(this.get(e));return t},t}();!function(t){t[t.OTHER=0]="OTHER",t[t.PURE_BARCODE=1]="PURE_BARCODE",t[t.POSSIBLE_FORMATS=2]="POSSIBLE_FORMATS",t[t.TRY_HARDER=3]="TRY_HARDER",t[t.CHARACTER_SET=4]="CHARACTER_SET",t[t.ALLOWED_LENGTHS=5]="ALLOWED_LENGTHS",t[t.ASSUME_CODE_39_CHECK_DIGIT=6]="ASSUME_CODE_39_CHECK_DIGIT",t[t.ENABLE_CODE_39_EXTENDED_MODE=7]="ENABLE_CODE_39_EXTENDED_MODE",t[t.ASSUME_GS1=8]="ASSUME_GS1",t[t.RETURN_CODABAR_START_END=9]="RETURN_CODABAR_START_END",t[t.NEED_RESULT_POINT_CALLBACK=10]="NEED_RESULT_POINT_CALLBACK",t[t.ALLOWED_EAN_EXTENSIONS=11]="ALLOWED_EAN_EXTENSIONS"}(ga||(ga={}));var Fa,La=ga,za=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ua=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return za(e,t),e.getFormatInstance=function(){return new e},e.kind="FormatException",e}(_a),Va=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};!function(t){t[t.Cp437=0]="Cp437",t[t.ISO8859_1=1]="ISO8859_1",t[t.ISO8859_2=2]="ISO8859_2",t[t.ISO8859_3=3]="ISO8859_3",t[t.ISO8859_4=4]="ISO8859_4",t[t.ISO8859_5=5]="ISO8859_5",t[t.ISO8859_6=6]="ISO8859_6",t[t.ISO8859_7=7]="ISO8859_7",t[t.ISO8859_8=8]="ISO8859_8",t[t.ISO8859_9=9]="ISO8859_9",t[t.ISO8859_10=10]="ISO8859_10",t[t.ISO8859_11=11]="ISO8859_11",t[t.ISO8859_13=12]="ISO8859_13",t[t.ISO8859_14=13]="ISO8859_14",t[t.ISO8859_15=14]="ISO8859_15",t[t.ISO8859_16=15]="ISO8859_16",t[t.SJIS=16]="SJIS",t[t.Cp1250=17]="Cp1250",t[t.Cp1251=18]="Cp1251",t[t.Cp1252=19]="Cp1252",t[t.Cp1256=20]="Cp1256",t[t.UnicodeBigUnmarked=21]="UnicodeBigUnmarked",t[t.UTF8=22]="UTF8",t[t.ASCII=23]="ASCII",t[t.Big5=24]="Big5",t[t.GB18030=25]="GB18030",t[t.EUC_KR=26]="EUC_KR"}(Fa||(Fa={}));var Ha,ja=function(){function t(e,r,n){for(var o,i,a=[],s=3;s<arguments.length;s++)a[s-3]=arguments[s];this.valueIdentifier=e,this.name=n,this.values="number"==typeof r?Int32Array.from([r]):r,this.otherEncodingNames=a,t.VALUE_IDENTIFIER_TO_ECI.set(e,this),t.NAME_TO_ECI.set(n,this);for(var u=this.values,c=0,l=u.length;c!==l;c++){var d=u[c];t.VALUES_TO_ECI.set(d,this)}try{for(var h=Va(a),f=h.next();!f.done;f=h.next()){var p=f.value;t.NAME_TO_ECI.set(p,this)}}catch(t){o={error:t}}finally{try{f&&!f.done&&(i=h.return)&&i.call(h)}finally{if(o)throw o.error}}}return t.prototype.getValueIdentifier=function(){return this.valueIdentifier},t.prototype.getName=function(){return this.name},t.prototype.getValue=function(){return this.values[0]},t.getCharacterSetECIByValue=function(e){if(e<0||e>=900)throw new Ua("incorect value");var r=t.VALUES_TO_ECI.get(e);if(void 0===r)throw new Ua("incorect value");return r},t.getCharacterSetECIByName=function(e){var r=t.NAME_TO_ECI.get(e);if(void 0===r)throw new Ua("incorect value");return r},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.getName()===r.getName()},t.VALUE_IDENTIFIER_TO_ECI=new Map,t.VALUES_TO_ECI=new Map,t.NAME_TO_ECI=new Map,t.Cp437=new t(Fa.Cp437,Int32Array.from([0,2]),"Cp437"),t.ISO8859_1=new t(Fa.ISO8859_1,Int32Array.from([1,3]),"ISO-8859-1","ISO88591","ISO8859_1"),t.ISO8859_2=new t(Fa.ISO8859_2,4,"ISO-8859-2","ISO88592","ISO8859_2"),t.ISO8859_3=new t(Fa.ISO8859_3,5,"ISO-8859-3","ISO88593","ISO8859_3"),t.ISO8859_4=new t(Fa.ISO8859_4,6,"ISO-8859-4","ISO88594","ISO8859_4"),t.ISO8859_5=new t(Fa.ISO8859_5,7,"ISO-8859-5","ISO88595","ISO8859_5"),t.ISO8859_6=new t(Fa.ISO8859_6,8,"ISO-8859-6","ISO88596","ISO8859_6"),t.ISO8859_7=new t(Fa.ISO8859_7,9,"ISO-8859-7","ISO88597","ISO8859_7"),t.ISO8859_8=new t(Fa.ISO8859_8,10,"ISO-8859-8","ISO88598","ISO8859_8"),t.ISO8859_9=new t(Fa.ISO8859_9,11,"ISO-8859-9","ISO88599","ISO8859_9"),t.ISO8859_10=new t(Fa.ISO8859_10,12,"ISO-8859-10","ISO885910","ISO8859_10"),t.ISO8859_11=new t(Fa.ISO8859_11,13,"ISO-8859-11","ISO885911","ISO8859_11"),t.ISO8859_13=new t(Fa.ISO8859_13,15,"ISO-8859-13","ISO885913","ISO8859_13"),t.ISO8859_14=new t(Fa.ISO8859_14,16,"ISO-8859-14","ISO885914","ISO8859_14"),t.ISO8859_15=new t(Fa.ISO8859_15,17,"ISO-8859-15","ISO885915","ISO8859_15"),t.ISO8859_16=new t(Fa.ISO8859_16,18,"ISO-8859-16","ISO885916","ISO8859_16"),t.SJIS=new t(Fa.SJIS,20,"SJIS","Shift_JIS"),t.Cp1250=new t(Fa.Cp1250,21,"Cp1250","windows-1250"),t.Cp1251=new t(Fa.Cp1251,22,"Cp1251","windows-1251"),t.Cp1252=new t(Fa.Cp1252,23,"Cp1252","windows-1252"),t.Cp1256=new t(Fa.Cp1256,24,"Cp1256","windows-1256"),t.UnicodeBigUnmarked=new t(Fa.UnicodeBigUnmarked,25,"UnicodeBigUnmarked","UTF-16BE","UnicodeBig"),t.UTF8=new t(Fa.UTF8,26,"UTF8","UTF-8"),t.ASCII=new t(Fa.ASCII,Int32Array.from([27,170]),"ASCII","US-ASCII"),t.Big5=new t(Fa.Big5,28,"Big5"),t.GB18030=new t(Fa.GB18030,29,"GB18030","GB2312","EUC_CN","GBK"),t.EUC_KR=new t(Fa.EUC_KR,30,"EUC_KR","EUC-KR"),t}(),Ga=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Wa=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Ga(e,t),e.kind="UnsupportedOperationException",e}(_a),Xa=function(){function t(){}return t.decode=function(t,e){var r=this.encodingName(e);return this.customDecoder?this.customDecoder(t,r):"undefined"==typeof TextDecoder||this.shouldDecodeOnFallback(r)?this.decodeFallback(t,r):new TextDecoder(r).decode(t)},t.shouldDecodeOnFallback=function(e){return!t.isBrowser()&&"ISO-8859-1"===e},t.encode=function(t,e){var r=this.encodingName(e);return this.customEncoder?this.customEncoder(t,r):"undefined"==typeof TextEncoder?this.encodeFallback(t):(new TextEncoder).encode(t)},t.isBrowser=function(){return"undefined"!=typeof window&&"[object Window]"==={}.toString.call(window)},t.encodingName=function(t){return"string"==typeof t?t:t.getName()},t.encodingCharacterSet=function(t){return t instanceof ja?t:ja.getCharacterSetECIByName(t)},t.decodeFallback=function(e,r){var n=this.encodingCharacterSet(r);if(t.isDecodeFallbackSupported(n)){for(var o="",i=0,a=e.length;i<a;i++){var s=e[i].toString(16);s.length<2&&(s="0"+s),o+="%"+s}return decodeURIComponent(o)}if(n.equals(ja.UnicodeBigUnmarked))return String.fromCharCode.apply(null,new Uint16Array(e.buffer));throw new Wa("Encoding "+this.encodingName(r)+" not supported by fallback.")},t.isDecodeFallbackSupported=function(t){return t.equals(ja.UTF8)||t.equals(ja.ISO8859_1)||t.equals(ja.ASCII)},t.encodeFallback=function(t){for(var e=btoa(unescape(encodeURIComponent(t))).split(""),r=[],n=0;n<e.length;n++)r.push(e[n].charCodeAt(0));return new Uint8Array(r)},t}(),Ya=function(){function t(){}return t.castAsNonUtf8Char=function(t,e){void 0===e&&(e=null);var r=e?e.getName():this.ISO88591;return Xa.decode(new Uint8Array([t]),r)},t.guessEncoding=function(e,r){if(null!=r&&void 0!==r.get(La.CHARACTER_SET))return r.get(La.CHARACTER_SET).toString();for(var n=e.length,o=!0,i=!0,a=!0,s=0,u=0,c=0,l=0,d=0,h=0,f=0,p=0,g=0,m=0,y=0,w=e.length>3&&239===e[0]&&187===e[1]&&191===e[2],_=0;_<n&&(o||i||a);_++){var v=255&e[_];a&&(s>0?128&v?s--:a=!1:128&v&&(64&v?(s++,32&v?(s++,16&v?(s++,8&v?a=!1:l++):c++):u++):a=!1)),o&&(v>127&&v<160?o=!1:v>159&&(v<192||215===v||247===v)&&y++),i&&(d>0?v<64||127===v||v>252?i=!1:d--:128===v||160===v||v>239?i=!1:v>160&&v<224?(h++,p=0,++f>g&&(g=f)):v>127?(d++,f=0,++p>m&&(m=p)):(f=0,p=0))}return a&&s>0&&(a=!1),i&&d>0&&(i=!1),a&&(w||u+c+l>0)?t.UTF8:i&&(t.ASSUME_SHIFT_JIS||g>=3||m>=3)?t.SHIFT_JIS:o&&i?2===g&&2===h||10*y>=n?t.SHIFT_JIS:t.ISO88591:o?t.ISO88591:i?t.SHIFT_JIS:a?t.UTF8:t.PLATFORM_DEFAULT_ENCODING},t.format=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var n=-1;return t.replace(/%(-)?(0?[0-9]+)?([.][0-9]+)?([#][0-9]+)?([scfpexd%])/g,(function(t,r,o,i,a,s){if("%%"===t)return"%";if(void 0!==e[++n]){t=i?parseInt(i.substr(1)):void 0;var u,c=a?parseInt(a.substr(1)):void 0;switch(s){case"s":u=e[n];break;case"c":u=e[n][0];break;case"f":u=parseFloat(e[n]).toFixed(t);break;case"p":u=parseFloat(e[n]).toPrecision(t);break;case"e":u=parseFloat(e[n]).toExponential(t);break;case"x":u=parseInt(e[n]).toString(c||16);break;case"d":u=parseFloat(parseInt(e[n],c||10).toPrecision(t)).toFixed(0)}u="object"==typeof u?JSON.stringify(u):(+u).toString(c);for(var l=parseInt(o),d=o&&o[0]+""=="0"?"0":" ";u.length<l;)u=void 0!==r?u+d:d+u;return u}}))},t.getBytes=function(t,e){return Xa.encode(t,e)},t.getCharCode=function(t,e){return void 0===e&&(e=0),t.charCodeAt(e)},t.getCharAt=function(t){return String.fromCharCode(t)},t.SHIFT_JIS=ja.SJIS.getName(),t.GB2312="GB2312",t.ISO88591=ja.ISO8859_1.getName(),t.EUC_JP="EUC_JP",t.UTF8=ja.UTF8.getName(),t.PLATFORM_DEFAULT_ENCODING=t.UTF8,t.ASSUME_SHIFT_JIS=!1,t}(),Za=function(){function t(t){void 0===t&&(t=""),this.value=t}return t.prototype.enableDecoding=function(t){return this.encoding=t,this},t.prototype.append=function(t){return"string"==typeof t?this.value+=t.toString():this.encoding?this.value+=Ya.castAsNonUtf8Char(t,this.encoding):this.value+=String.fromCharCode(t),this},t.prototype.appendChars=function(t,e,r){for(var n=e;e<e+r;n++)this.append(t[n]);return this},t.prototype.length=function(){return this.value.length},t.prototype.charAt=function(t){return this.value.charAt(t)},t.prototype.deleteCharAt=function(t){this.value=this.value.substr(0,t)+this.value.substring(t+1)},t.prototype.setCharAt=function(t,e){this.value=this.value.substr(0,t)+e+this.value.substr(t+1)},t.prototype.substring=function(t,e){return this.value.substring(t,e)},t.prototype.setLengthToZero=function(){this.value=""},t.prototype.toString=function(){return this.value},t.prototype.insert=function(t,e){this.value=this.value.substring(0,t)+e+this.value.substring(t)},t}(),qa=function(){function t(t,e,r,n){if(this.width=t,this.height=e,this.rowSize=r,this.bits=n,null==e&&(e=t),this.height=e,t<1||e<1)throw new Aa("Both dimensions must be greater than 0");null==r&&(r=Math.floor((t+31)/32)),this.rowSize=r,null==n&&(this.bits=new Int32Array(this.rowSize*this.height))}return t.parseFromBooleanArray=function(e){for(var r=e.length,n=e[0].length,o=new t(n,r),i=0;i<r;i++)for(var a=e[i],s=0;s<n;s++)a[s]&&o.set(s,i);return o},t.parseFromString=function(e,r,n){if(null===e)throw new Aa("stringRepresentation cannot be null");for(var o=new Array(e.length),i=0,a=0,s=-1,u=0,c=0;c<e.length;)if("\n"===e.charAt(c)||"\r"===e.charAt(c)){if(i>a){if(-1===s)s=i-a;else if(i-a!==s)throw new Aa("row lengths do not match");a=i,u++}c++}else if(e.substring(c,c+r.length)===r)c+=r.length,o[i]=!0,i++;else{if(e.substring(c,c+n.length)!==n)throw new Aa("illegal character encountered: "+e.substring(c));c+=n.length,o[i]=!1,i++}if(i>a){if(-1===s)s=i-a;else if(i-a!==s)throw new Aa("row lengths do not match");u++}for(var l=new t(s,u),d=0;d<i;d++)o[d]&&l.set(Math.floor(d%s),Math.floor(d/s));return l},t.prototype.get=function(t,e){var r=e*this.rowSize+Math.floor(t/32);return!!(this.bits[r]>>>(31&t)&1)},t.prototype.set=function(t,e){var r=e*this.rowSize+Math.floor(t/32);this.bits[r]|=1<<(31&t)&4294967295},t.prototype.unset=function(t,e){var r=e*this.rowSize+Math.floor(t/32);this.bits[r]&=~(1<<(31&t)&4294967295)},t.prototype.flip=function(t,e){var r=e*this.rowSize+Math.floor(t/32);this.bits[r]^=1<<(31&t)&4294967295},t.prototype.xor=function(t){if(this.width!==t.getWidth()||this.height!==t.getHeight()||this.rowSize!==t.getRowSize())throw new Aa("input matrix dimensions do not match");for(var e=new Ba(Math.floor(this.width/32)+1),r=this.rowSize,n=this.bits,o=0,i=this.height;o<i;o++)for(var a=o*r,s=t.getRow(o,e).getBitArray(),u=0;u<r;u++)n[a+u]^=s[u]},t.prototype.clear=function(){for(var t=this.bits,e=t.length,r=0;r<e;r++)t[r]=0},t.prototype.setRegion=function(t,e,r,n){if(e<0||t<0)throw new Aa("Left and top must be nonnegative");if(n<1||r<1)throw new Aa("Height and width must be at least 1");var o=t+r,i=e+n;if(i>this.height||o>this.width)throw new Aa("The region must fit inside the matrix");for(var a=this.rowSize,s=this.bits,u=e;u<i;u++)for(var c=u*a,l=t;l<o;l++)s[c+Math.floor(l/32)]|=1<<(31&l)&4294967295},t.prototype.getRow=function(t,e){null==e||e.getSize()<this.width?e=new Ba(this.width):e.clear();for(var r=this.rowSize,n=this.bits,o=t*r,i=0;i<r;i++)e.setBulk(32*i,n[o+i]);return e},t.prototype.setRow=function(t,e){Da.arraycopy(e.getBitArray(),0,this.bits,t*this.rowSize,this.rowSize)},t.prototype.rotate180=function(){for(var t=this.getWidth(),e=this.getHeight(),r=new Ba(t),n=new Ba(t),o=0,i=Math.floor((e+1)/2);o<i;o++)r=this.getRow(o,r),n=this.getRow(e-1-o,n),r.reverse(),n.reverse(),this.setRow(o,n),this.setRow(e-1-o,r)},t.prototype.getEnclosingRectangle=function(){for(var t=this.width,e=this.height,r=this.rowSize,n=this.bits,o=t,i=e,a=-1,s=-1,u=0;u<e;u++)for(var c=0;c<r;c++){var l=n[u*r+c];if(0!==l){if(u<i&&(i=u),u>s&&(s=u),32*c<o){for(var d=0;!(l<<31-d&4294967295);)d++;32*c+d<o&&(o=32*c+d)}if(32*c+31>a){for(d=31;l>>>d==0;)d--;32*c+d>a&&(a=32*c+d)}}}return a<o||s<i?null:Int32Array.from([o,i,a-o+1,s-i+1])},t.prototype.getTopLeftOnBit=function(){for(var t=this.rowSize,e=this.bits,r=0;r<e.length&&0===e[r];)r++;if(r===e.length)return null;for(var n=r/t,o=r%t*32,i=e[r],a=0;!(i<<31-a&4294967295);)a++;return o+=a,Int32Array.from([o,n])},t.prototype.getBottomRightOnBit=function(){for(var t=this.rowSize,e=this.bits,r=e.length-1;r>=0&&0===e[r];)r--;if(r<0)return null;for(var n=Math.floor(r/t),o=32*Math.floor(r%t),i=e[r],a=31;i>>>a==0;)a--;return o+=a,Int32Array.from([o,n])},t.prototype.getWidth=function(){return this.width},t.prototype.getHeight=function(){return this.height},t.prototype.getRowSize=function(){return this.rowSize},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.width===r.width&&this.height===r.height&&this.rowSize===r.rowSize&&xa.equals(this.bits,r.bits)},t.prototype.hashCode=function(){var t=this.width;return t=31*(t=31*(t=31*(t=31*t+this.width)+this.height)+this.rowSize)+xa.hashCode(this.bits)},t.prototype.toString=function(t,e,r){return void 0===t&&(t="X "),void 0===e&&(e=" "),void 0===r&&(r="\n"),this.buildToString(t,e,r)},t.prototype.buildToString=function(t,e,r){for(var n=new Za,o=0,i=this.height;o<i;o++){for(var a=0,s=this.width;a<s;a++)n.append(this.get(a,o)?t:e);n.append(r)}return n.toString()},t.prototype.clone=function(){return new t(this.width,this.height,this.rowSize,this.bits.slice())},t}(),Ka=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),$a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Ka(e,t),e.getNotFoundInstance=function(){return new e},e.kind="NotFoundException",e}(_a),Ja=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Qa=function(t){function e(r){var n=t.call(this,r)||this;return n.luminances=e.EMPTY,n.buckets=new Int32Array(e.LUMINANCE_BUCKETS),n}return Ja(e,t),e.prototype.getBlackRow=function(t,r){var n=this.getLuminanceSource(),o=n.getWidth();null==r||r.getSize()<o?r=new Ba(o):r.clear(),this.initArrays(o);for(var i=n.getRow(t,this.luminances),a=this.buckets,s=0;s<o;s++)a[(255&i[s])>>e.LUMINANCE_SHIFT]++;var u=e.estimateBlackPoint(a);if(o<3)for(s=0;s<o;s++)(255&i[s])<u&&r.set(s);else{var c=255&i[0],l=255&i[1];for(s=1;s<o-1;s++){var d=255&i[s+1];(4*l-c-d)/2<u&&r.set(s),c=l,l=d}}return r},e.prototype.getBlackMatrix=function(){var t=this.getLuminanceSource(),r=t.getWidth(),n=t.getHeight(),o=new qa(r,n);this.initArrays(r);for(var i=this.buckets,a=1;a<5;a++)for(var s=Math.floor(n*a/5),u=t.getRow(s,this.luminances),c=Math.floor(4*r/5),l=Math.floor(r/5);l<c;l++){i[(255&u[l])>>e.LUMINANCE_SHIFT]++}var d=e.estimateBlackPoint(i),h=t.getMatrix();for(a=0;a<n;a++){var f=a*r;for(l=0;l<r;l++){(255&h[f+l])<d&&o.set(l,a)}}return o},e.prototype.createBinarizer=function(t){return new e(t)},e.prototype.initArrays=function(t){this.luminances.length<t&&(this.luminances=new Uint8ClampedArray(t));for(var r=this.buckets,n=0;n<e.LUMINANCE_BUCKETS;n++)r[n]=0},e.estimateBlackPoint=function(t){for(var r=t.length,n=0,o=0,i=0,a=0;a<r;a++)t[a]>i&&(o=a,i=t[a]),t[a]>n&&(n=t[a]);var s=0,u=0;for(a=0;a<r;a++){var c=a-o;(f=t[a]*c*c)>u&&(s=a,u=f)}if(o>s){var l=o;o=s,s=l}if(s-o<=r/16)throw new $a;var d=s-1,h=-1;for(a=s-1;a>o;a--){var f,p=a-o;(f=p*p*(s-a)*(n-t[a]))>h&&(d=a,h=f)}return d<<e.LUMINANCE_SHIFT},e.LUMINANCE_BITS=5,e.LUMINANCE_SHIFT=8-e.LUMINANCE_BITS,e.LUMINANCE_BUCKETS=1<<e.LUMINANCE_BITS,e.EMPTY=Uint8ClampedArray.from([0]),e}(Ta),ts=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),es=function(t){function e(e){var r=t.call(this,e)||this;return r.matrix=null,r}return ts(e,t),e.prototype.getBlackMatrix=function(){if(null!==this.matrix)return this.matrix;var r=this.getLuminanceSource(),n=r.getWidth(),o=r.getHeight();if(n>=e.MINIMUM_DIMENSION&&o>=e.MINIMUM_DIMENSION){var i=r.getMatrix(),a=n>>e.BLOCK_SIZE_POWER;n&e.BLOCK_SIZE_MASK&&a++;var s=o>>e.BLOCK_SIZE_POWER;o&e.BLOCK_SIZE_MASK&&s++;var u=e.calculateBlackPoints(i,a,s,n,o),c=new qa(n,o);e.calculateThresholdForBlock(i,a,s,n,o,u,c),this.matrix=c}else this.matrix=t.prototype.getBlackMatrix.call(this);return this.matrix},e.prototype.createBinarizer=function(t){return new e(t)},e.calculateThresholdForBlock=function(t,r,n,o,i,a,s){for(var u=i-e.BLOCK_SIZE,c=o-e.BLOCK_SIZE,l=0;l<n;l++){var d=l<<e.BLOCK_SIZE_POWER;d>u&&(d=u);for(var h=e.cap(l,2,n-3),f=0;f<r;f++){var p=f<<e.BLOCK_SIZE_POWER;p>c&&(p=c);for(var g=e.cap(f,2,r-3),m=0,y=-2;y<=2;y++){var w=a[h+y];m+=w[g-2]+w[g-1]+w[g]+w[g+1]+w[g+2]}var _=m/25;e.thresholdBlock(t,p,d,_,o,s)}}},e.cap=function(t,e,r){return t<e?e:t>r?r:t},e.thresholdBlock=function(t,r,n,o,i,a){for(var s=0,u=n*i+r;s<e.BLOCK_SIZE;s++,u+=i)for(var c=0;c<e.BLOCK_SIZE;c++)(255&t[u+c])<=o&&a.set(r+c,n+s)},e.calculateBlackPoints=function(t,r,n,o,i){for(var a=i-e.BLOCK_SIZE,s=o-e.BLOCK_SIZE,u=new Array(n),c=0;c<n;c++){u[c]=new Int32Array(r);var l=c<<e.BLOCK_SIZE_POWER;l>a&&(l=a);for(var d=0;d<r;d++){var h=d<<e.BLOCK_SIZE_POWER;h>s&&(h=s);for(var f=0,p=255,g=0,m=0,y=l*o+h;m<e.BLOCK_SIZE;m++,y+=o){for(var w=0;w<e.BLOCK_SIZE;w++){var _=255&t[y+w];f+=_,_<p&&(p=_),_>g&&(g=_)}if(g-p>e.MIN_DYNAMIC_RANGE)for(m++,y+=o;m<e.BLOCK_SIZE;m++,y+=o)for(w=0;w<e.BLOCK_SIZE;w++)f+=255&t[y+w]}var v=f>>2*e.BLOCK_SIZE_POWER;if(g-p<=e.MIN_DYNAMIC_RANGE&&(v=p/2,c>0&&d>0)){var E=(u[c-1][d]+2*u[c][d-1]+u[c-1][d-1])/4;p<E&&(v=E)}u[c][d]=v}}return u},e.BLOCK_SIZE_POWER=3,e.BLOCK_SIZE=1<<e.BLOCK_SIZE_POWER,e.BLOCK_SIZE_MASK=e.BLOCK_SIZE-1,e.MINIMUM_DIMENSION=5*e.BLOCK_SIZE,e.MIN_DYNAMIC_RANGE=24,e}(Qa),rs=function(){function t(t,e){this.width=t,this.height=e}return t.prototype.getWidth=function(){return this.width},t.prototype.getHeight=function(){return this.height},t.prototype.isCropSupported=function(){return!1},t.prototype.crop=function(t,e,r,n){throw new Wa("This luminance source does not support cropping.")},t.prototype.isRotateSupported=function(){return!1},t.prototype.rotateCounterClockwise=function(){throw new Wa("This luminance source does not support rotation by 90 degrees.")},t.prototype.rotateCounterClockwise45=function(){throw new Wa("This luminance source does not support rotation by 45 degrees.")},t.prototype.toString=function(){for(var t=new Uint8ClampedArray(this.width),e=new Za,r=0;r<this.height;r++){for(var n=this.getRow(r,t),o=0;o<this.width;o++){var i=255&n[o],a=void 0;a=i<64?"#":i<128?"+":i<192?".":" ",e.append(a)}e.append("\n")}return e.toString()},t}(),ns=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),os=function(t){function e(e){var r=t.call(this,e.getWidth(),e.getHeight())||this;return r.delegate=e,r}return ns(e,t),e.prototype.getRow=function(t,e){for(var r=this.delegate.getRow(t,e),n=this.getWidth(),o=0;o<n;o++)r[o]=255-(255&r[o]);return r},e.prototype.getMatrix=function(){for(var t=this.delegate.getMatrix(),e=this.getWidth()*this.getHeight(),r=new Uint8ClampedArray(e),n=0;n<e;n++)r[n]=255-(255&t[n]);return r},e.prototype.isCropSupported=function(){return this.delegate.isCropSupported()},e.prototype.crop=function(t,r,n,o){return new e(this.delegate.crop(t,r,n,o))},e.prototype.isRotateSupported=function(){return this.delegate.isRotateSupported()},e.prototype.invert=function(){return this.delegate},e.prototype.rotateCounterClockwise=function(){return new e(this.delegate.rotateCounterClockwise())},e.prototype.rotateCounterClockwise45=function(){return new e(this.delegate.rotateCounterClockwise45())},e}(rs),is=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),as=function(t){function e(r,n){void 0===n&&(n=!1);var o=t.call(this,r.width,r.height)||this;return o.canvas=r,o.tempCanvasElement=null,o.buffer=e.makeBufferFromCanvasImageData(r,n),o}return is(e,t),e.makeBufferFromCanvasImageData=function(t,r){void 0===r&&(r=!1);var n=t.getContext("2d").getImageData(0,0,t.width,t.height);return e.toGrayscaleBuffer(n.data,t.width,t.height,r)},e.toGrayscaleBuffer=function(t,r,n,o){void 0===o&&(o=!1);var i=new Uint8ClampedArray(r*n);if(e.FRAME_INDEX=!e.FRAME_INDEX,e.FRAME_INDEX||!o)for(var a=0,s=0,u=t.length;a<u;a+=4,s++){var c=void 0;if(0===t[a+3])c=255;else c=306*t[a]+601*t[a+1]+117*t[a+2]+512>>10;i[s]=c}else{a=0,s=0;for(var l=t.length;a<l;a+=4,s++){c=void 0;if(0===t[a+3])c=255;else c=306*t[a]+601*t[a+1]+117*t[a+2]+512>>10;i[s]=255-c}}return i},e.prototype.getRow=function(t,e){if(t<0||t>=this.getHeight())throw new Aa("Requested row is outside the image: "+t);var r=this.getWidth(),n=t*r;return null===e?e=this.buffer.slice(n,n+r):(e.length<r&&(e=new Uint8ClampedArray(r)),e.set(this.buffer.slice(n,n+r))),e},e.prototype.getMatrix=function(){return this.buffer},e.prototype.isCropSupported=function(){return!0},e.prototype.crop=function(e,r,n,o){return t.prototype.crop.call(this,e,r,n,o),this},e.prototype.isRotateSupported=function(){return!0},e.prototype.rotateCounterClockwise=function(){return this.rotate(-90),this},e.prototype.rotateCounterClockwise45=function(){return this.rotate(-45),this},e.prototype.getTempCanvasElement=function(){if(null===this.tempCanvasElement){var t=this.canvas.ownerDocument.createElement("canvas");t.width=this.canvas.width,t.height=this.canvas.height,this.tempCanvasElement=t}return this.tempCanvasElement},e.prototype.rotate=function(t){var r=this.getTempCanvasElement(),n=r.getContext("2d"),o=t*e.DEGREE_TO_RADIANS,i=this.canvas.width,a=this.canvas.height,s=Math.ceil(Math.abs(Math.cos(o))*i+Math.abs(Math.sin(o))*a),u=Math.ceil(Math.abs(Math.sin(o))*i+Math.abs(Math.cos(o))*a);return r.width=s,r.height=u,n.translate(s/2,u/2),n.rotate(o),n.drawImage(this.canvas,i/-2,a/-2),this.buffer=e.makeBufferFromCanvasImageData(r),this},e.prototype.invert=function(){return new os(this)},e.DEGREE_TO_RADIANS=Math.PI/180,e.FRAME_INDEX=!0,e}(rs),ss=function(){function t(t,e,r){this.deviceId=t,this.label=e,this.kind="videoinput",this.groupId=r||void 0}return t.prototype.toJSON=function(){return{kind:this.kind,groupId:this.groupId,deviceId:this.deviceId,label:this.label}},t}(),us=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{u(n.next(t))}catch(t){i(t)}}function s(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))},cs=function(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},ls=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},ds=function(){function t(t,e,r){void 0===e&&(e=500),this.reader=t,this.timeBetweenScansMillis=e,this._hints=r,this._stopContinuousDecode=!1,this._stopAsyncDecode=!1,this._timeBetweenDecodingAttempts=0}return Object.defineProperty(t.prototype,"hasNavigator",{get:function(){return"undefined"!=typeof navigator},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isMediaDevicesSuported",{get:function(){return this.hasNavigator&&!!navigator.mediaDevices},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"canEnumerateDevices",{get:function(){return!(!this.isMediaDevicesSuported||!navigator.mediaDevices.enumerateDevices)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"timeBetweenDecodingAttempts",{get:function(){return this._timeBetweenDecodingAttempts},set:function(t){this._timeBetweenDecodingAttempts=t<0?0:t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hints",{get:function(){return this._hints},set:function(t){this._hints=t||null},enumerable:!1,configurable:!0}),t.prototype.listVideoInputDevices=function(){return us(this,void 0,void 0,(function(){var t,e,r,n,o,i,a,s,u,c,l,d;return cs(this,(function(h){switch(h.label){case 0:if(!this.hasNavigator)throw new Error("Can't enumerate devices, navigator is not present.");if(!this.canEnumerateDevices)throw new Error("Can't enumerate devices, method not supported.");return[4,navigator.mediaDevices.enumerateDevices()];case 1:t=h.sent(),e=[];try{for(r=ls(t),n=r.next();!n.done;n=r.next())o=n.value,"videoinput"===(i="video"===o.kind?"videoinput":o.kind)&&(a=o.deviceId||o.id,s=o.label||"Video device "+(e.length+1),u=o.groupId,c={deviceId:a,label:s,kind:i,groupId:u},e.push(c))}catch(t){l={error:t}}finally{try{n&&!n.done&&(d=r.return)&&d.call(r)}finally{if(l)throw l.error}}return[2,e]}}))}))},t.prototype.getVideoInputDevices=function(){return us(this,void 0,void 0,(function(){return cs(this,(function(t){switch(t.label){case 0:return[4,this.listVideoInputDevices()];case 1:return[2,t.sent().map((function(t){return new ss(t.deviceId,t.label)}))]}}))}))},t.prototype.findDeviceById=function(t){return us(this,void 0,void 0,(function(){var e;return cs(this,(function(r){switch(r.label){case 0:return[4,this.listVideoInputDevices()];case 1:return(e=r.sent())?[2,e.find((function(e){return e.deviceId===t}))]:[2,null]}}))}))},t.prototype.decodeFromInputVideoDevice=function(t,e){return us(this,void 0,void 0,(function(){return cs(this,(function(r){switch(r.label){case 0:return[4,this.decodeOnceFromVideoDevice(t,e)];case 1:return[2,r.sent()]}}))}))},t.prototype.decodeOnceFromVideoDevice=function(t,e){return us(this,void 0,void 0,(function(){var r;return cs(this,(function(n){switch(n.label){case 0:return this.reset(),r={video:t?{deviceId:{exact:t}}:{facingMode:"environment"}},[4,this.decodeOnceFromConstraints(r,e)];case 1:return[2,n.sent()]}}))}))},t.prototype.decodeOnceFromConstraints=function(t,e){return us(this,void 0,void 0,(function(){var r;return cs(this,(function(n){switch(n.label){case 0:return[4,navigator.mediaDevices.getUserMedia(t)];case 1:return r=n.sent(),[4,this.decodeOnceFromStream(r,e)];case 2:return[2,n.sent()]}}))}))},t.prototype.decodeOnceFromStream=function(t,e){return us(this,void 0,void 0,(function(){var r;return cs(this,(function(n){switch(n.label){case 0:return this.reset(),[4,this.attachStreamToVideo(t,e)];case 1:return r=n.sent(),[4,this.decodeOnce(r)];case 2:return[2,n.sent()]}}))}))},t.prototype.decodeFromInputVideoDeviceContinuously=function(t,e,r){return us(this,void 0,void 0,(function(){return cs(this,(function(n){switch(n.label){case 0:return[4,this.decodeFromVideoDevice(t,e,r)];case 1:return[2,n.sent()]}}))}))},t.prototype.decodeFromVideoDevice=function(t,e,r){return us(this,void 0,void 0,(function(){var n;return cs(this,(function(o){switch(o.label){case 0:return n={video:t?{deviceId:{exact:t}}:{facingMode:"environment"}},[4,this.decodeFromConstraints(n,e,r)];case 1:return[2,o.sent()]}}))}))},t.prototype.decodeFromConstraints=function(t,e,r){return us(this,void 0,void 0,(function(){var n;return cs(this,(function(o){switch(o.label){case 0:return[4,navigator.mediaDevices.getUserMedia(t)];case 1:return n=o.sent(),[4,this.decodeFromStream(n,e,r)];case 2:return[2,o.sent()]}}))}))},t.prototype.decodeFromStream=function(t,e,r){return us(this,void 0,void 0,(function(){var n;return cs(this,(function(o){switch(o.label){case 0:return this.reset(),[4,this.attachStreamToVideo(t,e)];case 1:return n=o.sent(),[4,this.decodeContinuously(n,r)];case 2:return[2,o.sent()]}}))}))},t.prototype.stopAsyncDecode=function(){this._stopAsyncDecode=!0},t.prototype.stopContinuousDecode=function(){this._stopContinuousDecode=!0},t.prototype.attachStreamToVideo=function(t,e){return us(this,void 0,void 0,(function(){var r;return cs(this,(function(n){switch(n.label){case 0:return r=this.prepareVideoElement(e),this.addVideoSource(r,t),this.videoElement=r,this.stream=t,[4,this.playVideoOnLoadAsync(r)];case 1:return n.sent(),[2,r]}}))}))},t.prototype.playVideoOnLoadAsync=function(t){var e=this;return new Promise((function(r,n){return e.playVideoOnLoad(t,(function(){return r()}))}))},t.prototype.playVideoOnLoad=function(t,e){var r=this;this.videoEndedListener=function(){return r.stopStreams()},this.videoCanPlayListener=function(){return r.tryPlayVideo(t)},t.addEventListener("ended",this.videoEndedListener),t.addEventListener("canplay",this.videoCanPlayListener),t.addEventListener("playing",e),this.tryPlayVideo(t)},t.prototype.isVideoPlaying=function(t){return t.currentTime>0&&!t.paused&&!t.ended&&t.readyState>2},t.prototype.tryPlayVideo=function(t){return us(this,void 0,void 0,(function(){return cs(this,(function(e){switch(e.label){case 0:if(this.isVideoPlaying(t))return console.warn("Trying to play video that is already playing."),[2];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,t.play()];case 2:return e.sent(),[3,4];case 3:return e.sent(),console.warn("It was not possible to play the video."),[3,4];case 4:return[2]}}))}))},t.prototype.getMediaElement=function(t,e){var r=document.getElementById(t);if(!r)throw new Ea("element with id '"+t+"' not found");if(r.nodeName.toLowerCase()!==e.toLowerCase())throw new Ea("element with id '"+t+"' must be an "+e+" element");return r},t.prototype.decodeFromImage=function(t,e){if(!t&&!e)throw new Ea("either imageElement with a src set or an url must be provided");return e&&!t?this.decodeFromImageUrl(e):this.decodeFromImageElement(t)},t.prototype.decodeFromVideo=function(t,e){if(!t&&!e)throw new Ea("Either an element with a src set or an URL must be provided");return e&&!t?this.decodeFromVideoUrl(e):this.decodeFromVideoElement(t)},t.prototype.decodeFromVideoContinuously=function(t,e,r){if(void 0===t&&void 0===e)throw new Ea("Either an element with a src set or an URL must be provided");return e&&!t?this.decodeFromVideoUrlContinuously(e,r):this.decodeFromVideoElementContinuously(t,r)},t.prototype.decodeFromImageElement=function(t){if(!t)throw new Ea("An image element must be provided.");this.reset();var e=this.prepareImageElement(t);return this.imageElement=e,this.isImageLoaded(e)?this.decodeOnce(e,!1,!0):this._decodeOnLoadImage(e)},t.prototype.decodeFromVideoElement=function(t){var e=this._decodeFromVideoElementSetup(t);return this._decodeOnLoadVideo(e)},t.prototype.decodeFromVideoElementContinuously=function(t,e){var r=this._decodeFromVideoElementSetup(t);return this._decodeOnLoadVideoContinuously(r,e)},t.prototype._decodeFromVideoElementSetup=function(t){if(!t)throw new Ea("A video element must be provided.");this.reset();var e=this.prepareVideoElement(t);return this.videoElement=e,e},t.prototype.decodeFromImageUrl=function(t){if(!t)throw new Ea("An URL must be provided.");this.reset();var e=this.prepareImageElement();this.imageElement=e;var r=this._decodeOnLoadImage(e);return e.src=t,r},t.prototype.decodeFromVideoUrl=function(t){if(!t)throw new Ea("An URL must be provided.");this.reset();var e=this.prepareVideoElement(),r=this.decodeFromVideoElement(e);return e.src=t,r},t.prototype.decodeFromVideoUrlContinuously=function(t,e){if(!t)throw new Ea("An URL must be provided.");this.reset();var r=this.prepareVideoElement(),n=this.decodeFromVideoElementContinuously(r,e);return r.src=t,n},t.prototype._decodeOnLoadImage=function(t){var e=this;return new Promise((function(r,n){e.imageLoadedListener=function(){return e.decodeOnce(t,!1,!0).then(r,n)},t.addEventListener("load",e.imageLoadedListener)}))},t.prototype._decodeOnLoadVideo=function(t){return us(this,void 0,void 0,(function(){return cs(this,(function(e){switch(e.label){case 0:return[4,this.playVideoOnLoadAsync(t)];case 1:return e.sent(),[4,this.decodeOnce(t)];case 2:return[2,e.sent()]}}))}))},t.prototype._decodeOnLoadVideoContinuously=function(t,e){return us(this,void 0,void 0,(function(){return cs(this,(function(r){switch(r.label){case 0:return[4,this.playVideoOnLoadAsync(t)];case 1:return r.sent(),this.decodeContinuously(t,e),[2]}}))}))},t.prototype.isImageLoaded=function(t){return!!t.complete&&0!==t.naturalWidth},t.prototype.prepareImageElement=function(t){var e;return void 0===t&&((e=document.createElement("img")).width=200,e.height=200),"string"==typeof t&&(e=this.getMediaElement(t,"img")),t instanceof HTMLImageElement&&(e=t),e},t.prototype.prepareVideoElement=function(t){var e;return t||"undefined"==typeof document||((e=document.createElement("video")).width=200,e.height=200),"string"==typeof t&&(e=this.getMediaElement(t,"video")),t instanceof HTMLVideoElement&&(e=t),e.setAttribute("autoplay","true"),e.setAttribute("muted","true"),e.setAttribute("playsinline","true"),e},t.prototype.decodeOnce=function(t,e,r){var n=this;void 0===e&&(e=!0),void 0===r&&(r=!0),this._stopAsyncDecode=!1;var o=function(i,a){if(n._stopAsyncDecode)return a(new $a("Video stream has ended before any code could be detected.")),void(n._stopAsyncDecode=void 0);try{i(n.decode(t))}catch(t){if(e&&t instanceof $a||(t instanceof Sa||t instanceof Ua)&&r)return setTimeout(o,n._timeBetweenDecodingAttempts,i,a);a(t)}};return new Promise((function(t,e){return o(t,e)}))},t.prototype.decodeContinuously=function(t,e){var r=this;this._stopContinuousDecode=!1;var n=function(){if(r._stopContinuousDecode)r._stopContinuousDecode=void 0;else try{var o=r.decode(t);e(o,null),setTimeout(n,r.timeBetweenScansMillis)}catch(t){e(null,t),(t instanceof Sa||t instanceof Ua||t instanceof $a)&&setTimeout(n,r._timeBetweenDecodingAttempts)}};n()},t.prototype.decode=function(t){var e=this.createBinaryBitmap(t);return this.decodeBitmap(e)},t.prototype.createBinaryBitmap=function(t){this.getCaptureCanvasContext(t);var e=!1;t instanceof HTMLVideoElement?(this.drawFrameOnCanvas(t),e=!0):this.drawImageOnCanvas(t);var r=this.getCaptureCanvas(t),n=new as(r,e),o=new es(n);return new Ca(o)},t.prototype.getCaptureCanvasContext=function(t){if(!this.captureCanvasContext){var e=this.getCaptureCanvas(t),r=void 0;try{r=e.getContext("2d",{willReadFrequently:!0})}catch(t){r=e.getContext("2d")}this.captureCanvasContext=r}return this.captureCanvasContext},t.prototype.getCaptureCanvas=function(t){if(!this.captureCanvas){var e=this.createCaptureCanvas(t);this.captureCanvas=e}return this.captureCanvas},t.prototype.drawFrameOnCanvas=function(t,e,r){void 0===e&&(e={sx:0,sy:0,sWidth:t.videoWidth,sHeight:t.videoHeight,dx:0,dy:0,dWidth:t.videoWidth,dHeight:t.videoHeight}),void 0===r&&(r=this.captureCanvasContext),r.drawImage(t,e.sx,e.sy,e.sWidth,e.sHeight,e.dx,e.dy,e.dWidth,e.dHeight)},t.prototype.drawImageOnCanvas=function(t,e,r){void 0===e&&(e={sx:0,sy:0,sWidth:t.naturalWidth,sHeight:t.naturalHeight,dx:0,dy:0,dWidth:t.naturalWidth,dHeight:t.naturalHeight}),void 0===r&&(r=this.captureCanvasContext),r.drawImage(t,e.sx,e.sy,e.sWidth,e.sHeight,e.dx,e.dy,e.dWidth,e.dHeight)},t.prototype.decodeBitmap=function(t){return this.reader.decode(t,this._hints)},t.prototype.createCaptureCanvas=function(t){if("undefined"==typeof document)return this._destroyCaptureCanvas(),null;var e,r,n=document.createElement("canvas");return void 0!==t&&(t instanceof HTMLVideoElement?(e=t.videoWidth,r=t.videoHeight):t instanceof HTMLImageElement&&(e=t.naturalWidth||t.width,r=t.naturalHeight||t.height)),n.style.width=e+"px",n.style.height=r+"px",n.width=e,n.height=r,n},t.prototype.stopStreams=function(){this.stream&&(this.stream.getVideoTracks().forEach((function(t){return t.stop()})),this.stream=void 0),!1===this._stopAsyncDecode&&this.stopAsyncDecode(),!1===this._stopContinuousDecode&&this.stopContinuousDecode()},t.prototype.reset=function(){this.stopStreams(),this._destroyVideoElement(),this._destroyImageElement(),this._destroyCaptureCanvas()},t.prototype._destroyVideoElement=function(){this.videoElement&&(void 0!==this.videoEndedListener&&this.videoElement.removeEventListener("ended",this.videoEndedListener),void 0!==this.videoPlayingEventListener&&this.videoElement.removeEventListener("playing",this.videoPlayingEventListener),void 0!==this.videoCanPlayListener&&this.videoElement.removeEventListener("loadedmetadata",this.videoCanPlayListener),this.cleanVideoSource(this.videoElement),this.videoElement=void 0)},t.prototype._destroyImageElement=function(){this.imageElement&&(void 0!==this.imageLoadedListener&&this.imageElement.removeEventListener("load",this.imageLoadedListener),this.imageElement.src=void 0,this.imageElement.removeAttribute("src"),this.imageElement=void 0)},t.prototype._destroyCaptureCanvas=function(){this.captureCanvasContext=void 0,this.captureCanvas=void 0},t.prototype.addVideoSource=function(t,e){try{t.srcObject=e}catch(r){t.src=URL.createObjectURL(e)}},t.prototype.cleanVideoSource=function(t){try{t.srcObject=null}catch(e){t.src=""}this.videoElement.removeAttribute("src")},t}(),hs=function(){function t(t,e,r,n,o,i){void 0===r&&(r=null==e?0:8*e.length),void 0===i&&(i=Da.currentTimeMillis()),this.text=t,this.rawBytes=e,this.numBits=r,this.resultPoints=n,this.format=o,this.timestamp=i,this.text=t,this.rawBytes=e,this.numBits=null==r?null==e?0:8*e.length:r,this.resultPoints=n,this.format=o,this.resultMetadata=null,this.timestamp=null==i?Da.currentTimeMillis():i}return t.prototype.getText=function(){return this.text},t.prototype.getRawBytes=function(){return this.rawBytes},t.prototype.getNumBits=function(){return this.numBits},t.prototype.getResultPoints=function(){return this.resultPoints},t.prototype.getBarcodeFormat=function(){return this.format},t.prototype.getResultMetadata=function(){return this.resultMetadata},t.prototype.putMetadata=function(t,e){null===this.resultMetadata&&(this.resultMetadata=new Map),this.resultMetadata.set(t,e)},t.prototype.putAllMetadata=function(t){null!==t&&(null===this.resultMetadata?this.resultMetadata=t:this.resultMetadata=new Map(t))},t.prototype.addResultPoints=function(t){var e=this.resultPoints;if(null===e)this.resultPoints=t;else if(null!==t&&t.length>0){var r=new Array(e.length+t.length);Da.arraycopy(e,0,r,0,e.length),Da.arraycopy(t,0,r,e.length,t.length),this.resultPoints=r}},t.prototype.getTimestamp=function(){return this.timestamp},t.prototype.toString=function(){return this.text},t}();!function(t){t[t.AZTEC=0]="AZTEC",t[t.CODABAR=1]="CODABAR",t[t.CODE_39=2]="CODE_39",t[t.CODE_93=3]="CODE_93",t[t.CODE_128=4]="CODE_128",t[t.DATA_MATRIX=5]="DATA_MATRIX",t[t.EAN_8=6]="EAN_8",t[t.EAN_13=7]="EAN_13",t[t.ITF=8]="ITF",t[t.MAXICODE=9]="MAXICODE",t[t.PDF_417=10]="PDF_417",t[t.QR_CODE=11]="QR_CODE",t[t.RSS_14=12]="RSS_14",t[t.RSS_EXPANDED=13]="RSS_EXPANDED",t[t.UPC_A=14]="UPC_A",t[t.UPC_E=15]="UPC_E",t[t.UPC_EAN_EXTENSION=16]="UPC_EAN_EXTENSION"}(Ha||(Ha={}));var fs,ps=Ha;!function(t){t[t.OTHER=0]="OTHER",t[t.ORIENTATION=1]="ORIENTATION",t[t.BYTE_SEGMENTS=2]="BYTE_SEGMENTS",t[t.ERROR_CORRECTION_LEVEL=3]="ERROR_CORRECTION_LEVEL",t[t.ISSUE_NUMBER=4]="ISSUE_NUMBER",t[t.SUGGESTED_PRICE=5]="SUGGESTED_PRICE",t[t.POSSIBLE_COUNTRY=6]="POSSIBLE_COUNTRY",t[t.UPC_EAN_EXTENSION=7]="UPC_EAN_EXTENSION",t[t.PDF417_EXTRA_METADATA=8]="PDF417_EXTRA_METADATA",t[t.STRUCTURED_APPEND_SEQUENCE=9]="STRUCTURED_APPEND_SEQUENCE",t[t.STRUCTURED_APPEND_PARITY=10]="STRUCTURED_APPEND_PARITY"}(fs||(fs={}));var gs,ms=fs,ys=function(){function t(t,e,r,n,o,i){void 0===o&&(o=-1),void 0===i&&(i=-1),this.rawBytes=t,this.text=e,this.byteSegments=r,this.ecLevel=n,this.structuredAppendSequenceNumber=o,this.structuredAppendParity=i,this.numBits=null==t?0:8*t.length}return t.prototype.getRawBytes=function(){return this.rawBytes},t.prototype.getNumBits=function(){return this.numBits},t.prototype.setNumBits=function(t){this.numBits=t},t.prototype.getText=function(){return this.text},t.prototype.getByteSegments=function(){return this.byteSegments},t.prototype.getECLevel=function(){return this.ecLevel},t.prototype.getErrorsCorrected=function(){return this.errorsCorrected},t.prototype.setErrorsCorrected=function(t){this.errorsCorrected=t},t.prototype.getErasures=function(){return this.erasures},t.prototype.setErasures=function(t){this.erasures=t},t.prototype.getOther=function(){return this.other},t.prototype.setOther=function(t){this.other=t},t.prototype.hasStructuredAppend=function(){return this.structuredAppendParity>=0&&this.structuredAppendSequenceNumber>=0},t.prototype.getStructuredAppendParity=function(){return this.structuredAppendParity},t.prototype.getStructuredAppendSequenceNumber=function(){return this.structuredAppendSequenceNumber},t}(),ws=function(){function t(){}return t.prototype.exp=function(t){return this.expTable[t]},t.prototype.log=function(t){if(0===t)throw new Aa;return this.logTable[t]},t.addOrSubtract=function(t,e){return t^e},t}(),_s=function(){function t(t,e){if(0===e.length)throw new Aa;this.field=t;var r=e.length;if(r>1&&0===e[0]){for(var n=1;n<r&&0===e[n];)n++;n===r?this.coefficients=Int32Array.from([0]):(this.coefficients=new Int32Array(r-n),Da.arraycopy(e,n,this.coefficients,0,this.coefficients.length))}else this.coefficients=e}return t.prototype.getCoefficients=function(){return this.coefficients},t.prototype.getDegree=function(){return this.coefficients.length-1},t.prototype.isZero=function(){return 0===this.coefficients[0]},t.prototype.getCoefficient=function(t){return this.coefficients[this.coefficients.length-1-t]},t.prototype.evaluateAt=function(t){if(0===t)return this.getCoefficient(0);var e,r=this.coefficients;if(1===t){e=0;for(var n=0,o=r.length;n!==o;n++){var i=r[n];e=ws.addOrSubtract(e,i)}return e}e=r[0];var a=r.length,s=this.field;for(n=1;n<a;n++)e=ws.addOrSubtract(s.multiply(t,e),r[n]);return e},t.prototype.addOrSubtract=function(e){if(!this.field.equals(e.field))throw new Aa("GenericGFPolys do not have same GenericGF field");if(this.isZero())return e;if(e.isZero())return this;var r=this.coefficients,n=e.coefficients;if(r.length>n.length){var o=r;r=n,n=o}var i=new Int32Array(n.length),a=n.length-r.length;Da.arraycopy(n,0,i,0,a);for(var s=a;s<n.length;s++)i[s]=ws.addOrSubtract(r[s-a],n[s]);return new t(this.field,i)},t.prototype.multiply=function(e){if(!this.field.equals(e.field))throw new Aa("GenericGFPolys do not have same GenericGF field");if(this.isZero()||e.isZero())return this.field.getZero();for(var r=this.coefficients,n=r.length,o=e.coefficients,i=o.length,a=new Int32Array(n+i-1),s=this.field,u=0;u<n;u++)for(var c=r[u],l=0;l<i;l++)a[u+l]=ws.addOrSubtract(a[u+l],s.multiply(c,o[l]));return new t(s,a)},t.prototype.multiplyScalar=function(e){if(0===e)return this.field.getZero();if(1===e)return this;for(var r=this.coefficients.length,n=this.field,o=new Int32Array(r),i=this.coefficients,a=0;a<r;a++)o[a]=n.multiply(i[a],e);return new t(n,o)},t.prototype.multiplyByMonomial=function(e,r){if(e<0)throw new Aa;if(0===r)return this.field.getZero();for(var n=this.coefficients,o=n.length,i=new Int32Array(o+e),a=this.field,s=0;s<o;s++)i[s]=a.multiply(n[s],r);return new t(a,i)},t.prototype.divide=function(t){if(!this.field.equals(t.field))throw new Aa("GenericGFPolys do not have same GenericGF field");if(t.isZero())throw new Aa("Divide by 0");for(var e=this.field,r=e.getZero(),n=this,o=t.getCoefficient(t.getDegree()),i=e.inverse(o);n.getDegree()>=t.getDegree()&&!n.isZero();){var a=n.getDegree()-t.getDegree(),s=e.multiply(n.getCoefficient(n.getDegree()),i),u=t.multiplyByMonomial(a,s),c=e.buildMonomial(a,s);r=r.addOrSubtract(c),n=n.addOrSubtract(u)}return[r,n]},t.prototype.toString=function(){for(var t="",e=this.getDegree();e>=0;e--){var r=this.getCoefficient(e);if(0!==r){if(r<0?(t+=" - ",r=-r):t.length>0&&(t+=" + "),0===e||1!==r){var n=this.field.log(r);0===n?t+="1":1===n?t+="a":(t+="a^",t+=n)}0!==e&&(1===e?t+="x":(t+="x^",t+=e))}}return t},t}(),vs=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Es=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return vs(e,t),e.kind="ArithmeticException",e}(_a),bs=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),As=function(t){function e(e,r,n){var o=t.call(this)||this;o.primitive=e,o.size=r,o.generatorBase=n;for(var i=new Int32Array(r),a=1,s=0;s<r;s++)i[s]=a,(a*=2)>=r&&(a^=e,a&=r-1);o.expTable=i;var u=new Int32Array(r);for(s=0;s<r-1;s++)u[i[s]]=s;return o.logTable=u,o.zero=new _s(o,Int32Array.from([0])),o.one=new _s(o,Int32Array.from([1])),o}return bs(e,t),e.prototype.getZero=function(){return this.zero},e.prototype.getOne=function(){return this.one},e.prototype.buildMonomial=function(t,e){if(t<0)throw new Aa;if(0===e)return this.zero;var r=new Int32Array(t+1);return r[0]=e,new _s(this,r)},e.prototype.inverse=function(t){if(0===t)throw new Es;return this.expTable[this.size-this.logTable[t]-1]},e.prototype.multiply=function(t,e){return 0===t||0===e?0:this.expTable[(this.logTable[t]+this.logTable[e])%(this.size-1)]},e.prototype.getSize=function(){return this.size},e.prototype.getGeneratorBase=function(){return this.generatorBase},e.prototype.toString=function(){return"GF(0x"+Pa.toHexString(this.primitive)+","+this.size+")"},e.prototype.equals=function(t){return t===this},e.AZTEC_DATA_12=new e(4201,4096,1),e.AZTEC_DATA_10=new e(1033,1024,1),e.AZTEC_DATA_6=new e(67,64,1),e.AZTEC_PARAM=new e(19,16,1),e.QR_CODE_FIELD_256=new e(285,256,0),e.DATA_MATRIX_FIELD_256=new e(301,256,1),e.AZTEC_DATA_8=e.DATA_MATRIX_FIELD_256,e.MAXICODE_FIELD_64=e.AZTEC_DATA_6,e}(ws),Cs=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Is=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Cs(e,t),e.kind="ReedSolomonException",e}(_a),Ss=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ts=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Ss(e,t),e.kind="IllegalStateException",e}(_a),Ds=function(){function t(t){this.field=t}return t.prototype.decode=function(t,e){for(var r=this.field,n=new _s(r,t),o=new Int32Array(e),i=!0,a=0;a<e;a++){var s=n.evaluateAt(r.exp(a+r.getGeneratorBase()));o[o.length-1-a]=s,0!==s&&(i=!1)}if(!i){var u=new _s(r,o),c=this.runEuclideanAlgorithm(r.buildMonomial(e,1),u,e),l=c[0],d=c[1],h=this.findErrorLocations(l),f=this.findErrorMagnitudes(d,h);for(a=0;a<h.length;a++){var p=t.length-1-r.log(h[a]);if(p<0)throw new Is("Bad error location");t[p]=As.addOrSubtract(t[p],f[a])}}},t.prototype.runEuclideanAlgorithm=function(t,e,r){if(t.getDegree()<e.getDegree()){var n=t;t=e,e=n}for(var o=this.field,i=t,a=e,s=o.getZero(),u=o.getOne();a.getDegree()>=(r/2|0);){var c=i,l=s;if(s=u,(i=a).isZero())throw new Is("r_{i-1} was zero");a=c;for(var d=o.getZero(),h=i.getCoefficient(i.getDegree()),f=o.inverse(h);a.getDegree()>=i.getDegree()&&!a.isZero();){var p=a.getDegree()-i.getDegree(),g=o.multiply(a.getCoefficient(a.getDegree()),f);d=d.addOrSubtract(o.buildMonomial(p,g)),a=a.addOrSubtract(i.multiplyByMonomial(p,g))}if(u=d.multiply(s).addOrSubtract(l),a.getDegree()>=i.getDegree())throw new Ts("Division algorithm failed to reduce polynomial?")}var m=u.getCoefficient(0);if(0===m)throw new Is("sigmaTilde(0) was zero");var y=o.inverse(m);return[u.multiplyScalar(y),a.multiplyScalar(y)]},t.prototype.findErrorLocations=function(t){var e=t.getDegree();if(1===e)return Int32Array.from([t.getCoefficient(1)]);for(var r=new Int32Array(e),n=0,o=this.field,i=1;i<o.getSize()&&n<e;i++)0===t.evaluateAt(i)&&(r[n]=o.inverse(i),n++);if(n!==e)throw new Is("Error locator degree does not match number of roots");return r},t.prototype.findErrorMagnitudes=function(t,e){for(var r=e.length,n=new Int32Array(r),o=this.field,i=0;i<r;i++){for(var a=o.inverse(e[i]),s=1,u=0;u<r;u++)if(i!==u){var c=o.multiply(e[u],a),l=1&c?-2&c:1|c;s=o.multiply(s,l)}n[i]=o.multiply(t.evaluateAt(a),o.inverse(s)),0!==o.getGeneratorBase()&&(n[i]=o.multiply(n[i],a))}return n},t}();!function(t){t[t.UPPER=0]="UPPER",t[t.LOWER=1]="LOWER",t[t.MIXED=2]="MIXED",t[t.DIGIT=3]="DIGIT",t[t.PUNCT=4]="PUNCT",t[t.BINARY=5]="BINARY"}(gs||(gs={}));var Os=function(){function t(){}return t.prototype.decode=function(e){this.ddata=e;var r=e.getBits(),n=this.extractBits(r),o=this.correctBits(n),i=t.convertBoolArrayToByteArray(o),a=t.getEncodedData(o),s=new ys(i,a,null,null);return s.setNumBits(o.length),s},t.highLevelDecode=function(t){return this.getEncodedData(t)},t.getEncodedData=function(e){for(var r=e.length,n=gs.UPPER,o=gs.UPPER,i="",a=0;a<r;)if(o===gs.BINARY){if(r-a<5)break;var s=t.readCode(e,a,5);if(a+=5,0===s){if(r-a<11)break;s=t.readCode(e,a,11)+31,a+=11}for(var u=0;u<s;u++){if(r-a<8){a=r;break}var c=t.readCode(e,a,8);i+=Ya.castAsNonUtf8Char(c),a+=8}o=n}else{var l=o===gs.DIGIT?4:5;if(r-a<l)break;c=t.readCode(e,a,l);a+=l;var d=t.getCharacter(o,c);d.startsWith("CTRL_")?(n=o,o=t.getTable(d.charAt(5)),"L"===d.charAt(6)&&(n=o)):(i+=d,o=n)}return i},t.getTable=function(t){switch(t){case"L":return gs.LOWER;case"P":return gs.PUNCT;case"M":return gs.MIXED;case"D":return gs.DIGIT;case"B":return gs.BINARY;default:return gs.UPPER}},t.getCharacter=function(e,r){switch(e){case gs.UPPER:return t.UPPER_TABLE[r];case gs.LOWER:return t.LOWER_TABLE[r];case gs.MIXED:return t.MIXED_TABLE[r];case gs.PUNCT:return t.PUNCT_TABLE[r];case gs.DIGIT:return t.DIGIT_TABLE[r];default:throw new Ts("Bad table")}},t.prototype.correctBits=function(e){var r,n;this.ddata.getNbLayers()<=2?(n=6,r=As.AZTEC_DATA_6):this.ddata.getNbLayers()<=8?(n=8,r=As.AZTEC_DATA_8):this.ddata.getNbLayers()<=22?(n=10,r=As.AZTEC_DATA_10):(n=12,r=As.AZTEC_DATA_12);var o=this.ddata.getNbDatablocks(),i=e.length/n;if(i<o)throw new Ua;for(var a=e.length%n,s=new Int32Array(i),u=0;u<i;u++,a+=n)s[u]=t.readCode(e,a,n);try{new Ds(r).decode(s,i-o)}catch(t){throw new Ua(t)}var c=(1<<n)-1,l=0;for(u=0;u<o;u++){if(0===(f=s[u])||f===c)throw new Ua;1!==f&&f!==c-1||l++}var d=new Array(o*n-l),h=0;for(u=0;u<o;u++){var f;if(1===(f=s[u])||f===c-1)d.fill(f>1,h,h+n-1),h+=n-1;else for(var p=n-1;p>=0;--p)d[h++]=!!(f&1<<p)}return d},t.prototype.extractBits=function(t){var e=this.ddata.isCompact(),r=this.ddata.getNbLayers(),n=(e?11:14)+4*r,o=new Int32Array(n),i=new Array(this.totalBitsInLayer(r,e));if(e)for(var a=0;a<o.length;a++)o[a]=a;else{var s=n+1+2*Pa.truncDivision(Pa.truncDivision(n,2)-1,15),u=n/2,c=Pa.truncDivision(s,2);for(a=0;a<u;a++){var l=a+Pa.truncDivision(a,15);o[u-a-1]=c-l-1,o[u+a]=c+l+1}}a=0;for(var d=0;a<r;a++){for(var h=4*(r-a)+(e?9:12),f=2*a,p=n-1-f,g=0;g<h;g++)for(var m=2*g,y=0;y<2;y++)i[d+m+y]=t.get(o[f+y],o[f+g]),i[d+2*h+m+y]=t.get(o[f+g],o[p-y]),i[d+4*h+m+y]=t.get(o[p-y],o[p-g]),i[d+6*h+m+y]=t.get(o[p-g],o[f+y]);d+=8*h}return i},t.readCode=function(t,e,r){for(var n=0,o=e;o<e+r;o++)n<<=1,t[o]&&(n|=1);return n},t.readByte=function(e,r){var n=e.length-r;return n>=8?t.readCode(e,r,8):t.readCode(e,r,n)<<8-n},t.convertBoolArrayToByteArray=function(e){for(var r=new Uint8Array((e.length+7)/8),n=0;n<r.length;n++)r[n]=t.readByte(e,8*n);return r},t.prototype.totalBitsInLayer=function(t,e){return((e?88:112)+16*t)*t},t.UPPER_TABLE=["CTRL_PS"," ","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","CTRL_LL","CTRL_ML","CTRL_DL","CTRL_BS"],t.LOWER_TABLE=["CTRL_PS"," ","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","CTRL_US","CTRL_ML","CTRL_DL","CTRL_BS"],t.MIXED_TABLE=["CTRL_PS"," ","","","","","","","","\b","\t","\n","\v","\f","\r","","","","","","@","\\","^","_","`","|","~","","CTRL_LL","CTRL_UL","CTRL_PL","CTRL_BS"],t.PUNCT_TABLE=["","\r","\r\n",". ",", ",": ","!",'"',"#","$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","?","[","]","{","}","CTRL_UL"],t.DIGIT_TABLE=["CTRL_PS"," ","0","1","2","3","4","5","6","7","8","9",",",".","CTRL_UL","CTRL_US"],t}(),Rs=function(){function t(){}return t.round=function(t){return isNaN(t)?0:t<=Number.MIN_SAFE_INTEGER?Number.MIN_SAFE_INTEGER:t>=Number.MAX_SAFE_INTEGER?Number.MAX_SAFE_INTEGER:t+(t<0?-.5:.5)|0},t.distance=function(t,e,r,n){var o=t-r,i=e-n;return Math.sqrt(o*o+i*i)},t.sum=function(t){for(var e=0,r=0,n=t.length;r!==n;r++){e+=t[r]}return e},t}(),Ms=function(){function t(){}return t.floatToIntBits=function(t){return t},t.MAX_VALUE=Number.MAX_SAFE_INTEGER,t}(),Ns=function(){function t(t,e){this.x=t,this.y=e}return t.prototype.getX=function(){return this.x},t.prototype.getY=function(){return this.y},t.prototype.equals=function(e){if(e instanceof t){var r=e;return this.x===r.x&&this.y===r.y}return!1},t.prototype.hashCode=function(){return 31*Ms.floatToIntBits(this.x)+Ms.floatToIntBits(this.y)},t.prototype.toString=function(){return"("+this.x+","+this.y+")"},t.orderBestPatterns=function(t){var e,r,n,o=this.distance(t[0],t[1]),i=this.distance(t[1],t[2]),a=this.distance(t[0],t[2]);if(i>=o&&i>=a?(r=t[0],e=t[1],n=t[2]):a>=i&&a>=o?(r=t[1],e=t[0],n=t[2]):(r=t[2],e=t[0],n=t[1]),this.crossProductZ(e,r,n)<0){var s=e;e=n,n=s}t[0]=e,t[1]=r,t[2]=n},t.distance=function(t,e){return Rs.distance(t.x,t.y,e.x,e.y)},t.crossProductZ=function(t,e,r){var n=e.x,o=e.y;return(r.x-n)*(t.y-o)-(r.y-o)*(t.x-n)},t}(),ks=function(){function t(t,e){this.bits=t,this.points=e}return t.prototype.getBits=function(){return this.bits},t.prototype.getPoints=function(){return this.points},t}(),xs=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ps=function(t){function e(e,r,n,o,i){var a=t.call(this,e,r)||this;return a.compact=n,a.nbDatablocks=o,a.nbLayers=i,a}return xs(e,t),e.prototype.getNbLayers=function(){return this.nbLayers},e.prototype.getNbDatablocks=function(){return this.nbDatablocks},e.prototype.isCompact=function(){return this.compact},e}(ks),Bs=function(){function t(e,r,n,o){this.image=e,this.height=e.getHeight(),this.width=e.getWidth(),null==r&&(r=t.INIT_SIZE),null==n&&(n=e.getWidth()/2|0),null==o&&(o=e.getHeight()/2|0);var i=r/2|0;if(this.leftInit=n-i,this.rightInit=n+i,this.upInit=o-i,this.downInit=o+i,this.upInit<0||this.leftInit<0||this.downInit>=this.height||this.rightInit>=this.width)throw new $a}return t.prototype.detect=function(){for(var t=this.leftInit,e=this.rightInit,r=this.upInit,n=this.downInit,o=!1,i=!0,a=!1,s=!1,u=!1,c=!1,l=!1,d=this.width,h=this.height;i;){i=!1;for(var f=!0;(f||!s)&&e<d;)(f=this.containsBlackPoint(r,n,e,!1))?(e++,i=!0,s=!0):s||e++;if(e>=d){o=!0;break}for(var p=!0;(p||!u)&&n<h;)(p=this.containsBlackPoint(t,e,n,!0))?(n++,i=!0,u=!0):u||n++;if(n>=h){o=!0;break}for(var g=!0;(g||!c)&&t>=0;)(g=this.containsBlackPoint(r,n,t,!1))?(t--,i=!0,c=!0):c||t--;if(t<0){o=!0;break}for(var m=!0;(m||!l)&&r>=0;)(m=this.containsBlackPoint(t,e,r,!0))?(r--,i=!0,l=!0):l||r--;if(r<0){o=!0;break}i&&(a=!0)}if(!o&&a){for(var y=e-t,w=null,_=1;null===w&&_<y;_++)w=this.getBlackPointOnSegment(t,n-_,t+_,n);if(null==w)throw new $a;var v=null;for(_=1;null===v&&_<y;_++)v=this.getBlackPointOnSegment(t,r+_,t+_,r);if(null==v)throw new $a;var E=null;for(_=1;null===E&&_<y;_++)E=this.getBlackPointOnSegment(e,r+_,e-_,r);if(null==E)throw new $a;var b=null;for(_=1;null===b&&_<y;_++)b=this.getBlackPointOnSegment(e,n-_,e-_,n);if(null==b)throw new $a;return this.centerEdges(b,w,E,v)}throw new $a},t.prototype.getBlackPointOnSegment=function(t,e,r,n){for(var o=Rs.round(Rs.distance(t,e,r,n)),i=(r-t)/o,a=(n-e)/o,s=this.image,u=0;u<o;u++){var c=Rs.round(t+u*i),l=Rs.round(e+u*a);if(s.get(c,l))return new Ns(c,l)}return null},t.prototype.centerEdges=function(e,r,n,o){var i=e.getX(),a=e.getY(),s=r.getX(),u=r.getY(),c=n.getX(),l=n.getY(),d=o.getX(),h=o.getY(),f=t.CORR;return i<this.width/2?[new Ns(d-f,h+f),new Ns(s+f,u+f),new Ns(c-f,l-f),new Ns(i+f,a-f)]:[new Ns(d+f,h+f),new Ns(s+f,u-f),new Ns(c-f,l+f),new Ns(i-f,a-f)]},t.prototype.containsBlackPoint=function(t,e,r,n){var o=this.image;if(n){for(var i=t;i<=e;i++)if(o.get(i,r))return!0}else for(var a=t;a<=e;a++)if(o.get(r,a))return!0;return!1},t.INIT_SIZE=10,t.CORR=1,t}(),Fs=function(){function t(){}return t.checkAndNudgePoints=function(t,e){for(var r=t.getWidth(),n=t.getHeight(),o=!0,i=0;i<e.length&&o;i+=2){var a=Math.floor(e[i]),s=Math.floor(e[i+1]);if(a<-1||a>r||s<-1||s>n)throw new $a;o=!1,-1===a?(e[i]=0,o=!0):a===r&&(e[i]=r-1,o=!0),-1===s?(e[i+1]=0,o=!0):s===n&&(e[i+1]=n-1,o=!0)}o=!0;for(i=e.length-2;i>=0&&o;i-=2){a=Math.floor(e[i]),s=Math.floor(e[i+1]);if(a<-1||a>r||s<-1||s>n)throw new $a;o=!1,-1===a?(e[i]=0,o=!0):a===r&&(e[i]=r-1,o=!0),-1===s?(e[i+1]=0,o=!0):s===n&&(e[i+1]=n-1,o=!0)}},t}(),Ls=function(){function t(t,e,r,n,o,i,a,s,u){this.a11=t,this.a21=e,this.a31=r,this.a12=n,this.a22=o,this.a32=i,this.a13=a,this.a23=s,this.a33=u}return t.quadrilateralToQuadrilateral=function(e,r,n,o,i,a,s,u,c,l,d,h,f,p,g,m){var y=t.quadrilateralToSquare(e,r,n,o,i,a,s,u);return t.squareToQuadrilateral(c,l,d,h,f,p,g,m).times(y)},t.prototype.transformPoints=function(t){for(var e=t.length,r=this.a11,n=this.a12,o=this.a13,i=this.a21,a=this.a22,s=this.a23,u=this.a31,c=this.a32,l=this.a33,d=0;d<e;d+=2){var h=t[d],f=t[d+1],p=o*h+s*f+l;t[d]=(r*h+i*f+u)/p,t[d+1]=(n*h+a*f+c)/p}},t.prototype.transformPointsWithValues=function(t,e){for(var r=this.a11,n=this.a12,o=this.a13,i=this.a21,a=this.a22,s=this.a23,u=this.a31,c=this.a32,l=this.a33,d=t.length,h=0;h<d;h++){var f=t[h],p=e[h],g=o*f+s*p+l;t[h]=(r*f+i*p+u)/g,e[h]=(n*f+a*p+c)/g}},t.squareToQuadrilateral=function(e,r,n,o,i,a,s,u){var c=e-n+i-s,l=r-o+a-u;if(0===c&&0===l)return new t(n-e,i-n,e,o-r,a-o,r,0,0,1);var d=n-i,h=s-i,f=o-a,p=u-a,g=d*p-h*f,m=(c*p-h*l)/g,y=(d*l-c*f)/g;return new t(n-e+m*n,s-e+y*s,e,o-r+m*o,u-r+y*u,r,m,y,1)},t.quadrilateralToSquare=function(e,r,n,o,i,a,s,u){return t.squareToQuadrilateral(e,r,n,o,i,a,s,u).buildAdjoint()},t.prototype.buildAdjoint=function(){return new t(this.a22*this.a33-this.a23*this.a32,this.a23*this.a31-this.a21*this.a33,this.a21*this.a32-this.a22*this.a31,this.a13*this.a32-this.a12*this.a33,this.a11*this.a33-this.a13*this.a31,this.a12*this.a31-this.a11*this.a32,this.a12*this.a23-this.a13*this.a22,this.a13*this.a21-this.a11*this.a23,this.a11*this.a22-this.a12*this.a21)},t.prototype.times=function(e){return new t(this.a11*e.a11+this.a21*e.a12+this.a31*e.a13,this.a11*e.a21+this.a21*e.a22+this.a31*e.a23,this.a11*e.a31+this.a21*e.a32+this.a31*e.a33,this.a12*e.a11+this.a22*e.a12+this.a32*e.a13,this.a12*e.a21+this.a22*e.a22+this.a32*e.a23,this.a12*e.a31+this.a22*e.a32+this.a32*e.a33,this.a13*e.a11+this.a23*e.a12+this.a33*e.a13,this.a13*e.a21+this.a23*e.a22+this.a33*e.a23,this.a13*e.a31+this.a23*e.a32+this.a33*e.a33)},t}(),zs=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Us=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return zs(e,t),e.prototype.sampleGrid=function(t,e,r,n,o,i,a,s,u,c,l,d,h,f,p,g,m,y,w){var _=Ls.quadrilateralToQuadrilateral(n,o,i,a,s,u,c,l,d,h,f,p,g,m,y,w);return this.sampleGridWithTransform(t,e,r,_)},e.prototype.sampleGridWithTransform=function(t,e,r,n){if(e<=0||r<=0)throw new $a;for(var o=new qa(e,r),i=new Float32Array(2*e),a=0;a<r;a++){for(var s=i.length,u=a+.5,c=0;c<s;c+=2)i[c]=c/2+.5,i[c+1]=u;n.transformPoints(i),Fs.checkAndNudgePoints(t,i);try{for(c=0;c<s;c+=2)t.get(Math.floor(i[c]),Math.floor(i[c+1]))&&o.set(c/2,a)}catch(t){throw new $a}}return o},e}(Fs),Vs=function(){function t(){}return t.setGridSampler=function(e){t.gridSampler=e},t.getInstance=function(){return t.gridSampler},t.gridSampler=new Us,t}(),Hs=function(){function t(t,e){this.x=t,this.y=e}return t.prototype.toResultPoint=function(){return new Ns(this.getX(),this.getY())},t.prototype.getX=function(){return this.x},t.prototype.getY=function(){return this.y},t}(),js=function(){function t(t){this.EXPECTED_CORNER_BITS=new Int32Array([3808,476,2107,1799]),this.image=t}return t.prototype.detect=function(){return this.detectMirror(!1)},t.prototype.detectMirror=function(t){var e=this.getMatrixCenter(),r=this.getBullsEyeCorners(e);if(t){var n=r[0];r[0]=r[2],r[2]=n}this.extractParameters(r);var o=this.sampleGrid(this.image,r[this.shift%4],r[(this.shift+1)%4],r[(this.shift+2)%4],r[(this.shift+3)%4]),i=this.getMatrixCornerPoints(r);return new Ps(o,i,this.compact,this.nbDataBlocks,this.nbLayers)},t.prototype.extractParameters=function(t){if(!(this.isValidPoint(t[0])&&this.isValidPoint(t[1])&&this.isValidPoint(t[2])&&this.isValidPoint(t[3])))throw new $a;var e=2*this.nbCenterLayers,r=new Int32Array([this.sampleLine(t[0],t[1],e),this.sampleLine(t[1],t[2],e),this.sampleLine(t[2],t[3],e),this.sampleLine(t[3],t[0],e)]);this.shift=this.getRotation(r,e);for(var n=0,o=0;o<4;o++){var i=r[(this.shift+o)%4];this.compact?(n<<=7,n+=i>>1&127):(n<<=10,n+=(i>>2&992)+(i>>1&31))}var a=this.getCorrectedParameterData(n,this.compact);this.compact?(this.nbLayers=1+(a>>6),this.nbDataBlocks=1+(63&a)):(this.nbLayers=1+(a>>11),this.nbDataBlocks=1+(2047&a))},t.prototype.getRotation=function(t,e){var r=0;t.forEach((function(t,n,o){r=(r<<3)+((t>>e-2<<1)+(1&t))})),r=((1&r)<<11)+(r>>1);for(var n=0;n<4;n++)if(Pa.bitCount(r^this.EXPECTED_CORNER_BITS[n])<=2)return n;throw new $a},t.prototype.getCorrectedParameterData=function(t,e){var r,n;e?(r=7,n=2):(r=10,n=4);for(var o=r-n,i=new Int32Array(r),a=r-1;a>=0;--a)i[a]=15&t,t>>=4;try{new Ds(As.AZTEC_PARAM).decode(i,o)}catch(t){throw new $a}var s=0;for(a=0;a<n;a++)s=(s<<4)+i[a];return s},t.prototype.getBullsEyeCorners=function(t){var e=t,r=t,n=t,o=t,i=!0;for(this.nbCenterLayers=1;this.nbCenterLayers<9;this.nbCenterLayers++){var a=this.getFirstDifferent(e,i,1,-1),s=this.getFirstDifferent(r,i,1,1),u=this.getFirstDifferent(n,i,-1,1),c=this.getFirstDifferent(o,i,-1,-1);if(this.nbCenterLayers>2){var l=this.distancePoint(c,a)*this.nbCenterLayers/(this.distancePoint(o,e)*(this.nbCenterLayers+2));if(l<.75||l>1.25||!this.isWhiteOrBlackRectangle(a,s,u,c))break}e=a,r=s,n=u,o=c,i=!i}if(5!==this.nbCenterLayers&&7!==this.nbCenterLayers)throw new $a;this.compact=5===this.nbCenterLayers;var d=new Ns(e.getX()+.5,e.getY()-.5),h=new Ns(r.getX()+.5,r.getY()+.5),f=new Ns(n.getX()-.5,n.getY()+.5),p=new Ns(o.getX()-.5,o.getY()-.5);return this.expandSquare([d,h,f,p],2*this.nbCenterLayers-3,2*this.nbCenterLayers)},t.prototype.getMatrixCenter=function(){var t,e,r,n;try{t=(u=new Bs(this.image).detect())[0],e=u[1],r=u[2],n=u[3]}catch(a){var o=this.image.getWidth()/2,i=this.image.getHeight()/2;t=this.getFirstDifferent(new Hs(o+7,i-7),!1,1,-1).toResultPoint(),e=this.getFirstDifferent(new Hs(o+7,i+7),!1,1,1).toResultPoint(),r=this.getFirstDifferent(new Hs(o-7,i+7),!1,-1,1).toResultPoint(),n=this.getFirstDifferent(new Hs(o-7,i-7),!1,-1,-1).toResultPoint()}var a=Rs.round((t.getX()+n.getX()+e.getX()+r.getX())/4),s=Rs.round((t.getY()+n.getY()+e.getY()+r.getY())/4);try{var u;t=(u=new Bs(this.image,15,a,s).detect())[0],e=u[1],r=u[2],n=u[3]}catch(o){t=this.getFirstDifferent(new Hs(a+7,s-7),!1,1,-1).toResultPoint(),e=this.getFirstDifferent(new Hs(a+7,s+7),!1,1,1).toResultPoint(),r=this.getFirstDifferent(new Hs(a-7,s+7),!1,-1,1).toResultPoint(),n=this.getFirstDifferent(new Hs(a-7,s-7),!1,-1,-1).toResultPoint()}return a=Rs.round((t.getX()+n.getX()+e.getX()+r.getX())/4),s=Rs.round((t.getY()+n.getY()+e.getY()+r.getY())/4),new Hs(a,s)},t.prototype.getMatrixCornerPoints=function(t){return this.expandSquare(t,2*this.nbCenterLayers,this.getDimension())},t.prototype.sampleGrid=function(t,e,r,n,o){var i=Vs.getInstance(),a=this.getDimension(),s=a/2-this.nbCenterLayers,u=a/2+this.nbCenterLayers;return i.sampleGrid(t,a,a,s,s,u,s,u,u,s,u,e.getX(),e.getY(),r.getX(),r.getY(),n.getX(),n.getY(),o.getX(),o.getY())},t.prototype.sampleLine=function(t,e,r){for(var n=0,o=this.distanceResultPoint(t,e),i=o/r,a=t.getX(),s=t.getY(),u=i*(e.getX()-t.getX())/o,c=i*(e.getY()-t.getY())/o,l=0;l<r;l++)this.image.get(Rs.round(a+l*u),Rs.round(s+l*c))&&(n|=1<<r-l-1);return n},t.prototype.isWhiteOrBlackRectangle=function(t,e,r,n){t=new Hs(t.getX()-3,t.getY()+3),e=new Hs(e.getX()-3,e.getY()-3),r=new Hs(r.getX()+3,r.getY()-3),n=new Hs(n.getX()+3,n.getY()+3);var o=this.getColor(n,t);if(0===o)return!1;var i=this.getColor(t,e);return i===o&&((i=this.getColor(e,r))===o&&(i=this.getColor(r,n))===o)},t.prototype.getColor=function(t,e){for(var r=this.distancePoint(t,e),n=(e.getX()-t.getX())/r,o=(e.getY()-t.getY())/r,i=0,a=t.getX(),s=t.getY(),u=this.image.get(t.getX(),t.getY()),c=Math.ceil(r),l=0;l<c;l++)a+=n,s+=o,this.image.get(Rs.round(a),Rs.round(s))!==u&&i++;var d=i/r;return d>.1&&d<.9?0:d<=.1===u?1:-1},t.prototype.getFirstDifferent=function(t,e,r,n){for(var o=t.getX()+r,i=t.getY()+n;this.isValid(o,i)&&this.image.get(o,i)===e;)o+=r,i+=n;for(o-=r,i-=n;this.isValid(o,i)&&this.image.get(o,i)===e;)o+=r;for(o-=r;this.isValid(o,i)&&this.image.get(o,i)===e;)i+=n;return new Hs(o,i-=n)},t.prototype.expandSquare=function(t,e,r){var n=r/(2*e),o=t[0].getX()-t[2].getX(),i=t[0].getY()-t[2].getY(),a=(t[0].getX()+t[2].getX())/2,s=(t[0].getY()+t[2].getY())/2,u=new Ns(a+n*o,s+n*i),c=new Ns(a-n*o,s-n*i);return o=t[1].getX()-t[3].getX(),i=t[1].getY()-t[3].getY(),a=(t[1].getX()+t[3].getX())/2,s=(t[1].getY()+t[3].getY())/2,[u,new Ns(a+n*o,s+n*i),c,new Ns(a-n*o,s-n*i)]},t.prototype.isValid=function(t,e){return t>=0&&t<this.image.getWidth()&&e>0&&e<this.image.getHeight()},t.prototype.isValidPoint=function(t){var e=Rs.round(t.getX()),r=Rs.round(t.getY());return this.isValid(e,r)},t.prototype.distancePoint=function(t,e){return Rs.distance(t.getX(),t.getY(),e.getX(),e.getY())},t.prototype.distanceResultPoint=function(t,e){return Rs.distance(t.getX(),t.getY(),e.getX(),e.getY())},t.prototype.getDimension=function(){return this.compact?4*this.nbLayers+11:this.nbLayers<=4?4*this.nbLayers+15:4*this.nbLayers+2*(Pa.truncDivision(this.nbLayers-4,8)+1)+15},t}(),Gs=function(){function t(){}return t.prototype.decode=function(t,e){void 0===e&&(e=null);var r=null,n=new js(t.getBlackMatrix()),o=null,i=null;try{o=(a=n.detectMirror(!1)).getPoints(),this.reportFoundResultPoints(e,o),i=(new Os).decode(a)}catch(t){r=t}if(null==i)try{var a;o=(a=n.detectMirror(!0)).getPoints(),this.reportFoundResultPoints(e,o),i=(new Os).decode(a)}catch(t){if(null!=r)throw r;throw t}var s=new hs(i.getText(),i.getRawBytes(),i.getNumBits(),o,ps.AZTEC,Da.currentTimeMillis()),u=i.getByteSegments();null!=u&&s.putMetadata(ms.BYTE_SEGMENTS,u);var c=i.getECLevel();return null!=c&&s.putMetadata(ms.ERROR_CORRECTION_LEVEL,c),s},t.prototype.reportFoundResultPoints=function(t,e){if(null!=t){var r=t.get(La.NEED_RESULT_POINT_CALLBACK);null!=r&&e.forEach((function(t,e,n){r.foundPossibleResultPoint(t)}))}},t.prototype.reset=function(){},t}(),Ws=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){function e(e){return void 0===e&&(e=500),t.call(this,new Gs,e)||this}Ws(e,t)}(ds);var Xs=function(){function t(){}return t.prototype.decode=function(t,e){try{return this.doDecode(t,e)}catch(c){if(e&&!0===e.get(La.TRY_HARDER)&&t.isRotateSupported()){var r=t.rotateCounterClockwise(),n=this.doDecode(r,e),o=n.getResultMetadata(),i=270;null!==o&&!0===o.get(ms.ORIENTATION)&&(i+=o.get(ms.ORIENTATION)%360),n.putMetadata(ms.ORIENTATION,i);var a=n.getResultPoints();if(null!==a)for(var s=r.getHeight(),u=0;u<a.length;u++)a[u]=new Ns(s-a[u].getY()-1,a[u].getX());return n}throw new $a}},t.prototype.reset=function(){},t.prototype.doDecode=function(t,e){var r,n=t.getWidth(),o=t.getHeight(),i=new Ba(n),a=e&&!0===e.get(La.TRY_HARDER),s=Math.max(1,o>>(a?8:5));r=a?o:15;for(var u=Math.trunc(o/2),c=0;c<r;c++){var l=Math.trunc((c+1)/2),d=u+s*(!(1&c)?l:-l);if(d<0||d>=o)break;try{i=t.getBlackRow(d,i)}catch(t){continue}for(var h=function(t){if(1===t&&(i.reverse(),e&&!0===e.get(La.NEED_RESULT_POINT_CALLBACK))){var r=new Map;e.forEach((function(t,e){return r.set(e,t)})),r.delete(La.NEED_RESULT_POINT_CALLBACK),e=r}try{var o=f.decodeRow(d,i,e);if(1===t){o.putMetadata(ms.ORIENTATION,180);var a=o.getResultPoints();null!==a&&(a[0]=new Ns(n-a[0].getX()-1,a[0].getY()),a[1]=new Ns(n-a[1].getX()-1,a[1].getY()))}return{value:o}}catch(t){}},f=this,p=0;p<2;p++){var g=h(p);if("object"==typeof g)return g.value}}throw new $a},t.recordPattern=function(t,e,r){for(var n=r.length,o=0;o<n;o++)r[o]=0;var i=t.getSize();if(e>=i)throw new $a;for(var a=!t.get(e),s=0,u=e;u<i;){if(t.get(u)!==a)r[s]++;else{if(++s===n)break;r[s]=1,a=!a}u++}if(s!==n&&(s!==n-1||u!==i))throw new $a},t.recordPatternInReverse=function(e,r,n){for(var o=n.length,i=e.get(r);r>0&&o>=0;)e.get(--r)!==i&&(o--,i=!i);if(o>=0)throw new $a;t.recordPattern(e,r+1,n)},t.patternMatchVariance=function(t,e,r){for(var n=t.length,o=0,i=0,a=0;a<n;a++)o+=t[a],i+=e[a];if(o<i)return Number.POSITIVE_INFINITY;var s=o/i;r*=s;for(var u=0,c=0;c<n;c++){var l=t[c],d=e[c]*s,h=l>d?l-d:d-l;if(h>r)return Number.POSITIVE_INFINITY;u+=h}return u/o},t}(),Ys=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Zs=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Ys(e,t),e.findStartPattern=function(t){for(var r=t.getSize(),n=t.getNextSet(0),o=0,i=Int32Array.from([0,0,0,0,0,0]),a=n,s=!1,u=n;u<r;u++)if(t.get(u)!==s)i[o]++;else{if(5===o){for(var c=e.MAX_AVG_VARIANCE,l=-1,d=e.CODE_START_A;d<=e.CODE_START_C;d++){var h=Xs.patternMatchVariance(i,e.CODE_PATTERNS[d],e.MAX_INDIVIDUAL_VARIANCE);h<c&&(c=h,l=d)}if(l>=0&&t.isRange(Math.max(0,a-(u-a)/2),a,!1))return Int32Array.from([a,u,l]);a+=i[0]+i[1],(i=i.slice(2,i.length))[o-1]=0,i[o]=0,o--}else o++;i[o]=1,s=!s}throw new $a},e.decodeCode=function(t,r,n){Xs.recordPattern(t,n,r);for(var o=e.MAX_AVG_VARIANCE,i=-1,a=0;a<e.CODE_PATTERNS.length;a++){var s=e.CODE_PATTERNS[a],u=this.patternMatchVariance(r,s,e.MAX_INDIVIDUAL_VARIANCE);u<o&&(o=u,i=a)}if(i>=0)return i;throw new $a},e.prototype.decodeRow=function(t,r,n){var o,i=n&&!0===n.get(La.ASSUME_GS1),a=e.findStartPattern(r),s=a[2],u=0,c=new Uint8Array(20);switch(c[u++]=s,s){case e.CODE_START_A:o=e.CODE_CODE_A;break;case e.CODE_START_B:o=e.CODE_CODE_B;break;case e.CODE_START_C:o=e.CODE_CODE_C;break;default:throw new Ua}for(var l=!1,d=!1,h="",f=a[0],p=a[1],g=Int32Array.from([0,0,0,0,0,0]),m=0,y=0,w=s,_=0,v=!0,E=!1,b=!1;!l;){var A=d;switch(d=!1,m=y,y=e.decodeCode(r,g,p),c[u++]=y,y!==e.CODE_STOP&&(v=!0),y!==e.CODE_STOP&&(w+=++_*y),f=p,p+=g.reduce((function(t,e){return t+e}),0),y){case e.CODE_START_A:case e.CODE_START_B:case e.CODE_START_C:throw new Ua}switch(o){case e.CODE_CODE_A:if(y<64)h+=b===E?String.fromCharCode(" ".charCodeAt(0)+y):String.fromCharCode(" ".charCodeAt(0)+y+128),b=!1;else if(y<96)h+=b===E?String.fromCharCode(y-64):String.fromCharCode(y+64),b=!1;else switch(y!==e.CODE_STOP&&(v=!1),y){case e.CODE_FNC_1:i&&(0===h.length?h+="]C1":h+=String.fromCharCode(29));break;case e.CODE_FNC_2:case e.CODE_FNC_3:break;case e.CODE_FNC_4_A:!E&&b?(E=!0,b=!1):E&&b?(E=!1,b=!1):b=!0;break;case e.CODE_SHIFT:d=!0,o=e.CODE_CODE_B;break;case e.CODE_CODE_B:o=e.CODE_CODE_B;break;case e.CODE_CODE_C:o=e.CODE_CODE_C;break;case e.CODE_STOP:l=!0}break;case e.CODE_CODE_B:if(y<96)h+=b===E?String.fromCharCode(" ".charCodeAt(0)+y):String.fromCharCode(" ".charCodeAt(0)+y+128),b=!1;else switch(y!==e.CODE_STOP&&(v=!1),y){case e.CODE_FNC_1:i&&(0===h.length?h+="]C1":h+=String.fromCharCode(29));break;case e.CODE_FNC_2:case e.CODE_FNC_3:break;case e.CODE_FNC_4_B:!E&&b?(E=!0,b=!1):E&&b?(E=!1,b=!1):b=!0;break;case e.CODE_SHIFT:d=!0,o=e.CODE_CODE_A;break;case e.CODE_CODE_A:o=e.CODE_CODE_A;break;case e.CODE_CODE_C:o=e.CODE_CODE_C;break;case e.CODE_STOP:l=!0}break;case e.CODE_CODE_C:if(y<100)y<10&&(h+="0"),h+=y;else switch(y!==e.CODE_STOP&&(v=!1),y){case e.CODE_FNC_1:i&&(0===h.length?h+="]C1":h+=String.fromCharCode(29));break;case e.CODE_CODE_A:o=e.CODE_CODE_A;break;case e.CODE_CODE_B:o=e.CODE_CODE_B;break;case e.CODE_STOP:l=!0}}A&&(o=o===e.CODE_CODE_A?e.CODE_CODE_B:e.CODE_CODE_A)}var C=p-f;if(p=r.getNextUnset(p),!r.isRange(p,Math.min(r.getSize(),p+(p-f)/2),!1))throw new $a;if((w-=_*m)%103!==m)throw new Sa;var I=h.length;if(0===I)throw new $a;I>0&&v&&(h=o===e.CODE_CODE_C?h.substring(0,I-2):h.substring(0,I-1));for(var S=(a[1]+a[0])/2,T=f+C/2,D=c.length,O=new Uint8Array(D),R=0;R<D;R++)O[R]=c[R];var M=[new Ns(S,t),new Ns(T,t)];return new hs(h,O,0,M,ps.CODE_128,(new Date).getTime())},e.CODE_PATTERNS=[Int32Array.from([2,1,2,2,2,2]),Int32Array.from([2,2,2,1,2,2]),Int32Array.from([2,2,2,2,2,1]),Int32Array.from([1,2,1,2,2,3]),Int32Array.from([1,2,1,3,2,2]),Int32Array.from([1,3,1,2,2,2]),Int32Array.from([1,2,2,2,1,3]),Int32Array.from([1,2,2,3,1,2]),Int32Array.from([1,3,2,2,1,2]),Int32Array.from([2,2,1,2,1,3]),Int32Array.from([2,2,1,3,1,2]),Int32Array.from([2,3,1,2,1,2]),Int32Array.from([1,1,2,2,3,2]),Int32Array.from([1,2,2,1,3,2]),Int32Array.from([1,2,2,2,3,1]),Int32Array.from([1,1,3,2,2,2]),Int32Array.from([1,2,3,1,2,2]),Int32Array.from([1,2,3,2,2,1]),Int32Array.from([2,2,3,2,1,1]),Int32Array.from([2,2,1,1,3,2]),Int32Array.from([2,2,1,2,3,1]),Int32Array.from([2,1,3,2,1,2]),Int32Array.from([2,2,3,1,1,2]),Int32Array.from([3,1,2,1,3,1]),Int32Array.from([3,1,1,2,2,2]),Int32Array.from([3,2,1,1,2,2]),Int32Array.from([3,2,1,2,2,1]),Int32Array.from([3,1,2,2,1,2]),Int32Array.from([3,2,2,1,1,2]),Int32Array.from([3,2,2,2,1,1]),Int32Array.from([2,1,2,1,2,3]),Int32Array.from([2,1,2,3,2,1]),Int32Array.from([2,3,2,1,2,1]),Int32Array.from([1,1,1,3,2,3]),Int32Array.from([1,3,1,1,2,3]),Int32Array.from([1,3,1,3,2,1]),Int32Array.from([1,1,2,3,1,3]),Int32Array.from([1,3,2,1,1,3]),Int32Array.from([1,3,2,3,1,1]),Int32Array.from([2,1,1,3,1,3]),Int32Array.from([2,3,1,1,1,3]),Int32Array.from([2,3,1,3,1,1]),Int32Array.from([1,1,2,1,3,3]),Int32Array.from([1,1,2,3,3,1]),Int32Array.from([1,3,2,1,3,1]),Int32Array.from([1,1,3,1,2,3]),Int32Array.from([1,1,3,3,2,1]),Int32Array.from([1,3,3,1,2,1]),Int32Array.from([3,1,3,1,2,1]),Int32Array.from([2,1,1,3,3,1]),Int32Array.from([2,3,1,1,3,1]),Int32Array.from([2,1,3,1,1,3]),Int32Array.from([2,1,3,3,1,1]),Int32Array.from([2,1,3,1,3,1]),Int32Array.from([3,1,1,1,2,3]),Int32Array.from([3,1,1,3,2,1]),Int32Array.from([3,3,1,1,2,1]),Int32Array.from([3,1,2,1,1,3]),Int32Array.from([3,1,2,3,1,1]),Int32Array.from([3,3,2,1,1,1]),Int32Array.from([3,1,4,1,1,1]),Int32Array.from([2,2,1,4,1,1]),Int32Array.from([4,3,1,1,1,1]),Int32Array.from([1,1,1,2,2,4]),Int32Array.from([1,1,1,4,2,2]),Int32Array.from([1,2,1,1,2,4]),Int32Array.from([1,2,1,4,2,1]),Int32Array.from([1,4,1,1,2,2]),Int32Array.from([1,4,1,2,2,1]),Int32Array.from([1,1,2,2,1,4]),Int32Array.from([1,1,2,4,1,2]),Int32Array.from([1,2,2,1,1,4]),Int32Array.from([1,2,2,4,1,1]),Int32Array.from([1,4,2,1,1,2]),Int32Array.from([1,4,2,2,1,1]),Int32Array.from([2,4,1,2,1,1]),Int32Array.from([2,2,1,1,1,4]),Int32Array.from([4,1,3,1,1,1]),Int32Array.from([2,4,1,1,1,2]),Int32Array.from([1,3,4,1,1,1]),Int32Array.from([1,1,1,2,4,2]),Int32Array.from([1,2,1,1,4,2]),Int32Array.from([1,2,1,2,4,1]),Int32Array.from([1,1,4,2,1,2]),Int32Array.from([1,2,4,1,1,2]),Int32Array.from([1,2,4,2,1,1]),Int32Array.from([4,1,1,2,1,2]),Int32Array.from([4,2,1,1,1,2]),Int32Array.from([4,2,1,2,1,1]),Int32Array.from([2,1,2,1,4,1]),Int32Array.from([2,1,4,1,2,1]),Int32Array.from([4,1,2,1,2,1]),Int32Array.from([1,1,1,1,4,3]),Int32Array.from([1,1,1,3,4,1]),Int32Array.from([1,3,1,1,4,1]),Int32Array.from([1,1,4,1,1,3]),Int32Array.from([1,1,4,3,1,1]),Int32Array.from([4,1,1,1,1,3]),Int32Array.from([4,1,1,3,1,1]),Int32Array.from([1,1,3,1,4,1]),Int32Array.from([1,1,4,1,3,1]),Int32Array.from([3,1,1,1,4,1]),Int32Array.from([4,1,1,1,3,1]),Int32Array.from([2,1,1,4,1,2]),Int32Array.from([2,1,1,2,1,4]),Int32Array.from([2,1,1,2,3,2]),Int32Array.from([2,3,3,1,1,1,2])],e.MAX_AVG_VARIANCE=.25,e.MAX_INDIVIDUAL_VARIANCE=.7,e.CODE_SHIFT=98,e.CODE_CODE_C=99,e.CODE_CODE_B=100,e.CODE_CODE_A=101,e.CODE_FNC_1=102,e.CODE_FNC_2=97,e.CODE_FNC_3=96,e.CODE_FNC_4_A=101,e.CODE_FNC_4_B=100,e.CODE_START_A=103,e.CODE_START_B=104,e.CODE_START_C=105,e.CODE_STOP=106,e}(Xs),qs=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ks=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},$s=function(t){function e(e,r){void 0===e&&(e=!1),void 0===r&&(r=!1);var n=t.call(this)||this;return n.usingCheckDigit=e,n.extendedMode=r,n.decodeRowResult="",n.counters=new Int32Array(9),n}return qs(e,t),e.prototype.decodeRow=function(t,r,n){var o,i,a,s,u=this.counters;u.fill(0),this.decodeRowResult="";var c,l,d=e.findAsteriskPattern(r,u),h=r.getNextSet(d[1]),f=r.getSize();do{e.recordPattern(r,h,u);var p=e.toNarrowWidePattern(u);if(p<0)throw new $a;c=e.patternToChar(p),this.decodeRowResult+=c,l=h;try{for(var g=(o=void 0,Ks(u)),m=g.next();!m.done;m=g.next()){h+=m.value}}catch(t){o={error:t}}finally{try{m&&!m.done&&(i=g.return)&&i.call(g)}finally{if(o)throw o.error}}h=r.getNextSet(h)}while("*"!==c);this.decodeRowResult=this.decodeRowResult.substring(0,this.decodeRowResult.length-1);var y,w=0;try{for(var _=Ks(u),v=_.next();!v.done;v=_.next()){w+=v.value}}catch(t){a={error:t}}finally{try{v&&!v.done&&(s=_.return)&&s.call(_)}finally{if(a)throw a.error}}if(h!==f&&2*(h-l-w)<w)throw new $a;if(this.usingCheckDigit){for(var E=this.decodeRowResult.length-1,b=0,A=0;A<E;A++)b+=e.ALPHABET_STRING.indexOf(this.decodeRowResult.charAt(A));if(this.decodeRowResult.charAt(E)!==e.ALPHABET_STRING.charAt(b%43))throw new Sa;this.decodeRowResult=this.decodeRowResult.substring(0,E)}if(0===this.decodeRowResult.length)throw new $a;y=this.extendedMode?e.decodeExtended(this.decodeRowResult):this.decodeRowResult;var C=(d[1]+d[0])/2,I=l+w/2;return new hs(y,null,0,[new Ns(C,t),new Ns(I,t)],ps.CODE_39,(new Date).getTime())},e.findAsteriskPattern=function(t,r){for(var n=t.getSize(),o=t.getNextSet(0),i=0,a=o,s=!1,u=r.length,c=o;c<n;c++)if(t.get(c)!==s)r[i]++;else{if(i===u-1){if(this.toNarrowWidePattern(r)===e.ASTERISK_ENCODING&&t.isRange(Math.max(0,a-Math.floor((c-a)/2)),a,!1))return[a,c];a+=r[0]+r[1],r.copyWithin(0,2,2+i-1),r[i-1]=0,r[i]=0,i--}else i++;r[i]=1,s=!s}throw new $a},e.toNarrowWidePattern=function(t){var e,r,n,o=t.length,i=0;do{var a=2147483647;try{for(var s=(e=void 0,Ks(t)),u=s.next();!u.done;u=s.next()){(h=u.value)<a&&h>i&&(a=h)}}catch(t){e={error:t}}finally{try{u&&!u.done&&(r=s.return)&&r.call(s)}finally{if(e)throw e.error}}i=a,n=0;for(var c=0,l=0,d=0;d<o;d++){(h=t[d])>i&&(l|=1<<o-1-d,n++,c+=h)}if(3===n){for(d=0;d<o&&n>0;d++){var h;if((h=t[d])>i&&(n--,2*h>=c))return-1}return l}}while(n>3);return-1},e.patternToChar=function(t){for(var r=0;r<e.CHARACTER_ENCODINGS.length;r++)if(e.CHARACTER_ENCODINGS[r]===t)return e.ALPHABET_STRING.charAt(r);if(t===e.ASTERISK_ENCODING)return"*";throw new $a},e.decodeExtended=function(t){for(var e=t.length,r="",n=0;n<e;n++){var o=t.charAt(n);if("+"===o||"$"===o||"%"===o||"/"===o){var i=t.charAt(n+1),a="\0";switch(o){case"+":if(!(i>="A"&&i<="Z"))throw new Ua;a=String.fromCharCode(i.charCodeAt(0)+32);break;case"$":if(!(i>="A"&&i<="Z"))throw new Ua;a=String.fromCharCode(i.charCodeAt(0)-64);break;case"%":if(i>="A"&&i<="E")a=String.fromCharCode(i.charCodeAt(0)-38);else if(i>="F"&&i<="J")a=String.fromCharCode(i.charCodeAt(0)-11);else if(i>="K"&&i<="O")a=String.fromCharCode(i.charCodeAt(0)+16);else if(i>="P"&&i<="T")a=String.fromCharCode(i.charCodeAt(0)+43);else if("U"===i)a="\0";else if("V"===i)a="@";else if("W"===i)a="`";else{if("X"!==i&&"Y"!==i&&"Z"!==i)throw new Ua;a=""}break;case"/":if(i>="A"&&i<="O")a=String.fromCharCode(i.charCodeAt(0)-32);else{if("Z"!==i)throw new Ua;a=":"}}r+=a,n++}else r+=o}return r},e.ALPHABET_STRING="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%",e.CHARACTER_ENCODINGS=[52,289,97,352,49,304,112,37,292,100,265,73,328,25,280,88,13,268,76,28,259,67,322,19,274,82,7,262,70,22,385,193,448,145,400,208,133,388,196,168,162,138,42],e.ASTERISK_ENCODING=148,e}(Xs),Js=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Qs=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},tu=function(t){function e(){var e=t.call(this)||this;return e.decodeRowResult="",e.counters=new Int32Array(6),e}return Js(e,t),e.prototype.decodeRow=function(t,r,n){var o,i,a,s,u,c,l=this.findAsteriskPattern(r),d=r.getNextSet(l[1]),h=r.getSize(),f=this.counters;f.fill(0),this.decodeRowResult="";do{e.recordPattern(r,d,f);var p=this.toPattern(f);if(p<0)throw new $a;u=this.patternToChar(p),this.decodeRowResult+=u,c=d;try{for(var g=(o=void 0,Qs(f)),m=g.next();!m.done;m=g.next()){d+=m.value}}catch(t){o={error:t}}finally{try{m&&!m.done&&(i=g.return)&&i.call(g)}finally{if(o)throw o.error}}d=r.getNextSet(d)}while("*"!==u);this.decodeRowResult=this.decodeRowResult.substring(0,this.decodeRowResult.length-1);var y=0;try{for(var w=Qs(f),_=w.next();!_.done;_=w.next()){y+=_.value}}catch(t){a={error:t}}finally{try{_&&!_.done&&(s=w.return)&&s.call(w)}finally{if(a)throw a.error}}if(d===h||!r.get(d))throw new $a;if(this.decodeRowResult.length<2)throw new $a;this.checkChecksums(this.decodeRowResult),this.decodeRowResult=this.decodeRowResult.substring(0,this.decodeRowResult.length-2);var v=this.decodeExtended(this.decodeRowResult),E=(l[1]+l[0])/2,b=c+y/2;return new hs(v,null,0,[new Ns(E,t),new Ns(b,t)],ps.CODE_93,(new Date).getTime())},e.prototype.findAsteriskPattern=function(t){var r=t.getSize(),n=t.getNextSet(0);this.counters.fill(0);for(var o=this.counters,i=n,a=!1,s=o.length,u=0,c=n;c<r;c++)if(t.get(c)!==a)o[u]++;else{if(u===s-1){if(this.toPattern(o)===e.ASTERISK_ENCODING)return new Int32Array([i,c]);i+=o[0]+o[1],o.copyWithin(0,2,2+u-1),o[u-1]=0,o[u]=0,u--}else u++;o[u]=1,a=!a}throw new $a},e.prototype.toPattern=function(t){var e,r,n=0;try{for(var o=Qs(t),i=o.next();!i.done;i=o.next()){n+=i.value}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}for(var a=0,s=t.length,u=0;u<s;u++){var c=Math.round(9*t[u]/n);if(c<1||c>4)return-1;if(1&u)a<<=c;else for(var l=0;l<c;l++)a=a<<1|1}return a},e.prototype.patternToChar=function(t){for(var r=0;r<e.CHARACTER_ENCODINGS.length;r++)if(e.CHARACTER_ENCODINGS[r]===t)return e.ALPHABET_STRING.charAt(r);throw new $a},e.prototype.decodeExtended=function(t){for(var e=t.length,r="",n=0;n<e;n++){var o=t.charAt(n);if(o>="a"&&o<="d"){if(n>=e-1)throw new Ua;var i=t.charAt(n+1),a="\0";switch(o){case"d":if(!(i>="A"&&i<="Z"))throw new Ua;a=String.fromCharCode(i.charCodeAt(0)+32);break;case"a":if(!(i>="A"&&i<="Z"))throw new Ua;a=String.fromCharCode(i.charCodeAt(0)-64);break;case"b":if(i>="A"&&i<="E")a=String.fromCharCode(i.charCodeAt(0)-38);else if(i>="F"&&i<="J")a=String.fromCharCode(i.charCodeAt(0)-11);else if(i>="K"&&i<="O")a=String.fromCharCode(i.charCodeAt(0)+16);else if(i>="P"&&i<="T")a=String.fromCharCode(i.charCodeAt(0)+43);else if("U"===i)a="\0";else if("V"===i)a="@";else if("W"===i)a="`";else{if(!(i>="X"&&i<="Z"))throw new Ua;a=String.fromCharCode(127)}break;case"c":if(i>="A"&&i<="O")a=String.fromCharCode(i.charCodeAt(0)-32);else{if("Z"!==i)throw new Ua;a=":"}}r+=a,n++}else r+=o}return r},e.prototype.checkChecksums=function(t){var e=t.length;this.checkOneChecksum(t,e-2,20),this.checkOneChecksum(t,e-1,15)},e.prototype.checkOneChecksum=function(t,r,n){for(var o=1,i=0,a=r-1;a>=0;a--)i+=o*e.ALPHABET_STRING.indexOf(t.charAt(a)),++o>n&&(o=1);if(t.charAt(r)!==e.ALPHABET_STRING[i%47])throw new Sa},e.ALPHABET_STRING="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%abcd*",e.CHARACTER_ENCODINGS=[276,328,324,322,296,292,290,336,274,266,424,420,418,404,402,394,360,356,354,308,282,344,332,326,300,278,436,434,428,422,406,410,364,358,310,314,302,468,466,458,366,374,430,294,474,470,306,350],e.ASTERISK_ENCODING=e.CHARACTER_ENCODINGS[47],e}(Xs),eu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),ru=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},nu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.narrowLineWidth=-1,e}return eu(e,t),e.prototype.decodeRow=function(t,r,n){var o,i,a=this.decodeStart(r),s=this.decodeEnd(r),u=new Za;e.decodeMiddle(r,a[1],s[0],u);var c=u.toString(),l=null;null!=n&&(l=n.get(La.ALLOWED_LENGTHS)),null==l&&(l=e.DEFAULT_ALLOWED_LENGTHS);var d=c.length,h=!1,f=0;try{for(var p=ru(l),g=p.next();!g.done;g=p.next()){var m=g.value;if(d===m){h=!0;break}m>f&&(f=m)}}catch(t){o={error:t}}finally{try{g&&!g.done&&(i=p.return)&&i.call(p)}finally{if(o)throw o.error}}if(!h&&d>f&&(h=!0),!h)throw new Ua;var y=[new Ns(a[1],t),new Ns(s[0],t)];return new hs(c,null,0,y,ps.ITF,(new Date).getTime())},e.decodeMiddle=function(t,r,n,o){var i=new Int32Array(10),a=new Int32Array(5),s=new Int32Array(5);for(i.fill(0),a.fill(0),s.fill(0);r<n;){Xs.recordPattern(t,r,i);for(var u=0;u<5;u++){var c=2*u;a[u]=i[c],s[u]=i[c+1]}var l=e.decodeDigit(a);o.append(l.toString()),l=this.decodeDigit(s),o.append(l.toString()),i.forEach((function(t){r+=t}))}},e.prototype.decodeStart=function(t){var r=e.skipWhiteSpace(t),n=e.findGuardPattern(t,r,e.START_PATTERN);return this.narrowLineWidth=(n[1]-n[0])/4,this.validateQuietZone(t,n[0]),n},e.prototype.validateQuietZone=function(t,e){var r=10*this.narrowLineWidth;r=r<e?r:e;for(var n=e-1;r>0&&n>=0&&!t.get(n);n--)r--;if(0!==r)throw new $a},e.skipWhiteSpace=function(t){var e=t.getSize(),r=t.getNextSet(0);if(r===e)throw new $a;return r},e.prototype.decodeEnd=function(t){t.reverse();try{var r=e.skipWhiteSpace(t),n=void 0;try{n=e.findGuardPattern(t,r,e.END_PATTERN_REVERSED[0])}catch(o){o instanceof $a&&(n=e.findGuardPattern(t,r,e.END_PATTERN_REVERSED[1]))}this.validateQuietZone(t,n[0]);var o=n[0];return n[0]=t.getSize()-n[1],n[1]=t.getSize()-o,n}finally{t.reverse()}},e.findGuardPattern=function(t,r,n){var o=n.length,i=new Int32Array(o),a=t.getSize(),s=!1,u=0,c=r;i.fill(0);for(var l=r;l<a;l++)if(t.get(l)!==s)i[u]++;else{if(u===o-1){if(Xs.patternMatchVariance(i,n,e.MAX_INDIVIDUAL_VARIANCE)<e.MAX_AVG_VARIANCE)return[c,l];c+=i[0]+i[1],Da.arraycopy(i,2,i,0,u-1),i[u-1]=0,i[u]=0,u--}else u++;i[u]=1,s=!s}throw new $a},e.decodeDigit=function(t){for(var r=e.MAX_AVG_VARIANCE,n=-1,o=e.PATTERNS.length,i=0;i<o;i++){var a=e.PATTERNS[i],s=Xs.patternMatchVariance(t,a,e.MAX_INDIVIDUAL_VARIANCE);s<r?(r=s,n=i):s===r&&(n=-1)}if(n>=0)return n%10;throw new $a},e.PATTERNS=[Int32Array.from([1,1,2,2,1]),Int32Array.from([2,1,1,1,2]),Int32Array.from([1,2,1,1,2]),Int32Array.from([2,2,1,1,1]),Int32Array.from([1,1,2,1,2]),Int32Array.from([2,1,2,1,1]),Int32Array.from([1,2,2,1,1]),Int32Array.from([1,1,1,2,2]),Int32Array.from([2,1,1,2,1]),Int32Array.from([1,2,1,2,1]),Int32Array.from([1,1,3,3,1]),Int32Array.from([3,1,1,1,3]),Int32Array.from([1,3,1,1,3]),Int32Array.from([3,3,1,1,1]),Int32Array.from([1,1,3,1,3]),Int32Array.from([3,1,3,1,1]),Int32Array.from([1,3,3,1,1]),Int32Array.from([1,1,1,3,3]),Int32Array.from([3,1,1,3,1]),Int32Array.from([1,3,1,3,1])],e.MAX_AVG_VARIANCE=.38,e.MAX_INDIVIDUAL_VARIANCE=.5,e.DEFAULT_ALLOWED_LENGTHS=[6,8,10,12,14],e.START_PATTERN=Int32Array.from([1,1,1,1]),e.END_PATTERN_REVERSED=[Int32Array.from([1,1,2]),Int32Array.from([1,1,3])],e}(Xs),ou=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),iu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.decodeRowStringBuffer="",e}return ou(e,t),e.findStartGuardPattern=function(t){for(var r,n=!1,o=0,i=Int32Array.from([0,0,0]);!n;){i=Int32Array.from([0,0,0]);var a=(r=e.findGuardPattern(t,o,!1,this.START_END_PATTERN,i))[0],s=a-((o=r[1])-a);s>=0&&(n=t.isRange(s,a,!1))}return r},e.checkChecksum=function(t){return e.checkStandardUPCEANChecksum(t)},e.checkStandardUPCEANChecksum=function(t){var r=t.length;if(0===r)return!1;var n=parseInt(t.charAt(r-1),10);return e.getStandardUPCEANChecksum(t.substring(0,r-1))===n},e.getStandardUPCEANChecksum=function(t){for(var e=t.length,r=0,n=e-1;n>=0;n-=2){if((o=t.charAt(n).charCodeAt(0)-"0".charCodeAt(0))<0||o>9)throw new Ua;r+=o}r*=3;for(n=e-2;n>=0;n-=2){var o;if((o=t.charAt(n).charCodeAt(0)-"0".charCodeAt(0))<0||o>9)throw new Ua;r+=o}return(1e3-r)%10},e.decodeEnd=function(t,r){return e.findGuardPattern(t,r,!1,e.START_END_PATTERN,new Int32Array(e.START_END_PATTERN.length).fill(0))},e.findGuardPatternWithoutCounters=function(t,e,r,n){return this.findGuardPattern(t,e,r,n,new Int32Array(n.length))},e.findGuardPattern=function(t,r,n,o,i){for(var a=t.getSize(),s=0,u=r=n?t.getNextUnset(r):t.getNextSet(r),c=o.length,l=n,d=r;d<a;d++)if(t.get(d)!==l)i[s]++;else{if(s===c-1){if(Xs.patternMatchVariance(i,o,e.MAX_INDIVIDUAL_VARIANCE)<e.MAX_AVG_VARIANCE)return Int32Array.from([u,d]);u+=i[0]+i[1];for(var h=i.slice(2,i.length),f=0;f<s-1;f++)i[f]=h[f];i[s-1]=0,i[s]=0,s--}else s++;i[s]=1,l=!l}throw new $a},e.decodeDigit=function(t,r,n,o){this.recordPattern(t,n,r);for(var i=this.MAX_AVG_VARIANCE,a=-1,s=o.length,u=0;u<s;u++){var c=o[u],l=Xs.patternMatchVariance(r,c,e.MAX_INDIVIDUAL_VARIANCE);l<i&&(i=l,a=u)}if(a>=0)return a;throw new $a},e.MAX_AVG_VARIANCE=.48,e.MAX_INDIVIDUAL_VARIANCE=.7,e.START_END_PATTERN=Int32Array.from([1,1,1]),e.MIDDLE_PATTERN=Int32Array.from([1,1,1,1,1]),e.END_PATTERN=Int32Array.from([1,1,1,1,1,1]),e.L_PATTERNS=[Int32Array.from([3,2,1,1]),Int32Array.from([2,2,2,1]),Int32Array.from([2,1,2,2]),Int32Array.from([1,4,1,1]),Int32Array.from([1,1,3,2]),Int32Array.from([1,2,3,1]),Int32Array.from([1,1,1,4]),Int32Array.from([1,3,1,2]),Int32Array.from([1,2,1,3]),Int32Array.from([3,1,1,2])],e}(Xs),au=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},su=function(){function t(){this.CHECK_DIGIT_ENCODINGS=[24,20,18,17,12,6,3,10,9,5],this.decodeMiddleCounters=Int32Array.from([0,0,0,0]),this.decodeRowStringBuffer=""}return t.prototype.decodeRow=function(e,r,n){var o=this.decodeRowStringBuffer,i=this.decodeMiddle(r,n,o),a=o.toString(),s=t.parseExtensionString(a),u=[new Ns((n[0]+n[1])/2,e),new Ns(i,e)],c=new hs(a,null,0,u,ps.UPC_EAN_EXTENSION,(new Date).getTime());return null!=s&&c.putAllMetadata(s),c},t.prototype.decodeMiddle=function(e,r,n){var o,i,a=this.decodeMiddleCounters;a[0]=0,a[1]=0,a[2]=0,a[3]=0;for(var s=e.getSize(),u=r[1],c=0,l=0;l<5&&u<s;l++){var d=iu.decodeDigit(e,a,u,iu.L_AND_G_PATTERNS);n+=String.fromCharCode("0".charCodeAt(0)+d%10);try{for(var h=(o=void 0,au(a)),f=h.next();!f.done;f=h.next()){u+=f.value}}catch(t){o={error:t}}finally{try{f&&!f.done&&(i=h.return)&&i.call(h)}finally{if(o)throw o.error}}d>=10&&(c|=1<<4-l),4!==l&&(u=e.getNextSet(u),u=e.getNextUnset(u))}if(5!==n.length)throw new $a;var p=this.determineCheckDigit(c);if(t.extensionChecksum(n.toString())!==p)throw new $a;return u},t.extensionChecksum=function(t){for(var e=t.length,r=0,n=e-2;n>=0;n-=2)r+=t.charAt(n).charCodeAt(0)-"0".charCodeAt(0);r*=3;for(n=e-1;n>=0;n-=2)r+=t.charAt(n).charCodeAt(0)-"0".charCodeAt(0);return(r*=3)%10},t.prototype.determineCheckDigit=function(t){for(var e=0;e<10;e++)if(t===this.CHECK_DIGIT_ENCODINGS[e])return e;throw new $a},t.parseExtensionString=function(e){if(5!==e.length)return null;var r=t.parseExtension5String(e);return null==r?null:new Map([[ms.SUGGESTED_PRICE,r]])},t.parseExtension5String=function(t){var e;switch(t.charAt(0)){case"0":e="£";break;case"5":e="$";break;case"9":switch(t){case"90000":return null;case"99991":return"0.00";case"99990":return"Used"}e="";break;default:e=""}var r=parseInt(t.substring(1)),n=r%100;return e+(r/100).toString()+"."+(n<10?"0"+n:n.toString())},t}(),uu=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},cu=function(){function t(){this.decodeMiddleCounters=Int32Array.from([0,0,0,0]),this.decodeRowStringBuffer=""}return t.prototype.decodeRow=function(e,r,n){var o=this.decodeRowStringBuffer,i=this.decodeMiddle(r,n,o),a=o.toString(),s=t.parseExtensionString(a),u=[new Ns((n[0]+n[1])/2,e),new Ns(i,e)],c=new hs(a,null,0,u,ps.UPC_EAN_EXTENSION,(new Date).getTime());return null!=s&&c.putAllMetadata(s),c},t.prototype.decodeMiddle=function(t,e,r){var n,o,i=this.decodeMiddleCounters;i[0]=0,i[1]=0,i[2]=0,i[3]=0;for(var a=t.getSize(),s=e[1],u=0,c=0;c<2&&s<a;c++){var l=iu.decodeDigit(t,i,s,iu.L_AND_G_PATTERNS);r+=String.fromCharCode("0".charCodeAt(0)+l%10);try{for(var d=(n=void 0,uu(i)),h=d.next();!h.done;h=d.next()){s+=h.value}}catch(t){n={error:t}}finally{try{h&&!h.done&&(o=d.return)&&o.call(d)}finally{if(n)throw n.error}}l>=10&&(u|=1<<1-c),1!==c&&(s=t.getNextSet(s),s=t.getNextUnset(s))}if(2!==r.length)throw new $a;if(parseInt(r.toString())%4!==u)throw new $a;return s},t.parseExtensionString=function(t){return 2!==t.length?null:new Map([[ms.ISSUE_NUMBER,parseInt(t)]])},t}(),lu=function(){function t(){}return t.decodeRow=function(t,e,r){var n=iu.findGuardPattern(e,r,!1,this.EXTENSION_START_PATTERN,new Int32Array(this.EXTENSION_START_PATTERN.length).fill(0));try{return(new su).decodeRow(t,e,n)}catch(r){return(new cu).decodeRow(t,e,n)}},t.EXTENSION_START_PATTERN=Int32Array.from([1,1,2]),t}(),du=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),hu=function(t){function e(){var r=t.call(this)||this;r.decodeRowStringBuffer="",e.L_AND_G_PATTERNS=e.L_PATTERNS.map((function(t){return Int32Array.from(t)}));for(var n=10;n<20;n++){for(var o=e.L_PATTERNS[n-10],i=new Int32Array(o.length),a=0;a<o.length;a++)i[a]=o[o.length-a-1];e.L_AND_G_PATTERNS[n]=i}return r}return du(e,t),e.prototype.decodeRow=function(t,r,n){var o=e.findStartGuardPattern(r),i=null==n?null:n.get(La.NEED_RESULT_POINT_CALLBACK);if(null!=i){var a=new Ns((o[0]+o[1])/2,t);i.foundPossibleResultPoint(a)}var s=this.decodeMiddle(r,o,this.decodeRowStringBuffer),u=s.rowOffset,c=s.resultString;if(null!=i){var l=new Ns(u,t);i.foundPossibleResultPoint(l)}var d=e.decodeEnd(r,u);if(null!=i){var h=new Ns((d[0]+d[1])/2,t);i.foundPossibleResultPoint(h)}var f=d[1],p=f+(f-d[0]);if(p>=r.getSize()||!r.isRange(f,p,!1))throw new $a;var g=c.toString();if(g.length<8)throw new Ua;if(!e.checkChecksum(g))throw new Sa;var m=(o[1]+o[0])/2,y=(d[1]+d[0])/2,w=this.getBarcodeFormat(),_=[new Ns(m,t),new Ns(y,t)],v=new hs(g,null,0,_,w,(new Date).getTime()),E=0;try{var b=lu.decodeRow(t,r,d[1]);v.putMetadata(ms.UPC_EAN_EXTENSION,b.getText()),v.putAllMetadata(b.getResultMetadata()),v.addResultPoints(b.getResultPoints()),E=b.getText().length}catch(t){}var A=null==n?null:n.get(La.ALLOWED_EAN_EXTENSIONS);if(null!=A){var C=!1;for(var I in A)if(E.toString()===I){C=!0;break}if(!C)throw new $a}return w===ps.EAN_13||ps.UPC_A,v},e.checkChecksum=function(t){return e.checkStandardUPCEANChecksum(t)},e.checkStandardUPCEANChecksum=function(t){var r=t.length;if(0===r)return!1;var n=parseInt(t.charAt(r-1),10);return e.getStandardUPCEANChecksum(t.substring(0,r-1))===n},e.getStandardUPCEANChecksum=function(t){for(var e=t.length,r=0,n=e-1;n>=0;n-=2){if((o=t.charAt(n).charCodeAt(0)-"0".charCodeAt(0))<0||o>9)throw new Ua;r+=o}r*=3;for(n=e-2;n>=0;n-=2){var o;if((o=t.charAt(n).charCodeAt(0)-"0".charCodeAt(0))<0||o>9)throw new Ua;r+=o}return(1e3-r)%10},e.decodeEnd=function(t,r){return e.findGuardPattern(t,r,!1,e.START_END_PATTERN,new Int32Array(e.START_END_PATTERN.length).fill(0))},e}(iu),fu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),pu=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},gu=function(t){function e(){var e=t.call(this)||this;return e.decodeMiddleCounters=Int32Array.from([0,0,0,0]),e}return fu(e,t),e.prototype.decodeMiddle=function(t,r,n){var o,i,a,s,u=this.decodeMiddleCounters;u[0]=0,u[1]=0,u[2]=0,u[3]=0;for(var c=t.getSize(),l=r[1],d=0,h=0;h<6&&l<c;h++){var f=hu.decodeDigit(t,u,l,hu.L_AND_G_PATTERNS);n+=String.fromCharCode("0".charCodeAt(0)+f%10);try{for(var p=(o=void 0,pu(u)),g=p.next();!g.done;g=p.next()){l+=g.value}}catch(t){o={error:t}}finally{try{g&&!g.done&&(i=p.return)&&i.call(p)}finally{if(o)throw o.error}}f>=10&&(d|=1<<5-h)}n=e.determineFirstDigit(n,d),l=hu.findGuardPattern(t,l,!0,hu.MIDDLE_PATTERN,new Int32Array(hu.MIDDLE_PATTERN.length).fill(0))[1];for(h=0;h<6&&l<c;h++){f=hu.decodeDigit(t,u,l,hu.L_PATTERNS);n+=String.fromCharCode("0".charCodeAt(0)+f);try{for(var m=(a=void 0,pu(u)),y=m.next();!y.done;y=m.next()){l+=y.value}}catch(t){a={error:t}}finally{try{y&&!y.done&&(s=m.return)&&s.call(m)}finally{if(a)throw a.error}}}return{rowOffset:l,resultString:n}},e.prototype.getBarcodeFormat=function(){return ps.EAN_13},e.determineFirstDigit=function(t,e){for(var r=0;r<10;r++)if(e===this.FIRST_DIGIT_ENCODINGS[r])return t=String.fromCharCode("0".charCodeAt(0)+r)+t;throw new $a},e.FIRST_DIGIT_ENCODINGS=[0,11,13,14,19,25,28,21,22,26],e}(hu),mu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),yu=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},wu=function(t){function e(){var e=t.call(this)||this;return e.decodeMiddleCounters=Int32Array.from([0,0,0,0]),e}return mu(e,t),e.prototype.decodeMiddle=function(t,e,r){var n,o,i,a,s=this.decodeMiddleCounters;s[0]=0,s[1]=0,s[2]=0,s[3]=0;for(var u=t.getSize(),c=e[1],l=0;l<4&&c<u;l++){var d=hu.decodeDigit(t,s,c,hu.L_PATTERNS);r+=String.fromCharCode("0".charCodeAt(0)+d);try{for(var h=(n=void 0,yu(s)),f=h.next();!f.done;f=h.next()){c+=f.value}}catch(t){n={error:t}}finally{try{f&&!f.done&&(o=h.return)&&o.call(h)}finally{if(n)throw n.error}}}c=hu.findGuardPattern(t,c,!0,hu.MIDDLE_PATTERN,new Int32Array(hu.MIDDLE_PATTERN.length).fill(0))[1];for(l=0;l<4&&c<u;l++){d=hu.decodeDigit(t,s,c,hu.L_PATTERNS);r+=String.fromCharCode("0".charCodeAt(0)+d);try{for(var p=(i=void 0,yu(s)),g=p.next();!g.done;g=p.next()){c+=g.value}}catch(t){i={error:t}}finally{try{g&&!g.done&&(a=p.return)&&a.call(p)}finally{if(i)throw i.error}}}return{rowOffset:c,resultString:r}},e.prototype.getBarcodeFormat=function(){return ps.EAN_8},e}(hu),_u=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),vu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.ean13Reader=new gu,e}return _u(e,t),e.prototype.getBarcodeFormat=function(){return ps.UPC_A},e.prototype.decode=function(t,e){return this.maybeReturnResult(this.ean13Reader.decode(t))},e.prototype.decodeRow=function(t,e,r){return this.maybeReturnResult(this.ean13Reader.decodeRow(t,e,r))},e.prototype.decodeMiddle=function(t,e,r){return this.ean13Reader.decodeMiddle(t,e,r)},e.prototype.maybeReturnResult=function(t){var e=t.getText();if("0"===e.charAt(0)){var r=new hs(e.substring(1),null,null,t.getResultPoints(),ps.UPC_A);return null!=t.getResultMetadata()&&r.putAllMetadata(t.getResultMetadata()),r}throw new $a},e.prototype.reset=function(){this.ean13Reader.reset()},e}(hu),Eu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),bu=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Au=function(t){function e(){var e=t.call(this)||this;return e.decodeMiddleCounters=new Int32Array(4),e}return Eu(e,t),e.prototype.decodeMiddle=function(t,r,n){var o,i,a=this.decodeMiddleCounters.map((function(t){return t}));a[0]=0,a[1]=0,a[2]=0,a[3]=0;for(var s=t.getSize(),u=r[1],c=0,l=0;l<6&&u<s;l++){var d=e.decodeDigit(t,a,u,e.L_AND_G_PATTERNS);n+=String.fromCharCode("0".charCodeAt(0)+d%10);try{for(var h=(o=void 0,bu(a)),f=h.next();!f.done;f=h.next()){u+=f.value}}catch(t){o={error:t}}finally{try{f&&!f.done&&(i=h.return)&&i.call(h)}finally{if(o)throw o.error}}d>=10&&(c|=1<<5-l)}return e.determineNumSysAndCheckDigit(new Za(n),c),u},e.prototype.decodeEnd=function(t,r){return e.findGuardPatternWithoutCounters(t,r,!0,e.MIDDLE_END_PATTERN)},e.prototype.checkChecksum=function(t){return hu.checkChecksum(e.convertUPCEtoUPCA(t))},e.determineNumSysAndCheckDigit=function(t,e){for(var r=0;r<=1;r++)for(var n=0;n<10;n++)if(e===this.NUMSYS_AND_CHECK_DIGIT_PATTERNS[r][n])return t.insert(0,"0"+r),void t.append("0"+n);throw $a.getNotFoundInstance()},e.prototype.getBarcodeFormat=function(){return ps.UPC_E},e.convertUPCEtoUPCA=function(t){var e=t.slice(1,7).split("").map((function(t){return t.charCodeAt(0)})),r=new Za;r.append(t.charAt(0));var n=e[5];switch(n){case 0:case 1:case 2:r.appendChars(e,0,2),r.append(n),r.append("0000"),r.appendChars(e,2,3);break;case 3:r.appendChars(e,0,3),r.append("00000"),r.appendChars(e,3,2);break;case 4:r.appendChars(e,0,4),r.append("00000"),r.append(e[4]);break;default:r.appendChars(e,0,5),r.append("0000"),r.append(n)}return t.length>=8&&r.append(t.charAt(7)),r.toString()},e.MIDDLE_END_PATTERN=Int32Array.from([1,1,1,1,1,1]),e.NUMSYS_AND_CHECK_DIGIT_PATTERNS=[Int32Array.from([56,52,50,49,44,38,35,42,41,37]),Int32Array.from([7,11,13,14,19,25,28,21,22,1])],e}(hu),Cu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Iu=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Su=function(t){function e(e){var r=t.call(this)||this,n=null==e?null:e.get(La.POSSIBLE_FORMATS),o=[];return null!=n&&(n.indexOf(ps.EAN_13)>-1&&o.push(new gu),n.indexOf(ps.UPC_A)>-1&&o.push(new vu),n.indexOf(ps.EAN_8)>-1&&o.push(new wu),n.indexOf(ps.UPC_E)>-1&&o.push(new Au)),0===o.length&&(o.push(new gu),o.push(new vu),o.push(new wu),o.push(new Au)),r.readers=o,r}return Cu(e,t),e.prototype.decodeRow=function(t,e,r){var n,o;try{for(var i=Iu(this.readers),a=i.next();!a.done;a=i.next()){var s=a.value;try{var u=s.decodeRow(t,e,r),c=u.getBarcodeFormat()===ps.EAN_13&&"0"===u.getText().charAt(0),l=null==r?null:r.get(La.POSSIBLE_FORMATS),d=null==l||l.includes(ps.UPC_A);if(c&&d){var h=u.getRawBytes(),f=new hs(u.getText().substring(1),h,h?h.length:null,u.getResultPoints(),ps.UPC_A);return f.putAllMetadata(u.getResultMetadata()),f}return u}catch(t){}}}catch(t){n={error:t}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}throw new $a},e.prototype.reset=function(){var t,e;try{for(var r=Iu(this.readers),n=r.next();!n.done;n=r.next()){n.value.reset()}}catch(e){t={error:e}}finally{try{n&&!n.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}},e}(Xs),Tu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Du=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.CODA_BAR_CHAR_SET={nnnnnww:"0",nnnnwwn:"1",nnnwnnw:"2",wwnnnnn:"3",nnwnnwn:"4",wnnnnwn:"5",nwnnnnw:"6",nwnnwnn:"7",nwwnnnn:"8",wnnwnnn:"9",nnnwwnn:"-",nnwwnnn:"$",wnnnwnw:":",wnwnnnw:"/",wnwnwnn:".",nnwwwww:"+",nnwwnwn:"A",nwnwnnw:"B",nnnwnww:"C",nnnwwwn:"D"},e}return Tu(e,t),e.prototype.decodeRow=function(t,e,r){var n=this.getValidRowData(e);if(!n)throw new $a;var o=this.codaBarDecodeRow(n.row);if(!o)throw new $a;return new hs(o,null,0,[new Ns(n.left,t),new Ns(n.right,t)],ps.CODABAR,(new Date).getTime())},e.prototype.getValidRowData=function(t){var e=t.toArray(),r=e.indexOf(!0);if(-1===r)return null;var n=e.lastIndexOf(!0);if(n<=r)return null;for(var o=[],i=(e=e.slice(r,n+1))[0],a=1,s=1;s<e.length;s++)e[s]===i?a++:(i=e[s],o.push(a),a=1);return o.push(a),o.length<23&&(o.length+1)%8!=0?null:{row:o,left:r,right:n}},e.prototype.codaBarDecodeRow=function(t){for(var e=[],r=Math.ceil(t.reduce((function(t,e){return(t+e)/2}),0));t.length>0;){var n=t.splice(0,8).splice(0,7).map((function(t){return t<r?"n":"w"})).join("");if(void 0===this.CODA_BAR_CHAR_SET[n])return null;e.push(this.CODA_BAR_CHAR_SET[n])}var o=e.join("");return this.validCodaBarString(o)?o:null},e.prototype.validCodaBarString=function(t){return/^[A-D].{1,}[A-D]$/.test(t)},e}(Xs),Ou=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ru=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Mu=function(t){function e(){var e=t.call(this)||this;return e.decodeFinderCounters=new Int32Array(4),e.dataCharacterCounters=new Int32Array(8),e.oddRoundingErrors=new Array(4),e.evenRoundingErrors=new Array(4),e.oddCounts=new Array(e.dataCharacterCounters.length/2),e.evenCounts=new Array(e.dataCharacterCounters.length/2),e}return Ou(e,t),e.prototype.getDecodeFinderCounters=function(){return this.decodeFinderCounters},e.prototype.getDataCharacterCounters=function(){return this.dataCharacterCounters},e.prototype.getOddRoundingErrors=function(){return this.oddRoundingErrors},e.prototype.getEvenRoundingErrors=function(){return this.evenRoundingErrors},e.prototype.getOddCounts=function(){return this.oddCounts},e.prototype.getEvenCounts=function(){return this.evenCounts},e.prototype.parseFinderValue=function(t,r){for(var n=0;n<r.length;n++)if(Xs.patternMatchVariance(t,r[n],e.MAX_INDIVIDUAL_VARIANCE)<e.MAX_AVG_VARIANCE)return n;throw new $a},e.count=function(t){return Rs.sum(new Int32Array(t))},e.increment=function(t,e){for(var r=0,n=e[0],o=1;o<t.length;o++)e[o]>n&&(n=e[o],r=o);t[r]++},e.decrement=function(t,e){for(var r=0,n=e[0],o=1;o<t.length;o++)e[o]<n&&(n=e[o],r=o);t[r]--},e.isFinderPattern=function(t){var r,n,o=t[0]+t[1],i=o/(o+t[2]+t[3]);if(i>=e.MIN_FINDER_PATTERN_RATIO&&i<=e.MAX_FINDER_PATTERN_RATIO){var a=Number.MAX_SAFE_INTEGER,s=Number.MIN_SAFE_INTEGER;try{for(var u=Ru(t),c=u.next();!c.done;c=u.next()){var l=c.value;l>s&&(s=l),l<a&&(a=l)}}catch(t){r={error:t}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(r)throw r.error}}return s<10*a}return!1},e.MAX_AVG_VARIANCE=.2,e.MAX_INDIVIDUAL_VARIANCE=.45,e.MIN_FINDER_PATTERN_RATIO=9.5/12,e.MAX_FINDER_PATTERN_RATIO=12.5/14,e}(Xs),Nu=function(){function t(t,e){this.value=t,this.checksumPortion=e}return t.prototype.getValue=function(){return this.value},t.prototype.getChecksumPortion=function(){return this.checksumPortion},t.prototype.toString=function(){return this.value+"("+this.checksumPortion+")"},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.value===r.value&&this.checksumPortion===r.checksumPortion},t.prototype.hashCode=function(){return this.value^this.checksumPortion},t}(),ku=function(){function t(t,e,r,n,o){this.value=t,this.startEnd=e,this.value=t,this.startEnd=e,this.resultPoints=new Array,this.resultPoints.push(new Ns(r,o)),this.resultPoints.push(new Ns(n,o))}return t.prototype.getValue=function(){return this.value},t.prototype.getStartEnd=function(){return this.startEnd},t.prototype.getResultPoints=function(){return this.resultPoints},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.value===r.value},t.prototype.hashCode=function(){return this.value},t}(),xu=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Pu=function(){function t(){}return t.getRSSvalue=function(e,r,n){var o,i,a=0;try{for(var s=xu(e),u=s.next();!u.done;u=s.next()){a+=u.value}}catch(t){o={error:t}}finally{try{u&&!u.done&&(i=s.return)&&i.call(s)}finally{if(o)throw o.error}}for(var c=0,l=0,d=e.length,h=0;h<d-1;h++){var f=void 0;for(f=1,l|=1<<h;f<e[h];f++,l&=~(1<<h)){var p=t.combins(a-f-1,d-h-2);if(n&&0===l&&a-f-(d-h-1)>=d-h-1&&(p-=t.combins(a-f-(d-h),d-h-2)),d-h-1>1){for(var g=0,m=a-f-(d-h-2);m>r;m--)g+=t.combins(a-f-m-1,d-h-3);p-=g*(d-1-h)}else a-f>r&&p--;c+=p}a-=f}return c},t.combins=function(t,e){var r,n;t-e>e?(n=e,r=t-e):(n=t-e,r=e);for(var o=1,i=1,a=t;a>r;a--)o*=a,i<=n&&(o/=i,i++);for(;i<=n;)o/=i,i++;return o},t}(),Bu=function(){function t(){}return t.buildBitArray=function(t){var e=2*t.length-1;null==t[t.length-1].getRightChar()&&(e-=1);for(var r=new Ba(12*e),n=0,o=t[0].getRightChar().getValue(),i=11;i>=0;--i)o&1<<i&&r.set(n),n++;for(i=1;i<t.length;++i){for(var a=t[i],s=a.getLeftChar().getValue(),u=11;u>=0;--u)s&1<<u&&r.set(n),n++;if(null!==a.getRightChar()){var c=a.getRightChar().getValue();for(u=11;u>=0;--u)c&1<<u&&r.set(n),n++}}return r},t}(),Fu=function(){function t(t,e){e?this.decodedInformation=null:(this.finished=t,this.decodedInformation=e)}return t.prototype.getDecodedInformation=function(){return this.decodedInformation},t.prototype.isFinished=function(){return this.finished},t}(),Lu=function(){function t(t){this.newPosition=t}return t.prototype.getNewPosition=function(){return this.newPosition},t}(),zu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Uu=function(t){function e(e,r){var n=t.call(this,e)||this;return n.value=r,n}return zu(e,t),e.prototype.getValue=function(){return this.value},e.prototype.isFNC1=function(){return this.value===e.FNC1},e.FNC1="$",e}(Lu),Vu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Hu=function(t){function e(e,r,n){var o=t.call(this,e)||this;return n?(o.remaining=!0,o.remainingValue=o.remainingValue):(o.remaining=!1,o.remainingValue=0),o.newString=r,o}return Vu(e,t),e.prototype.getNewString=function(){return this.newString},e.prototype.isRemaining=function(){return this.remaining},e.prototype.getRemainingValue=function(){return this.remainingValue},e}(Lu),ju=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Gu=function(t){function e(e,r,n){var o=t.call(this,e)||this;if(r<0||r>10||n<0||n>10)throw new Ua;return o.firstDigit=r,o.secondDigit=n,o}return ju(e,t),e.prototype.getFirstDigit=function(){return this.firstDigit},e.prototype.getSecondDigit=function(){return this.secondDigit},e.prototype.getValue=function(){return 10*this.firstDigit+this.secondDigit},e.prototype.isFirstDigitFNC1=function(){return this.firstDigit===e.FNC1},e.prototype.isSecondDigitFNC1=function(){return this.secondDigit===e.FNC1},e.prototype.isAnyFNC1=function(){return this.firstDigit===e.FNC1||this.secondDigit===e.FNC1},e.FNC1=10,e}(Lu),Wu=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Xu=function(){function t(){}return t.parseFieldsInGeneralPurpose=function(e){var r,n,o,i,a,s,u,c;if(!e)return null;if(e.length<2)throw new $a;var l=e.substring(0,2);try{for(var d=Wu(t.TWO_DIGIT_DATA_LENGTH),h=d.next();!h.done;h=d.next()){if((E=h.value)[0]===l)return E[1]===t.VARIABLE_LENGTH?t.processVariableAI(2,E[2],e):t.processFixedAI(2,E[1],e)}}catch(t){r={error:t}}finally{try{h&&!h.done&&(n=d.return)&&n.call(d)}finally{if(r)throw r.error}}if(e.length<3)throw new $a;var f=e.substring(0,3);try{for(var p=Wu(t.THREE_DIGIT_DATA_LENGTH),g=p.next();!g.done;g=p.next()){if((E=g.value)[0]===f)return E[1]===t.VARIABLE_LENGTH?t.processVariableAI(3,E[2],e):t.processFixedAI(3,E[1],e)}}catch(t){o={error:t}}finally{try{g&&!g.done&&(i=p.return)&&i.call(p)}finally{if(o)throw o.error}}try{for(var m=Wu(t.THREE_DIGIT_PLUS_DIGIT_DATA_LENGTH),y=m.next();!y.done;y=m.next()){if((E=y.value)[0]===f)return E[1]===t.VARIABLE_LENGTH?t.processVariableAI(4,E[2],e):t.processFixedAI(4,E[1],e)}}catch(t){a={error:t}}finally{try{y&&!y.done&&(s=m.return)&&s.call(m)}finally{if(a)throw a.error}}if(e.length<4)throw new $a;var w=e.substring(0,4);try{for(var _=Wu(t.FOUR_DIGIT_DATA_LENGTH),v=_.next();!v.done;v=_.next()){var E;if((E=v.value)[0]===w)return E[1]===t.VARIABLE_LENGTH?t.processVariableAI(4,E[2],e):t.processFixedAI(4,E[1],e)}}catch(t){u={error:t}}finally{try{v&&!v.done&&(c=_.return)&&c.call(_)}finally{if(u)throw u.error}}throw new $a},t.processFixedAI=function(e,r,n){if(n.length<e)throw new $a;var o=n.substring(0,e);if(n.length<e+r)throw new $a;var i=n.substring(e,e+r),a=n.substring(e+r),s="("+o+")"+i,u=t.parseFieldsInGeneralPurpose(a);return null==u?s:s+u},t.processVariableAI=function(e,r,n){var o,i=n.substring(0,e);o=n.length<e+r?n.length:e+r;var a=n.substring(e,o),s=n.substring(o),u="("+i+")"+a,c=t.parseFieldsInGeneralPurpose(s);return null==c?u:u+c},t.VARIABLE_LENGTH=[],t.TWO_DIGIT_DATA_LENGTH=[["00",18],["01",14],["02",14],["10",t.VARIABLE_LENGTH,20],["11",6],["12",6],["13",6],["15",6],["17",6],["20",2],["21",t.VARIABLE_LENGTH,20],["22",t.VARIABLE_LENGTH,29],["30",t.VARIABLE_LENGTH,8],["37",t.VARIABLE_LENGTH,8],["90",t.VARIABLE_LENGTH,30],["91",t.VARIABLE_LENGTH,30],["92",t.VARIABLE_LENGTH,30],["93",t.VARIABLE_LENGTH,30],["94",t.VARIABLE_LENGTH,30],["95",t.VARIABLE_LENGTH,30],["96",t.VARIABLE_LENGTH,30],["97",t.VARIABLE_LENGTH,3],["98",t.VARIABLE_LENGTH,30],["99",t.VARIABLE_LENGTH,30]],t.THREE_DIGIT_DATA_LENGTH=[["240",t.VARIABLE_LENGTH,30],["241",t.VARIABLE_LENGTH,30],["242",t.VARIABLE_LENGTH,6],["250",t.VARIABLE_LENGTH,30],["251",t.VARIABLE_LENGTH,30],["253",t.VARIABLE_LENGTH,17],["254",t.VARIABLE_LENGTH,20],["400",t.VARIABLE_LENGTH,30],["401",t.VARIABLE_LENGTH,30],["402",17],["403",t.VARIABLE_LENGTH,30],["410",13],["411",13],["412",13],["413",13],["414",13],["420",t.VARIABLE_LENGTH,20],["421",t.VARIABLE_LENGTH,15],["422",3],["423",t.VARIABLE_LENGTH,15],["424",3],["425",3],["426",3]],t.THREE_DIGIT_PLUS_DIGIT_DATA_LENGTH=[["310",6],["311",6],["312",6],["313",6],["314",6],["315",6],["316",6],["320",6],["321",6],["322",6],["323",6],["324",6],["325",6],["326",6],["327",6],["328",6],["329",6],["330",6],["331",6],["332",6],["333",6],["334",6],["335",6],["336",6],["340",6],["341",6],["342",6],["343",6],["344",6],["345",6],["346",6],["347",6],["348",6],["349",6],["350",6],["351",6],["352",6],["353",6],["354",6],["355",6],["356",6],["357",6],["360",6],["361",6],["362",6],["363",6],["364",6],["365",6],["366",6],["367",6],["368",6],["369",6],["390",t.VARIABLE_LENGTH,15],["391",t.VARIABLE_LENGTH,18],["392",t.VARIABLE_LENGTH,15],["393",t.VARIABLE_LENGTH,18],["703",t.VARIABLE_LENGTH,30]],t.FOUR_DIGIT_DATA_LENGTH=[["7001",13],["7002",t.VARIABLE_LENGTH,30],["7003",10],["8001",14],["8002",t.VARIABLE_LENGTH,20],["8003",t.VARIABLE_LENGTH,30],["8004",t.VARIABLE_LENGTH,30],["8005",6],["8006",18],["8007",t.VARIABLE_LENGTH,30],["8008",t.VARIABLE_LENGTH,12],["8018",18],["8020",t.VARIABLE_LENGTH,25],["8100",6],["8101",10],["8102",2],["8110",t.VARIABLE_LENGTH,70],["8200",t.VARIABLE_LENGTH,70]],t}(),Yu=function(){function t(t){this.buffer=new Za,this.information=t}return t.prototype.decodeAllCodes=function(t,e){for(var r=e,n=null;;){var o=this.decodeGeneralPurposeField(r,n),i=Xu.parseFieldsInGeneralPurpose(o.getNewString());if(null!=i&&t.append(i),n=o.isRemaining()?""+o.getRemainingValue():null,r===o.getNewPosition())break;r=o.getNewPosition()}return t.toString()},t.prototype.isStillNumeric=function(t){if(t+7>this.information.getSize())return t+4<=this.information.getSize();for(var e=t;e<t+3;++e)if(this.information.get(e))return!0;return this.information.get(t+3)},t.prototype.decodeNumeric=function(t){if(t+7>this.information.getSize()){var e=this.extractNumericValueFromBitArray(t,4);return new Gu(this.information.getSize(),0===e?Gu.FNC1:e-1,Gu.FNC1)}var r=this.extractNumericValueFromBitArray(t,7);return new Gu(t+7,(r-8)/11,(r-8)%11)},t.prototype.extractNumericValueFromBitArray=function(e,r){return t.extractNumericValueFromBitArray(this.information,e,r)},t.extractNumericValueFromBitArray=function(t,e,r){for(var n=0,o=0;o<r;++o)t.get(e+o)&&(n|=1<<r-o-1);return n},t.prototype.decodeGeneralPurposeField=function(t,e){this.buffer.setLengthToZero(),null!=e&&this.buffer.append(e),this.current.setPosition(t);var r=this.parseBlocks();return null!=r&&r.isRemaining()?new Hu(this.current.getPosition(),this.buffer.toString(),r.getRemainingValue()):new Hu(this.current.getPosition(),this.buffer.toString())},t.prototype.parseBlocks=function(){var t,e;do{var r=this.current.getPosition();if(t=this.current.isAlpha()?(e=this.parseAlphaBlock()).isFinished():this.current.isIsoIec646()?(e=this.parseIsoIec646Block()).isFinished():(e=this.parseNumericBlock()).isFinished(),!(r!==this.current.getPosition())&&!t)break}while(!t);return e.getDecodedInformation()},t.prototype.parseNumericBlock=function(){for(;this.isStillNumeric(this.current.getPosition());){var t=this.decodeNumeric(this.current.getPosition());if(this.current.setPosition(t.getNewPosition()),t.isFirstDigitFNC1()){var e=void 0;return e=t.isSecondDigitFNC1()?new Hu(this.current.getPosition(),this.buffer.toString()):new Hu(this.current.getPosition(),this.buffer.toString(),t.getSecondDigit()),new Fu(!0,e)}if(this.buffer.append(t.getFirstDigit()),t.isSecondDigitFNC1()){e=new Hu(this.current.getPosition(),this.buffer.toString());return new Fu(!0,e)}this.buffer.append(t.getSecondDigit())}return this.isNumericToAlphaNumericLatch(this.current.getPosition())&&(this.current.setAlpha(),this.current.incrementPosition(4)),new Fu(!1)},t.prototype.parseIsoIec646Block=function(){for(;this.isStillIsoIec646(this.current.getPosition());){var t=this.decodeIsoIec646(this.current.getPosition());if(this.current.setPosition(t.getNewPosition()),t.isFNC1()){var e=new Hu(this.current.getPosition(),this.buffer.toString());return new Fu(!0,e)}this.buffer.append(t.getValue())}return this.isAlphaOr646ToNumericLatch(this.current.getPosition())?(this.current.incrementPosition(3),this.current.setNumeric()):this.isAlphaTo646ToAlphaLatch(this.current.getPosition())&&(this.current.getPosition()+5<this.information.getSize()?this.current.incrementPosition(5):this.current.setPosition(this.information.getSize()),this.current.setAlpha()),new Fu(!1)},t.prototype.parseAlphaBlock=function(){for(;this.isStillAlpha(this.current.getPosition());){var t=this.decodeAlphanumeric(this.current.getPosition());if(this.current.setPosition(t.getNewPosition()),t.isFNC1()){var e=new Hu(this.current.getPosition(),this.buffer.toString());return new Fu(!0,e)}this.buffer.append(t.getValue())}return this.isAlphaOr646ToNumericLatch(this.current.getPosition())?(this.current.incrementPosition(3),this.current.setNumeric()):this.isAlphaTo646ToAlphaLatch(this.current.getPosition())&&(this.current.getPosition()+5<this.information.getSize()?this.current.incrementPosition(5):this.current.setPosition(this.information.getSize()),this.current.setIsoIec646()),new Fu(!1)},t.prototype.isStillIsoIec646=function(t){if(t+5>this.information.getSize())return!1;var e=this.extractNumericValueFromBitArray(t,5);if(e>=5&&e<16)return!0;if(t+7>this.information.getSize())return!1;var r=this.extractNumericValueFromBitArray(t,7);if(r>=64&&r<116)return!0;if(t+8>this.information.getSize())return!1;var n=this.extractNumericValueFromBitArray(t,8);return n>=232&&n<253},t.prototype.decodeIsoIec646=function(t){var e=this.extractNumericValueFromBitArray(t,5);if(15===e)return new Uu(t+5,Uu.FNC1);if(e>=5&&e<15)return new Uu(t+5,"0"+(e-5));var r,n=this.extractNumericValueFromBitArray(t,7);if(n>=64&&n<90)return new Uu(t+7,""+(n+1));if(n>=90&&n<116)return new Uu(t+7,""+(n+7));switch(this.extractNumericValueFromBitArray(t,8)){case 232:r="!";break;case 233:r='"';break;case 234:r="%";break;case 235:r="&";break;case 236:r="'";break;case 237:r="(";break;case 238:r=")";break;case 239:r="*";break;case 240:r="+";break;case 241:r=",";break;case 242:r="-";break;case 243:r=".";break;case 244:r="/";break;case 245:r=":";break;case 246:r=";";break;case 247:r="<";break;case 248:r="=";break;case 249:r=">";break;case 250:r="?";break;case 251:r="_";break;case 252:r=" ";break;default:throw new Ua}return new Uu(t+8,r)},t.prototype.isStillAlpha=function(t){if(t+5>this.information.getSize())return!1;var e=this.extractNumericValueFromBitArray(t,5);if(e>=5&&e<16)return!0;if(t+6>this.information.getSize())return!1;var r=this.extractNumericValueFromBitArray(t,6);return r>=16&&r<63},t.prototype.decodeAlphanumeric=function(t){var e=this.extractNumericValueFromBitArray(t,5);if(15===e)return new Uu(t+5,Uu.FNC1);if(e>=5&&e<15)return new Uu(t+5,"0"+(e-5));var r,n=this.extractNumericValueFromBitArray(t,6);if(n>=32&&n<58)return new Uu(t+6,""+(n+33));switch(n){case 58:r="*";break;case 59:r=",";break;case 60:r="-";break;case 61:r=".";break;case 62:r="/";break;default:throw new Ts("Decoding invalid alphanumeric value: "+n)}return new Uu(t+6,r)},t.prototype.isAlphaTo646ToAlphaLatch=function(t){if(t+1>this.information.getSize())return!1;for(var e=0;e<5&&e+t<this.information.getSize();++e)if(2===e){if(!this.information.get(t+2))return!1}else if(this.information.get(t+e))return!1;return!0},t.prototype.isAlphaOr646ToNumericLatch=function(t){if(t+3>this.information.getSize())return!1;for(var e=t;e<t+3;++e)if(this.information.get(e))return!1;return!0},t.prototype.isNumericToAlphaNumericLatch=function(t){if(t+1>this.information.getSize())return!1;for(var e=0;e<4&&e+t<this.information.getSize();++e)if(this.information.get(t+e))return!1;return!0},t}(),Zu=function(){function t(t){this.information=t,this.generalDecoder=new Yu(t)}return t.prototype.getInformation=function(){return this.information},t.prototype.getGeneralDecoder=function(){return this.generalDecoder},t}(),qu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ku=function(t){function e(e){return t.call(this,e)||this}return qu(e,t),e.prototype.encodeCompressedGtin=function(t,e){t.append("(01)");var r=t.length();t.append("9"),this.encodeCompressedGtinWithoutAI(t,e,r)},e.prototype.encodeCompressedGtinWithoutAI=function(t,r,n){for(var o=0;o<4;++o){var i=this.getGeneralDecoder().extractNumericValueFromBitArray(r+10*o,10);i/100==0&&t.append("0"),i/10==0&&t.append("0"),t.append(i)}e.appendCheckDigit(t,n)},e.appendCheckDigit=function(t,e){for(var r=0,n=0;n<13;n++){var o=t.charAt(n+e).charCodeAt(0)-"0".charCodeAt(0);r+=1&n?o:3*o}10===(r=10-r%10)&&(r=0),t.append(r)},e.GTIN_SIZE=40,e}(Zu),$u=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ju=function(t){function e(e){return t.call(this,e)||this}return $u(e,t),e.prototype.parseInformation=function(){var t=new Za;t.append("(01)");var r=t.length(),n=this.getGeneralDecoder().extractNumericValueFromBitArray(e.HEADER_SIZE,4);return t.append(n),this.encodeCompressedGtinWithoutAI(t,e.HEADER_SIZE+4,r),this.getGeneralDecoder().decodeAllCodes(t,e.HEADER_SIZE+44)},e.HEADER_SIZE=4,e}(Ku),Qu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),tc=function(t){function e(e){return t.call(this,e)||this}return Qu(e,t),e.prototype.parseInformation=function(){var t=new Za;return this.getGeneralDecoder().decodeAllCodes(t,e.HEADER_SIZE)},e.HEADER_SIZE=5,e}(Zu),ec=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),rc=function(t){function e(e){return t.call(this,e)||this}return ec(e,t),e.prototype.encodeCompressedWeight=function(t,e,r){var n=this.getGeneralDecoder().extractNumericValueFromBitArray(e,r);this.addWeightCode(t,n);for(var o=this.checkWeight(n),i=1e5,a=0;a<5;++a)o/i==0&&t.append("0"),i/=10;t.append(o)},e}(Ku),nc=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),oc=function(t){function e(e){return t.call(this,e)||this}return nc(e,t),e.prototype.parseInformation=function(){if(this.getInformation().getSize()!==e.HEADER_SIZE+rc.GTIN_SIZE+e.WEIGHT_SIZE)throw new $a;var t=new Za;return this.encodeCompressedGtin(t,e.HEADER_SIZE),this.encodeCompressedWeight(t,e.HEADER_SIZE+rc.GTIN_SIZE,e.WEIGHT_SIZE),t.toString()},e.HEADER_SIZE=5,e.WEIGHT_SIZE=15,e}(rc),ic=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),ac=function(t){function e(e){return t.call(this,e)||this}return ic(e,t),e.prototype.addWeightCode=function(t,e){t.append("(3103)")},e.prototype.checkWeight=function(t){return t},e}(oc),sc=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),uc=function(t){function e(e){return t.call(this,e)||this}return sc(e,t),e.prototype.addWeightCode=function(t,e){e<1e4?t.append("(3202)"):t.append("(3203)")},e.prototype.checkWeight=function(t){return t<1e4?t:t-1e4},e}(oc),cc=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),lc=function(t){function e(e){return t.call(this,e)||this}return cc(e,t),e.prototype.parseInformation=function(){if(this.getInformation().getSize()<e.HEADER_SIZE+Ku.GTIN_SIZE)throw new $a;var t=new Za;this.encodeCompressedGtin(t,e.HEADER_SIZE);var r=this.getGeneralDecoder().extractNumericValueFromBitArray(e.HEADER_SIZE+Ku.GTIN_SIZE,e.LAST_DIGIT_SIZE);t.append("(392"),t.append(r),t.append(")");var n=this.getGeneralDecoder().decodeGeneralPurposeField(e.HEADER_SIZE+Ku.GTIN_SIZE+e.LAST_DIGIT_SIZE,null);return t.append(n.getNewString()),t.toString()},e.HEADER_SIZE=8,e.LAST_DIGIT_SIZE=2,e}(Ku),dc=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),hc=function(t){function e(e){return t.call(this,e)||this}return dc(e,t),e.prototype.parseInformation=function(){if(this.getInformation().getSize()<e.HEADER_SIZE+Ku.GTIN_SIZE)throw new $a;var t=new Za;this.encodeCompressedGtin(t,e.HEADER_SIZE);var r=this.getGeneralDecoder().extractNumericValueFromBitArray(e.HEADER_SIZE+Ku.GTIN_SIZE,e.LAST_DIGIT_SIZE);t.append("(393"),t.append(r),t.append(")");var n=this.getGeneralDecoder().extractNumericValueFromBitArray(e.HEADER_SIZE+Ku.GTIN_SIZE+e.LAST_DIGIT_SIZE,e.FIRST_THREE_DIGITS_SIZE);n/100==0&&t.append("0"),n/10==0&&t.append("0"),t.append(n);var o=this.getGeneralDecoder().decodeGeneralPurposeField(e.HEADER_SIZE+Ku.GTIN_SIZE+e.LAST_DIGIT_SIZE+e.FIRST_THREE_DIGITS_SIZE,null);return t.append(o.getNewString()),t.toString()},e.HEADER_SIZE=8,e.LAST_DIGIT_SIZE=2,e.FIRST_THREE_DIGITS_SIZE=10,e}(Ku),fc=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),pc=function(t){function e(e,r,n){var o=t.call(this,e)||this;return o.dateCode=n,o.firstAIdigits=r,o}return fc(e,t),e.prototype.parseInformation=function(){if(this.getInformation().getSize()!==e.HEADER_SIZE+e.GTIN_SIZE+e.WEIGHT_SIZE+e.DATE_SIZE)throw new $a;var t=new Za;return this.encodeCompressedGtin(t,e.HEADER_SIZE),this.encodeCompressedWeight(t,e.HEADER_SIZE+e.GTIN_SIZE,e.WEIGHT_SIZE),this.encodeCompressedDate(t,e.HEADER_SIZE+e.GTIN_SIZE+e.WEIGHT_SIZE),t.toString()},e.prototype.encodeCompressedDate=function(t,r){var n=this.getGeneralDecoder().extractNumericValueFromBitArray(r,e.DATE_SIZE);if(38400!==n){t.append("("),t.append(this.dateCode),t.append(")");var o=n%32,i=(n/=32)%12+1,a=n/=12;a/10==0&&t.append("0"),t.append(a),i/10==0&&t.append("0"),t.append(i),o/10==0&&t.append("0"),t.append(o)}},e.prototype.addWeightCode=function(t,e){t.append("("),t.append(this.firstAIdigits),t.append(e/1e5),t.append(")")},e.prototype.checkWeight=function(t){return t%1e5},e.HEADER_SIZE=8,e.WEIGHT_SIZE=20,e.DATE_SIZE=16,e}(rc);var gc=function(){function t(t,e,r,n){this.leftchar=t,this.rightchar=e,this.finderpattern=r,this.maybeLast=n}return t.prototype.mayBeLast=function(){return this.maybeLast},t.prototype.getLeftChar=function(){return this.leftchar},t.prototype.getRightChar=function(){return this.rightchar},t.prototype.getFinderPattern=function(){return this.finderpattern},t.prototype.mustBeLast=function(){return null==this.rightchar},t.prototype.toString=function(){return"[ "+this.leftchar+", "+this.rightchar+" : "+(null==this.finderpattern?"null":this.finderpattern.getValue())+" ]"},t.equals=function(e,r){return e instanceof t&&(t.equalsOrNull(e.leftchar,r.leftchar)&&t.equalsOrNull(e.rightchar,r.rightchar)&&t.equalsOrNull(e.finderpattern,r.finderpattern))},t.equalsOrNull=function(e,r){return null===e?null===r:t.equals(e,r)},t.prototype.hashCode=function(){return this.leftchar.getValue()^this.rightchar.getValue()^this.finderpattern.getValue()},t}(),mc=function(){function t(t,e,r){this.pairs=t,this.rowNumber=e,this.wasReversed=r}return t.prototype.getPairs=function(){return this.pairs},t.prototype.getRowNumber=function(){return this.rowNumber},t.prototype.isReversed=function(){return this.wasReversed},t.prototype.isEquivalent=function(t){return this.checkEqualitity(this,t)},t.prototype.toString=function(){return"{ "+this.pairs+" }"},t.prototype.equals=function(e,r){return e instanceof t&&(this.checkEqualitity(e,r)&&e.wasReversed===r.wasReversed)},t.prototype.checkEqualitity=function(t,e){var r;if(t&&e)return t.forEach((function(t,n){e.forEach((function(e){t.getLeftChar().getValue()===e.getLeftChar().getValue()&&t.getRightChar().getValue()===e.getRightChar().getValue()&&t.getFinderPatter().getValue()===e.getFinderPatter().getValue()&&(r=!0)}))})),r},t}(),yc=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),wc=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},_c=function(t){function e(){var r=null!==t&&t.apply(this,arguments)||this;return r.pairs=new Array(e.MAX_PAIRS),r.rows=new Array,r.startEnd=[2],r}return yc(e,t),e.prototype.decodeRow=function(t,r,n){this.pairs.length=0,this.startFromEven=!1;try{return e.constructResult(this.decodeRow2pairs(t,r))}catch(t){}return this.pairs.length=0,this.startFromEven=!0,e.constructResult(this.decodeRow2pairs(t,r))},e.prototype.reset=function(){this.pairs.length=0,this.rows.length=0},e.prototype.decodeRow2pairs=function(t,e){for(var r,n=!1;!n;)try{this.pairs.push(this.retrieveNextPair(e,this.pairs,t))}catch(t){if(t instanceof $a){if(!this.pairs.length)throw new $a;n=!0}}if(this.checkChecksum())return this.pairs;if(r=!!this.rows.length,this.storeRow(t,!1),r){var o=this.checkRowsBoolean(!1);if(null!=o)return o;if(null!=(o=this.checkRowsBoolean(!0)))return o}throw new $a},e.prototype.checkRowsBoolean=function(t){if(this.rows.length>25)return this.rows.length=0,null;this.pairs.length=0,t&&(this.rows=this.rows.reverse());var e=null;try{e=this.checkRows(new Array,0)}catch(t){console.log(t)}return t&&(this.rows=this.rows.reverse()),e},e.prototype.checkRows=function(t,r){for(var n,o,i=r;i<this.rows.length;i++){var a=this.rows[i];this.pairs.length=0;try{for(var s=(n=void 0,wc(t)),u=s.next();!u.done;u=s.next()){var c=u.value;this.pairs.push(c.getPairs())}}catch(t){n={error:t}}finally{try{u&&!u.done&&(o=s.return)&&o.call(s)}finally{if(n)throw n.error}}if(this.pairs.push(a.getPairs()),e.isValidSequence(this.pairs)){if(this.checkChecksum())return this.pairs;var l=new Array(t);l.push(a);try{return this.checkRows(l,i+1)}catch(t){console.log(t)}}}throw new $a},e.isValidSequence=function(t){var r,n;try{for(var o=wc(e.FINDER_PATTERN_SEQUENCES),i=o.next();!i.done;i=o.next()){var a=i.value;if(!(t.length>a.length)){for(var s=!0,u=0;u<t.length;u++)if(t[u].getFinderPattern().getValue()!==a[u]){s=!1;break}if(s)return!0}}}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return!1},e.prototype.storeRow=function(t,r){for(var n=0,o=!1,i=!1;n<this.rows.length;){var a=this.rows[n];if(a.getRowNumber()>t){i=a.isEquivalent(this.pairs);break}o=a.isEquivalent(this.pairs),n++}i||o||e.isPartialRow(this.pairs,this.rows)||(this.rows.push(n,new mc(this.pairs,t,r)),this.removePartialRows(this.pairs,this.rows))},e.prototype.removePartialRows=function(t,e){var r,n,o,i,a,s;try{for(var u=wc(e),c=u.next();!c.done;c=u.next()){var l=c.value;if(l.getPairs().length!==t.length){try{for(var d=(o=void 0,wc(l.getPairs())),h=d.next();!h.done;h=d.next()){var f=h.value,p=!1;try{for(var g=(a=void 0,wc(t)),m=g.next();!m.done;m=g.next()){var y=m.value;if(gc.equals(f,y)){p=!0;break}}}catch(t){a={error:t}}finally{try{m&&!m.done&&(s=g.return)&&s.call(g)}finally{if(a)throw a.error}}p||!1}}catch(t){o={error:t}}finally{try{h&&!h.done&&(i=d.return)&&i.call(d)}finally{if(o)throw o.error}}}}}catch(t){r={error:t}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(r)throw r.error}}},e.isPartialRow=function(t,e){var r,n,o,i,a,s;try{for(var u=wc(e),c=u.next();!c.done;c=u.next()){var l=c.value,d=!0;try{for(var h=(o=void 0,wc(t)),f=h.next();!f.done;f=h.next()){var p=f.value,g=!1;try{for(var m=(a=void 0,wc(l.getPairs())),y=m.next();!y.done;y=m.next()){var w=y.value;if(p.equals(w)){g=!0;break}}}catch(t){a={error:t}}finally{try{y&&!y.done&&(s=m.return)&&s.call(m)}finally{if(a)throw a.error}}if(!g){d=!1;break}}}catch(t){o={error:t}}finally{try{f&&!f.done&&(i=h.return)&&i.call(h)}finally{if(o)throw o.error}}if(d)return!0}}catch(t){r={error:t}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(r)throw r.error}}return!1},e.prototype.getRows=function(){return this.rows},e.constructResult=function(t){var e=function(t){try{if(t.get(1))return new Ju(t);if(!t.get(2))return new tc(t);switch(Yu.extractNumericValueFromBitArray(t,1,4)){case 4:return new ac(t);case 5:return new uc(t)}switch(Yu.extractNumericValueFromBitArray(t,1,5)){case 12:return new lc(t);case 13:return new hc(t)}switch(Yu.extractNumericValueFromBitArray(t,1,7)){case 56:return new pc(t,"310","11");case 57:return new pc(t,"320","11");case 58:return new pc(t,"310","13");case 59:return new pc(t,"320","13");case 60:return new pc(t,"310","15");case 61:return new pc(t,"320","15");case 62:return new pc(t,"310","17");case 63:return new pc(t,"320","17")}}catch(e){throw console.log(e),new Ts("unknown decoder: "+t)}}(Bu.buildBitArray(t)).parseInformation(),r=t[0].getFinderPattern().getResultPoints(),n=t[t.length-1].getFinderPattern().getResultPoints(),o=[r[0],r[1],n[0],n[1]];return new hs(e,null,null,o,ps.RSS_EXPANDED,null)},e.prototype.checkChecksum=function(){var t=this.pairs.get(0),e=t.getLeftChar(),r=t.getRightChar();if(null===r)return!1;for(var n=r.getChecksumPortion(),o=2,i=1;i<this.pairs.size();++i){var a=this.pairs.get(i);n+=a.getLeftChar().getChecksumPortion(),o++;var s=a.getRightChar();null!=s&&(n+=s.getChecksumPortion(),o++)}return 211*(o-4)+(n%=211)===e.getValue()},e.getNextSecondBar=function(t,e){var r;return t.get(e)?(r=t.getNextUnset(e),r=t.getNextSet(r)):(r=t.getNextSet(e),r=t.getNextUnset(r)),r},e.prototype.retrieveNextPair=function(t,r,n){var o,i=r.length%2==0;this.startFromEven&&(i=!i);var a=!0,s=-1;do{this.findNextPair(t,r,s),null===(o=this.parseFoundFinderPattern(t,n,i))?s=e.getNextSecondBar(t,this.startEnd[0]):a=!1}while(a);var u,c=this.decodeDataCharacter(t,o,i,!0);if(!this.isEmptyPair(r)&&r[r.length-1].mustBeLast())throw new $a;try{u=this.decodeDataCharacter(t,o,i,!1)}catch(t){u=null,console.log(t)}return new gc(c,u,o,!0)},e.prototype.isEmptyPair=function(t){return 0===t.length},e.prototype.findNextPair=function(t,r,n){var o=this.getDecodeFinderCounters();o[0]=0,o[1]=0,o[2]=0,o[3]=0;var i,a=t.getSize();if(n>=0)i=n;else if(this.isEmptyPair(r))i=0;else{i=r[r.length-1].getFinderPattern().getStartEnd()[1]}var s=r.length%2!=0;this.startFromEven&&(s=!s);for(var u=!1;i<a&&(u=!t.get(i));)i++;for(var c=0,l=i,d=i;d<a;d++)if(t.get(d)!==u)o[c]++;else{if(3===c){if(s&&e.reverseCounters(o),e.isFinderPattern(o))return this.startEnd[0]=l,void(this.startEnd[1]=d);s&&e.reverseCounters(o),l+=o[0]+o[1],o[0]=o[2],o[1]=o[3],o[2]=0,o[3]=0,c--}else c++;o[c]=1,u=!u}throw new $a},e.reverseCounters=function(t){for(var e=t.length,r=0;r<e/2;++r){var n=t[r];t[r]=t[e-r-1],t[e-r-1]=n}},e.prototype.parseFoundFinderPattern=function(t,r,n){var o,i,a;if(n){for(var s=this.startEnd[0]-1;s>=0&&!t.get(s);)s--;s++,o=this.startEnd[0]-s,i=s,a=this.startEnd[1]}else i=this.startEnd[0],o=(a=t.getNextUnset(this.startEnd[1]+1))-this.startEnd[1];var u,c=this.getDecodeFinderCounters();Da.arraycopy(c,0,c,1,c.length-1),c[0]=o;try{u=this.parseFinderValue(c,e.FINDER_PATTERNS)}catch(t){return null}return new ku(u,[i,a],i,a,r)},e.prototype.decodeDataCharacter=function(t,r,n,o){for(var i=this.getDataCharacterCounters(),a=0;a<i.length;a++)i[a]=0;if(o)e.recordPatternInReverse(t,r.getStartEnd()[0],i);else{e.recordPattern(t,r.getStartEnd()[1],i);for(var s=0,u=i.length-1;s<u;s++,u--){var c=i[s];i[s]=i[u],i[u]=c}}var l=Rs.sum(new Int32Array(i))/17,d=(r.getStartEnd()[1]-r.getStartEnd()[0])/15;if(Math.abs(l-d)/d>.3)throw new $a;var h=this.getOddCounts(),f=this.getEvenCounts(),p=this.getOddRoundingErrors(),g=this.getEvenRoundingErrors();for(s=0;s<i.length;s++){var m=1*i[s]/l,y=m+.5;if(y<1){if(m<.3)throw new $a;y=1}else if(y>8){if(m>8.7)throw new $a;y=8}var w=s/2;1&s?(f[w]=y,g[w]=m-y):(h[w]=y,p[w]=m-y)}this.adjustOddEvenCounts(17);var _=4*r.getValue()+(n?0:2)+(o?0:1)-1,v=0,E=0;for(s=h.length-1;s>=0;s--){if(e.isNotA1left(r,n,o)){var b=e.WEIGHTS[_][2*s];E+=h[s]*b}v+=h[s]}var A=0;for(s=f.length-1;s>=0;s--)if(e.isNotA1left(r,n,o)){b=e.WEIGHTS[_][2*s+1];A+=f[s]*b}var C=E+A;if(1&v||v>13||v<4)throw new $a;var I=(13-v)/2,S=e.SYMBOL_WIDEST[I],T=9-S,D=Pu.getRSSvalue(h,S,!0),O=Pu.getRSSvalue(f,T,!1),R=e.EVEN_TOTAL_SUBSET[I],M=e.GSUM[I];return new Nu(D*R+O+M,C)},e.isNotA1left=function(t,e,r){return!(0===t.getValue()&&e&&r)},e.prototype.adjustOddEvenCounts=function(t){var r=Rs.sum(new Int32Array(this.getOddCounts())),n=Rs.sum(new Int32Array(this.getEvenCounts())),o=!1,i=!1;r>13?i=!0:r<4&&(o=!0);var a=!1,s=!1;n>13?s=!0:n<4&&(a=!0);var u=r+n-t,c=!(1&~r),l=!(1&n);if(1===u)if(c){if(l)throw new $a;i=!0}else{if(!l)throw new $a;s=!0}else if(-1===u)if(c){if(l)throw new $a;o=!0}else{if(!l)throw new $a;a=!0}else{if(0!==u)throw new $a;if(c){if(!l)throw new $a;r<n?(o=!0,s=!0):(i=!0,a=!0)}else if(l)throw new $a}if(o){if(i)throw new $a;e.increment(this.getOddCounts(),this.getOddRoundingErrors())}if(i&&e.decrement(this.getOddCounts(),this.getOddRoundingErrors()),a){if(s)throw new $a;e.increment(this.getEvenCounts(),this.getOddRoundingErrors())}s&&e.decrement(this.getEvenCounts(),this.getEvenRoundingErrors())},e.SYMBOL_WIDEST=[7,5,4,3,1],e.EVEN_TOTAL_SUBSET=[4,20,52,104,204],e.GSUM=[0,348,1388,2948,3988],e.FINDER_PATTERNS=[Int32Array.from([1,8,4,1]),Int32Array.from([3,6,4,1]),Int32Array.from([3,4,6,1]),Int32Array.from([3,2,8,1]),Int32Array.from([2,6,5,1]),Int32Array.from([2,2,9,1])],e.WEIGHTS=[[1,3,9,27,81,32,96,77],[20,60,180,118,143,7,21,63],[189,145,13,39,117,140,209,205],[193,157,49,147,19,57,171,91],[62,186,136,197,169,85,44,132],[185,133,188,142,4,12,36,108],[113,128,173,97,80,29,87,50],[150,28,84,41,123,158,52,156],[46,138,203,187,139,206,196,166],[76,17,51,153,37,111,122,155],[43,129,176,106,107,110,119,146],[16,48,144,10,30,90,59,177],[109,116,137,200,178,112,125,164],[70,210,208,202,184,130,179,115],[134,191,151,31,93,68,204,190],[148,22,66,198,172,94,71,2],[6,18,54,162,64,192,154,40],[120,149,25,75,14,42,126,167],[79,26,78,23,69,207,199,175],[103,98,83,38,114,131,182,124],[161,61,183,127,170,88,53,159],[55,165,73,8,24,72,5,15],[45,135,194,160,58,174,100,89]],e.FINDER_PAT_A=0,e.FINDER_PAT_B=1,e.FINDER_PAT_C=2,e.FINDER_PAT_D=3,e.FINDER_PAT_E=4,e.FINDER_PAT_F=5,e.FINDER_PATTERN_SEQUENCES=[[e.FINDER_PAT_A,e.FINDER_PAT_A],[e.FINDER_PAT_A,e.FINDER_PAT_B,e.FINDER_PAT_B],[e.FINDER_PAT_A,e.FINDER_PAT_C,e.FINDER_PAT_B,e.FINDER_PAT_D],[e.FINDER_PAT_A,e.FINDER_PAT_E,e.FINDER_PAT_B,e.FINDER_PAT_D,e.FINDER_PAT_C],[e.FINDER_PAT_A,e.FINDER_PAT_E,e.FINDER_PAT_B,e.FINDER_PAT_D,e.FINDER_PAT_D,e.FINDER_PAT_F],[e.FINDER_PAT_A,e.FINDER_PAT_E,e.FINDER_PAT_B,e.FINDER_PAT_D,e.FINDER_PAT_E,e.FINDER_PAT_F,e.FINDER_PAT_F],[e.FINDER_PAT_A,e.FINDER_PAT_A,e.FINDER_PAT_B,e.FINDER_PAT_B,e.FINDER_PAT_C,e.FINDER_PAT_C,e.FINDER_PAT_D,e.FINDER_PAT_D],[e.FINDER_PAT_A,e.FINDER_PAT_A,e.FINDER_PAT_B,e.FINDER_PAT_B,e.FINDER_PAT_C,e.FINDER_PAT_C,e.FINDER_PAT_D,e.FINDER_PAT_E,e.FINDER_PAT_E],[e.FINDER_PAT_A,e.FINDER_PAT_A,e.FINDER_PAT_B,e.FINDER_PAT_B,e.FINDER_PAT_C,e.FINDER_PAT_C,e.FINDER_PAT_D,e.FINDER_PAT_E,e.FINDER_PAT_F,e.FINDER_PAT_F],[e.FINDER_PAT_A,e.FINDER_PAT_A,e.FINDER_PAT_B,e.FINDER_PAT_B,e.FINDER_PAT_C,e.FINDER_PAT_D,e.FINDER_PAT_D,e.FINDER_PAT_E,e.FINDER_PAT_E,e.FINDER_PAT_F,e.FINDER_PAT_F]],e.MAX_PAIRS=11,e}(Mu),vc=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ec=function(t){function e(e,r,n){var o=t.call(this,e,r)||this;return o.count=0,o.finderPattern=n,o}return vc(e,t),e.prototype.getFinderPattern=function(){return this.finderPattern},e.prototype.getCount=function(){return this.count},e.prototype.incrementCount=function(){this.count++},e}(Nu),bc=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ac=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Cc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.possibleLeftPairs=[],e.possibleRightPairs=[],e}return bc(e,t),e.prototype.decodeRow=function(t,r,n){var o,i,a,s,u=this.decodePair(r,!1,t,n);e.addOrTally(this.possibleLeftPairs,u),r.reverse();var c=this.decodePair(r,!0,t,n);e.addOrTally(this.possibleRightPairs,c),r.reverse();try{for(var l=Ac(this.possibleLeftPairs),d=l.next();!d.done;d=l.next()){var h=d.value;if(h.getCount()>1)try{for(var f=(a=void 0,Ac(this.possibleRightPairs)),p=f.next();!p.done;p=f.next()){var g=p.value;if(g.getCount()>1&&e.checkChecksum(h,g))return e.constructResult(h,g)}}catch(t){a={error:t}}finally{try{p&&!p.done&&(s=f.return)&&s.call(f)}finally{if(a)throw a.error}}}}catch(t){o={error:t}}finally{try{d&&!d.done&&(i=l.return)&&i.call(l)}finally{if(o)throw o.error}}throw new $a},e.addOrTally=function(t,e){var r,n;if(null!=e){var o=!1;try{for(var i=Ac(t),a=i.next();!a.done;a=i.next()){var s=a.value;if(s.getValue()===e.getValue()){s.incrementCount(),o=!0;break}}}catch(t){r={error:t}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}o||t.push(e)}},e.prototype.reset=function(){this.possibleLeftPairs.length=0,this.possibleRightPairs.length=0},e.constructResult=function(t,e){for(var r=4537077*t.getValue()+e.getValue(),n=new String(r).toString(),o=new Za,i=13-n.length;i>0;i--)o.append("0");o.append(n);var a=0;for(i=0;i<13;i++){var s=o.charAt(i).charCodeAt(0)-"0".charCodeAt(0);a+=1&i?s:3*s}10===(a=10-a%10)&&(a=0),o.append(a.toString());var u=t.getFinderPattern().getResultPoints(),c=e.getFinderPattern().getResultPoints();return new hs(o.toString(),null,0,[u[0],u[1],c[0],c[1]],ps.RSS_14,(new Date).getTime())},e.checkChecksum=function(t,e){var r=(t.getChecksumPortion()+16*e.getChecksumPortion())%79,n=9*t.getFinderPattern().getValue()+e.getFinderPattern().getValue();return n>72&&n--,n>8&&n--,r===n},e.prototype.decodePair=function(t,e,r,n){try{var o=this.findFinderPattern(t,e),i=this.parseFoundFinderPattern(t,r,e,o),a=null==n?null:n.get(La.NEED_RESULT_POINT_CALLBACK);if(null!=a){var s=(o[0]+o[1])/2;e&&(s=t.getSize()-1-s),a.foundPossibleResultPoint(new Ns(s,r))}var u=this.decodeDataCharacter(t,i,!0),c=this.decodeDataCharacter(t,i,!1);return new Ec(1597*u.getValue()+c.getValue(),u.getChecksumPortion()+4*c.getChecksumPortion(),i)}catch(t){return null}},e.prototype.decodeDataCharacter=function(t,r,n){for(var o=this.getDataCharacterCounters(),i=0;i<o.length;i++)o[i]=0;if(n)Xs.recordPatternInReverse(t,r.getStartEnd()[0],o);else{Xs.recordPattern(t,r.getStartEnd()[1]+1,o);for(var a=0,s=o.length-1;a<s;a++,s--){var u=o[a];o[a]=o[s],o[s]=u}}var c=n?16:15,l=Rs.sum(new Int32Array(o))/c,d=this.getOddCounts(),h=this.getEvenCounts(),f=this.getOddRoundingErrors(),p=this.getEvenRoundingErrors();for(a=0;a<o.length;a++){var g=o[a]/l,m=Math.floor(g+.5);m<1?m=1:m>8&&(m=8);var y=Math.floor(a/2);1&a?(h[y]=m,p[y]=g-m):(d[y]=m,f[y]=g-m)}this.adjustOddEvenCounts(n,c);var w=0,_=0;for(a=d.length-1;a>=0;a--)_*=9,_+=d[a],w+=d[a];var v=0,E=0;for(a=h.length-1;a>=0;a--)v*=9,v+=h[a],E+=h[a];var b=_+3*v;if(n){if(1&w||w>12||w<4)throw new $a;var A=(12-w)/2,C=9-(O=e.OUTSIDE_ODD_WIDEST[A]),I=Pu.getRSSvalue(d,O,!1),S=Pu.getRSSvalue(h,C,!0),T=e.OUTSIDE_EVEN_TOTAL_SUBSET[A],D=e.OUTSIDE_GSUM[A];return new Nu(I*T+S+D,b)}if(1&E||E>10||E<4)throw new $a;A=(10-E)/2,C=9-(O=e.INSIDE_ODD_WIDEST[A]),I=Pu.getRSSvalue(d,O,!0),S=Pu.getRSSvalue(h,C,!1);var O,R=e.INSIDE_ODD_TOTAL_SUBSET[A];D=e.INSIDE_GSUM[A];return new Nu(S*R+I+D,b)},e.prototype.findFinderPattern=function(t,e){var r=this.getDecodeFinderCounters();r[0]=0,r[1]=0,r[2]=0,r[3]=0;for(var n=t.getSize(),o=!1,i=0;i<n&&e!==(o=!t.get(i));)i++;for(var a=0,s=i,u=i;u<n;u++)if(t.get(u)!==o)r[a]++;else{if(3===a){if(Mu.isFinderPattern(r))return[s,u];s+=r[0]+r[1],r[0]=r[2],r[1]=r[3],r[2]=0,r[3]=0,a--}else a++;r[a]=1,o=!o}throw new $a},e.prototype.parseFoundFinderPattern=function(t,r,n,o){for(var i=t.get(o[0]),a=o[0]-1;a>=0&&i!==t.get(a);)a--;a++;var s=o[0]-a,u=this.getDecodeFinderCounters(),c=new Int32Array(u.length);Da.arraycopy(u,0,c,1,u.length-1),c[0]=s;var l=this.parseFinderValue(c,e.FINDER_PATTERNS),d=a,h=o[1];return n&&(d=t.getSize()-1-d,h=t.getSize()-1-h),new ku(l,[a,o[1]],d,h,r)},e.prototype.adjustOddEvenCounts=function(t,e){var r=Rs.sum(new Int32Array(this.getOddCounts())),n=Rs.sum(new Int32Array(this.getEvenCounts())),o=!1,i=!1,a=!1,s=!1;t?(r>12?i=!0:r<4&&(o=!0),n>12?s=!0:n<4&&(a=!0)):(r>11?i=!0:r<5&&(o=!0),n>10?s=!0:n<4&&(a=!0));var u=r+n-e,c=(1&r)==(t?1:0),l=!(1&~n);if(1===u)if(c){if(l)throw new $a;i=!0}else{if(!l)throw new $a;s=!0}else if(-1===u)if(c){if(l)throw new $a;o=!0}else{if(!l)throw new $a;a=!0}else{if(0!==u)throw new $a;if(c){if(!l)throw new $a;r<n?(o=!0,s=!0):(i=!0,a=!0)}else if(l)throw new $a}if(o){if(i)throw new $a;Mu.increment(this.getOddCounts(),this.getOddRoundingErrors())}if(i&&Mu.decrement(this.getOddCounts(),this.getOddRoundingErrors()),a){if(s)throw new $a;Mu.increment(this.getEvenCounts(),this.getOddRoundingErrors())}s&&Mu.decrement(this.getEvenCounts(),this.getEvenRoundingErrors())},e.OUTSIDE_EVEN_TOTAL_SUBSET=[1,10,34,70,126],e.INSIDE_ODD_TOTAL_SUBSET=[4,20,48,81],e.OUTSIDE_GSUM=[0,161,961,2015,2715],e.INSIDE_GSUM=[0,336,1036,1516],e.OUTSIDE_ODD_WIDEST=[8,6,4,3,1],e.INSIDE_ODD_WIDEST=[2,4,6,8],e.FINDER_PATTERNS=[Int32Array.from([3,8,2,1]),Int32Array.from([3,5,5,1]),Int32Array.from([3,3,7,1]),Int32Array.from([3,1,9,1]),Int32Array.from([2,7,4,1]),Int32Array.from([2,5,6,1]),Int32Array.from([2,3,8,1]),Int32Array.from([1,5,7,1]),Int32Array.from([1,3,9,1])],e}(Mu),Ic=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Sc=function(t){function e(e){var r=t.call(this)||this;r.readers=[];var n=e?e.get(La.POSSIBLE_FORMATS):null,o=e&&void 0!==e.get(La.ASSUME_CODE_39_CHECK_DIGIT),i=e&&void 0!==e.get(La.ENABLE_CODE_39_EXTENDED_MODE);return n&&((n.includes(ps.EAN_13)||n.includes(ps.UPC_A)||n.includes(ps.EAN_8)||n.includes(ps.UPC_E))&&r.readers.push(new Su(e)),n.includes(ps.CODE_39)&&r.readers.push(new $s(o,i)),n.includes(ps.CODE_93)&&r.readers.push(new tu),n.includes(ps.CODE_128)&&r.readers.push(new Zs),n.includes(ps.ITF)&&r.readers.push(new nu),n.includes(ps.CODABAR)&&r.readers.push(new Du),n.includes(ps.RSS_14)&&r.readers.push(new Cc),n.includes(ps.RSS_EXPANDED)&&(console.warn("RSS Expanded reader IS NOT ready for production yet! use at your own risk."),r.readers.push(new _c))),0===r.readers.length&&(r.readers.push(new Su(e)),r.readers.push(new $s),r.readers.push(new tu),r.readers.push(new Su(e)),r.readers.push(new Zs),r.readers.push(new nu),r.readers.push(new Cc)),r}return Ic(e,t),e.prototype.decodeRow=function(t,e,r){for(var n=0;n<this.readers.length;n++)try{return this.readers[n].decodeRow(t,e,r)}catch(t){}throw new $a},e.prototype.reset=function(){this.readers.forEach((function(t){return t.reset()}))},e}(Xs),Tc=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){function e(e,r){return void 0===e&&(e=500),t.call(this,new Sc(r),e,r)||this}Tc(e,t)}(ds);var Dc,Oc=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Rc=function(){function t(t,e,r){this.ecCodewords=t,this.ecBlocks=[e],r&&this.ecBlocks.push(r)}return t.prototype.getECCodewords=function(){return this.ecCodewords},t.prototype.getECBlocks=function(){return this.ecBlocks},t}(),Mc=function(){function t(t,e){this.count=t,this.dataCodewords=e}return t.prototype.getCount=function(){return this.count},t.prototype.getDataCodewords=function(){return this.dataCodewords},t}(),Nc=function(){function t(t,e,r,n,o,i){var a,s;this.versionNumber=t,this.symbolSizeRows=e,this.symbolSizeColumns=r,this.dataRegionSizeRows=n,this.dataRegionSizeColumns=o,this.ecBlocks=i;var u=0,c=i.getECCodewords(),l=i.getECBlocks();try{for(var d=Oc(l),h=d.next();!h.done;h=d.next()){var f=h.value;u+=f.getCount()*(f.getDataCodewords()+c)}}catch(t){a={error:t}}finally{try{h&&!h.done&&(s=d.return)&&s.call(d)}finally{if(a)throw a.error}}this.totalCodewords=u}return t.prototype.getVersionNumber=function(){return this.versionNumber},t.prototype.getSymbolSizeRows=function(){return this.symbolSizeRows},t.prototype.getSymbolSizeColumns=function(){return this.symbolSizeColumns},t.prototype.getDataRegionSizeRows=function(){return this.dataRegionSizeRows},t.prototype.getDataRegionSizeColumns=function(){return this.dataRegionSizeColumns},t.prototype.getTotalCodewords=function(){return this.totalCodewords},t.prototype.getECBlocks=function(){return this.ecBlocks},t.getVersionForDimensions=function(e,r){var n,o;if(1&e||1&r)throw new Ua;try{for(var i=Oc(t.VERSIONS),a=i.next();!a.done;a=i.next()){var s=a.value;if(s.symbolSizeRows===e&&s.symbolSizeColumns===r)return s}}catch(t){n={error:t}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}throw new Ua},t.prototype.toString=function(){return""+this.versionNumber},t.buildVersions=function(){return[new t(1,10,10,8,8,new Rc(5,new Mc(1,3))),new t(2,12,12,10,10,new Rc(7,new Mc(1,5))),new t(3,14,14,12,12,new Rc(10,new Mc(1,8))),new t(4,16,16,14,14,new Rc(12,new Mc(1,12))),new t(5,18,18,16,16,new Rc(14,new Mc(1,18))),new t(6,20,20,18,18,new Rc(18,new Mc(1,22))),new t(7,22,22,20,20,new Rc(20,new Mc(1,30))),new t(8,24,24,22,22,new Rc(24,new Mc(1,36))),new t(9,26,26,24,24,new Rc(28,new Mc(1,44))),new t(10,32,32,14,14,new Rc(36,new Mc(1,62))),new t(11,36,36,16,16,new Rc(42,new Mc(1,86))),new t(12,40,40,18,18,new Rc(48,new Mc(1,114))),new t(13,44,44,20,20,new Rc(56,new Mc(1,144))),new t(14,48,48,22,22,new Rc(68,new Mc(1,174))),new t(15,52,52,24,24,new Rc(42,new Mc(2,102))),new t(16,64,64,14,14,new Rc(56,new Mc(2,140))),new t(17,72,72,16,16,new Rc(36,new Mc(4,92))),new t(18,80,80,18,18,new Rc(48,new Mc(4,114))),new t(19,88,88,20,20,new Rc(56,new Mc(4,144))),new t(20,96,96,22,22,new Rc(68,new Mc(4,174))),new t(21,104,104,24,24,new Rc(56,new Mc(6,136))),new t(22,120,120,18,18,new Rc(68,new Mc(6,175))),new t(23,132,132,20,20,new Rc(62,new Mc(8,163))),new t(24,144,144,22,22,new Rc(62,new Mc(8,156),new Mc(2,155))),new t(25,8,18,6,16,new Rc(7,new Mc(1,5))),new t(26,8,32,6,14,new Rc(11,new Mc(1,10))),new t(27,12,26,10,24,new Rc(14,new Mc(1,16))),new t(28,12,36,10,16,new Rc(18,new Mc(1,22))),new t(29,16,36,14,16,new Rc(24,new Mc(1,32))),new t(30,16,48,14,22,new Rc(28,new Mc(1,49)))]},t.VERSIONS=t.buildVersions(),t}(),kc=function(){function t(e){var r=e.getHeight();if(r<8||r>144||1&r)throw new Ua;this.version=t.readVersion(e),this.mappingBitMatrix=this.extractDataRegion(e),this.readMappingMatrix=new qa(this.mappingBitMatrix.getWidth(),this.mappingBitMatrix.getHeight())}return t.prototype.getVersion=function(){return this.version},t.readVersion=function(t){var e=t.getHeight(),r=t.getWidth();return Nc.getVersionForDimensions(e,r)},t.prototype.readCodewords=function(){var t=new Int8Array(this.version.getTotalCodewords()),e=0,r=4,n=0,o=this.mappingBitMatrix.getHeight(),i=this.mappingBitMatrix.getWidth(),a=!1,s=!1,u=!1,c=!1;do{if(r!==o||0!==n||a)if(r===o-2&&0===n&&3&i&&!s)t[e++]=255&this.readCorner2(o,i),r-=2,n+=2,s=!0;else if(r!==o+4||2!==n||7&i||u)if(r!==o-2||0!==n||4!=(7&i)||c){do{r<o&&n>=0&&!this.readMappingMatrix.get(n,r)&&(t[e++]=255&this.readUtah(r,n,o,i)),r-=2,n+=2}while(r>=0&&n<i);r+=1,n+=3;do{r>=0&&n<i&&!this.readMappingMatrix.get(n,r)&&(t[e++]=255&this.readUtah(r,n,o,i)),r+=2,n-=2}while(r<o&&n>=0);r+=3,n+=1}else t[e++]=255&this.readCorner4(o,i),r-=2,n+=2,c=!0;else t[e++]=255&this.readCorner3(o,i),r-=2,n+=2,u=!0;else t[e++]=255&this.readCorner1(o,i),r-=2,n+=2,a=!0}while(r<o||n<i);if(e!==this.version.getTotalCodewords())throw new Ua;return t},t.prototype.readModule=function(t,e,r,n){return t<0&&(t+=r,e+=4-(r+4&7)),e<0&&(e+=n,t+=4-(n+4&7)),this.readMappingMatrix.set(e,t),this.mappingBitMatrix.get(e,t)},t.prototype.readUtah=function(t,e,r,n){var o=0;return this.readModule(t-2,e-2,r,n)&&(o|=1),o<<=1,this.readModule(t-2,e-1,r,n)&&(o|=1),o<<=1,this.readModule(t-1,e-2,r,n)&&(o|=1),o<<=1,this.readModule(t-1,e-1,r,n)&&(o|=1),o<<=1,this.readModule(t-1,e,r,n)&&(o|=1),o<<=1,this.readModule(t,e-2,r,n)&&(o|=1),o<<=1,this.readModule(t,e-1,r,n)&&(o|=1),o<<=1,this.readModule(t,e,r,n)&&(o|=1),o},t.prototype.readCorner1=function(t,e){var r=0;return this.readModule(t-1,0,t,e)&&(r|=1),r<<=1,this.readModule(t-1,1,t,e)&&(r|=1),r<<=1,this.readModule(t-1,2,t,e)&&(r|=1),r<<=1,this.readModule(0,e-2,t,e)&&(r|=1),r<<=1,this.readModule(0,e-1,t,e)&&(r|=1),r<<=1,this.readModule(1,e-1,t,e)&&(r|=1),r<<=1,this.readModule(2,e-1,t,e)&&(r|=1),r<<=1,this.readModule(3,e-1,t,e)&&(r|=1),r},t.prototype.readCorner2=function(t,e){var r=0;return this.readModule(t-3,0,t,e)&&(r|=1),r<<=1,this.readModule(t-2,0,t,e)&&(r|=1),r<<=1,this.readModule(t-1,0,t,e)&&(r|=1),r<<=1,this.readModule(0,e-4,t,e)&&(r|=1),r<<=1,this.readModule(0,e-3,t,e)&&(r|=1),r<<=1,this.readModule(0,e-2,t,e)&&(r|=1),r<<=1,this.readModule(0,e-1,t,e)&&(r|=1),r<<=1,this.readModule(1,e-1,t,e)&&(r|=1),r},t.prototype.readCorner3=function(t,e){var r=0;return this.readModule(t-1,0,t,e)&&(r|=1),r<<=1,this.readModule(t-1,e-1,t,e)&&(r|=1),r<<=1,this.readModule(0,e-3,t,e)&&(r|=1),r<<=1,this.readModule(0,e-2,t,e)&&(r|=1),r<<=1,this.readModule(0,e-1,t,e)&&(r|=1),r<<=1,this.readModule(1,e-3,t,e)&&(r|=1),r<<=1,this.readModule(1,e-2,t,e)&&(r|=1),r<<=1,this.readModule(1,e-1,t,e)&&(r|=1),r},t.prototype.readCorner4=function(t,e){var r=0;return this.readModule(t-3,0,t,e)&&(r|=1),r<<=1,this.readModule(t-2,0,t,e)&&(r|=1),r<<=1,this.readModule(t-1,0,t,e)&&(r|=1),r<<=1,this.readModule(0,e-2,t,e)&&(r|=1),r<<=1,this.readModule(0,e-1,t,e)&&(r|=1),r<<=1,this.readModule(1,e-1,t,e)&&(r|=1),r<<=1,this.readModule(2,e-1,t,e)&&(r|=1),r<<=1,this.readModule(3,e-1,t,e)&&(r|=1),r},t.prototype.extractDataRegion=function(t){var e=this.version.getSymbolSizeRows(),r=this.version.getSymbolSizeColumns();if(t.getHeight()!==e)throw new Aa("Dimension of bitMatrix must match the version size");for(var n=this.version.getDataRegionSizeRows(),o=this.version.getDataRegionSizeColumns(),i=e/n|0,a=r/o|0,s=new qa(a*o,i*n),u=0;u<i;++u)for(var c=u*n,l=0;l<a;++l)for(var d=l*o,h=0;h<n;++h)for(var f=u*(n+2)+1+h,p=c+h,g=0;g<o;++g){var m=l*(o+2)+1+g;if(t.get(m,f)){var y=d+g;s.set(y,p)}}return s},t}(),xc=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Pc=function(){function t(t,e){this.numDataCodewords=t,this.codewords=e}return t.getDataBlocks=function(e,r){var n,o,i,a,s=r.getECBlocks(),u=0,c=s.getECBlocks();try{for(var l=xc(c),d=l.next();!d.done;d=l.next()){u+=(m=d.value).getCount()}}catch(t){n={error:t}}finally{try{d&&!d.done&&(o=l.return)&&o.call(l)}finally{if(n)throw n.error}}var h=new Array(u),f=0;try{for(var p=xc(c),g=p.next();!g.done;g=p.next())for(var m=g.value,y=0;y<m.getCount();y++){var w=m.getDataCodewords(),_=s.getECCodewords()+w;h[f++]=new t(w,new Uint8Array(_))}}catch(t){i={error:t}}finally{try{g&&!g.done&&(a=p.return)&&a.call(p)}finally{if(i)throw i.error}}var v=h[0].codewords.length-s.getECCodewords(),E=v-1,b=0;for(y=0;y<E;y++)for(var A=0;A<f;A++)h[A].codewords[y]=e[b++];var C=24===r.getVersionNumber(),I=C?8:f;for(A=0;A<I;A++)h[A].codewords[v-1]=e[b++];var S=h[0].codewords.length;for(y=v;y<S;y++)for(A=0;A<f;A++){var T=C?(A+8)%f:A,D=C&&T>7?y-1:y;h[T].codewords[D]=e[b++]}if(b!==e.length)throw new Aa;return h},t.prototype.getNumDataCodewords=function(){return this.numDataCodewords},t.prototype.getCodewords=function(){return this.codewords},t}(),Bc=function(){function t(t){this.bytes=t,this.byteOffset=0,this.bitOffset=0}return t.prototype.getBitOffset=function(){return this.bitOffset},t.prototype.getByteOffset=function(){return this.byteOffset},t.prototype.readBits=function(t){if(t<1||t>32||t>this.available())throw new Aa(""+t);var e=0,r=this.bitOffset,n=this.byteOffset,o=this.bytes;if(r>0){var i=8-r,a=t<i?t:i,s=255>>8-a<<(u=i-a);e=(o[n]&s)>>u,t-=a,8===(r+=a)&&(r=0,n++)}if(t>0){for(;t>=8;)e=e<<8|255&o[n],n++,t-=8;if(t>0){var u;s=255>>(u=8-t)<<u;e=e<<t|(o[n]&s)>>u,r+=t}}return this.bitOffset=r,this.byteOffset=n,e},t.prototype.available=function(){return 8*(this.bytes.length-this.byteOffset)-this.bitOffset},t}();!function(t){t[t.PAD_ENCODE=0]="PAD_ENCODE",t[t.ASCII_ENCODE=1]="ASCII_ENCODE",t[t.C40_ENCODE=2]="C40_ENCODE",t[t.TEXT_ENCODE=3]="TEXT_ENCODE",t[t.ANSIX12_ENCODE=4]="ANSIX12_ENCODE",t[t.EDIFACT_ENCODE=5]="EDIFACT_ENCODE",t[t.BASE256_ENCODE=6]="BASE256_ENCODE"}(Dc||(Dc={}));var Fc,Lc=function(){function t(){}return t.decode=function(t){var e=new Bc(t),r=new Za,n=new Za,o=new Array,i=Dc.ASCII_ENCODE;do{if(i===Dc.ASCII_ENCODE)i=this.decodeAsciiSegment(e,r,n);else{switch(i){case Dc.C40_ENCODE:this.decodeC40Segment(e,r);break;case Dc.TEXT_ENCODE:this.decodeTextSegment(e,r);break;case Dc.ANSIX12_ENCODE:this.decodeAnsiX12Segment(e,r);break;case Dc.EDIFACT_ENCODE:this.decodeEdifactSegment(e,r);break;case Dc.BASE256_ENCODE:this.decodeBase256Segment(e,r,o);break;default:throw new Ua}i=Dc.ASCII_ENCODE}}while(i!==Dc.PAD_ENCODE&&e.available()>0);return n.length()>0&&r.append(n.toString()),new ys(t,r.toString(),0===o.length?null:o,null)},t.decodeAsciiSegment=function(t,e,r){var n=!1;do{var o=t.readBits(8);if(0===o)throw new Ua;if(o<=128)return n&&(o+=128),e.append(String.fromCharCode(o-1)),Dc.ASCII_ENCODE;if(129===o)return Dc.PAD_ENCODE;if(o<=229){var i=o-130;i<10&&e.append("0"),e.append(""+i)}else switch(o){case 230:return Dc.C40_ENCODE;case 231:return Dc.BASE256_ENCODE;case 232:e.append(String.fromCharCode(29));break;case 233:case 234:case 241:break;case 235:n=!0;break;case 236:e.append("[)>05"),r.insert(0,"");break;case 237:e.append("[)>06"),r.insert(0,"");break;case 238:return Dc.ANSIX12_ENCODE;case 239:return Dc.TEXT_ENCODE;case 240:return Dc.EDIFACT_ENCODE;default:if(254!==o||0!==t.available())throw new Ua}}while(t.available()>0);return Dc.ASCII_ENCODE},t.decodeC40Segment=function(t,e){var r=!1,n=[],o=0;do{if(8===t.available())return;var i=t.readBits(8);if(254===i)return;this.parseTwoBytes(i,t.readBits(8),n);for(var a=0;a<3;a++){var s=n[a];switch(o){case 0:if(s<3)o=s+1;else{if(!(s<this.C40_BASIC_SET_CHARS.length))throw new Ua;var u=this.C40_BASIC_SET_CHARS[s];r?(e.append(String.fromCharCode(u.charCodeAt(0)+128)),r=!1):e.append(u)}break;case 1:r?(e.append(String.fromCharCode(s+128)),r=!1):e.append(String.fromCharCode(s)),o=0;break;case 2:if(s<this.C40_SHIFT2_SET_CHARS.length){u=this.C40_SHIFT2_SET_CHARS[s];r?(e.append(String.fromCharCode(u.charCodeAt(0)+128)),r=!1):e.append(u)}else switch(s){case 27:e.append(String.fromCharCode(29));break;case 30:r=!0;break;default:throw new Ua}o=0;break;case 3:r?(e.append(String.fromCharCode(s+224)),r=!1):e.append(String.fromCharCode(s+96)),o=0;break;default:throw new Ua}}}while(t.available()>0)},t.decodeTextSegment=function(t,e){var r=!1,n=[],o=0;do{if(8===t.available())return;var i=t.readBits(8);if(254===i)return;this.parseTwoBytes(i,t.readBits(8),n);for(var a=0;a<3;a++){var s=n[a];switch(o){case 0:if(s<3)o=s+1;else{if(!(s<this.TEXT_BASIC_SET_CHARS.length))throw new Ua;var u=this.TEXT_BASIC_SET_CHARS[s];r?(e.append(String.fromCharCode(u.charCodeAt(0)+128)),r=!1):e.append(u)}break;case 1:r?(e.append(String.fromCharCode(s+128)),r=!1):e.append(String.fromCharCode(s)),o=0;break;case 2:if(s<this.TEXT_SHIFT2_SET_CHARS.length){u=this.TEXT_SHIFT2_SET_CHARS[s];r?(e.append(String.fromCharCode(u.charCodeAt(0)+128)),r=!1):e.append(u)}else switch(s){case 27:e.append(String.fromCharCode(29));break;case 30:r=!0;break;default:throw new Ua}o=0;break;case 3:if(!(s<this.TEXT_SHIFT3_SET_CHARS.length))throw new Ua;u=this.TEXT_SHIFT3_SET_CHARS[s];r?(e.append(String.fromCharCode(u.charCodeAt(0)+128)),r=!1):e.append(u),o=0;break;default:throw new Ua}}}while(t.available()>0)},t.decodeAnsiX12Segment=function(t,e){var r=[];do{if(8===t.available())return;var n=t.readBits(8);if(254===n)return;this.parseTwoBytes(n,t.readBits(8),r);for(var o=0;o<3;o++){var i=r[o];switch(i){case 0:e.append("\r");break;case 1:e.append("*");break;case 2:e.append(">");break;case 3:e.append(" ");break;default:if(i<14)e.append(String.fromCharCode(i+44));else{if(!(i<40))throw new Ua;e.append(String.fromCharCode(i+51))}}}}while(t.available()>0)},t.parseTwoBytes=function(t,e,r){var n=(t<<8)+e-1,o=Math.floor(n/1600);r[0]=o,n-=1600*o,o=Math.floor(n/40),r[1]=o,r[2]=n-40*o},t.decodeEdifactSegment=function(t,e){do{if(t.available()<=16)return;for(var r=0;r<4;r++){var n=t.readBits(6);if(31===n){var o=8-t.getBitOffset();return void(8!==o&&t.readBits(o))}32&n||(n|=64),e.append(String.fromCharCode(n))}}while(t.available()>0)},t.decodeBase256Segment=function(t,e,r){var n,o=1+t.getByteOffset(),i=this.unrandomize255State(t.readBits(8),o++);if((n=0===i?t.available()/8|0:i<250?i:250*(i-249)+this.unrandomize255State(t.readBits(8),o++))<0)throw new Ua;for(var a=new Uint8Array(n),s=0;s<n;s++){if(t.available()<8)throw new Ua;a[s]=this.unrandomize255State(t.readBits(8),o++)}r.push(a);try{e.append(Xa.decode(a,Ya.ISO88591))}catch(t){throw new Ts("Platform does not support required encoding: "+t.message)}},t.unrandomize255State=function(t,e){var r=t-(149*e%255+1);return r>=0?r:r+256},t.C40_BASIC_SET_CHARS=["*","*","*"," ","0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],t.C40_SHIFT2_SET_CHARS=["!",'"',"#","$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","?","@","[","\\","]","^","_"],t.TEXT_BASIC_SET_CHARS=["*","*","*"," ","0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"],t.TEXT_SHIFT2_SET_CHARS=t.C40_SHIFT2_SET_CHARS,t.TEXT_SHIFT3_SET_CHARS=["`","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","{","|","}","~",String.fromCharCode(127)],t}(),zc=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Uc=function(){function t(){this.rsDecoder=new Ds(As.DATA_MATRIX_FIELD_256)}return t.prototype.decode=function(t){var e,r,n=new kc(t),o=n.getVersion(),i=n.readCodewords(),a=Pc.getDataBlocks(i,o),s=0;try{for(var u=zc(a),c=u.next();!c.done;c=u.next()){s+=c.value.getNumDataCodewords()}}catch(t){e={error:t}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(e)throw e.error}}for(var l=new Uint8Array(s),d=a.length,h=0;h<d;h++){var f=a[h],p=f.getCodewords(),g=f.getNumDataCodewords();this.correctErrors(p,g);for(var m=0;m<g;m++)l[m*d+h]=p[m]}return Lc.decode(l)},t.prototype.correctErrors=function(t,e){var r=new Int32Array(t);try{this.rsDecoder.decode(r,t.length-e)}catch(t){throw new Sa}for(var n=0;n<e;n++)t[n]=r[n]},t}(),Vc=function(){function t(t){this.image=t,this.rectangleDetector=new Bs(this.image)}return t.prototype.detect=function(){var e=this.rectangleDetector.detect(),r=this.detectSolid1(e);if((r=this.detectSolid2(r))[3]=this.correctTopRight(r),!r[3])throw new $a;var n=(r=this.shiftToModuleCenter(r))[0],o=r[1],i=r[2],a=r[3],s=this.transitionsBetween(n,a)+1,u=this.transitionsBetween(i,a)+1;1&~s||(s+=1),1&~u||(u+=1),4*s<7*u&&4*u<7*s&&(s=u=Math.max(s,u));var c=t.sampleGrid(this.image,n,o,i,a,s,u);return new ks(c,[n,o,i,a])},t.shiftPoint=function(t,e,r){var n=(e.getX()-t.getX())/(r+1),o=(e.getY()-t.getY())/(r+1);return new Ns(t.getX()+n,t.getY()+o)},t.moveAway=function(t,e,r){var n=t.getX(),o=t.getY();return n<e?n-=1:n+=1,o<r?o-=1:o+=1,new Ns(n,o)},t.prototype.detectSolid1=function(t){var e=t[0],r=t[1],n=t[3],o=t[2],i=this.transitionsBetween(e,r),a=this.transitionsBetween(r,n),s=this.transitionsBetween(n,o),u=this.transitionsBetween(o,e),c=i,l=[o,e,r,n];return c>a&&(c=a,l[0]=e,l[1]=r,l[2]=n,l[3]=o),c>s&&(c=s,l[0]=r,l[1]=n,l[2]=o,l[3]=e),c>u&&(l[0]=n,l[1]=o,l[2]=e,l[3]=r),l},t.prototype.detectSolid2=function(e){var r=e[0],n=e[1],o=e[2],i=e[3],a=this.transitionsBetween(r,i),s=t.shiftPoint(n,o,4*(a+1)),u=t.shiftPoint(o,n,4*(a+1));return this.transitionsBetween(s,r)<this.transitionsBetween(u,i)?(e[0]=r,e[1]=n,e[2]=o,e[3]=i):(e[0]=n,e[1]=o,e[2]=i,e[3]=r),e},t.prototype.correctTopRight=function(e){var r=e[0],n=e[1],o=e[2],i=e[3],a=this.transitionsBetween(r,i),s=this.transitionsBetween(n,i),u=t.shiftPoint(r,n,4*(s+1)),c=t.shiftPoint(o,n,4*(a+1));a=this.transitionsBetween(u,i),s=this.transitionsBetween(c,i);var l=new Ns(i.getX()+(o.getX()-n.getX())/(a+1),i.getY()+(o.getY()-n.getY())/(a+1)),d=new Ns(i.getX()+(r.getX()-n.getX())/(s+1),i.getY()+(r.getY()-n.getY())/(s+1));return this.isValid(l)?this.isValid(d)?this.transitionsBetween(u,l)+this.transitionsBetween(c,l)>this.transitionsBetween(u,d)+this.transitionsBetween(c,d)?l:d:l:this.isValid(d)?d:null},t.prototype.shiftToModuleCenter=function(e){var r=e[0],n=e[1],o=e[2],i=e[3],a=this.transitionsBetween(r,i)+1,s=this.transitionsBetween(o,i)+1,u=t.shiftPoint(r,n,4*s),c=t.shiftPoint(o,n,4*a);1&~(a=this.transitionsBetween(u,i)+1)||(a+=1),1&~(s=this.transitionsBetween(c,i)+1)||(s+=1);var l,d,h=(r.getX()+n.getX()+o.getX()+i.getX())/4,f=(r.getY()+n.getY()+o.getY()+i.getY())/4;return r=t.moveAway(r,h,f),n=t.moveAway(n,h,f),o=t.moveAway(o,h,f),i=t.moveAway(i,h,f),u=t.shiftPoint(r,n,4*s),u=t.shiftPoint(u,i,4*a),l=t.shiftPoint(n,r,4*s),l=t.shiftPoint(l,o,4*a),c=t.shiftPoint(o,i,4*s),c=t.shiftPoint(c,n,4*a),d=t.shiftPoint(i,o,4*s),[u,l,c,d=t.shiftPoint(d,r,4*a)]},t.prototype.isValid=function(t){return t.getX()>=0&&t.getX()<this.image.getWidth()&&t.getY()>0&&t.getY()<this.image.getHeight()},t.sampleGrid=function(t,e,r,n,o,i,a){return Vs.getInstance().sampleGrid(t,i,a,.5,.5,i-.5,.5,i-.5,a-.5,.5,a-.5,e.getX(),e.getY(),o.getX(),o.getY(),n.getX(),n.getY(),r.getX(),r.getY())},t.prototype.transitionsBetween=function(t,e){var r=Math.trunc(t.getX()),n=Math.trunc(t.getY()),o=Math.trunc(e.getX()),i=Math.trunc(e.getY()),a=Math.abs(i-n)>Math.abs(o-r);if(a){var s=r;r=n,n=s,s=o,o=i,i=s}for(var u=Math.abs(o-r),c=Math.abs(i-n),l=-u/2,d=n<i?1:-1,h=r<o?1:-1,f=0,p=this.image.get(a?n:r,a?r:n),g=r,m=n;g!==o;g+=h){var y=this.image.get(a?m:g,a?g:m);if(y!==p&&(f++,p=y),(l+=c)>0){if(m===i)break;m+=d,l-=u}}return f},t}(),Hc=function(){function t(){this.decoder=new Uc}return t.prototype.decode=function(e,r){var n,o;if(void 0===r&&(r=null),null!=r&&r.has(La.PURE_BARCODE)){var i=t.extractPureBits(e.getBlackMatrix());n=this.decoder.decode(i),o=t.NO_POINTS}else{var a=new Vc(e.getBlackMatrix()).detect();n=this.decoder.decode(a.getBits()),o=a.getPoints()}var s=n.getRawBytes(),u=new hs(n.getText(),s,8*s.length,o,ps.DATA_MATRIX,Da.currentTimeMillis()),c=n.getByteSegments();null!=c&&u.putMetadata(ms.BYTE_SEGMENTS,c);var l=n.getECLevel();return null!=l&&u.putMetadata(ms.ERROR_CORRECTION_LEVEL,l),u},t.prototype.reset=function(){},t.extractPureBits=function(t){var e=t.getTopLeftOnBit(),r=t.getBottomRightOnBit();if(null==e||null==r)throw new $a;var n=this.moduleSize(e,t),o=e[1],i=r[1],a=e[0],s=(r[0]-a+1)/n,u=(i-o+1)/n;if(s<=0||u<=0)throw new $a;var c=n/2;o+=c,a+=c;for(var l=new qa(s,u),d=0;d<u;d++)for(var h=o+d*n,f=0;f<s;f++)t.get(a+f*n,h)&&l.set(f,d);return l},t.moduleSize=function(t,e){for(var r=e.getWidth(),n=t[0],o=t[1];n<r&&e.get(n,o);)n++;if(n===r)throw new $a;var i=n-t[0];if(0===i)throw new $a;return i},t.NO_POINTS=[],t}(),jc=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){function e(e){return void 0===e&&(e=500),t.call(this,new Hc,e)||this}jc(e,t)}(ds),function(t){t[t.L=0]="L",t[t.M=1]="M",t[t.Q=2]="Q",t[t.H=3]="H"}(Fc||(Fc={}));var Gc,Wc=function(){function t(e,r,n){this.value=e,this.stringValue=r,this.bits=n,t.FOR_BITS.set(n,this),t.FOR_VALUE.set(e,this)}return t.prototype.getValue=function(){return this.value},t.prototype.getBits=function(){return this.bits},t.fromString=function(e){switch(e){case"L":return t.L;case"M":return t.M;case"Q":return t.Q;case"H":return t.H;default:throw new Ea(e+"not available")}},t.prototype.toString=function(){return this.stringValue},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.value===r.value},t.forBits=function(e){if(e<0||e>=t.FOR_BITS.size)throw new Aa;return t.FOR_BITS.get(e)},t.FOR_BITS=new Map,t.FOR_VALUE=new Map,t.L=new t(Fc.L,"L",1),t.M=new t(Fc.M,"M",0),t.Q=new t(Fc.Q,"Q",3),t.H=new t(Fc.H,"H",2),t}(),Xc=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Yc=function(){function t(t){this.errorCorrectionLevel=Wc.forBits(t>>3&3),this.dataMask=7&t}return t.numBitsDiffering=function(t,e){return Pa.bitCount(t^e)},t.decodeFormatInformation=function(e,r){var n=t.doDecodeFormatInformation(e,r);return null!==n?n:t.doDecodeFormatInformation(e^t.FORMAT_INFO_MASK_QR,r^t.FORMAT_INFO_MASK_QR)},t.doDecodeFormatInformation=function(e,r){var n,o,i=Number.MAX_SAFE_INTEGER,a=0;try{for(var s=Xc(t.FORMAT_INFO_DECODE_LOOKUP),u=s.next();!u.done;u=s.next()){var c=u.value,l=c[0];if(l===e||l===r)return new t(c[1]);var d=t.numBitsDiffering(e,l);d<i&&(a=c[1],i=d),e!==r&&(d=t.numBitsDiffering(r,l))<i&&(a=c[1],i=d)}}catch(t){n={error:t}}finally{try{u&&!u.done&&(o=s.return)&&o.call(s)}finally{if(n)throw n.error}}return i<=3?new t(a):null},t.prototype.getErrorCorrectionLevel=function(){return this.errorCorrectionLevel},t.prototype.getDataMask=function(){return this.dataMask},t.prototype.hashCode=function(){return this.errorCorrectionLevel.getBits()<<3|this.dataMask},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.errorCorrectionLevel===r.errorCorrectionLevel&&this.dataMask===r.dataMask},t.FORMAT_INFO_MASK_QR=21522,t.FORMAT_INFO_DECODE_LOOKUP=[Int32Array.from([21522,0]),Int32Array.from([20773,1]),Int32Array.from([24188,2]),Int32Array.from([23371,3]),Int32Array.from([17913,4]),Int32Array.from([16590,5]),Int32Array.from([20375,6]),Int32Array.from([19104,7]),Int32Array.from([30660,8]),Int32Array.from([29427,9]),Int32Array.from([32170,10]),Int32Array.from([30877,11]),Int32Array.from([26159,12]),Int32Array.from([25368,13]),Int32Array.from([27713,14]),Int32Array.from([26998,15]),Int32Array.from([5769,16]),Int32Array.from([5054,17]),Int32Array.from([7399,18]),Int32Array.from([6608,19]),Int32Array.from([1890,20]),Int32Array.from([597,21]),Int32Array.from([3340,22]),Int32Array.from([2107,23]),Int32Array.from([13663,24]),Int32Array.from([12392,25]),Int32Array.from([16177,26]),Int32Array.from([14854,27]),Int32Array.from([9396,28]),Int32Array.from([8579,29]),Int32Array.from([11994,30]),Int32Array.from([11245,31])],t}(),Zc=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},qc=function(){function t(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];this.ecCodewordsPerBlock=t,this.ecBlocks=e}return t.prototype.getECCodewordsPerBlock=function(){return this.ecCodewordsPerBlock},t.prototype.getNumBlocks=function(){var t,e,r=0,n=this.ecBlocks;try{for(var o=Zc(n),i=o.next();!i.done;i=o.next()){r+=i.value.getCount()}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return r},t.prototype.getTotalECCodewords=function(){return this.ecCodewordsPerBlock*this.getNumBlocks()},t.prototype.getECBlocks=function(){return this.ecBlocks},t}(),Kc=function(){function t(t,e){this.count=t,this.dataCodewords=e}return t.prototype.getCount=function(){return this.count},t.prototype.getDataCodewords=function(){return this.dataCodewords},t}(),$c=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Jc=function(){function t(t,e){for(var r,n,o=[],i=2;i<arguments.length;i++)o[i-2]=arguments[i];this.versionNumber=t,this.alignmentPatternCenters=e,this.ecBlocks=o;var a=0,s=o[0].getECCodewordsPerBlock(),u=o[0].getECBlocks();try{for(var c=$c(u),l=c.next();!l.done;l=c.next()){var d=l.value;a+=d.getCount()*(d.getDataCodewords()+s)}}catch(t){r={error:t}}finally{try{l&&!l.done&&(n=c.return)&&n.call(c)}finally{if(r)throw r.error}}this.totalCodewords=a}return t.prototype.getVersionNumber=function(){return this.versionNumber},t.prototype.getAlignmentPatternCenters=function(){return this.alignmentPatternCenters},t.prototype.getTotalCodewords=function(){return this.totalCodewords},t.prototype.getDimensionForVersion=function(){return 17+4*this.versionNumber},t.prototype.getECBlocksForLevel=function(t){return this.ecBlocks[t.getValue()]},t.getProvisionalVersionForDimension=function(t){if(t%4!=1)throw new Ua;try{return this.getVersionForNumber((t-17)/4)}catch(t){throw new Ua}},t.getVersionForNumber=function(e){if(e<1||e>40)throw new Aa;return t.VERSIONS[e-1]},t.decodeVersionInformation=function(e){for(var r=Number.MAX_SAFE_INTEGER,n=0,o=0;o<t.VERSION_DECODE_INFO.length;o++){var i=t.VERSION_DECODE_INFO[o];if(i===e)return t.getVersionForNumber(o+7);var a=Yc.numBitsDiffering(e,i);a<r&&(n=o+7,r=a)}return r<=3?t.getVersionForNumber(n):null},t.prototype.buildFunctionPattern=function(){var t=this.getDimensionForVersion(),e=new qa(t);e.setRegion(0,0,9,9),e.setRegion(t-8,0,8,9),e.setRegion(0,t-8,9,8);for(var r=this.alignmentPatternCenters.length,n=0;n<r;n++)for(var o=this.alignmentPatternCenters[n]-2,i=0;i<r;i++)0===n&&(0===i||i===r-1)||n===r-1&&0===i||e.setRegion(this.alignmentPatternCenters[i]-2,o,5,5);return e.setRegion(6,9,1,t-17),e.setRegion(9,6,t-17,1),this.versionNumber>6&&(e.setRegion(t-11,0,3,6),e.setRegion(0,t-11,6,3)),e},t.prototype.toString=function(){return""+this.versionNumber},t.VERSION_DECODE_INFO=Int32Array.from([31892,34236,39577,42195,48118,51042,55367,58893,63784,68472,70749,76311,79154,84390,87683,92361,96236,102084,102881,110507,110734,117786,119615,126325,127568,133589,136944,141498,145311,150283,152622,158308,161089,167017]),t.VERSIONS=[new t(1,new Int32Array(0),new qc(7,new Kc(1,19)),new qc(10,new Kc(1,16)),new qc(13,new Kc(1,13)),new qc(17,new Kc(1,9))),new t(2,Int32Array.from([6,18]),new qc(10,new Kc(1,34)),new qc(16,new Kc(1,28)),new qc(22,new Kc(1,22)),new qc(28,new Kc(1,16))),new t(3,Int32Array.from([6,22]),new qc(15,new Kc(1,55)),new qc(26,new Kc(1,44)),new qc(18,new Kc(2,17)),new qc(22,new Kc(2,13))),new t(4,Int32Array.from([6,26]),new qc(20,new Kc(1,80)),new qc(18,new Kc(2,32)),new qc(26,new Kc(2,24)),new qc(16,new Kc(4,9))),new t(5,Int32Array.from([6,30]),new qc(26,new Kc(1,108)),new qc(24,new Kc(2,43)),new qc(18,new Kc(2,15),new Kc(2,16)),new qc(22,new Kc(2,11),new Kc(2,12))),new t(6,Int32Array.from([6,34]),new qc(18,new Kc(2,68)),new qc(16,new Kc(4,27)),new qc(24,new Kc(4,19)),new qc(28,new Kc(4,15))),new t(7,Int32Array.from([6,22,38]),new qc(20,new Kc(2,78)),new qc(18,new Kc(4,31)),new qc(18,new Kc(2,14),new Kc(4,15)),new qc(26,new Kc(4,13),new Kc(1,14))),new t(8,Int32Array.from([6,24,42]),new qc(24,new Kc(2,97)),new qc(22,new Kc(2,38),new Kc(2,39)),new qc(22,new Kc(4,18),new Kc(2,19)),new qc(26,new Kc(4,14),new Kc(2,15))),new t(9,Int32Array.from([6,26,46]),new qc(30,new Kc(2,116)),new qc(22,new Kc(3,36),new Kc(2,37)),new qc(20,new Kc(4,16),new Kc(4,17)),new qc(24,new Kc(4,12),new Kc(4,13))),new t(10,Int32Array.from([6,28,50]),new qc(18,new Kc(2,68),new Kc(2,69)),new qc(26,new Kc(4,43),new Kc(1,44)),new qc(24,new Kc(6,19),new Kc(2,20)),new qc(28,new Kc(6,15),new Kc(2,16))),new t(11,Int32Array.from([6,30,54]),new qc(20,new Kc(4,81)),new qc(30,new Kc(1,50),new Kc(4,51)),new qc(28,new Kc(4,22),new Kc(4,23)),new qc(24,new Kc(3,12),new Kc(8,13))),new t(12,Int32Array.from([6,32,58]),new qc(24,new Kc(2,92),new Kc(2,93)),new qc(22,new Kc(6,36),new Kc(2,37)),new qc(26,new Kc(4,20),new Kc(6,21)),new qc(28,new Kc(7,14),new Kc(4,15))),new t(13,Int32Array.from([6,34,62]),new qc(26,new Kc(4,107)),new qc(22,new Kc(8,37),new Kc(1,38)),new qc(24,new Kc(8,20),new Kc(4,21)),new qc(22,new Kc(12,11),new Kc(4,12))),new t(14,Int32Array.from([6,26,46,66]),new qc(30,new Kc(3,115),new Kc(1,116)),new qc(24,new Kc(4,40),new Kc(5,41)),new qc(20,new Kc(11,16),new Kc(5,17)),new qc(24,new Kc(11,12),new Kc(5,13))),new t(15,Int32Array.from([6,26,48,70]),new qc(22,new Kc(5,87),new Kc(1,88)),new qc(24,new Kc(5,41),new Kc(5,42)),new qc(30,new Kc(5,24),new Kc(7,25)),new qc(24,new Kc(11,12),new Kc(7,13))),new t(16,Int32Array.from([6,26,50,74]),new qc(24,new Kc(5,98),new Kc(1,99)),new qc(28,new Kc(7,45),new Kc(3,46)),new qc(24,new Kc(15,19),new Kc(2,20)),new qc(30,new Kc(3,15),new Kc(13,16))),new t(17,Int32Array.from([6,30,54,78]),new qc(28,new Kc(1,107),new Kc(5,108)),new qc(28,new Kc(10,46),new Kc(1,47)),new qc(28,new Kc(1,22),new Kc(15,23)),new qc(28,new Kc(2,14),new Kc(17,15))),new t(18,Int32Array.from([6,30,56,82]),new qc(30,new Kc(5,120),new Kc(1,121)),new qc(26,new Kc(9,43),new Kc(4,44)),new qc(28,new Kc(17,22),new Kc(1,23)),new qc(28,new Kc(2,14),new Kc(19,15))),new t(19,Int32Array.from([6,30,58,86]),new qc(28,new Kc(3,113),new Kc(4,114)),new qc(26,new Kc(3,44),new Kc(11,45)),new qc(26,new Kc(17,21),new Kc(4,22)),new qc(26,new Kc(9,13),new Kc(16,14))),new t(20,Int32Array.from([6,34,62,90]),new qc(28,new Kc(3,107),new Kc(5,108)),new qc(26,new Kc(3,41),new Kc(13,42)),new qc(30,new Kc(15,24),new Kc(5,25)),new qc(28,new Kc(15,15),new Kc(10,16))),new t(21,Int32Array.from([6,28,50,72,94]),new qc(28,new Kc(4,116),new Kc(4,117)),new qc(26,new Kc(17,42)),new qc(28,new Kc(17,22),new Kc(6,23)),new qc(30,new Kc(19,16),new Kc(6,17))),new t(22,Int32Array.from([6,26,50,74,98]),new qc(28,new Kc(2,111),new Kc(7,112)),new qc(28,new Kc(17,46)),new qc(30,new Kc(7,24),new Kc(16,25)),new qc(24,new Kc(34,13))),new t(23,Int32Array.from([6,30,54,78,102]),new qc(30,new Kc(4,121),new Kc(5,122)),new qc(28,new Kc(4,47),new Kc(14,48)),new qc(30,new Kc(11,24),new Kc(14,25)),new qc(30,new Kc(16,15),new Kc(14,16))),new t(24,Int32Array.from([6,28,54,80,106]),new qc(30,new Kc(6,117),new Kc(4,118)),new qc(28,new Kc(6,45),new Kc(14,46)),new qc(30,new Kc(11,24),new Kc(16,25)),new qc(30,new Kc(30,16),new Kc(2,17))),new t(25,Int32Array.from([6,32,58,84,110]),new qc(26,new Kc(8,106),new Kc(4,107)),new qc(28,new Kc(8,47),new Kc(13,48)),new qc(30,new Kc(7,24),new Kc(22,25)),new qc(30,new Kc(22,15),new Kc(13,16))),new t(26,Int32Array.from([6,30,58,86,114]),new qc(28,new Kc(10,114),new Kc(2,115)),new qc(28,new Kc(19,46),new Kc(4,47)),new qc(28,new Kc(28,22),new Kc(6,23)),new qc(30,new Kc(33,16),new Kc(4,17))),new t(27,Int32Array.from([6,34,62,90,118]),new qc(30,new Kc(8,122),new Kc(4,123)),new qc(28,new Kc(22,45),new Kc(3,46)),new qc(30,new Kc(8,23),new Kc(26,24)),new qc(30,new Kc(12,15),new Kc(28,16))),new t(28,Int32Array.from([6,26,50,74,98,122]),new qc(30,new Kc(3,117),new Kc(10,118)),new qc(28,new Kc(3,45),new Kc(23,46)),new qc(30,new Kc(4,24),new Kc(31,25)),new qc(30,new Kc(11,15),new Kc(31,16))),new t(29,Int32Array.from([6,30,54,78,102,126]),new qc(30,new Kc(7,116),new Kc(7,117)),new qc(28,new Kc(21,45),new Kc(7,46)),new qc(30,new Kc(1,23),new Kc(37,24)),new qc(30,new Kc(19,15),new Kc(26,16))),new t(30,Int32Array.from([6,26,52,78,104,130]),new qc(30,new Kc(5,115),new Kc(10,116)),new qc(28,new Kc(19,47),new Kc(10,48)),new qc(30,new Kc(15,24),new Kc(25,25)),new qc(30,new Kc(23,15),new Kc(25,16))),new t(31,Int32Array.from([6,30,56,82,108,134]),new qc(30,new Kc(13,115),new Kc(3,116)),new qc(28,new Kc(2,46),new Kc(29,47)),new qc(30,new Kc(42,24),new Kc(1,25)),new qc(30,new Kc(23,15),new Kc(28,16))),new t(32,Int32Array.from([6,34,60,86,112,138]),new qc(30,new Kc(17,115)),new qc(28,new Kc(10,46),new Kc(23,47)),new qc(30,new Kc(10,24),new Kc(35,25)),new qc(30,new Kc(19,15),new Kc(35,16))),new t(33,Int32Array.from([6,30,58,86,114,142]),new qc(30,new Kc(17,115),new Kc(1,116)),new qc(28,new Kc(14,46),new Kc(21,47)),new qc(30,new Kc(29,24),new Kc(19,25)),new qc(30,new Kc(11,15),new Kc(46,16))),new t(34,Int32Array.from([6,34,62,90,118,146]),new qc(30,new Kc(13,115),new Kc(6,116)),new qc(28,new Kc(14,46),new Kc(23,47)),new qc(30,new Kc(44,24),new Kc(7,25)),new qc(30,new Kc(59,16),new Kc(1,17))),new t(35,Int32Array.from([6,30,54,78,102,126,150]),new qc(30,new Kc(12,121),new Kc(7,122)),new qc(28,new Kc(12,47),new Kc(26,48)),new qc(30,new Kc(39,24),new Kc(14,25)),new qc(30,new Kc(22,15),new Kc(41,16))),new t(36,Int32Array.from([6,24,50,76,102,128,154]),new qc(30,new Kc(6,121),new Kc(14,122)),new qc(28,new Kc(6,47),new Kc(34,48)),new qc(30,new Kc(46,24),new Kc(10,25)),new qc(30,new Kc(2,15),new Kc(64,16))),new t(37,Int32Array.from([6,28,54,80,106,132,158]),new qc(30,new Kc(17,122),new Kc(4,123)),new qc(28,new Kc(29,46),new Kc(14,47)),new qc(30,new Kc(49,24),new Kc(10,25)),new qc(30,new Kc(24,15),new Kc(46,16))),new t(38,Int32Array.from([6,32,58,84,110,136,162]),new qc(30,new Kc(4,122),new Kc(18,123)),new qc(28,new Kc(13,46),new Kc(32,47)),new qc(30,new Kc(48,24),new Kc(14,25)),new qc(30,new Kc(42,15),new Kc(32,16))),new t(39,Int32Array.from([6,26,54,82,110,138,166]),new qc(30,new Kc(20,117),new Kc(4,118)),new qc(28,new Kc(40,47),new Kc(7,48)),new qc(30,new Kc(43,24),new Kc(22,25)),new qc(30,new Kc(10,15),new Kc(67,16))),new t(40,Int32Array.from([6,30,58,86,114,142,170]),new qc(30,new Kc(19,118),new Kc(6,119)),new qc(28,new Kc(18,47),new Kc(31,48)),new qc(30,new Kc(34,24),new Kc(34,25)),new qc(30,new Kc(20,15),new Kc(61,16)))],t}();!function(t){t[t.DATA_MASK_000=0]="DATA_MASK_000",t[t.DATA_MASK_001=1]="DATA_MASK_001",t[t.DATA_MASK_010=2]="DATA_MASK_010",t[t.DATA_MASK_011=3]="DATA_MASK_011",t[t.DATA_MASK_100=4]="DATA_MASK_100",t[t.DATA_MASK_101=5]="DATA_MASK_101",t[t.DATA_MASK_110=6]="DATA_MASK_110",t[t.DATA_MASK_111=7]="DATA_MASK_111"}(Gc||(Gc={}));var Qc,tl=function(){function t(t,e){this.value=t,this.isMasked=e}return t.prototype.unmaskBitMatrix=function(t,e){for(var r=0;r<e;r++)for(var n=0;n<e;n++)this.isMasked(r,n)&&t.flip(n,r)},t.values=new Map([[Gc.DATA_MASK_000,new t(Gc.DATA_MASK_000,(function(t,e){return!(t+e&1)}))],[Gc.DATA_MASK_001,new t(Gc.DATA_MASK_001,(function(t,e){return!(1&t)}))],[Gc.DATA_MASK_010,new t(Gc.DATA_MASK_010,(function(t,e){return e%3==0}))],[Gc.DATA_MASK_011,new t(Gc.DATA_MASK_011,(function(t,e){return(t+e)%3==0}))],[Gc.DATA_MASK_100,new t(Gc.DATA_MASK_100,(function(t,e){return!(Math.floor(t/2)+Math.floor(e/3)&1)}))],[Gc.DATA_MASK_101,new t(Gc.DATA_MASK_101,(function(t,e){return t*e%6==0}))],[Gc.DATA_MASK_110,new t(Gc.DATA_MASK_110,(function(t,e){return t*e%6<3}))],[Gc.DATA_MASK_111,new t(Gc.DATA_MASK_111,(function(t,e){return!(t+e+t*e%3&1)}))]]),t}(),el=function(){function t(t){var e=t.getHeight();if(e<21||1!=(3&e))throw new Ua;this.bitMatrix=t}return t.prototype.readFormatInformation=function(){if(null!==this.parsedFormatInfo&&void 0!==this.parsedFormatInfo)return this.parsedFormatInfo;for(var t=0,e=0;e<6;e++)t=this.copyBit(e,8,t);t=this.copyBit(7,8,t),t=this.copyBit(8,8,t),t=this.copyBit(8,7,t);for(var r=5;r>=0;r--)t=this.copyBit(8,r,t);var n=this.bitMatrix.getHeight(),o=0,i=n-7;for(r=n-1;r>=i;r--)o=this.copyBit(8,r,o);for(e=n-8;e<n;e++)o=this.copyBit(e,8,o);if(this.parsedFormatInfo=Yc.decodeFormatInformation(t,o),null!==this.parsedFormatInfo)return this.parsedFormatInfo;throw new Ua},t.prototype.readVersion=function(){if(null!==this.parsedVersion&&void 0!==this.parsedVersion)return this.parsedVersion;var t=this.bitMatrix.getHeight(),e=Math.floor((t-17)/4);if(e<=6)return Jc.getVersionForNumber(e);for(var r=0,n=t-11,o=5;o>=0;o--)for(var i=t-9;i>=n;i--)r=this.copyBit(i,o,r);var a=Jc.decodeVersionInformation(r);if(null!==a&&a.getDimensionForVersion()===t)return this.parsedVersion=a,a;r=0;for(i=5;i>=0;i--)for(o=t-9;o>=n;o--)r=this.copyBit(i,o,r);if(null!==(a=Jc.decodeVersionInformation(r))&&a.getDimensionForVersion()===t)return this.parsedVersion=a,a;throw new Ua},t.prototype.copyBit=function(t,e,r){return(this.isMirror?this.bitMatrix.get(e,t):this.bitMatrix.get(t,e))?r<<1|1:r<<1},t.prototype.readCodewords=function(){var t=this.readFormatInformation(),e=this.readVersion(),r=tl.values.get(t.getDataMask()),n=this.bitMatrix.getHeight();r.unmaskBitMatrix(this.bitMatrix,n);for(var o=e.buildFunctionPattern(),i=!0,a=new Uint8Array(e.getTotalCodewords()),s=0,u=0,c=0,l=n-1;l>0;l-=2){6===l&&l--;for(var d=0;d<n;d++)for(var h=i?n-1-d:d,f=0;f<2;f++)o.get(l-f,h)||(c++,u<<=1,this.bitMatrix.get(l-f,h)&&(u|=1),8===c&&(a[s++]=u,c=0,u=0));i=!i}if(s!==e.getTotalCodewords())throw new Ua;return a},t.prototype.remask=function(){if(null!==this.parsedFormatInfo){var t=tl.values.get(this.parsedFormatInfo.getDataMask()),e=this.bitMatrix.getHeight();t.unmaskBitMatrix(this.bitMatrix,e)}},t.prototype.setMirror=function(t){this.parsedVersion=null,this.parsedFormatInfo=null,this.isMirror=t},t.prototype.mirror=function(){for(var t=this.bitMatrix,e=0,r=t.getWidth();e<r;e++)for(var n=e+1,o=t.getHeight();n<o;n++)t.get(e,n)!==t.get(n,e)&&(t.flip(n,e),t.flip(e,n))},t}(),rl=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},nl=function(){function t(t,e){this.numDataCodewords=t,this.codewords=e}return t.getDataBlocks=function(e,r,n){var o,i,a,s;if(e.length!==r.getTotalCodewords())throw new Aa;var u=r.getECBlocksForLevel(n),c=0,l=u.getECBlocks();try{for(var d=rl(l),h=d.next();!h.done;h=d.next()){c+=(y=h.value).getCount()}}catch(t){o={error:t}}finally{try{h&&!h.done&&(i=d.return)&&i.call(d)}finally{if(o)throw o.error}}var f=new Array(c),p=0;try{for(var g=rl(l),m=g.next();!m.done;m=g.next())for(var y=m.value,w=0;w<y.getCount();w++){var _=y.getDataCodewords(),v=u.getECCodewordsPerBlock()+_;f[p++]=new t(_,new Uint8Array(v))}}catch(t){a={error:t}}finally{try{m&&!m.done&&(s=g.return)&&s.call(g)}finally{if(a)throw a.error}}for(var E=f[0].codewords.length,b=f.length-1;b>=0;){if(f[b].codewords.length===E)break;b--}b++;var A=E-u.getECCodewordsPerBlock(),C=0;for(w=0;w<A;w++)for(var I=0;I<p;I++)f[I].codewords[w]=e[C++];for(I=b;I<p;I++)f[I].codewords[A]=e[C++];var S=f[0].codewords.length;for(w=A;w<S;w++)for(I=0;I<p;I++){var T=I<b?w:w+1;f[I].codewords[T]=e[C++]}return f},t.prototype.getNumDataCodewords=function(){return this.numDataCodewords},t.prototype.getCodewords=function(){return this.codewords},t}();!function(t){t[t.TERMINATOR=0]="TERMINATOR",t[t.NUMERIC=1]="NUMERIC",t[t.ALPHANUMERIC=2]="ALPHANUMERIC",t[t.STRUCTURED_APPEND=3]="STRUCTURED_APPEND",t[t.BYTE=4]="BYTE",t[t.ECI=5]="ECI",t[t.KANJI=6]="KANJI",t[t.FNC1_FIRST_POSITION=7]="FNC1_FIRST_POSITION",t[t.FNC1_SECOND_POSITION=8]="FNC1_SECOND_POSITION",t[t.HANZI=9]="HANZI"}(Qc||(Qc={}));var ol,il,al=function(){function t(e,r,n,o){this.value=e,this.stringValue=r,this.characterCountBitsForVersions=n,this.bits=o,t.FOR_BITS.set(o,this),t.FOR_VALUE.set(e,this)}return t.forBits=function(e){var r=t.FOR_BITS.get(e);if(void 0===r)throw new Aa;return r},t.prototype.getCharacterCountBits=function(t){var e,r=t.getVersionNumber();return e=r<=9?0:r<=26?1:2,this.characterCountBitsForVersions[e]},t.prototype.getValue=function(){return this.value},t.prototype.getBits=function(){return this.bits},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.value===r.value},t.prototype.toString=function(){return this.stringValue},t.FOR_BITS=new Map,t.FOR_VALUE=new Map,t.TERMINATOR=new t(Qc.TERMINATOR,"TERMINATOR",Int32Array.from([0,0,0]),0),t.NUMERIC=new t(Qc.NUMERIC,"NUMERIC",Int32Array.from([10,12,14]),1),t.ALPHANUMERIC=new t(Qc.ALPHANUMERIC,"ALPHANUMERIC",Int32Array.from([9,11,13]),2),t.STRUCTURED_APPEND=new t(Qc.STRUCTURED_APPEND,"STRUCTURED_APPEND",Int32Array.from([0,0,0]),3),t.BYTE=new t(Qc.BYTE,"BYTE",Int32Array.from([8,16,16]),4),t.ECI=new t(Qc.ECI,"ECI",Int32Array.from([0,0,0]),7),t.KANJI=new t(Qc.KANJI,"KANJI",Int32Array.from([8,10,12]),8),t.FNC1_FIRST_POSITION=new t(Qc.FNC1_FIRST_POSITION,"FNC1_FIRST_POSITION",Int32Array.from([0,0,0]),5),t.FNC1_SECOND_POSITION=new t(Qc.FNC1_SECOND_POSITION,"FNC1_SECOND_POSITION",Int32Array.from([0,0,0]),9),t.HANZI=new t(Qc.HANZI,"HANZI",Int32Array.from([8,10,12]),13),t}(),sl=function(){function t(){}return t.decode=function(e,r,n,o){var i=new Bc(e),a=new Za,s=new Array,u=-1,c=-1;try{var l=null,d=!1,h=void 0;do{if(i.available()<4)h=al.TERMINATOR;else{var f=i.readBits(4);h=al.forBits(f)}switch(h){case al.TERMINATOR:break;case al.FNC1_FIRST_POSITION:case al.FNC1_SECOND_POSITION:d=!0;break;case al.STRUCTURED_APPEND:if(i.available()<16)throw new Ua;u=i.readBits(8),c=i.readBits(8);break;case al.ECI:var p=t.parseECIValue(i);if(null===(l=ja.getCharacterSetECIByValue(p)))throw new Ua;break;case al.HANZI:var g=i.readBits(4),m=i.readBits(h.getCharacterCountBits(r));g===t.GB2312_SUBSET&&t.decodeHanziSegment(i,a,m);break;default:var y=i.readBits(h.getCharacterCountBits(r));switch(h){case al.NUMERIC:t.decodeNumericSegment(i,a,y);break;case al.ALPHANUMERIC:t.decodeAlphanumericSegment(i,a,y,d);break;case al.BYTE:t.decodeByteSegment(i,a,y,l,s,o);break;case al.KANJI:t.decodeKanjiSegment(i,a,y);break;default:throw new Ua}}}while(h!==al.TERMINATOR)}catch(t){throw new Ua}return new ys(e,a.toString(),0===s.length?null:s,null===n?null:n.toString(),u,c)},t.decodeHanziSegment=function(t,e,r){if(13*r>t.available())throw new Ua;for(var n=new Uint8Array(2*r),o=0;r>0;){var i=t.readBits(13),a=i/96<<8&4294967295|i%96;a+=a<959?41377:42657,n[o]=a>>8&255,n[o+1]=255&a,o+=2,r--}try{e.append(Xa.decode(n,Ya.GB2312))}catch(t){throw new Ua(t)}},t.decodeKanjiSegment=function(t,e,r){if(13*r>t.available())throw new Ua;for(var n=new Uint8Array(2*r),o=0;r>0;){var i=t.readBits(13),a=i/192<<8&4294967295|i%192;a+=a<7936?33088:49472,n[o]=a>>8,n[o+1]=a,o+=2,r--}try{e.append(Xa.decode(n,Ya.SHIFT_JIS))}catch(t){throw new Ua(t)}},t.decodeByteSegment=function(t,e,r,n,o,i){if(8*r>t.available())throw new Ua;for(var a,s=new Uint8Array(r),u=0;u<r;u++)s[u]=t.readBits(8);a=null===n?Ya.guessEncoding(s,i):n.getName();try{e.append(Xa.decode(s,a))}catch(t){throw new Ua(t)}o.push(s)},t.toAlphaNumericChar=function(e){if(e>=t.ALPHANUMERIC_CHARS.length)throw new Ua;return t.ALPHANUMERIC_CHARS[e]},t.decodeAlphanumericSegment=function(e,r,n,o){for(var i=r.length();n>1;){if(e.available()<11)throw new Ua;var a=e.readBits(11);r.append(t.toAlphaNumericChar(Math.floor(a/45))),r.append(t.toAlphaNumericChar(a%45)),n-=2}if(1===n){if(e.available()<6)throw new Ua;r.append(t.toAlphaNumericChar(e.readBits(6)))}if(o)for(var s=i;s<r.length();s++)"%"===r.charAt(s)&&(s<r.length()-1&&"%"===r.charAt(s+1)?r.deleteCharAt(s+1):r.setCharAt(s,String.fromCharCode(29)))},t.decodeNumericSegment=function(e,r,n){for(;n>=3;){if(e.available()<10)throw new Ua;var o=e.readBits(10);if(o>=1e3)throw new Ua;r.append(t.toAlphaNumericChar(Math.floor(o/100))),r.append(t.toAlphaNumericChar(Math.floor(o/10)%10)),r.append(t.toAlphaNumericChar(o%10)),n-=3}if(2===n){if(e.available()<7)throw new Ua;var i=e.readBits(7);if(i>=100)throw new Ua;r.append(t.toAlphaNumericChar(Math.floor(i/10))),r.append(t.toAlphaNumericChar(i%10))}else if(1===n){if(e.available()<4)throw new Ua;var a=e.readBits(4);if(a>=10)throw new Ua;r.append(t.toAlphaNumericChar(a))}},t.parseECIValue=function(t){var e=t.readBits(8);if(!(128&e))return 127&e;if(128==(192&e))return(63&e)<<8&4294967295|t.readBits(8);if(192==(224&e))return(31&e)<<16&4294967295|t.readBits(16);throw new Ua},t.ALPHANUMERIC_CHARS="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",t.GB2312_SUBSET=1,t}(),ul=function(){function t(t){this.mirrored=t}return t.prototype.isMirrored=function(){return this.mirrored},t.prototype.applyMirroredCorrection=function(t){if(this.mirrored&&null!==t&&!(t.length<3)){var e=t[0];t[0]=t[2],t[2]=e}},t}(),cl=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},ll=function(){function t(){this.rsDecoder=new Ds(As.QR_CODE_FIELD_256)}return t.prototype.decodeBooleanArray=function(t,e){return this.decodeBitMatrix(qa.parseFromBooleanArray(t),e)},t.prototype.decodeBitMatrix=function(t,e){var r=new el(t),n=null;try{return this.decodeBitMatrixParser(r,e)}catch(t){n=t}try{r.remask(),r.setMirror(!0),r.readVersion(),r.readFormatInformation(),r.mirror();var o=this.decodeBitMatrixParser(r,e);return o.setOther(new ul(!0)),o}catch(t){if(null!==n)throw n;throw t}},t.prototype.decodeBitMatrixParser=function(t,e){var r,n,o,i,a=t.readVersion(),s=t.readFormatInformation().getErrorCorrectionLevel(),u=t.readCodewords(),c=nl.getDataBlocks(u,a,s),l=0;try{for(var d=cl(c),h=d.next();!h.done;h=d.next()){l+=(y=h.value).getNumDataCodewords()}}catch(t){r={error:t}}finally{try{h&&!h.done&&(n=d.return)&&n.call(d)}finally{if(r)throw r.error}}var f=new Uint8Array(l),p=0;try{for(var g=cl(c),m=g.next();!m.done;m=g.next()){var y,w=(y=m.value).getCodewords(),_=y.getNumDataCodewords();this.correctErrors(w,_);for(var v=0;v<_;v++)f[p++]=w[v]}}catch(t){o={error:t}}finally{try{m&&!m.done&&(i=g.return)&&i.call(g)}finally{if(o)throw o.error}}return sl.decode(f,a,s,e)},t.prototype.correctErrors=function(t,e){var r=new Int32Array(t);try{this.rsDecoder.decode(r,t.length-e)}catch(t){throw new Sa}for(var n=0;n<e;n++)t[n]=r[n]},t}(),dl=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),hl=function(t){function e(e,r,n){var o=t.call(this,e,r)||this;return o.estimatedModuleSize=n,o}return dl(e,t),e.prototype.aboutEquals=function(t,e,r){if(Math.abs(e-this.getY())<=t&&Math.abs(r-this.getX())<=t){var n=Math.abs(t-this.estimatedModuleSize);return n<=1||n<=this.estimatedModuleSize}return!1},e.prototype.combineEstimate=function(t,r,n){return new e((this.getX()+r)/2,(this.getY()+t)/2,(this.estimatedModuleSize+n)/2)},e}(Ns),fl=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},pl=function(){function t(t,e,r,n,o,i,a){this.image=t,this.startX=e,this.startY=r,this.width=n,this.height=o,this.moduleSize=i,this.resultPointCallback=a,this.possibleCenters=[],this.crossCheckStateCount=new Int32Array(3)}return t.prototype.find=function(){for(var t=this.startX,e=this.height,r=t+this.width,n=this.startY+e/2,o=new Int32Array(3),i=this.image,a=0;a<e;a++){var s=n+(1&a?-Math.floor((a+1)/2):Math.floor((a+1)/2));o[0]=0,o[1]=0,o[2]=0;for(var u=t;u<r&&!i.get(u,s);)u++;for(var c=0;u<r;){if(i.get(u,s))if(1===c)o[1]++;else if(2===c){var l;if(this.foundPatternCross(o))if(null!==(l=this.handlePossibleCenter(o,s,u)))return l;o[0]=o[2],o[1]=1,o[2]=0,c=1}else o[++c]++;else 1===c&&c++,o[c]++;u++}if(this.foundPatternCross(o))if(null!==(l=this.handlePossibleCenter(o,s,r)))return l}if(0!==this.possibleCenters.length)return this.possibleCenters[0];throw new $a},t.centerFromEnd=function(t,e){return e-t[2]-t[1]/2},t.prototype.foundPatternCross=function(t){for(var e=this.moduleSize,r=e/2,n=0;n<3;n++)if(Math.abs(e-t[n])>=r)return!1;return!0},t.prototype.crossCheckVertical=function(e,r,n,o){var i=this.image,a=i.getHeight(),s=this.crossCheckStateCount;s[0]=0,s[1]=0,s[2]=0;for(var u=e;u>=0&&i.get(r,u)&&s[1]<=n;)s[1]++,u--;if(u<0||s[1]>n)return NaN;for(;u>=0&&!i.get(r,u)&&s[0]<=n;)s[0]++,u--;if(s[0]>n)return NaN;for(u=e+1;u<a&&i.get(r,u)&&s[1]<=n;)s[1]++,u++;if(u===a||s[1]>n)return NaN;for(;u<a&&!i.get(r,u)&&s[2]<=n;)s[2]++,u++;if(s[2]>n)return NaN;var c=s[0]+s[1]+s[2];return 5*Math.abs(c-o)>=2*o?NaN:this.foundPatternCross(s)?t.centerFromEnd(s,u):NaN},t.prototype.handlePossibleCenter=function(e,r,n){var o,i,a=e[0]+e[1]+e[2],s=t.centerFromEnd(e,n),u=this.crossCheckVertical(r,s,2*e[1],a);if(!isNaN(u)){var c=(e[0]+e[1]+e[2])/3;try{for(var l=fl(this.possibleCenters),d=l.next();!d.done;d=l.next()){var h=d.value;if(h.aboutEquals(c,u,s))return h.combineEstimate(u,s,c)}}catch(t){o={error:t}}finally{try{d&&!d.done&&(i=l.return)&&i.call(l)}finally{if(o)throw o.error}}var f=new hl(s,u,c);this.possibleCenters.push(f),null!==this.resultPointCallback&&void 0!==this.resultPointCallback&&this.resultPointCallback.foundPossibleResultPoint(f)}return null},t}(),gl=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),ml=function(t){function e(e,r,n,o){var i=t.call(this,e,r)||this;return i.estimatedModuleSize=n,i.count=o,void 0===o&&(i.count=1),i}return gl(e,t),e.prototype.getEstimatedModuleSize=function(){return this.estimatedModuleSize},e.prototype.getCount=function(){return this.count},e.prototype.aboutEquals=function(t,e,r){if(Math.abs(e-this.getY())<=t&&Math.abs(r-this.getX())<=t){var n=Math.abs(t-this.estimatedModuleSize);return n<=1||n<=this.estimatedModuleSize}return!1},e.prototype.combineEstimate=function(t,r,n){var o=this.count+1;return new e((this.count*this.getX()+r)/o,(this.count*this.getY()+t)/o,(this.count*this.estimatedModuleSize+n)/o,o)},e}(Ns),yl=function(){function t(t){this.bottomLeft=t[0],this.topLeft=t[1],this.topRight=t[2]}return t.prototype.getBottomLeft=function(){return this.bottomLeft},t.prototype.getTopLeft=function(){return this.topLeft},t.prototype.getTopRight=function(){return this.topRight},t}(),wl=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},_l=function(){function t(t,e){this.image=t,this.resultPointCallback=e,this.possibleCenters=[],this.crossCheckStateCount=new Int32Array(5),this.resultPointCallback=e}return t.prototype.getImage=function(){return this.image},t.prototype.getPossibleCenters=function(){return this.possibleCenters},t.prototype.find=function(e){var r=null!=e&&void 0!==e.get(La.TRY_HARDER),n=null!=e&&void 0!==e.get(La.PURE_BARCODE),o=this.image,i=o.getHeight(),a=o.getWidth(),s=Math.floor(3*i/(4*t.MAX_MODULES));(s<t.MIN_SKIP||r)&&(s=t.MIN_SKIP);for(var u=!1,c=new Int32Array(5),l=s-1;l<i&&!u;l+=s){c[0]=0,c[1]=0,c[2]=0,c[3]=0,c[4]=0;for(var d=0,h=0;h<a;h++)if(o.get(h,l))1&~d||d++,c[d]++;else if(1&d)c[d]++;else if(4===d)if(t.foundPatternCross(c)){if(!0!==this.handlePossibleCenter(c,l,h,n)){c[0]=c[2],c[1]=c[3],c[2]=c[4],c[3]=1,c[4]=0,d=3;continue}if(s=2,!0===this.hasSkipped)u=this.haveMultiplyConfirmedCenters();else{var f=this.findRowSkip();f>c[2]&&(l+=f-c[2]-s,h=a-1)}d=0,c[0]=0,c[1]=0,c[2]=0,c[3]=0,c[4]=0}else c[0]=c[2],c[1]=c[3],c[2]=c[4],c[3]=1,c[4]=0,d=3;else c[++d]++;if(t.foundPatternCross(c))!0===this.handlePossibleCenter(c,l,a,n)&&(s=c[0],this.hasSkipped&&(u=this.haveMultiplyConfirmedCenters()))}var p=this.selectBestPatterns();return Ns.orderBestPatterns(p),new yl(p)},t.centerFromEnd=function(t,e){return e-t[4]-t[3]-t[2]/2},t.foundPatternCross=function(t){for(var e=0,r=0;r<5;r++){var n=t[r];if(0===n)return!1;e+=n}if(e<7)return!1;var o=e/7,i=o/2;return Math.abs(o-t[0])<i&&Math.abs(o-t[1])<i&&Math.abs(3*o-t[2])<3*i&&Math.abs(o-t[3])<i&&Math.abs(o-t[4])<i},t.prototype.getCrossCheckStateCount=function(){var t=this.crossCheckStateCount;return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t},t.prototype.crossCheckDiagonal=function(e,r,n,o){for(var i=this.getCrossCheckStateCount(),a=0,s=this.image;e>=a&&r>=a&&s.get(r-a,e-a);)i[2]++,a++;if(e<a||r<a)return!1;for(;e>=a&&r>=a&&!s.get(r-a,e-a)&&i[1]<=n;)i[1]++,a++;if(e<a||r<a||i[1]>n)return!1;for(;e>=a&&r>=a&&s.get(r-a,e-a)&&i[0]<=n;)i[0]++,a++;if(i[0]>n)return!1;var u=s.getHeight(),c=s.getWidth();for(a=1;e+a<u&&r+a<c&&s.get(r+a,e+a);)i[2]++,a++;if(e+a>=u||r+a>=c)return!1;for(;e+a<u&&r+a<c&&!s.get(r+a,e+a)&&i[3]<n;)i[3]++,a++;if(e+a>=u||r+a>=c||i[3]>=n)return!1;for(;e+a<u&&r+a<c&&s.get(r+a,e+a)&&i[4]<n;)i[4]++,a++;if(i[4]>=n)return!1;var l=i[0]+i[1]+i[2]+i[3]+i[4];return Math.abs(l-o)<2*o&&t.foundPatternCross(i)},t.prototype.crossCheckVertical=function(e,r,n,o){for(var i=this.image,a=i.getHeight(),s=this.getCrossCheckStateCount(),u=e;u>=0&&i.get(r,u);)s[2]++,u--;if(u<0)return NaN;for(;u>=0&&!i.get(r,u)&&s[1]<=n;)s[1]++,u--;if(u<0||s[1]>n)return NaN;for(;u>=0&&i.get(r,u)&&s[0]<=n;)s[0]++,u--;if(s[0]>n)return NaN;for(u=e+1;u<a&&i.get(r,u);)s[2]++,u++;if(u===a)return NaN;for(;u<a&&!i.get(r,u)&&s[3]<n;)s[3]++,u++;if(u===a||s[3]>=n)return NaN;for(;u<a&&i.get(r,u)&&s[4]<n;)s[4]++,u++;if(s[4]>=n)return NaN;var c=s[0]+s[1]+s[2]+s[3]+s[4];return 5*Math.abs(c-o)>=2*o?NaN:t.foundPatternCross(s)?t.centerFromEnd(s,u):NaN},t.prototype.crossCheckHorizontal=function(e,r,n,o){for(var i=this.image,a=i.getWidth(),s=this.getCrossCheckStateCount(),u=e;u>=0&&i.get(u,r);)s[2]++,u--;if(u<0)return NaN;for(;u>=0&&!i.get(u,r)&&s[1]<=n;)s[1]++,u--;if(u<0||s[1]>n)return NaN;for(;u>=0&&i.get(u,r)&&s[0]<=n;)s[0]++,u--;if(s[0]>n)return NaN;for(u=e+1;u<a&&i.get(u,r);)s[2]++,u++;if(u===a)return NaN;for(;u<a&&!i.get(u,r)&&s[3]<n;)s[3]++,u++;if(u===a||s[3]>=n)return NaN;for(;u<a&&i.get(u,r)&&s[4]<n;)s[4]++,u++;if(s[4]>=n)return NaN;var c=s[0]+s[1]+s[2]+s[3]+s[4];return 5*Math.abs(c-o)>=o?NaN:t.foundPatternCross(s)?t.centerFromEnd(s,u):NaN},t.prototype.handlePossibleCenter=function(e,r,n,o){var i=e[0]+e[1]+e[2]+e[3]+e[4],a=t.centerFromEnd(e,n),s=this.crossCheckVertical(r,Math.floor(a),e[2],i);if(!isNaN(s)&&(a=this.crossCheckHorizontal(Math.floor(a),Math.floor(s),e[2],i),!isNaN(a)&&(!o||this.crossCheckDiagonal(Math.floor(s),Math.floor(a),e[2],i)))){for(var u=i/7,c=!1,l=this.possibleCenters,d=0,h=l.length;d<h;d++){var f=l[d];if(f.aboutEquals(u,s,a)){l[d]=f.combineEstimate(s,a,u),c=!0;break}}if(!c){var p=new ml(a,s,u);l.push(p),null!==this.resultPointCallback&&void 0!==this.resultPointCallback&&this.resultPointCallback.foundPossibleResultPoint(p)}return!0}return!1},t.prototype.findRowSkip=function(){var e,r;if(this.possibleCenters.length<=1)return 0;var n=null;try{for(var o=wl(this.possibleCenters),i=o.next();!i.done;i=o.next()){var a=i.value;if(a.getCount()>=t.CENTER_QUORUM){if(null!=n)return this.hasSkipped=!0,Math.floor((Math.abs(n.getX()-a.getX())-Math.abs(n.getY()-a.getY()))/2);n=a}}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}return 0},t.prototype.haveMultiplyConfirmedCenters=function(){var e,r,n,o,i=0,a=0,s=this.possibleCenters.length;try{for(var u=wl(this.possibleCenters),c=u.next();!c.done;c=u.next()){(p=c.value).getCount()>=t.CENTER_QUORUM&&(i++,a+=p.getEstimatedModuleSize())}}catch(t){e={error:t}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(e)throw e.error}}if(i<3)return!1;var l=a/s,d=0;try{for(var h=wl(this.possibleCenters),f=h.next();!f.done;f=h.next()){var p=f.value;d+=Math.abs(p.getEstimatedModuleSize()-l)}}catch(t){n={error:t}}finally{try{f&&!f.done&&(o=h.return)&&o.call(h)}finally{if(n)throw n.error}}return d<=.05*a},t.prototype.selectBestPatterns=function(){var t,e,r,n,o=this.possibleCenters.length;if(o<3)throw new $a;var i,a=this.possibleCenters;if(o>3){var s=0,u=0;try{for(var c=wl(this.possibleCenters),l=c.next();!l.done;l=c.next()){var d=l.value.getEstimatedModuleSize();s+=d,u+=d*d}}catch(e){t={error:e}}finally{try{l&&!l.done&&(e=c.return)&&e.call(c)}finally{if(t)throw t.error}}i=s/o;var h=Math.sqrt(u/o-i*i);a.sort((function(t,e){var r=Math.abs(e.getEstimatedModuleSize()-i),n=Math.abs(t.getEstimatedModuleSize()-i);return r<n?-1:r>n?1:0}));for(var f=Math.max(.2*i,h),p=0;p<a.length&&a.length>3;p++){var g=a[p];Math.abs(g.getEstimatedModuleSize()-i)>f&&(a.splice(p,1),p--)}}if(a.length>3){s=0;try{for(var m=wl(a),y=m.next();!y.done;y=m.next()){s+=y.value.getEstimatedModuleSize()}}catch(t){r={error:t}}finally{try{y&&!y.done&&(n=m.return)&&n.call(m)}finally{if(r)throw r.error}}i=s/a.length,a.sort((function(t,e){if(e.getCount()===t.getCount()){var r=Math.abs(e.getEstimatedModuleSize()-i),n=Math.abs(t.getEstimatedModuleSize()-i);return r<n?1:r>n?-1:0}return e.getCount()-t.getCount()})),a.splice(3)}return[a[0],a[1],a[2]]},t.CENTER_QUORUM=2,t.MIN_SKIP=3,t.MAX_MODULES=57,t}(),vl=function(){function t(t){this.image=t}return t.prototype.getImage=function(){return this.image},t.prototype.getResultPointCallback=function(){return this.resultPointCallback},t.prototype.detect=function(t){this.resultPointCallback=null==t?null:t.get(La.NEED_RESULT_POINT_CALLBACK);var e=new _l(this.image,this.resultPointCallback).find(t);return this.processFinderPatternInfo(e)},t.prototype.processFinderPatternInfo=function(e){var r=e.getTopLeft(),n=e.getTopRight(),o=e.getBottomLeft(),i=this.calculateModuleSize(r,n,o);if(i<1)throw new $a("No pattern found in proccess finder.");var a=t.computeDimension(r,n,o,i),s=Jc.getProvisionalVersionForDimension(a),u=s.getDimensionForVersion()-7,c=null;if(s.getAlignmentPatternCenters().length>0)for(var l=n.getX()-r.getX()+o.getX(),d=n.getY()-r.getY()+o.getY(),h=1-3/u,f=Math.floor(r.getX()+h*(l-r.getX())),p=Math.floor(r.getY()+h*(d-r.getY())),g=4;g<=16;g<<=1)try{c=this.findAlignmentInRegion(i,f,p,g);break}catch(t){if(!(t instanceof $a))throw t}var m=t.createTransform(r,n,o,c,a),y=t.sampleGrid(this.image,m,a);return new ks(y,null===c?[o,r,n]:[o,r,n,c])},t.createTransform=function(t,e,r,n,o){var i,a,s,u,c=o-3.5;return null!==n?(i=n.getX(),a=n.getY(),u=s=c-3):(i=e.getX()-t.getX()+r.getX(),a=e.getY()-t.getY()+r.getY(),s=c,u=c),Ls.quadrilateralToQuadrilateral(3.5,3.5,c,3.5,s,u,3.5,c,t.getX(),t.getY(),e.getX(),e.getY(),i,a,r.getX(),r.getY())},t.sampleGrid=function(t,e,r){return Vs.getInstance().sampleGridWithTransform(t,r,r,e)},t.computeDimension=function(t,e,r,n){var o=Rs.round(Ns.distance(t,e)/n),i=Rs.round(Ns.distance(t,r)/n),a=Math.floor((o+i)/2)+7;switch(3&a){case 0:a++;break;case 2:a--;break;case 3:throw new $a("Dimensions could be not found.")}return a},t.prototype.calculateModuleSize=function(t,e,r){return(this.calculateModuleSizeOneWay(t,e)+this.calculateModuleSizeOneWay(t,r))/2},t.prototype.calculateModuleSizeOneWay=function(t,e){var r=this.sizeOfBlackWhiteBlackRunBothWays(Math.floor(t.getX()),Math.floor(t.getY()),Math.floor(e.getX()),Math.floor(e.getY())),n=this.sizeOfBlackWhiteBlackRunBothWays(Math.floor(e.getX()),Math.floor(e.getY()),Math.floor(t.getX()),Math.floor(t.getY()));return isNaN(r)?n/7:isNaN(n)?r/7:(r+n)/14},t.prototype.sizeOfBlackWhiteBlackRunBothWays=function(t,e,r,n){var o=this.sizeOfBlackWhiteBlackRun(t,e,r,n),i=1,a=t-(r-t);a<0?(i=t/(t-a),a=0):a>=this.image.getWidth()&&(i=(this.image.getWidth()-1-t)/(a-t),a=this.image.getWidth()-1);var s=Math.floor(e-(n-e)*i);return i=1,s<0?(i=e/(e-s),s=0):s>=this.image.getHeight()&&(i=(this.image.getHeight()-1-e)/(s-e),s=this.image.getHeight()-1),a=Math.floor(t+(a-t)*i),(o+=this.sizeOfBlackWhiteBlackRun(t,e,a,s))-1},t.prototype.sizeOfBlackWhiteBlackRun=function(t,e,r,n){var o=Math.abs(n-e)>Math.abs(r-t);if(o){var i=t;t=e,e=i,i=r,r=n,n=i}for(var a=Math.abs(r-t),s=Math.abs(n-e),u=-a/2,c=t<r?1:-1,l=e<n?1:-1,d=0,h=r+c,f=t,p=e;f!==h;f+=c){var g=o?p:f,m=o?f:p;if(1===d===this.image.get(g,m)){if(2===d)return Rs.distance(f,p,t,e);d++}if((u+=s)>0){if(p===n)break;p+=l,u-=a}}return 2===d?Rs.distance(r+c,n,t,e):NaN},t.prototype.findAlignmentInRegion=function(t,e,r,n){var o=Math.floor(n*t),i=Math.max(0,e-o),a=Math.min(this.image.getWidth()-1,e+o);if(a-i<3*t)throw new $a("Alignment top exceeds estimated module size.");var s=Math.max(0,r-o),u=Math.min(this.image.getHeight()-1,r+o);if(u-s<3*t)throw new $a("Alignment bottom exceeds estimated module size.");return new pl(this.image,i,s,a-i,u-s,t,this.resultPointCallback).find()},t}(),El=function(){function t(){this.decoder=new ll}return t.prototype.getDecoder=function(){return this.decoder},t.prototype.decode=function(e,r){var n,o;if(null!=r&&void 0!==r.get(La.PURE_BARCODE)){var i=t.extractPureBits(e.getBlackMatrix());n=this.decoder.decodeBitMatrix(i,r),o=t.NO_POINTS}else{var a=new vl(e.getBlackMatrix()).detect(r);n=this.decoder.decodeBitMatrix(a.getBits(),r),o=a.getPoints()}n.getOther()instanceof ul&&n.getOther().applyMirroredCorrection(o);var s=new hs(n.getText(),n.getRawBytes(),void 0,o,ps.QR_CODE,void 0),u=n.getByteSegments();null!==u&&s.putMetadata(ms.BYTE_SEGMENTS,u);var c=n.getECLevel();return null!==c&&s.putMetadata(ms.ERROR_CORRECTION_LEVEL,c),n.hasStructuredAppend()&&(s.putMetadata(ms.STRUCTURED_APPEND_SEQUENCE,n.getStructuredAppendSequenceNumber()),s.putMetadata(ms.STRUCTURED_APPEND_PARITY,n.getStructuredAppendParity())),s},t.prototype.reset=function(){},t.extractPureBits=function(t){var e=t.getTopLeftOnBit(),r=t.getBottomRightOnBit();if(null===e||null===r)throw new $a;var n=this.moduleSize(e,t),o=e[1],i=r[1],a=e[0],s=r[0];if(a>=s||o>=i)throw new $a;if(i-o!=s-a&&(s=a+(i-o))>=t.getWidth())throw new $a;var u=Math.round((s-a+1)/n),c=Math.round((i-o+1)/n);if(u<=0||c<=0)throw new $a;if(c!==u)throw new $a;var l=Math.floor(n/2);o+=l;var d=(a+=l)+Math.floor((u-1)*n)-s;if(d>0){if(d>l)throw new $a;a-=d}var h=o+Math.floor((c-1)*n)-i;if(h>0){if(h>l)throw new $a;o-=h}for(var f=new qa(u,c),p=0;p<c;p++)for(var g=o+Math.floor(p*n),m=0;m<u;m++)t.get(a+Math.floor(m*n),g)&&f.set(m,p);return f},t.moduleSize=function(t,e){for(var r=e.getHeight(),n=e.getWidth(),o=t[0],i=t[1],a=!0,s=0;o<n&&i<r;){if(a!==e.get(o,i)){if(5==++s)break;a=!a}o++,i++}if(o===n||i===r)throw new $a;return(o-t[0])/7},t.NO_POINTS=new Array,t}(),bl=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Al=function(){function t(){}return t.prototype.PDF417Common=function(){},t.getBitCountSum=function(t){return Rs.sum(t)},t.toIntArray=function(e){var r,n;if(null==e||!e.length)return t.EMPTY_INT_ARRAY;var o=new Int32Array(e.length),i=0;try{for(var a=bl(e),s=a.next();!s.done;s=a.next()){var u=s.value;o[i++]=u}}catch(t){r={error:t}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return o},t.getCodeword=function(e){var r=xa.binarySearch(t.SYMBOL_TABLE,262143&e);return r<0?-1:(t.CODEWORD_TABLE[r]-1)%t.NUMBER_OF_CODEWORDS},t.NUMBER_OF_CODEWORDS=929,t.MAX_CODEWORDS_IN_BARCODE=t.NUMBER_OF_CODEWORDS-1,t.MIN_ROWS_IN_BARCODE=3,t.MAX_ROWS_IN_BARCODE=90,t.MODULES_IN_CODEWORD=17,t.MODULES_IN_STOP_PATTERN=18,t.BARS_IN_MODULE=8,t.EMPTY_INT_ARRAY=new Int32Array([]),t.SYMBOL_TABLE=Int32Array.from([66142,66170,66206,66236,66290,66292,66350,66382,66396,66454,66470,66476,66594,66600,66614,66626,66628,66632,66640,66654,66662,66668,66682,66690,66718,66720,66748,66758,66776,66798,66802,66804,66820,66824,66832,66846,66848,66876,66880,66936,66950,66956,66968,66992,67006,67022,67036,67042,67044,67048,67062,67118,67150,67164,67214,67228,67256,67294,67322,67350,67366,67372,67398,67404,67416,67438,67474,67476,67490,67492,67496,67510,67618,67624,67650,67656,67664,67678,67686,67692,67706,67714,67716,67728,67742,67744,67772,67782,67788,67800,67822,67826,67828,67842,67848,67870,67872,67900,67904,67960,67974,67992,68016,68030,68046,68060,68066,68068,68072,68086,68104,68112,68126,68128,68156,68160,68216,68336,68358,68364,68376,68400,68414,68448,68476,68494,68508,68536,68546,68548,68552,68560,68574,68582,68588,68654,68686,68700,68706,68708,68712,68726,68750,68764,68792,68802,68804,68808,68816,68830,68838,68844,68858,68878,68892,68920,68976,68990,68994,68996,69e3,69008,69022,69024,69052,69062,69068,69080,69102,69106,69108,69142,69158,69164,69190,69208,69230,69254,69260,69272,69296,69310,69326,69340,69386,69394,69396,69410,69416,69430,69442,69444,69448,69456,69470,69478,69484,69554,69556,69666,69672,69698,69704,69712,69726,69754,69762,69764,69776,69790,69792,69820,69830,69836,69848,69870,69874,69876,69890,69918,69920,69948,69952,70008,70022,70040,70064,70078,70094,70108,70114,70116,70120,70134,70152,70174,70176,70264,70384,70412,70448,70462,70496,70524,70542,70556,70584,70594,70600,70608,70622,70630,70636,70664,70672,70686,70688,70716,70720,70776,70896,71136,71180,71192,71216,71230,71264,71292,71360,71416,71452,71480,71536,71550,71554,71556,71560,71568,71582,71584,71612,71622,71628,71640,71662,71726,71732,71758,71772,71778,71780,71784,71798,71822,71836,71864,71874,71880,71888,71902,71910,71916,71930,71950,71964,71992,72048,72062,72066,72068,72080,72094,72096,72124,72134,72140,72152,72174,72178,72180,72206,72220,72248,72304,72318,72416,72444,72456,72464,72478,72480,72508,72512,72568,72588,72600,72624,72638,72654,72668,72674,72676,72680,72694,72726,72742,72748,72774,72780,72792,72814,72838,72856,72880,72894,72910,72924,72930,72932,72936,72950,72966,72972,72984,73008,73022,73056,73084,73102,73116,73144,73156,73160,73168,73182,73190,73196,73210,73226,73234,73236,73250,73252,73256,73270,73282,73284,73296,73310,73318,73324,73346,73348,73352,73360,73374,73376,73404,73414,73420,73432,73454,73498,73518,73522,73524,73550,73564,73570,73572,73576,73590,73800,73822,73858,73860,73872,73886,73888,73916,73944,73970,73972,73992,74014,74016,74044,74048,74104,74118,74136,74160,74174,74210,74212,74216,74230,74244,74256,74270,74272,74360,74480,74502,74508,74544,74558,74592,74620,74638,74652,74680,74690,74696,74704,74726,74732,74782,74784,74812,74992,75232,75288,75326,75360,75388,75456,75512,75576,75632,75646,75650,75652,75664,75678,75680,75708,75718,75724,75736,75758,75808,75836,75840,75896,76016,76256,76736,76824,76848,76862,76896,76924,76992,77048,77296,77340,77368,77424,77438,77536,77564,77572,77576,77584,77600,77628,77632,77688,77702,77708,77720,77744,77758,77774,77788,77870,77902,77916,77922,77928,77966,77980,78008,78018,78024,78032,78046,78060,78074,78094,78136,78192,78206,78210,78212,78224,78238,78240,78268,78278,78284,78296,78322,78324,78350,78364,78448,78462,78560,78588,78600,78622,78624,78652,78656,78712,78726,78744,78768,78782,78798,78812,78818,78820,78824,78838,78862,78876,78904,78960,78974,79072,79100,79296,79352,79368,79376,79390,79392,79420,79424,79480,79600,79628,79640,79664,79678,79712,79740,79772,79800,79810,79812,79816,79824,79838,79846,79852,79894,79910,79916,79942,79948,79960,79982,79988,80006,80024,80048,80062,80078,80092,80098,80100,80104,80134,80140,80176,80190,80224,80252,80270,80284,80312,80328,80336,80350,80358,80364,80378,80390,80396,80408,80432,80446,80480,80508,80576,80632,80654,80668,80696,80752,80766,80776,80784,80798,80800,80828,80844,80856,80878,80882,80884,80914,80916,80930,80932,80936,80950,80962,80968,80976,80990,80998,81004,81026,81028,81040,81054,81056,81084,81094,81100,81112,81134,81154,81156,81160,81168,81182,81184,81212,81216,81272,81286,81292,81304,81328,81342,81358,81372,81380,81384,81398,81434,81454,81458,81460,81486,81500,81506,81508,81512,81526,81550,81564,81592,81602,81604,81608,81616,81630,81638,81644,81702,81708,81722,81734,81740,81752,81774,81778,81780,82050,82078,82080,82108,82180,82184,82192,82206,82208,82236,82240,82296,82316,82328,82352,82366,82402,82404,82408,82440,82448,82462,82464,82492,82496,82552,82672,82694,82700,82712,82736,82750,82784,82812,82830,82882,82884,82888,82896,82918,82924,82952,82960,82974,82976,83004,83008,83064,83184,83424,83468,83480,83504,83518,83552,83580,83648,83704,83740,83768,83824,83838,83842,83844,83848,83856,83872,83900,83910,83916,83928,83950,83984,84e3,84028,84032,84088,84208,84448,84928,85040,85054,85088,85116,85184,85240,85488,85560,85616,85630,85728,85756,85764,85768,85776,85790,85792,85820,85824,85880,85894,85900,85912,85936,85966,85980,86048,86080,86136,86256,86496,86976,88160,88188,88256,88312,88560,89056,89200,89214,89312,89340,89536,89592,89608,89616,89632,89664,89720,89840,89868,89880,89904,89952,89980,89998,90012,90040,90190,90204,90254,90268,90296,90306,90308,90312,90334,90382,90396,90424,90480,90494,90500,90504,90512,90526,90528,90556,90566,90572,90584,90610,90612,90638,90652,90680,90736,90750,90848,90876,90884,90888,90896,90910,90912,90940,90944,91e3,91014,91020,91032,91056,91070,91086,91100,91106,91108,91112,91126,91150,91164,91192,91248,91262,91360,91388,91584,91640,91664,91678,91680,91708,91712,91768,91888,91928,91952,91966,92e3,92028,92046,92060,92088,92098,92100,92104,92112,92126,92134,92140,92188,92216,92272,92384,92412,92608,92664,93168,93200,93214,93216,93244,93248,93304,93424,93664,93720,93744,93758,93792,93820,93888,93944,93980,94008,94064,94078,94084,94088,94096,94110,94112,94140,94150,94156,94168,94246,94252,94278,94284,94296,94318,94342,94348,94360,94384,94398,94414,94428,94440,94470,94476,94488,94512,94526,94560,94588,94606,94620,94648,94658,94660,94664,94672,94686,94694,94700,94714,94726,94732,94744,94768,94782,94816,94844,94912,94968,94990,95004,95032,95088,95102,95112,95120,95134,95136,95164,95180,95192,95214,95218,95220,95244,95256,95280,95294,95328,95356,95424,95480,95728,95758,95772,95800,95856,95870,95968,95996,96008,96016,96030,96032,96060,96064,96120,96152,96176,96190,96220,96226,96228,96232,96290,96292,96296,96310,96322,96324,96328,96336,96350,96358,96364,96386,96388,96392,96400,96414,96416,96444,96454,96460,96472,96494,96498,96500,96514,96516,96520,96528,96542,96544,96572,96576,96632,96646,96652,96664,96688,96702,96718,96732,96738,96740,96744,96758,96772,96776,96784,96798,96800,96828,96832,96888,97008,97030,97036,97048,97072,97086,97120,97148,97166,97180,97208,97220,97224,97232,97246,97254,97260,97326,97330,97332,97358,97372,97378,97380,97384,97398,97422,97436,97464,97474,97476,97480,97488,97502,97510,97516,97550,97564,97592,97648,97666,97668,97672,97680,97694,97696,97724,97734,97740,97752,97774,97830,97836,97850,97862,97868,97880,97902,97906,97908,97926,97932,97944,97968,97998,98012,98018,98020,98024,98038,98618,98674,98676,98838,98854,98874,98892,98904,98926,98930,98932,98968,99006,99042,99044,99048,99062,99166,99194,99246,99286,99350,99366,99372,99386,99398,99416,99438,99442,99444,99462,99504,99518,99534,99548,99554,99556,99560,99574,99590,99596,99608,99632,99646,99680,99708,99726,99740,99768,99778,99780,99784,99792,99806,99814,99820,99834,99858,99860,99874,99880,99894,99906,99920,99934,99962,99970,99972,99976,99984,99998,1e5,100028,100038,100044,100056,100078,100082,100084,100142,100174,100188,100246,100262,100268,100306,100308,100390,100396,100410,100422,100428,100440,100462,100466,100468,100486,100504,100528,100542,100558,100572,100578,100580,100584,100598,100620,100656,100670,100704,100732,100750,100792,100802,100808,100816,100830,100838,100844,100858,100888,100912,100926,100960,100988,101056,101112,101148,101176,101232,101246,101250,101252,101256,101264,101278,101280,101308,101318,101324,101336,101358,101362,101364,101410,101412,101416,101430,101442,101448,101456,101470,101478,101498,101506,101508,101520,101534,101536,101564,101580,101618,101620,101636,101640,101648,101662,101664,101692,101696,101752,101766,101784,101838,101858,101860,101864,101934,101938,101940,101966,101980,101986,101988,101992,102030,102044,102072,102082,102084,102088,102096,102138,102166,102182,102188,102214,102220,102232,102254,102282,102290,102292,102306,102308,102312,102326,102444,102458,102470,102476,102488,102514,102516,102534,102552,102576,102590,102606,102620,102626,102632,102646,102662,102668,102704,102718,102752,102780,102798,102812,102840,102850,102856,102864,102878,102886,102892,102906,102936,102974,103008,103036,103104,103160,103224,103280,103294,103298,103300,103312,103326,103328,103356,103366,103372,103384,103406,103410,103412,103472,103486,103520,103548,103616,103672,103920,103992,104048,104062,104160,104188,104194,104196,104200,104208,104224,104252,104256,104312,104326,104332,104344,104368,104382,104398,104412,104418,104420,104424,104482,104484,104514,104520,104528,104542,104550,104570,104578,104580,104592,104606,104608,104636,104652,104690,104692,104706,104712,104734,104736,104764,104768,104824,104838,104856,104910,104930,104932,104936,104968,104976,104990,104992,105020,105024,105080,105200,105240,105278,105312,105372,105410,105412,105416,105424,105446,105518,105524,105550,105564,105570,105572,105576,105614,105628,105656,105666,105672,105680,105702,105722,105742,105756,105784,105840,105854,105858,105860,105864,105872,105888,105932,105970,105972,106006,106022,106028,106054,106060,106072,106100,106118,106124,106136,106160,106174,106190,106210,106212,106216,106250,106258,106260,106274,106276,106280,106306,106308,106312,106320,106334,106348,106394,106414,106418,106420,106566,106572,106610,106612,106630,106636,106648,106672,106686,106722,106724,106728,106742,106758,106764,106776,106800,106814,106848,106876,106894,106908,106936,106946,106948,106952,106960,106974,106982,106988,107032,107056,107070,107104,107132,107200,107256,107292,107320,107376,107390,107394,107396,107400,107408,107422,107424,107452,107462,107468,107480,107502,107506,107508,107544,107568,107582,107616,107644,107712,107768,108016,108060,108088,108144,108158,108256,108284,108290,108292,108296,108304,108318,108320,108348,108352,108408,108422,108428,108440,108464,108478,108494,108508,108514,108516,108520,108592,108640,108668,108736,108792,109040,109536,109680,109694,109792,109820,110016,110072,110084,110088,110096,110112,110140,110144,110200,110320,110342,110348,110360,110384,110398,110432,110460,110478,110492,110520,110532,110536,110544,110558,110658,110686,110714,110722,110724,110728,110736,110750,110752,110780,110796,110834,110836,110850,110852,110856,110864,110878,110880,110908,110912,110968,110982,111e3,111054,111074,111076,111080,111108,111112,111120,111134,111136,111164,111168,111224,111344,111372,111422,111456,111516,111554,111556,111560,111568,111590,111632,111646,111648,111676,111680,111736,111856,112096,112152,112224,112252,112320,112440,112514,112516,112520,112528,112542,112544,112588,112686,112718,112732,112782,112796,112824,112834,112836,112840,112848,112870,112890,112910,112924,112952,113008,113022,113026,113028,113032,113040,113054,113056,113100,113138,113140,113166,113180,113208,113264,113278,113376,113404,113416,113424,113440,113468,113472,113560,113614,113634,113636,113640,113686,113702,113708,113734,113740,113752,113778,113780,113798,113804,113816,113840,113854,113870,113890,113892,113896,113926,113932,113944,113968,113982,114016,114044,114076,114114,114116,114120,114128,114150,114170,114194,114196,114210,114212,114216,114242,114244,114248,114256,114270,114278,114306,114308,114312,114320,114334,114336,114364,114380,114420,114458,114478,114482,114484,114510,114524,114530,114532,114536,114842,114866,114868,114970,114994,114996,115042,115044,115048,115062,115130,115226,115250,115252,115278,115292,115298,115300,115304,115318,115342,115394,115396,115400,115408,115422,115430,115436,115450,115478,115494,115514,115526,115532,115570,115572,115738,115758,115762,115764,115790,115804,115810,115812,115816,115830,115854,115868,115896,115906,115912,115920,115934,115942,115948,115962,115996,116024,116080,116094,116098,116100,116104,116112,116126,116128,116156,116166,116172,116184,116206,116210,116212,116246,116262,116268,116282,116294,116300,116312,116334,116338,116340,116358,116364,116376,116400,116414,116430,116444,116450,116452,116456,116498,116500,116514,116520,116534,116546,116548,116552,116560,116574,116582,116588,116602,116654,116694,116714,116762,116782,116786,116788,116814,116828,116834,116836,116840,116854,116878,116892,116920,116930,116936,116944,116958,116966,116972,116986,117006,117048,117104,117118,117122,117124,117136,117150,117152,117180,117190,117196,117208,117230,117234,117236,117304,117360,117374,117472,117500,117506,117508,117512,117520,117536,117564,117568,117624,117638,117644,117656,117680,117694,117710,117724,117730,117732,117736,117750,117782,117798,117804,117818,117830,117848,117874,117876,117894,117936,117950,117966,117986,117988,117992,118022,118028,118040,118064,118078,118112,118140,118172,118210,118212,118216,118224,118238,118246,118266,118306,118312,118338,118352,118366,118374,118394,118402,118404,118408,118416,118430,118432,118460,118476,118514,118516,118574,118578,118580,118606,118620,118626,118628,118632,118678,118694,118700,118730,118738,118740,118830,118834,118836,118862,118876,118882,118884,118888,118902,118926,118940,118968,118978,118980,118984,118992,119006,119014,119020,119034,119068,119096,119152,119166,119170,119172,119176,119184,119198,119200,119228,119238,119244,119256,119278,119282,119284,119324,119352,119408,119422,119520,119548,119554,119556,119560,119568,119582,119584,119612,119616,119672,119686,119692,119704,119728,119742,119758,119772,119778,119780,119784,119798,119920,119934,120032,120060,120256,120312,120324,120328,120336,120352,120384,120440,120560,120582,120588,120600,120624,120638,120672,120700,120718,120732,120760,120770,120772,120776,120784,120798,120806,120812,120870,120876,120890,120902,120908,120920,120946,120948,120966,120972,120984,121008,121022,121038,121058,121060,121064,121078,121100,121112,121136,121150,121184,121212,121244,121282,121284,121288,121296,121318,121338,121356,121368,121392,121406,121440,121468,121536,121592,121656,121730,121732,121736,121744,121758,121760,121804,121842,121844,121890,121922,121924,121928,121936,121950,121958,121978,121986,121988,121992,122e3,122014,122016,122044,122060,122098,122100,122116,122120,122128,122142,122144,122172,122176,122232,122246,122264,122318,122338,122340,122344,122414,122418,122420,122446,122460,122466,122468,122472,122510,122524,122552,122562,122564,122568,122576,122598,122618,122646,122662,122668,122694,122700,122712,122738,122740,122762,122770,122772,122786,122788,122792,123018,123026,123028,123042,123044,123048,123062,123098,123146,123154,123156,123170,123172,123176,123190,123202,123204,123208,123216,123238,123244,123258,123290,123314,123316,123402,123410,123412,123426,123428,123432,123446,123458,123464,123472,123486,123494,123500,123514,123522,123524,123528,123536,123552,123580,123590,123596,123608,123630,123634,123636,123674,123698,123700,123740,123746,123748,123752,123834,123914,123922,123924,123938,123944,123958,123970,123976,123984,123998,124006,124012,124026,124034,124036,124048,124062,124064,124092,124102,124108,124120,124142,124146,124148,124162,124164,124168,124176,124190,124192,124220,124224,124280,124294,124300,124312,124336,124350,124366,124380,124386,124388,124392,124406,124442,124462,124466,124468,124494,124508,124514,124520,124558,124572,124600,124610,124612,124616,124624,124646,124666,124694,124710,124716,124730,124742,124748,124760,124786,124788,124818,124820,124834,124836,124840,124854,124946,124948,124962,124964,124968,124982,124994,124996,125e3,125008,125022,125030,125036,125050,125058,125060,125064,125072,125086,125088,125116,125126,125132,125144,125166,125170,125172,125186,125188,125192,125200,125216,125244,125248,125304,125318,125324,125336,125360,125374,125390,125404,125410,125412,125416,125430,125444,125448,125456,125472,125504,125560,125680,125702,125708,125720,125744,125758,125792,125820,125838,125852,125880,125890,125892,125896,125904,125918,125926,125932,125978,125998,126002,126004,126030,126044,126050,126052,126056,126094,126108,126136,126146,126148,126152,126160,126182,126202,126222,126236,126264,126320,126334,126338,126340,126344,126352,126366,126368,126412,126450,126452,126486,126502,126508,126522,126534,126540,126552,126574,126578,126580,126598,126604,126616,126640,126654,126670,126684,126690,126692,126696,126738,126754,126756,126760,126774,126786,126788,126792,126800,126814,126822,126828,126842,126894,126898,126900,126934,127126,127142,127148,127162,127178,127186,127188,127254,127270,127276,127290,127302,127308,127320,127342,127346,127348,127370,127378,127380,127394,127396,127400,127450,127510,127526,127532,127546,127558,127576,127598,127602,127604,127622,127628,127640,127664,127678,127694,127708,127714,127716,127720,127734,127754,127762,127764,127778,127784,127810,127812,127816,127824,127838,127846,127866,127898,127918,127922,127924,128022,128038,128044,128058,128070,128076,128088,128110,128114,128116,128134,128140,128152,128176,128190,128206,128220,128226,128228,128232,128246,128262,128268,128280,128304,128318,128352,128380,128398,128412,128440,128450,128452,128456,128464,128478,128486,128492,128506,128522,128530,128532,128546,128548,128552,128566,128578,128580,128584,128592,128606,128614,128634,128642,128644,128648,128656,128670,128672,128700,128716,128754,128756,128794,128814,128818,128820,128846,128860,128866,128868,128872,128886,128918,128934,128940,128954,128978,128980,129178,129198,129202,129204,129238,129258,129306,129326,129330,129332,129358,129372,129378,129380,129384,129398,129430,129446,129452,129466,129482,129490,129492,129562,129582,129586,129588,129614,129628,129634,129636,129640,129654,129678,129692,129720,129730,129732,129736,129744,129758,129766,129772,129814,129830,129836,129850,129862,129868,129880,129902,129906,129908,129930,129938,129940,129954,129956,129960,129974,130010]),t.CODEWORD_TABLE=Int32Array.from([2627,1819,2622,2621,1813,1812,2729,2724,2723,2779,2774,2773,902,896,908,868,865,861,859,2511,873,871,1780,835,2493,825,2491,842,837,844,1764,1762,811,810,809,2483,807,2482,806,2480,815,814,813,812,2484,817,816,1745,1744,1742,1746,2655,2637,2635,2626,2625,2623,2628,1820,2752,2739,2737,2728,2727,2725,2730,2785,2783,2778,2777,2775,2780,787,781,747,739,736,2413,754,752,1719,692,689,681,2371,678,2369,700,697,694,703,1688,1686,642,638,2343,631,2341,627,2338,651,646,643,2345,654,652,1652,1650,1647,1654,601,599,2322,596,2321,594,2319,2317,611,610,608,606,2324,603,2323,615,614,612,1617,1616,1614,1612,616,1619,1618,2575,2538,2536,905,901,898,909,2509,2507,2504,870,867,864,860,2512,875,872,1781,2490,2489,2487,2485,1748,836,834,832,830,2494,827,2492,843,841,839,845,1765,1763,2701,2676,2674,2653,2648,2656,2634,2633,2631,2629,1821,2638,2636,2770,2763,2761,2750,2745,2753,2736,2735,2733,2731,1848,2740,2738,2786,2784,591,588,576,569,566,2296,1590,537,534,526,2276,522,2274,545,542,539,548,1572,1570,481,2245,466,2242,462,2239,492,485,482,2249,496,494,1534,1531,1528,1538,413,2196,406,2191,2188,425,419,2202,415,2199,432,430,427,1472,1467,1464,433,1476,1474,368,367,2160,365,2159,362,2157,2155,2152,378,377,375,2166,372,2165,369,2162,383,381,379,2168,1419,1418,1416,1414,385,1411,384,1423,1422,1420,1424,2461,802,2441,2439,790,786,783,794,2409,2406,2403,750,742,738,2414,756,753,1720,2367,2365,2362,2359,1663,693,691,684,2373,680,2370,702,699,696,704,1690,1687,2337,2336,2334,2332,1624,2329,1622,640,637,2344,634,2342,630,2340,650,648,645,2346,655,653,1653,1651,1649,1655,2612,2597,2595,2571,2568,2565,2576,2534,2529,2526,1787,2540,2537,907,904,900,910,2503,2502,2500,2498,1768,2495,1767,2510,2508,2506,869,866,863,2513,876,874,1782,2720,2713,2711,2697,2694,2691,2702,2672,2670,2664,1828,2678,2675,2647,2646,2644,2642,1823,2639,1822,2654,2652,2650,2657,2771,1855,2765,2762,1850,1849,2751,2749,2747,2754,353,2148,344,342,336,2142,332,2140,345,1375,1373,306,2130,299,2128,295,2125,319,314,311,2132,1354,1352,1349,1356,262,257,2101,253,2096,2093,274,273,267,2107,263,2104,280,278,275,1316,1311,1308,1320,1318,2052,202,2050,2044,2040,219,2063,212,2060,208,2055,224,221,2066,1260,1258,1252,231,1248,229,1266,1264,1261,1268,155,1998,153,1996,1994,1991,1988,165,164,2007,162,2006,159,2003,2e3,172,171,169,2012,166,2010,1186,1184,1182,1179,175,1176,173,1192,1191,1189,1187,176,1194,1193,2313,2307,2305,592,589,2294,2292,2289,578,572,568,2297,580,1591,2272,2267,2264,1547,538,536,529,2278,525,2275,547,544,541,1574,1571,2237,2235,2229,1493,2225,1489,478,2247,470,2244,465,2241,493,488,484,2250,498,495,1536,1533,1530,1539,2187,2186,2184,2182,1432,2179,1430,2176,1427,414,412,2197,409,2195,405,2193,2190,426,424,421,2203,418,2201,431,429,1473,1471,1469,1466,434,1477,1475,2478,2472,2470,2459,2457,2454,2462,803,2437,2432,2429,1726,2443,2440,792,789,785,2401,2399,2393,1702,2389,1699,2411,2408,2405,745,741,2415,758,755,1721,2358,2357,2355,2353,1661,2350,1660,2347,1657,2368,2366,2364,2361,1666,690,687,2374,683,2372,701,698,705,1691,1689,2619,2617,2610,2608,2605,2613,2593,2588,2585,1803,2599,2596,2563,2561,2555,1797,2551,1795,2573,2570,2567,2577,2525,2524,2522,2520,1786,2517,1785,2514,1783,2535,2533,2531,2528,1788,2541,2539,906,903,911,2721,1844,2715,2712,1838,1836,2699,2696,2693,2703,1827,1826,1824,2673,2671,2669,2666,1829,2679,2677,1858,1857,2772,1854,1853,1851,1856,2766,2764,143,1987,139,1986,135,133,131,1984,128,1983,125,1981,138,137,136,1985,1133,1132,1130,112,110,1974,107,1973,104,1971,1969,122,121,119,117,1977,114,1976,124,1115,1114,1112,1110,1117,1116,84,83,1953,81,1952,78,1950,1948,1945,94,93,91,1959,88,1958,85,1955,99,97,95,1961,1086,1085,1083,1081,1078,100,1090,1089,1087,1091,49,47,1917,44,1915,1913,1910,1907,59,1926,56,1925,53,1922,1919,66,64,1931,61,1929,1042,1040,1038,71,1035,70,1032,68,1048,1047,1045,1043,1050,1049,12,10,1869,1867,1864,1861,21,1880,19,1877,1874,1871,28,1888,25,1886,22,1883,982,980,977,974,32,30,991,989,987,984,34,995,994,992,2151,2150,2147,2146,2144,356,355,354,2149,2139,2138,2136,2134,1359,343,341,338,2143,335,2141,348,347,346,1376,1374,2124,2123,2121,2119,1326,2116,1324,310,308,305,2131,302,2129,298,2127,320,318,316,313,2133,322,321,1355,1353,1351,1357,2092,2091,2089,2087,1276,2084,1274,2081,1271,259,2102,256,2100,252,2098,2095,272,269,2108,266,2106,281,279,277,1317,1315,1313,1310,282,1321,1319,2039,2037,2035,2032,1203,2029,1200,1197,207,2053,205,2051,201,2049,2046,2043,220,218,2064,215,2062,211,2059,228,226,223,2069,1259,1257,1254,232,1251,230,1267,1265,1263,2316,2315,2312,2311,2309,2314,2304,2303,2301,2299,1593,2308,2306,590,2288,2287,2285,2283,1578,2280,1577,2295,2293,2291,579,577,574,571,2298,582,581,1592,2263,2262,2260,2258,1545,2255,1544,2252,1541,2273,2271,2269,2266,1550,535,532,2279,528,2277,546,543,549,1575,1573,2224,2222,2220,1486,2217,1485,2214,1482,1479,2238,2236,2234,2231,1496,2228,1492,480,477,2248,473,2246,469,2243,490,487,2251,497,1537,1535,1532,2477,2476,2474,2479,2469,2468,2466,2464,1730,2473,2471,2453,2452,2450,2448,1729,2445,1728,2460,2458,2456,2463,805,804,2428,2427,2425,2423,1725,2420,1724,2417,1722,2438,2436,2434,2431,1727,2444,2442,793,791,788,795,2388,2386,2384,1697,2381,1696,2378,1694,1692,2402,2400,2398,2395,1703,2392,1701,2412,2410,2407,751,748,744,2416,759,757,1807,2620,2618,1806,1805,2611,2609,2607,2614,1802,1801,1799,2594,2592,2590,2587,1804,2600,2598,1794,1793,1791,1789,2564,2562,2560,2557,1798,2554,1796,2574,2572,2569,2578,1847,1846,2722,1843,1842,1840,1845,2716,2714,1835,1834,1832,1830,1839,1837,2700,2698,2695,2704,1817,1811,1810,897,862,1777,829,826,838,1760,1758,808,2481,1741,1740,1738,1743,2624,1818,2726,2776,782,740,737,1715,686,679,695,1682,1680,639,628,2339,647,644,1645,1643,1640,1648,602,600,597,595,2320,593,2318,609,607,604,1611,1610,1608,1606,613,1615,1613,2328,926,924,892,886,899,857,850,2505,1778,824,823,821,819,2488,818,2486,833,831,828,840,1761,1759,2649,2632,2630,2746,2734,2732,2782,2781,570,567,1587,531,527,523,540,1566,1564,476,467,463,2240,486,483,1524,1521,1518,1529,411,403,2192,399,2189,423,416,1462,1457,1454,428,1468,1465,2210,366,363,2158,360,2156,357,2153,376,373,370,2163,1410,1409,1407,1405,382,1402,380,1417,1415,1412,1421,2175,2174,777,774,771,784,732,725,722,2404,743,1716,676,674,668,2363,665,2360,685,1684,1681,626,624,622,2335,620,2333,617,2330,641,635,649,1646,1644,1642,2566,928,925,2530,2527,894,891,888,2501,2499,2496,858,856,854,851,1779,2692,2668,2665,2645,2643,2640,2651,2768,2759,2757,2744,2743,2741,2748,352,1382,340,337,333,1371,1369,307,300,296,2126,315,312,1347,1342,1350,261,258,250,2097,246,2094,271,268,264,1306,1301,1298,276,1312,1309,2115,203,2048,195,2045,191,2041,213,209,2056,1246,1244,1238,225,1234,222,1256,1253,1249,1262,2080,2079,154,1997,150,1995,147,1992,1989,163,160,2004,156,2001,1175,1174,1172,1170,1167,170,1164,167,1185,1183,1180,1177,174,1190,1188,2025,2024,2022,587,586,564,559,556,2290,573,1588,520,518,512,2268,508,2265,530,1568,1565,461,457,2233,450,2230,446,2226,479,471,489,1526,1523,1520,397,395,2185,392,2183,389,2180,2177,410,2194,402,422,1463,1461,1459,1456,1470,2455,799,2433,2430,779,776,773,2397,2394,2390,734,728,724,746,1717,2356,2354,2351,2348,1658,677,675,673,670,667,688,1685,1683,2606,2589,2586,2559,2556,2552,927,2523,2521,2518,2515,1784,2532,895,893,890,2718,2709,2707,2689,2687,2684,2663,2662,2660,2658,1825,2667,2769,1852,2760,2758,142,141,1139,1138,134,132,129,126,1982,1129,1128,1126,1131,113,111,108,105,1972,101,1970,120,118,115,1109,1108,1106,1104,123,1113,1111,82,79,1951,75,1949,72,1946,92,89,86,1956,1077,1076,1074,1072,98,1069,96,1084,1082,1079,1088,1968,1967,48,45,1916,42,1914,39,1911,1908,60,57,54,1923,50,1920,1031,1030,1028,1026,67,1023,65,1020,62,1041,1039,1036,1033,69,1046,1044,1944,1943,1941,11,9,1868,7,1865,1862,1859,20,1878,16,1875,13,1872,970,968,966,963,29,960,26,23,983,981,978,975,33,971,31,990,988,985,1906,1904,1902,993,351,2145,1383,331,330,328,326,2137,323,2135,339,1372,1370,294,293,291,289,2122,286,2120,283,2117,309,303,317,1348,1346,1344,245,244,242,2090,239,2088,236,2085,2082,260,2099,249,270,1307,1305,1303,1300,1314,189,2038,186,2036,183,2033,2030,2026,206,198,2047,194,216,1247,1245,1243,1240,227,1237,1255,2310,2302,2300,2286,2284,2281,565,563,561,558,575,1589,2261,2259,2256,2253,1542,521,519,517,514,2270,511,533,1569,1567,2223,2221,2218,2215,1483,2211,1480,459,456,453,2232,449,474,491,1527,1525,1522,2475,2467,2465,2451,2449,2446,801,800,2426,2424,2421,2418,1723,2435,780,778,775,2387,2385,2382,2379,1695,2375,1693,2396,735,733,730,727,749,1718,2616,2615,2604,2603,2601,2584,2583,2581,2579,1800,2591,2550,2549,2547,2545,1792,2542,1790,2558,929,2719,1841,2710,2708,1833,1831,2690,2688,2686,1815,1809,1808,1774,1756,1754,1737,1736,1734,1739,1816,1711,1676,1674,633,629,1638,1636,1633,1641,598,1605,1604,1602,1600,605,1609,1607,2327,887,853,1775,822,820,1757,1755,1584,524,1560,1558,468,464,1514,1511,1508,1519,408,404,400,1452,1447,1444,417,1458,1455,2208,364,361,358,2154,1401,1400,1398,1396,374,1393,371,1408,1406,1403,1413,2173,2172,772,726,723,1712,672,669,666,682,1678,1675,625,623,621,618,2331,636,632,1639,1637,1635,920,918,884,880,889,849,848,847,846,2497,855,852,1776,2641,2742,2787,1380,334,1367,1365,301,297,1340,1338,1335,1343,255,251,247,1296,1291,1288,265,1302,1299,2113,204,196,192,2042,1232,1230,1224,214,1220,210,1242,1239,1235,1250,2077,2075,151,148,1993,144,1990,1163,1162,1160,1158,1155,161,1152,157,1173,1171,1168,1165,168,1181,1178,2021,2020,2018,2023,585,560,557,1585,516,509,1562,1559,458,447,2227,472,1516,1513,1510,398,396,393,390,2181,386,2178,407,1453,1451,1449,1446,420,1460,2209,769,764,720,712,2391,729,1713,664,663,661,659,2352,656,2349,671,1679,1677,2553,922,919,2519,2516,885,883,881,2685,2661,2659,2767,2756,2755,140,1137,1136,130,127,1125,1124,1122,1127,109,106,102,1103,1102,1100,1098,116,1107,1105,1980,80,76,73,1947,1068,1067,1065,1063,90,1060,87,1075,1073,1070,1080,1966,1965,46,43,40,1912,36,1909,1019,1018,1016,1014,58,1011,55,1008,51,1029,1027,1024,1021,63,1037,1034,1940,1939,1937,1942,8,1866,4,1863,1,1860,956,954,952,949,946,17,14,969,967,964,961,27,957,24,979,976,972,1901,1900,1898,1896,986,1905,1903,350,349,1381,329,327,324,1368,1366,292,290,287,284,2118,304,1341,1339,1337,1345,243,240,237,2086,233,2083,254,1297,1295,1293,1290,1304,2114,190,187,184,2034,180,2031,177,2027,199,1233,1231,1229,1226,217,1223,1241,2078,2076,584,555,554,552,550,2282,562,1586,507,506,504,502,2257,499,2254,515,1563,1561,445,443,441,2219,438,2216,435,2212,460,454,475,1517,1515,1512,2447,798,797,2422,2419,770,768,766,2383,2380,2376,721,719,717,714,731,1714,2602,2582,2580,2548,2546,2543,923,921,2717,2706,2705,2683,2682,2680,1771,1752,1750,1733,1732,1731,1735,1814,1707,1670,1668,1631,1629,1626,1634,1599,1598,1596,1594,1603,1601,2326,1772,1753,1751,1581,1554,1552,1504,1501,1498,1509,1442,1437,1434,401,1448,1445,2206,1392,1391,1389,1387,1384,359,1399,1397,1394,1404,2171,2170,1708,1672,1669,619,1632,1630,1628,1773,1378,1363,1361,1333,1328,1336,1286,1281,1278,248,1292,1289,2111,1218,1216,1210,197,1206,193,1228,1225,1221,1236,2073,2071,1151,1150,1148,1146,152,1143,149,1140,145,1161,1159,1156,1153,158,1169,1166,2017,2016,2014,2019,1582,510,1556,1553,452,448,1506,1500,394,391,387,1443,1441,1439,1436,1450,2207,765,716,713,1709,662,660,657,1673,1671,916,914,879,878,877,882,1135,1134,1121,1120,1118,1123,1097,1096,1094,1092,103,1101,1099,1979,1059,1058,1056,1054,77,1051,74,1066,1064,1061,1071,1964,1963,1007,1006,1004,1002,999,41,996,37,1017,1015,1012,1009,52,1025,1022,1936,1935,1933,1938,942,940,938,935,932,5,2,955,953,950,947,18,943,15,965,962,958,1895,1894,1892,1890,973,1899,1897,1379,325,1364,1362,288,285,1334,1332,1330,241,238,234,1287,1285,1283,1280,1294,2112,188,185,181,178,2028,1219,1217,1215,1212,200,1209,1227,2074,2072,583,553,551,1583,505,503,500,513,1557,1555,444,442,439,436,2213,455,451,1507,1505,1502,796,763,762,760,767,711,710,708,706,2377,718,715,1710,2544,917,915,2681,1627,1597,1595,2325,1769,1749,1747,1499,1438,1435,2204,1390,1388,1385,1395,2169,2167,1704,1665,1662,1625,1623,1620,1770,1329,1282,1279,2109,1214,1207,1222,2068,2065,1149,1147,1144,1141,146,1157,1154,2013,2011,2008,2015,1579,1549,1546,1495,1487,1433,1431,1428,1425,388,1440,2205,1705,658,1667,1664,1119,1095,1093,1978,1057,1055,1052,1062,1962,1960,1005,1003,1e3,997,38,1013,1010,1932,1930,1927,1934,941,939,936,933,6,930,3,951,948,944,1889,1887,1884,1881,959,1893,1891,35,1377,1360,1358,1327,1325,1322,1331,1277,1275,1272,1269,235,1284,2110,1205,1204,1201,1198,182,1195,179,1213,2070,2067,1580,501,1551,1548,440,437,1497,1494,1490,1503,761,709,707,1706,913,912,2198,1386,2164,2161,1621,1766,2103,1208,2058,2054,1145,1142,2005,2002,1999,2009,1488,1429,1426,2200,1698,1659,1656,1975,1053,1957,1954,1001,998,1924,1921,1918,1928,937,934,931,1879,1876,1873,1870,945,1885,1882,1323,1273,1270,2105,1202,1199,1196,1211,2061,2057,1576,1543,1540,1484,1481,1478,1491,1700]),t}(),Cl=function(){function t(t,e){this.bits=t,this.points=e}return t.prototype.getBits=function(){return this.bits},t.prototype.getPoints=function(){return this.points},t}(),Il=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Sl=function(){function t(){}return t.detectMultiple=function(e,r,n){var o=e.getBlackMatrix(),i=t.detect(n,o);return i.length||((o=o.clone()).rotate180(),i=t.detect(n,o)),new Cl(o,i)},t.detect=function(e,r){for(var n,o,i=new Array,a=0,s=0,u=!1;a<r.getHeight();){var c=t.findVertices(r,a,s);if(null!=c[0]||null!=c[3]){if(u=!0,i.push(c),!e)break;null!=c[2]?(s=Math.trunc(c[2].getX()),a=Math.trunc(c[2].getY())):(s=Math.trunc(c[4].getX()),a=Math.trunc(c[4].getY()))}else{if(!u)break;u=!1,s=0;try{for(var l=(n=void 0,Il(i)),d=l.next();!d.done;d=l.next()){var h=d.value;null!=h[1]&&(a=Math.trunc(Math.max(a,h[1].getY()))),null!=h[3]&&(a=Math.max(a,Math.trunc(h[3].getY())))}}catch(t){n={error:t}}finally{try{d&&!d.done&&(o=l.return)&&o.call(l)}finally{if(n)throw n.error}}a+=t.ROW_STEP}}return i},t.findVertices=function(e,r,n){var o=e.getHeight(),i=e.getWidth(),a=new Array(8);return t.copyToResult(a,t.findRowsWithPattern(e,o,i,r,n,t.START_PATTERN),t.INDEXES_START_PATTERN),null!=a[4]&&(n=Math.trunc(a[4].getX()),r=Math.trunc(a[4].getY())),t.copyToResult(a,t.findRowsWithPattern(e,o,i,r,n,t.STOP_PATTERN),t.INDEXES_STOP_PATTERN),a},t.copyToResult=function(t,e,r){for(var n=0;n<r.length;n++)t[r[n]]=e[n]},t.findRowsWithPattern=function(e,r,n,o,i,a){for(var s=new Array(4),u=!1,c=new Int32Array(a.length);o<r;o+=t.ROW_STEP){if(null!=(f=t.findGuardPattern(e,i,o,n,!1,a,c))){for(;o>0;){if(null==(h=t.findGuardPattern(e,i,--o,n,!1,a,c))){o++;break}f=h}s[0]=new Ns(f[0],o),s[1]=new Ns(f[1],o),u=!0;break}}var l=o+1;if(u){for(var d=0,h=Int32Array.from([Math.trunc(s[0].getX()),Math.trunc(s[1].getX())]);l<r;l++){var f;if(null!=(f=t.findGuardPattern(e,h[0],l,n,!1,a,c))&&Math.abs(h[0]-f[0])<t.MAX_PATTERN_DRIFT&&Math.abs(h[1]-f[1])<t.MAX_PATTERN_DRIFT)h=f,d=0;else{if(d>t.SKIPPED_ROW_COUNT_MAX)break;d++}}l-=d+1,s[2]=new Ns(h[0],l),s[3]=new Ns(h[1],l)}return l-o<t.BARCODE_MIN_HEIGHT&&xa.fill(s,null),s},t.findGuardPattern=function(e,r,n,o,i,a,s){xa.fillWithin(s,0,s.length,0);for(var u=r,c=0;e.get(u,n)&&u>0&&c++<t.MAX_PIXEL_DRIFT;)u--;for(var l=u,d=0,h=a.length,f=i;l<o;l++){if(e.get(l,n)!==f)s[d]++;else{if(d===h-1){if(t.patternMatchVariance(s,a,t.MAX_INDIVIDUAL_VARIANCE)<t.MAX_AVG_VARIANCE)return new Int32Array([u,l]);u+=s[0]+s[1],Da.arraycopy(s,2,s,0,d-1),s[d-1]=0,s[d]=0,d--}else d++;s[d]=1,f=!f}}return d===h-1&&t.patternMatchVariance(s,a,t.MAX_INDIVIDUAL_VARIANCE)<t.MAX_AVG_VARIANCE?new Int32Array([u,l-1]):null},t.patternMatchVariance=function(t,e,r){for(var n=t.length,o=0,i=0,a=0;a<n;a++)o+=t[a],i+=e[a];if(o<i)return 1/0;var s=o/i;r*=s;for(var u=0,c=0;c<n;c++){var l=t[c],d=e[c]*s,h=l>d?l-d:d-l;if(h>r)return 1/0;u+=h}return u/o},t.INDEXES_START_PATTERN=Int32Array.from([0,4,1,5]),t.INDEXES_STOP_PATTERN=Int32Array.from([6,2,7,3]),t.MAX_AVG_VARIANCE=.42,t.MAX_INDIVIDUAL_VARIANCE=.8,t.START_PATTERN=Int32Array.from([8,1,1,1,1,1,1,3]),t.STOP_PATTERN=Int32Array.from([7,1,1,3,1,1,1,2,1]),t.MAX_PIXEL_DRIFT=3,t.MAX_PATTERN_DRIFT=5,t.SKIPPED_ROW_COUNT_MAX=25,t.ROW_STEP=5,t.BARCODE_MIN_HEIGHT=10,t}(),Tl=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Dl=function(){function t(t,e){if(0===e.length)throw new Aa;this.field=t;var r=e.length;if(r>1&&0===e[0]){for(var n=1;n<r&&0===e[n];)n++;n===r?this.coefficients=new Int32Array([0]):(this.coefficients=new Int32Array(r-n),Da.arraycopy(e,n,this.coefficients,0,this.coefficients.length))}else this.coefficients=e}return t.prototype.getCoefficients=function(){return this.coefficients},t.prototype.getDegree=function(){return this.coefficients.length-1},t.prototype.isZero=function(){return 0===this.coefficients[0]},t.prototype.getCoefficient=function(t){return this.coefficients[this.coefficients.length-1-t]},t.prototype.evaluateAt=function(t){var e,r;if(0===t)return this.getCoefficient(0);if(1===t){var n=0;try{for(var o=Tl(this.coefficients),i=o.next();!i.done;i=o.next()){var a=i.value;n=this.field.add(n,a)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}return n}for(var s=this.coefficients[0],u=this.coefficients.length,c=1;c<u;c++)s=this.field.add(this.field.multiply(t,s),this.coefficients[c]);return s},t.prototype.add=function(e){if(!this.field.equals(e.field))throw new Aa("ModulusPolys do not have same ModulusGF field");if(this.isZero())return e;if(e.isZero())return this;var r=this.coefficients,n=e.coefficients;if(r.length>n.length){var o=r;r=n,n=o}var i=new Int32Array(n.length),a=n.length-r.length;Da.arraycopy(n,0,i,0,a);for(var s=a;s<n.length;s++)i[s]=this.field.add(r[s-a],n[s]);return new t(this.field,i)},t.prototype.subtract=function(t){if(!this.field.equals(t.field))throw new Aa("ModulusPolys do not have same ModulusGF field");return t.isZero()?this:this.add(t.negative())},t.prototype.multiply=function(e){return e instanceof t?this.multiplyOther(e):this.multiplyScalar(e)},t.prototype.multiplyOther=function(e){if(!this.field.equals(e.field))throw new Aa("ModulusPolys do not have same ModulusGF field");if(this.isZero()||e.isZero())return new t(this.field,new Int32Array([0]));for(var r=this.coefficients,n=r.length,o=e.coefficients,i=o.length,a=new Int32Array(n+i-1),s=0;s<n;s++)for(var u=r[s],c=0;c<i;c++)a[s+c]=this.field.add(a[s+c],this.field.multiply(u,o[c]));return new t(this.field,a)},t.prototype.negative=function(){for(var e=this.coefficients.length,r=new Int32Array(e),n=0;n<e;n++)r[n]=this.field.subtract(0,this.coefficients[n]);return new t(this.field,r)},t.prototype.multiplyScalar=function(e){if(0===e)return new t(this.field,new Int32Array([0]));if(1===e)return this;for(var r=this.coefficients.length,n=new Int32Array(r),o=0;o<r;o++)n[o]=this.field.multiply(this.coefficients[o],e);return new t(this.field,n)},t.prototype.multiplyByMonomial=function(e,r){if(e<0)throw new Aa;if(0===r)return new t(this.field,new Int32Array([0]));for(var n=this.coefficients.length,o=new Int32Array(n+e),i=0;i<n;i++)o[i]=this.field.multiply(this.coefficients[i],r);return new t(this.field,o)},t.prototype.toString=function(){for(var t=new Za,e=this.getDegree();e>=0;e--){var r=this.getCoefficient(e);0!==r&&(r<0?(t.append(" - "),r=-r):t.length()>0&&t.append(" + "),0!==e&&1===r||t.append(r),0!==e&&(1===e?t.append("x"):(t.append("x^"),t.append(e))))}return t.toString()},t}(),Ol=function(){function t(){}return t.prototype.add=function(t,e){return(t+e)%this.modulus},t.prototype.subtract=function(t,e){return(this.modulus+t-e)%this.modulus},t.prototype.exp=function(t){return this.expTable[t]},t.prototype.log=function(t){if(0===t)throw new Aa;return this.logTable[t]},t.prototype.inverse=function(t){if(0===t)throw new Es;return this.expTable[this.modulus-this.logTable[t]-1]},t.prototype.multiply=function(t,e){return 0===t||0===e?0:this.expTable[(this.logTable[t]+this.logTable[e])%(this.modulus-1)]},t.prototype.getSize=function(){return this.modulus},t.prototype.equals=function(t){return t===this},t}(),Rl=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ml=function(t){function e(e,r){var n=t.call(this)||this;n.modulus=e,n.expTable=new Int32Array(e),n.logTable=new Int32Array(e);for(var o=1,i=0;i<e;i++)n.expTable[i]=o,o=o*r%e;for(i=0;i<e-1;i++)n.logTable[n.expTable[i]]=i;return n.zero=new Dl(n,new Int32Array([0])),n.one=new Dl(n,new Int32Array([1])),n}return Rl(e,t),e.prototype.getZero=function(){return this.zero},e.prototype.getOne=function(){return this.one},e.prototype.buildMonomial=function(t,e){if(t<0)throw new Aa;if(0===e)return this.zero;var r=new Int32Array(t+1);return r[0]=e,new Dl(this,r)},e.PDF417_GF=new e(Al.NUMBER_OF_CODEWORDS,3),e}(Ol),Nl=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},kl=function(){function t(){this.field=Ml.PDF417_GF}return t.prototype.decode=function(t,e,r){for(var n,o,i=new Dl(this.field,t),a=new Int32Array(e),s=!1,u=e;u>0;u--){var c=i.evaluateAt(this.field.exp(u));a[e-u]=c,0!==c&&(s=!0)}if(!s)return 0;var l=this.field.getOne();if(null!=r)try{for(var d=Nl(r),h=d.next();!h.done;h=d.next()){var f=h.value,p=this.field.exp(t.length-1-f),g=new Dl(this.field,new Int32Array([this.field.subtract(0,p),1]));l=l.multiply(g)}}catch(t){n={error:t}}finally{try{h&&!h.done&&(o=d.return)&&o.call(d)}finally{if(n)throw n.error}}var m=new Dl(this.field,a),y=this.runEuclideanAlgorithm(this.field.buildMonomial(e,1),m,e),w=y[0],_=y[1],v=this.findErrorLocations(w),E=this.findErrorMagnitudes(_,w,v);for(u=0;u<v.length;u++){var b=t.length-1-this.field.log(v[u]);if(b<0)throw Sa.getChecksumInstance();t[b]=this.field.subtract(t[b],E[u])}return v.length},t.prototype.runEuclideanAlgorithm=function(t,e,r){if(t.getDegree()<e.getDegree()){var n=t;t=e,e=n}for(var o=t,i=e,a=this.field.getZero(),s=this.field.getOne();i.getDegree()>=Math.round(r/2);){var u=o,c=a;if(a=s,(o=i).isZero())throw Sa.getChecksumInstance();i=u;for(var l=this.field.getZero(),d=o.getCoefficient(o.getDegree()),h=this.field.inverse(d);i.getDegree()>=o.getDegree()&&!i.isZero();){var f=i.getDegree()-o.getDegree(),p=this.field.multiply(i.getCoefficient(i.getDegree()),h);l=l.add(this.field.buildMonomial(f,p)),i=i.subtract(o.multiplyByMonomial(f,p))}s=l.multiply(a).subtract(c).negative()}var g=s.getCoefficient(0);if(0===g)throw Sa.getChecksumInstance();var m=this.field.inverse(g);return[s.multiply(m),i.multiply(m)]},t.prototype.findErrorLocations=function(t){for(var e=t.getDegree(),r=new Int32Array(e),n=0,o=1;o<this.field.getSize()&&n<e;o++)0===t.evaluateAt(o)&&(r[n]=this.field.inverse(o),n++);if(n!==e)throw Sa.getChecksumInstance();return r},t.prototype.findErrorMagnitudes=function(t,e,r){for(var n=e.getDegree(),o=new Int32Array(n),i=1;i<=n;i++)o[n-i]=this.field.multiply(i,e.getCoefficient(i));var a=new Dl(this.field,o),s=r.length,u=new Int32Array(s);for(i=0;i<s;i++){var c=this.field.inverse(r[i]),l=this.field.subtract(0,t.evaluateAt(c)),d=this.field.inverse(a.evaluateAt(c));u[i]=this.field.multiply(l,d)}return u},t}(),xl=function(){function t(e,r,n,o,i){e instanceof t?this.constructor_2(e):this.constructor_1(e,r,n,o,i)}return t.prototype.constructor_1=function(t,e,r,n,o){var i=null==e||null==r,a=null==n||null==o;if(i&&a)throw new $a;i?(e=new Ns(0,n.getY()),r=new Ns(0,o.getY())):a&&(n=new Ns(t.getWidth()-1,e.getY()),o=new Ns(t.getWidth()-1,r.getY())),this.image=t,this.topLeft=e,this.bottomLeft=r,this.topRight=n,this.bottomRight=o,this.minX=Math.trunc(Math.min(e.getX(),r.getX())),this.maxX=Math.trunc(Math.max(n.getX(),o.getX())),this.minY=Math.trunc(Math.min(e.getY(),n.getY())),this.maxY=Math.trunc(Math.max(r.getY(),o.getY()))},t.prototype.constructor_2=function(t){this.image=t.image,this.topLeft=t.getTopLeft(),this.bottomLeft=t.getBottomLeft(),this.topRight=t.getTopRight(),this.bottomRight=t.getBottomRight(),this.minX=t.getMinX(),this.maxX=t.getMaxX(),this.minY=t.getMinY(),this.maxY=t.getMaxY()},t.merge=function(e,r){return null==e?r:null==r?e:new t(e.image,e.topLeft,e.bottomLeft,r.topRight,r.bottomRight)},t.prototype.addMissingRows=function(e,r,n){var o=this.topLeft,i=this.bottomLeft,a=this.topRight,s=this.bottomRight;if(e>0){var u=n?this.topLeft:this.topRight,c=Math.trunc(u.getY()-e);c<0&&(c=0);var l=new Ns(u.getX(),c);n?o=l:a=l}if(r>0){var d=n?this.bottomLeft:this.bottomRight,h=Math.trunc(d.getY()+r);h>=this.image.getHeight()&&(h=this.image.getHeight()-1);var f=new Ns(d.getX(),h);n?i=f:s=f}return new t(this.image,o,i,a,s)},t.prototype.getMinX=function(){return this.minX},t.prototype.getMaxX=function(){return this.maxX},t.prototype.getMinY=function(){return this.minY},t.prototype.getMaxY=function(){return this.maxY},t.prototype.getTopLeft=function(){return this.topLeft},t.prototype.getTopRight=function(){return this.topRight},t.prototype.getBottomLeft=function(){return this.bottomLeft},t.prototype.getBottomRight=function(){return this.bottomRight},t}(),Pl=function(){function t(t,e,r,n){this.columnCount=t,this.errorCorrectionLevel=n,this.rowCountUpperPart=e,this.rowCountLowerPart=r,this.rowCount=e+r}return t.prototype.getColumnCount=function(){return this.columnCount},t.prototype.getErrorCorrectionLevel=function(){return this.errorCorrectionLevel},t.prototype.getRowCount=function(){return this.rowCount},t.prototype.getRowCountUpperPart=function(){return this.rowCountUpperPart},t.prototype.getRowCountLowerPart=function(){return this.rowCountLowerPart},t}(),Bl=function(){function t(){this.buffer=""}return t.form=function(t,e){var r=-1;return t.replace(/%(-)?(0?[0-9]+)?([.][0-9]+)?([#][0-9]+)?([scfpexd%])/g,(function(t,n,o,i,a,s){if("%%"===t)return"%";if(void 0!==e[++r]){t=i?parseInt(i.substr(1)):void 0;var u,c=a?parseInt(a.substr(1)):void 0;switch(s){case"s":u=e[r];break;case"c":u=e[r][0];break;case"f":u=parseFloat(e[r]).toFixed(t);break;case"p":u=parseFloat(e[r]).toPrecision(t);break;case"e":u=parseFloat(e[r]).toExponential(t);break;case"x":u=parseInt(e[r]).toString(c||16);break;case"d":u=parseFloat(parseInt(e[r],c||10).toPrecision(t)).toFixed(0)}u="object"==typeof u?JSON.stringify(u):(+u).toString(c);for(var l=parseInt(o),d=o&&o[0]+""=="0"?"0":" ";u.length<l;)u=void 0!==n?u+d:d+u;return u}}))},t.prototype.format=function(e){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];this.buffer+=t.form(e,r)},t.prototype.toString=function(){return this.buffer},t}(),Fl=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Ll=function(){function t(t){this.boundingBox=new xl(t),this.codewords=new Array(t.getMaxY()-t.getMinY()+1)}return t.prototype.getCodewordNearby=function(e){var r=this.getCodeword(e);if(null!=r)return r;for(var n=1;n<t.MAX_NEARBY_DISTANCE;n++){var o=this.imageRowToCodewordIndex(e)-n;if(o>=0&&null!=(r=this.codewords[o]))return r;if((o=this.imageRowToCodewordIndex(e)+n)<this.codewords.length&&null!=(r=this.codewords[o]))return r}return null},t.prototype.imageRowToCodewordIndex=function(t){return t-this.boundingBox.getMinY()},t.prototype.setCodeword=function(t,e){this.codewords[this.imageRowToCodewordIndex(t)]=e},t.prototype.getCodeword=function(t){return this.codewords[this.imageRowToCodewordIndex(t)]},t.prototype.getBoundingBox=function(){return this.boundingBox},t.prototype.getCodewords=function(){return this.codewords},t.prototype.toString=function(){var t,e,r=new Bl,n=0;try{for(var o=Fl(this.codewords),i=o.next();!i.done;i=o.next()){var a=i.value;null!=a?r.format("%3d: %3d|%3d%n",n++,a.getRowNumber(),a.getValue()):r.format("%3d: | %n",n++)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return r.toString()},t.MAX_NEARBY_DISTANCE=5,t}(),zl=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Ul=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},Vl=function(){function t(){this.values=new Map}return t.prototype.setValue=function(t){t=Math.trunc(t);var e=this.values.get(t);null==e&&(e=0),e++,this.values.set(t,e)},t.prototype.getValue=function(){var t,e,r=-1,n=new Array,o=function(t,e){var o=function(){return t},i=function(){return e};i()>r?(r=i(),(n=[]).push(o())):i()===r&&n.push(o())};try{for(var i=zl(this.values.entries()),a=i.next();!a.done;a=i.next()){var s=Ul(a.value,2);o(s[0],s[1])}}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=i.return)&&e.call(i)}finally{if(t)throw t.error}}return Al.toIntArray(n)},t.prototype.getConfidence=function(t){return this.values.get(t)},t}(),Hl=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),jl=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Gl=function(t){function e(e,r){var n=t.call(this,e)||this;return n._isLeft=r,n}return Hl(e,t),e.prototype.setRowNumbers=function(){var t,e;try{for(var r=jl(this.getCodewords()),n=r.next();!n.done;n=r.next()){var o=n.value;null!=o&&o.setRowNumberAsRowIndicatorColumn()}}catch(e){t={error:e}}finally{try{n&&!n.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}},e.prototype.adjustCompleteIndicatorColumnRowNumbers=function(t){var e=this.getCodewords();this.setRowNumbers(),this.removeIncorrectCodewords(e,t);for(var r=this.getBoundingBox(),n=this._isLeft?r.getTopLeft():r.getTopRight(),o=this._isLeft?r.getBottomLeft():r.getBottomRight(),i=this.imageRowToCodewordIndex(Math.trunc(n.getY())),a=this.imageRowToCodewordIndex(Math.trunc(o.getY())),s=-1,u=1,c=0,l=i;l<a;l++)if(null!=e[l]){var d=e[l],h=d.getRowNumber()-s;if(0===h)c++;else if(1===h)u=Math.max(u,c),c=1,s=d.getRowNumber();else if(h<0||d.getRowNumber()>=t.getRowCount()||h>l)e[l]=null;else{for(var f=void 0,p=(f=u>2?(u-2)*h:h)>=l,g=1;g<=f&&!p;g++)p=null!=e[l-g];p?e[l]=null:(s=d.getRowNumber(),c=1)}}},e.prototype.getRowHeights=function(){var t,e,r=this.getBarcodeMetadata();if(null==r)return null;this.adjustIncompleteIndicatorColumnRowNumbers(r);var n=new Int32Array(r.getRowCount());try{for(var o=jl(this.getCodewords()),i=o.next();!i.done;i=o.next()){var a=i.value;if(null!=a){var s=a.getRowNumber();if(s>=n.length)continue;n[s]++}}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return n},e.prototype.adjustIncompleteIndicatorColumnRowNumbers=function(t){for(var e=this.getBoundingBox(),r=this._isLeft?e.getTopLeft():e.getTopRight(),n=this._isLeft?e.getBottomLeft():e.getBottomRight(),o=this.imageRowToCodewordIndex(Math.trunc(r.getY())),i=this.imageRowToCodewordIndex(Math.trunc(n.getY())),a=this.getCodewords(),s=-1,u=o;u<i;u++)if(null!=a[u]){var c=a[u];c.setRowNumberAsRowIndicatorColumn();var l=c.getRowNumber()-s;0===l||(1===l?s=c.getRowNumber():c.getRowNumber()>=t.getRowCount()?a[u]=null:s=c.getRowNumber())}},e.prototype.getBarcodeMetadata=function(){var t,e,r=this.getCodewords(),n=new Vl,o=new Vl,i=new Vl,a=new Vl;try{for(var s=jl(r),u=s.next();!u.done;u=s.next()){var c=u.value;if(null!=c){c.setRowNumberAsRowIndicatorColumn();var l=c.getValue()%30,d=c.getRowNumber();switch(this._isLeft||(d+=2),d%3){case 0:o.setValue(3*l+1);break;case 1:a.setValue(l/3),i.setValue(l%3);break;case 2:n.setValue(l+1)}}}}catch(e){t={error:e}}finally{try{u&&!u.done&&(e=s.return)&&e.call(s)}finally{if(t)throw t.error}}if(0===n.getValue().length||0===o.getValue().length||0===i.getValue().length||0===a.getValue().length||n.getValue()[0]<1||o.getValue()[0]+i.getValue()[0]<Al.MIN_ROWS_IN_BARCODE||o.getValue()[0]+i.getValue()[0]>Al.MAX_ROWS_IN_BARCODE)return null;var h=new Pl(n.getValue()[0],o.getValue()[0],i.getValue()[0],a.getValue()[0]);return this.removeIncorrectCodewords(r,h),h},e.prototype.removeIncorrectCodewords=function(t,e){for(var r=0;r<t.length;r++){var n=t[r];if(null!=t[r]){var o=n.getValue()%30,i=n.getRowNumber();if(i>e.getRowCount())t[r]=null;else switch(this._isLeft||(i+=2),i%3){case 0:3*o+1!==e.getRowCountUpperPart()&&(t[r]=null);break;case 1:Math.trunc(o/3)===e.getErrorCorrectionLevel()&&o%3===e.getRowCountLowerPart()||(t[r]=null);break;case 2:o+1!==e.getColumnCount()&&(t[r]=null)}}}},e.prototype.isLeft=function(){return this._isLeft},e.prototype.toString=function(){return"IsLeft: "+this._isLeft+"\n"+t.prototype.toString.call(this)},e}(Ll),Wl=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Xl=function(){function t(t,e){this.ADJUST_ROW_NUMBER_SKIP=2,this.barcodeMetadata=t,this.barcodeColumnCount=t.getColumnCount(),this.boundingBox=e,this.detectionResultColumns=new Array(this.barcodeColumnCount+2)}return t.prototype.getDetectionResultColumns=function(){this.adjustIndicatorColumnRowNumbers(this.detectionResultColumns[0]),this.adjustIndicatorColumnRowNumbers(this.detectionResultColumns[this.barcodeColumnCount+1]);var t,e=Al.MAX_CODEWORDS_IN_BARCODE;do{t=e,e=this.adjustRowNumbersAndGetCount()}while(e>0&&e<t);return this.detectionResultColumns},t.prototype.adjustIndicatorColumnRowNumbers=function(t){null!=t&&t.adjustCompleteIndicatorColumnRowNumbers(this.barcodeMetadata)},t.prototype.adjustRowNumbersAndGetCount=function(){var t=this.adjustRowNumbersByRow();if(0===t)return 0;for(var e=1;e<this.barcodeColumnCount+1;e++)for(var r=this.detectionResultColumns[e].getCodewords(),n=0;n<r.length;n++)null!=r[n]&&(r[n].hasValidRowNumber()||this.adjustRowNumbers(e,n,r));return t},t.prototype.adjustRowNumbersByRow=function(){return this.adjustRowNumbersFromBothRI(),this.adjustRowNumbersFromLRI()+this.adjustRowNumbersFromRRI()},t.prototype.adjustRowNumbersFromBothRI=function(){if(null!=this.detectionResultColumns[0]&&null!=this.detectionResultColumns[this.barcodeColumnCount+1])for(var t=this.detectionResultColumns[0].getCodewords(),e=this.detectionResultColumns[this.barcodeColumnCount+1].getCodewords(),r=0;r<t.length;r++)if(null!=t[r]&&null!=e[r]&&t[r].getRowNumber()===e[r].getRowNumber())for(var n=1;n<=this.barcodeColumnCount;n++){var o=this.detectionResultColumns[n].getCodewords()[r];null!=o&&(o.setRowNumber(t[r].getRowNumber()),o.hasValidRowNumber()||(this.detectionResultColumns[n].getCodewords()[r]=null))}},t.prototype.adjustRowNumbersFromRRI=function(){if(null==this.detectionResultColumns[this.barcodeColumnCount+1])return 0;for(var e=0,r=this.detectionResultColumns[this.barcodeColumnCount+1].getCodewords(),n=0;n<r.length;n++)if(null!=r[n])for(var o=r[n].getRowNumber(),i=0,a=this.barcodeColumnCount+1;a>0&&i<this.ADJUST_ROW_NUMBER_SKIP;a--){var s=this.detectionResultColumns[a].getCodewords()[n];null!=s&&(i=t.adjustRowNumberIfValid(o,i,s),s.hasValidRowNumber()||e++)}return e},t.prototype.adjustRowNumbersFromLRI=function(){if(null==this.detectionResultColumns[0])return 0;for(var e=0,r=this.detectionResultColumns[0].getCodewords(),n=0;n<r.length;n++)if(null!=r[n])for(var o=r[n].getRowNumber(),i=0,a=1;a<this.barcodeColumnCount+1&&i<this.ADJUST_ROW_NUMBER_SKIP;a++){var s=this.detectionResultColumns[a].getCodewords()[n];null!=s&&(i=t.adjustRowNumberIfValid(o,i,s),s.hasValidRowNumber()||e++)}return e},t.adjustRowNumberIfValid=function(t,e,r){return null==r||r.hasValidRowNumber()||(r.isValidRowNumber(t)?(r.setRowNumber(t),e=0):++e),e},t.prototype.adjustRowNumbers=function(e,r,n){var o,i;if(null!=this.detectionResultColumns[e-1]){var a=n[r],s=this.detectionResultColumns[e-1].getCodewords(),u=s;null!=this.detectionResultColumns[e+1]&&(u=this.detectionResultColumns[e+1].getCodewords());var c=new Array(14);c[2]=s[r],c[3]=u[r],r>0&&(c[0]=n[r-1],c[4]=s[r-1],c[5]=u[r-1]),r>1&&(c[8]=n[r-2],c[10]=s[r-2],c[11]=u[r-2]),r<n.length-1&&(c[1]=n[r+1],c[6]=s[r+1],c[7]=u[r+1]),r<n.length-2&&(c[9]=n[r+2],c[12]=s[r+2],c[13]=u[r+2]);try{for(var l=Wl(c),d=l.next();!d.done;d=l.next()){var h=d.value;if(t.adjustRowNumber(a,h))return}}catch(t){o={error:t}}finally{try{d&&!d.done&&(i=l.return)&&i.call(l)}finally{if(o)throw o.error}}}},t.adjustRowNumber=function(t,e){return null!=e&&(!(!e.hasValidRowNumber()||e.getBucket()!==t.getBucket())&&(t.setRowNumber(e.getRowNumber()),!0))},t.prototype.getBarcodeColumnCount=function(){return this.barcodeColumnCount},t.prototype.getBarcodeRowCount=function(){return this.barcodeMetadata.getRowCount()},t.prototype.getBarcodeECLevel=function(){return this.barcodeMetadata.getErrorCorrectionLevel()},t.prototype.setBoundingBox=function(t){this.boundingBox=t},t.prototype.getBoundingBox=function(){return this.boundingBox},t.prototype.setDetectionResultColumn=function(t,e){this.detectionResultColumns[t]=e},t.prototype.getDetectionResultColumn=function(t){return this.detectionResultColumns[t]},t.prototype.toString=function(){var t=this.detectionResultColumns[0];null==t&&(t=this.detectionResultColumns[this.barcodeColumnCount+1]);for(var e=new Bl,r=0;r<t.getCodewords().length;r++){e.format("CW %3d:",r);for(var n=0;n<this.barcodeColumnCount+2;n++)if(null!=this.detectionResultColumns[n]){var o=this.detectionResultColumns[n].getCodewords()[r];null!=o?e.format(" %3d|%3d",o.getRowNumber(),o.getValue()):e.format(" | ")}else e.format(" | ");e.format("%n")}return e.toString()},t}(),Yl=function(){function t(e,r,n,o){this.rowNumber=t.BARCODE_ROW_UNKNOWN,this.startX=Math.trunc(e),this.endX=Math.trunc(r),this.bucket=Math.trunc(n),this.value=Math.trunc(o)}return t.prototype.hasValidRowNumber=function(){return this.isValidRowNumber(this.rowNumber)},t.prototype.isValidRowNumber=function(e){return e!==t.BARCODE_ROW_UNKNOWN&&this.bucket===e%3*3},t.prototype.setRowNumberAsRowIndicatorColumn=function(){this.rowNumber=Math.trunc(3*Math.trunc(this.value/30)+Math.trunc(this.bucket/3))},t.prototype.getWidth=function(){return this.endX-this.startX},t.prototype.getStartX=function(){return this.startX},t.prototype.getEndX=function(){return this.endX},t.prototype.getBucket=function(){return this.bucket},t.prototype.getValue=function(){return this.value},t.prototype.getRowNumber=function(){return this.rowNumber},t.prototype.setRowNumber=function(t){this.rowNumber=t},t.prototype.toString=function(){return this.rowNumber+"|"+this.value},t.BARCODE_ROW_UNKNOWN=-1,t}(),Zl=function(){function t(){}return t.initialize=function(){for(var e=0;e<Al.SYMBOL_TABLE.length;e++)for(var r=Al.SYMBOL_TABLE[e],n=1&r,o=0;o<Al.BARS_IN_MODULE;o++){for(var i=0;(1&r)===n;)i+=1,r>>=1;n=1&r,t.RATIOS_TABLE[e]||(t.RATIOS_TABLE[e]=new Array(Al.BARS_IN_MODULE)),t.RATIOS_TABLE[e][Al.BARS_IN_MODULE-o-1]=Math.fround(i/Al.MODULES_IN_CODEWORD)}this.bSymbolTableReady=!0},t.getDecodedValue=function(e){var r=t.getDecodedCodewordValue(t.sampleBitCounts(e));return-1!==r?r:t.getClosestDecodedValue(e)},t.sampleBitCounts=function(t){for(var e=Rs.sum(t),r=new Int32Array(Al.BARS_IN_MODULE),n=0,o=0,i=0;i<Al.MODULES_IN_CODEWORD;i++){var a=e/(2*Al.MODULES_IN_CODEWORD)+i*e/Al.MODULES_IN_CODEWORD;o+t[n]<=a&&(o+=t[n],n++),r[n]++}return r},t.getDecodedCodewordValue=function(e){var r=t.getBitValue(e);return-1===Al.getCodeword(r)?-1:r},t.getBitValue=function(t){for(var e=0,r=0;r<t.length;r++)for(var n=0;n<t[r];n++)e=e<<1|(r%2==0?1:0);return Math.trunc(e)},t.getClosestDecodedValue=function(e){var r=Rs.sum(e),n=new Array(Al.BARS_IN_MODULE);if(r>1)for(var o=0;o<n.length;o++)n[o]=Math.fround(e[o]/r);var i=Ms.MAX_VALUE,a=-1;this.bSymbolTableReady||t.initialize();for(var s=0;s<t.RATIOS_TABLE.length;s++){for(var u=0,c=t.RATIOS_TABLE[s],l=0;l<Al.BARS_IN_MODULE;l++){var d=Math.fround(c[l]-n[l]);if((u+=Math.fround(d*d))>=i)break}u<i&&(i=u,a=Al.SYMBOL_TABLE[s])}return a},t.bSymbolTableReady=!1,t.RATIOS_TABLE=new Array(Al.SYMBOL_TABLE.length).map((function(t){return new Array(Al.BARS_IN_MODULE)})),t}(),ql=function(){function t(){this.segmentCount=-1,this.fileSize=-1,this.timestamp=-1,this.checksum=-1}return t.prototype.getSegmentIndex=function(){return this.segmentIndex},t.prototype.setSegmentIndex=function(t){this.segmentIndex=t},t.prototype.getFileId=function(){return this.fileId},t.prototype.setFileId=function(t){this.fileId=t},t.prototype.getOptionalData=function(){return this.optionalData},t.prototype.setOptionalData=function(t){this.optionalData=t},t.prototype.isLastSegment=function(){return this.lastSegment},t.prototype.setLastSegment=function(t){this.lastSegment=t},t.prototype.getSegmentCount=function(){return this.segmentCount},t.prototype.setSegmentCount=function(t){this.segmentCount=t},t.prototype.getSender=function(){return this.sender||null},t.prototype.setSender=function(t){this.sender=t},t.prototype.getAddressee=function(){return this.addressee||null},t.prototype.setAddressee=function(t){this.addressee=t},t.prototype.getFileName=function(){return this.fileName},t.prototype.setFileName=function(t){this.fileName=t},t.prototype.getFileSize=function(){return this.fileSize},t.prototype.setFileSize=function(t){this.fileSize=t},t.prototype.getChecksum=function(){return this.checksum},t.prototype.setChecksum=function(t){this.checksum=t},t.prototype.getTimestamp=function(){return this.timestamp},t.prototype.setTimestamp=function(t){this.timestamp=t},t}(),Kl=function(){function t(){}return t.parseLong=function(t,e){return void 0===e&&(e=void 0),parseInt(t,e)},t}(),$l=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Jl=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return $l(e,t),e.kind="NullPointerException",e}(_a),Ql=function(){function t(){}return t.prototype.writeBytes=function(t){this.writeBytesOffset(t,0,t.length)},t.prototype.writeBytesOffset=function(t,e,r){if(null==t)throw new Jl;if(e<0||e>t.length||r<0||e+r>t.length||e+r<0)throw new Ra;if(0!==r)for(var n=0;n<r;n++)this.write(t[e+n])},t.prototype.flush=function(){},t.prototype.close=function(){},t}(),td=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),ed=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return td(e,t),e}(_a),rd=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),nd=function(t){function e(e){void 0===e&&(e=32);var r=t.call(this)||this;if(r.count=0,e<0)throw new Aa("Negative initial size: "+e);return r.buf=new Uint8Array(e),r}return rd(e,t),e.prototype.ensureCapacity=function(t){t-this.buf.length>0&&this.grow(t)},e.prototype.grow=function(t){var e=this.buf.length<<1;if(e-t<0&&(e=t),e<0){if(t<0)throw new ed;e=Pa.MAX_VALUE}this.buf=xa.copyOfUint8Array(this.buf,e)},e.prototype.write=function(t){this.ensureCapacity(this.count+1),this.buf[this.count]=t,this.count+=1},e.prototype.writeBytesOffset=function(t,e,r){if(e<0||e>t.length||r<0||e+r-t.length>0)throw new Ra;this.ensureCapacity(this.count+r),Da.arraycopy(t,e,this.buf,this.count,r),this.count+=r},e.prototype.writeTo=function(t){t.writeBytesOffset(this.buf,0,this.count)},e.prototype.reset=function(){this.count=0},e.prototype.toByteArray=function(){return xa.copyOfUint8Array(this.buf,this.count)},e.prototype.size=function(){return this.count},e.prototype.toString=function(t){return t?"string"==typeof t?this.toString_string(t):this.toString_number(t):this.toString_void()},e.prototype.toString_void=function(){return new String(this.buf).toString()},e.prototype.toString_string=function(t){return new String(this.buf).toString()},e.prototype.toString_number=function(t){return new String(this.buf).toString()},e.prototype.close=function(){},e}(Ql);function od(){if("undefined"!=typeof window)return window.BigInt||null;if(void 0!==Oo)return Oo.BigInt||null;if("undefined"!=typeof self)return self.BigInt||null;throw new Error("Can't search globals for BigInt!")}function id(t){if(void 0===il&&(il=od()),null===il)throw new Error("BigInt is not supported!");return il(t)}!function(t){t[t.ALPHA=0]="ALPHA",t[t.LOWER=1]="LOWER",t[t.MIXED=2]="MIXED",t[t.PUNCT=3]="PUNCT",t[t.ALPHA_SHIFT=4]="ALPHA_SHIFT",t[t.PUNCT_SHIFT=5]="PUNCT_SHIFT"}(ol||(ol={}));var ad=function(){function t(){}return t.decode=function(e,r){var n=new Za(""),o=ja.ISO8859_1;n.enableDecoding(o);for(var i=1,a=e[i++],s=new ql;i<e[0];){switch(a){case t.TEXT_COMPACTION_MODE_LATCH:i=t.textCompaction(e,i,n);break;case t.BYTE_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH_6:i=t.byteCompaction(a,e,o,i,n);break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:n.append(e[i++]);break;case t.NUMERIC_COMPACTION_MODE_LATCH:i=t.numericCompaction(e,i,n);break;case t.ECI_CHARSET:ja.getCharacterSetECIByValue(e[i++]);break;case t.ECI_GENERAL_PURPOSE:i+=2;break;case t.ECI_USER_DEFINED:i++;break;case t.BEGIN_MACRO_PDF417_CONTROL_BLOCK:i=t.decodeMacroBlock(e,i,s);break;case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case t.MACRO_PDF417_TERMINATOR:throw new Ua;default:i--,i=t.textCompaction(e,i,n)}if(!(i<e.length))throw Ua.getFormatInstance();a=e[i++]}if(0===n.length())throw Ua.getFormatInstance();var u=new ys(null,n.toString(),null,r);return u.setOther(s),u},t.decodeMacroBlock=function(e,r,n){if(r+t.NUMBER_OF_SEQUENCE_CODEWORDS>e[0])throw Ua.getFormatInstance();for(var o=new Int32Array(t.NUMBER_OF_SEQUENCE_CODEWORDS),i=0;i<t.NUMBER_OF_SEQUENCE_CODEWORDS;i++,r++)o[i]=e[r];n.setSegmentIndex(Pa.parseInt(t.decodeBase900toBase10(o,t.NUMBER_OF_SEQUENCE_CODEWORDS)));var a=new Za;r=t.textCompaction(e,r,a),n.setFileId(a.toString());var s=-1;for(e[r]===t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD&&(s=r+1);r<e[0];)switch(e[r]){case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:switch(e[++r]){case t.MACRO_PDF417_OPTIONAL_FIELD_FILE_NAME:var u=new Za;r=t.textCompaction(e,r+1,u),n.setFileName(u.toString());break;case t.MACRO_PDF417_OPTIONAL_FIELD_SENDER:var c=new Za;r=t.textCompaction(e,r+1,c),n.setSender(c.toString());break;case t.MACRO_PDF417_OPTIONAL_FIELD_ADDRESSEE:var l=new Za;r=t.textCompaction(e,r+1,l),n.setAddressee(l.toString());break;case t.MACRO_PDF417_OPTIONAL_FIELD_SEGMENT_COUNT:var d=new Za;r=t.numericCompaction(e,r+1,d),n.setSegmentCount(Pa.parseInt(d.toString()));break;case t.MACRO_PDF417_OPTIONAL_FIELD_TIME_STAMP:var h=new Za;r=t.numericCompaction(e,r+1,h),n.setTimestamp(Kl.parseLong(h.toString()));break;case t.MACRO_PDF417_OPTIONAL_FIELD_CHECKSUM:var f=new Za;r=t.numericCompaction(e,r+1,f),n.setChecksum(Pa.parseInt(f.toString()));break;case t.MACRO_PDF417_OPTIONAL_FIELD_FILE_SIZE:var p=new Za;r=t.numericCompaction(e,r+1,p),n.setFileSize(Kl.parseLong(p.toString()));break;default:throw Ua.getFormatInstance()}break;case t.MACRO_PDF417_TERMINATOR:r++,n.setLastSegment(!0);break;default:throw Ua.getFormatInstance()}if(-1!==s){var g=r-s;n.isLastSegment()&&g--,n.setOptionalData(xa.copyOfRange(e,s,s+g))}return r},t.textCompaction=function(e,r,n){for(var o=new Int32Array(2*(e[0]-r)),i=new Int32Array(2*(e[0]-r)),a=0,s=!1;r<e[0]&&!s;){var u=e[r++];if(u<t.TEXT_COMPACTION_MODE_LATCH)o[a]=u/30,o[a+1]=u%30,a+=2;else switch(u){case t.TEXT_COMPACTION_MODE_LATCH:o[a++]=t.TEXT_COMPACTION_MODE_LATCH;break;case t.BYTE_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH_6:case t.NUMERIC_COMPACTION_MODE_LATCH:case t.BEGIN_MACRO_PDF417_CONTROL_BLOCK:case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case t.MACRO_PDF417_TERMINATOR:r--,s=!0;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:o[a]=t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE,u=e[r++],i[a]=u,a++}}return t.decodeTextCompaction(o,i,a,n),r},t.decodeTextCompaction=function(e,r,n,o){for(var i=ol.ALPHA,a=ol.ALPHA,s=0;s<n;){var u=e[s],c="";switch(i){case ol.ALPHA:if(u<26)c=String.fromCharCode(65+u);else switch(u){case 26:c=" ";break;case t.LL:i=ol.LOWER;break;case t.ML:i=ol.MIXED;break;case t.PS:a=i,i=ol.PUNCT_SHIFT;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:o.append(r[s]);break;case t.TEXT_COMPACTION_MODE_LATCH:i=ol.ALPHA}break;case ol.LOWER:if(u<26)c=String.fromCharCode(97+u);else switch(u){case 26:c=" ";break;case t.AS:a=i,i=ol.ALPHA_SHIFT;break;case t.ML:i=ol.MIXED;break;case t.PS:a=i,i=ol.PUNCT_SHIFT;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:o.append(r[s]);break;case t.TEXT_COMPACTION_MODE_LATCH:i=ol.ALPHA}break;case ol.MIXED:if(u<t.PL)c=t.MIXED_CHARS[u];else switch(u){case t.PL:i=ol.PUNCT;break;case 26:c=" ";break;case t.LL:i=ol.LOWER;break;case t.AL:i=ol.ALPHA;break;case t.PS:a=i,i=ol.PUNCT_SHIFT;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:o.append(r[s]);break;case t.TEXT_COMPACTION_MODE_LATCH:i=ol.ALPHA}break;case ol.PUNCT:if(u<t.PAL)c=t.PUNCT_CHARS[u];else switch(u){case t.PAL:i=ol.ALPHA;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:o.append(r[s]);break;case t.TEXT_COMPACTION_MODE_LATCH:i=ol.ALPHA}break;case ol.ALPHA_SHIFT:if(i=a,u<26)c=String.fromCharCode(65+u);else switch(u){case 26:c=" ";break;case t.TEXT_COMPACTION_MODE_LATCH:i=ol.ALPHA}break;case ol.PUNCT_SHIFT:if(i=a,u<t.PAL)c=t.PUNCT_CHARS[u];else switch(u){case t.PAL:i=ol.ALPHA;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:o.append(r[s]);break;case t.TEXT_COMPACTION_MODE_LATCH:i=ol.ALPHA}}""!==c&&o.append(c),s++}},t.byteCompaction=function(e,r,n,o,i){var a=new nd,s=0,u=0,c=!1;switch(e){case t.BYTE_COMPACTION_MODE_LATCH:for(var l=new Int32Array(6),d=r[o++];o<r[0]&&!c;)switch(l[s++]=d,u=900*u+d,d=r[o++]){case t.TEXT_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH:case t.NUMERIC_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH_6:case t.BEGIN_MACRO_PDF417_CONTROL_BLOCK:case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case t.MACRO_PDF417_TERMINATOR:o--,c=!0;break;default:if(s%5==0&&s>0){for(var h=0;h<6;++h)a.write(Number(id(u)>>id(8*(5-h))));u=0,s=0}}o===r[0]&&d<t.TEXT_COMPACTION_MODE_LATCH&&(l[s++]=d);for(var f=0;f<s;f++)a.write(l[f]);break;case t.BYTE_COMPACTION_MODE_LATCH_6:for(;o<r[0]&&!c;){var p=r[o++];if(p<t.TEXT_COMPACTION_MODE_LATCH)s++,u=900*u+p;else switch(p){case t.TEXT_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH:case t.NUMERIC_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH_6:case t.BEGIN_MACRO_PDF417_CONTROL_BLOCK:case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case t.MACRO_PDF417_TERMINATOR:o--,c=!0}if(s%5==0&&s>0){for(h=0;h<6;++h)a.write(Number(id(u)>>id(8*(5-h))));u=0,s=0}}}return i.append(Xa.decode(a.toByteArray(),n)),o},t.numericCompaction=function(e,r,n){for(var o=0,i=!1,a=new Int32Array(t.MAX_NUMERIC_CODEWORDS);r<e[0]&&!i;){var s=e[r++];if(r===e[0]&&(i=!0),s<t.TEXT_COMPACTION_MODE_LATCH)a[o]=s,o++;else switch(s){case t.TEXT_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH_6:case t.BEGIN_MACRO_PDF417_CONTROL_BLOCK:case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case t.MACRO_PDF417_TERMINATOR:r--,i=!0}(o%t.MAX_NUMERIC_CODEWORDS==0||s===t.NUMERIC_COMPACTION_MODE_LATCH||i)&&o>0&&(n.append(t.decodeBase900toBase10(a,o)),o=0)}return r},t.decodeBase900toBase10=function(e,r){for(var n=id(0),o=0;o<r;o++)n+=t.EXP900[r-o-1]*id(e[o]);var i=n.toString();if("1"!==i.charAt(0))throw new Ua;return i.substring(1)},t.TEXT_COMPACTION_MODE_LATCH=900,t.BYTE_COMPACTION_MODE_LATCH=901,t.NUMERIC_COMPACTION_MODE_LATCH=902,t.BYTE_COMPACTION_MODE_LATCH_6=924,t.ECI_USER_DEFINED=925,t.ECI_GENERAL_PURPOSE=926,t.ECI_CHARSET=927,t.BEGIN_MACRO_PDF417_CONTROL_BLOCK=928,t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD=923,t.MACRO_PDF417_TERMINATOR=922,t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE=913,t.MAX_NUMERIC_CODEWORDS=15,t.MACRO_PDF417_OPTIONAL_FIELD_FILE_NAME=0,t.MACRO_PDF417_OPTIONAL_FIELD_SEGMENT_COUNT=1,t.MACRO_PDF417_OPTIONAL_FIELD_TIME_STAMP=2,t.MACRO_PDF417_OPTIONAL_FIELD_SENDER=3,t.MACRO_PDF417_OPTIONAL_FIELD_ADDRESSEE=4,t.MACRO_PDF417_OPTIONAL_FIELD_FILE_SIZE=5,t.MACRO_PDF417_OPTIONAL_FIELD_CHECKSUM=6,t.PL=25,t.LL=27,t.AS=27,t.ML=28,t.AL=28,t.PS=29,t.PAL=29,t.PUNCT_CHARS=";<>@[\\]_`~!\r\t,:\n-.$/\"|*()?{}'",t.MIXED_CHARS="0123456789&\r\t,:#-.$/+%*=^",t.EXP900=od()?function(){var t=[];t[0]=id(1);var e=id(900);t[1]=e;for(var r=2;r<16;r++)t[r]=t[r-1]*e;return t}():[],t.NUMBER_OF_SEQUENCE_CODEWORDS=2,t}(),sd=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},ud=function(){function t(){}return t.decode=function(e,r,n,o,i,a,s){for(var u,c=new xl(e,r,n,o,i),l=null,d=null,h=!0;;h=!1){if(null!=r&&(l=t.getRowIndicatorColumn(e,c,r,!0,a,s)),null!=o&&(d=t.getRowIndicatorColumn(e,c,o,!1,a,s)),null==(u=t.merge(l,d)))throw $a.getNotFoundInstance();var f=u.getBoundingBox();if(!h||null==f||!(f.getMinY()<c.getMinY()||f.getMaxY()>c.getMaxY()))break;c=f}u.setBoundingBox(c);var p=u.getBarcodeColumnCount()+1;u.setDetectionResultColumn(0,l),u.setDetectionResultColumn(p,d);for(var g=null!=l,m=1;m<=p;m++){var y=g?m:p-m;if(void 0===u.getDetectionResultColumn(y)){var w=void 0;w=0===y||y===p?new Gl(c,0===y):new Ll(c),u.setDetectionResultColumn(y,w);for(var _=-1,v=_,E=c.getMinY();E<=c.getMaxY();E++){if((_=t.getStartColumn(u,y,E,g))<0||_>c.getMaxX()){if(-1===v)continue;_=v}var b=t.detectCodeword(e,c.getMinX(),c.getMaxX(),g,_,E,a,s);null!=b&&(w.setCodeword(E,b),v=_,a=Math.min(a,b.getWidth()),s=Math.max(s,b.getWidth()))}}}return t.createDecoderResult(u)},t.merge=function(e,r){if(null==e&&null==r)return null;var n=t.getBarcodeMetadata(e,r);if(null==n)return null;var o=xl.merge(t.adjustBoundingBox(e),t.adjustBoundingBox(r));return new Xl(n,o)},t.adjustBoundingBox=function(e){var r,n;if(null==e)return null;var o=e.getRowHeights();if(null==o)return null;var i=t.getMax(o),a=0;try{for(var s=sd(o),u=s.next();!u.done;u=s.next()){var c=u.value;if(a+=i-c,c>0)break}}catch(t){r={error:t}}finally{try{u&&!u.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}for(var l=e.getCodewords(),d=0;a>0&&null==l[d];d++)a--;var h=0;for(d=o.length-1;d>=0&&(h+=i-o[d],!(o[d]>0));d--);for(d=l.length-1;h>0&&null==l[d];d--)h--;return e.getBoundingBox().addMissingRows(a,h,e.isLeft())},t.getMax=function(t){var e,r,n=-1;try{for(var o=sd(t),i=o.next();!i.done;i=o.next()){var a=i.value;n=Math.max(n,a)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}return n},t.getBarcodeMetadata=function(t,e){var r,n;return null==t||null==(r=t.getBarcodeMetadata())?null==e?null:e.getBarcodeMetadata():null==e||null==(n=e.getBarcodeMetadata())?r:r.getColumnCount()!==n.getColumnCount()&&r.getErrorCorrectionLevel()!==n.getErrorCorrectionLevel()&&r.getRowCount()!==n.getRowCount()?null:r},t.getRowIndicatorColumn=function(e,r,n,o,i,a){for(var s=new Gl(r,o),u=0;u<2;u++)for(var c=0===u?1:-1,l=Math.trunc(Math.trunc(n.getX())),d=Math.trunc(Math.trunc(n.getY()));d<=r.getMaxY()&&d>=r.getMinY();d+=c){var h=t.detectCodeword(e,0,e.getWidth(),o,l,d,i,a);null!=h&&(s.setCodeword(d,h),l=o?h.getStartX():h.getEndX())}return s},t.adjustCodewordCount=function(e,r){var n=r[0][1],o=n.getValue(),i=e.getBarcodeColumnCount()*e.getBarcodeRowCount()-t.getNumberOfECCodeWords(e.getBarcodeECLevel());if(0===o.length){if(i<1||i>Al.MAX_CODEWORDS_IN_BARCODE)throw $a.getNotFoundInstance();n.setValue(i)}else o[0]!==i&&n.setValue(i)},t.createDecoderResult=function(e){var r=t.createBarcodeMatrix(e);t.adjustCodewordCount(e,r);for(var n=new Array,o=new Int32Array(e.getBarcodeRowCount()*e.getBarcodeColumnCount()),i=[],a=new Array,s=0;s<e.getBarcodeRowCount();s++)for(var u=0;u<e.getBarcodeColumnCount();u++){var c=r[s][u+1].getValue(),l=s*e.getBarcodeColumnCount()+u;0===c.length?n.push(l):1===c.length?o[l]=c[0]:(a.push(l),i.push(c))}for(var d=new Array(i.length),h=0;h<d.length;h++)d[h]=i[h];return t.createDecoderResultFromAmbiguousValues(e.getBarcodeECLevel(),o,Al.toIntArray(n),Al.toIntArray(a),d)},t.createDecoderResultFromAmbiguousValues=function(e,r,n,o,i){for(var a=new Int32Array(o.length),s=100;s-- >0;){for(var u=0;u<a.length;u++)r[o[u]]=i[u][a[u]];try{return t.decodeCodewords(r,e,n)}catch(t){if(!(t instanceof Sa))throw t}if(0===a.length)throw Sa.getChecksumInstance();for(u=0;u<a.length;u++){if(a[u]<i[u].length-1){a[u]++;break}if(a[u]=0,u===a.length-1)throw Sa.getChecksumInstance()}}throw Sa.getChecksumInstance()},t.createBarcodeMatrix=function(t){for(var e,r,n,o,i=Array.from({length:t.getBarcodeRowCount()},(function(){return new Array(t.getBarcodeColumnCount()+2)})),a=0;a<i.length;a++)for(var s=0;s<i[a].length;s++)i[a][s]=new Vl;var u=0;try{for(var c=sd(t.getDetectionResultColumns()),l=c.next();!l.done;l=c.next()){var d=l.value;if(null!=d)try{for(var h=(n=void 0,sd(d.getCodewords())),f=h.next();!f.done;f=h.next()){var p=f.value;if(null!=p){var g=p.getRowNumber();if(g>=0){if(g>=i.length)continue;i[g][u].setValue(p.getValue())}}}}catch(t){n={error:t}}finally{try{f&&!f.done&&(o=h.return)&&o.call(h)}finally{if(n)throw n.error}}u++}}catch(t){e={error:t}}finally{try{l&&!l.done&&(r=c.return)&&r.call(c)}finally{if(e)throw e.error}}return i},t.isValidBarcodeColumn=function(t,e){return e>=0&&e<=t.getBarcodeColumnCount()+1},t.getStartColumn=function(e,r,n,o){var i,a,s=o?1:-1,u=null;if(t.isValidBarcodeColumn(e,r-s)&&(u=e.getDetectionResultColumn(r-s).getCodeword(n)),null!=u)return o?u.getEndX():u.getStartX();if(null!=(u=e.getDetectionResultColumn(r).getCodewordNearby(n)))return o?u.getStartX():u.getEndX();if(t.isValidBarcodeColumn(e,r-s)&&(u=e.getDetectionResultColumn(r-s).getCodewordNearby(n)),null!=u)return o?u.getEndX():u.getStartX();for(var c=0;t.isValidBarcodeColumn(e,r-s);){r-=s;try{for(var l=(i=void 0,sd(e.getDetectionResultColumn(r).getCodewords())),d=l.next();!d.done;d=l.next()){var h=d.value;if(null!=h)return(o?h.getEndX():h.getStartX())+s*c*(h.getEndX()-h.getStartX())}}catch(t){i={error:t}}finally{try{d&&!d.done&&(a=l.return)&&a.call(l)}finally{if(i)throw i.error}}c++}return o?e.getBoundingBox().getMinX():e.getBoundingBox().getMaxX()},t.detectCodeword=function(e,r,n,o,i,a,s,u){i=t.adjustCodewordStartColumn(e,r,n,o,i,a);var c,l=t.getModuleBitCount(e,r,n,o,i,a);if(null==l)return null;var d=Rs.sum(l);if(o)c=i+d;else{for(var h=0;h<l.length/2;h++){var f=l[h];l[h]=l[l.length-1-h],l[l.length-1-h]=f}i=(c=i)-d}if(!t.checkCodewordSkew(d,s,u))return null;var p=Zl.getDecodedValue(l),g=Al.getCodeword(p);return-1===g?null:new Yl(i,c,t.getCodewordBucketNumber(p),g)},t.getModuleBitCount=function(t,e,r,n,o,i){for(var a=o,s=new Int32Array(8),u=0,c=n?1:-1,l=n;(n?a<r:a>=e)&&u<s.length;)t.get(a,i)===l?(s[u]++,a+=c):(u++,l=!l);return u===s.length||a===(n?r:e)&&u===s.length-1?s:null},t.getNumberOfECCodeWords=function(t){return 2<<t},t.adjustCodewordStartColumn=function(e,r,n,o,i,a){for(var s=i,u=o?-1:1,c=0;c<2;c++){for(;(o?s>=r:s<n)&&o===e.get(s,a);){if(Math.abs(i-s)>t.CODEWORD_SKEW_SIZE)return i;s+=u}u=-u,o=!o}return s},t.checkCodewordSkew=function(e,r,n){return r-t.CODEWORD_SKEW_SIZE<=e&&e<=n+t.CODEWORD_SKEW_SIZE},t.decodeCodewords=function(e,r,n){if(0===e.length)throw Ua.getFormatInstance();var o=1<<r+1,i=t.correctErrors(e,n,o);t.verifyCodewordCount(e,o);var a=ad.decode(e,""+r);return a.setErrorsCorrected(i),a.setErasures(n.length),a},t.correctErrors=function(e,r,n){if(null!=r&&r.length>n/2+t.MAX_ERRORS||n<0||n>t.MAX_EC_CODEWORDS)throw Sa.getChecksumInstance();return t.errorCorrection.decode(e,n,r)},t.verifyCodewordCount=function(t,e){if(t.length<4)throw Ua.getFormatInstance();var r=t[0];if(r>t.length)throw Ua.getFormatInstance();if(0===r){if(!(e<t.length))throw Ua.getFormatInstance();t[0]=t.length-e}},t.getBitCountForCodeword=function(t){for(var e=new Int32Array(8),r=0,n=e.length-1;!((1&t)!==r&&(r=1&t,--n<0));)e[n]++,t>>=1;return e},t.getCodewordBucketNumber=function(t){return t instanceof Int32Array?this.getCodewordBucketNumber_Int32Array(t):this.getCodewordBucketNumber_number(t)},t.getCodewordBucketNumber_number=function(e){return t.getCodewordBucketNumber(t.getBitCountForCodeword(e))},t.getCodewordBucketNumber_Int32Array=function(t){return(t[0]-t[2]+t[4]-t[6]+9)%9},t.toString=function(t){for(var e=new Bl,r=0;r<t.length;r++){e.format("Row %2d: ",r);for(var n=0;n<t[r].length;n++){var o=t[r][n];0===o.getValue().length?e.format(" ",null):e.format("%4d(%2d)",o.getValue()[0],o.getConfidence(o.getValue()[0]))}e.format("%n")}return e.toString()},t.CODEWORD_SKEW_SIZE=2,t.MAX_ERRORS=3,t.MAX_EC_CODEWORDS=512,t.errorCorrection=new kl,t}(),cd=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},ld=function(){function t(){}return t.prototype.decode=function(e,r){void 0===r&&(r=null);var n=t.decode(e,r,!1);if(null==n||0===n.length||null==n[0])throw $a.getNotFoundInstance();return n[0]},t.prototype.decodeMultiple=function(e,r){void 0===r&&(r=null);try{return t.decode(e,r,!0)}catch(t){if(t instanceof Ua||t instanceof Sa)throw $a.getNotFoundInstance();throw t}},t.decode=function(e,r,n){var o,i,a=new Array,s=Sl.detectMultiple(e,r,n);try{for(var u=cd(s.getPoints()),c=u.next();!c.done;c=u.next()){var l=c.value,d=ud.decode(s.getBits(),l[4],l[5],l[6],l[7],t.getMinCodewordWidth(l),t.getMaxCodewordWidth(l)),h=new hs(d.getText(),d.getRawBytes(),void 0,l,ps.PDF_417);h.putMetadata(ms.ERROR_CORRECTION_LEVEL,d.getECLevel());var f=d.getOther();null!=f&&h.putMetadata(ms.PDF417_EXTRA_METADATA,f),a.push(h)}}catch(t){o={error:t}}finally{try{c&&!c.done&&(i=u.return)&&i.call(u)}finally{if(o)throw o.error}}return a.map((function(t){return t}))},t.getMaxWidth=function(t,e){return null==t||null==e?0:Math.trunc(Math.abs(t.getX()-e.getX()))},t.getMinWidth=function(t,e){return null==t||null==e?Pa.MAX_VALUE:Math.trunc(Math.abs(t.getX()-e.getX()))},t.getMaxCodewordWidth=function(e){return Math.floor(Math.max(Math.max(t.getMaxWidth(e[0],e[4]),t.getMaxWidth(e[6],e[2])*Al.MODULES_IN_CODEWORD/Al.MODULES_IN_STOP_PATTERN),Math.max(t.getMaxWidth(e[1],e[5]),t.getMaxWidth(e[7],e[3])*Al.MODULES_IN_CODEWORD/Al.MODULES_IN_STOP_PATTERN)))},t.getMinCodewordWidth=function(e){return Math.floor(Math.min(Math.min(t.getMinWidth(e[0],e[4]),t.getMinWidth(e[6],e[2])*Al.MODULES_IN_CODEWORD/Al.MODULES_IN_STOP_PATTERN),Math.min(t.getMinWidth(e[1],e[5]),t.getMinWidth(e[7],e[3])*Al.MODULES_IN_CODEWORD/Al.MODULES_IN_STOP_PATTERN)))},t.prototype.reset=function(){},t}(),dd=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),hd=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return dd(e,t),e.kind="ReaderException",e}(_a),fd=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},pd=function(){function t(){}return t.prototype.decode=function(t,e){return this.setHints(e),this.decodeInternal(t)},t.prototype.decodeWithState=function(t){return null!==this.readers&&void 0!==this.readers||this.setHints(null),this.decodeInternal(t)},t.prototype.setHints=function(t){this.hints=t;var e=null!=t&&void 0!==t.get(La.TRY_HARDER),r=null==t?null:t.get(La.POSSIBLE_FORMATS),n=new Array;if(null!=r){var o=r.some((function(t){return t===ps.UPC_A||t===ps.UPC_E||t===ps.EAN_13||t===ps.EAN_8||t===ps.CODABAR||t===ps.CODE_39||t===ps.CODE_93||t===ps.CODE_128||t===ps.ITF||t===ps.RSS_14||t===ps.RSS_EXPANDED}));o&&!e&&n.push(new Sc(t)),r.includes(ps.QR_CODE)&&n.push(new El),r.includes(ps.DATA_MATRIX)&&n.push(new Hc),r.includes(ps.AZTEC)&&n.push(new Gs),r.includes(ps.PDF_417)&&n.push(new ld),o&&e&&n.push(new Sc(t))}0===n.length&&(e||n.push(new Sc(t)),n.push(new El),n.push(new Hc),n.push(new Gs),n.push(new ld),e&&n.push(new Sc(t))),this.readers=n},t.prototype.reset=function(){var t,e;if(null!==this.readers)try{for(var r=fd(this.readers),n=r.next();!n.done;n=r.next()){n.value.reset()}}catch(e){t={error:e}}finally{try{n&&!n.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}},t.prototype.decodeInternal=function(t){var e,r;if(null===this.readers)throw new hd("No readers where selected, nothing can be read.");try{for(var n=fd(this.readers),o=n.next();!o.done;o=n.next()){var i=o.value;try{return i.decode(t,this.hints)}catch(t){if(t instanceof hd)continue}}}catch(t){e={error:t}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}throw new $a("No MultiFormat Readers were able to detect the code.")},t}(),gd=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){function e(e,r){void 0===e&&(e=null),void 0===r&&(r=500);var n=new pd;return n.setHints(e),t.call(this,n,r)||this}gd(e,t),e.prototype.decodeBitmap=function(t){return this.reader.decodeWithState(t)}}(ds);var md=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){function e(e){return void 0===e&&(e=500),t.call(this,new ld,e)||this}md(e,t)}(ds);var yd,wd=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){function e(e){return void 0===e&&(e=500),t.call(this,new El,e)||this}wd(e,t)}(ds),function(t){t[t.ERROR_CORRECTION=0]="ERROR_CORRECTION",t[t.CHARACTER_SET=1]="CHARACTER_SET",t[t.DATA_MATRIX_SHAPE=2]="DATA_MATRIX_SHAPE",t[t.DATA_MATRIX_COMPACT=3]="DATA_MATRIX_COMPACT",t[t.MIN_SIZE=4]="MIN_SIZE",t[t.MAX_SIZE=5]="MAX_SIZE",t[t.MARGIN=6]="MARGIN",t[t.PDF417_COMPACT=7]="PDF417_COMPACT",t[t.PDF417_COMPACTION=8]="PDF417_COMPACTION",t[t.PDF417_DIMENSIONS=9]="PDF417_DIMENSIONS",t[t.AZTEC_LAYERS=10]="AZTEC_LAYERS",t[t.QR_VERSION=11]="QR_VERSION",t[t.GS1_FORMAT=12]="GS1_FORMAT",t[t.FORCE_C40=13]="FORCE_C40"}(yd||(yd={}));var _d=yd,vd=function(){function t(t){this.field=t,this.cachedGenerators=[],this.cachedGenerators.push(new _s(t,Int32Array.from([1])))}return t.prototype.buildGenerator=function(t){var e=this.cachedGenerators;if(t>=e.length)for(var r=e[e.length-1],n=this.field,o=e.length;o<=t;o++){var i=r.multiply(new _s(n,Int32Array.from([1,n.exp(o-1+n.getGeneratorBase())])));e.push(i),r=i}return e[t]},t.prototype.encode=function(t,e){if(0===e)throw new Aa("No error correction bytes");var r=t.length-e;if(r<=0)throw new Aa("No data bytes provided");var n=this.buildGenerator(e),o=new Int32Array(r);Da.arraycopy(t,0,o,0,r);for(var i=new _s(this.field,o),a=(i=i.multiplyByMonomial(e,1)).divide(n)[1].getCoefficients(),s=e-a.length,u=0;u<s;u++)t[r+u]=0;Da.arraycopy(a,0,t,r+s,a.length)},t}(),Ed=function(){function t(){}return t.applyMaskPenaltyRule1=function(e){return t.applyMaskPenaltyRule1Internal(e,!0)+t.applyMaskPenaltyRule1Internal(e,!1)},t.applyMaskPenaltyRule2=function(e){for(var r=0,n=e.getArray(),o=e.getWidth(),i=e.getHeight(),a=0;a<i-1;a++)for(var s=n[a],u=0;u<o-1;u++){var c=s[u];c===s[u+1]&&c===n[a+1][u]&&c===n[a+1][u+1]&&r++}return t.N2*r},t.applyMaskPenaltyRule3=function(e){for(var r=0,n=e.getArray(),o=e.getWidth(),i=e.getHeight(),a=0;a<i;a++)for(var s=0;s<o;s++){var u=n[a];s+6<o&&1===u[s]&&0===u[s+1]&&1===u[s+2]&&1===u[s+3]&&1===u[s+4]&&0===u[s+5]&&1===u[s+6]&&(t.isWhiteHorizontal(u,s-4,s)||t.isWhiteHorizontal(u,s+7,s+11))&&r++,a+6<i&&1===n[a][s]&&0===n[a+1][s]&&1===n[a+2][s]&&1===n[a+3][s]&&1===n[a+4][s]&&0===n[a+5][s]&&1===n[a+6][s]&&(t.isWhiteVertical(n,s,a-4,a)||t.isWhiteVertical(n,s,a+7,a+11))&&r++}return r*t.N3},t.isWhiteHorizontal=function(t,e,r){e=Math.max(e,0),r=Math.min(r,t.length);for(var n=e;n<r;n++)if(1===t[n])return!1;return!0},t.isWhiteVertical=function(t,e,r,n){r=Math.max(r,0),n=Math.min(n,t.length);for(var o=r;o<n;o++)if(1===t[o][e])return!1;return!0},t.applyMaskPenaltyRule4=function(e){for(var r=0,n=e.getArray(),o=e.getWidth(),i=e.getHeight(),a=0;a<i;a++)for(var s=n[a],u=0;u<o;u++)1===s[u]&&r++;var c=e.getHeight()*e.getWidth();return Math.floor(10*Math.abs(2*r-c)/c)*t.N4},t.getDataMaskBit=function(t,e,r){var n,o;switch(t){case 0:n=r+e&1;break;case 1:n=1&r;break;case 2:n=e%3;break;case 3:n=(r+e)%3;break;case 4:n=Math.floor(r/2)+Math.floor(e/3)&1;break;case 5:n=(1&(o=r*e))+o%3;break;case 6:n=(1&(o=r*e))+o%3&1;break;case 7:n=(o=r*e)%3+(r+e&1)&1;break;default:throw new Aa("Invalid mask pattern: "+t)}return 0===n},t.applyMaskPenaltyRule1Internal=function(e,r){for(var n=0,o=r?e.getHeight():e.getWidth(),i=r?e.getWidth():e.getHeight(),a=e.getArray(),s=0;s<o;s++){for(var u=0,c=-1,l=0;l<i;l++){var d=r?a[s][l]:a[l][s];d===c?u++:(u>=5&&(n+=t.N1+(u-5)),u=1,c=d)}u>=5&&(n+=t.N1+(u-5))}return n},t.N1=3,t.N2=3,t.N3=40,t.N4=10,t}(),bd=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Ad=function(){function t(t,e){this.width=t,this.height=e;for(var r=new Array(e),n=0;n!==e;n++)r[n]=new Uint8Array(t);this.bytes=r}return t.prototype.getHeight=function(){return this.height},t.prototype.getWidth=function(){return this.width},t.prototype.get=function(t,e){return this.bytes[e][t]},t.prototype.getArray=function(){return this.bytes},t.prototype.setNumber=function(t,e,r){this.bytes[e][t]=r},t.prototype.setBoolean=function(t,e,r){this.bytes[e][t]=r?1:0},t.prototype.clear=function(t){var e,r;try{for(var n=bd(this.bytes),o=n.next();!o.done;o=n.next()){var i=o.value;xa.fill(i,t)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;if(this.width!==r.width)return!1;if(this.height!==r.height)return!1;for(var n=0,o=this.height;n<o;++n)for(var i=this.bytes[n],a=r.bytes[n],s=0,u=this.width;s<u;++s)if(i[s]!==a[s])return!1;return!0},t.prototype.toString=function(){for(var t=new Za,e=0,r=this.height;e<r;++e){for(var n=this.bytes[e],o=0,i=this.width;o<i;++o)switch(n[o]){case 0:t.append(" 0");break;case 1:t.append(" 1");break;default:t.append(" ")}t.append("\n")}return t.toString()},t}(),Cd=function(){function t(){this.maskPattern=-1}return t.prototype.getMode=function(){return this.mode},t.prototype.getECLevel=function(){return this.ecLevel},t.prototype.getVersion=function(){return this.version},t.prototype.getMaskPattern=function(){return this.maskPattern},t.prototype.getMatrix=function(){return this.matrix},t.prototype.toString=function(){var t=new Za;return t.append("<<\n"),t.append(" mode: "),t.append(this.mode?this.mode.toString():"null"),t.append("\n ecLevel: "),t.append(this.ecLevel?this.ecLevel.toString():"null"),t.append("\n version: "),t.append(this.version?this.version.toString():"null"),t.append("\n maskPattern: "),t.append(this.maskPattern.toString()),this.matrix?(t.append("\n matrix:\n"),t.append(this.matrix.toString())):t.append("\n matrix: null\n"),t.append(">>\n"),t.toString()},t.prototype.setMode=function(t){this.mode=t},t.prototype.setECLevel=function(t){this.ecLevel=t},t.prototype.setVersion=function(t){this.version=t},t.prototype.setMaskPattern=function(t){this.maskPattern=t},t.prototype.setMatrix=function(t){this.matrix=t},t.isValidMaskPattern=function(e){return e>=0&&e<t.NUM_MASK_PATTERNS},t.NUM_MASK_PATTERNS=8,t}(),Id=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Sd=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Id(e,t),e.kind="WriterException",e}(_a),Td=function(){function t(){}return t.clearMatrix=function(t){t.clear(255)},t.buildMatrix=function(e,r,n,o,i){t.clearMatrix(i),t.embedBasicPatterns(n,i),t.embedTypeInfo(r,o,i),t.maybeEmbedVersionInfo(n,i),t.embedDataBits(e,o,i)},t.embedBasicPatterns=function(e,r){t.embedPositionDetectionPatternsAndSeparators(r),t.embedDarkDotAtLeftBottomCorner(r),t.maybeEmbedPositionAdjustmentPatterns(e,r),t.embedTimingPatterns(r)},t.embedTypeInfo=function(e,r,n){var o=new Ba;t.makeTypeInfoBits(e,r,o);for(var i=0,a=o.getSize();i<a;++i){var s=o.get(o.getSize()-1-i),u=t.TYPE_INFO_COORDINATES[i],c=u[0],l=u[1];if(n.setBoolean(c,l,s),i<8){var d=n.getWidth()-i-1,h=8;n.setBoolean(d,h,s)}else{d=8,h=n.getHeight()-7+(i-8);n.setBoolean(d,h,s)}}},t.maybeEmbedVersionInfo=function(e,r){if(!(e.getVersionNumber()<7)){var n=new Ba;t.makeVersionInfoBits(e,n);for(var o=17,i=0;i<6;++i)for(var a=0;a<3;++a){var s=n.get(o);o--,r.setBoolean(i,r.getHeight()-11+a,s),r.setBoolean(r.getHeight()-11+a,i,s)}}},t.embedDataBits=function(e,r,n){for(var o=0,i=-1,a=n.getWidth()-1,s=n.getHeight()-1;a>0;){for(6===a&&(a-=1);s>=0&&s<n.getHeight();){for(var u=0;u<2;++u){var c=a-u;if(t.isEmpty(n.get(c,s))){var l=void 0;o<e.getSize()?(l=e.get(o),++o):l=!1,255!==r&&Ed.getDataMaskBit(r,c,s)&&(l=!l),n.setBoolean(c,s,l)}}s+=i}s+=i=-i,a-=2}if(o!==e.getSize())throw new Sd("Not all bits consumed: "+o+"/"+e.getSize())},t.findMSBSet=function(t){return 32-Pa.numberOfLeadingZeros(t)},t.calculateBCHCode=function(e,r){if(0===r)throw new Aa("0 polynomial");var n=t.findMSBSet(r);for(e<<=n-1;t.findMSBSet(e)>=n;)e^=r<<t.findMSBSet(e)-n;return e},t.makeTypeInfoBits=function(e,r,n){if(!Cd.isValidMaskPattern(r))throw new Sd("Invalid mask pattern");var o=e.getBits()<<3|r;n.appendBits(o,5);var i=t.calculateBCHCode(o,t.TYPE_INFO_POLY);n.appendBits(i,10);var a=new Ba;if(a.appendBits(t.TYPE_INFO_MASK_PATTERN,15),n.xor(a),15!==n.getSize())throw new Sd("should not happen but we got: "+n.getSize())},t.makeVersionInfoBits=function(e,r){r.appendBits(e.getVersionNumber(),6);var n=t.calculateBCHCode(e.getVersionNumber(),t.VERSION_INFO_POLY);if(r.appendBits(n,12),18!==r.getSize())throw new Sd("should not happen but we got: "+r.getSize())},t.isEmpty=function(t){return 255===t},t.embedTimingPatterns=function(e){for(var r=8;r<e.getWidth()-8;++r){var n=(r+1)%2;t.isEmpty(e.get(r,6))&&e.setNumber(r,6,n),t.isEmpty(e.get(6,r))&&e.setNumber(6,r,n)}},t.embedDarkDotAtLeftBottomCorner=function(t){if(0===t.get(8,t.getHeight()-8))throw new Sd;t.setNumber(8,t.getHeight()-8,1)},t.embedHorizontalSeparationPattern=function(e,r,n){for(var o=0;o<8;++o){if(!t.isEmpty(n.get(e+o,r)))throw new Sd;n.setNumber(e+o,r,0)}},t.embedVerticalSeparationPattern=function(e,r,n){for(var o=0;o<7;++o){if(!t.isEmpty(n.get(e,r+o)))throw new Sd;n.setNumber(e,r+o,0)}},t.embedPositionAdjustmentPattern=function(e,r,n){for(var o=0;o<5;++o)for(var i=t.POSITION_ADJUSTMENT_PATTERN[o],a=0;a<5;++a)n.setNumber(e+a,r+o,i[a])},t.embedPositionDetectionPattern=function(e,r,n){for(var o=0;o<7;++o)for(var i=t.POSITION_DETECTION_PATTERN[o],a=0;a<7;++a)n.setNumber(e+a,r+o,i[a])},t.embedPositionDetectionPatternsAndSeparators=function(e){var r=t.POSITION_DETECTION_PATTERN[0].length;t.embedPositionDetectionPattern(0,0,e),t.embedPositionDetectionPattern(e.getWidth()-r,0,e),t.embedPositionDetectionPattern(0,e.getWidth()-r,e);t.embedHorizontalSeparationPattern(0,7,e),t.embedHorizontalSeparationPattern(e.getWidth()-8,7,e),t.embedHorizontalSeparationPattern(0,e.getWidth()-8,e);t.embedVerticalSeparationPattern(7,0,e),t.embedVerticalSeparationPattern(e.getHeight()-7-1,0,e),t.embedVerticalSeparationPattern(7,e.getHeight()-7,e)},t.maybeEmbedPositionAdjustmentPatterns=function(e,r){if(!(e.getVersionNumber()<2))for(var n=e.getVersionNumber()-1,o=t.POSITION_ADJUSTMENT_PATTERN_COORDINATE_TABLE[n],i=0,a=o.length;i!==a;i++){var s=o[i];if(s>=0)for(var u=0;u!==a;u++){var c=o[u];c>=0&&t.isEmpty(r.get(c,s))&&t.embedPositionAdjustmentPattern(c-2,s-2,r)}}},t.POSITION_DETECTION_PATTERN=Array.from([Int32Array.from([1,1,1,1,1,1,1]),Int32Array.from([1,0,0,0,0,0,1]),Int32Array.from([1,0,1,1,1,0,1]),Int32Array.from([1,0,1,1,1,0,1]),Int32Array.from([1,0,1,1,1,0,1]),Int32Array.from([1,0,0,0,0,0,1]),Int32Array.from([1,1,1,1,1,1,1])]),t.POSITION_ADJUSTMENT_PATTERN=Array.from([Int32Array.from([1,1,1,1,1]),Int32Array.from([1,0,0,0,1]),Int32Array.from([1,0,1,0,1]),Int32Array.from([1,0,0,0,1]),Int32Array.from([1,1,1,1,1])]),t.POSITION_ADJUSTMENT_PATTERN_COORDINATE_TABLE=Array.from([Int32Array.from([-1,-1,-1,-1,-1,-1,-1]),Int32Array.from([6,18,-1,-1,-1,-1,-1]),Int32Array.from([6,22,-1,-1,-1,-1,-1]),Int32Array.from([6,26,-1,-1,-1,-1,-1]),Int32Array.from([6,30,-1,-1,-1,-1,-1]),Int32Array.from([6,34,-1,-1,-1,-1,-1]),Int32Array.from([6,22,38,-1,-1,-1,-1]),Int32Array.from([6,24,42,-1,-1,-1,-1]),Int32Array.from([6,26,46,-1,-1,-1,-1]),Int32Array.from([6,28,50,-1,-1,-1,-1]),Int32Array.from([6,30,54,-1,-1,-1,-1]),Int32Array.from([6,32,58,-1,-1,-1,-1]),Int32Array.from([6,34,62,-1,-1,-1,-1]),Int32Array.from([6,26,46,66,-1,-1,-1]),Int32Array.from([6,26,48,70,-1,-1,-1]),Int32Array.from([6,26,50,74,-1,-1,-1]),Int32Array.from([6,30,54,78,-1,-1,-1]),Int32Array.from([6,30,56,82,-1,-1,-1]),Int32Array.from([6,30,58,86,-1,-1,-1]),Int32Array.from([6,34,62,90,-1,-1,-1]),Int32Array.from([6,28,50,72,94,-1,-1]),Int32Array.from([6,26,50,74,98,-1,-1]),Int32Array.from([6,30,54,78,102,-1,-1]),Int32Array.from([6,28,54,80,106,-1,-1]),Int32Array.from([6,32,58,84,110,-1,-1]),Int32Array.from([6,30,58,86,114,-1,-1]),Int32Array.from([6,34,62,90,118,-1,-1]),Int32Array.from([6,26,50,74,98,122,-1]),Int32Array.from([6,30,54,78,102,126,-1]),Int32Array.from([6,26,52,78,104,130,-1]),Int32Array.from([6,30,56,82,108,134,-1]),Int32Array.from([6,34,60,86,112,138,-1]),Int32Array.from([6,30,58,86,114,142,-1]),Int32Array.from([6,34,62,90,118,146,-1]),Int32Array.from([6,30,54,78,102,126,150]),Int32Array.from([6,24,50,76,102,128,154]),Int32Array.from([6,28,54,80,106,132,158]),Int32Array.from([6,32,58,84,110,136,162]),Int32Array.from([6,26,54,82,110,138,166]),Int32Array.from([6,30,58,86,114,142,170])]),t.TYPE_INFO_COORDINATES=Array.from([Int32Array.from([8,0]),Int32Array.from([8,1]),Int32Array.from([8,2]),Int32Array.from([8,3]),Int32Array.from([8,4]),Int32Array.from([8,5]),Int32Array.from([8,7]),Int32Array.from([8,8]),Int32Array.from([7,8]),Int32Array.from([5,8]),Int32Array.from([4,8]),Int32Array.from([3,8]),Int32Array.from([2,8]),Int32Array.from([1,8]),Int32Array.from([0,8])]),t.VERSION_INFO_POLY=7973,t.TYPE_INFO_POLY=1335,t.TYPE_INFO_MASK_PATTERN=21522,t}(),Dd=function(){function t(t,e){this.dataBytes=t,this.errorCorrectionBytes=e}return t.prototype.getDataBytes=function(){return this.dataBytes},t.prototype.getErrorCorrectionBytes=function(){return this.errorCorrectionBytes},t}(),Od=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};!function(){function t(){}t.calculateMaskPenalty=function(t){return Ed.applyMaskPenaltyRule1(t)+Ed.applyMaskPenaltyRule2(t)+Ed.applyMaskPenaltyRule3(t)+Ed.applyMaskPenaltyRule4(t)},t.encode=function(e,r,n){void 0===n&&(n=null);var o=t.DEFAULT_BYTE_MODE_ENCODING,i=null!==n&&void 0!==n.get(_d.CHARACTER_SET);i&&(o=n.get(_d.CHARACTER_SET).toString());var a=this.chooseMode(e,o),s=new Ba;if(a===al.BYTE&&(i||t.DEFAULT_BYTE_MODE_ENCODING!==o)){var u=ja.getCharacterSetECIByName(o);void 0!==u&&this.appendECI(u,s)}this.appendModeInfo(a,s);var c,l=new Ba;if(this.appendBytes(e,a,l,o),null!==n&&void 0!==n.get(_d.QR_VERSION)){var d=Number.parseInt(n.get(_d.QR_VERSION).toString(),10);c=Jc.getVersionForNumber(d);var h=this.calculateBitsNeeded(a,s,l,c);if(!this.willFit(h,c,r))throw new Sd("Data too big for requested version")}else c=this.recommendVersion(r,a,s,l);var f=new Ba;f.appendBitArray(s);var p=a===al.BYTE?l.getSizeInBytes():e.length;this.appendLengthInfo(p,c,a,f),f.appendBitArray(l);var g=c.getECBlocksForLevel(r),m=c.getTotalCodewords()-g.getTotalECCodewords();this.terminateBits(m,f);var y=this.interleaveWithECBytes(f,c.getTotalCodewords(),m,g.getNumBlocks()),w=new Cd;w.setECLevel(r),w.setMode(a),w.setVersion(c);var _=c.getDimensionForVersion(),v=new Ad(_,_),E=this.chooseMaskPattern(y,r,c,v);return w.setMaskPattern(E),Td.buildMatrix(y,r,c,E,v),w.setMatrix(v),w},t.recommendVersion=function(t,e,r,n){var o=this.calculateBitsNeeded(e,r,n,Jc.getVersionForNumber(1)),i=this.chooseVersion(o,t),a=this.calculateBitsNeeded(e,r,n,i);return this.chooseVersion(a,t)},t.calculateBitsNeeded=function(t,e,r,n){return e.getSize()+t.getCharacterCountBits(n)+r.getSize()},t.getAlphanumericCode=function(e){return e<t.ALPHANUMERIC_TABLE.length?t.ALPHANUMERIC_TABLE[e]:-1},t.chooseMode=function(e,r){if(void 0===r&&(r=null),ja.SJIS.getName()===r&&this.isOnlyDoubleByteKanji(e))return al.KANJI;for(var n=!1,o=!1,i=0,a=e.length;i<a;++i){var s=e.charAt(i);if(t.isDigit(s))n=!0;else{if(-1===this.getAlphanumericCode(s.charCodeAt(0)))return al.BYTE;o=!0}}return o?al.ALPHANUMERIC:n?al.NUMERIC:al.BYTE},t.isOnlyDoubleByteKanji=function(t){var e;try{e=Xa.encode(t,ja.SJIS)}catch(t){return!1}var r=e.length;if(r%2!=0)return!1;for(var n=0;n<r;n+=2){var o=255&e[n];if((o<129||o>159)&&(o<224||o>235))return!1}return!0},t.chooseMaskPattern=function(t,e,r,n){for(var o=Number.MAX_SAFE_INTEGER,i=-1,a=0;a<Cd.NUM_MASK_PATTERNS;a++){Td.buildMatrix(t,e,r,a,n);var s=this.calculateMaskPenalty(n);s<o&&(o=s,i=a)}return i},t.chooseVersion=function(e,r){for(var n=1;n<=40;n++){var o=Jc.getVersionForNumber(n);if(t.willFit(e,o,r))return o}throw new Sd("Data too big")},t.willFit=function(t,e,r){return e.getTotalCodewords()-e.getECBlocksForLevel(r).getTotalECCodewords()>=(t+7)/8},t.terminateBits=function(t,e){var r=8*t;if(e.getSize()>r)throw new Sd("data bits cannot fit in the QR Code"+e.getSize()+" > "+r);for(var n=0;n<4&&e.getSize()<r;++n)e.appendBit(!1);var o=7&e.getSize();if(o>0)for(n=o;n<8;n++)e.appendBit(!1);var i=t-e.getSizeInBytes();for(n=0;n<i;++n)e.appendBits(1&n?17:236,8);if(e.getSize()!==r)throw new Sd("Bits size does not equal capacity")},t.getNumDataBytesAndNumECBytesForBlockID=function(t,e,r,n,o,i){if(n>=r)throw new Sd("Block ID too large");var a=t%r,s=r-a,u=Math.floor(t/r),c=u+1,l=Math.floor(e/r),d=l+1,h=u-l,f=c-d;if(h!==f)throw new Sd("EC bytes mismatch");if(r!==s+a)throw new Sd("RS blocks mismatch");if(t!==(l+h)*s+(d+f)*a)throw new Sd("Total bytes mismatch");n<s?(o[0]=l,i[0]=h):(o[0]=d,i[0]=f)},t.interleaveWithECBytes=function(e,r,n,o){var i,a,s,u;if(e.getSizeInBytes()!==n)throw new Sd("Number of bits and data bytes does not match");for(var c=0,l=0,d=0,h=new Array,f=0;f<o;++f){var p=new Int32Array(1),g=new Int32Array(1);t.getNumDataBytesAndNumECBytesForBlockID(r,n,o,f,p,g);var m=p[0],y=new Uint8Array(m);e.toBytes(8*c,y,0,m);var w=t.generateECBytes(y,g[0]);h.push(new Dd(y,w)),l=Math.max(l,m),d=Math.max(d,w.length),c+=p[0]}if(n!==c)throw new Sd("Data bytes does not match offset");var _=new Ba;for(f=0;f<l;++f)try{for(var v=(i=void 0,Od(h)),E=v.next();!E.done;E=v.next()){f<(y=E.value.getDataBytes()).length&&_.appendBits(y[f],8)}}catch(t){i={error:t}}finally{try{E&&!E.done&&(a=v.return)&&a.call(v)}finally{if(i)throw i.error}}for(f=0;f<d;++f)try{for(var b=(s=void 0,Od(h)),A=b.next();!A.done;A=b.next()){f<(w=A.value.getErrorCorrectionBytes()).length&&_.appendBits(w[f],8)}}catch(t){s={error:t}}finally{try{A&&!A.done&&(u=b.return)&&u.call(b)}finally{if(s)throw s.error}}if(r!==_.getSizeInBytes())throw new Sd("Interleaving error: "+r+" and "+_.getSizeInBytes()+" differ.");return _},t.generateECBytes=function(t,e){for(var r=t.length,n=new Int32Array(r+e),o=0;o<r;o++)n[o]=255&t[o];new vd(As.QR_CODE_FIELD_256).encode(n,e);var i=new Uint8Array(e);for(o=0;o<e;o++)i[o]=n[r+o];return i},t.appendModeInfo=function(t,e){e.appendBits(t.getBits(),4)},t.appendLengthInfo=function(t,e,r,n){var o=r.getCharacterCountBits(e);if(t>=1<<o)throw new Sd(t+" is bigger than "+((1<<o)-1));n.appendBits(t,o)},t.appendBytes=function(e,r,n,o){switch(r){case al.NUMERIC:t.appendNumericBytes(e,n);break;case al.ALPHANUMERIC:t.appendAlphanumericBytes(e,n);break;case al.BYTE:t.append8BitBytes(e,n,o);break;case al.KANJI:t.appendKanjiBytes(e,n);break;default:throw new Sd("Invalid mode: "+r)}},t.getDigit=function(t){return t.charCodeAt(0)-48},t.isDigit=function(e){var r=t.getDigit(e);return r>=0&&r<=9},t.appendNumericBytes=function(e,r){for(var n=e.length,o=0;o<n;){var i=t.getDigit(e.charAt(o));if(o+2<n){var a=t.getDigit(e.charAt(o+1)),s=t.getDigit(e.charAt(o+2));r.appendBits(100*i+10*a+s,10),o+=3}else if(o+1<n){a=t.getDigit(e.charAt(o+1));r.appendBits(10*i+a,7),o+=2}else r.appendBits(i,4),o++}},t.appendAlphanumericBytes=function(e,r){for(var n=e.length,o=0;o<n;){var i=t.getAlphanumericCode(e.charCodeAt(o));if(-1===i)throw new Sd;if(o+1<n){var a=t.getAlphanumericCode(e.charCodeAt(o+1));if(-1===a)throw new Sd;r.appendBits(45*i+a,11),o+=2}else r.appendBits(i,6),o++}},t.append8BitBytes=function(t,e,r){var n;try{n=Xa.encode(t,r)}catch(t){throw new Sd(t)}for(var o=0,i=n.length;o!==i;o++){var a=n[o];e.appendBits(a,8)}},t.appendKanjiBytes=function(t,e){var r;try{r=Xa.encode(t,ja.SJIS)}catch(t){throw new Sd(t)}for(var n=r.length,o=0;o<n;o+=2){var i=(255&r[o])<<8&4294967295|255&r[o+1],a=-1;if(i>=33088&&i<=40956?a=i-33088:i>=57408&&i<=60351&&(a=i-49472),-1===a)throw new Sd("Invalid byte sequence");var s=192*(a>>8)+(255&a);e.appendBits(s,13)}},t.appendECI=function(t,e){e.appendBits(al.ECI.getBits(),4),e.appendBits(t.getValue(),8)},t.ALPHANUMERIC_TABLE=Int32Array.from([-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,36,-1,-1,-1,37,38,-1,-1,-1,-1,39,40,-1,41,42,43,0,1,2,3,4,5,6,7,8,9,44,-1,-1,-1,-1,-1,-1,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,-1,-1,-1,-1,-1]),t.DEFAULT_BYTE_MODE_ENCODING=ja.UTF8.getName()}();var Rd=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){function e(e,r,n,o,i,a,s,u){var c=t.call(this,a,s)||this;if(c.yuvData=e,c.dataWidth=r,c.dataHeight=n,c.left=o,c.top=i,o+a>r||i+s>n)throw new Aa("Crop rectangle does not fit within image data.");return u&&c.reverseHorizontal(a,s),c}Rd(e,t),e.prototype.getRow=function(t,e){if(t<0||t>=this.getHeight())throw new Aa("Requested row is outside the image: "+t);var r=this.getWidth();(null==e||e.length<r)&&(e=new Uint8ClampedArray(r));var n=(t+this.top)*this.dataWidth+this.left;return Da.arraycopy(this.yuvData,n,e,0,r),e},e.prototype.getMatrix=function(){var t=this.getWidth(),e=this.getHeight();if(t===this.dataWidth&&e===this.dataHeight)return this.yuvData;var r=t*e,n=new Uint8ClampedArray(r),o=this.top*this.dataWidth+this.left;if(t===this.dataWidth)return Da.arraycopy(this.yuvData,o,n,0,r),n;for(var i=0;i<e;i++){var a=i*t;Da.arraycopy(this.yuvData,o,n,a,t),o+=this.dataWidth}return n},e.prototype.isCropSupported=function(){return!0},e.prototype.crop=function(t,r,n,o){return new e(this.yuvData,this.dataWidth,this.dataHeight,this.left+t,this.top+r,n,o,!1)},e.prototype.renderThumbnail=function(){for(var t=this.getWidth()/e.THUMBNAIL_SCALE_FACTOR,r=this.getHeight()/e.THUMBNAIL_SCALE_FACTOR,n=new Int32Array(t*r),o=this.yuvData,i=this.top*this.dataWidth+this.left,a=0;a<r;a++){for(var s=a*t,u=0;u<t;u++){var c=255&o[i+u*e.THUMBNAIL_SCALE_FACTOR];n[s+u]=4278190080|65793*c}i+=this.dataWidth*e.THUMBNAIL_SCALE_FACTOR}return n},e.prototype.getThumbnailWidth=function(){return this.getWidth()/e.THUMBNAIL_SCALE_FACTOR},e.prototype.getThumbnailHeight=function(){return this.getHeight()/e.THUMBNAIL_SCALE_FACTOR},e.prototype.reverseHorizontal=function(t,e){for(var r=this.yuvData,n=0,o=this.top*this.dataWidth+this.left;n<e;n++,o+=this.dataWidth)for(var i=o+t/2,a=o,s=o+t-1;a<i;a++,s--){var u=r[a];r[a]=r[s],r[s]=u}},e.prototype.invert=function(){return new os(this)},e.THUMBNAIL_SCALE_FACTOR=2}(rs);var Md=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){function e(e,r,n,o,i,a,s){var u=t.call(this,r,n)||this;if(u.dataWidth=o,u.dataHeight=i,u.left=a,u.top=s,4===e.BYTES_PER_ELEMENT){for(var c=r*n,l=new Uint8ClampedArray(c),d=0;d<c;d++){var h=e[d],f=h>>16&255,p=h>>7&510,g=255&h;l[d]=(f+p+g)/4&255}u.luminances=l}else u.luminances=e;if(void 0===o&&(u.dataWidth=r),void 0===i&&(u.dataHeight=n),void 0===a&&(u.left=0),void 0===s&&(u.top=0),u.left+r>u.dataWidth||u.top+n>u.dataHeight)throw new Aa("Crop rectangle does not fit within image data.");return u}Md(e,t),e.prototype.getRow=function(t,e){if(t<0||t>=this.getHeight())throw new Aa("Requested row is outside the image: "+t);var r=this.getWidth();(null==e||e.length<r)&&(e=new Uint8ClampedArray(r));var n=(t+this.top)*this.dataWidth+this.left;return Da.arraycopy(this.luminances,n,e,0,r),e},e.prototype.getMatrix=function(){var t=this.getWidth(),e=this.getHeight();if(t===this.dataWidth&&e===this.dataHeight)return this.luminances;var r=t*e,n=new Uint8ClampedArray(r),o=this.top*this.dataWidth+this.left;if(t===this.dataWidth)return Da.arraycopy(this.luminances,o,n,0,r),n;for(var i=0;i<e;i++){var a=i*t;Da.arraycopy(this.luminances,o,n,a,t),o+=this.dataWidth}return n},e.prototype.isCropSupported=function(){return!0},e.prototype.crop=function(t,r,n,o){return new e(this.luminances,n,o,this.dataWidth,this.dataHeight,this.left+t,this.top+r)},e.prototype.invert=function(){return new os(this)}}(rs);var Nd,kd,xd=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Pd=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return xd(e,t),e.forName=function(t){return this.getCharacterSetECIByName(t)},e}(ja),Bd=function(){function t(){}return t.ISO_8859_1=ja.ISO8859_1,t}();Nd=function(t,e){for(var r=1,n=0;n<255;n++)e[n]=r,t[r]=n,(r*=2)>=256&&(r^=301);return{LOG:t,ALOG:e}}([],[]),Nd.LOG,Nd.ALOG,function(t){t[t.FORCE_NONE=0]="FORCE_NONE",t[t.FORCE_SQUARE=1]="FORCE_SQUARE",t[t.FORCE_RECTANGLE=2]="FORCE_RECTANGLE"}(kd||(kd={}));var Fd,Ld="[)>05",zd="[)>06",Ud=function(){function t(){}return t.prototype.getEncodingMode=function(){return 0},t.prototype.encode=function(t){if(eh.determineConsecutiveDigitCount(t.getMessage(),t.pos)>=2)t.writeCodeword(this.encodeASCIIDigits(t.getMessage().charCodeAt(t.pos),t.getMessage().charCodeAt(t.pos+1))),t.pos+=2;else{var e=t.getCurrentChar(),r=eh.lookAheadTest(t.getMessage(),t.pos,this.getEncodingMode());if(r!==this.getEncodingMode())switch(r){case 5:return t.writeCodeword(231),void t.signalEncoderChange(5);case 1:return t.writeCodeword(230),void t.signalEncoderChange(1);case 3:t.writeCodeword(238),t.signalEncoderChange(3);break;case 2:t.writeCodeword(239),t.signalEncoderChange(2);break;case 4:t.writeCodeword(240),t.signalEncoderChange(4);break;default:throw new Error("Illegal mode: "+r)}else eh.isExtendedASCII(e)?(t.writeCodeword(235),t.writeCodeword(e-128+1),t.pos++):(t.writeCodeword(e+1),t.pos++)}},t.prototype.encodeASCIIDigits=function(t,e){if(eh.isDigit(t)&&eh.isDigit(e))return 10*(t-48)+(e-48)+130;throw new Error("not digits: "+t+e)},t}(),Vd=function(){function t(){}return t.prototype.getEncodingMode=function(){return 5},t.prototype.encode=function(t){var e=new Za;for(e.append(0);t.hasMoreCharacters();){var r=t.getCurrentChar();if(e.append(r),t.pos++,eh.lookAheadTest(t.getMessage(),t.pos,this.getEncodingMode())!==this.getEncodingMode()){t.signalEncoderChange(0);break}}var n=e.length()-1,o=t.getCodewordCount()+n+1;t.updateSymbolInfo(o);var i=t.getSymbolInfo().getDataCapacity()-o>0;if(t.hasMoreCharacters()||i)if(n<=249)e.setCharAt(0,Ya.getCharAt(n));else{if(!(n<=1555))throw new Error("Message length not in valid ranges: "+n);e.setCharAt(0,Ya.getCharAt(Math.floor(n/250)+249)),e.insert(1,Ya.getCharAt(n%250))}var a=0;for(r=e.length();a<r;a++)t.writeCodeword(this.randomize255State(e.charAt(a).charCodeAt(0),t.getCodewordCount()+1))},t.prototype.randomize255State=function(t,e){var r=t+(149*e%255+1);return r<=255?r:r-256},t}(),Hd=function(){function t(){}return t.prototype.getEncodingMode=function(){return 1},t.prototype.encodeMaximal=function(t){for(var e=new Za,r=0,n=t.pos,o=0;t.hasMoreCharacters();){var i=t.getCurrentChar();t.pos++,r=this.encodeChar(i,e),e.length()%3==0&&(n=t.pos,o=e.length())}if(o!==e.length()){var a=Math.floor(e.length()/3*2),s=Math.floor(t.getCodewordCount()+a+1);t.updateSymbolInfo(s);var u=t.getSymbolInfo().getDataCapacity()-s,c=Math.floor(e.length()%3);(2===c&&2!==u||1===c&&(r>3||1!==u))&&(t.pos=n)}e.length()>0&&t.writeCodeword(230),this.handleEOD(t,e)},t.prototype.encode=function(t){for(var e=new Za;t.hasMoreCharacters();){var r=t.getCurrentChar();t.pos++;var n=this.encodeChar(r,e),o=2*Math.floor(e.length()/3),i=t.getCodewordCount()+o;t.updateSymbolInfo(i);var a=t.getSymbolInfo().getDataCapacity()-i;if(!t.hasMoreCharacters()){var s=new Za;for(e.length()%3==2&&2!==a&&(n=this.backtrackOneCharacter(t,e,s,n));e.length()%3==1&&(n>3||1!==a);)n=this.backtrackOneCharacter(t,e,s,n);break}if(e.length()%3==0)if(eh.lookAheadTest(t.getMessage(),t.pos,this.getEncodingMode())!==this.getEncodingMode()){t.signalEncoderChange(0);break}}this.handleEOD(t,e)},t.prototype.backtrackOneCharacter=function(t,e,r,n){var o=e.length(),i=e.toString().substring(0,o-n);e.setLengthToZero(),e.append(i),t.pos--;var a=t.getCurrentChar();return n=this.encodeChar(a,r),t.resetSymbolInfo(),n},t.prototype.writeNextTriplet=function(t,e){t.writeCodewords(this.encodeToCodewords(e.toString()));var r=e.toString().substring(3);e.setLengthToZero(),e.append(r)},t.prototype.handleEOD=function(t,e){var r=Math.floor(e.length()/3*2),n=e.length()%3,o=t.getCodewordCount()+r;t.updateSymbolInfo(o);var i=t.getSymbolInfo().getDataCapacity()-o;if(2===n){for(e.append("\0");e.length()>=3;)this.writeNextTriplet(t,e);t.hasMoreCharacters()&&t.writeCodeword(254)}else if(1===i&&1===n){for(;e.length()>=3;)this.writeNextTriplet(t,e);t.hasMoreCharacters()&&t.writeCodeword(254),t.pos--}else{if(0!==n)throw new Error("Unexpected case. Please report!");for(;e.length()>=3;)this.writeNextTriplet(t,e);(i>0||t.hasMoreCharacters())&&t.writeCodeword(254)}t.signalEncoderChange(0)},t.prototype.encodeChar=function(t,e){if(t===" ".charCodeAt(0))return e.append(3),1;if(t>="0".charCodeAt(0)&&t<="9".charCodeAt(0))return e.append(t-48+4),1;if(t>="A".charCodeAt(0)&&t<="Z".charCodeAt(0))return e.append(t-65+14),1;if(t<" ".charCodeAt(0))return e.append(0),e.append(t),2;if(t<="/".charCodeAt(0))return e.append(1),e.append(t-33),2;if(t<="@".charCodeAt(0))return e.append(1),e.append(t-58+15),2;if(t<="_".charCodeAt(0))return e.append(1),e.append(t-91+22),2;if(t<=127)return e.append(2),e.append(t-96),2;e.append("1");var r=2;return r+=this.encodeChar(t-128,e)},t.prototype.encodeToCodewords=function(t){var e=1600*t.charCodeAt(0)+40*t.charCodeAt(1)+t.charCodeAt(2)+1,r=e/256,n=e%256,o=new Za;return o.append(r),o.append(n),o.toString()},t}(),jd=function(){function t(){}return t.prototype.getEncodingMode=function(){return 4},t.prototype.encode=function(t){for(var e=new Za;t.hasMoreCharacters();){var r=t.getCurrentChar();if(this.encodeChar(r,e),t.pos++,e.length()>=4){t.writeCodewords(this.encodeToCodewords(e.toString()));var n=e.toString().substring(4);if(e.setLengthToZero(),e.append(n),eh.lookAheadTest(t.getMessage(),t.pos,this.getEncodingMode())!==this.getEncodingMode()){t.signalEncoderChange(0);break}}}e.append(Ya.getCharAt(31)),this.handleEOD(t,e)},t.prototype.handleEOD=function(t,e){try{var r=e.length();if(0===r)return;if(1===r){t.updateSymbolInfo();var n=t.getSymbolInfo().getDataCapacity()-t.getCodewordCount(),o=t.getRemainingCharacters();if(o>n&&(t.updateSymbolInfo(t.getCodewordCount()+1),n=t.getSymbolInfo().getDataCapacity()-t.getCodewordCount()),o<=n&&n<=2)return}if(r>4)throw new Error("Count must not exceed 4");var i=r-1,a=this.encodeToCodewords(e.toString()),s=!t.hasMoreCharacters()&&i<=2;if(i<=2)t.updateSymbolInfo(t.getCodewordCount()+i),(n=t.getSymbolInfo().getDataCapacity()-t.getCodewordCount())>=3&&(s=!1,t.updateSymbolInfo(t.getCodewordCount()+a.length));s?(t.resetSymbolInfo(),t.pos-=i):t.writeCodewords(a)}finally{t.signalEncoderChange(0)}},t.prototype.encodeChar=function(t,e){t>=" ".charCodeAt(0)&&t<="?".charCodeAt(0)?e.append(t):t>="@".charCodeAt(0)&&t<="^".charCodeAt(0)?e.append(Ya.getCharAt(t-64)):eh.illegalCharacter(Ya.getCharAt(t))},t.prototype.encodeToCodewords=function(t){var e=t.length;if(0===e)throw new Error("StringBuilder must not be empty");var r=(t.charAt(0).charCodeAt(0)<<18)+((e>=2?t.charAt(1).charCodeAt(0):0)<<12)+((e>=3?t.charAt(2).charCodeAt(0):0)<<6)+(e>=4?t.charAt(3).charCodeAt(0):0),n=r>>16&255,o=r>>8&255,i=255&r,a=new Za;return a.append(n),e>=2&&a.append(o),e>=3&&a.append(i),a.toString()},t}(),Gd=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Wd=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Xd=function(){function t(t,e,r,n,o,i,a,s){void 0===a&&(a=0),void 0===s&&(s=0),this.rectangular=t,this.dataCapacity=e,this.errorCodewords=r,this.matrixWidth=n,this.matrixHeight=o,this.dataRegions=i,this.rsBlockData=a,this.rsBlockError=s}return t.lookup=function(t,e,r,n,o){var i,a;void 0===e&&(e=0),void 0===r&&(r=null),void 0===n&&(n=null),void 0===o&&(o=!0);try{for(var s=Wd(Zd),u=s.next();!u.done;u=s.next()){var c=u.value;if((1!==e||!c.rectangular)&&((2!==e||c.rectangular)&&(null==r||!(c.getSymbolWidth()<r.getWidth()||c.getSymbolHeight()<r.getHeight()))&&(null==n||!(c.getSymbolWidth()>n.getWidth()||c.getSymbolHeight()>n.getHeight()))&&t<=c.dataCapacity))return c}}catch(t){i={error:t}}finally{try{u&&!u.done&&(a=s.return)&&a.call(s)}finally{if(i)throw i.error}}if(o)throw new Error("Can't find a symbol arrangement that matches the message. Data codewords: "+t);return null},t.prototype.getHorizontalDataRegions=function(){switch(this.dataRegions){case 1:return 1;case 2:case 4:return 2;case 16:return 4;case 36:return 6;default:throw new Error("Cannot handle this number of data regions")}},t.prototype.getVerticalDataRegions=function(){switch(this.dataRegions){case 1:case 2:return 1;case 4:return 2;case 16:return 4;case 36:return 6;default:throw new Error("Cannot handle this number of data regions")}},t.prototype.getSymbolDataWidth=function(){return this.getHorizontalDataRegions()*this.matrixWidth},t.prototype.getSymbolDataHeight=function(){return this.getVerticalDataRegions()*this.matrixHeight},t.prototype.getSymbolWidth=function(){return this.getSymbolDataWidth()+2*this.getHorizontalDataRegions()},t.prototype.getSymbolHeight=function(){return this.getSymbolDataHeight()+2*this.getVerticalDataRegions()},t.prototype.getCodewordCount=function(){return this.dataCapacity+this.errorCodewords},t.prototype.getInterleavedBlockCount=function(){return this.rsBlockData?this.dataCapacity/this.rsBlockData:1},t.prototype.getDataCapacity=function(){return this.dataCapacity},t.prototype.getErrorCodewords=function(){return this.errorCodewords},t.prototype.getDataLengthForInterleavedBlock=function(t){return this.rsBlockData},t.prototype.getErrorLengthForInterleavedBlock=function(t){return this.rsBlockError},t}(),Yd=function(t){function e(){return t.call(this,!1,1558,620,22,22,36,-1,62)||this}return Gd(e,t),e.prototype.getInterleavedBlockCount=function(){return 10},e.prototype.getDataLengthForInterleavedBlock=function(t){return t<=8?156:155},e}(Xd),Zd=[new Xd(!1,3,5,8,8,1),new Xd(!1,5,7,10,10,1),new Xd(!0,5,7,16,6,1),new Xd(!1,8,10,12,12,1),new Xd(!0,10,11,14,6,2),new Xd(!1,12,12,14,14,1),new Xd(!0,16,14,24,10,1),new Xd(!1,18,14,16,16,1),new Xd(!1,22,18,18,18,1),new Xd(!0,22,18,16,10,2),new Xd(!1,30,20,20,20,1),new Xd(!0,32,24,16,14,2),new Xd(!1,36,24,22,22,1),new Xd(!1,44,28,24,24,1),new Xd(!0,49,28,22,14,2),new Xd(!1,62,36,14,14,4),new Xd(!1,86,42,16,16,4),new Xd(!1,114,48,18,18,4),new Xd(!1,144,56,20,20,4),new Xd(!1,174,68,22,22,4),new Xd(!1,204,84,24,24,4,102,42),new Xd(!1,280,112,14,14,16,140,56),new Xd(!1,368,144,16,16,16,92,36),new Xd(!1,456,192,18,18,16,114,48),new Xd(!1,576,224,20,20,16,144,56),new Xd(!1,696,272,22,22,16,174,68),new Xd(!1,816,336,24,24,16,136,56),new Xd(!1,1050,408,18,18,36,175,68),new Xd(!1,1304,496,20,20,36,163,62),new Yd],qd=function(){function t(t){this.msg=t,this.pos=0,this.skipAtEnd=0;for(var e=t.split("").map((function(t){return t.charCodeAt(0)})),r=new Za,n=0,o=e.length;n<o;n++){var i=String.fromCharCode(255&e[n]);if("?"===i&&"?"!==t.charAt(n))throw new Error("Message contains characters outside ISO-8859-1 encoding.");r.append(i)}this.msg=r.toString(),this.shape=0,this.codewords=new Za,this.newEncoding=-1}return t.prototype.setSymbolShape=function(t){this.shape=t},t.prototype.setSizeConstraints=function(t,e){this.minSize=t,this.maxSize=e},t.prototype.getMessage=function(){return this.msg},t.prototype.setSkipAtEnd=function(t){this.skipAtEnd=t},t.prototype.getCurrentChar=function(){return this.msg.charCodeAt(this.pos)},t.prototype.getCurrent=function(){return this.msg.charCodeAt(this.pos)},t.prototype.getCodewords=function(){return this.codewords},t.prototype.writeCodewords=function(t){this.codewords.append(t)},t.prototype.writeCodeword=function(t){this.codewords.append(t)},t.prototype.getCodewordCount=function(){return this.codewords.length()},t.prototype.getNewEncoding=function(){return this.newEncoding},t.prototype.signalEncoderChange=function(t){this.newEncoding=t},t.prototype.resetEncoderSignal=function(){this.newEncoding=-1},t.prototype.hasMoreCharacters=function(){return this.pos<this.getTotalMessageCharCount()},t.prototype.getTotalMessageCharCount=function(){return this.msg.length-this.skipAtEnd},t.prototype.getRemainingCharacters=function(){return this.getTotalMessageCharCount()-this.pos},t.prototype.getSymbolInfo=function(){return this.symbolInfo},t.prototype.updateSymbolInfo=function(t){void 0===t&&(t=this.getCodewordCount()),(null==this.symbolInfo||t>this.symbolInfo.getDataCapacity())&&(this.symbolInfo=Xd.lookup(t,this.shape,this.minSize,this.maxSize,!0))},t.prototype.resetSymbolInfo=function(){this.symbolInfo=null},t}(),Kd=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),$d=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Kd(e,t),e.prototype.getEncodingMode=function(){return 3},e.prototype.encode=function(t){for(var e=new Za;t.hasMoreCharacters();){var r=t.getCurrentChar();if(t.pos++,this.encodeChar(r,e),e.length()%3==0)if(this.writeNextTriplet(t,e),eh.lookAheadTest(t.getMessage(),t.pos,this.getEncodingMode())!==this.getEncodingMode()){t.signalEncoderChange(0);break}}this.handleEOD(t,e)},e.prototype.encodeChar=function(t,e){switch(t){case 13:e.append(0);break;case"*".charCodeAt(0):e.append(1);break;case">".charCodeAt(0):e.append(2);break;case" ".charCodeAt(0):e.append(3);break;default:t>="0".charCodeAt(0)&&t<="9".charCodeAt(0)?e.append(t-48+4):t>="A".charCodeAt(0)&&t<="Z".charCodeAt(0)?e.append(t-65+14):eh.illegalCharacter(Ya.getCharAt(t))}return 1},e.prototype.handleEOD=function(t,e){t.updateSymbolInfo();var r=t.getSymbolInfo().getDataCapacity()-t.getCodewordCount(),n=e.length();t.pos-=n,(t.getRemainingCharacters()>1||r>1||t.getRemainingCharacters()!==r)&&t.writeCodeword(254),t.getNewEncoding()<0&&t.signalEncoderChange(0)},e}(Hd),Jd=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Qd=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Jd(e,t),e.prototype.getEncodingMode=function(){return 2},e.prototype.encodeChar=function(t,e){if(t===" ".charCodeAt(0))return e.append(3),1;if(t>="0".charCodeAt(0)&&t<="9".charCodeAt(0))return e.append(t-48+4),1;if(t>="a".charCodeAt(0)&&t<="z".charCodeAt(0))return e.append(t-97+14),1;if(t<" ".charCodeAt(0))return e.append(0),e.append(t),2;if(t<="/".charCodeAt(0))return e.append(1),e.append(t-33),2;if(t<="@".charCodeAt(0))return e.append(1),e.append(t-58+15),2;if(t>="[".charCodeAt(0)&&t<="_".charCodeAt(0))return e.append(1),e.append(t-91+22),2;if(t==="`".charCodeAt(0))return e.append(2),e.append(0),2;if(t<="Z".charCodeAt(0))return e.append(2),e.append(t-65+1),2;if(t<=127)return e.append(2),e.append(t-123+27),2;e.append("1");var r=2;return r+=this.encodeChar(t-128,e)},e}(Hd),th=function(){function t(){}return t.randomize253State=function(t){var e=129+(149*t%253+1);return e<=254?e:e-254},t.encodeHighLevel=function(t,e,r,n,o){void 0===e&&(e=0),void 0===r&&(r=null),void 0===n&&(n=null),void 0===o&&(o=!1);var i=new Hd,a=[new Ud,i,new Qd,new $d,new jd,new Vd],s=new qd(t);s.setSymbolShape(e),s.setSizeConstraints(r,n),t.startsWith(Ld)&&t.endsWith("")?(s.writeCodeword(236),s.setSkipAtEnd(2),s.pos+=7):t.startsWith(zd)&&t.endsWith("")&&(s.writeCodeword(237),s.setSkipAtEnd(2),s.pos+=7);var u=0;for(o&&(i.encodeMaximal(s),u=s.getNewEncoding(),s.resetEncoderSignal());s.hasMoreCharacters();)a[u].encode(s),s.getNewEncoding()>=0&&(u=s.getNewEncoding(),s.resetEncoderSignal());var c=s.getCodewordCount();s.updateSymbolInfo();var l=s.getSymbolInfo().getDataCapacity();c<l&&0!==u&&5!==u&&4!==u&&s.writeCodeword("þ");var d=s.getCodewords();for(d.length()<l&&d.append(129);d.length()<l;)d.append(this.randomize253State(d.length()+1));return s.getCodewords().toString()},t.lookAheadTest=function(t,e,r){var n=this.lookAheadTestIntern(t,e,r);if(3===r&&3===n){for(var o=Math.min(e+3,t.length),i=e;i<o;i++)if(!this.isNativeX12(t.charCodeAt(i)))return 0}else if(4===r&&4===n)for(o=Math.min(e+4,t.length),i=e;i<o;i++)if(!this.isNativeEDIFACT(t.charCodeAt(i)))return 0;return n},t.lookAheadTestIntern=function(t,e,r){if(e>=t.length)return r;var n;0===r?n=[0,1,1,1,1,1.25]:(n=[1,2,2,2,2,2.25])[r]=0;for(var o=0,i=new Uint8Array(6),a=[];;){if(e+o===t.length){xa.fill(i,0),xa.fill(a,0);var s=this.findMinimums(n,a,Pa.MAX_VALUE,i),u=this.getMinimumCount(i);if(a[0]===s)return 0;if(1===u){if(i[5]>0)return 5;if(i[4]>0)return 4;if(i[2]>0)return 2;if(i[3]>0)return 3}return 1}var c=t.charCodeAt(e+o);if(o++,this.isDigit(c)?n[0]+=.5:this.isExtendedASCII(c)?(n[0]=Math.ceil(n[0]),n[0]+=2):(n[0]=Math.ceil(n[0]),n[0]++),this.isNativeC40(c)?n[1]+=2/3:this.isExtendedASCII(c)?n[1]+=8/3:n[1]+=4/3,this.isNativeText(c)?n[2]+=2/3:this.isExtendedASCII(c)?n[2]+=8/3:n[2]+=4/3,this.isNativeX12(c)?n[3]+=2/3:this.isExtendedASCII(c)?n[3]+=13/3:n[3]+=10/3,this.isNativeEDIFACT(c)?n[4]+=3/4:this.isExtendedASCII(c)?n[4]+=4.25:n[4]+=3.25,this.isSpecialB256(c)?n[5]+=4:n[5]++,o>=4){if(xa.fill(i,0),xa.fill(a,0),this.findMinimums(n,a,Pa.MAX_VALUE,i),a[0]<this.min(a[5],a[1],a[2],a[3],a[4]))return 0;if(a[5]<a[0]||a[5]+1<this.min(a[1],a[2],a[3],a[4]))return 5;if(a[4]+1<this.min(a[5],a[1],a[2],a[3],a[0]))return 4;if(a[2]+1<this.min(a[5],a[1],a[4],a[3],a[0]))return 2;if(a[3]+1<this.min(a[5],a[1],a[4],a[2],a[0]))return 3;if(a[1]+1<this.min(a[0],a[5],a[4],a[2])){if(a[1]<a[3])return 1;if(a[1]===a[3]){for(var l=e+o+1;l<t.length;){var d=t.charCodeAt(l);if(this.isX12TermSep(d))return 3;if(!this.isNativeX12(d))break;l++}return 1}}}}},t.min=function(t,e,r,n,o){var i=Math.min(t,Math.min(e,Math.min(r,n)));return void 0===o?i:Math.min(i,o)},t.findMinimums=function(t,e,r,n){for(var o=0;o<6;o++){var i=e[o]=Math.ceil(t[o]);r>i&&(r=i,xa.fill(n,0)),r===i&&(n[o]=n[o]+1)}return r},t.getMinimumCount=function(t){for(var e=0,r=0;r<6;r++)e+=t[r];return e||0},t.isDigit=function(t){return t>="0".charCodeAt(0)&&t<="9".charCodeAt(0)},t.isExtendedASCII=function(t){return t>=128&&t<=255},t.isNativeC40=function(t){return t===" ".charCodeAt(0)||t>="0".charCodeAt(0)&&t<="9".charCodeAt(0)||t>="A".charCodeAt(0)&&t<="Z".charCodeAt(0)},t.isNativeText=function(t){return t===" ".charCodeAt(0)||t>="0".charCodeAt(0)&&t<="9".charCodeAt(0)||t>="a".charCodeAt(0)&&t<="z".charCodeAt(0)},t.isNativeX12=function(t){return this.isX12TermSep(t)||t===" ".charCodeAt(0)||t>="0".charCodeAt(0)&&t<="9".charCodeAt(0)||t>="A".charCodeAt(0)&&t<="Z".charCodeAt(0)},t.isX12TermSep=function(t){return 13===t||t==="*".charCodeAt(0)||t===">".charCodeAt(0)},t.isNativeEDIFACT=function(t){return t>=" ".charCodeAt(0)&&t<="^".charCodeAt(0)},t.isSpecialB256=function(t){return!1},t.determineConsecutiveDigitCount=function(t,e){void 0===e&&(e=0);for(var r=t.length,n=e;n<r&&this.isDigit(t.charCodeAt(n));)n++;return n-e},t.illegalCharacter=function(t){var e=Pa.toHexString(t.charCodeAt(0));throw e="0000".substring(0,4-e.length)+e,new Error("Illegal character: "+t+" (0x"+e+")")},t}(),eh=th,rh=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},nh=function(){function t(t){this.charset=t,this.name=t.name}return t.prototype.canEncode=function(t){try{return null!=Xa.encode(t,this.charset)}catch(t){return!1}},t}(),oh=function(){function t(t,e,r){var n,o,i,a,s,u;this.ENCODERS=["IBM437","ISO-8859-2","ISO-8859-3","ISO-8859-4","ISO-8859-5","ISO-8859-6","ISO-8859-7","ISO-8859-8","ISO-8859-9","ISO-8859-10","ISO-8859-11","ISO-8859-13","ISO-8859-14","ISO-8859-15","ISO-8859-16","windows-1250","windows-1251","windows-1252","windows-1256","Shift_JIS"].map((function(t){return new nh(Pd.forName(t))})),this.encoders=[];var c=[];c.push(new nh(Bd.ISO_8859_1));for(var l=null!=e&&e.name.startsWith("UTF"),d=0;d<t.length;d++){var h=!1;try{for(var f=(n=void 0,rh(c)),p=f.next();!p.done;p=f.next()){var g=p.value,m=t.charAt(d);if(m.charCodeAt(0)===r||g.canEncode(m)){h=!0;break}}}catch(t){n={error:t}}finally{try{p&&!p.done&&(o=f.return)&&o.call(f)}finally{if(n)throw n.error}}if(!h)try{for(var y=(i=void 0,rh(this.ENCODERS)),w=y.next();!w.done;w=y.next()){if((g=w.value).canEncode(t.charAt(d))){c.push(g),h=!0;break}}}catch(t){i={error:t}}finally{try{w&&!w.done&&(a=y.return)&&a.call(y)}finally{if(i)throw i.error}}h||(l=!0)}if(1!==c.length||l){this.encoders=[];var _=0;try{for(var v=rh(c),E=v.next();!E.done;E=v.next()){g=E.value;this.encoders[_++]=g}}catch(t){s={error:t}}finally{try{E&&!E.done&&(u=v.return)&&u.call(v)}finally{if(s)throw s.error}}}else this.encoders=[c[0]];var b=-1;if(null!=e)for(d=0;d<this.encoders.length;d++)if(null!=this.encoders[d]&&e.name===this.encoders[d].name){b=d;break}this.priorityEncoderIndex=b}return t.prototype.length=function(){return this.encoders.length},t.prototype.getCharsetName=function(t){if(!(t<this.length()))throw new Error("index must be less than length");return this.encoders[t].name},t.prototype.getCharset=function(t){if(!(t<this.length()))throw new Error("index must be less than length");return this.encoders[t].charset},t.prototype.getECIValue=function(t){return this.encoders[t].charset.getValueIdentifier()},t.prototype.getPriorityEncoderIndex=function(){return this.priorityEncoderIndex},t.prototype.canEncode=function(t,e){if(!(e<this.length()))throw new Error("index must be less than length");return!0},t.prototype.encode=function(t,e){if(!(e<this.length()))throw new Error("index must be less than length");return Xa.encode(Ya.getCharAt(t),this.encoders[e].name)},t}(),ih=function(){function t(t,e,r){this.fnc1=r;var n=new oh(t,e,r);if(1===n.length())for(var o=0;o<this.bytes.length;o++){var i=t.charAt(o).charCodeAt(0);this.bytes[o]=i===r?1e3:i}else this.bytes=this.encodeMinimally(t,n,r)}return t.prototype.getFNC1Character=function(){return this.fnc1},t.prototype.length=function(){return this.bytes.length},t.prototype.haveNCharacters=function(t,e){if(t+e-1>=this.bytes.length)return!1;for(var r=0;r<e;r++)if(this.isECI(t+r))return!1;return!0},t.prototype.charAt=function(t){if(t<0||t>=this.length())throw new Error(""+t);if(this.isECI(t))throw new Error("value at "+t+" is not a character but an ECI");return this.isFNC1(t)?this.fnc1:this.bytes[t]},t.prototype.subSequence=function(t,e){if(t<0||t>e||e>this.length())throw new Error(""+t);for(var r=new Za,n=t;n<e;n++){if(this.isECI(n))throw new Error("value at "+n+" is not a character but an ECI");r.append(this.charAt(n))}return r.toString()},t.prototype.isECI=function(t){if(t<0||t>=this.length())throw new Error(""+t);return this.bytes[t]>255&&this.bytes[t]<=999},t.prototype.isFNC1=function(t){if(t<0||t>=this.length())throw new Error(""+t);return 1e3===this.bytes[t]},t.prototype.getECIValue=function(t){if(t<0||t>=this.length())throw new Error(""+t);if(!this.isECI(t))throw new Error("value at "+t+" is not an ECI but a character");return this.bytes[t]-256},t.prototype.addEdge=function(t,e,r){(null==t[e][r.encoderIndex]||t[e][r.encoderIndex].cachedTotalSize>r.cachedTotalSize)&&(t[e][r.encoderIndex]=r)},t.prototype.addEdges=function(t,e,r,n,o,i){var a=t.charAt(n).charCodeAt(0),s=0,u=e.length();e.getPriorityEncoderIndex()>=0&&(a===i||e.canEncode(a,e.getPriorityEncoderIndex()))&&(u=(s=e.getPriorityEncoderIndex())+1);for(var c=s;c<u;c++)(a===i||e.canEncode(a,c))&&this.addEdge(r,n+1,new ah(a,e,c,o,i))},t.prototype.encodeMinimally=function(t,e,r){var n=t.length,o=new(ah[n+1][e.length()]);this.addEdges(t,e,o,0,null,r);for(var i=1;i<=n;i++){for(var a=0;a<e.length();a++)null!=o[i][a]&&i<n&&this.addEdges(t,e,o,i,o[i][a],r);for(a=0;a<e.length();a++)o[i-1][a]=null}var s=-1,u=Pa.MAX_VALUE;for(a=0;a<e.length();a++)if(null!=o[n][a]){var c=o[n][a];c.cachedTotalSize<u&&(u=c.cachedTotalSize,s=a)}if(s<0)throw new Error('Failed to encode "'+t+'"');for(var l=[],d=o[n][s];null!=d;){if(d.isFNC1())l.unshift(1e3);else{var h=e.encode(d.c,d.encoderIndex);for(i=h.length-1;i>=0;i--)l.unshift(255&h[i])}(null===d.previous?0:d.previous.encoderIndex)!==d.encoderIndex&&l.unshift(256+e.getECIValue(d.encoderIndex)),d=d.previous}var f=[];for(i=0;i<f.length;i++)f[i]=l[i];return f},t}(),ah=function(){function t(t,e,r,n,o){this.c=t,this.encoderSet=e,this.encoderIndex=r,this.previous=n,this.fnc1=o,this.c=t===o?1e3:t;var i=this.isFNC1()?1:e.encode(t,r).length;(null===n?0:n.encoderIndex)!==r&&(i+=3),null!=n&&(i+=n.cachedTotalSize),this.cachedTotalSize=i}return t.prototype.isFNC1=function(){return 1e3===this.c},t}(),sh=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){t[t.ASCII=0]="ASCII",t[t.C40=1]="C40",t[t.TEXT=2]="TEXT",t[t.X12=3]="X12",t[t.EDF=4]="EDF",t[t.B256=5]="B256"}(Fd||(Fd={})),function(t){function e(e,r,n,o,i){var a=t.call(this,e,r,n)||this;return a.shape=o,a.macroId=i,a}sh(e,t),e.prototype.getMacroId=function(){return this.macroId},e.prototype.getShapeHint=function(){return this.shape}}(ih);var uh=function(){function t(t){this.previous=t}return t.prototype.getPrevious=function(){return this.previous},t}(),ch=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),lh=function(t){function e(e,r,n){var o=t.call(this,e)||this;return o.value=r,o.bitCount=n,o}return ch(e,t),e.prototype.appendTo=function(t,e){t.appendBits(this.value,this.bitCount)},e.prototype.add=function(t,r){return new e(this,t,r)},e.prototype.addBinaryShift=function(t,r){return console.warn("addBinaryShift on SimpleToken, this simply returns a copy of this token"),new e(this,t,r)},e.prototype.toString=function(){var t=this.value&(1<<this.bitCount)-1;return t|=1<<this.bitCount,"<"+Pa.toBinaryString(t|1<<this.bitCount).substring(1)+">"},e}(uh),dh=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){function e(e,r,n){var o=t.call(this,e,0,0)||this;return o.binaryShiftStart=r,o.binaryShiftByteCount=n,o}dh(e,t),e.prototype.appendTo=function(t,e){for(var r=0;r<this.binaryShiftByteCount;r++)(0===r||31===r&&this.binaryShiftByteCount<=62)&&(t.appendBits(31,5),this.binaryShiftByteCount>62?t.appendBits(this.binaryShiftByteCount-31,16):0===r?t.appendBits(Math.min(this.binaryShiftByteCount,31),5):t.appendBits(this.binaryShiftByteCount-31,5)),t.appendBits(e[this.binaryShiftStart+r],8)},e.prototype.addBinaryShift=function(t,r){return new e(this,t,r)},e.prototype.toString=function(){return"<"+this.binaryShiftStart+"::"+(this.binaryShiftStart+this.binaryShiftByteCount-1)+">"}}(lh);new lh(null,0,0);var hh=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};!function(t){var e,r;try{for(var n=hh(t),o=n.next();!o.done;o=n.next()){var i=o.value;xa.fill(i,-1)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}t[0][4]=0,t[1][4]=0,t[1][0]=28,t[3][4]=0,t[2][4]=0,t[2][0]=15}(xa.createInt32Array(6,6)),function(t){var e=Ya.getCharCode(" "),r=Ya.getCharCode("."),n=Ya.getCharCode(",");t[0][e]=1;for(var o=Ya.getCharCode("Z"),i=Ya.getCharCode("A"),a=i;a<=o;a++)t[0][a]=a-i+2;t[1][e]=1;var s=Ya.getCharCode("z"),u=Ya.getCharCode("a");for(a=u;a<=s;a++)t[1][a]=a-u+2;t[2][e]=1;var c=Ya.getCharCode("9"),l=Ya.getCharCode("0");for(a=l;a<=c;a++)t[2][a]=a-l+2;t[2][n]=12,t[2][r]=13;for(var d=["\0"," ","","","","","","","","\b","\t","\n","\v","\f","\r","","","","","","@","\\","^","_","`","|","~",""],h=0;h<d.length;h++)t[3][Ya.getCharCode(d[h])]=h;var f=["\0","\r","\0","\0","\0","\0","!","'","#","$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","?","[","]","{","}"];for(h=0;h<f.length;h++)Ya.getCharCode(f[h])>0&&(t[4][Ya.getCharCode(f[h])]=h)}(xa.createInt32Array(5,256));var fh=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),ph=function(t){function e(r){var n=t.call(this,r.width,r.height)||this;return n.canvas=r,n.tempCanvasElement=null,n.buffer=e.makeBufferFromCanvasImageData(r),n}return fh(e,t),e.makeBufferFromCanvasImageData=function(t){var r;try{r=t.getContext("2d",{willReadFrequently:!0})}catch(e){r=t.getContext("2d")}if(!r)throw new Error("Couldn't get canvas context.");var n=r.getImageData(0,0,t.width,t.height);return e.toGrayscaleBuffer(n.data,t.width,t.height)},e.toGrayscaleBuffer=function(t,e,r){for(var n=new Uint8ClampedArray(e*r),o=0,i=0,a=t.length;o<a;o+=4,i++){var s=void 0;if(0===t[o+3])s=255;else s=306*t[o]+601*t[o+1]+117*t[o+2]+512>>10;n[i]=s}return n},e.prototype.getRow=function(t,e){if(t<0||t>=this.getHeight())throw new Aa("Requested row is outside the image: "+t);var r=this.getWidth(),n=t*r;return null===e?e=this.buffer.slice(n,n+r):(e.length<r&&(e=new Uint8ClampedArray(r)),e.set(this.buffer.slice(n,n+r))),e},e.prototype.getMatrix=function(){return this.buffer},e.prototype.isCropSupported=function(){return!0},e.prototype.crop=function(e,r,n,o){return t.prototype.crop.call(this,e,r,n,o),this},e.prototype.isRotateSupported=function(){return!0},e.prototype.rotateCounterClockwise=function(){return this.rotate(-90),this},e.prototype.rotateCounterClockwise45=function(){return this.rotate(-45),this},e.prototype.invert=function(){return new os(this)},e.prototype.getTempCanvasElement=function(){if(null===this.tempCanvasElement){var t=this.canvas.ownerDocument.createElement("canvas");t.width=this.canvas.width,t.height=this.canvas.height,this.tempCanvasElement=t}return this.tempCanvasElement},e.prototype.rotate=function(t){var r=this.getTempCanvasElement();if(!r)throw new Error("Could not create a Canvas element.");var n=t*e.DEGREE_TO_RADIANS,o=this.canvas.width,i=this.canvas.height,a=Math.ceil(Math.abs(Math.cos(n))*o+Math.abs(Math.sin(n))*i),s=Math.ceil(Math.abs(Math.sin(n))*o+Math.abs(Math.cos(n))*i);r.width=a,r.height=s;var u=r.getContext("2d");if(!u)throw new Error("Could not create a Canvas Context element.");return u.translate(a/2,s/2),u.rotate(n),u.drawImage(this.canvas,o/-2,i/-2),this.buffer=e.makeBufferFromCanvasImageData(r),this},e.DEGREE_TO_RADIANS=Math.PI/180,e}(rs);function gh(){return"undefined"!=typeof navigator}function mh(){return!!(gh()&&navigator.mediaDevices&&navigator.mediaDevices.enumerateDevices)}var yh=function(){return yh=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},yh.apply(this,arguments)},wh=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{u(n.next(t))}catch(t){i(t)}}function s(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))},_h=function(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},vh=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Eh={delayBetweenScanAttempts:500,delayBetweenScanSuccess:500,tryPlayVideoTimeout:5e3},bh=function(){function t(t,e,r){void 0===e&&(e=new Map),void 0===r&&(r={}),this.reader=t,this.hints=e,this.options=yh(yh({},Eh),r)}return Object.defineProperty(t.prototype,"possibleFormats",{set:function(t){this.hints.set(La.POSSIBLE_FORMATS,t)},enumerable:!1,configurable:!0}),t.addVideoSource=function(t,e){try{t.srcObject=e}catch(t){console.error("got interrupted by new loading request")}},t.mediaStreamSetTorch=function(t,e){return wh(this,void 0,void 0,(function(){return _h(this,(function(r){switch(r.label){case 0:return[4,t.applyConstraints({advanced:[{fillLightMode:e?"flash":"off",torch:!!e}]})];case 1:return r.sent(),[2]}}))}))},t.mediaStreamIsTorchCompatible=function(e){var r,n,o=e.getVideoTracks();try{for(var i=vh(o),a=i.next();!a.done;a=i.next()){var s=a.value;if(t.mediaStreamIsTorchCompatibleTrack(s))return!0}}catch(t){r={error:t}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return!1},t.mediaStreamIsTorchCompatibleTrack=function(t){try{return"torch"in t.getCapabilities()}catch(t){return console.error(t),console.warn("Your browser may be not fully compatible with WebRTC and/or ImageCapture specs. Torch will not be available."),!1}},t.isVideoPlaying=function(t){return t.currentTime>0&&!t.paused&&t.readyState>2},t.getMediaElement=function(t,e){var r=document.getElementById(t);if(!r)throw new Ea("element with id '".concat(t,"' not found"));if(r.nodeName.toLowerCase()!==e.toLowerCase())throw new Ea("element with id '".concat(t,"' must be an ").concat(e," element"));return r},t.createVideoElement=function(e){if(e instanceof HTMLVideoElement)return e;if("string"==typeof e)return t.getMediaElement(e,"video");if(!e&&"undefined"!=typeof document){var r=document.createElement("video");return r.width=200,r.height=200,r}throw new Error("Couldn't get videoElement from videoSource!")},t.prepareImageElement=function(e){if(e instanceof HTMLImageElement)return e;if("string"==typeof e)return t.getMediaElement(e,"img");if(void 0===e){var r=document.createElement("img");return r.width=200,r.height=200,r}throw new Error("Couldn't get imageElement from imageSource!")},t.prepareVideoElement=function(e){var r=t.createVideoElement(e);return r.setAttribute("autoplay","true"),r.setAttribute("muted","true"),r.setAttribute("playsinline","true"),r},t.isImageLoaded=function(t){return!!t.complete&&0!==t.naturalWidth},t.createBinaryBitmapFromCanvas=function(t){var e=new ph(t),r=new es(e);return new Ca(r)},t.drawImageOnCanvas=function(t,e){t.drawImage(e,0,0)},t.getMediaElementDimensions=function(t){if(t instanceof HTMLVideoElement)return{height:t.videoHeight,width:t.videoWidth};if(t instanceof HTMLImageElement)return{height:t.naturalHeight||t.height,width:t.naturalWidth||t.width};throw new Error("Couldn't find the Source's dimensions!")},t.createCaptureCanvas=function(e){if(!e)throw new Ea("Cannot create a capture canvas without a media element.");if("undefined"==typeof document)throw new Error('The page "Document" is undefined, make sure you\'re running in a browser.');var r=document.createElement("canvas"),n=t.getMediaElementDimensions(e),o=n.width,i=n.height;return r.style.width=o+"px",r.style.height=i+"px",r.width=o,r.height=i,r},t.tryPlayVideo=function(e){return wh(this,void 0,void 0,(function(){var r;return _h(this,(function(n){switch(n.label){case 0:if(null==e?void 0:e.ended)return console.error("Trying to play video that has ended."),[2,!1];if(t.isVideoPlaying(e))return console.warn("Trying to play video that is already playing."),[2,!0];n.label=1;case 1:return n.trys.push([1,3,,4]),[4,e.play()];case 2:return n.sent(),[2,!0];case 3:return r=n.sent(),console.warn("It was not possible to play the video.",r),[2,!1];case 4:return[2]}}))}))},t.createCanvasFromMediaElement=function(e){var r=t.createCaptureCanvas(e),n=r.getContext("2d");if(!n)throw new Error("Couldn't find Canvas 2D Context.");return t.drawImageOnCanvas(n,e),r},t.createBinaryBitmapFromMediaElem=function(e){var r=t.createCanvasFromMediaElement(e);return t.createBinaryBitmapFromCanvas(r)},t.destroyImageElement=function(t){t.src="",t.removeAttribute("src"),t=void 0},t.listVideoInputDevices=function(){return wh(this,void 0,void 0,(function(){var t,e,r,n,o,i,a,s,u,c,l,d;return _h(this,(function(h){switch(h.label){case 0:if(!gh())throw new Error("Can't enumerate devices, navigator is not present.");if(!mh())throw new Error("Can't enumerate devices, method not supported.");return[4,navigator.mediaDevices.enumerateDevices()];case 1:t=h.sent(),e=[];try{for(r=vh(t),n=r.next();!n.done;n=r.next())o=n.value,"videoinput"===(i="video"===o.kind?"videoinput":o.kind)&&(a=o.deviceId||o.id,s=o.label||"Video device ".concat(e.length+1),u=o.groupId,c={deviceId:a,label:s,kind:i,groupId:u},e.push(c))}catch(t){l={error:t}}finally{try{n&&!n.done&&(d=r.return)&&d.call(r)}finally{if(l)throw l.error}}return[2,e]}}))}))},t.findDeviceById=function(e){return wh(this,void 0,void 0,(function(){var r;return _h(this,(function(n){switch(n.label){case 0:return[4,t.listVideoInputDevices()];case 1:return(r=n.sent())?[2,r.find((function(t){return t.deviceId===e}))]:[2]}}))}))},t.cleanVideoSource=function(t){if(t){try{t.srcObject=null}catch(e){t.src=""}t&&t.removeAttribute("src")}},t.releaseAllStreams=function(){0!==t.streamTracker.length&&t.streamTracker.forEach((function(t){t.getTracks().forEach((function(t){return t.stop()}))})),t.streamTracker=[]},t.playVideoOnLoadAsync=function(e,r){return wh(this,void 0,void 0,(function(){return _h(this,(function(n){switch(n.label){case 0:return[4,t.tryPlayVideo(e)];case 1:return n.sent()?[2,!0]:[2,new Promise((function(n,o){var i=setTimeout((function(){t.isVideoPlaying(e)||(o(!1),e.removeEventListener("canplay",a))}),r),a=function(){t.tryPlayVideo(e).then((function(t){clearTimeout(i),e.removeEventListener("canplay",a),n(t)}))};e.addEventListener("canplay",a)}))]}}))}))},t.attachStreamToVideo=function(e,r,n){return void 0===n&&(n=5e3),wh(this,void 0,void 0,(function(){var o;return _h(this,(function(i){switch(i.label){case 0:return o=t.prepareVideoElement(r),t.addVideoSource(o,e),[4,t.playVideoOnLoadAsync(o,n)];case 1:return i.sent(),[2,o]}}))}))},t._waitImageLoad=function(e){return new Promise((function(r,n){var o=setTimeout((function(){t.isImageLoaded(e)||(e.removeEventListener("load",i),n())}),1e4),i=function(){clearTimeout(o),e.removeEventListener("load",i),r()};e.addEventListener("load",i)}))},t.checkCallbackFnOrThrow=function(t){if(!t)throw new Ea("`callbackFn` is a required parameter, you cannot capture results without it.")},t.disposeMediaStream=function(t){t.getVideoTracks().forEach((function(t){return t.stop()})),t=void 0},t.prototype.decode=function(e){var r=t.createCanvasFromMediaElement(e);return this.decodeFromCanvas(r)},t.prototype.decodeBitmap=function(t){return this.reader.decode(t,this.hints)},t.prototype.decodeFromCanvas=function(e){var r=t.createBinaryBitmapFromCanvas(e);return this.decodeBitmap(r)},t.prototype.decodeFromImageElement=function(e){return wh(this,void 0,void 0,(function(){var r;return _h(this,(function(n){switch(n.label){case 0:if(!e)throw new Ea("An image element must be provided.");return r=t.prepareImageElement(e),[4,this._decodeOnLoadImage(r)];case 1:return[2,n.sent()]}}))}))},t.prototype.decodeFromImageUrl=function(e){return wh(this,void 0,void 0,(function(){var r;return _h(this,(function(n){switch(n.label){case 0:if(!e)throw new Ea("An URL must be provided.");(r=t.prepareImageElement()).src=e,n.label=1;case 1:return n.trys.push([1,,3,4]),[4,this.decodeFromImageElement(r)];case 2:return[2,n.sent()];case 3:return t.destroyImageElement(r),[7];case 4:return[2]}}))}))},t.prototype.decodeFromConstraints=function(e,r,n){return wh(this,void 0,void 0,(function(){var o,i;return _h(this,(function(a){switch(a.label){case 0:return t.checkCallbackFnOrThrow(n),[4,this.getUserMedia(e)];case 1:o=a.sent(),a.label=2;case 2:return a.trys.push([2,4,,5]),[4,this.decodeFromStream(o,r,n)];case 3:return[2,a.sent()];case 4:throw i=a.sent(),t.disposeMediaStream(o),i;case 5:return[2]}}))}))},t.prototype.decodeFromStream=function(e,r,n){return wh(this,void 0,void 0,(function(){var o,i,a,s,u,c,l,d,h=this;return _h(this,(function(f){switch(f.label){case 0:return t.checkCallbackFnOrThrow(n),o=this.options.tryPlayVideoTimeout,[4,t.attachStreamToVideo(e,r,o)];case 1:return i=f.sent(),a=function(){t.disposeMediaStream(e),t.cleanVideoSource(i)},s=this.scan(i,n,a),u=e.getVideoTracks(),c=yh(yh({},s),{stop:function(){s.stop()},streamVideoConstraintsApply:function(t,e){return wh(this,void 0,void 0,(function(){var r,n,o,i,a,s;return _h(this,(function(c){switch(c.label){case 0:r=e?u.filter(e):u,c.label=1;case 1:c.trys.push([1,6,7,8]),n=vh(r),o=n.next(),c.label=2;case 2:return o.done?[3,5]:[4,o.value.applyConstraints(t)];case 3:c.sent(),c.label=4;case 4:return o=n.next(),[3,2];case 5:return[3,8];case 6:return i=c.sent(),a={error:i},[3,8];case 7:try{o&&!o.done&&(s=n.return)&&s.call(n)}finally{if(a)throw a.error}return[7];case 8:return[2]}}))}))},streamVideoConstraintsGet:function(t){return u.find(t).getConstraints()},streamVideoSettingsGet:function(t){return u.find(t).getSettings()},streamVideoCapabilitiesGet:function(t){return u.find(t).getCapabilities()}}),t.mediaStreamIsTorchCompatible(e)&&(l=null==u?void 0:u.find((function(e){return t.mediaStreamIsTorchCompatibleTrack(e)})),d=function(e){return wh(h,void 0,void 0,(function(){return _h(this,(function(r){switch(r.label){case 0:return[4,t.mediaStreamSetTorch(l,e)];case 1:return r.sent(),[2]}}))}))},c.switchTorch=d,c.stop=function(){return wh(h,void 0,void 0,(function(){return _h(this,(function(t){switch(t.label){case 0:return s.stop(),[4,d(!1)];case 1:return t.sent(),[2]}}))}))}),[2,c]}}))}))},t.prototype.decodeFromVideoDevice=function(e,r,n){return wh(this,void 0,void 0,(function(){var o;return _h(this,(function(i){switch(i.label){case 0:return t.checkCallbackFnOrThrow(n),o={video:e?{deviceId:{exact:e}}:{facingMode:"environment"}},[4,this.decodeFromConstraints(o,r,n)];case 1:return[2,i.sent()]}}))}))},t.prototype.decodeFromVideoElement=function(e,r){return wh(this,void 0,void 0,(function(){var n,o;return _h(this,(function(i){switch(i.label){case 0:if(t.checkCallbackFnOrThrow(r),!e)throw new Ea("A video element must be provided.");return n=t.prepareVideoElement(e),o=this.options.tryPlayVideoTimeout,[4,t.playVideoOnLoadAsync(n,o)];case 1:return i.sent(),[2,this.scan(n,r)]}}))}))},t.prototype.decodeFromVideoUrl=function(e,r){return wh(this,void 0,void 0,(function(){var n,o,i;return _h(this,(function(a){switch(a.label){case 0:if(t.checkCallbackFnOrThrow(r),!e)throw new Ea("An URL must be provided.");return(n=t.prepareVideoElement()).src=e,o=function(){t.cleanVideoSource(n)},i=this.options.tryPlayVideoTimeout,[4,t.playVideoOnLoadAsync(n,i)];case 1:return a.sent(),[2,this.scan(n,r,o)]}}))}))},t.prototype.decodeOnceFromConstraints=function(t,e){return wh(this,void 0,void 0,(function(){var r;return _h(this,(function(n){switch(n.label){case 0:return[4,this.getUserMedia(t)];case 1:return r=n.sent(),[4,this.decodeOnceFromStream(r,e)];case 2:return[2,n.sent()]}}))}))},t.prototype.decodeOnceFromStream=function(e,r){return wh(this,void 0,void 0,(function(){var n,o;return _h(this,(function(i){switch(i.label){case 0:return n=Boolean(r),[4,t.attachStreamToVideo(e,r)];case 1:o=i.sent(),i.label=2;case 2:return i.trys.push([2,,4,5]),[4,this.scanOneResult(o)];case 3:return[2,i.sent()];case 4:return n||t.cleanVideoSource(o),[7];case 5:return[2]}}))}))},t.prototype.decodeOnceFromVideoDevice=function(t,e){return wh(this,void 0,void 0,(function(){var r;return _h(this,(function(n){switch(n.label){case 0:return r={video:t?{deviceId:{exact:t}}:{facingMode:"environment"}},[4,this.decodeOnceFromConstraints(r,e)];case 1:return[2,n.sent()]}}))}))},t.prototype.decodeOnceFromVideoElement=function(e){return wh(this,void 0,void 0,(function(){var r,n;return _h(this,(function(o){switch(o.label){case 0:if(!e)throw new Ea("A video element must be provided.");return r=t.prepareVideoElement(e),n=this.options.tryPlayVideoTimeout,[4,t.playVideoOnLoadAsync(r,n)];case 1:return o.sent(),[4,this.scanOneResult(r)];case 2:return[2,o.sent()]}}))}))},t.prototype.decodeOnceFromVideoUrl=function(e){return wh(this,void 0,void 0,(function(){var r,n;return _h(this,(function(o){switch(o.label){case 0:if(!e)throw new Ea("An URL must be provided.");(r=t.prepareVideoElement()).src=e,n=this.decodeOnceFromVideoElement(r),o.label=1;case 1:return o.trys.push([1,,3,4]),[4,n];case 2:return[2,o.sent()];case 3:return t.cleanVideoSource(r),[7];case 4:return[2]}}))}))},t.prototype.scanOneResult=function(t,e,r,n){var o=this;return void 0===e&&(e=!0),void 0===r&&(r=!0),void 0===n&&(n=!0),new Promise((function(i,a){o.scan(t,(function(t,o,s){if(t)return i(t),void s.stop();if(o){if(o instanceof $a&&e)return;if(o instanceof Sa&&r)return;if(o instanceof Ua&&n)return;s.stop(),a(o)}}))}))},t.prototype.scan=function(e,r,n){var o=this;t.checkCallbackFnOrThrow(r);var i,a=t.createCaptureCanvas(e);try{i=a.getContext("2d",{willReadFrequently:!0})}catch(t){i=a.getContext("2d")}if(!i)throw new Error("Couldn't create canvas for visual element scan.");var s,u=function(){i=void 0,a=void 0},c=!1,l={stop:function(){c=!0,clearTimeout(s),u(),n&&n()}},d=function(){if(!c)try{t.drawImageOnCanvas(i,e);var h=o.decodeFromCanvas(a);r(h,void 0,l),s=setTimeout(d,o.options.delayBetweenScanSuccess)}catch(t){if(r(void 0,t,l),t instanceof Sa||t instanceof Ua||t instanceof $a)return void(s=setTimeout(d,o.options.delayBetweenScanAttempts));u(),n&&n(t)}};return d(),l},t.prototype._decodeOnLoadImage=function(e){return wh(this,void 0,void 0,(function(){return _h(this,(function(r){switch(r.label){case 0:return t.isImageLoaded(e)?[3,2]:[4,t._waitImageLoad(e)];case 1:r.sent(),r.label=2;case 2:return[2,this.decode(e)]}}))}))},t.prototype.getUserMedia=function(e){return wh(this,void 0,void 0,(function(){var r;return _h(this,(function(n){switch(n.label){case 0:return[4,navigator.mediaDevices.getUserMedia(e)];case 1:return r=n.sent(),t.streamTracker.push(r),[2,r]}}))}))},t.streamTracker=[],t}(),Ah=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){function e(e,r){return t.call(this,new Gs,e,r)||this}Ah(e,t)}(bh);var Ch=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){function e(e,r){return t.call(this,new Sc(e),e,r)||this}Ch(e,t)}(bh);var Ih=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){function e(e,r){return t.call(this,new Hc,e,r)||this}Ih(e,t)}(bh);var Sh=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Th=function(t){function e(e,r){var n=this,o=new pd;return o.setHints(e),(n=t.call(this,o,e,r)||this).reader=o,n}return Sh(e,t),Object.defineProperty(e.prototype,"possibleFormats",{set:function(t){this.hints.set(La.POSSIBLE_FORMATS,t),this.reader.setHints(this.hints)},enumerable:!1,configurable:!0}),e.prototype.decodeBitmap=function(t){return this.reader.decodeWithState(t)},e.prototype.setHints=function(t){this.hints=t,this.reader.setHints(this.hints)},e}(bh),Dh=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){function e(e,r){return t.call(this,new ld,e,r)||this}Dh(e,t)}(bh);var Oh=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){function e(e,r){return t.call(this,new El,e,r)||this}Oh(e,t)}(bh);const Rh=[ps.PDF_417,ps.QR_CODE];class Mh{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Rh;this.reader=new Th,this.formats=t,this.reader.possibleFormats=t,ha("Barcode detector initialized",t.map((t=>ps[t])))}getXYWidthHeight(t){if(!t||0===t.length)return{x:0,y:0,width:0,height:0};let e=1/0,r=-1/0,n=1/0,o=-1/0;for(const i of t){const t=i.getX(),a=i.getY();t<e&&(e=t),t>r&&(r=t),a<n&&(n=a),a>o&&(o=a)}return{x:e,y:n,width:r-e,height:o-n}}detect(t){let e;if(t instanceof HTMLCanvasElement)e=t;else{e=document.createElement("canvas"),e.width=t.width,e.height=t.height;const r=e.getContext("2d");if(!r)return ha("Warning: Unable to get 2D context for canvas."),[];null==r||r.drawImage(t,0,0)}const r=[],n=new Set,o=t=>{try{const t=this.reader.decodeFromCanvas(e);ha("Barcode detected:",t);const o=this.getXYWidthHeight(t.getResultPoints()),i=ps[t.getBarcodeFormat()],a=t.getText(),s=`${i}:${a}`;if(n.has(s))return;n.add(s);const u={class:i,score:1,extra:a,x:o.x,y:o.y,width:o.width,height:o.height};r.push(u),ha("Barcode result:",u)}catch(e){ha(void 0!==t?`Barcode not detected for format ${ps[t]}`:"Barcode not detected"),"NotFoundException"!==(null==e?void 0:e.name)&&ha("Barcode detection error:",e)}};if(0===this.formats.length)return o(),r;for(const t of this.formats){const e=new Map;e.set(La.POSSIBLE_FORMATS,[t]),e.set(La.TRY_HARDER,!0),this.reader.setHints(e),o(t)}return r}}var Nh;!function(t){t.NOT_AVAILABLE="notAvailable",t.LOADING="loading",t.LOADED="loaded"}(Nh||(Nh={}));const kh={[fa.DOCUMENT_DETECTOR]:{status:Nh.LOADING},[fa.BLUR_GLARE_CLASSIFIER]:{status:Nh.LOADING},[fa.FACE_LANDMARK]:{status:Nh.LOADING}};let xh=null;function Ph(t){if(xh)return ha("Reusing existing barcode detector instance"),xh;try{return xh=new Mh((t=>{const e={Aztec:ps.AZTEC,Codabar:ps.CODABAR,Code39:ps.CODE_39,Code93:ps.CODE_93,Code128:ps.CODE_128,DataMatrix:ps.DATA_MATRIX,EAN8:ps.EAN_8,EAN13:ps.EAN_13,ITF:ps.ITF,MaxiCode:ps.MAXICODE,PDF417:ps.PDF_417,QRCode:ps.QR_CODE,UPCA:ps.UPC_A,UPCE:ps.UPC_E};return t.map((t=>e[t])).filter((t=>void 0!==t))})(t)),ha("Created new barcode detector instance"),xh}catch(t){throw ha("Error initializing barcode model",t),sa("Error initializing barcode model","barcode_model_not_supported","init"),t}}const Bh=[fa.DOCUMENT_DETECTOR,fa.BLUR_GLARE_CLASSIFIER],Fh=async()=>{let t=!1;for(;!t;){const e=Object.values(kh).filter((t=>t.status===Nh.NOT_AVAILABLE));if(e.length>0)throw new Error(`Model not available: ${e.join(", ")}`);if(t=Bh.every((t=>kh[t].status===Nh.LOADED)),t)return!0;await new Promise((t=>setTimeout(t,100)))}},Lh=t=>"function"==typeof t,zh=function(t){};let Uh;Bi.events.on(Bi.events.MODULE_INITIALIZED,(function(){const{clientId:t,IDV:e}=Bi.moduleMetadata.getInitConfig();if(!t||!e)return!1;const r=(null==e?void 0:e.serverPath)&&(n=null==e?void 0:e.serverPath,o="/verify",(null==n?void 0:n.endsWith(o))?n.slice(0,n.length-o.length):n);var n,o;if(!r)throw new Error("Failed to load SDK: serverPath param required");mo.BASE=r,Ji.dispatch("setClientId",t),Ji.dispatch("setRootElement",(null==e?void 0:e.rootElement)||"root-element"),Ji.dispatch("setServerPath",null==e?void 0:e.serverPath),Ji.dispatch("setLanguage",null==e?void 0:e.language),Ji.dispatch("setCallback",null==e?void 0:e.callback),Ji.dispatch("setConsentVersion",null==e?void 0:e.consentVersion),Ji.dispatch("setMarkdownSupportText",null==e?void 0:e.markdownSupportText),Ji.dispatch("setVideoCaptureSettings",null==e?void 0:e.videoCaptureSettings),Ji.dispatch("setCdnHost",null==e?void 0:e.cdnHost),Ji.dispatch("setIsImageSigningEnabled",null==e?void 0:e.isImageSigningEnabled),(null==e?void 0:e.callbacks)&&qh(e);return Ji.dispatch("setStartToken",null==e?void 0:e.startToken),Uh=qi(Ji.state.clientId).then((t=>Kh(t))),function(t){ji({type:"init",step:t})}("init"),!0})),Bi.events.on(Fi,(function(t){switch(aa.handelEventData(t),Zh(t),t.type){case"session-granted":Vh({session:Ji.state.sessionId});break;case"session-id-acquired":Hh({session:Ji.state.sessionId});break;case"capture-image-result":jh({session:Ji.state.sessionId},t.imageType);break;case"start-verification-processing":Gh({session:Ji.state.sessionId});break;case"verification-complete":Wh({session:Ji.state.sessionId});break;case"capture-error":case"failed-to-init-drs":case"api-request-error":Yh({session:Ji.state.sessionId},t.errorCode,t.error);break;case"verification-recapture":Xh({session:Ji.state.sessionId},t.reason)}}));let Vh=zh,Hh=zh,jh=zh,Gh=zh,Wh=zh,Xh=zh,Yh=zh,Zh=t=>{};const qh=t=>{let{callbacks:e,callback:r}=t;Lh(e.sessionGranted)&&(Vh=e.sessionGranted),Lh(e.sessionStarted)&&(Hh=e.sessionStarted),Lh(e.imageSubmitted)&&(jh=e.imageSubmitted),Lh(e.processing)&&(Gh=e.processing),Lh(e.completed)&&(Wh=e.completed),Lh(e.recapture)&&(Xh=e.recapture),Lh(e.error)&&(Yh=e.error),Lh(r)&&(Zh=r)};async function Kh(t){if((null==t?void 0:t.strings)&&la.overrideLanguage(t.strings),(null==t?void 0:t.flowType)&&Ji.dispatch("setFlowType",t.flowType),null==t?void 0:t.autocapture_enabled){if("serviceWorker"in navigator)return Ji.dispatch("setAutoCaptureSettings",{enabled:!0,settings:t.autocapture_settings}),ha("service worker available"),void navigator.serviceWorker.addEventListener("message",(t=>{if(t.data&&"MODEL_READY"===t.data.type){const e=t.data.modelName;kh[e]={status:Nh.LOADED,imageDimensions:t.data.imageDimensions,loadingStats:o(o({},t.data.stats),{},{modelName:e})}}else if(t.data&&"MODEL_LOAD_ERROR"===t.data.type){const e=t.data.modelName;kh[e].status=Nh.NOT_AVAILABLE,sa(`${t.data.modelName} error: ${t.data.error}`,"model_load_error","init")}}));sa("service worker not available","service_worker_not_available","init")}Ji.dispatch("setAutoCaptureSettings",{enabled:!1,autocapture_settings:null==t?void 0:t.autocapture_settings})}async function $h(t,e,r){mo.HEADERS=Do(r,e);var n;return(await(n=t,Zi({method:"GET",url:`/verify/api/v1/verification/${n}/status`,path:{sid:n},errors:{404:"Session not found"}},"processing"))).body}async function Jh(t,e,r,n){var i;mo.HEADERS=Do(e);const a=await(s={start_token:t,accessed_from_desktop:!1,client_type:vo.client_type.MOBILE_SDK,consent:{granted:!0,document_id:r},image_signing_public_key:n},Zi({method:"POST",url:"/verify/api/v1/verification/start",headers:{},body:s,mediaType:"application/json"},"init"));var s;const u=a.body.settings,c=null!==(i=null==u?void 0:u.flowType)&&void 0!==i?i:null==u?void 0:u.flow_type,l="string"==typeof c?c:void 0;return o({sessionId:a.body.session_id,userToken:a.body.user_token,requiredImages:a.body.required_images},l&&{flowType:l})}async function Qh(t,e,r){let n,i,a,s;try{const t=Ui(zi),e=JSON.parse(t);n=e.sessionId,i=e.userToken,a=e.flowType,s=e.startToken}catch(t){}const u=n&&i&&(!t||s===t);try{let s;if(u&&null!=n&&null!=i){s=(await $h(n,i,r)).missing_images}else{if(!t)throw new Error("No start token and no valid cached session");const o=Bi.crypto.createCryptoBinding("sign"),u=await o.getPublicData(),d=await Jh(t,r,e,u.publicKey);n=d.sessionId,i=d.userToken,s=d.requiredImages,a=d.flowType;const h=JSON.stringify({sessionId:n,userToken:i,flowType:a,startToken:t});c=zi,l=h,sessionStorage.setItem(c,l)}return o({requiredImages:s,sessionId:n.toString(),userToken:i.toString()},void 0!==a&&""!==a&&{flowType:a})}catch(t){throw console.log("Error starting session"),console.error(t),t}var c,l}function tf(t){let{tagName:e,style:r,id:n="",className:o="",testid:i,options:a}=t;const s=document.createElement(e,a);return s.id=n,s.className=o,s.setAttribute("data-auto",i+"-auto"),Object.keys(r).forEach((t=>{s.style[t]=r[t]})),s}function ef(t,e){Array.isArray(e)?e.forEach((e=>{t.appendChild(e)})):t.appendChild(e)}const rf=async(t,e,r,n,i,a,s,u)=>{var c,l,d,h,f,p,g;mo.HEADERS=Do(r,e);const m=Ao.UAParser();let y;if(Ji.state.isImageSigningEnabled){const t=Bi.crypto.createCryptoBinding("sign");y=await t.sign(n.data)}const w=await(_=t,v=o({image:{format:n.format,image_type:a,content:n.data,capture_margins:n.captureMargins,signature:y,raw_barcode_data:s},device_info:{model:null===(c=null==m?void 0:m.device)||void 0===c?void 0:c.model,type:null===(l=null==m?void 0:m.device)||void 0===l?void 0:l.type,manufacturer:null===(d=null==m?void 0:m.device)||void 0===d?void 0:d.vendor,os:null===(h=null==m?void 0:m.os)||void 0===h?void 0:h.name,os_version:null===(f=null==m?void 0:m.os)||void 0===f?void 0:f.version,browser:null===(p=null==m?void 0:m.browser)||void 0===p?void 0:p.name,browser_version:null===(g=null==m?void 0:m.browser)||void 0===g?void 0:g.version,used_camera:null==i?void 0:i.selectedCamera,cameras:null==i?void 0:i.camerasInfo}},u?{acquisition_id:u}:{}),Zi({method:"POST",url:"/verify/api/v1/verification/{sid}/images",path:{sid:_},body:v,mediaType:"application/json",errors:{400:"Request is malformed or missing required fields",401:"Access token is malformed, missing data, or expired",404:"Session not found",409:"All required images were successfully submitted"}},v.image.image_type));var _,v;const E=function(t,e){const r=[...t].find((t=>t.includes(e)));return void 0!==r?r[1]:void 0}(w.headers,"x-ts-processing-time-ms");return"ok"!==w.body.feedback&&console.error("Error",w),{missing_images:w.body.missing_images,feedback:w.body.feedback,custom_feedback:w.body.custom_feedback,has_barcode:w.body.has_barcode,supported_barcode_symbologies:w.body.supported_barcode_symbologies,serverProcessingTime:E}},nf=()=>{const t=document.getElementById("overlay-frame");if(t){const e=t.getBoundingClientRect(),r=(3840-screen.width)/2,n=(2160-screen.height)/2;return{top:n+e.top,bottom:n+e.bottom,right:r+e.right,left:r+e.left}}},of=t=>["document_front","document_back"].includes(t)?"environment":"user";function af(t){switch(t){case"document_front":return wo.image_type.DOCUMENT_FRONT;case"document_back":return wo.image_type.DOCUMENT_BACK;case"selfie":return wo.image_type.SELFIE}}var sf={},uf={get exports(){return sf},set exports(t){sf=t}};uf.exports=function(t){function e(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var r={};return e.m=t,e.c=r,e.d=function(t,r,n){e.o(t,r)||Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:n})},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=4)}([function(t,e,r){r.d(e,"b",(function(){return i})),r.d(e,"c",(function(){return a}));var n=r(1),o=r(7);r.d(e,"a",(function(){return o.a})),r.d(e,"d",(function(){return n.b}));var i=n.a.FACING_MODES,a=n.a.IMAGE_TYPES},function(t,e,r){var n=r(6);r.d(e,"a",(function(){return n.a}));var o=r(2);r.d(e,"b",(function(){return o.a}))},function(t,e,r){function n(t,e){if(!(e>=0&&e<=1))throw new Error(e+" is invalid imageCompression, choose between: [0, 1]");if(!h.f.includes(t))throw new Error(t+" is invalid imageType, choose between: "+h.f.join(", "));return!0}function o(t,e){var r={};try{n(t,e),r.imageType=t,r.imageCompression=e}catch(t){console.error(t),console.error("default value of "+h.c.PNG+" is used"),r.imageType=h.c.PNG,r.imageCompression=null}return r}function i(){var t=window.navigator.platform,e=window.navigator.userAgent;return t||e}function a(){return"ontouchend"in document}function s(t,e,r){var n=t*parseFloat(r);return{imageWidth:n,imageHeight:e/(t/n)}}function u(t,e,r){return o(e,r).imageType===h.c.JPG?r?t.toDataURL(h.b[h.c.JPG],r):t.toDataURL(h.b[h.c.JPG]):t.toDataURL(h.b[e])}function c(t,e){return t||e}function l(){var t=i();if(/iPad|iPhone|iPod/.test(t))return!0;var e=a();return!(!/Mac/.test(t)||!e)}function d(){return{userAgent:window.navigator.userAgent,platform:window.navigator.platform,_getStringWithPlatform:i(),_getHasTouchEvents:a(),getIsIOS:l()}}e.c=s,e.b=u,e.e=c,e.d=l,e.a=d;var h=r(3)},function(t,e,r){function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}r.d(e,"e",(function(){return i})),r.d(e,"a",(function(){return a})),r.d(e,"f",(function(){return s})),r.d(e,"c",(function(){return u})),r.d(e,"b",(function(){return c})),r.d(e,"d",(function(){return l}));var o,i=["user","environment"],a={USER:"user",ENVIRONMENT:"environment"},s=["jpg","png"],u={PNG:"png",JPG:"jpg"},c=(n(o={},"jpg","image/jpeg"),n(o,"png","image/png"),o),l={audio:!1,video:!0}},function(t,e,r){t.exports=r(5)},function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0});var n=r(0);r.d(e,"FACING_MODES",(function(){return n.b})),r.d(e,"IMAGE_TYPES",(function(){return n.c})),r.d(e,"_getDebugPlatformInfo",(function(){return n.d}));var o=r(9);r.d(e,"downloadPhoto",(function(){return o.a})),e.default=n.a},function(t,e,r){function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}r.d(e,"a",(function(){return s}));var o=r(2),i=r(3),a=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),s=function(){function t(){n(this,t)}return a(t,null,[{key:"getDataUri",value:function(t,e){var r=e.sizeFactor,n=e.imageType,i=e.imageCompression,a=e.isImageMirror,s=t.videoWidth,u=t.videoHeight,c=Object(o.c)(s,u,r),l=c.imageWidth,d=c.imageHeight,h=document.createElement("canvas");h.width=l,h.height=d;var f=h.getContext("2d");return a&&f.setTransform(-1,0,0,1,h.width,0),f.drawImage(t,0,0,l,d),Object(o.b)(h,n,i)}},{key:"getWindowURL",value:function(){return window.URL||window.webkitURL||window.mozURL||window.msURL}},{key:"getNavigatorMediaDevices",value:function(){var t=null,e=!(!navigator.mediaDevices||!navigator.mediaDevices.getUserMedia),r=!(!navigator.mozGetUserMedia&&!navigator.webkitGetUserMedia);if(e)t=navigator.mediaDevices;else if(r){var n=navigator.mozGetUserMedia||navigator.webkitGetUserMedia,o={getUserMedia:function(t){return new Promise((function(e,r){n.call(navigator,t,e,r)}))}};t=Object.assign(n,o)}return t}},{key:"isSupportedFacingMode",value:function(){return t.getNavigatorMediaDevices().getSupportedConstraints().facingMode}},{key:"getIdealConstraints",value:function(e,r){if(!Object(o.e)(e,r))return i.d;var n=t.getNavigatorMediaDevices().getSupportedConstraints();if(!n.width||!n.height)return console.error("Constraint width or height not supported! fallback to default resolution"),i.d;var a=void 0,s=void 0;return e&&(i.e.includes(e)?a=e:s={exact:e}),{audio:!1,video:{facingMode:a,deviceId:s,width:r&&r.width,height:r&&r.height}}}},{key:"getMaxResolutionConstraints",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments[1];console.warn("getMaxResolutionConstraints() numberOfMaxResolutionTry:",r);var n=[{width:{min:640}},{width:{min:800}},{width:{min:900}},{width:{min:1024}},{width:{min:1080}},{width:{min:1280}},{width:{min:1920}},{width:{min:2560}},{width:{min:3840}}],i=t.getIdealConstraints(e,{});if(0===r)return Object(o.d)()?(console.warn("fallback to iOS constraints"),t.getIdealConstraints(e,{width:{min:640,ideal:3840},height:{min:480,ideal:2160}})):(i.video.advanced=n,i);if(r<n.length){var a=n.slice(0,-r);return i.video.advanced=a,i}return null}},{key:"FACING_MODES",get:function(){return i.a}},{key:"IMAGE_TYPES",get:function(){return i.c}}]),t}()},function(t,e,r){function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}r.d(e,"a",(function(){return u}));var o=r(1),i=r(8),a=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),s=o.a.IMAGE_TYPES.PNG,u=function(){function t(e){n(this,t),this.videoElement=e,this.stream=null,this.numberOfMaxResolutionTry=0,this.settings=null,this.cameras=[],this.windowURL=o.a.getWindowURL(),this.mediaDevices=o.a.getNavigatorMediaDevices()}return a(t,[{key:"_getStreamDevice",value:function(t,e){var r=this;return new Promise((function(n,i){var a=o.a.getIdealConstraints(t,e);r.mediaDevices.getUserMedia(a).then((function(t){r._gotStream(t),n(t)})).catch((function(t){i(t)}))}))}},{key:"_getStreamDeviceMaxResolution",value:function(t){var e=this,r=o.a.getMaxResolutionConstraints(t,this.numberOfMaxResolutionTry);if(null==r){var n={};return this._getStreamDevice(t,n)}return new Promise((function(n,o){e.mediaDevices.getUserMedia(r).then((function(t){e._gotStream(t),n(t)})).catch((function(r){setTimeout((function(){e.numberOfMaxResolutionTry+=1,e._getStreamDeviceMaxResolution(t).catch((function(){o(r)}))}),20)}))}))}},{key:"_setVideoSrc",value:function(t){if("srcObject"in this.videoElement)this.videoElement.srcObject=t;else{var e=this.windowURL.createObjectURL(t);this.videoElement.src=e}}},{key:"_setSettings",value:function(t){this.settings=null;var e=t&&t.getTracks?t.getTracks():[];e.length>0&&e[0].getSettings&&(this.settings=e[0].getSettings())}},{key:"_enumerateCamerasPromise",value:function(){var t=this;return new Promise((function(e,r){var n=[];t.mediaDevices.enumerateDevices().then((function(t){t.forEach((function(t){"videoinput"===t.kind&&t.deviceId&&n.push(t)})),e(n)})).catch((function(t){r(t)}))}))}},{key:"_gotStream",value:function(t){this.stream=t,this._setSettings(t),this._setVideoSrc(t)}},{key:"getCameraSettings",value:function(){return this.settings}},{key:"enumerateCameras",value:function(){var t=this;return this.stream?this._enumerateCamerasPromise():this.stopCamera().then((function(){})).catch((function(){})).then((function(){var e={video:!0};return t.mediaDevices.getUserMedia(e).then((function(t){setTimeout((function(){t.getTracks().forEach((function(t){t.stop()}))}),20)})).then((function(){})).catch((function(){})).then((function(){return t._enumerateCamerasPromise()}))}))}},{key:"startCamera",value:function(t,e){var r=this;return this.stopCamera().then((function(){})).catch((function(){})).then((function(){return r._getStreamDevice(t,e)}))}},{key:"startCameraMaxResolution",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.numberOfMaxResolutionTry=0,this.stopCamera().then((function(){})).catch((function(){})).then((function(){return t._getStreamDeviceMaxResolution(e)}))}},{key:"getDataUri",value:function(t){var e={sizeFactor:void 0===t.sizeFactor?i.c:t.sizeFactor,imageType:void 0===t.imageType?s:t.imageType,imageCompression:void 0===t.imageCompression?i.a:t.imageCompression,isImageMirror:void 0===t.isImageMirror?i.b:t.isImageMirror};return o.a.getDataUri(this.videoElement,e)}},{key:"stopCamera",value:function(){var t=this;return new Promise((function(e,r){t.stream&&(t.stream.getTracks().forEach((function(t){t.stop()})),t.videoElement.src="",t.stream=null,t._setSettings(null),e()),r(Error("no stream to stop!"))}))}}]),t}()},function(t,e,r){r.d(e,"c",(function(){return n})),r.d(e,"a",(function(){return o})),r.d(e,"b",(function(){return i}));var n=1,o=null,i=!1},function(t,e,r){var n=r(10);r.d(e,"a",(function(){return n.a}))},function(t,e,r){function n(t){for(var e=atob(t.split(",")[1]),r=t.split(",")[0].split(":")[1].split(";")[0],n=new ArrayBuffer(e.length),o=new Uint8Array(n),i=0;i<e.length;i++)o[i]=e.charCodeAt(i);return new Blob([n],{type:r})}function o(t,e){return(t+="").length>=e?t:new Array(e-t.length+1).join("0")+t}function i(t){var e=c.c.PNG;return"image/jpeg"===t&&(e=c.c.JPG),e}function a(t,e,r){return t+"-"+o(e,4)+"."+i(r)}function s(t,e,r){window.URL=window.webkitURL||window.URL;var n=document.createElement("a");n.download=a(e,r,t.type),n.href=window.URL.createObjectURL(t);var o=document.createEvent("MouseEvents");o.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,0,null),n.dispatchEvent(o)}function u(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"photo",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;s(n(t),e,r)}e.a=u;var c=r(0)}]);var cf=a(sf);class lf{constructor(){this.currentStream=null,this.currentConstraints=null}static getInstance(){return lf.instance||(lf.instance=new lf),lf.instance}getStream(){return this.currentStream}isStreaming(){return this.currentStream&&this.currentStream.getTracks().some((t=>"live"===t.readyState))}stopStream(){this.currentStream&&(this.currentStream.getTracks().forEach((t=>t.stop())),this.currentStream=null)}areConstraintsEqual(t){return!!this.currentConstraints&&JSON.stringify(this.currentConstraints)===JSON.stringify(t)}async startNewStream(t){this.isStreaming()&&this.areConstraintsEqual(t)||(this.stopStream(),this.currentStream=await navigator.mediaDevices.getUserMedia(t),this.currentConstraints=t)}async enumerateDevices(){try{return await navigator.mediaDevices.enumerateDevices()}catch(t){throw console.error("Failed to enumerate devices:",t),t}}}const df=["tele","telephoto","macro","portrait","zoom"],hf=["ultra","wide","uw","front","selfie"];function ff(){return/iPad|iPhone|iPod/.test(navigator.userAgent)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1}function pf(t){const e=t.toLowerCase();let r=0;if(ff())"back camera"!==e&&"rear camera"!==e||(r+=5),(e.includes("telephoto")||e.includes("tele"))&&(r-=2),(e.includes("ultra")||e.includes("wide"))&&(r-=3);else{df.forEach((t=>{e.includes(t)&&(r+="macro"===t?4:3)})),hf.forEach((t=>{e.includes(t)&&(r-=3)}));const t=e.match(/(\d+(?:\.\d+)?)x/);t&&(r+=Math.min(parseFloat(t[1]),6));const n=e.match(/camera2?\s+(\d+)/);if(n){const t=parseInt(n[1]);0===t?r+=3:t>=2&&(r-=2)}}return r}async function gf(t){let e=0;try{const r=lf.getInstance();await r.startNewStream({video:{deviceId:{exact:t}},audio:!1});const n=r.getStream();if(!n)return e;const o=n.getVideoTracks()[0].getCapabilities();return r.stopStream(),o.zoom&&(e+=Math.min(o.zoom.max||0,2)),o.focusMode&&Array.isArray(o.focusMode)&&o.focusMode.includes("continuous")&&(e+=2),o.focusDistance&&(e+=1),e}catch(t){return e}}async function mf(){const t=(await async function(){const t=lf.getInstance();let e=await t.enumerateDevices();return e.filter((t=>"videoinput"===t.kind)).every((t=>""===t.label))&&(await t.startNewStream({video:{facingMode:{ideal:"environment"}},audio:!1}),e=await t.enumerateDevices(),t.stopStream()),e}()).filter((t=>{if(!(null==t?void 0:t.label)||"videoinput"!==t.kind||""===t.label)return!1;const e=t.label.toLowerCase();return yf.some((t=>e.includes(t)))}));if(0===t.length)return{optionalCameras:[]};if(ff())return{optionalCameras:t};const e=t.map((t=>({camera:t,score:pf(t.label)}))),r=Math.max(...e.map((t=>t.score)));if(r<=0)return{optionalCameras:t,selectedCamera:t[0]};const n=e.filter((t=>t.score===r));if(1===n.length)return{optionalCameras:t,selectedCamera:n[0].camera};let o=n[0].camera,i=-1/0;for(const{camera:t,score:e}of n){const r=e+await gf(t.deviceId);r>i&&(i=r,o=t)}return{optionalCameras:t,selectedCamera:o}}const yf=["rear","back","tele","telephoto","macro","portrait","rück","arrière","trasera","trás","traseira","posteriore","后面","後面","背面","后置","後置","背置","задней","الخلفية","후","arka","achterzijde","หลัง","baksidan","bagside","sau","bak","tylny","takakamera","belakang","אחורית","πίσω","spate","hátsó","zadní","darrere","zadná","задня","stražnja","belakang","बैक","camera2 0, facing back"],wf={width:{min:640,max:3840,ideal:3840},height:{min:480,max:2160,ideal:2160},frameRate:30},_f={width:{min:640,max:1280,ideal:1280},height:{min:480,max:720,ideal:720},frameRate:30},vf=async t=>{var e,r;let n;return"environment"==t&&(n=await mf()),null!==(r=null===(e=null==n?void 0:n.selectedCamera)||void 0===e?void 0:e.deviceId)&&void 0!==r?r:t},Ef=(t,e)=>{var r,n;return"user"===t?null!==(r=null==e?void 0:e.selfieVideoConstraints)&&void 0!==r?r:_f:null!==(n=null==e?void 0:e.environmentVideoConstraints)&&void 0!==n?n:wf},bf=t=>{const e=tf({tagName:"video",style:{position:"absolute",zIndex:"0",top:"0",width:"100%",height:"100%",objectFit:"cover"},id:"video",testid:"video"});return e.style.transform="user"===t?"scaleX(-1)":"",e.autoplay=!0,e.muted=!0,e.setAttribute("playsinline","true"),e},Af={title:"other_error_code_title",message:"other_error_code_message"},Cf={ok:Af,document_face_not_found:Af,restricted_criteria:Af,other:Af,glare:{title:"glare_title",message:"glare_message"},document_not_found:{title:"document_not_found_title",message:"document_not_found_message"},blur:{title:"blur_title",message:"blur_message"},document_not_supported:{title:"document_not_supported_title",message:"document_not_supported_message"},unclassifiable:{title:"unclassifiable_title",message:"unclassifiable_message"},obstructed:{title:"obstructed_title",message:"obstructed_message"},document_not_matching:{title:"document_not_matching_title",message:"document_not_matching_message"},face_not_found:{title:"face_not_found_title",message:"face_not_found_message"},wrong_document_side:{title:"wrong_document_side_title",message:"wrong_document_side_message"},glare_selfie:{title:"glare_selfie_title",message:"glare_selfie_message"},blur_selfie:{title:"blur_selfie_title",message:"blur_selfie_message"},multi_face:{title:"multi_face_title",message:"multi_face_message"},face_rotated:{title:"face_rotated_title",message:"face_rotated_message"},face_too_small:{title:"face_too_small_title",message:"face_too_small_message"},face_too_close:{title:"face_too_close_title",message:"face_too_close_message"},closed_eyes:{title:"closed_eyes_title",message:"closed_eyes_message"},face_angle_too_large:{title:"face_angle_too_large_title",message:"face_angle_too_large_message"},face_close_to_border:{title:"face_close_to_border_title",message:"face_close_to_border_message"},face_occluded:{title:"face_occluded_title",message:"face_occluded_message"},face_cropped:{title:"face_cropped_title",message:"face_cropped_message"},barcode_not_found:{title:"barcode_not_found_title",message:"barcode_not_found_message"}},If={loading_screen:{page:"page_header_document",title:"main_title_document_front",instructions:"loading_screen_small_title"},document_front:{page:"page_header_document",title:"main_title_document_front",instructions:"second_title_document_front"},document_back:{page:"page_header_document",title:"main_title_document_back",instructions:"second_title_document_back"},selfie:{page:"page_header_face",title:"main_title_document_face",instructions:"second_title_document_face"}},Sf=(t,e)=>{const r=tf({tagName:"div",style:{display:"flex",justifyContent:"center",flexDirection:"column",alignItems:"center",position:"relative",zIndex:"1",background:"transparent",boxShadow:"0 0 0 1000px rgb(0 0 0 / 50%)",borderStyle:"solid",borderWidth:"1px",borderColor:"white"},id:`overlay-frame ${t}`,testid:`overlay-frame ${t}`});if("environment"===t){!function(t){ef(t,tf({tagName:"div",style:{position:"absolute",top:"-2px",left:"-2px",width:"20px",height:"20px",backgroundColor:"transparent",borderTopStyle:"solid",borderRightStyle:"none",borderBottomStyle:"none",borderLeftStyle:"solid",borderColor:"white",borderWidth:"4px"},id:"overlay-frame__top-left",testid:"overlay-frame__top-left"})),ef(t,tf({tagName:"div",style:{position:"absolute",top:"-2px",right:"-2px",width:"20px",height:"20px",backgroundColor:"transparent",borderTopStyle:"solid",borderRightStyle:"solid",borderBottomStyle:"none",borderLeftStyle:"none",borderColor:"white",borderWidth:"4px"},id:"overlay-frame__top-right",testid:"overlay-frame__top-right"})),ef(t,tf({tagName:"div",style:{position:"absolute",bottom:"-2px",right:"-2px",width:"20px",height:"20px",backgroundColor:"transparent",borderTopStyle:"none",borderRightStyle:"solid",borderBottomStyle:"solid",borderLeftStyle:"none",borderColor:"white",borderWidth:"4px"},id:"overlay-frame__bottom-right",testid:"overlay-frame__bottom-right"})),ef(t,tf({tagName:"div",style:{position:"absolute",bottom:"-2px",left:"-2px",width:"20px",height:"20px",backgroundColor:"transparent",borderTopStyle:"none",borderRightStyle:"none",borderBottomStyle:"solid",borderLeftStyle:"solid",borderColor:"white",borderWidth:"4px"},id:"overlay-frame__bottom-left",testid:"overlay-frame__bottom-left"}))}(r);const t=.85*e.clientWidth;r.style.width=`${t}px`,r.style.height=.65*t+"px",r.style.maxHeight=.5*window.innerHeight+"px"}else{const t=e.clientWidth*(e.clientHeight<700?.8:.85);r.style.width=.8*t+"px",r.style.height=`${t}px`,r.style.minHeight=.8*t+"px",r.style.maxHeight=.5*window.innerHeight+"px",r.style.borderRadius="50%"}return r};const Tf=t=>{var e;const r=document.createElementNS("http://www.w3.org/2000/svg","svg");return r.setAttribute("viewBox","0 0 68 68"),r.innerHTML='<style>.spinner-autocapture circle {animation: rotate 1.5s linear infinite;} @keyframes rotate { 50% {stroke-dashoffset: 94; stroke-dasharray: 6 57; } 100% { stroke-dashoffset: 188; stroke-dasharray: 51 12; }} </style> <g class="spinner-autocapture"> <circle cx="34" cy="34" fill="none" r="30" stroke-width="4" stroke="#fff" stroke-dasharray="51 12" stroke-linecap="round" stroke-dashoffset="0" /> </g>',null!=t&&(null===(e=r.querySelector("circle"))||void 0===e||e.setAttribute("stroke",t)),r};function Df(){const t=document.createElementNS("http://www.w3.org/2000/svg","svg");return t.setAttribute("width","16px"),t.setAttribute("height","16px"),t.innerHTML='\n <path d="M8 16C12.4187 16 16 12.4187 16 8C16 3.58125 12.4187 0 8 0C3.58125 0 0 3.58125 0 8C0 12.4187 3.58125 16 8 16ZM8 4C8.41562 4 8.75 4.33437 8.75 4.75V8.25C8.75 8.66562 8.41562 9 8 9C7.58437 9 7.25 8.66562 7.25 8.25V4.75C7.25 4.33437 7.58437 4 8 4ZM9 11C9 11.5531 8.55313 12 8 12C7.44688 12 7 11.5531 7 11C7 10.4469 7.44688 10 8 10C8.55313 10 9 10.4469 9 11Z" fill="#F2F2F2"/>\n ',t}const Of={all:{color:"black",margin:"0"},1:{color:"white",fontSize:"var(--font-size-4xl)",fontWeight:"var(--font-weight-bold)"},2:{color:"white",fontSize:"var(--font-size-2xl)",fontWeight:"var(--font-weight-semibold)"},3:{color:"white",fontSize:"var(--font-size-xl)",fontWeight:"var(--font-weight-medium)"},4:{fontSize:"var(--font-size-lg)",fontWeight:"var(--font-weight-regular)"},5:{fontSize:"var(--font-size-md)",fontWeight:"var(--font-weight-light)"},6:{fontSize:"var(--font-size-sm)",fontWeight:"var(--font-weight-light)"}},Rf=t=>{let{text:e,level:r=1,style:n={},id:i,testid:a}=t;const s=tf({tagName:`h${r}`,style:o(o(o({},Of.all),Of[r]),n),id:i,testid:a});return s.textContent=e,s.id=i,s};var Mf,Nf={};let kf=null;try{kf=(Mf||(Mf=1,function(t){function e(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}function n(e){t.defaults=e}t.defaults={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};const i={exec:()=>null};function a(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r="string"==typeof t?t:t.source;const n={replace:(t,e)=>{let o="string"==typeof e?e:e.source;return o=o.replace(s.caret,"$1"),r=r.replace(t,o),n},getRegex:()=>new RegExp(r,e)};return n}const s={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088F\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5C\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDC-\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7DC\uA7F1-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC\u{10000}-\u{1000B}\u{1000D}-\u{10026}\u{10028}-\u{1003A}\u{1003C}\u{1003D}\u{1003F}-\u{1004D}\u{10050}-\u{1005D}\u{10080}-\u{100FA}\u{10107}-\u{10133}\u{10140}-\u{10178}\u{1018A}\u{1018B}\u{10280}-\u{1029C}\u{102A0}-\u{102D0}\u{102E1}-\u{102FB}\u{10300}-\u{10323}\u{1032D}-\u{1034A}\u{10350}-\u{10375}\u{10380}-\u{1039D}\u{103A0}-\u{103C3}\u{103C8}-\u{103CF}\u{103D1}-\u{103D5}\u{10400}-\u{1049D}\u{104A0}-\u{104A9}\u{104B0}-\u{104D3}\u{104D8}-\u{104FB}\u{10500}-\u{10527}\u{10530}-\u{10563}\u{10570}-\u{1057A}\u{1057C}-\u{1058A}\u{1058C}-\u{10592}\u{10594}\u{10595}\u{10597}-\u{105A1}\u{105A3}-\u{105B1}\u{105B3}-\u{105B9}\u{105BB}\u{105BC}\u{105C0}-\u{105F3}\u{10600}-\u{10736}\u{10740}-\u{10755}\u{10760}-\u{10767}\u{10780}-\u{10785}\u{10787}-\u{107B0}\u{107B2}-\u{107BA}\u{10800}-\u{10805}\u{10808}\u{1080A}-\u{10835}\u{10837}\u{10838}\u{1083C}\u{1083F}-\u{10855}\u{10858}-\u{10876}\u{10879}-\u{1089E}\u{108A7}-\u{108AF}\u{108E0}-\u{108F2}\u{108F4}\u{108F5}\u{108FB}-\u{1091B}\u{10920}-\u{10939}\u{10940}-\u{10959}\u{10980}-\u{109B7}\u{109BC}-\u{109CF}\u{109D2}-\u{10A00}\u{10A10}-\u{10A13}\u{10A15}-\u{10A17}\u{10A19}-\u{10A35}\u{10A40}-\u{10A48}\u{10A60}-\u{10A7E}\u{10A80}-\u{10A9F}\u{10AC0}-\u{10AC7}\u{10AC9}-\u{10AE4}\u{10AEB}-\u{10AEF}\u{10B00}-\u{10B35}\u{10B40}-\u{10B55}\u{10B58}-\u{10B72}\u{10B78}-\u{10B91}\u{10BA9}-\u{10BAF}\u{10C00}-\u{10C48}\u{10C80}-\u{10CB2}\u{10CC0}-\u{10CF2}\u{10CFA}-\u{10D23}\u{10D30}-\u{10D39}\u{10D40}-\u{10D65}\u{10D6F}-\u{10D85}\u{10E60}-\u{10E7E}\u{10E80}-\u{10EA9}\u{10EB0}\u{10EB1}\u{10EC2}-\u{10EC7}\u{10F00}-\u{10F27}\u{10F30}-\u{10F45}\u{10F51}-\u{10F54}\u{10F70}-\u{10F81}\u{10FB0}-\u{10FCB}\u{10FE0}-\u{10FF6}\u{11003}-\u{11037}\u{11052}-\u{1106F}\u{11071}\u{11072}\u{11075}\u{11083}-\u{110AF}\u{110D0}-\u{110E8}\u{110F0}-\u{110F9}\u{11103}-\u{11126}\u{11136}-\u{1113F}\u{11144}\u{11147}\u{11150}-\u{11172}\u{11176}\u{11183}-\u{111B2}\u{111C1}-\u{111C4}\u{111D0}-\u{111DA}\u{111DC}\u{111E1}-\u{111F4}\u{11200}-\u{11211}\u{11213}-\u{1122B}\u{1123F}\u{11240}\u{11280}-\u{11286}\u{11288}\u{1128A}-\u{1128D}\u{1128F}-\u{1129D}\u{1129F}-\u{112A8}\u{112B0}-\u{112DE}\u{112F0}-\u{112F9}\u{11305}-\u{1130C}\u{1130F}\u{11310}\u{11313}-\u{11328}\u{1132A}-\u{11330}\u{11332}\u{11333}\u{11335}-\u{11339}\u{1133D}\u{11350}\u{1135D}-\u{11361}\u{11380}-\u{11389}\u{1138B}\u{1138E}\u{11390}-\u{113B5}\u{113B7}\u{113D1}\u{113D3}\u{11400}-\u{11434}\u{11447}-\u{1144A}\u{11450}-\u{11459}\u{1145F}-\u{11461}\u{11480}-\u{114AF}\u{114C4}\u{114C5}\u{114C7}\u{114D0}-\u{114D9}\u{11580}-\u{115AE}\u{115D8}-\u{115DB}\u{11600}-\u{1162F}\u{11644}\u{11650}-\u{11659}\u{11680}-\u{116AA}\u{116B8}\u{116C0}-\u{116C9}\u{116D0}-\u{116E3}\u{11700}-\u{1171A}\u{11730}-\u{1173B}\u{11740}-\u{11746}\u{11800}-\u{1182B}\u{118A0}-\u{118F2}\u{118FF}-\u{11906}\u{11909}\u{1190C}-\u{11913}\u{11915}\u{11916}\u{11918}-\u{1192F}\u{1193F}\u{11941}\u{11950}-\u{11959}\u{119A0}-\u{119A7}\u{119AA}-\u{119D0}\u{119E1}\u{119E3}\u{11A00}\u{11A0B}-\u{11A32}\u{11A3A}\u{11A50}\u{11A5C}-\u{11A89}\u{11A9D}\u{11AB0}-\u{11AF8}\u{11BC0}-\u{11BE0}\u{11BF0}-\u{11BF9}\u{11C00}-\u{11C08}\u{11C0A}-\u{11C2E}\u{11C40}\u{11C50}-\u{11C6C}\u{11C72}-\u{11C8F}\u{11D00}-\u{11D06}\u{11D08}\u{11D09}\u{11D0B}-\u{11D30}\u{11D46}\u{11D50}-\u{11D59}\u{11D60}-\u{11D65}\u{11D67}\u{11D68}\u{11D6A}-\u{11D89}\u{11D98}\u{11DA0}-\u{11DA9}\u{11DB0}-\u{11DDB}\u{11DE0}-\u{11DE9}\u{11EE0}-\u{11EF2}\u{11F02}\u{11F04}-\u{11F10}\u{11F12}-\u{11F33}\u{11F50}-\u{11F59}\u{11FB0}\u{11FC0}-\u{11FD4}\u{12000}-\u{12399}\u{12400}-\u{1246E}\u{12480}-\u{12543}\u{12F90}-\u{12FF0}\u{13000}-\u{1342F}\u{13441}-\u{13446}\u{13460}-\u{143FA}\u{14400}-\u{14646}\u{16100}-\u{1611D}\u{16130}-\u{16139}\u{16800}-\u{16A38}\u{16A40}-\u{16A5E}\u{16A60}-\u{16A69}\u{16A70}-\u{16ABE}\u{16AC0}-\u{16AC9}\u{16AD0}-\u{16AED}\u{16B00}-\u{16B2F}\u{16B40}-\u{16B43}\u{16B50}-\u{16B59}\u{16B5B}-\u{16B61}\u{16B63}-\u{16B77}\u{16B7D}-\u{16B8F}\u{16D40}-\u{16D6C}\u{16D70}-\u{16D79}\u{16E40}-\u{16E96}\u{16EA0}-\u{16EB8}\u{16EBB}-\u{16ED3}\u{16F00}-\u{16F4A}\u{16F50}\u{16F93}-\u{16F9F}\u{16FE0}\u{16FE1}\u{16FE3}\u{16FF2}-\u{16FF6}\u{17000}-\u{18CD5}\u{18CFF}-\u{18D1E}\u{18D80}-\u{18DF2}\u{1AFF0}-\u{1AFF3}\u{1AFF5}-\u{1AFFB}\u{1AFFD}\u{1AFFE}\u{1B000}-\u{1B122}\u{1B132}\u{1B150}-\u{1B152}\u{1B155}\u{1B164}-\u{1B167}\u{1B170}-\u{1B2FB}\u{1BC00}-\u{1BC6A}\u{1BC70}-\u{1BC7C}\u{1BC80}-\u{1BC88}\u{1BC90}-\u{1BC99}\u{1CCF0}-\u{1CCF9}\u{1D2C0}-\u{1D2D3}\u{1D2E0}-\u{1D2F3}\u{1D360}-\u{1D378}\u{1D400}-\u{1D454}\u{1D456}-\u{1D49C}\u{1D49E}\u{1D49F}\u{1D4A2}\u{1D4A5}\u{1D4A6}\u{1D4A9}-\u{1D4AC}\u{1D4AE}-\u{1D4B9}\u{1D4BB}\u{1D4BD}-\u{1D4C3}\u{1D4C5}-\u{1D505}\u{1D507}-\u{1D50A}\u{1D50D}-\u{1D514}\u{1D516}-\u{1D51C}\u{1D51E}-\u{1D539}\u{1D53B}-\u{1D53E}\u{1D540}-\u{1D544}\u{1D546}\u{1D54A}-\u{1D550}\u{1D552}-\u{1D6A5}\u{1D6A8}-\u{1D6C0}\u{1D6C2}-\u{1D6DA}\u{1D6DC}-\u{1D6FA}\u{1D6FC}-\u{1D714}\u{1D716}-\u{1D734}\u{1D736}-\u{1D74E}\u{1D750}-\u{1D76E}\u{1D770}-\u{1D788}\u{1D78A}-\u{1D7A8}\u{1D7AA}-\u{1D7C2}\u{1D7C4}-\u{1D7CB}\u{1D7CE}-\u{1D7FF}\u{1DF00}-\u{1DF1E}\u{1DF25}-\u{1DF2A}\u{1E030}-\u{1E06D}\u{1E100}-\u{1E12C}\u{1E137}-\u{1E13D}\u{1E140}-\u{1E149}\u{1E14E}\u{1E290}-\u{1E2AD}\u{1E2C0}-\u{1E2EB}\u{1E2F0}-\u{1E2F9}\u{1E4D0}-\u{1E4EB}\u{1E4F0}-\u{1E4F9}\u{1E5D0}-\u{1E5ED}\u{1E5F0}-\u{1E5FA}\u{1E6C0}-\u{1E6DE}\u{1E6E0}-\u{1E6E2}\u{1E6E4}\u{1E6E5}\u{1E6E7}-\u{1E6ED}\u{1E6F0}-\u{1E6F4}\u{1E6FE}\u{1E6FF}\u{1E7E0}-\u{1E7E6}\u{1E7E8}-\u{1E7EB}\u{1E7ED}\u{1E7EE}\u{1E7F0}-\u{1E7FE}\u{1E800}-\u{1E8C4}\u{1E8C7}-\u{1E8CF}\u{1E900}-\u{1E943}\u{1E94B}\u{1E950}-\u{1E959}\u{1EC71}-\u{1ECAB}\u{1ECAD}-\u{1ECAF}\u{1ECB1}-\u{1ECB4}\u{1ED01}-\u{1ED2D}\u{1ED2F}-\u{1ED3D}\u{1EE00}-\u{1EE03}\u{1EE05}-\u{1EE1F}\u{1EE21}\u{1EE22}\u{1EE24}\u{1EE27}\u{1EE29}-\u{1EE32}\u{1EE34}-\u{1EE37}\u{1EE39}\u{1EE3B}\u{1EE42}\u{1EE47}\u{1EE49}\u{1EE4B}\u{1EE4D}-\u{1EE4F}\u{1EE51}\u{1EE52}\u{1EE54}\u{1EE57}\u{1EE59}\u{1EE5B}\u{1EE5D}\u{1EE5F}\u{1EE61}\u{1EE62}\u{1EE64}\u{1EE67}-\u{1EE6A}\u{1EE6C}-\u{1EE72}\u{1EE74}-\u{1EE77}\u{1EE79}-\u{1EE7C}\u{1EE7E}\u{1EE80}-\u{1EE89}\u{1EE8B}-\u{1EE9B}\u{1EEA1}-\u{1EEA3}\u{1EEA5}-\u{1EEA9}\u{1EEAB}-\u{1EEBB}\u{1F100}-\u{1F10C}\u{1FBF0}-\u{1FBF9}\u{20000}-\u{2A6DF}\u{2A700}-\u{2B81D}\u{2B820}-\u{2CEAD}\u{2CEB0}-\u{2EBE0}\u{2EBF0}-\u{2EE5D}\u{2F800}-\u{2FA1D}\u{30000}-\u{3134A}\u{31350}-\u{33479}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[\t ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},u=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,c=/(?:[*+-]|\d{1,9}[.)])/,l=a(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,c).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),d=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,h=/(?!\s*\])(?:\\.|[^\[\]\\])+/,f=a(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",h).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),p=a(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,c).getRegex(),g="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",m=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,y=a("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",m).replace("tag",g).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),w=a(d).replace("hr",u).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",g).getRegex(),_={blockquote:a(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",w).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:f,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:u,html:y,lheading:l,list:p,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:w,table:i,text:/^[^\n]+/},v=a("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",u).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",g).getRegex(),E=o(o({},_),{},{table:v,paragraph:a(d).replace("hr",u).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",v).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",g).getRegex()}),b=o(o({},_),{},{html:a("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",m).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:i,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:a(d).replace("hr",u).replace("heading"," *#{1,6} *[^\n]").replace("lheading",l).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()}),A=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,C=/^( {2,}|\\)\n(?!\s*$)/,I="\\p{P}\\p{S}",S=a(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,I).getRegex(),T=a(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,I).getRegex(),D=a("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,I).getRegex(),O=a("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,I).getRegex(),R=a(/\\([punct])/,"gu").replace(/punct/g,I).getRegex(),M=a(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),N=a(m).replace("(?:--\x3e|$)","--\x3e").getRegex(),k=a("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",N).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),x=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,P=a(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",x).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),B=a(/^!?\[(label)\]\[(ref)\]/).replace("label",x).replace("ref",h).getRegex(),F=a(/^!?\[(ref)\](?:\[\])?/).replace("ref",h).getRegex(),L={_backpedal:i,anyPunctuation:R,autolink:M,blockSkip:/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,br:C,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:i,emStrongLDelim:T,emStrongRDelimAst:D,emStrongRDelimUnd:O,escape:A,link:P,nolink:F,punctuation:S,reflink:B,reflinkSearch:a("reflink|nolink(?!\\()","g").replace("reflink",B).replace("nolink",F).getRegex(),tag:k,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:i},z=o(o({},L),{},{link:a(/^!?\[(label)\]\((.*?)\)/).replace("label",x).getRegex(),reflink:a(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",x).getRegex()}),U=o(o({},L),{},{escape:a(A).replace("])","~|])").getRegex(),url:a(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/}),V=o(o({},U),{},{br:a(C).replace("{2,}","*").getRegex(),text:a(U.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()}),H={normal:_,gfm:E,pedantic:b},j={normal:L,gfm:U,breaks:V,pedantic:z},G={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},W=t=>G[t];function X(t,e){if(e){if(s.escapeTest.test(t))return t.replace(s.escapeReplace,W)}else if(s.escapeTestNoEncode.test(t))return t.replace(s.escapeReplaceNoEncode,W);return t}function Y(t){try{t=encodeURI(t).replace(s.percentDecode,"%")}catch(t){return null}return t}function Z(t,e){const r=t.replace(s.findPipe,((t,e,r)=>{let n=!1,o=e;for(;--o>=0&&"\\"===r[o];)n=!n;return n?"|":" |"})).split(s.splitPipe);let n=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),e)if(r.length>e)r.splice(e);else for(;r.length<e;)r.push("");for(;n<r.length;n++)r[n]=r[n].trim().replace(s.slashPipe,"|");return r}function q(t,e,r){const n=t.length;if(0===n)return"";let o=0;for(;o<n;){const i=t.charAt(n-o-1);if(i!==e||r){if(i===e||!r)break;o++}else o++}return t.slice(0,n-o)}function K(t,e,r,n,o){const i=e.href,a=e.title||null,s=t[1].replace(o.other.outputLinkReplace,"$1");if("!"!==t[0].charAt(0)){n.state.inLink=!0;const t={type:"link",raw:r,href:i,title:a,text:s,tokens:n.inlineTokens(s)};return n.state.inLink=!1,t}return{type:"image",raw:r,href:i,title:a,text:s}}class ${constructor(e){r(this,"options",void 0),r(this,"rules",void 0),r(this,"lexer",void 0),this.options=e||t.defaults}space(t){const e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){const e=this.rules.block.code.exec(t);if(e){const t=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:q(t,"\n")}}}fences(t){const e=this.rules.block.fences.exec(t);if(e){const t=e[0],r=function(t,e,r){const n=t.match(r.other.indentCodeCompensation);if(null===n)return e;const o=n[1];return e.split("\n").map((t=>{const e=t.match(r.other.beginningSpace);if(null===e)return t;const[n]=e;return n.length>=o.length?t.slice(o.length):t})).join("\n")}(t,e[3]||"",this.rules);return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:r}}}heading(t){const e=this.rules.block.heading.exec(t);if(e){let t=e[2].trim();if(this.rules.other.endingHash.test(t)){const e=q(t,"#");this.options.pedantic?t=e.trim():e&&!this.rules.other.endingSpaceChar.test(e)||(t=e.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(t){const e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:q(e[0],"\n")}}blockquote(t){const e=this.rules.block.blockquote.exec(t);if(e){let t=q(e[0],"\n").split("\n"),r="",n="";const o=[];for(;t.length>0;){let e=!1;const i=[];let a;for(a=0;a<t.length;a++)if(this.rules.other.blockquoteStart.test(t[a]))i.push(t[a]),e=!0;else{if(e)break;i.push(t[a])}t=t.slice(a);const s=i.join("\n"),u=s.replace(this.rules.other.blockquoteSetextReplace,"\n $1").replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}\n${s}`:s,n=n?`${n}\n${u}`:u;const c=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(u,o,!0),this.lexer.state.top=c,0===t.length)break;const l=o[o.length-1];if("code"===(null==l?void 0:l.type))break;if("blockquote"===(null==l?void 0:l.type)){const e=l,i=e.raw+"\n"+t.join("\n"),a=this.blockquote(i);o[o.length-1]=a,r=r.substring(0,r.length-e.raw.length)+a.raw,n=n.substring(0,n.length-e.text.length)+a.text;break}if("list"!==(null==l?void 0:l.type));else{const e=l,i=e.raw+"\n"+t.join("\n"),a=this.list(i);o[o.length-1]=a,r=r.substring(0,r.length-l.raw.length)+a.raw,n=n.substring(0,n.length-e.raw.length)+a.raw,t=i.substring(o[o.length-1].raw.length).split("\n")}}return{type:"blockquote",raw:r,tokens:o,text:n}}}list(t){let e=this.rules.block.list.exec(t);if(e){let r=e[1].trim();const n=r.length>1,o={type:"list",raw:"",ordered:n,start:n?+r.slice(0,-1):"",loose:!1,items:[]};r=n?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=n?r:"[*+-]");const i=this.rules.other.listItemRegex(r);let a=!1;for(;t;){let r=!1,n="",s="";if(!(e=i.exec(t)))break;if(this.rules.block.hr.test(t))break;n=e[0],t=t.substring(n.length);let u=e[2].split("\n",1)[0].replace(this.rules.other.listReplaceTabs,(t=>" ".repeat(3*t.length))),c=t.split("\n",1)[0],l=!u.trim(),d=0;if(this.options.pedantic?(d=2,s=u.trimStart()):l?d=e[1].length+1:(d=e[2].search(this.rules.other.nonSpaceChar),d=d>4?1:d,s=u.slice(d),d+=e[1].length),l&&this.rules.other.blankLine.test(c)&&(n+=c+"\n",t=t.substring(c.length+1),r=!0),!r){const e=this.rules.other.nextBulletRegex(d),r=this.rules.other.hrRegex(d),o=this.rules.other.fencesBeginRegex(d),i=this.rules.other.headingBeginRegex(d),a=this.rules.other.htmlBeginRegex(d);for(;t;){const h=t.split("\n",1)[0];let f;if(c=h,this.options.pedantic?(c=c.replace(this.rules.other.listReplaceNesting," "),f=c):f=c.replace(this.rules.other.tabCharGlobal," "),o.test(c))break;if(i.test(c))break;if(a.test(c))break;if(e.test(c))break;if(r.test(c))break;if(f.search(this.rules.other.nonSpaceChar)>=d||!c.trim())s+="\n"+f.slice(d);else{if(l)break;if(u.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4)break;if(o.test(u))break;if(i.test(u))break;if(r.test(u))break;s+="\n"+c}l||c.trim()||(l=!0),n+=h+"\n",t=t.substring(h.length+1),u=f.slice(d)}}o.loose||(a?o.loose=!0:this.rules.other.doubleBlankLine.test(n)&&(a=!0));let h,f=null;this.options.gfm&&(f=this.rules.other.listIsTask.exec(s),f&&(h="[ ] "!==f[0],s=s.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:n,task:!!f,checked:h,loose:!1,text:s,tokens:[]}),o.raw+=n}o.items[o.items.length-1].raw=o.items[o.items.length-1].raw.trimEnd(),o.items[o.items.length-1].text=o.items[o.items.length-1].text.trimEnd(),o.raw=o.raw.trimEnd();for(let t=0;t<o.items.length;t++)if(this.lexer.state.top=!1,o.items[t].tokens=this.lexer.blockTokens(o.items[t].text,[]),!o.loose){const e=o.items[t].tokens.filter((t=>"space"===t.type)),r=e.length>0&&e.some((t=>this.rules.other.anyLine.test(t.raw)));o.loose=r}if(o.loose)for(let t=0;t<o.items.length;t++)o.items[t].loose=!0;return o}}html(t){const e=this.rules.block.html.exec(t);if(e)return{type:"html",block:!0,raw:e[0],pre:"pre"===e[1]||"script"===e[1]||"style"===e[1],text:e[0]}}def(t){const e=this.rules.block.def.exec(t);if(e){const t=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",n=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:e[0],href:r,title:n}}}table(t){const e=this.rules.block.table.exec(t);if(!e)return;if(!this.rules.other.tableDelimiter.test(e[2]))return;const r=Z(e[1]),n=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=e[3]&&e[3].trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split("\n"):[],i={type:"table",raw:e[0],header:[],align:[],rows:[]};if(r.length===n.length){for(const t of n)this.rules.other.tableAlignRight.test(t)?i.align.push("right"):this.rules.other.tableAlignCenter.test(t)?i.align.push("center"):this.rules.other.tableAlignLeft.test(t)?i.align.push("left"):i.align.push(null);for(let t=0;t<r.length;t++)i.header.push({text:r[t],tokens:this.lexer.inline(r[t]),header:!0,align:i.align[t]});for(const t of o)i.rows.push(Z(t,i.header.length).map(((t,e)=>({text:t,tokens:this.lexer.inline(t),header:!1,align:i.align[e]}))));return i}}lheading(t){const e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:"="===e[2].charAt(0)?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(t){const e=this.rules.block.paragraph.exec(t);if(e){const t="\n"===e[1].charAt(e[1].length-1)?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(t){const e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){const e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){const e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){const e=this.rules.inline.link.exec(t);if(e){const t=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(t)){if(!this.rules.other.endAngleBracket.test(t))return;const e=q(t.slice(0,-1),"\\");if((t.length-e.length)%2==0)return}else{const t=function(t,e){if(-1===t.indexOf(e[1]))return-1;let r=0;for(let n=0;n<t.length;n++)if("\\"===t[n])n++;else if(t[n]===e[0])r++;else if(t[n]===e[1]&&(r--,r<0))return n;return-1}(e[2],"()");if(t>-1){const r=(0===e[0].indexOf("!")?5:4)+e[1].length+t;e[2]=e[2].substring(0,t),e[0]=e[0].substring(0,r).trim(),e[3]=""}}let r=e[2],n="";if(this.options.pedantic){const t=this.rules.other.pedanticHrefTitle.exec(r);t&&(r=t[1],n=t[3])}else n=e[3]?e[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(r=this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?r.slice(1):r.slice(1,-1)),K(e,{href:r?r.replace(this.rules.inline.anyPunctuation,"$1"):r,title:n?n.replace(this.rules.inline.anyPunctuation,"$1"):n},e[0],this.lexer,this.rules)}}reflink(t,e){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){const t=e[(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!t){const t=r[0].charAt(0);return{type:"text",raw:t,text:t}}return K(r,t,r[0],this.lexer,this.rules)}}emStrong(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",n=this.rules.inline.emStrongLDelim.exec(t);if(n&&(!n[3]||!r.match(this.rules.other.unicodeAlphaNumeric))&&(!n[1]&&!n[2]||!r||this.rules.inline.punctuation.exec(r))){const r=[...n[0]].length-1;let o,i,a=r,s=0;const u="*"===n[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(u.lastIndex=0,e=e.slice(-1*t.length+r);null!=(n=u.exec(e));){if(o=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!o)continue;if(i=[...o].length,n[3]||n[4]){a+=i;continue}if((n[5]||n[6])&&r%3&&!((r+i)%3)){s+=i;continue}if(a-=i,a>0)continue;i=Math.min(i,i+a+s);const e=[...n[0]][0].length,u=t.slice(0,r+n.index+e+i);if(Math.min(r,i)%2){const t=u.slice(1,-1);return{type:"em",raw:u,text:t,tokens:this.lexer.inlineTokens(t)}}const c=u.slice(2,-2);return{type:"strong",raw:u,text:c,tokens:this.lexer.inlineTokens(c)}}}}codespan(t){const e=this.rules.inline.code.exec(t);if(e){let t=e[2].replace(this.rules.other.newLineCharGlobal," ");const r=this.rules.other.nonSpaceChar.test(t),n=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return r&&n&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:e[0],text:t}}}br(t){const e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){const e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){const e=this.rules.inline.autolink.exec(t);if(e){let t,r;return"@"===e[2]?(t=e[1],r="mailto:"+t):(t=e[1],r=t),{type:"link",raw:e[0],text:t,href:r,tokens:[{type:"text",raw:t,text:t}]}}}url(t){let e;if(e=this.rules.inline.url.exec(t)){let t,o;if("@"===e[2])t=e[0],o="mailto:"+t;else{let i;do{var r,n;i=e[0],e[0]=null!==(r=null===(n=this.rules.inline._backpedal.exec(e[0]))||void 0===n?void 0:n[0])&&void 0!==r?r:""}while(i!==e[0]);t=e[0],o="www."===e[1]?"http://"+e[0]:e[0]}return{type:"link",raw:e[0],text:t,href:o,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(t){const e=this.rules.inline.text.exec(t);if(e){const t=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:t}}}}class J{constructor(e){r(this,"tokens",void 0),r(this,"options",void 0),r(this,"state",void 0),r(this,"tokenizer",void 0),r(this,"inlineQueue",void 0),this.tokens=[],this.tokens.links=Object.create(null),this.options=e||t.defaults,this.options.tokenizer=this.options.tokenizer||new $,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const n={other:s,block:H.normal,inline:j.normal};this.options.pedantic?(n.block=H.pedantic,n.inline=j.pedantic):this.options.gfm&&(n.block=H.gfm,this.options.breaks?n.inline=j.breaks:n.inline=j.gfm),this.tokenizer.rules=n}static get rules(){return{block:H,inline:j}}static lex(t,e){return new J(e).lex(t)}static lexInline(t,e){return new J(e).inlineTokens(t)}lex(t){t=t.replace(s.carriageReturn,"\n"),this.blockTokens(t,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){const e=this.inlineQueue[t];this.inlineTokens(e.src,e.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t){let e,r,n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];for(this.options.pedantic&&(t=t.replace(s.tabCharGlobal," ").replace(s.spaceLine,""));t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((r=>!!(e=r.call({lexer:this},t,o))&&(t=t.substring(e.raw.length),o.push(e),!0)))))if(e=this.tokenizer.space(t))t=t.substring(e.raw.length),1===e.raw.length&&o.length>0?o[o.length-1].raw+="\n":o.push(e);else if(e=this.tokenizer.code(t))t=t.substring(e.raw.length),r=o[o.length-1],!r||"paragraph"!==r.type&&"text"!==r.type?o.push(e):(r.raw+="\n"+e.raw,r.text+="\n"+e.text,this.inlineQueue[this.inlineQueue.length-1].src=r.text);else if(e=this.tokenizer.fences(t))t=t.substring(e.raw.length),o.push(e);else if(e=this.tokenizer.heading(t))t=t.substring(e.raw.length),o.push(e);else if(e=this.tokenizer.hr(t))t=t.substring(e.raw.length),o.push(e);else if(e=this.tokenizer.blockquote(t))t=t.substring(e.raw.length),o.push(e);else if(e=this.tokenizer.list(t))t=t.substring(e.raw.length),o.push(e);else if(e=this.tokenizer.html(t))t=t.substring(e.raw.length),o.push(e);else if(e=this.tokenizer.def(t))t=t.substring(e.raw.length),r=o[o.length-1],!r||"paragraph"!==r.type&&"text"!==r.type?this.tokens.links[e.tag]||(this.tokens.links[e.tag]={href:e.href,title:e.title}):(r.raw+="\n"+e.raw,r.text+="\n"+e.raw,this.inlineQueue[this.inlineQueue.length-1].src=r.text);else if(e=this.tokenizer.table(t))t=t.substring(e.raw.length),o.push(e);else if(e=this.tokenizer.lheading(t))t=t.substring(e.raw.length),o.push(e);else{var a;if(n=t,this.options.extensions&&this.options.extensions.startBlock){let e=1/0;const r=t.slice(1);let o;this.options.extensions.startBlock.forEach((t=>{o=t.call({lexer:this},r),"number"==typeof o&&o>=0&&(e=Math.min(e,o))})),e<1/0&&e>=0&&(n=t.substring(0,e+1))}if(this.state.top&&(e=this.tokenizer.paragraph(n)))r=o[o.length-1],i&&"paragraph"===(null===(a=r)||void 0===a?void 0:a.type)?(r.raw+="\n"+e.raw,r.text+="\n"+e.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):o.push(e),i=n.length!==t.length,t=t.substring(e.raw.length);else if(e=this.tokenizer.text(t))t=t.substring(e.raw.length),r=o[o.length-1],r&&"text"===r.type?(r.raw+="\n"+e.raw,r.text+="\n"+e.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):o.push(e);else if(t){const e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}return this.state.top=!0,o}inline(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return this.inlineQueue.push({src:t,tokens:e}),e}inlineTokens(t){let e,r,n,o,i,a,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],u=t;if(this.tokens.links){const t=Object.keys(this.tokens.links);if(t.length>0)for(;null!=(o=this.tokenizer.rules.inline.reflinkSearch.exec(u));)t.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(u=u.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+u.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(o=this.tokenizer.rules.inline.blockSkip.exec(u));)u=u.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+u.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(o=this.tokenizer.rules.inline.anyPunctuation.exec(u));)u=u.slice(0,o.index)+"++"+u.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;t;)if(i||(a=""),i=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((r=>!!(e=r.call({lexer:this},t,s))&&(t=t.substring(e.raw.length),s.push(e),!0)))))if(e=this.tokenizer.escape(t))t=t.substring(e.raw.length),s.push(e);else if(e=this.tokenizer.tag(t))t=t.substring(e.raw.length),r=s[s.length-1],s.push(e);else if(e=this.tokenizer.link(t))t=t.substring(e.raw.length),s.push(e);else if(e=this.tokenizer.reflink(t,this.tokens.links))t=t.substring(e.raw.length),r=s[s.length-1],r&&"text"===e.type&&"text"===r.type?(r.raw+=e.raw,r.text+=e.text):s.push(e);else if(e=this.tokenizer.emStrong(t,u,a))t=t.substring(e.raw.length),s.push(e);else if(e=this.tokenizer.codespan(t))t=t.substring(e.raw.length),s.push(e);else if(e=this.tokenizer.br(t))t=t.substring(e.raw.length),s.push(e);else if(e=this.tokenizer.del(t))t=t.substring(e.raw.length),s.push(e);else if(e=this.tokenizer.autolink(t))t=t.substring(e.raw.length),s.push(e);else if(this.state.inLink||!(e=this.tokenizer.url(t))){if(n=t,this.options.extensions&&this.options.extensions.startInline){let e=1/0;const r=t.slice(1);let o;this.options.extensions.startInline.forEach((t=>{o=t.call({lexer:this},r),"number"==typeof o&&o>=0&&(e=Math.min(e,o))})),e<1/0&&e>=0&&(n=t.substring(0,e+1))}if(e=this.tokenizer.inlineText(n))t=t.substring(e.raw.length),"_"!==e.raw.slice(-1)&&(a=e.raw.slice(-1)),i=!0,r=s[s.length-1],r&&"text"===r.type?(r.raw+=e.raw,r.text+=e.text):s.push(e);else if(t){const e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}else t=t.substring(e.raw.length),s.push(e);return s}}class Q{constructor(e){r(this,"options",void 0),r(this,"parser",void 0),this.options=e||t.defaults}space(t){return""}code(t){var e;let{text:r,lang:n,escaped:o}=t;const i=null===(e=(n||"").match(s.notSpaceStart))||void 0===e?void 0:e[0],a=r.replace(s.endingNewline,"")+"\n";return i?'<pre><code class="language-'+X(i)+'">'+(o?a:X(a,!0))+"</code></pre>\n":"<pre><code>"+(o?a:X(a,!0))+"</code></pre>\n"}blockquote(t){let{tokens:e}=t;return`<blockquote>\n${this.parser.parse(e)}</blockquote>\n`}html(t){let{text:e}=t;return e}heading(t){let{tokens:e,depth:r}=t;return`<h${r}>${this.parser.parseInline(e)}</h${r}>\n`}hr(t){return"<hr>\n"}list(t){const e=t.ordered,r=t.start;let n="";for(let e=0;e<t.items.length;e++){const r=t.items[e];n+=this.listitem(r)}const o=e?"ol":"ul";return"<"+o+(e&&1!==r?' start="'+r+'"':"")+">\n"+n+"</"+o+">\n"}listitem(t){let e="";if(t.task){const r=this.checkbox({checked:!!t.checked});t.loose?t.tokens.length>0&&"paragraph"===t.tokens[0].type?(t.tokens[0].text=r+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&"text"===t.tokens[0].tokens[0].type&&(t.tokens[0].tokens[0].text=r+" "+X(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:r+" ",text:r+" ",escaped:!0}):e+=r+" "}return e+=this.parser.parse(t.tokens,!!t.loose),`<li>${e}</li>\n`}checkbox(t){let{checked:e}=t;return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph(t){let{tokens:e}=t;return`<p>${this.parser.parseInline(e)}</p>\n`}table(t){let e="",r="";for(let e=0;e<t.header.length;e++)r+=this.tablecell(t.header[e]);e+=this.tablerow({text:r});let n="";for(let e=0;e<t.rows.length;e++){const o=t.rows[e];r="";for(let t=0;t<o.length;t++)r+=this.tablecell(o[t]);n+=this.tablerow({text:r})}return n&&(n=`<tbody>${n}</tbody>`),"<table>\n<thead>\n"+e+"</thead>\n"+n+"</table>\n"}tablerow(t){let{text:e}=t;return`<tr>\n${e}</tr>\n`}tablecell(t){const e=this.parser.parseInline(t.tokens),r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+e+`</${r}>\n`}strong(t){let{tokens:e}=t;return`<strong>${this.parser.parseInline(e)}</strong>`}em(t){let{tokens:e}=t;return`<em>${this.parser.parseInline(e)}</em>`}codespan(t){let{text:e}=t;return`<code>${X(e,!0)}</code>`}br(t){return"<br>"}del(t){let{tokens:e}=t;return`<del>${this.parser.parseInline(e)}</del>`}link(t){let{href:e,title:r,tokens:n}=t;const o=this.parser.parseInline(n),i=Y(e);if(null===i)return o;let a='<a href="'+(e=i)+'"';return r&&(a+=' title="'+X(r)+'"'),a+=">"+o+"</a>",a}image(t){let{href:e,title:r,text:n}=t;const o=Y(e);if(null===o)return X(n);let i=`<img src="${e=o}" alt="${n}"`;return r&&(i+=` title="${X(r)}"`),i+=">",i}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:X(t.text)}}class tt{strong(t){let{text:e}=t;return e}em(t){let{text:e}=t;return e}codespan(t){let{text:e}=t;return e}del(t){let{text:e}=t;return e}html(t){let{text:e}=t;return e}text(t){let{text:e}=t;return e}link(t){let{text:e}=t;return""+e}image(t){let{text:e}=t;return""+e}br(){return""}}class et{constructor(e){r(this,"options",void 0),r(this,"renderer",void 0),r(this,"textRenderer",void 0),this.options=e||t.defaults,this.options.renderer=this.options.renderer||new Q,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new tt}static parse(t,e){return new et(e).parse(t)}static parseInline(t,e){return new et(e).parseInline(t)}parse(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r="";for(let n=0;n<t.length;n++){const o=t[n];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[o.type]){const t=o,e=this.options.extensions.renderers[t.type].call({parser:this},t);if(!1!==e||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(t.type)){r+=e||"";continue}}const i=o;switch(i.type){case"space":r+=this.renderer.space(i);continue;case"hr":r+=this.renderer.hr(i);continue;case"heading":r+=this.renderer.heading(i);continue;case"code":r+=this.renderer.code(i);continue;case"table":r+=this.renderer.table(i);continue;case"blockquote":r+=this.renderer.blockquote(i);continue;case"list":r+=this.renderer.list(i);continue;case"html":r+=this.renderer.html(i);continue;case"paragraph":r+=this.renderer.paragraph(i);continue;case"text":{let o=i,a=this.renderer.text(o);for(;n+1<t.length&&"text"===t[n+1].type;)o=t[++n],a+="\n"+this.renderer.text(o);r+=e?this.renderer.paragraph({type:"paragraph",raw:a,text:a,tokens:[{type:"text",raw:a,text:a,escaped:!0}]}):a;continue}default:{const t='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(t),"";throw new Error(t)}}}return r}parseInline(t,e){e=e||this.renderer;let r="";for(let n=0;n<t.length;n++){const o=t[n];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[o.type]){const t=this.options.extensions.renderers[o.type].call({parser:this},o);if(!1!==t||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){r+=t||"";continue}}const i=o;switch(i.type){case"escape":case"text":r+=e.text(i);break;case"html":r+=e.html(i);break;case"link":r+=e.link(i);break;case"image":r+=e.image(i);break;case"strong":r+=e.strong(i);break;case"em":r+=e.em(i);break;case"codespan":r+=e.codespan(i);break;case"br":r+=e.br(i);break;case"del":r+=e.del(i);break;default:{const t='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(t),"";throw new Error(t)}}}return r}}class rt{constructor(e){r(this,"options",void 0),r(this,"block",void 0),this.options=e||t.defaults}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}provideLexer(){return this.block?J.lex:J.lexInline}provideParser(){return this.block?et.parse:et.parseInline}}r(rt,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"]));class nt{constructor(){r(this,"defaults",{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}),r(this,"options",this.setOptions),r(this,"parse",this.parseMarkdown(!0)),r(this,"parseInline",this.parseMarkdown(!1)),r(this,"Parser",et),r(this,"Renderer",Q),r(this,"TextRenderer",tt),r(this,"Lexer",J),r(this,"Tokenizer",$),r(this,"Hooks",rt),this.use(...arguments)}walkTokens(t,e){let r=[];for(const o of t)switch(r=r.concat(e.call(this,o)),o.type){case"table":{const t=o;for(const n of t.header)r=r.concat(this.walkTokens(n.tokens,e));for(const n of t.rows)for(const t of n)r=r.concat(this.walkTokens(t.tokens,e));break}case"list":{const t=o;r=r.concat(this.walkTokens(t.items,e));break}default:{var n;const t=o;null!==(n=this.defaults.extensions)&&void 0!==n&&null!==(n=n.childTokens)&&void 0!==n&&n[t.type]?this.defaults.extensions.childTokens[t.type].forEach((n=>{const o=t[n].flat(1/0);r=r.concat(this.walkTokens(o,e))})):t.tokens&&(r=r.concat(this.walkTokens(t.tokens,e)))}}return r}use(){const t=this.defaults.extensions||{renderers:{},childTokens:{}};for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return r.forEach((e=>{const r=o({},e);if(r.async=this.defaults.async||r.async||!1,e.extensions&&(e.extensions.forEach((e=>{if(!e.name)throw new Error("extension name required");if("renderer"in e){const r=t.renderers[e.name];t.renderers[e.name]=r?function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];let i=e.renderer.apply(this,n);return!1===i&&(i=r.apply(this,n)),i}:e.renderer}if("tokenizer"in e){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");const r=t[e.level];r?r.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&("block"===e.level?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:"inline"===e.level&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}"childTokens"in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)})),r.extensions=t),e.renderer){const t=this.defaults.renderer||new Q(this.defaults);for(const r in e.renderer){if(!(r in t))throw new Error(`renderer '${r}' does not exist`);if(["options","parser"].includes(r))continue;const n=r,o=e.renderer[n],i=t[n];t[n]=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];let a=o.apply(t,r);return!1===a&&(a=i.apply(t,r)),a||""}}r.renderer=t}if(e.tokenizer){const t=this.defaults.tokenizer||new $(this.defaults);for(const r in e.tokenizer){if(!(r in t))throw new Error(`tokenizer '${r}' does not exist`);if(["options","rules","lexer"].includes(r))continue;const n=r,o=e.tokenizer[n],i=t[n];t[n]=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];let a=o.apply(t,r);return!1===a&&(a=i.apply(t,r)),a}}r.tokenizer=t}if(e.hooks){const t=this.defaults.hooks||new rt;for(const r in e.hooks){if(!(r in t))throw new Error(`hook '${r}' does not exist`);if(["options","block"].includes(r))continue;const n=r,o=e.hooks[n],i=t[n];rt.passThroughHooks.has(r)?t[n]=e=>{if(this.defaults.async)return Promise.resolve(o.call(t,e)).then((e=>i.call(t,e)));const r=o.call(t,e);return i.call(t,r)}:t[n]=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];let a=o.apply(t,r);return!1===a&&(a=i.apply(t,r)),a}}r.hooks=t}if(e.walkTokens){const t=this.defaults.walkTokens,n=e.walkTokens;r.walkTokens=function(e){let r=[];return r.push(n.call(this,e)),t&&(r=r.concat(t.call(this,e))),r}}this.defaults=o(o({},this.defaults),r)})),this}setOptions(t){return this.defaults=o(o({},this.defaults),t),this}lexer(t,e){return J.lex(t,null!=e?e:this.defaults)}parser(t,e){return et.parse(t,null!=e?e:this.defaults)}parseMarkdown(t){return(e,r)=>{const n=o({},r),i=o(o({},this.defaults),n),a=this.onError(!!i.silent,!!i.async);if(!0===this.defaults.async&&!1===n.async)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(null==e)return a(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof e)return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));i.hooks&&(i.hooks.options=i,i.hooks.block=t);const s=i.hooks?i.hooks.provideLexer():t?J.lex:J.lexInline,u=i.hooks?i.hooks.provideParser():t?et.parse:et.parseInline;if(i.async)return Promise.resolve(i.hooks?i.hooks.preprocess(e):e).then((t=>s(t,i))).then((t=>i.hooks?i.hooks.processAllTokens(t):t)).then((t=>i.walkTokens?Promise.all(this.walkTokens(t,i.walkTokens)).then((()=>t)):t)).then((t=>u(t,i))).then((t=>i.hooks?i.hooks.postprocess(t):t)).catch(a);try{i.hooks&&(e=i.hooks.preprocess(e));let t=s(e,i);i.hooks&&(t=i.hooks.processAllTokens(t)),i.walkTokens&&this.walkTokens(t,i.walkTokens);let r=u(t,i);return i.hooks&&(r=i.hooks.postprocess(r)),r}catch(t){return a(t)}}}onError(t,e){return r=>{if(r.message+="\nPlease report this to https://github.com/markedjs/marked.",t){const t="<p>An error occurred:</p><pre>"+X(r.message+"",!0)+"</pre>";return e?Promise.resolve(t):t}if(e)return Promise.reject(r);throw r}}}const ot=new nt;function it(t,e){return ot.parse(t,e)}it.options=it.setOptions=function(t){return ot.setOptions(t),it.defaults=ot.defaults,n(it.defaults),it},it.getDefaults=e,it.defaults=t.defaults,it.use=function(){return ot.use(...arguments),it.defaults=ot.defaults,n(it.defaults),it},it.walkTokens=function(t,e){return ot.walkTokens(t,e)},it.parseInline=ot.parseInline,it.Parser=et,it.parser=et.parse,it.Renderer=Q,it.TextRenderer=tt,it.Lexer=J,it.lexer=J.lex,it.Tokenizer=$,it.Hooks=rt,it.parse=it;const at=it.options,st=it.setOptions,ut=it.use,ct=it.walkTokens,lt=it.parseInline,dt=it,ht=et.parse,ft=J.lex;t.Hooks=rt,t.Lexer=J,t.Marked=nt,t.Parser=et,t.Renderer=Q,t.TextRenderer=tt,t.Tokenizer=$,t.getDefaults=e,t.lexer=ft,t.marked=it,t.options=at,t.parse=dt,t.parseInline=lt,t.parser=ht,t.setOptions=st,t.use=ut,t.walkTokens=ct}(Nf)),Nf).marked}catch(t){console.log("marked is not supported",t)}const xf=kf,Pf=t=>{let{text:e,id:r,testid:n,clientHeight:o}=t;const i=!!o&&o<700,a=tf({tagName:"div",style:{position:"relative",zIndex:"2",width:"100%",minHeight:i?"48px":"70px",textAlign:"center",backgroundColor:"#262626",display:"flex",justifyContent:"center",alignItems:"center"},id:r,testid:n});return ef(a,Rf({text:e,level:i?6:5,style:{color:"white"}})),a};const Bf=t=>{let e;return e="document_front"===t?function(){const t=document.createElementNS("http://www.w3.org/2000/svg","svg");return t.setAttribute("id","front-document-animation"),t.setAttribute("viewBox","0 0 235 147"),t.setAttribute("preserveAspectRatio","xMidYMid meet"),t.innerHTML='\n <style>\n .s0 { opacity: .4;fill: #ffffff } \n .s1 { opacity: .4;fill: none;stroke: #6981ff;stroke-width: 2 } \n .s2 { opacity: .4;fill: #6981ff } \n .s3 { opacity: .4;fill: #c3cdff } \n .s4 { opacity: .4;fill: #f0f2ff } \n </style>\n <path class="s0" d="m229.43 3h-224.86c-2.21 0-4 1.79-4 4v130.14c0 2.21 1.79 4 4 4h224.86c2.21 0 4-1.79 4-4v-130.14c0-2.21-1.79-4-4-4z"/>\n <path class="s1" d="m229.43 4h-224.86c-1.66 0-3 1.34-3 3v130.14c0 1.65 1.34 3 3 3h224.86c1.66 0 3-1.35 3-3v-130.14c0-1.66-1.34-3-3-3z"/>\n <path class="s2" d="m1.56 5.99c0-1.11 0.89-2 2-2h225.9c1.1 0 1.99 0.89 1.99 2v17.73h-229.89z"/>\n <path class="s2" d="m59.77 76.46h-7.89c-5.45 0-9.87 4.42-9.87 9.87 0 1.08 0.89 1.97 1.98 1.97h23.68c1.09 0 1.97-0.88 1.97-1.97 0-5.45-4.42-9.87-9.87-9.87z"/>\n <path class="s2" d="m56.08 73.8c4.71 0 8.53-3.82 8.53-8.54 0-4.71-3.82-8.53-8.53-8.53-4.72 0-8.54 3.82-8.54 8.53 0 4.72 3.82 8.54 8.54 8.54z"/>\n <path class="s1" d="m43.99 50.36h-7.84c-2.21 0-4 1.79-4 4v7.84"/>\n <path class="s1" d="m32.15 83.91v7.84c0 2.21 1.79 4 4 4h7.84"/>\n <path class="s1" d="m66.68 95.75h7.84c2.21 0 4-1.79 4-4v-7.84"/>\n <path class="s1" d="m78.52 62.2v-7.84c0-2.21-1.79-4-4-4h-7.84"/>\n <path class="s2" d="m107.13 53.32c0-2.18-1.76-3.95-3.94-3.95-2.18 0-3.95 1.77-3.95 3.95 0 2.18 1.77 3.95 3.95 3.95 2.18 0 3.94-1.77 3.94-3.95z"/>\n <path class="s3" d="m200.85 49.37h-84.82c-0.56 0-1 0.45-1 1v5.9c0 0.55 0.44 1 1 1h84.82c0.56 0 1-0.45 1-1v-5.9c0-0.55-0.44-1-1-1z"/>\n <path class="s2" d="m107.13 73.05c0-2.17-1.76-3.94-3.94-3.94-2.18 0-3.95 1.77-3.95 3.94 0 2.18 1.77 3.95 3.95 3.95 2.18 0 3.94-1.77 3.94-3.95z"/>\n <path class="s3" d="m179.15 69.11h-63.12c-0.56 0-1 0.45-1 1v5.89c0 0.55 0.44 1 1 1h63.12c0.55 0 1-0.45 1-1v-5.89c0-0.55-0.45-1-1-1z"/>\n <path class="s2" d="m107.13 92.79c0-2.18-1.76-3.95-3.94-3.95-2.18 0-3.95 1.77-3.95 3.95 0 2.18 1.77 3.94 3.95 3.94 2.18 0 3.94-1.76 3.94-3.94z"/>\n <path class="s3" d="m166.32 88.84h-50.29c-0.55 0-1 0.45-1 1v5.89c0 0.56 0.45 1 1 1h50.29c0.55 0 1-0.44 1-1v-5.89c0-0.55-0.45-1-1-1z"/>\n <path class="s4" d="m221.57 11.88h-84.82c-0.56 0-1 0.45-1 1v1.95c0 0.55 0.44 1 1 1h84.82c0.56 0 1-0.45 1-1v-1.95c0-0.55-0.44-1-1-1z"/>\n <g style="opacity: .05">\n </g>\n ',t}():function(){const t=document.createElementNS("http://www.w3.org/2000/svg","svg");return t.setAttribute("width","270"),t.setAttribute("height","175"),t.setAttribute("viewBox","40 60 250 140"),t.innerHTML='\n <g transform="matrix(1,0,0,1,0,0)"><g id="12" opacity="1" style="mix-blend-mode:normal"><g><defs><clipPath id="12_clipPath" x="-50%" y="-50%" width="200%" height="200%"><path d="M0,260v-260h333v260z" fill="white" clip-rule="nonzero"></path></clipPath></defs><g clip-path="url(#12_clipPath)"><g transform="matrix(1,0,0,1,48,60)"><g id="83287" opacity="1" style="mix-blend-mode:normal"><g><g><g transform="matrix(1,0,0,1,0,0)"><g id="83288" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83288_fill_path" d="M4,140c-2.20914,0 -4,-1.79086 -4,-4v-132c0,-2.20914 1.79086,-4 4,-4h228c2.20914,0 4,1.79086 4,4v132c0,2.20914 -1.79086,4 -4,4z" fill-rule="nonzero" fill="rgb(255, 255, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path><defs><clipPath id="ligziij3rlyasnggflf" clipPathUnits="userSpaceOnUse"><path d="M4,140c-2.20914,0 -4,-1.79086 -4,-4v-132c0,-2.20914 1.79086,-4 4,-4h228c2.20914,0 4,1.79086 4,4v132c0,2.20914 -1.79086,4 -4,4z"></path></clipPath></defs><path id="83288_stroke_path" d="M4,140c-2.20914,0 -4,-1.79086 -4,-4v-132c0,-2.20914 1.79086,-4 4,-4h228c2.20914,0 4,1.79086 4,4v132c0,2.20914 -1.79086,4 -4,4z" fill="none" stroke="rgb(195, 205, 255)" stroke-width="4" stroke-linecap="butt" stroke-linejoin="butt" stroke-dasharray="0 0" stroke-opacity="1" clip-path="url(#ligziij3rlyasnggflf)"></path></g></g></g></g><g transform="matrix(1,0,0,1,97,116.5)"><g id="83289" opacity="0.4" style="mix-blend-mode:normal"><g><g><path id="83289_fill_path" d="M135,0l-135,23.5h135z" fill-rule="nonzero" fill="rgb(244, 247, 251)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,2,2)"><g id="83290" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83290_fill_path" d="M0,2c0,-1 1,-2 2,-2h228c1,0 2,1 2,2v18h-232z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(-1,0,0,-1,228.54000000000002,62.99940000000001)"><g id="83291" opacity="0.2" style="mix-blend-mode:lighten"><g><g><path id="83291_fill_path" d="M227,-0.00002l-227,60.99934l226.99998,0.00002z" fill-rule="nonzero" fill="rgb(255, 255, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,24,42)"><g id="83292" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83292_fill_path" d="M1,8c-0.55228,0 -1,-0.44772 -1,-1v-6c0,-0.55228 0.44772,-1 1,-1h109c0.55228,0 1,0.44772 1,1v6c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(195, 205, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,143,42)"><g id="83293" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83293_fill_path" d="M1,8c-0.55228,0 -1,-0.44772 -1,-1v-6c0,-0.55228 0.44772,-1 1,-1h65c0.55228,0 1,0.44772 1,1v6c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(195, 205, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,24,58)"><g id="83294" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83294_fill_path" d="M1,8c-0.55228,0 -1,-0.44772 -1,-1v-6c0,-0.55228 0.44772,-1 1,-1h64c0.55228,0 1,0.44772 1,1v6c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(195, 205, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,98,58)"><g id="83295" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83295_fill_path" d="M1,8c-0.55228,0 -1,-0.44772 -1,-1v-6c0,-0.55228 0.44772,-1 1,-1h86c0.55228,0 1,0.44772 1,1v6c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(195, 205, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,194,58)"><g id="83296" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83296_fill_path" d="M1,8c-0.55228,0 -1,-0.44772 -1,-1v-6c0,-0.55228 0.44772,-1 1,-1h14c0.55228,0 1,0.44772 1,1v6c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(195, 205, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,24,74)"><g id="83297" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83297_fill_path" d="M1,6c-0.55228,0 -1,-0.44772 -1,-1v-4c0,-0.55228 0.44772,-1 1,-1h83c0.55228,0 1,0.44772 1,1v4c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(244, 247, 251)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,117,74)"><g id="83298" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83298_fill_path" d="M1,6c-0.55228,0 -1,-0.44772 -1,-1v-4c0,-0.55228 0.44772,-1 1,-1h38c0.55228,0 1,0.44772 1,1v4c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(244, 247, 251)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,165,74)"><g id="83299" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83299_fill_path" d="M1,6c-0.55228,0 -1,-0.44772 -1,-1v-4c0,-0.55228 0.44772,-1 1,-1h43c0.55228,0 1,0.44772 1,1v4c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,68,92)"><g id="83300" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83300_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,74,92)"><g id="83301" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83301_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,80,92)"><g id="83302" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83302_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,86,92)"><g id="83303" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83303_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,92,92)"><g id="83304" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83304_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,98,92)"><g id="83305" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83305_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,104,92)"><g id="83306" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83306_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,110,92)"><g id="83307" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83307_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,116,92)"><g id="83308" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83308_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,122,92)"><g id="83309" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83309_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,128,92)"><g id="83310" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83310_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,134,92)"><g id="83311" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83311_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,140,92)"><g id="83312" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83312_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,146,92)"><g id="83313" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83313_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,152,92)"><g id="83314" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83314_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,158,92)"><g id="83315" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83315_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,164,92)"><g id="83316" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83316_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,170,92)"><g id="83317" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83317_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,97,116)"><g id="83318" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83318_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h38c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(195, 205, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,2,21)"><g id="83320" opacity="0.2" style="mix-blend-mode:normal"><g><g><path id="83320_fill_path" d="M0,118v-118h234v118z" fill-rule="nonzero" fill="rgb(255, 255, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g></g></g></g></g><g transform="matrix(1,0,0,1,48,60)"><g id="83268" opacity="1" style="mix-blend-mode:normal"><g><g><g transform="matrix(1,0,0,1,0,0)"><g id="83269" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83269_fill_path" d="M4,140c-2.20914,0 -4,-1.79086 -4,-4v-132c0,-2.20914 1.79086,-4 4,-4h228c2.20914,0 4,1.79086 4,4v132c0,2.20914 -1.79086,4 -4,4z" fill-rule="nonzero" fill="rgb(255, 255, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path><defs><clipPath id="ligziij4hmxrv43iz67" clipPathUnits="userSpaceOnUse"><path d="M4,140c-2.20914,0 -4,-1.79086 -4,-4v-132c0,-2.20914 1.79086,-4 4,-4h228c2.20914,0 4,1.79086 4,4v132c0,2.20914 -1.79086,4 -4,4z"></path></clipPath></defs><path id="83269_stroke_path" d="M4,140c-2.20914,0 -4,-1.79086 -4,-4v-132c0,-2.20914 1.79086,-4 4,-4h228c2.20914,0 4,1.79086 4,4v132c0,2.20914 -1.79086,4 -4,4z" fill="none" stroke="rgb(195, 205, 255)" stroke-width="4" stroke-linecap="butt" stroke-linejoin="butt" stroke-dasharray="0 0" stroke-opacity="1" clip-path="url(#ligziij4hmxrv43iz67)"></path></g></g></g></g><g transform="matrix(1,0,0,1,196,100)"><g id="83270" opacity="0.4" style="mix-blend-mode:normal"><g><g><defs><clipPath id="ligziij4roiiqcgytn" clipPathUnits="userSpaceOnUse"><path d="M24,12c0,1.2588 -0.198,2.5104 -0.5868,3.708c-0.3888,1.1976 -0.9648,2.3268 -1.7052,3.3456c-0.7404,1.0188 -1.6356,1.914 -2.6544,2.6544c-1.0188,0.7404 -2.148,1.3164 -3.3456,1.7052c-1.1976,0.3888 -2.4492,0.5868 -3.708,0.5868c-1.2588,0 -2.5104,-0.198 -3.708,-0.5868c-1.1976,-0.3888 -2.3268,-0.9648 -3.3456,-1.7052c-1.0188,-0.7404 -1.914,-1.6356 -2.6544,-2.6544c-0.7404,-1.0188 -1.3164,-2.148 -1.7052,-3.3456c-0.3888,-1.1976 -0.5868,-2.4492 -0.5868,-3.708c0,-1.2588 0.198,-2.5104 0.5868,-3.708c0.3888,-1.1976 0.9648,-2.3268 1.7052,-3.3456c0.7404,-1.0188 1.6356,-1.914 2.6544,-2.6544c1.0188,-0.7404 2.148,-1.3164 3.3456,-1.7052c1.1976,-0.3888 2.4492,-0.5868 3.708,-0.5868c1.2588,0 2.5104,0.198 3.708,0.5868c1.1976,0.3888 2.3268,0.9648 3.3456,1.7052c1.0188,0.7404 1.914,1.6356 2.6544,2.6544c0.7404,1.0188 1.3164,2.148 1.7052,3.3456c0.3888,1.1976 0.5868,2.4492 0.5868,3.708z"></path></clipPath></defs><path id="83270_stroke_path" d="M24,12c0,1.2588 -0.198,2.5104 -0.5868,3.708c-0.3888,1.1976 -0.9648,2.3268 -1.7052,3.3456c-0.7404,1.0188 -1.6356,1.914 -2.6544,2.6544c-1.0188,0.7404 -2.148,1.3164 -3.3456,1.7052c-1.1976,0.3888 -2.4492,0.5868 -3.708,0.5868c-1.2588,0 -2.5104,-0.198 -3.708,-0.5868c-1.1976,-0.3888 -2.3268,-0.9648 -3.3456,-1.7052c-1.0188,-0.7404 -1.914,-1.6356 -2.6544,-2.6544c-0.7404,-1.0188 -1.3164,-2.148 -1.7052,-3.3456c-0.3888,-1.1976 -0.5868,-2.4492 -0.5868,-3.708c0,-1.2588 0.198,-2.5104 0.5868,-3.708c0.3888,-1.1976 0.9648,-2.3268 1.7052,-3.3456c0.7404,-1.0188 1.6356,-1.914 2.6544,-2.6544c1.0188,-0.7404 2.148,-1.3164 3.3456,-1.7052c1.1976,-0.3888 2.4492,-0.5868 3.708,-0.5868c1.2588,0 2.5104,0.198 3.708,0.5868c1.1976,0.3888 2.3268,0.9648 3.3456,1.7052c1.0188,0.7404 1.914,1.6356 2.6544,2.6544c0.7404,1.0188 1.3164,2.148 1.7052,3.3456c0.3888,1.1976 0.5868,2.4492 0.5868,3.708z" fill="none" stroke="rgb(195, 205, 255)" stroke-width="10" stroke-linecap="butt" stroke-linejoin="butt" stroke-dasharray="0 0" stroke-opacity="1" clip-path="url(#ligziij4roiiqcgytn)"></path></g></g></g></g><g transform="matrix(1,0,0,1,98,98)"><g id="83271" opacity="0.4" style="mix-blend-mode:normal"><g><g><path id="83271_fill_path" d="M135,0l-135,40h135z" fill-rule="nonzero" fill="rgb(244, 247, 251)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,1,1)"><g id="83272" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83272_fill_path" d="M0,2c0,-1 1,-2 2,-2h229c1,0 2,1 2,2v18h-233z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,42,74.4508)"><g id="83273" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83273_fill_path" d="M18.00001,0h-8c-5.5225,0 -10.00001,4.47496 -10.00001,9.99992c0,1.09999 0.895,1.99998 2,1.99998h24.00002c1.1045,0 2,-0.89549 2,-1.99998c0,-5.52496 -4.475,-9.99992 -10.00001,-9.99992z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,47.5999,54.4509)"><g id="83274" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83274_fill_path" d="M17.306,8.653c0,0.9077 -0.1428,1.8102 -0.4232,2.6738c-0.2804,0.8636 -0.6957,1.6778 -1.2296,2.4124c-0.5339,0.7346 -1.1794,1.3801 -1.914,1.914c-0.7346,0.5339 -1.5488,0.9492 -2.4124,1.2296c-0.8636,0.2804 -1.7661,0.4232 -2.6738,0.4232c-0.9077,0 -1.8102,-0.1428 -2.6738,-0.4232c-0.8636,-0.2804 -1.6778,-0.6957 -2.4124,-1.2296c-0.7346,-0.5339 -1.3801,-1.1794 -1.914,-1.914c-0.5339,-0.7346 -0.9492,-1.5488 -1.2296,-2.4124c-0.2804,-0.8636 -0.4232,-1.7661 -0.4232,-2.6738c0,-0.9077 0.1428,-1.8102 0.4232,-2.6738c0.2804,-0.8636 0.6957,-1.6778 1.2296,-2.4124c0.5339,-0.7346 1.1794,-1.3801 1.914,-1.914c0.7346,-0.5339 1.5488,-0.9492 2.4124,-1.2296c0.8636,-0.2804 1.7661,-0.4232 2.6738,-0.4232c0.9077,0 1.8102,0.1428 2.6738,0.4232c0.8636,0.2804 1.6778,0.6957 2.4124,1.2296c0.7346,0.5339 1.3801,1.1794 1.914,1.914c0.5339,0.7346 0.9492,1.5488 1.2296,2.4124c0.2804,0.8636 0.4232,1.7661 0.4232,2.6738z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,32,48)"><g id="83275" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83275_fill_path" d="M12,0c0,0 -7.7348,0 -8,0c-0.2652,0 -0.5204,0.0252 -0.7804,0.0768c-0.26,0.0516 -0.5052,0.126 -0.7504,0.2276c-0.2452,0.1016 -0.4712,0.2224 -0.6916,0.3696c-0.2204,0.1472 -0.4184,0.31 -0.606,0.4976c-0.1876,0.1876 -0.3504,0.3856 -0.4976,0.606c-0.1472,0.2204 -0.268,0.4464 -0.3696,0.6916c-0.1016,0.2452 -0.176,0.4904 -0.2276,0.7504c-0.0516,0.26 -0.0768,0.5152 -0.0768,0.7804c0,0.2652 0,8 0,8" fill-rule="nonzero" fill="rgb(255, 255, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path><path id="83275_stroke_path" d="M12,0c0,0 -7.7348,0 -8,0c-0.2652,0 -0.5204,0.0252 -0.7804,0.0768c-0.26,0.0516 -0.5052,0.126 -0.7504,0.2276c-0.2452,0.1016 -0.4712,0.2224 -0.6916,0.3696c-0.2204,0.1472 -0.4184,0.31 -0.606,0.4976c-0.1876,0.1876 -0.3504,0.3856 -0.4976,0.606c-0.1472,0.2204 -0.268,0.4464 -0.3696,0.6916c-0.1016,0.2452 -0.176,0.4904 -0.2276,0.7504c-0.0516,0.26 -0.0768,0.5152 -0.0768,0.7804c0,0.2652 0,8 0,8" fill="none" stroke="rgb(195, 205, 255)" stroke-width="2" stroke-linecap="butt" stroke-linejoin="butt" stroke-dasharray="0 0" stroke-opacity="1"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,-1,1,6.123233995736766e-17,32,94)"><g id="83276" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83276_fill_path" d="M12,0c0,0 -7.7348,0 -8,0c-0.2652,0 -0.5204,0.0252 -0.7804,0.0768c-0.26,0.0516 -0.5052,0.126 -0.7504,0.2276c-0.2452,0.1016 -0.4712,0.2224 -0.6916,0.3696c-0.2204,0.1472 -0.4184,0.31 -0.606,0.4976c-0.1876,0.1876 -0.3504,0.3856 -0.4976,0.606c-0.1472,0.2204 -0.268,0.4464 -0.3696,0.6916c-0.1016,0.2452 -0.176,0.4904 -0.2276,0.7504c-0.0516,0.26 -0.0768,0.5152 -0.0768,0.7804c0,0.2652 0,8 0,8" fill-rule="nonzero" fill="rgb(255, 255, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path><path id="83276_stroke_path" d="M12,0c0,0 -7.7348,0 -8,0c-0.2652,0 -0.5204,0.0252 -0.7804,0.0768c-0.26,0.0516 -0.5052,0.126 -0.7504,0.2276c-0.2452,0.1016 -0.4712,0.2224 -0.6916,0.3696c-0.2204,0.1472 -0.4184,0.31 -0.606,0.4976c-0.1876,0.1876 -0.3504,0.3856 -0.4976,0.606c-0.1472,0.2204 -0.268,0.4464 -0.3696,0.6916c-0.1016,0.2452 -0.176,0.4904 -0.2276,0.7504c-0.0516,0.26 -0.0768,0.5152 -0.0768,0.7804c0,0.2652 0,8 0,8" fill="none" stroke="rgb(195, 205, 255)" stroke-width="2" stroke-linecap="butt" stroke-linejoin="butt" stroke-dasharray="0 0" stroke-opacity="1"></path></g></g></g></g><g transform="matrix(-1,2.4492935982947064e-16,-2.4492935982947064e-16,-1,79,94)"><g id="83277" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83277_fill_path" d="M12,0c0,0 -7.7348,0 -8,0c-0.2652,0 -0.5204,0.0252 -0.7804,0.0768c-0.26,0.0516 -0.5052,0.126 -0.7504,0.2276c-0.2452,0.1016 -0.4712,0.2224 -0.6916,0.3696c-0.2204,0.1472 -0.4184,0.31 -0.606,0.4976c-0.1876,0.1876 -0.3504,0.3856 -0.4976,0.606c-0.1472,0.2204 -0.268,0.4464 -0.3696,0.6916c-0.1016,0.2452 -0.176,0.4904 -0.2276,0.7504c-0.0516,0.26 -0.0768,0.5152 -0.0768,0.7804c0,0.2652 0,8 0,8" fill-rule="nonzero" fill="rgb(255, 255, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path><path id="83277_stroke_path" d="M12,0c0,0 -7.7348,0 -8,0c-0.2652,0 -0.5204,0.0252 -0.7804,0.0768c-0.26,0.0516 -0.5052,0.126 -0.7504,0.2276c-0.2452,0.1016 -0.4712,0.2224 -0.6916,0.3696c-0.2204,0.1472 -0.4184,0.31 -0.606,0.4976c-0.1876,0.1876 -0.3504,0.3856 -0.4976,0.606c-0.1472,0.2204 -0.268,0.4464 -0.3696,0.6916c-0.1016,0.2452 -0.176,0.4904 -0.2276,0.7504c-0.0516,0.26 -0.0768,0.5152 -0.0768,0.7804c0,0.2652 0,8 0,8" fill="none" stroke="rgb(195, 205, 255)" stroke-width="2" stroke-linecap="butt" stroke-linejoin="butt" stroke-dasharray="0 0" stroke-opacity="1"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,79,48)"><g id="83278" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83278_fill_path" d="M12,0c0,0 -7.7348,0 -8,0c-0.2652,0 -0.5204,0.0252 -0.7804,0.0768c-0.26,0.0516 -0.5052,0.126 -0.7504,0.2276c-0.2452,0.1016 -0.4712,0.2224 -0.6916,0.3696c-0.2204,0.1472 -0.4184,0.31 -0.606,0.4976c-0.1876,0.1876 -0.3504,0.3856 -0.4976,0.606c-0.1472,0.2204 -0.268,0.4464 -0.3696,0.6916c-0.1016,0.2452 -0.176,0.4904 -0.2276,0.7504c-0.0516,0.26 -0.0768,0.5152 -0.0768,0.7804c0,0.2652 0,8 0,8" fill-rule="nonzero" fill="rgb(255, 255, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path><path id="83278_stroke_path" d="M12,0c0,0 -7.7348,0 -8,0c-0.2652,0 -0.5204,0.0252 -0.7804,0.0768c-0.26,0.0516 -0.5052,0.126 -0.7504,0.2276c-0.2452,0.1016 -0.4712,0.2224 -0.6916,0.3696c-0.2204,0.1472 -0.4184,0.31 -0.606,0.4976c-0.1876,0.1876 -0.3504,0.3856 -0.4976,0.606c-0.1472,0.2204 -0.268,0.4464 -0.3696,0.6916c-0.1016,0.2452 -0.176,0.4904 -0.2276,0.7504c-0.0516,0.26 -0.0768,0.5152 -0.0768,0.7804c0,0.2652 0,8 0,8" fill="none" stroke="rgb(195, 205, 255)" stroke-width="2" stroke-linecap="butt" stroke-linejoin="butt" stroke-dasharray="0 0" stroke-opacity="1"></path></g></g></g></g><g transform="matrix(1,0,0,1,100,47)"><g id="83279" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83279_fill_path" d="M4,8c-2.20914,0 -4,-1.79086 -4,-4v0c0,-2.20914 1.79086,-4 4,-4v0c2.20914,0 4,1.79086 4,4v0c0,2.20914 -1.79086,4 -4,4z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,116,47)"><g id="83280" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83280_fill_path" d="M1,8c-0.55228,0 -1,-0.44772 -1,-1v-6c0,-0.55228 0.44772,-1 1,-1h86c0.55228,0 1,0.44772 1,1v6c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(195, 205, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,100,67)"><g id="83281" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83281_fill_path" d="M4,8c-2.20914,0 -4,-1.79086 -4,-4v0c0,-2.20914 1.79086,-4 4,-4v0c2.20914,0 4,1.79086 4,4v0c0,2.20914 -1.79086,4 -4,4z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,116,67)"><g id="83282" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83282_fill_path" d="M1,8c-0.55228,0 -1,-0.44772 -1,-1v-6c0,-0.55228 0.44772,-1 1,-1h64c0.55228,0 1,0.44772 1,1v6c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(195, 205, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,100,87)"><g id="83283" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83283_fill_path" d="M4,8c-2.20914,0 -4,-1.79086 -4,-4v0c0,-2.20914 1.79086,-4 4,-4v0c2.20914,0 4,1.79086 4,4v0c0,2.20914 -1.79086,4 -4,4z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,116,87)"><g id="83284" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83284_fill_path" d="M1,8c-0.55228,0 -1,-0.44772 -1,-1v-6c0,-0.55228 0.44772,-1 1,-1h51c0.55228,0 1,0.44772 1,1v6c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(195, 205, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,137,9)"><g id="83285" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83285_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h86c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(244, 247, 251)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(-1,0,0,-1,92.4999,98.9985)"><g id="83286" opacity="0.2" style="mix-blend-mode:lighten"><g><g><path id="83286_fill_path" d="M90.49994,0l-90.49994,96.99852l90.49994,0.00002z" fill-rule="nonzero" fill="rgb(255, 255, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,0,20)"><g id="83319" opacity="0" style="mix-blend-mode:normal"><g><g><path id="83319_fill_path" d="M0,118v-118h234v118z" fill-rule="nonzero" fill="rgb(255, 255, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g></g></g></g></g></g></g></g></g><animateTransform href="#83287" attributeName="transform" type="translate" values="118 70;118 70;118 70;118 70;118 70" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.37;0.61;0.66;1" keySplines="0.0664 0.4423 0.15 1;0.0664 0.4423 0.1 1;0.0664 0.4423 0.1 1;0.5 0.35 0.1 1" additive="sum" fill="freeze"></animateTransform><animateTransform href="#83287" attributeName="transform" type="scale" values="0 1;0 1;1.02 1;1 1;1 1" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.37;0.61;0.66;1" keySplines="0.0664 0.4423 0.15 1;0.0664 0.4423 0.1 1;0.0664 0.4423 0.1 1;0.5 0.35 0.1 1" additive="sum" fill="freeze"></animateTransform><animateTransform href="#83287" attributeName="transform" type="translate" values="-118 -70;-118 -70;-118 -70;-118 -70;-118 -70" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.37;0.61;0.66;1" keySplines="0.0664 0.4423 0.15 1;0.0664 0.4423 0.1 1;0.0664 0.4423 0.1 1;0.5 0.35 0.1 1" additive="sum" fill="freeze"></animateTransform><animateTransform href="#83291" attributeName="transform" type="translate" values="0 0;0 0;9.018099999999999 -4;9.018099999999999 -4" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.37;0.52;1" keySplines="0.42 0 0.15 1;0.42 0 0.15 1;0.5 0.35 0.15 1" additive="sum" fill="freeze"></animateTransform><animateTransform href="#83291" attributeName="transform" type="translate" values="113.5 30.4997;113.5 30.4997;113.5 30.4997;113.5 30.4997" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.37;0.52;1" keySplines="0.5 0.35 0.15 1;0.5 0.35 0.15 1;0.5 0.35 0.15 1" additive="sum" fill="freeze"></animateTransform><animateTransform href="#83291" attributeName="transform" type="scale" values="-1 -1;-1 -1;-0.88 -0.88;-0.88 -0.88" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.37;0.52;1" keySplines="0.5 0.35 0.15 1;0.5 0.35 0.15 1;0.5 0.35 0.15 1" additive="sum" fill="freeze"></animateTransform><animateTransform href="#83291" attributeName="transform" type="translate" values="-113.5 -30.4997;-113.5 -30.4997;-113.5 -30.4997;-113.5 -30.4997" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.37;0.52;1" keySplines="0.5 0.35 0.15 1;0.5 0.35 0.15 1;0.5 0.35 0.15 1" additive="sum" fill="freeze"></animateTransform><animate href="#83320" attributeName="opacity" values="0.2;0.2;0;0" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.39;0.43;1" keySplines="0.5 0.35 0.15 1;0.5 0.35 0.15 1;0.5 0.35 0.15 1" additive="sum" fill="freeze"></animate><animateTransform href="#83268" attributeName="transform" type="translate" values="117 75;117 75;117 75;117 75" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.09;0.37;1" keySplines="0.5 0.35 0.15 1;0.5 0.35 0.8 0.15;0.5 0.35 0.8 0.15" additive="sum" fill="freeze"></animateTransform><animateTransform href="#83268" attributeName="transform" type="scale" values="1 1;1 1;0 1;0 1" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.09;0.37;1" keySplines="0.5 0.35 0.15 1;0.5 0.35 0.8 0.15;0.5 0.35 0.8 0.15" additive="sum" fill="freeze"></animateTransform><animateTransform href="#83268" attributeName="transform" type="translate" values="-117 -75;-117 -75;-117 -75;-117 -75" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.09;0.37;1" keySplines="0.5 0.35 0.15 1;0.5 0.35 0.8 0.15;0.5 0.35 0.8 0.15" additive="sum" fill="freeze"></animateTransform><animate href="#83271_fill_path" attributeName="d" values="M135,0l-135,40h135z;M135,0l-135,40h135z;M135,0l-135,40h135z;M135,0l-135,40h135z;M135,0l-135,40h135z;M135,0l-135,40h135z;M135,0l-135,40h135z;M135,0l-135,40h135z;M135,0l-135,40h135z;M135,0l-135,40h135z;M135,0l-135,40h135z;M135,0l-135,40h135z;M135,-0.0042l-135.0142,40.0042h135.0142z;M135,-0.0364l-135.1228,40.0364h135.1228z;M135,-0.0975l-135.3292,40.0975h135.3292z;M135,-0.1848l-135.6236,40.1848h135.6236z;M135,-0.2958l-135.9982,40.2958h135.9982z;M135,-0.4285l-136.4462,40.4285h136.4462z;M135,-0.5812l-136.9617,40.5812h136.9617z;M135,-0.7525l-137.5397,40.7525h137.5397z;M135,-0.941l-138.176,40.941h138.176z;M135,-1.1457l-138.8667,41.1457h138.8667z;M135,-1.3655l-139.6085,41.3655h139.6085z;M135,-1.5996l-140.3986,41.5996h140.3986z;M135,-1.8472l-141.2343,41.8472h141.2343z;M135,-2.1077l-142.1134,42.1077h142.1134z;M135,-2.3804l-143.0339,42.3804h143.0339z;M135,-2.6649l-143.994,42.6649h143.994z;M135,-2.9607l-144.9922,42.9607h144.9922z;M135,-3.2673l-146.0272,43.2673h146.0272z;M135,-3.5846l-147.0978,43.5846h147.0978z;M135,-3.9121l-148.2031,43.9121h148.2031z;M135,-4.2497l-149.3424,44.2497h149.3424z;M135,-4.5972l-150.5153,44.5972h150.5153z;M135,-4.9545l-151.7213,44.9545h151.7213z;M135,-5.3218l-152.9607,45.3218h152.9607z;M135,-5.6991l-154.2341,45.6991h154.2341z;M135,-6.0868l-155.5427,46.0868h155.5427z;M135,-6.4858l-156.8893,46.4858h156.8893z;M135,-6.898l-158.2804,46.898h158.2804z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z" dur="2.6s" repeatCount="indefinite" keyTimes="0;0.007692307692307693;0.015384615384615385;0.023076923076923078;0.03076923076923077;0.038461538461538464;0.046153846153846156;0.05384615384615385;0.06153846153846154;0.06923076923076923;0.07692307692307693;0.08461538461538462;0.09230769230769231;0.1;0.1076923076923077;0.11538461538461539;0.12307692307692308;0.13076923076923078;0.13846153846153847;0.14615384615384616;0.15384615384615385;0.16153846153846155;0.16923076923076924;0.17692307692307693;0.18461538461538463;0.19230769230769232;0.2;0.2076923076923077;0.2153846153846154;0.2230769230769231;0.23076923076923078;0.23846153846153847;0.24615384615384617;0.25384615384615383;0.26153846153846155;0.2692307692307692;0.27692307692307694;0.2846153846153846;0.2923076923076923;0.3;0.3076923076923077;0.3153846153846154;0.3230769230769231;0.33076923076923076;0.3384615384615385;0.34615384615384615;0.35384615384615387;0.36153846153846153;0.36923076923076925;0.3769230769230769;0.38461538461538464;0.3923076923076923;0.4;0.4076923076923077;0.4153846153846154;0.4230769230769231;0.4307692307692308;0.43846153846153846;0.4461538461538462;0.45384615384615384;0.46153846153846156;0.46923076923076923;0.47692307692307695;0.4846153846153846;0.49230769230769234;0.5;0.5076923076923077;0.5153846153846153;0.5230769230769231;0.5307692307692308;0.5384615384615384;0.5461538461538461;0.5538461538461539;0.5615384615384615;0.5692307692307692;0.5769230769230769;0.5846153846153846;0.5923076923076923;0.6;0.6076923076923076;0.6153846153846154;0.6230769230769231;0.6307692307692307;0.6384615384615384;0.6461538461538462;0.6538461538461539;0.6615384615384615;0.6692307692307692;0.676923076923077;0.6846153846153846;0.6923076923076923;0.7;0.7076923076923077;0.7153846153846154;0.7230769230769231;0.7307692307692307;0.7384615384615385;0.7461538461538462;0.7538461538461538;0.7615384615384615;0.7692307692307693;0.7769230769230769;0.7846153846153846;0.7923076923076923;0.8;0.8076923076923077;0.8153846153846154;0.823076923076923;0.8307692307692308;0.8384615384615385;0.8461538461538461;0.8538461538461538;0.8615384615384616;0.8692307692307693;0.8769230769230769;0.8846153846153846;0.8923076923076924;0.9;0.9076923076923077;0.9153846153846154;0.9230769230769231;0.9307692307692308;0.9384615384615385;0.9461538461538461;0.9538461538461539;0.9615384615384616;0.9692307692307692;0.9769230769230769;0.9846153846153847;0.9923076923076923;1" fill="freeze"></animate><animateTransform href="#83285" attributeName="transform" type="translate" values="88 2;88 2;88 2;88 2;88 2" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.12;0.27;0.33;1" keySplines="0.42 0 0.15 1;0.42 0 0.48 1;0.42 0 0.48 1;0.5 0.35 0.48 1" additive="sum" fill="freeze"></animateTransform><animateTransform href="#83285" attributeName="transform" type="scale" values="0.98 1;0.98 1;1 1;0.96 1;0.96 1" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.12;0.27;0.33;1" keySplines="0.42 0 0.15 1;0.42 0 0.48 1;0.42 0 0.48 1;0.5 0.35 0.48 1" additive="sum" fill="freeze"></animateTransform><animateTransform href="#83285" attributeName="transform" type="translate" values="-88 -2;-88 -2;-88 -2;-88 -2;-88 -2" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.12;0.27;0.33;1" keySplines="0.42 0 0.15 1;0.42 0 0.48 1;0.42 0 0.48 1;0.5 0.35 0.48 1" additive="sum" fill="freeze"></animateTransform><animateTransform href="#83286" attributeName="transform" type="translate" values="0 0;0 0;0 0;0 0" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.09;0.32;1" keySplines="0.42 0 0.15 1;0.42 0 1 1;0.5 0.35 1 1" additive="sum" fill="freeze"></animateTransform><animateTransform xlink:href="#83286" href="#83286" attributeName="transform" type="skewX" values="0;0;-4;-4" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.09;0.32;1" keySplines="0.42 0 0.15 1;0.42 0 1 1;0.5 0.35 1 1" additive="sum" fill="freeze"></animateTransform><animateTransform xlink:href="#83286" href="#83286" attributeName="transform" type="skewY" values="0;0;0;0" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.09;0.32;1" keySplines="0.42 0 0.15 1;0.42 0 1 1;0.5 0.35 1 1" additive="sum" fill="freeze"></animateTransform><animateTransform xlink:href="#83286" href="#83286" attributeName="transform" type="translate" values="0 0;0 0;0 0;0 0" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.09;0.32;1" keySplines="0.42 0 0.15 1;0.42 0 1 1;0.5 0.35 1 1" additive="sum" fill="freeze"></animateTransform><animate href="#83319" attributeName="opacity" values="0;0;0.18;0.18" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.31;0.36;1" keySplines="0.5 0.35 0.15 1;0.5 0.35 0.15 1;0.5 0.35 0.15 1" additive="sum" fill="freeze"></animate>\n ',t}(),e.setAttribute("style","position: absolute; z-index: 1; opacity: 0; transition: opacity 0.5s ease-in-out;"),"document_front"===t?e.style.opacity="1":"document_back"===t&&(e.style.opacity="1",setTimeout((()=>{e.style.opacity="0"}),5e3)),e};var Ff;!function(t){t.INVALID="invalid",t.VALID="valid",t.ACCEPTED="accepted",t.REJECTED="rejected"}(Ff||(Ff={}));const Lf="#ED3232",zf="#01B678",Uf="#FFF";const Vf=t=>{const e=document.createElement("canvas");e.width=t.videoWidth,e.height=t.videoHeight;return e.getContext("2d").drawImage(t,0,0,t.videoWidth,t.videoHeight),e};async function Hf(t){let{context:e,onDetect:r,frame:n,showError:o,isSelfie:i=!1}=t;const a=e.state.name;if(a===Ff.REJECTED){o(function(t){switch(t){case Qi.DOCUMENT_DETECTION:return"searching_document_autocapture";case Qi.DOCUMENT_POSITION:return"doc_not_in_frame_issues_autocapture";case Qi.BARCODE_DETECTION:return yo.feedback.BARCODE_NOT_FOUND;case Qi.BLUR_DETECTION:return yo.feedback.BLUR;case Qi.GLARE_DETECTION:return yo.feedback.GLARE;case Qi.FACE_DETECTION:return yo.feedback.FACE_NOT_FOUND;case Qi.FACE_POSITION:return yo.feedback.FACE_TOO_SMALL}}(e.invalidFramesCause));jf("border-color",e.invalidFramesCause===Qi.DOCUMENT_DETECTION?Uf:Lf)}if(a===Ff.VALID)if(i){jf("border-color",zf);o(`capturing_face_autocapture${Math.ceil((e.validFramesThreshold-e.validFramesCounter)/e.validFramesThreshold*3)}`)}else o("capturing_in_progress_message"),jf("border-color",Uf);a===Ff.ACCEPTED&&(jf("border-color",Uf),o(null),"function"==typeof navigator.vibrate&&navigator.vibrate(200),await r({frame:n,suspendedPreview:!0,context:e}))}function jf(t,e){document.querySelectorAll('[id^="overlay-frame"]').forEach((r=>{r.style[t]=e}))}function Gf(t){let e,r,n,{captureFrame:o,object:i,videoWidth:a,videoHeight:s,deviceWidth:u,deviceHeight:c,threshold:l,iouThreshold:d=.85}=t;if(a/s>=u/c){n=c/s;const t=(a*n-u)/2;e=i.x*n-t,r=i.y*n}else{n=u/a;const t=(s*n-c)/2;e=i.x*n,r=i.y*n-t}const h=e+i.width*n,f=r+i.height*n;!function(t,e,r,n){var o,i;if(null===(i=null===(o=Ji.state.autoCaptureSettings)||void 0===o?void 0:o.settings)||void 0===i?void 0:i.debug){const o=document.getElementById("image-preview-section"),i=document.getElementById("rectangle");if(i)i.style.width=`${r}px`,i.style.height=`${n}px`,i.style.left=`${t}px`,i.style.top=`${e}px`;else{const i=document.createElement("div");i.id="rectangle",i.style.position="absolute",i.style.border="1px solid yellow",i.style.width=`${r}px`,i.style.height=`${n}px`,i.style.left=`${t}px`,i.style.top=`${e}px`,o.appendChild(i)}}}(e,r,i.width*n,i.height*n);const p=function(t,e){const r=Math.max(t.left,e.left),n=Math.min(t.right,e.right),o=Math.max(t.top,e.top),i=n-r,a=Math.min(t.bottom,e.bottom)-o;if(i<=0||a<=0)return 0;const s=i*a;return s/((t.right-t.left)*(t.bottom-t.top)+(e.right-e.left)*(e.bottom-e.top)-s)}({top:o.top,left:o.left,bottom:o.bottom,right:o.right},{top:r,left:e,bottom:f,right:h}),g=p>d,m=i.width*n*(i.height*n)>l*(o.width*o.height);return g&&m}const Wf=t=>{const e=function(){const t=document.createElementNS("http://www.w3.org/2000/svg","svg");return t.setAttribute("width","64px"),t.setAttribute("height","64px"),t.innerHTML='\n <path d="M10.7202 25.9524C9.81992 25.9524 9.08331 25.2158 9.08331 24.3155V11.2202C9.08331 10.3199 9.81992 9.58333 10.7202 9.58333C11.6205 9.58333 12.3571 10.3199 12.3571 11.2202V20.6938C16.3675 14.0337 23.662 9.58333 32 9.58333C44.6553 9.58333 54.9166 19.8447 54.9166 32.5C54.9166 45.1553 44.6553 55.4167 32 55.4167C23.8257 55.4167 16.654 51.1403 12.5924 44.6949C11.9274 43.631 12.7357 42.3214 13.994 42.3214C14.6079 42.3214 15.1603 42.6488 15.4979 43.1603C18.9968 48.5621 25.0841 52.1429 32 52.1429C42.8445 52.1429 51.6428 43.3445 51.6428 32.5C51.6428 21.6555 42.8445 12.8571 32 12.8571C24.726 12.8571 18.383 16.8062 14.9864 22.6786H23.8155C24.7158 22.6786 25.4524 23.4152 25.4524 24.3155C25.4524 25.2158 24.7158 25.9524 23.8155 25.9524H10.7202Z" fill="#FF8B8B"/> \n ',t}(),r=tf({tagName:"button",style:{zIndex:"2",width:"fit-content",display:"flex",flexDirection:"column",alignItems:"center",backgroundColor:"transparent",border:"none"},id:"retake-image",testid:"retake-image"});return ef(r,e),ef(r,Rf({text:t||"Retake",level:2,style:{color:"#FF8B8B",margin:"0",maxWidth:"100px",textAlign:"center"},id:"retake-image-text"})),r};const Xf=t=>{const e=function(){const t=document.createElementNS("http://www.w3.org/2000/svg","svg");return t.setAttribute("width","64px"),t.setAttribute("height","64px"),t.innerHTML='\n <path d="M32.5 8.66666C38.6884 8.66666 44.6233 11.125 48.9992 15.5008C53.375 19.8767 55.8333 25.8116 55.8333 32C55.8333 38.1884 53.375 44.1233 48.9992 48.4992C44.6233 52.875 38.6884 55.3333 32.5 55.3333C26.3116 55.3333 20.3767 52.875 16.0009 48.4992C11.625 44.1233 9.16668 38.1884 9.16668 32C9.16668 25.8116 11.625 19.8767 16.0009 15.5008C20.3767 11.125 26.3116 8.66666 32.5 8.66666ZM32.5 58.6667C39.5725 58.6667 46.3552 55.8572 51.3562 50.8562C56.3572 45.8552 59.1667 39.0724 59.1667 32C59.1667 24.9276 56.3572 18.1448 51.3562 13.1438C46.3552 8.14284 39.5725 5.33333 32.5 5.33333C25.4276 5.33333 18.6448 8.14284 13.6438 13.1438C8.64286 18.1448 5.83334 24.9276 5.83334 32C5.83334 39.0724 8.64286 45.8552 13.6438 50.8562C18.6448 55.8572 25.4276 58.6667 32.5 58.6667ZM43.6771 26.5104C44.3229 25.8646 44.3229 24.8021 43.6771 24.1562C43.0313 23.5104 41.9688 23.5104 41.3229 24.1562L29.1667 36.3125L23.6771 30.8229C23.0313 30.1771 21.9688 30.1771 21.3229 30.8229C20.6771 31.4687 20.6771 32.5312 21.3229 33.1771L27.9896 39.8437C28.6354 40.4896 29.6979 40.4896 30.3438 39.8437L43.6771 26.5104Z" fill="#BBF7DD"/>\n ',t}(),r=tf({tagName:"button",style:{zIndex:"2",width:"fit-content",display:"flex",flexDirection:"column",alignItems:"center",backgroundColor:"transparent",border:"none"},id:"approve-image",testid:"approve-image"});return ef(r,e),ef(r,Rf({text:t||"Approve",level:2,style:{color:"#BBF7DD",margin:"0",maxWidth:"100px",textAlign:"center"},id:"check-circle-text"})),r},Yf=t=>{let{step:e,setImage:r,camera:n}=t;var o,i,a,s;const u=If[e];(null===(o=Ji.state.autoCaptureSettings)||void 0===o?void 0:o.enabled)&&"selfie"===e&&(u.instructions="second_title_face_autocapture");const c=((t,e)=>tf({tagName:"div",style:{display:"flex",height:"100%",justifyContent:"space-between",flexDirection:"column",alignItems:"center"},id:t,testid:"document-capture",className:e}))("document-capture",e),l=tf({tagName:"div",style:{position:"relative",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},id:"camera-hint-section",testid:"camera-hint-section"}),d=tf({tagName:"div",style:{display:"flex",flexDirection:"column",alignItems:"center",width:"100%",height:"80%"},id:"central-container",testid:"central-container"}),h=document.getElementById(Ji.state.rootElementId);if(!h)throw new Error("Root element not found");const f=Sf(of(e),h),p=Bf(e);ef(l,p),ef(l,f),"document_front"===e&&setTimeout((()=>{const t=document.getElementById(`overlay-frame ${of(e)}`),r=document.getElementById("front-document-animation");if(t&&r){const e=t.getBoundingClientRect(),n=l.getBoundingClientRect(),o=8,i=e.width-2*o,a=e.height-2*o,s=235/147;let u=i,c=i/s;c>a&&(c=a,u=c*s);const d=e.left-n.left+(e.width-u)/2,h=e.top-n.top+(e.height-c)/2;r.setAttribute("width",u.toString()),r.setAttribute("height",c.toString()),r.style.width=`${u}px`,r.style.height=`${c}px`,r.style.left=`${d}px`,r.style.top=`${h}px`}}),0);const g=(()=>{const t=tf({tagName:"div",style:{zIndex:"2",width:"80%",height:"50px",color:"white",display:"flex",alignItems:"center",backgroundColor:"#2E2E2E",justifyContent:"center",opacity:".9"},id:"loading-block",testid:"loading-block"}),e=Df();return e.style.width="16px",e.style.height="16px",e.style.margin="0 10px",ef(t,e),ef(t,Rf({text:"This may take a few seconds",level:5,style:{color:"white",margin:"0",width:"80%"},id:"image-loading-message"})),t})();ef(f,g),g.style.visibility="hidden";const m=Pf({text:la.translate(u.page),id:"page-header",testid:"page-header",clientHeight:h.clientHeight}),y=(t=>{let{click:e,id:r,testid:n,color:o,withLoader:i}=t;if(i){const t=Tf();t.style.position="absolute",t.style.left="-7px",t.style.top="-7px",t.style.height="63px",t.style.width="63px";const i=tf({tagName:"button",style:{position:"relative",width:"49px",height:"49px",backgroundColor:o||"white",border:"none",margin:"0 auto",borderRadius:"40px"},id:r+"-inner",testid:n+"-inner"});return ef(i,t),i.addEventListener("click",e),i}{const t=tf({tagName:"button",style:{width:"65px",height:"65px",zIndex:"1",backgroundColor:"black",padding:"0",border:"solid 5px "+(o||"white"),borderRadius:"40px",boxSizing:"border-box",flexShrink:"0",flexGrow:"0"},id:r+"-outer",testid:n+"-outer"});return ef(t,tf({tagName:"div",style:{width:"49px",height:"49px",backgroundColor:o||"white",border:"none",margin:"0 auto",borderRadius:"40px"},id:r+"-inner",testid:n+"-inner"})),t.addEventListener("click",e),t}})({click:()=>r({frame:Vf(n.videoElement),suspendedPreview:!1}),id:"submit-image",testid:"submit-image",withLoader:null===(a=null===(i=Ji.state)||void 0===i?void 0:i.autoCaptureSettings)||void 0===a?void 0:a.enabled}),w=((t,e)=>{const r=tf({tagName:"div",style:{zIndex:"2",width:"70%",paddingBottom:"30px",backgroundColor:"transparent",justifyContent:"space-between",display:"none"},id:"approve-retake-block",testid:"approve-retake-block"}),n=Xf(t);return ef(r,Wf(e)),ef(r,n),r})(la.translate("approve_button"),la.translate("retake_button")),_=(t=>{let{title:e,text:r,clientHeight:n,customTextColor:o}=t;const i=n<700,a=tf({tagName:"div",style:{position:"relative",zIndex:"2",padding:"0 25px",margin:i?"8px 0":"32px 0"},id:"page-info",testid:"page-info"}),s=Rf({text:e,level:i?2:1,style:{color:o||"white",textAlign:"center",marginBottom:i?"4px":"10px"},id:"step-title"}),u=Rf({text:r,level:i?6:5,style:{color:o||"white",textAlign:"center",height:"35px"},id:"step-instructions"});return ef(a,s),ef(a,u),a})({text:la.translate(u.instructions),title:la.translate(u.title),clientHeight:h.clientHeight}),v=(t=>{const e=t<700,r=tf({tagName:"div",style:{zIndex:"2",width:"85%",display:"flex",flexDirection:Ji.state.markdownSupportText?"column":"row",backgroundColor:"#2E2E2E",borderRadius:"4px",padding:"12px",visibility:"hidden",marginTop:"16px"},id:"error-block",testid:"error-block"}),n=tf({tagName:"div",style:{display:"flex",flexDirection:"row",width:"100%",height:"inherit",alignItems:"center",paddingTop:"25px"},id:"image-error-block",testid:"image-error-block"}),o=Df();o.style.width="16px",o.style.height="16px",o.style.margin="0 10px",Ji.state.markdownSupportText?ef(n,o):ef(r,o);const i=Ji.state.markdownSupportText&&null!=xf?xf.parse(Ji.state.markdownSupportText,{async:!1}):"",a=Rf({text:"",level:e?6:5,style:{color:"white",margin:"0",width:"85%",fontWeight:"400",height:"fit-content"},id:"image-error-message"}),s=Rf({text:"",level:5,style:{color:"white",margin:"0",width:"80%"},id:"image-error-support-message"});return i&&(s.innerHTML=i,ef(n,a)),ef(r,i?[n,s]:a),r})(h.clientHeight),E=(null===(s=Ji.state.autoCaptureSettings)||void 0===s?void 0:s.enabled)?Tf():function(){const t=document.createElementNS("http://www.w3.org/2000/svg","svg");return t.setAttribute("width","65"),t.setAttribute("height","65"),t.setAttribute("viewBox","0 0 24 24"),t.innerHTML='\n <path fill="#ffffff" d="M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z" opacity=".25"/><path fill="#ffffff" d="M12,4a8,8,0,0,1,7.89,6.7A1.53,1.53,0,0,0,21.38,12h0a1.5,1.5,0,0,0,1.48-1.75,11,11,0,0,0-21.72,0A1.5,1.5,0,0,0,2.62,12h0a1.53,1.53,0,0,0,1.49-1.3A8,8,0,0,1,12,4Z"><animateTransform attributeName="transform" type="rotate" dur="0.75s" values="0 12 12;360 12 12" repeatCount="indefinite"/></path>\n ',t}();E.style.display="none",ef(d,m),ef(d,_),ef(d,l),ef(d,v),ef(c,d);const b=tf({tagName:"div",style:{width:"100%",margin:"10%",zIndex:"1",display:"flex",justifyContent:"center"},id:"trigger-section",testid:"trigger-section"});ef(b,E),ef(b,y),ef(b,w),ef(c,b),ef(c,n.videoElement);const A=tf({tagName:"img",style:{display:"block",position:"absolute",objectFit:"cover",height:"100%",width:"100%",transform:"user"===of(e)?"scaleX(-1)":""},id:"image-preview",testid:"image-preview"});const C=(t=>{const e=tf({tagName:"div",style:{position:"absolute",height:"100%",width:"100%",objectFit:"cover"},id:"image-preview-section",testid:"image-preview-section"});return e.appendChild(t),e})(A);return ef(c,C),{component:c,setLoadingMode:t=>{var e;y.style.display="none",v.style.visibility="hidden",E.style.display="block",(null===(e=Ji.state.autoCaptureSettings)||void 0===e?void 0:e.enabled)&&(E.style.height="63px",E.style.width="63px"),t&&(g.style.visibility="visible")},setApprovalRetakeButtons:t=>{let{approveAction:e,retakeAction:r}=t;var n,o;y.style.display="none",v.style.display="none",w.style.display="flex";const i=w.querySelector("#approve-image"),a=w.querySelector("#retake-image"),s=i.cloneNode(!0);null===(n=i.parentNode)||void 0===n||n.replaceChild(s,i),s.addEventListener("click",e);const u=a.cloneNode(!0);null===(o=a.parentNode)||void 0===o||o.replaceChild(u,a),u.addEventListener("click",r)},hideApprovalRetakeButtons:()=>{w.style.display="none",v.style.display="flex"},setPreviewImage:(t,e)=>{A.src=t,g.style.visibility="hidden",n.videoElement.style.display="none",y.style.display="none",v.style.visibility="hidden",C.style.display="block",E.style.display=e?"none":"block"},setLoadingComplete:()=>{E.style.display="none",g.style.visibility="hidden"},setAutoCapturingError:(t,e)=>{if(!t)return void(v.style.visibility="hidden");let r;r=t==yo.feedback.RESTRICTED_CRITERIA&&e?e:Cf[t]?Cf[t].message:la.translate(t)!==t?t:Cf.other.message,document.getElementById("image-error-message").innerHTML=la.translate(r),v.style.visibility="visible"},enableVideoElement:()=>{y.style.display="block",n.videoElement.style.display="block","function"==typeof n.videoElement.play&&n.videoElement.play().catch((()=>{})),C.style.display="none",E.style.display="none"},setCapturingShowErrorMode:(t,e)=>{y.style.display="block",C.style.display="none",n.videoElement.style.display="block","function"==typeof n.videoElement.play&&n.videoElement.play().catch((()=>{}));const r=t==yo.feedback.RESTRICTED_CRITERIA,o=Cf[t]||Cf.other;document.getElementById("image-error-message").innerHTML=e&&r&&null!=xf?xf.parse(e,{async:!1}):la.translate(o.message),v.style.visibility="visible",g.style.visibility="hidden"},setTitleInstructionsMidStep:t=>{let{title:e,instructions:r}=t;e&&(document.getElementById("step-title").innerHTML=la.translate(e)),r&&(document.getElementById("step-instructions").innerHTML=la.translate(r))}}};class Zf{constructor(){this.isValid=!0,this.failedStep=null,this.steps=[]}addStepResponse(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;e||(this.isValid=!1,this.failedStep=t),this.steps.push(new qf(t,e,r))}}class qf{constructor(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;this.duration=0,this.success=!0,this.step=t,this.success=e,this.duration=r}}class Kf{constructor(){this.name=Ff.ACCEPTED}async handleFrame(){return new Zf}}class $f{constructor(){this.name=Ff.VALID}async handleFrame(t){let{context:e,frame:r,deviceInfo:n,detectionStrategy:o}=t;const i=await o.validate({frame:r,deviceInfo:n});return i.isValid?(e.validFramesCounter++,e.validFramesCounter>=e.validFramesThreshold&&e.setState(new Kf)):(e.validFramesCounter=0,e.invalidFramesCounter=1,e.invalidFramesCause=i.failedStep,e.setState(new Qf)),i}}class Jf{constructor(){this.name=Ff.REJECTED}async handleFrame(t){let{context:e,frame:r,detectionStrategy:n,deviceInfo:o}=t;const i=await n.validate({frame:r,deviceInfo:o});return i.isValid?(e.invalidFramesCounter=0,e.validFramesCounter=1,e.validFramesCounter>=e.validFramesThreshold?e.setState(new Kf):e.setState(new $f),i):e.invalidFramesCause!==i.failedStep?(e.invalidFramesCounter=1,e.invalidFramesCause=i.failedStep,e.setState(new Qf),i):(e.invalidFramesCounter++,i)}}class Qf{constructor(){this.name=Ff.INVALID}async handleFrame(t){let{context:e,frame:r,detectionStrategy:n,deviceInfo:o}=t;const i=await n.validate({frame:r,deviceInfo:o});return i.isValid?(e.invalidFramesCounter=0,e.validFramesCounter=1,e.validFramesCounter>=e.validFramesThreshold?e.setState(new Kf):e.setState(new $f)):e.invalidFramesCause!==i.failedStep?(e.invalidFramesCounter=1,e.invalidFramesCause=i.failedStep):(e.invalidFramesCounter++,e.invalidFramesCounter>=e.invalidFramesThreshold&&e.setState(new Jf)),i}}class tp{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3;this.detectionStrategy=t,this.state=new Qf,this.validFramesCounter=0,this.invalidFramesCounter=0,this.invalidFramesCause=null,this.validFramesThreshold=e,this.invalidFramesThreshold=r}setState(t){this.state=t}async handleFrame(t){let{frame:e,deviceInfo:r}=t;return await this.state.handleFrame({context:this,frame:e,deviceInfo:r,detectionStrategy:this.detectionStrategy})}}async function ep(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=function(t,e,r){const n=document.createElement("canvas"),o=e||{height:t.height,width:t.width},i=n.getContext("2d");n.width=o.width,n.height=o.height,r?null==i||i.drawImage(t,r.x,r.y,r.width,r.height,0,0,o.width,o.height):null==i||i.drawImage(t,0,0,o.width,o.height);const a=null==i?void 0:i.getImageData(0,0,o.width,o.height);return n.remove(),a}(e,arguments.length>3?arguments[3]:void 0,arguments.length>4?arguments[4]:void 0),i=await new Promise(((i,a)=>{navigator.serviceWorker.ready.then((s=>{var u;const c=e=>{e.data.type===t+"_RESULT"&&(navigator.serviceWorker.removeEventListener("message",c),i(e.data.result)),e.data.type===t+"_ERROR"&&(navigator.serviceWorker.removeEventListener("message",c),sa(e.data.error.toString(),t,"error"),a(e.data.error))};navigator.serviceWorker.addEventListener("message",c),null===(u=s.active)||void 0===u||u.postMessage(o({type:t,imageData:n,height:e.height,width:e.width},r))}))}));return ha(`****** in web-SDK return result for ${t}`,i),i}async function rp(t){if(t instanceof HTMLVideoElement&&t.paused)return[];return ep("DETECT_DOCUMENT",t,{},kh[fa.DOCUMENT_DETECTOR].imageDimensions)}async function np(t,e){return ep("BLUR_GLARE_CLASSIFY",t,{},kh[fa.BLUR_GLARE_CLASSIFIER].imageDimensions,e)}class op{constructor(t,e){this.hasBarcode=t,this.barcodeModel=t?Ph(e):null,this.rawBarcodeData={}}async validate(t){let{frame:e,deviceInfo:r}=t;var n;const o=new Zf;let i=Date.now();const a=null===(n=await rp(e))||void 0===n?void 0:n[0];let s=Date.now()-i;if(o.addStepResponse(Qi.DOCUMENT_DETECTION,void 0!==a,s),!a)return o;i=Date.now();const u=Gf({captureFrame:document.getElementById("overlay-frame environment").getBoundingClientRect(),object:a,videoWidth:e.width,videoHeight:e.height,deviceWidth:r.width,deviceHeight:r.height,threshold:Ji.state.autoCaptureSettings.settings.capture.documentBackSizeThreshold,iouThreshold:Ji.state.autoCaptureSettings.settings.capture.documentBackIouThreshold});if(s=Date.now()-i,o.addStepResponse(Qi.DOCUMENT_POSITION,u,s),!u)return o;i=Date.now();const c=await np(e,a);s=Date.now()-i;const l=c.some((t=>"blur"===t.class));if(o.addStepResponse(Qi.BLUR_DETECTION,!l,s),l)return o;const d=c.some((t=>"glare"===t.class));if(o.addStepResponse(Qi.GLARE_DETECTION,!d,s),d)return o;if(this.hasBarcode){i=Date.now();const t=this.barcodeModel.detect(e);this.rawBarcodeData=null==t?void 0:t.reduce(((t,e)=>("string"==typeof e.extra&&(t[e.class]=e.extra),t)),{}),s=Date.now()-i;const r=Object.keys(this.rawBarcodeData).length>0;if(o.addStepResponse(Qi.BARCODE_DETECTION,r,s),!r)return o}return o}}class ip{constructor(){this.durations=[],this.countSuccess=0,this.countFailed=0}}class ap{constructor(){this.frameHandleDurations=[],this.stableCounts=[0],this.stats=new Map,Object.values(Qi).forEach((t=>{this.stats.set(t,new ip)}))}addStats(t,e){this.frameHandleDurations.push(e),t.isValid?this.stableCounts[this.stableCounts.length-1]++:this.stableCounts.push(0),t.steps.forEach((t=>{this.addStat(t.step,t.duration,t.success?1:0,t.success?0:1)}))}addStat(t,e,r,n){const o=this.stats.get(t);if(!o)throw new Error(`Stat for step ${t} not found`);o.durations.push(e),o.countSuccess+=r,o.countFailed+=n}}let sp=!1;const up=t=>{sp=t};async function cp(t){let{camera:e,onDetect:r,showError:n,onMetricsBatch:o,hasBarcode:i,supportedBarcodeSymbologies:a}=t;var s,u,c,l,d;const h=new tp(new op(i,a),function(t){var e;const r=null===(e=Ji.state.autoCaptureSettings.settings)||void 0===e?void 0:e.stability,n=t?null==r?void 0:r.documentBackStableFramesCountWithBarcode:null==r?void 0:r.documentBackStableFramesCountNoBarcode,o=null!=n?n:null==r?void 0:r.documentBackStableFramesCount;return Number.isFinite(o)&&o>0?o:1}(i)),f=null===(s=Ji.state.autoCaptureSettings.settings)||void 0===s?void 0:s.frameSamplingThreshold;up(!0);const p=new ap;let g=new ap,m=0;for(;h.state.name!==Ff.ACCEPTED&&sp;){const t=Date.now(),i=Vf(e.videoElement),a={width:null!==(c=null===(u=e.videoElement.getBoundingClientRect())||void 0===u?void 0:u.width)&&void 0!==c?c:0,height:null!==(d=null===(l=e.videoElement.getBoundingClientRect())||void 0===l?void 0:l.height)&&void 0!==d?d:0},s=await h.handleFrame({frame:i,deviceInfo:a}),y=Date.now()-t+50;p.addStats(s,y),g.addStats(s,y),m++,h.stats=p,f&&m>=f&&(null==o||o(g),g=new ap,m=0),await Hf({context:h,onDetect:r,showError:n,frame:i}),await new Promise((t=>setTimeout(t,50)))}m>0&&(null==o||o(g))}class lp{async validate(t){let{frame:e,deviceInfo:r}=t;var n;const o=new Zf;let i=Date.now();const a=null===(n=await rp(e))||void 0===n?void 0:n[0];let s=Date.now()-i;if(o.addStepResponse(Qi.DOCUMENT_DETECTION,void 0!==a,s),!a)return o;i=Date.now();const u=Gf({captureFrame:document.getElementById("overlay-frame environment").getBoundingClientRect(),object:a,videoWidth:e.width,videoHeight:e.height,deviceWidth:r.width,deviceHeight:r.height,threshold:Ji.state.autoCaptureSettings.settings.capture.documentFrontSizeThreshold,iouThreshold:Ji.state.autoCaptureSettings.settings.capture.documentFrontIouThreshold});if(s=Date.now()-i,o.addStepResponse(Qi.DOCUMENT_POSITION,u,s),!u)return o;i=Date.now();const c=await np(e,a);s=Date.now()-i;const l=c.some((t=>"blur"===t.class));if(o.addStepResponse(Qi.BLUR_DETECTION,!l,s),l)return o;const d=c.some((t=>"glare"===t.class));return o.addStepResponse(Qi.GLARE_DETECTION,!d,s),o}}let dp=!1;const hp=t=>{dp=t};class fp{async validate(t){let{frame:e,deviceInfo:r}=t;var n;const o=new Zf;let i=Date.now();const a=null===(n=await async function(t){return t instanceof HTMLVideoElement&&t.paused?[]:ep("DETECT_FACE_LANDMARKS",t)}(e))||void 0===n?void 0:n[0];let s=Date.now()-i;if(o.addStepResponse(Qi.FACE_DETECTION,"face"===(null==a?void 0:a.class),s),!a)return o;i=Date.now();const u=Gf({captureFrame:document.getElementById("overlay-frame user").getBoundingClientRect(),object:a,videoWidth:e.width,videoHeight:e.height,deviceWidth:r.width,deviceHeight:r.height,threshold:Ji.state.autoCaptureSettings.settings.faceDetector.selfieSizeThreshold,iouThreshold:Ji.state.autoCaptureSettings.settings.faceDetector.selfieIouThreshold});return s=Date.now()-i,o.addStepResponse(Qi.FACE_POSITION,u,s),o}}let pp=!1;const gp=t=>{pp=t};const mp=new Map;class yp extends Error{constructor(t,e,r){super(r||`Error during ${e}: ${t}`),this.errorCode=t,this.step=e,this.name="CaptureError"}}function wp(t,e){const r=mp.get(t);r&&(r.reject(e),mp.delete(t))}function _p(t,e,r){const n=mp.get(t);return n&&(n.reject(new yp("other","document"===t?"document_front":"selfie",`New capture${"document"===t?"Document":"Selfie"} call cancelled previous one`)),mp.delete(t)),new Promise(((n,o)=>{mp.set(t,{resolve:n,reject:o,onCapture:r,captures:[],stepType:t,acquisitionId:e})}))}function vp(t){return"document_front"===t||"document_back"===t?"document":"selfie"===t?"selfie":null}async function Ep(t,e){var r,n,o,i;let a="camera-error";if("NotAllowedError"===e.name){a="Permission dismissed"===e.message?"camera-permission-dismissed":"camera-permission-denied";const s=oa.createCameraNotAllowedEvent(e.message,t);await ia(null===(r=Ji.state)||void 0===r?void 0:r.step,null===(n=Ji.state)||void 0===n?void 0:n.userToken,null===(o=Ji.state)||void 0===o?void 0:o.sessionId,null===(i=Ji.state)||void 0===i?void 0:i.clientId,s),Ji.dispatch("setIsCapturingProcessStarted",!1);const u=vp(t);u&&wp(u,new yp(a,t))}Xi(t,a)}function bp(t){const e=(t=>{var e,r,n,o;const[i,a]=t.split(",");if(!i||!a)throw new Error("unable-to-parse-data-uri");const s=null===(n=null===(r=null===(e=i.split(";"))||void 0===e?void 0:e[0])||void 0===r?void 0:r.split(":"))||void 0===n?void 0:n[1];if(!s)throw new Error("unable-to-parse-data-uri");const u=null===(o=s.split("/"))||void 0===o?void 0:o[1];if(!u)throw new Error("unable-to-parse-data-uri");return{data:a,format:u}})(t);return{image:{data:e.data,format:e.format,captureMargins:nf()}}}let Ap,Cp=!1;const Ip=async t=>{"expired"===(null==t?void 0:t.status)&&Yi("processing","session-expired",`Session expired for session id: ${Ji.state.sessionId}`)},Sp=t=>{let{step:e}=t;var r,n,o;const i=null===(n=null===(r=Ji.state)||void 0===r?void 0:r.autoCaptureSettings)||void 0===n?void 0:n.enabled;let a=!1;const s=null===(o=Ji.state)||void 0===o?void 0:o.videoCaptureSettings,u=(t=>{let e,r,n=!1;const o=bf(t),i=new cf(o),a=async()=>{n&&(await i.stopCamera(),i.stream&&i.stream.getTracks().forEach((t=>{"live"==t.readyState&&t.stop()})),n=!1)};return{get videoStream(){return r},startVideoFeed:async t=>{var o,s,u;n&&await a(),"environment"==t&&(e=await mf());const c=null!==(s=null===(o=null==e?void 0:e.selectedCamera)||void 0===o?void 0:o.deviceId)&&void 0!==s?s:t,l=Ef(t,null===(u=Ji.state)||void 0===u?void 0:u.videoCaptureSettings);lf.getInstance().stopStream(),r=await i.startCamera(c,l),n=!0},stopVideoFeed:a,videoElement:i.videoElement,getDataUri:i.getDataUri,getCameraInfo:()=>e}})(of(e));!function(t){ji({type:"page-load",step:t})}(e),(async()=>{const t=await $h(Ji.state.sessionId,Ji.state.userToken,Ji.state.clientId);Ip(t)})();const c=Yf({step:e,setImage:l,camera:u});async function l(t){let{suspendedPreview:r=!1,frame:n,context:o}=t;if(n||(n=Vf(u.videoElement)),u.videoElement.style.display="none","function"==typeof u.videoElement.pause&&u.videoElement.pause(),"document_front"===e){hp(!1);const t=document.getElementById("front-document-animation");t&&(t.style.opacity="0")}"document_back"===e&&up(!1),"selfie"===e&&gp(!1);const i=Date.now(),l=function(t){const e=t.getCameraInfo();return{selectedCamera:(null==e?void 0:e.selectedCamera)&&{label:e.selectedCamera.label},camerasInfo:(null==e?void 0:e.optionalCameras)&&e.optionalCameras.map((t=>({label:t.label})))}}(u);if(!a)return;c.setLoadingMode(null==s?void 0:s.showLoadingBlock);const f=(t=>t.toDataURL("image/jpeg"))(n);c.setPreviewImage(f,"selfie"===e),"selfie"!==e?await h(r,f,l,i,o):(c.setTitleInstructionsMidStep({instructions:"selfie_approval_autocapture"}),c.setApprovalRetakeButtons({approveAction:async()=>{c.hideApprovalRetakeButtons(),await h(r,f,l,i,o)},retakeAction:async()=>{c.hideApprovalRetakeButtons(),d()}}))}function d(){if("selfie"===e&&c.setTitleInstructionsMidStep({instructions:i?"second_title_face_autocapture":"second_title_document_face"}),"document_front"===e){const t=document.getElementById("front-document-animation");t&&(t.style.opacity="1")}u.startVideoFeed(of(e)).then((()=>{a=!0,c.enableVideoElement(),i&&(c.setAutoCapturingError(null),g(e))})).catch((async t=>{throw await Ep(e,t),t}))}async function h(t,r,n,o,l){var h,f;const p=[];!function(t){var r,n,o,i;const a=oa.createUserActionEvent("capture_image",e,t);ia(null===(r=Ji.state)||void 0===r?void 0:r.step,null===(n=Ji.state)||void 0===n?void 0:n.userToken,null===(o=Ji.state)||void 0===o?void 0:o.sessionId,null===(i=Ji.state)||void 0===i?void 0:i.clientId,a)}(null==l?void 0:l.stats),function(t,e){ji({type:"capture-image",imageType:e,step:t})}(e,af(e));try{const g=Date.now(),m=bp(r);a=!1;const y=vp(e),w=y?function(t){var e;return null===(e=mp.get(t))||void 0===e?void 0:e.acquisitionId}(y):void 0;p.push(rf(Ji.state.sessionId,Ji.state.userToken,Ji.state.clientId,null==m?void 0:m.image,n,af(e),(null==l?void 0:l.detectionStrategy)instanceof op?null===(h=l.detectionStrategy)||void 0===h?void 0:h.rawBarcodeData:void 0,w)),p.push(t?new Promise((t=>setTimeout(t,500))):Promise.resolve(null)),c.setLoadingMode(null==s?void 0:s.showLoadingBlock);const _=(await Promise.all(p))[0];Object.prototype.hasOwnProperty.call(_,"has_barcode")&&(Cp=_.has_barcode,Ap=null!==(f=_.supported_barcode_symbologies)&&void 0!==f?f:[]),async function(t){let{step:e,requestStartTime:r,imageProcessingStartTime:n,serverProcessingTime:o,userToken:i,sessionId:a,clientId:s}=t;const u=Date.now()-r,c=n?r-n:0,l=oa.createUploadImageEvent(e,String(u),String(o),String(c));await ia(e,i,a,s,l)}({step:e,requestStartTime:g,imageProcessingStartTime:o,serverProcessingTime:_.serverProcessingTime,userToken:Ji.state.userToken,sessionId:Ji.state.sessionId,clientId:Ji.state.clientId}),Ji.dispatch("setMissingImages",_.missing_images),c.setLoadingComplete(),function(t,e,r){ji({type:"capture-image-result",imageType:e,feedback:r,step:t})}(e,af(e),_.feedback);const v=vp(e);if(v&&"modular"===Ji.state.flowType){const t=af(e);!function(t,e){let r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const n=mp.get(t);if(n){if(n.onCapture)try{n.onCapture(e)}catch(t){console.error("onCapture callback error:",t)}r&&n.captures.push(e)}}(v,{sessionId:Ji.state.sessionId,type:t===wo.image_type.DOCUMENT_FRONT?"document_front":t===wo.image_type.DOCUMENT_BACK?"document_back":"selfie",feedback:_.feedback})}if("ok"!==_.feedback)return await async function(t){jf("border-color",Lf),i?c.setAutoCapturingError(t.feedback,t.custom_feedback):c.setCapturingShowErrorMode(t.feedback,t.custom_feedback),await new Promise((t=>setTimeout(t,1e3))),jf("border-color",Uf)}(_),void d();if(await u.stopVideoFeed(),jf("border-color",zf),await new Promise((t=>setTimeout(t,750))),jf("border-color",Uf),"modular"===Ji.state.flowType)if("document_front"===e&&_.missing_images.includes(wo.image_type.DOCUMENT_BACK))Ji.dispatch("setStep","document_back");else{const t=document.getElementById(Ji.state.rootElementId);t&&(t.style.visibility="hidden"),v&&function(t){const e=mp.get(t);e&&(e.resolve({captures:[...e.captures]}),mp.delete(t))}(v)}else{const t=(t=>{if("modular"===Ji.state.flowType)return null;let e;return e=t&&t.length>0?t[0]:"processing",e})(Ji.state.missingImages);t&&Ji.dispatch("setStep",t)}}catch(t){c.setLoadingComplete(),c.setCapturingShowErrorMode(yo.feedback.OTHER);const r=vp(e);r&&"modular"===Ji.state.flowType&&wp(r,new yp("failed-to-submit-image",e)),u.startVideoFeed(of(e)).then((()=>{a=!0})).catch((async t=>{throw await Ep(e,t),t})),Xi(e,"failed-to-submit-image")}}function f(t){var r,n,o,i;const a=oa.createUserActionEvent("autocapture_stats",e,t);ia(null===(r=Ji.state)||void 0===r?void 0:r.step,null===(n=Ji.state)||void 0===n?void 0:n.userToken,null===(o=Ji.state)||void 0===o?void 0:o.sessionId,null===(i=Ji.state)||void 0===i?void 0:i.clientId,a)}async function p(){var t,r,n,o,i;try{const a=u.getCameraInfo(),s=function(t,e){const r=ff(),n={label:e,is_ios:r};if(r||!t)return n;const o=t.getVideoTracks()[0];if(!o)return n;try{const t=o.getSettings();n.width=t.width,n.height=t.height,n.frame_rate=t.frameRate?Math.round(t.frameRate):void 0}catch(t){}try{const t=o.getCapabilities(),e=Array.isArray(t.focusMode)?t.focusMode:[];e.length>0&&(n.has_continuous_focus=e.includes("continuous"))}catch(t){}return n}(u.videoStream,null===(t=null==a?void 0:a.selectedCamera)||void 0===t?void 0:t.label),c=await oa.createCaptureStartEvent(e,s);ia(null===(r=Ji.state)||void 0===r?void 0:r.step,null===(n=Ji.state)||void 0===n?void 0:n.userToken,null===(o=Ji.state)||void 0===o?void 0:o.sessionId,null===(i=Ji.state)||void 0===i?void 0:i.clientId,c)}catch(t){ha("Failed to send `capture_start` event",t)}}async function g(t){if("document_front"===t){for(;!a||u.videoElement.paused;)await new Promise((t=>setTimeout(t,100)));return u.videoElement.onloadedmetadata=()=>{var t;ha("video dimensions (width, height, orientation): ",u.videoElement.videoWidth,u.videoElement.videoHeight,null===(t=null===window||void 0===window?void 0:window.screen)||void 0===t?void 0:t.orientation)},await async function(t){let{camera:e,onDetect:r,showError:n,onMetricsBatch:o}=t;var i,a,s,u,c,l,d,h;const f=new tp(new lp,null!==(s=null===(a=null===(i=Ji.state.autoCaptureSettings.settings)||void 0===i?void 0:i.stability)||void 0===a?void 0:a.documentFrontStableFramesCount)&&void 0!==s?s:2),p=null===(u=Ji.state.autoCaptureSettings.settings)||void 0===u?void 0:u.frameSamplingThreshold,g=new ap;let m=new ap,y=0;for(hp(!0);f.state.name!==Ff.ACCEPTED&&dp;){const t=Date.now(),i=Vf(e.videoElement),a={width:null!==(l=null===(c=e.videoElement.getBoundingClientRect())||void 0===c?void 0:c.width)&&void 0!==l?l:0,height:null!==(h=null===(d=e.videoElement.getBoundingClientRect())||void 0===d?void 0:d.height)&&void 0!==h?h:0},s=await f.handleFrame({frame:i,deviceInfo:a}),u=Date.now()-t+50;g.addStats(s,u),m.addStats(s,u),y++,f.stats=g,p&&y>=p&&(null==o||o(m),m=new ap,y=0),await Hf({context:f,onDetect:r,showError:n,frame:i}),await new Promise((t=>setTimeout(t,50)))}y>0&&(null==o||o(m))}({camera:u,onDetect:l,showError:c.setAutoCapturingError,onMetricsBatch:f})}if("document_back"===t){for(;!a||u.videoElement.paused;)await new Promise((t=>setTimeout(t,100)));return u.videoElement.onloadedmetadata=()=>{var t;ha("video dimensions (width, height, orientation): ",u.videoElement.videoWidth,u.videoElement.videoHeight,null===(t=null===window||void 0===window?void 0:window.screen)||void 0===t?void 0:t.orientation)},await cp({camera:u,onDetect:l,showError:c.setAutoCapturingError,onMetricsBatch:f,hasBarcode:Cp,supportedBarcodeSymbologies:Ap})}if("selfie"===t){for(;!a||u.videoElement.paused;)await new Promise((t=>setTimeout(t,100)));return u.videoElement.onloadedmetadata=()=>{var t;ha("video dimensions (width, height, orientation): ",u.videoElement.videoWidth,u.videoElement.videoHeight,null===(t=null===window||void 0===window?void 0:window.screen)||void 0===t?void 0:t.orientation)},await async function(t){let{camera:e,onDetect:r,showError:n,onMetricsBatch:o}=t;var i,a,s,u,c,l,d,h;const f=new tp(new fp,null!==(s=null===(a=null===(i=Ji.state.autoCaptureSettings.settings)||void 0===i?void 0:i.stability)||void 0===a?void 0:a.selfieStableFramesCount)&&void 0!==s?s:30),p=null===(u=Ji.state.autoCaptureSettings.settings)||void 0===u?void 0:u.frameSamplingThreshold;gp(!0);const g=new ap;let m=new ap,y=0;for(;f.state.name!==Ff.ACCEPTED&&pp;){const t=Date.now(),i=Vf(e.videoElement),a={width:null!==(l=null===(c=e.videoElement.getBoundingClientRect())||void 0===c?void 0:c.width)&&void 0!==l?l:0,height:null!==(h=null===(d=e.videoElement.getBoundingClientRect())||void 0===d?void 0:d.height)&&void 0!==h?h:0},s=await f.handleFrame({frame:i,deviceInfo:a}),u=Date.now()-t;g.addStats(s,u),m.addStats(s,u),y++,f.stats=g,p&&y>=p&&(null==o||o(m),m=new ap,y=0),await Hf({context:f,onDetect:r,showError:n,frame:i,isSelfie:!0}),await new Promise((t=>setTimeout(t,50)))}y>0&&(null==o||o(m))}({camera:u,onDetect:l,showError:c.setAutoCapturingError,onMetricsBatch:f})}}i&&g(e),(async t=>{var e,r,n,o;const i=oa.createPageViewEvent(t);await ia(null===(e=Ji.state)||void 0===e?void 0:e.step,null===(r=Ji.state)||void 0===r?void 0:r.userToken,null===(n=Ji.state)||void 0===n?void 0:n.sessionId,null===(o=Ji.state)||void 0===o?void 0:o.clientId,i)})(e);const m=document.getElementById(Ji.state.rootElementId);return m&&(m.style.visibility="hidden"),u.startVideoFeed(of(e)).then((async()=>{a=!0,m&&(m.style.visibility="visible");try{u.videoElement.readyState<HTMLMediaElement.HAVE_METADATA&&await Promise.race([new Promise((t=>u.videoElement.addEventListener("loadedmetadata",(()=>t()),{once:!0}))),new Promise((t=>setTimeout(t,3e3)))]),await p()}catch(t){ha("Failed to send `capture_start` event",t)}})).catch((async t=>{throw await Ep(e,t),t})),c.component},Tp=()=>{ji({type:"start-verification-processing",step:Ji.state.step}),Wi("processing","processing",Ji.state.sessionId);const t=Dp("processing-verification");ef(t,Pf({text:"Processing Verification",id:"processing-verification-header",testid:"processing-verification-header"}));const e=async()=>{const t=await $h(Ji.state.sessionId,Ji.state.userToken,Ji.state.clientId);o(t)},r=()=>{setTimeout(e,3e3)},n=async t=>{Ji.dispatch("setStep",t.status),Ji.dispatch("setStatus",t.status)},o=async t=>{var e,o,i;if(Ji.dispatch("setMissingImages",t.missing_images),t.status)if("complete"===(null==t?void 0:t.status)){lf.getInstance().stopStream();const r=oa.createProcessingCompleteEvent();await ia(Ji.state.step,Ji.state.userToken,null===(e=Ji.state)||void 0===e?void 0:e.sessionId,null===(o=Ji.state)||void 0===o?void 0:o.clientId,r),n(t),Wi("complete",t.status,Ji.state.sessionId),function(t,e,r){ji({type:"verification-complete",step:t,sessionId:e,callbackUrl:r})}("complete",Ji.state.sessionId,t.callback_url),i=zi,sessionStorage.removeItem(i)}else"recapture"===(null==t?void 0:t.status)?(n(t),Ji.dispatch("setIsCapturingProcessStarted",!1),Wi("recapture",t.status,Ji.state.sessionId),function(t,e,r){ji({type:"verification-recapture",step:t,sessionId:e,reason:r})}("recapture",t.status,t.recapture_reason)):"expired"===(null==t?void 0:t.status)?Yi("processing","session-expired",`Session expired for session id: ${Ji.state.sessionId}`):r();else"processing"!==t.state&&(n(t),r())};return e(),t},Dp=t=>tf({tagName:"div",style:{display:"flex",height:"100%",justifyContent:"space-between",flexDirection:"column",alignItems:"center"},id:t,testid:"processing-verification"});function Op(t,e){var r;if(!t)return;null===(r=e.firstChild)||void 0===r||r.remove();const n=function(t){switch(t){case"processing":return Tp;case"document_front":case"document_back":case"selfie":return Sp;default:throw new Error("Invalid step")}}(t);ef(e,n({step:t}))}function Rp(t){let{key:e,state:r}=t;const n=r.rootElementId,o=document.getElementById(n);"step"===e&&"complete"!==r.step&&"recapture"!==r.step&&Op(r.step,o),o&&"processing"===r.step&&(o.style.visibility="hidden")}function Mp(){const t=function(t){try{return JSON.parse(t)}catch(t){return console.error(t),null}}(Ui(zi));if(!t)throw new Error("Error restarting session, stored session data is invalid or missing");const e=t.sessionId,r=t.userToken,n=t.flowType;return Ji.dispatch("setSessionId",e),Ji.dispatch("setUserToken",r),{sessionId:e,userToken:r,flowType:n}}async function Np(){var t,e;if(null===(t=Ji.state.autoCaptureSettings)||void 0===t?void 0:t.enabled){const t=Date.now();try{await Pp(),ha("all models loaded - auto-capture enabled")}catch(t){Ji.dispatch("setAutoCaptureSettings",{enabled:!1,autocapture_settings:null===(e=Ji.state.autoCaptureSettings)||void 0===e?void 0:e.settings}),ha("Model loading did not complete on time:",t);sa(`timed out loading models: ${Bh.filter((t=>kh[t].status!==Nh.LOADED)).map((t=>t)).join(", ")}`,"model_load_timeout","init")}const r=Object.values(kh).filter((t=>t.status===Nh.LOADED)).map((t=>t.loadingStats));!async function(t,e){const r=oa.createSdkInitEvent(t,e);await ua("init",r)}(Date.now()-t,r)}}async function kp(t){var e;try{await lf.getInstance().startNewStream({video:o(o({},Ef("environment",null===(e=Ji.state)||void 0===e?void 0:e.videoCaptureSettings)),{},{deviceId:await vf("environment")})}),Gi("init",t),function(t,e,r){const n=document.getElementById(r);if("modular"===Ji.state.flowType)return;n.style.visibility="visible",Op(t[0],n)}(Ji.state.missingImages,Ji.state.sessionId,Ji.state.rootElementId)}catch(t){await Ep("init",t)}}async function xp(t){let{status:e,sessionId:r,userToken:n,missingImages:o,rootElementId:i,language:a,flowType:s}=t;await async function(){if(Uh)await Uh;else{const t=await qi(Ji.state.clientId);await Kh(t)}}(),void 0!==s&&""!==s&&Ji.dispatch("setFlowType",s),function(t,e){ji({type:"session-granted",step:t,sessionId:e})}("init",r),Ji.dispatch("setStatus",e),Ji.dispatch("setSessionId",r),Ji.dispatch("setUserToken",n),Ji.dispatch("setMissingImages",o),Ji.dispatch("setRootElement",i),Ji.dispatch("setLanguage",a),async function(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"en";la.overrideLanguage(da[r]||da.en);let n=document.getElementById(e);if(!n){n=tf({tagName:"div",style:{background:"#fff",position:"absolute",top:"0",left:"0",zIndex:"1",width:"100%",height:"100%",font:"inherit"},id:e,testid:"root"});const t=document.createElement("style");t.innerHTML=`\n @media only screen and (max-height: 576px) {\n #${e} #trigger-section {\n margin: 0 !important;\n }\n #${e} #page-header {\n height: 5% !important;\n }\n }\n `,ef(document.head,t),ef(document.body,n)}"modular"===Ji.state.flowType&&(n.style.visibility="hidden")}(Ji.state.sessionId,Ji.state.rootElementId,Ji.state.language),function(){try{Bi.events.off(Li,Rp)}catch(t){}Bi.events.on(Li,Rp)}(),await Np(),"modular"!==Ji.state.flowType?await kp(r):Gi("init",r)}const Pp=async()=>{const t=Ji.state.autoCaptureSettings.settings.modelLoadingTimeout;return Promise.race([Fh(),new Promise(((e,r)=>setTimeout((()=>r(new Error(`Model loading timed out after ${t} ms`))),t)))])};async function Bp(t){if(Ji.state.isCapturingProcessStarted)return void Xi(Ji.state.step,"trying-to-initialize-active-session");const e=t?await async function(t){let e,r,n;try{const o=await Qh(t,Ji.state.consentVersion,Ji.state.clientId);return e=o.sessionId,r=o.userToken,n=o.flowType,Ji.dispatch("setSessionId",e),Ji.dispatch("setUserToken",r),{sessionId:e,userToken:r,flowType:n}}catch(t){throw console.log("Error starting session"),console.error(t),t}}(t):Mp(),r=e.sessionId,n=e.userToken,o=e.flowType;if(!r)return void Xi(Ji.state.step,"other");const{missing_images:i,status:a}=await $h(r,n,Ji.state.clientId);return Ji.dispatch("setIsCapturingProcessStarted",!0),await xp({status:a,sessionId:r,userToken:n,missingImages:i,rootElementId:Ji.state.rootElementId,language:Ji.state.language,flowType:o}),!0}async function Fp(t){if("modular"!==Ji.state.flowType)throw new Error('showStep() is only available when flowType is "modular". Current flowType: '+Ji.state.flowType);if(!Ji.state.isCapturingProcessStarted||!Ji.state.sessionId)throw new Error("Session is not active. Call start() first to start a verification session.");let e;try{e=function(t){if("document"===t)return"document_front";if("selfie"===t)return"selfie";throw new Error(`Invalid step type: ${t}`)}(t)}catch(e){throw new Error(`Cannot show step "${t}": ${e instanceof Error?e.message:"Step type not available in missing_images"}`)}const r=document.getElementById(Ji.state.rootElementId);r&&"modular"===Ji.state.flowType&&(r.style.visibility="hidden"),Ji.dispatch("setStep",e)}async function Lp(t){try{return await Bp(t)}catch(t){throw console.log("Error starting session"),console.error(t),t}}async function zp(){try{return await async function(){if("recapture"===Ji.state.verificationStatus||"pending"===Ji.state.verificationStatus){const{sessionId:t,userToken:e}=Mp(),{missing_images:r,status:n}=await $h(t,e,Ji.state.clientId);return await xp({status:n,sessionId:t,userToken:e,missingImages:r,rootElementId:Ji.state.rootElementId,language:Ji.state.language}),!0}Xi(Ji.state.step,"trying-to-initialize-active-session")}()}catch(t){throw console.log("Error restarting session"),console.error(t),t}}async function Up(t){if(!t||!t.acquisitionId)throw new Error("captureDocument requires an acquisitionId");const e=_p("document",t.acquisitionId,t.onCapture);return Fp("document").catch((t=>{const e=t instanceof Error?t.message:String(t);wp("document",new yp("other","document_front",e))})),e}async function Vp(t){if(!t||!t.acquisitionId)throw new Error("captureSelfie requires an acquisitionId");const e=_p("selfie",t.acquisitionId,t.onCapture);return Fp("selfie").catch((t=>{const e=t instanceof Error?t.message:String(t);wp("selfie",new yp("other","selfie",e))})),e}const Hp=()=>Io;const jp="2.4.0",Gp={initialize:e,...Object.freeze({__proto__:null,CaptureError:yp,captureDocument:Up,captureSelfie:Vp,recapture:zp,start:Lp,version:Hp})};export{yp as CaptureError,jp as PACKAGE_VERSION,Up as captureDocument,Vp as captureSelfie,Gp as idv,zp as recapture,Lp as start,Hp as version};
1
+ "undefined"==typeof globalThis&&("undefined"!=typeof window?(window.globalThis=window,window.global=window):"undefined"!=typeof self&&(self.globalThis=self,self.global=self));import t from"./common.js";import{initialize as e}from"./common.js";export{initialize}from"./common.js";function r(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function o(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?n(Object(o),!0).forEach((function(e){r(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):n(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function a(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var s={},u={};function c(t){let e=t.length;for(;--e>=0;)t[e]=0}const l=256,d=286,h=30,f=15,p=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),g=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),m=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),y=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),w=new Array(576);c(w);const _=new Array(60);c(_);const v=new Array(512);c(v);const E=new Array(256);c(E);const b=new Array(29);c(b);const A=new Array(h);function C(t,e,r,n,o){this.static_tree=t,this.extra_bits=e,this.extra_base=r,this.elems=n,this.max_length=o,this.has_stree=t&&t.length}let I,S,T;function D(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}c(A);const O=t=>t<256?v[t]:v[256+(t>>>7)],R=(t,e)=>{t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},M=(t,e,r)=>{t.bi_valid>16-r?(t.bi_buf|=e<<t.bi_valid&65535,R(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=r-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=r)},N=(t,e,r)=>{M(t,r[2*e],r[2*e+1])},k=(t,e)=>{let r=0;do{r|=1&t,t>>>=1,r<<=1}while(--e>0);return r>>>1},x=(t,e,r)=>{const n=new Array(16);let o,i,a=0;for(o=1;o<=f;o++)n[o]=a=a+r[o-1]<<1;for(i=0;i<=e;i++){let e=t[2*i+1];0!==e&&(t[2*i]=k(n[e]++,e))}},P=t=>{let e;for(e=0;e<d;e++)t.dyn_ltree[2*e]=0;for(e=0;e<h;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0},B=t=>{t.bi_valid>8?R(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},F=(t,e,r,n)=>{const o=2*e,i=2*r;return t[o]<t[i]||t[o]===t[i]&&n[e]<=n[r]},L=(t,e,r)=>{const n=t.heap[r];let o=r<<1;for(;o<=t.heap_len&&(o<t.heap_len&&F(e,t.heap[o+1],t.heap[o],t.depth)&&o++,!F(e,n,t.heap[o],t.depth));)t.heap[r]=t.heap[o],r=o,o<<=1;t.heap[r]=n},z=(t,e,r)=>{let n,o,i,a,s=0;if(0!==t.last_lit)do{n=t.pending_buf[t.d_buf+2*s]<<8|t.pending_buf[t.d_buf+2*s+1],o=t.pending_buf[t.l_buf+s],s++,0===n?N(t,o,e):(i=E[o],N(t,i+l+1,e),a=p[i],0!==a&&(o-=b[i],M(t,o,a)),n--,i=O(n),N(t,i,r),a=g[i],0!==a&&(n-=A[i],M(t,n,a)))}while(s<t.last_lit);N(t,256,e)},U=(t,e)=>{const r=e.dyn_tree,n=e.stat_desc.static_tree,o=e.stat_desc.has_stree,i=e.stat_desc.elems;let a,s,u,c=-1;for(t.heap_len=0,t.heap_max=573,a=0;a<i;a++)0!==r[2*a]?(t.heap[++t.heap_len]=c=a,t.depth[a]=0):r[2*a+1]=0;for(;t.heap_len<2;)u=t.heap[++t.heap_len]=c<2?++c:0,r[2*u]=1,t.depth[u]=0,t.opt_len--,o&&(t.static_len-=n[2*u+1]);for(e.max_code=c,a=t.heap_len>>1;a>=1;a--)L(t,r,a);u=i;do{a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],L(t,r,1),s=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=s,r[2*u]=r[2*a]+r[2*s],t.depth[u]=(t.depth[a]>=t.depth[s]?t.depth[a]:t.depth[s])+1,r[2*a+1]=r[2*s+1]=u,t.heap[1]=u++,L(t,r,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],((t,e)=>{const r=e.dyn_tree,n=e.max_code,o=e.stat_desc.static_tree,i=e.stat_desc.has_stree,a=e.stat_desc.extra_bits,s=e.stat_desc.extra_base,u=e.stat_desc.max_length;let c,l,d,h,p,g,m=0;for(h=0;h<=f;h++)t.bl_count[h]=0;for(r[2*t.heap[t.heap_max]+1]=0,c=t.heap_max+1;c<573;c++)l=t.heap[c],h=r[2*r[2*l+1]+1]+1,h>u&&(h=u,m++),r[2*l+1]=h,l>n||(t.bl_count[h]++,p=0,l>=s&&(p=a[l-s]),g=r[2*l],t.opt_len+=g*(h+p),i&&(t.static_len+=g*(o[2*l+1]+p)));if(0!==m){do{for(h=u-1;0===t.bl_count[h];)h--;t.bl_count[h]--,t.bl_count[h+1]+=2,t.bl_count[u]--,m-=2}while(m>0);for(h=u;0!==h;h--)for(l=t.bl_count[h];0!==l;)d=t.heap[--c],d>n||(r[2*d+1]!==h&&(t.opt_len+=(h-r[2*d+1])*r[2*d],r[2*d+1]=h),l--)}})(t,e),x(r,c,t.bl_count)},V=(t,e,r)=>{let n,o,i=-1,a=e[1],s=0,u=7,c=4;for(0===a&&(u=138,c=3),e[2*(r+1)+1]=65535,n=0;n<=r;n++)o=a,a=e[2*(n+1)+1],++s<u&&o===a||(s<c?t.bl_tree[2*o]+=s:0!==o?(o!==i&&t.bl_tree[2*o]++,t.bl_tree[32]++):s<=10?t.bl_tree[34]++:t.bl_tree[36]++,s=0,i=o,0===a?(u=138,c=3):o===a?(u=6,c=3):(u=7,c=4))},H=(t,e,r)=>{let n,o,i=-1,a=e[1],s=0,u=7,c=4;for(0===a&&(u=138,c=3),n=0;n<=r;n++)if(o=a,a=e[2*(n+1)+1],!(++s<u&&o===a)){if(s<c)do{N(t,o,t.bl_tree)}while(0!=--s);else 0!==o?(o!==i&&(N(t,o,t.bl_tree),s--),N(t,16,t.bl_tree),M(t,s-3,2)):s<=10?(N(t,17,t.bl_tree),M(t,s-3,3)):(N(t,18,t.bl_tree),M(t,s-11,7));s=0,i=o,0===a?(u=138,c=3):o===a?(u=6,c=3):(u=7,c=4)}};let j=!1;const G=(t,e,r,n)=>{M(t,0+(n?1:0),3),((t,e,r,n)=>{B(t),n&&(R(t,r),R(t,~r)),t.pending_buf.set(t.window.subarray(e,e+r),t.pending),t.pending+=r})(t,e,r,!0)};u._tr_init=t=>{j||((()=>{let t,e,r,n,o;const i=new Array(16);for(r=0,n=0;n<28;n++)for(b[n]=r,t=0;t<1<<p[n];t++)E[r++]=n;for(E[r-1]=n,o=0,n=0;n<16;n++)for(A[n]=o,t=0;t<1<<g[n];t++)v[o++]=n;for(o>>=7;n<h;n++)for(A[n]=o<<7,t=0;t<1<<g[n]-7;t++)v[256+o++]=n;for(e=0;e<=f;e++)i[e]=0;for(t=0;t<=143;)w[2*t+1]=8,t++,i[8]++;for(;t<=255;)w[2*t+1]=9,t++,i[9]++;for(;t<=279;)w[2*t+1]=7,t++,i[7]++;for(;t<=287;)w[2*t+1]=8,t++,i[8]++;for(x(w,287,i),t=0;t<h;t++)_[2*t+1]=5,_[2*t]=k(t,5);I=new C(w,p,257,d,f),S=new C(_,g,0,h,f),T=new C(new Array(0),m,0,19,7)})(),j=!0),t.l_desc=new D(t.dyn_ltree,I),t.d_desc=new D(t.dyn_dtree,S),t.bl_desc=new D(t.bl_tree,T),t.bi_buf=0,t.bi_valid=0,P(t)},u._tr_stored_block=G,u._tr_flush_block=(t,e,r,n)=>{let o,i,a=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=(t=>{let e,r=4093624447;for(e=0;e<=31;e++,r>>>=1)if(1&r&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<l;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0})(t)),U(t,t.l_desc),U(t,t.d_desc),a=(t=>{let e;for(V(t,t.dyn_ltree,t.l_desc.max_code),V(t,t.dyn_dtree,t.d_desc.max_code),U(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*y[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e})(t),o=t.opt_len+3+7>>>3,i=t.static_len+3+7>>>3,i<=o&&(o=i)):o=i=r+5,r+4<=o&&-1!==e?G(t,e,r,n):4===t.strategy||i===o?(M(t,2+(n?1:0),3),z(t,w,_)):(M(t,4+(n?1:0),3),((t,e,r,n)=>{let o;for(M(t,e-257,5),M(t,r-1,5),M(t,n-4,4),o=0;o<n;o++)M(t,t.bl_tree[2*y[o]+1],3);H(t,t.dyn_ltree,e-1),H(t,t.dyn_dtree,r-1)})(t,t.l_desc.max_code+1,t.d_desc.max_code+1,a+1),z(t,t.dyn_ltree,t.dyn_dtree)),P(t),n&&B(t)},u._tr_tally=(t,e,r)=>(t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&r,t.last_lit++,0===e?t.dyn_ltree[2*r]++:(t.matches++,e--,t.dyn_ltree[2*(E[r]+l+1)]++,t.dyn_dtree[2*O(e)]++),t.last_lit===t.lit_bufsize-1),u._tr_align=t=>{M(t,2,3),N(t,256,w),(t=>{16===t.bi_valid?(R(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)})(t)};var W=(t,e,r,n)=>{let o=65535&t,i=t>>>16&65535,a=0;for(;0!==r;){a=r>2e3?2e3:r,r-=a;do{o=o+e[n++]|0,i=i+o|0}while(--a);o%=65521,i%=65521}return o|i<<16};const X=new Uint32Array((()=>{let t,e=[];for(var r=0;r<256;r++){t=r;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e})());var Y=(t,e,r,n)=>{const o=X,i=n+r;t^=-1;for(let r=n;r<i;r++)t=t>>>8^o[255&(t^e[r])];return~t},Z={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},q={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:K,_tr_stored_block:$,_tr_flush_block:J,_tr_tally:Q,_tr_align:tt}=u,et=W,rt=Y,nt=Z,{Z_NO_FLUSH:ot,Z_PARTIAL_FLUSH:it,Z_FULL_FLUSH:at,Z_FINISH:st,Z_BLOCK:ut,Z_OK:ct,Z_STREAM_END:lt,Z_STREAM_ERROR:dt,Z_DATA_ERROR:ht,Z_BUF_ERROR:ft,Z_DEFAULT_COMPRESSION:pt,Z_FILTERED:gt,Z_HUFFMAN_ONLY:mt,Z_RLE:yt,Z_FIXED:wt,Z_DEFAULT_STRATEGY:_t,Z_UNKNOWN:vt,Z_DEFLATED:Et}=q,bt=258,At=262,Ct=103,It=113,St=666,Tt=(t,e)=>(t.msg=nt[e],e),Dt=t=>(t<<1)-(t>4?9:0),Ot=t=>{let e=t.length;for(;--e>=0;)t[e]=0};let Rt=(t,e,r)=>(e<<t.hash_shift^r)&t.hash_mask;const Mt=t=>{const e=t.state;let r=e.pending;r>t.avail_out&&(r=t.avail_out),0!==r&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+r),t.next_out),t.next_out+=r,e.pending_out+=r,t.total_out+=r,t.avail_out-=r,e.pending-=r,0===e.pending&&(e.pending_out=0))},Nt=(t,e)=>{J(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,Mt(t.strm)},kt=(t,e)=>{t.pending_buf[t.pending++]=e},xt=(t,e)=>{t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},Pt=(t,e,r,n)=>{let o=t.avail_in;return o>n&&(o=n),0===o?0:(t.avail_in-=o,e.set(t.input.subarray(t.next_in,t.next_in+o),r),1===t.state.wrap?t.adler=et(t.adler,e,o,r):2===t.state.wrap&&(t.adler=rt(t.adler,e,o,r)),t.next_in+=o,t.total_in+=o,o)},Bt=(t,e)=>{let r,n,o=t.max_chain_length,i=t.strstart,a=t.prev_length,s=t.nice_match;const u=t.strstart>t.w_size-At?t.strstart-(t.w_size-At):0,c=t.window,l=t.w_mask,d=t.prev,h=t.strstart+bt;let f=c[i+a-1],p=c[i+a];t.prev_length>=t.good_match&&(o>>=2),s>t.lookahead&&(s=t.lookahead);do{if(r=e,c[r+a]===p&&c[r+a-1]===f&&c[r]===c[i]&&c[++r]===c[i+1]){i+=2,r++;do{}while(c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&i<h);if(n=bt-(h-i),i=h-bt,n>a){if(t.match_start=e,a=n,n>=s)break;f=c[i+a-1],p=c[i+a]}}}while((e=d[e&l])>u&&0!=--o);return a<=t.lookahead?a:t.lookahead},Ft=t=>{const e=t.w_size;let r,n,o,i,a;do{if(i=t.window_size-t.lookahead-t.strstart,t.strstart>=e+(e-At)){t.window.set(t.window.subarray(e,e+e),0),t.match_start-=e,t.strstart-=e,t.block_start-=e,n=t.hash_size,r=n;do{o=t.head[--r],t.head[r]=o>=e?o-e:0}while(--n);n=e,r=n;do{o=t.prev[--r],t.prev[r]=o>=e?o-e:0}while(--n);i+=e}if(0===t.strm.avail_in)break;if(n=Pt(t.strm,t.window,t.strstart+t.lookahead,i),t.lookahead+=n,t.lookahead+t.insert>=3)for(a=t.strstart-t.insert,t.ins_h=t.window[a],t.ins_h=Rt(t,t.ins_h,t.window[a+1]);t.insert&&(t.ins_h=Rt(t,t.ins_h,t.window[a+3-1]),t.prev[a&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=a,a++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<At&&0!==t.strm.avail_in)},Lt=(t,e)=>{let r,n;for(;;){if(t.lookahead<At){if(Ft(t),t.lookahead<At&&e===ot)return 1;if(0===t.lookahead)break}if(r=0,t.lookahead>=3&&(t.ins_h=Rt(t,t.ins_h,t.window[t.strstart+3-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==r&&t.strstart-r<=t.w_size-At&&(t.match_length=Bt(t,r)),t.match_length>=3)if(n=Q(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=Rt(t,t.ins_h,t.window[t.strstart+3-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=Rt(t,t.ins_h,t.window[t.strstart+1]);else n=Q(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(Nt(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,e===st?(Nt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Nt(t,!1),0===t.strm.avail_out)?1:2},zt=(t,e)=>{let r,n,o;for(;;){if(t.lookahead<At){if(Ft(t),t.lookahead<At&&e===ot)return 1;if(0===t.lookahead)break}if(r=0,t.lookahead>=3&&(t.ins_h=Rt(t,t.ins_h,t.window[t.strstart+3-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==r&&t.prev_length<t.max_lazy_match&&t.strstart-r<=t.w_size-At&&(t.match_length=Bt(t,r),t.match_length<=5&&(t.strategy===gt||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){o=t.strstart+t.lookahead-3,n=Q(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=o&&(t.ins_h=Rt(t,t.ins_h,t.window[t.strstart+3-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,n&&(Nt(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if(n=Q(t,0,t.window[t.strstart-1]),n&&Nt(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=Q(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,e===st?(Nt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Nt(t,!1),0===t.strm.avail_out)?1:2};function Ut(t,e,r,n,o){this.good_length=t,this.max_lazy=e,this.nice_length=r,this.max_chain=n,this.func=o}const Vt=[new Ut(0,0,0,0,((t,e)=>{let r=65535;for(r>t.pending_buf_size-5&&(r=t.pending_buf_size-5);;){if(t.lookahead<=1){if(Ft(t),0===t.lookahead&&e===ot)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;const n=t.block_start+r;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,Nt(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-At&&(Nt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===st?(Nt(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(Nt(t,!1),t.strm.avail_out),1)})),new Ut(4,4,8,4,Lt),new Ut(4,5,16,8,Lt),new Ut(4,6,32,32,Lt),new Ut(4,4,16,16,zt),new Ut(8,16,32,32,zt),new Ut(8,16,128,128,zt),new Ut(8,32,128,256,zt),new Ut(32,128,258,1024,zt),new Ut(32,258,258,4096,zt)];function Ht(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Et,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),Ot(this.dyn_ltree),Ot(this.dyn_dtree),Ot(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),Ot(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),Ot(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const jt=t=>{if(!t||!t.state)return Tt(t,dt);t.total_in=t.total_out=0,t.data_type=vt;const e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:It,t.adler=2===e.wrap?0:1,e.last_flush=ot,K(e),ct},Gt=t=>{const e=jt(t);return e===ct&&(t=>{t.window_size=2*t.w_size,Ot(t.head),t.max_lazy_match=Vt[t.level].max_lazy,t.good_match=Vt[t.level].good_length,t.nice_match=Vt[t.level].nice_length,t.max_chain_length=Vt[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=2,t.match_available=0,t.ins_h=0})(t.state),e},Wt=(t,e,r,n,o,i)=>{if(!t)return dt;let a=1;if(e===pt&&(e=6),n<0?(a=0,n=-n):n>15&&(a=2,n-=16),o<1||o>9||r!==Et||n<8||n>15||e<0||e>9||i<0||i>wt)return Tt(t,dt);8===n&&(n=9);const s=new Ht;return t.state=s,s.strm=t,s.wrap=a,s.gzhead=null,s.w_bits=n,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=o+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+3-1)/3),s.window=new Uint8Array(2*s.w_size),s.head=new Uint16Array(s.hash_size),s.prev=new Uint16Array(s.w_size),s.lit_bufsize=1<<o+6,s.pending_buf_size=4*s.lit_bufsize,s.pending_buf=new Uint8Array(s.pending_buf_size),s.d_buf=1*s.lit_bufsize,s.l_buf=3*s.lit_bufsize,s.level=e,s.strategy=i,s.method=r,Gt(t)};s.deflateInit=(t,e)=>Wt(t,e,Et,15,8,_t),s.deflateInit2=Wt,s.deflateReset=Gt,s.deflateResetKeep=jt,s.deflateSetHeader=(t,e)=>t&&t.state?2!==t.state.wrap?dt:(t.state.gzhead=e,ct):dt,s.deflate=(t,e)=>{let r,n;if(!t||!t.state||e>ut||e<0)return t?Tt(t,dt):dt;const o=t.state;if(!t.output||!t.input&&0!==t.avail_in||o.status===St&&e!==st)return Tt(t,0===t.avail_out?ft:dt);o.strm=t;const i=o.last_flush;if(o.last_flush=e,42===o.status)if(2===o.wrap)t.adler=0,kt(o,31),kt(o,139),kt(o,8),o.gzhead?(kt(o,(o.gzhead.text?1:0)+(o.gzhead.hcrc?2:0)+(o.gzhead.extra?4:0)+(o.gzhead.name?8:0)+(o.gzhead.comment?16:0)),kt(o,255&o.gzhead.time),kt(o,o.gzhead.time>>8&255),kt(o,o.gzhead.time>>16&255),kt(o,o.gzhead.time>>24&255),kt(o,9===o.level?2:o.strategy>=mt||o.level<2?4:0),kt(o,255&o.gzhead.os),o.gzhead.extra&&o.gzhead.extra.length&&(kt(o,255&o.gzhead.extra.length),kt(o,o.gzhead.extra.length>>8&255)),o.gzhead.hcrc&&(t.adler=rt(t.adler,o.pending_buf,o.pending,0)),o.gzindex=0,o.status=69):(kt(o,0),kt(o,0),kt(o,0),kt(o,0),kt(o,0),kt(o,9===o.level?2:o.strategy>=mt||o.level<2?4:0),kt(o,3),o.status=It);else{let e=Et+(o.w_bits-8<<4)<<8,r=-1;r=o.strategy>=mt||o.level<2?0:o.level<6?1:6===o.level?2:3,e|=r<<6,0!==o.strstart&&(e|=32),e+=31-e%31,o.status=It,xt(o,e),0!==o.strstart&&(xt(o,t.adler>>>16),xt(o,65535&t.adler)),t.adler=1}if(69===o.status)if(o.gzhead.extra){for(r=o.pending;o.gzindex<(65535&o.gzhead.extra.length)&&(o.pending!==o.pending_buf_size||(o.gzhead.hcrc&&o.pending>r&&(t.adler=rt(t.adler,o.pending_buf,o.pending-r,r)),Mt(t),r=o.pending,o.pending!==o.pending_buf_size));)kt(o,255&o.gzhead.extra[o.gzindex]),o.gzindex++;o.gzhead.hcrc&&o.pending>r&&(t.adler=rt(t.adler,o.pending_buf,o.pending-r,r)),o.gzindex===o.gzhead.extra.length&&(o.gzindex=0,o.status=73)}else o.status=73;if(73===o.status)if(o.gzhead.name){r=o.pending;do{if(o.pending===o.pending_buf_size&&(o.gzhead.hcrc&&o.pending>r&&(t.adler=rt(t.adler,o.pending_buf,o.pending-r,r)),Mt(t),r=o.pending,o.pending===o.pending_buf_size)){n=1;break}n=o.gzindex<o.gzhead.name.length?255&o.gzhead.name.charCodeAt(o.gzindex++):0,kt(o,n)}while(0!==n);o.gzhead.hcrc&&o.pending>r&&(t.adler=rt(t.adler,o.pending_buf,o.pending-r,r)),0===n&&(o.gzindex=0,o.status=91)}else o.status=91;if(91===o.status)if(o.gzhead.comment){r=o.pending;do{if(o.pending===o.pending_buf_size&&(o.gzhead.hcrc&&o.pending>r&&(t.adler=rt(t.adler,o.pending_buf,o.pending-r,r)),Mt(t),r=o.pending,o.pending===o.pending_buf_size)){n=1;break}n=o.gzindex<o.gzhead.comment.length?255&o.gzhead.comment.charCodeAt(o.gzindex++):0,kt(o,n)}while(0!==n);o.gzhead.hcrc&&o.pending>r&&(t.adler=rt(t.adler,o.pending_buf,o.pending-r,r)),0===n&&(o.status=Ct)}else o.status=Ct;if(o.status===Ct&&(o.gzhead.hcrc?(o.pending+2>o.pending_buf_size&&Mt(t),o.pending+2<=o.pending_buf_size&&(kt(o,255&t.adler),kt(o,t.adler>>8&255),t.adler=0,o.status=It)):o.status=It),0!==o.pending){if(Mt(t),0===t.avail_out)return o.last_flush=-1,ct}else if(0===t.avail_in&&Dt(e)<=Dt(i)&&e!==st)return Tt(t,ft);if(o.status===St&&0!==t.avail_in)return Tt(t,ft);if(0!==t.avail_in||0!==o.lookahead||e!==ot&&o.status!==St){let r=o.strategy===mt?((t,e)=>{let r;for(;;){if(0===t.lookahead&&(Ft(t),0===t.lookahead)){if(e===ot)return 1;break}if(t.match_length=0,r=Q(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(Nt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===st?(Nt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Nt(t,!1),0===t.strm.avail_out)?1:2})(o,e):o.strategy===yt?((t,e)=>{let r,n,o,i;const a=t.window;for(;;){if(t.lookahead<=bt){if(Ft(t),t.lookahead<=bt&&e===ot)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(o=t.strstart-1,n=a[o],n===a[++o]&&n===a[++o]&&n===a[++o])){i=t.strstart+bt;do{}while(n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&o<i);t.match_length=bt-(i-o),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(r=Q(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=Q(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(Nt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===st?(Nt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Nt(t,!1),0===t.strm.avail_out)?1:2})(o,e):Vt[o.level].func(o,e);if(3!==r&&4!==r||(o.status=St),1===r||3===r)return 0===t.avail_out&&(o.last_flush=-1),ct;if(2===r&&(e===it?tt(o):e!==ut&&($(o,0,0,!1),e===at&&(Ot(o.head),0===o.lookahead&&(o.strstart=0,o.block_start=0,o.insert=0))),Mt(t),0===t.avail_out))return o.last_flush=-1,ct}return e!==st?ct:o.wrap<=0?lt:(2===o.wrap?(kt(o,255&t.adler),kt(o,t.adler>>8&255),kt(o,t.adler>>16&255),kt(o,t.adler>>24&255),kt(o,255&t.total_in),kt(o,t.total_in>>8&255),kt(o,t.total_in>>16&255),kt(o,t.total_in>>24&255)):(xt(o,t.adler>>>16),xt(o,65535&t.adler)),Mt(t),o.wrap>0&&(o.wrap=-o.wrap),0!==o.pending?ct:lt)},s.deflateEnd=t=>{if(!t||!t.state)return dt;const e=t.state.status;return 42!==e&&69!==e&&73!==e&&91!==e&&e!==Ct&&e!==It&&e!==St?Tt(t,dt):(t.state=null,e===It?Tt(t,ht):ct)},s.deflateSetDictionary=(t,e)=>{let r=e.length;if(!t||!t.state)return dt;const n=t.state,o=n.wrap;if(2===o||1===o&&42!==n.status||n.lookahead)return dt;if(1===o&&(t.adler=et(t.adler,e,r,0)),n.wrap=0,r>=n.w_size){0===o&&(Ot(n.head),n.strstart=0,n.block_start=0,n.insert=0);let t=new Uint8Array(n.w_size);t.set(e.subarray(r-n.w_size,r),0),e=t,r=n.w_size}const i=t.avail_in,a=t.next_in,s=t.input;for(t.avail_in=r,t.next_in=0,t.input=e,Ft(n);n.lookahead>=3;){let t=n.strstart,e=n.lookahead-2;do{n.ins_h=Rt(n,n.ins_h,n.window[t+3-1]),n.prev[t&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=t,t++}while(--e);n.strstart=t,n.lookahead=2,Ft(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,t.next_in=a,t.input=s,t.avail_in=i,n.wrap=o,ct},s.deflateInfo="pako deflate (from Nodeca project)";var Xt={};const Yt=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);Xt.assign=function(t){const e=Array.prototype.slice.call(arguments,1);for(;e.length;){const r=e.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(const e in r)Yt(r,e)&&(t[e]=r[e])}}return t},Xt.flattenChunks=t=>{let e=0;for(let r=0,n=t.length;r<n;r++)e+=t[r].length;const r=new Uint8Array(e);for(let e=0,n=0,o=t.length;e<o;e++){let o=t[e];r.set(o,n),n+=o.length}return r};var Zt={};let qt=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){qt=!1}const Kt=new Uint8Array(256);for(let t=0;t<256;t++)Kt[t]=t>=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;Kt[254]=Kt[254]=1,Zt.string2buf=t=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);let e,r,n,o,i,a=t.length,s=0;for(o=0;o<a;o++)r=t.charCodeAt(o),55296==(64512&r)&&o+1<a&&(n=t.charCodeAt(o+1),56320==(64512&n)&&(r=65536+(r-55296<<10)+(n-56320),o++)),s+=r<128?1:r<2048?2:r<65536?3:4;for(e=new Uint8Array(s),i=0,o=0;i<s;o++)r=t.charCodeAt(o),55296==(64512&r)&&o+1<a&&(n=t.charCodeAt(o+1),56320==(64512&n)&&(r=65536+(r-55296<<10)+(n-56320),o++)),r<128?e[i++]=r:r<2048?(e[i++]=192|r>>>6,e[i++]=128|63&r):r<65536?(e[i++]=224|r>>>12,e[i++]=128|r>>>6&63,e[i++]=128|63&r):(e[i++]=240|r>>>18,e[i++]=128|r>>>12&63,e[i++]=128|r>>>6&63,e[i++]=128|63&r);return e};Zt.buf2string=(t,e)=>{const r=e||t.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(t.subarray(0,e));let n,o;const i=new Array(2*r);for(o=0,n=0;n<r;){let e=t[n++];if(e<128){i[o++]=e;continue}let a=Kt[e];if(a>4)i[o++]=65533,n+=a-1;else{for(e&=2===a?31:3===a?15:7;a>1&&n<r;)e=e<<6|63&t[n++],a--;a>1?i[o++]=65533:e<65536?i[o++]=e:(e-=65536,i[o++]=55296|e>>10&1023,i[o++]=56320|1023&e)}}return((t,e)=>{if(e<65534&&t.subarray&&qt)return String.fromCharCode.apply(null,t.length===e?t:t.subarray(0,e));let r="";for(let n=0;n<e;n++)r+=String.fromCharCode(t[n]);return r})(i,o)},Zt.utf8border=(t,e)=>{(e=e||t.length)>t.length&&(e=t.length);let r=e-1;for(;r>=0&&128==(192&t[r]);)r--;return r<0||0===r?e:r+Kt[t[r]]>e?r:e};const $t=s,Jt=Xt,Qt=Zt,te=Z,ee=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0},re=Object.prototype.toString,{Z_NO_FLUSH:ne,Z_SYNC_FLUSH:oe,Z_FULL_FLUSH:ie,Z_FINISH:ae,Z_OK:se,Z_STREAM_END:ue,Z_DEFAULT_COMPRESSION:ce,Z_DEFAULT_STRATEGY:le,Z_DEFLATED:de}=q;function he(t){this.options=Jt.assign({level:ce,method:de,chunkSize:16384,windowBits:15,memLevel:8,strategy:le},t||{});let e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new ee,this.strm.avail_out=0;let r=$t.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(r!==se)throw new Error(te[r]);if(e.header&&$t.deflateSetHeader(this.strm,e.header),e.dictionary){let t;if(t="string"==typeof e.dictionary?Qt.string2buf(e.dictionary):"[object ArrayBuffer]"===re.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,r=$t.deflateSetDictionary(this.strm,t),r!==se)throw new Error(te[r]);this._dict_set=!0}}he.prototype.push=function(t,e){const r=this.strm,n=this.options.chunkSize;let o,i;if(this.ended)return!1;for(i=e===~~e?e:!0===e?ae:ne,"string"==typeof t?r.input=Qt.string2buf(t):"[object ArrayBuffer]"===re.call(t)?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;;)if(0===r.avail_out&&(r.output=new Uint8Array(n),r.next_out=0,r.avail_out=n),(i===oe||i===ie)&&r.avail_out<=6)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else{if(o=$t.deflate(r,i),o===ue)return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),o=$t.deflateEnd(this.strm),this.onEnd(o),this.ended=!0,o===se;if(0!==r.avail_out){if(i>0&&r.next_out>0)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else if(0===r.avail_in)break}else this.onData(r.output)}return!0},he.prototype.onData=function(t){this.chunks.push(t)},he.prototype.onEnd=function(t){t===se&&(this.result=Jt.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var fe=function(t,e){return(e=e||{}).gzip=!0,function(t,e){const r=new he(e);if(r.push(t,!0),r.err)throw r.msg||te[r.err];return r.result}(t,e)};const pe=["enabled","userId","serverPath"];function ge(t,e){return t-=437,ye()[t]}var me=ge;function ye(){var t=["80RHjtOk","2OevLtt","4mHygDT","21bcfTaY","1334706qGPVJq","drs","171569UjnFlN","65763wSPxMs","2326446mybjLb","2655936etvUrk","3148160ktzNuV","485881glPFWK"];return(ye=function(){return t})()}!function(){for(var t=ge,e=ye();;)try{if(463707==parseInt(t(437))/1*(parseInt(t(444))/2)+-parseInt(t(439))/3+parseInt(t(445))/4*(parseInt(t(441))/5)+parseInt(t(447))/6*(parseInt(t(446))/7)+-parseInt(t(440))/8+parseInt(t(438))/9*(parseInt(t(443))/10)+parseInt(t(442))/11)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();var we=new t(me(448));function _e(t,e){return t-=413,Ee()[t]}const ve=_e;function Ee(){const t=["241368ERhlIK","setClientId","5962630fYlShm","setItemSessionStorageSafe","setItemLocalStorageSafe","getItemLocalStorageSafe","3107724mvFvCC","FALLBACK_SESSION_STORAGE","clientId","removeItemLocalStorageSafe","1549734VEJnHN","localStorage","getClientId","878095exqgKw","4242164esjXFz","getFullStorageKey","FALLBACK_LOCAL_STORAGE","6004145WSBdId","removeItemSessionStorageSafe","sessionStorage","removeItem","setItem","getItemSessionStorageSafe"];return(Ee=function(){return t})()}!function(){const t=_e,e=Ee();for(;;)try{if(802223==parseInt(t(428))/1+-parseInt(t(415))/2+parseInt(t(425))/3+parseInt(t(429))/4+-parseInt(t(417))/5+parseInt(t(421))/6+-parseInt(t(432))/7)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class be{constructor(t){const e=_e;this.FALLBACK_SESSION_STORAGE={},this[e(431)]={},this[e(423)]=t}[ve(427)](){return this[ve(423)]}[ve(416)](t){this[ve(423)]=t}[ve(430)](t){return this.clientId+"_"+t}[ve(414)](t){const e=ve,r=this.getFullStorageKey(t);try{return window[e(434)].getItem(r)}catch(t){return this[e(422)][r]}}[ve(418)](t,e){const r=ve,n=this[r(430)](t);try{window[r(434)][r(413)](n,e)}catch(t){this[r(422)][n]=e}}[ve(433)](t){const e=ve,r=this[e(430)](t);try{window[e(434)].removeItem(r)}catch(t){this[e(422)][r]=void 0}}[ve(420)](t){const e=ve,r=this.getFullStorageKey(t);try{return window[e(426)].getItem(r)}catch(t){return this[e(431)][r]}}[ve(419)](t,e){const r=ve,n=this.getFullStorageKey(t);try{window[r(426)][r(413)](n,e)}catch(t){this.FALLBACK_LOCAL_STORAGE[n]=e}}[ve(424)](t){const e=ve,r=this[e(430)](t);try{window[e(426)][e(435)](r)}catch(t){this[e(431)][r]=void 0}}}const Ae=Ce;function Ce(t,e){return t-=122,Se()[t]}!function(){const t=Ce,e=Se();for(;;)try{if(660694==parseInt(t(128))/1*(parseInt(t(127))/2)+-parseInt(t(138))/3+-parseInt(t(140))/4*(-parseInt(t(126))/5)+parseInt(t(135))/6+parseInt(t(147))/7+parseInt(t(141))/8*(parseInt(t(144))/9)+-parseInt(t(143))/10)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class Ie{constructor(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const e=Ce;this[e(130)]=t,this[e(134)]=e(142),this[e(133)]=1e4,this.logs=[],this[e(132)]=[]}[Ae(146)](t,e){this[Ae(124)](3,t,e)}[Ae(122)](t,e){this[Ae(124)](4,t,e)}error(t,e){this.pushLog(5,t,e)}[Ae(129)](){const t=Ae,e=this[t(139)];return this[t(139)]=[],e}[Ae(124)](t,e,r){const n=Ae;this[n(130)]&&console[n(137)](n(131),this[n(134)],e,JSON[n(123)](r)),this[n(139)].push({timestamp:Date[n(136)](),severity:t,text:JSON[n(123)](o(o({},r),{},{message:e}),this.formatter)}),this[n(139)][n(125)]>this.logsLimit&&this[n(139)][n(145)]();const i=this[n(132)].map((t=>t()));Promise.all(i).catch((()=>{}))}formatter(t,e){if(e instanceof Error){const{name:t,stack:r,message:n}=e;return{name:t,stack:r,message:n}}return e}}function Se(){const t=["warn","stringify","pushLog","length","65XMUxGR","2etInQr","753119eHxeEt","flush","enabled","%s %s %s","middlewares","logsLimit","logPrefix","7723650YPCtkj","now","log","2963340qxZKmX","logs","252716XDKLPM","228584VqwLoy","[AccountProtection SDK]","19124760PEZeZs","18ByFZUz","unshift","info","4494581XxAniL"];return(Se=function(){return t})()}const Te=new Ie;function De(){var t=["race","model","setTimeout","40168NDLgiZ","wow64","239752Dkiatd","10okZhkm","77488UiGOAX","54zoZNYJ","resolve","userAgentData","2002066jpmjSM","warn","name","1395304aEiFWp","1884koDxai","getHighEntropyValues","240lJgFwA","171iBInVQ","mobile","catch","4461009bbufFX","finally","executor reached timeout"];return(De=function(){return t})()}function Oe(){var t,e=Re;return null===(t=navigator[e(363)])||void 0===t?void 0:t[e(369)](["architecture",e(354),"platform","platformVersion","fullVersionList","bitness",e(348),e(357),"uaFullVersion"])}function Re(t,e){return t-=348,De()[t]}function Me(t,e){var r=Re;let n;const o=[Promise[r(362)](t()).catch((()=>{})),new Promise(((t,o)=>n=window[r(355)](o,e)))];return Promise[r(353)](o)[r(349)]((()=>Te[r(365)](r(352),{fnName:t[r(366)]})))[r(351)]((()=>clearTimeout(n)))}!function(){for(var t=Re,e=De();;)try{if(765105==-parseInt(t(360))/1+parseInt(t(356))/2*(parseInt(t(371))/3)+-parseInt(t(358))/4+parseInt(t(370))/5*(-parseInt(t(368))/6)+parseInt(t(350))/7+parseInt(t(367))/8*(-parseInt(t(361))/9)+-parseInt(t(359))/10*(-parseInt(t(364))/11))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();const Ne=xe;function ke(){const t=["label","getPerformanceTiming","5788zONujP","sin","__lastWatirConfirm","getOpenDatabase","Serifa","MS Mincho","cdc_adoQpoasnfa76pfcZLmcfl_Symbol","MS Reference Specialty","getProductSub","oncomplete","isPointInPath","11RUftjE","Humanst521 BT","addBehavior","angle","isNodeReachable_","oprt","tan","inverted","sans-serif","isArray","Bitstream Vera Sans Mono","reduce","Buffer","392MKINui","spawn","sdkDeviceDataCollectionIgnoreList","brave","hasSequentum","__webdriverFunc","__driver_evaluate","onLine","getFIDOEnabled","cache_","colorDepth","style","plugins","asin","driver-evaluate",'11pt "Times New Roman"',"userAgentData","visibility","getDeviceData","start","SCRIPTINA","values","getSessionStorage","Clarendon","getScreen","getInstalledRelatedApps","#f2f","Array","Microsoft Uighur","getOwnPropertyDescriptor","exp","getCryptoBindingData","languages","TRAJAN PRO","windowDocumentAuxVarsTest","worker throw error","AvantGarde Bk BT","crypto","fmget_targets","sinh","485235VSPzeG","__lastWatirAlert","enumerateDevices","getPlatform","getNavigatorProduct","fillRect","dataPoints","10px","Vrinda","platform","getContext","sqrt","external","indexedDB","description","product","kind","more","getBattery","evenodd","getMediaMatch","chargingTime","permissions","webdriver","dataPointsExtractor","__webdriver_script_func","webgl-experimental","getExtension","__webdriver_unwrapped","localStorage","Arabic Typesetting","collectPromisesData","__webdriver_evaluate","chrome","oscpu","HELV","__yb","calledSelenium","getCodesTests","EUROSTILE","cookieEnabled","100","getTimezoneOffset","Arial Unicode MS","CDPRuntimeDomainTest","__webdriver_script_function","getTimezone","webdriver-evaluate-response","getIndexedDB","beginPath","configManager","isBrave","getFloatTimeDomainData","webgl","__fxdriver_evaluate","maxTouchPoints","some","getTouchSupport","disconnect","forced","getCpuClass","high","reduction","stack","fontFamily","getAudioFingerprint","worker promise rejected","storageManager","prototype","callPhantom","release","MYRIAD PRO","replace","spynner_additional_js_loaded","getItemLocalStorageSafe","webRTCDisabled","Symbol","function","bind","ZWAdobeF","Menlo","selenium-evaluate","2199svWBZw","getBuildID","DocumentTouch","MS Outlook","18pt Arial","__nightmare","getOsCpu","getWindowOrientation","deviceDataCalculationExpiry","groupId","BankGothic Md BT","getHash","awesomium","font","Object","windowConstructorAliasTest","memory","ChromeDriverw","__gCrWeb","getBrave","log","__edgeTrackingPreventionStatistics","15NaggNa","test","sort","getOwnPropertyDescriptors","Lucida Bright","no-preference","WEBGL_debug_renderer_info","getPublicData","getMathFingerprint","getConfValue","getPlugins","left","tanh","standard","storeItem","hidden","8467570BRhUqC","getVendor","toString","129BycZNg","resolve","cosh","UNMASKED_RENDERER_WEBGL","createElement","low","Monotype Corsiva","getDocumentBasedKeys","map","fillText","getReferrer","getNavigatorPrototype","callSelenium","Franklin Gothic","offsetWidth","Helvetica Neue","name","geb","cos","canvas","body","closePath","knee","_WEBDRIVER_ELEM_CACHE","_phantom","height","DateTimeFormat","getRandomValues","offsetHeight","toDataURL","subarray","console","fillStyle","Calibri","getCanvasFingerprint","getCryptoRandomValues","attack","getLocalStorage","sendBeacon","Sequentum","hashCodeString","fontSize","__crWeb","dischargingTime","Minion Pro","document","state","navigatorOnLine","defineProperty","_Selenium_IDE_Recorder","getWebDriver","Agency FB","calledPhantom","__phantomas","setItemLocalStorageSafe","mediaDevices","__lastWatirPrompt","Segoe UI Light","getAudioFingerprintExtended","Haettenschweiler","createAnalyser","geolocation","charging","1000","PublicKeyCredential","3288789dcNVNI","SimHei","getCookieEnabled","msMaxTouchPoints","storage","getAddBehavior","getMediaDevices","availHeight","webdriverCommand","referrer","#069","less","yandex","__$webdriverAsyncExecutor","__selenium_evaluate","hardwareConcurrency","#f60","alphabetic","samsungAr","triangle","$chrome_asyncScriptInfo","ucweb","matches","timing","Staccato222 BT","domAutomationController","Small Fonts","log1p","Letter Gothic","Promise","rect","active","destination","__selenium_unwrapped","connect","Pristina","indexOf","width","invalidPublicKeyId","push","video/mp4;;Codecs =avc1.42E01E","devicePixelRatio","debug","lastDeviceData","Levenim MT","position","isSendBeaconFunction","threshold","frequency","cryptoBinding","Century","warn","retrieveItem","webkitOfflineAudioContext","startRendering","getPrototypeOf","Futura Md BT","length","ARNO PRO","Marlett","cdc_adoQpoasnfa76pfcZLmcfl_Promise","startPromisesLoop","textBaseline","renderedBuffer","rgba(102, 204, 0, 0.2)","__firefox__","isMobile","_selenium","fill","query","#f9c","serif","userAgent","absolute","acos","sessionStorage","url","3354704RbHhNR","value","top","type","getWindowOuter","every","puffinDevice","vendor","isGeoLocationExists","webkit","monospace","getConnection","now","credentials","level","createDynamicsCompressor","appendChild","serviceWorker","getHardwareConcurrency","MS UI Gothic","navigatorIsUserActive","entries","get","div","navigatorStorageEstimation","cpuClass","__fxdriver_unwrapped","includes","canPlayType","ontouchstart","productSub","getNavigatorUserAgent","abs","sans-serif-thin","__webdriverFuncgeb","outerWidth","filter","__driver_unwrapped","#ff2","orientation","webdriver-evaluate","getDeviceMemory","expm1","getNavigatorUAData","getOwnPropertyNames","frequencyBinCount","charCodeAt","OfflineAudioContext","none","cdc_adoQpoasnfa76pfcZLmcfl_Array","getPerformanceMemory","getNavigatorBasedKeys","53160IVRpOj","matchMedia","fftSize","__webdriver_script_fn","getNavigatorPermissionsState","Meiryo UI","RTCPeerConnection","getWindowBasedKeys","Leelawadee","GOTHAM","timeZone","createOscillator","__ybro","arc"];return(ke=function(){return t})()}function xe(t,e){return t-=343,ke()[t]}!function(){const t=xe,e=ke();for(;;)try{if(330696==parseInt(t(724))/1*(parseInt(t(602))/2)+-parseInt(t(368))/3*(parseInt(t(578))/4)+parseInt(t(349))/5*(-parseInt(t(562))/6)+parseInt(t(433))/7+parseInt(t(510))/8+-parseInt(t(642))/9+parseInt(t(365))/10*(-parseInt(t(589))/11))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();const Pe=Ne(604),Be=Ne(732),Fe=t=>t?[...t][Ne(600)](((t,e)=>t+Math[Ne(542)](e)),0):0;class Le{constructor(t,e,r){const n=Ne;this[n(709)]=t,this.configManager=e,this[n(482)]=r}async calculate(){const t=Ne,e=this[t(692)][t(358)](Pe,[]),r=this.configManager[t(358)](Be,36e5),n=await new ze(e,this[t(482)]).dataPointsExtractor();return this.lastDeviceData=n,this[t(709)][t(422)](Be,Date[t(522)]()+r),n}async[Ne(620)](){const t=Ne;return Number(this[t(709)][t(716)](Be))<Date.now()||!this[t(476)]?await this.calculate()||{}:this.lastDeviceData||{}}}class ze{constructor(t,e){const r=Ne;this.sdkDeviceDataCollectionIgnoreList=t,this[r(482)]=e,this[r(648)]={battery:this.getBattery,brave:this[r(346)],canvas:this[r(402)],codecs:this[r(680)],connection:this[r(521)],cookieEnabled:this.getCookieEnabled,cryptoRandomValues:this[r(403)],deviceMemory:this[r(551)],documentBasedKeys:this[r(375)],hardwareConcurrency:this[r(528)],indexedDB:this[r(690)],fidoEnabled:this.getFIDOEnabled,languages:this.getLanguages,language:this.getLanguage,timezoneOffset:this.getTimezoneOffset,localStorage:this[r(405)],navigatorBasedKeys:this.getNavigatorBasedKeys,navigatorProduct:this[r(646)],navigatorUserAgent:this[r(541)],navigatorUAData:this[r(553)],navigatorHighEntropyData:this.getNavigatorHighEntropyData,navigatorStorageEstimation:this[r(534)],navigatorOnLine:this.navigatorOnLine,navigatorIsUserActive:this.navigatorIsUserActive,math:this[r(357)],mediaMatch:this[r(662)],openDatabase:this[r(581)],windowOrientation:this[r(731)],platform:this.getPlatform,cpuClass:this[r(702)],osClass:this[r(730)],addBehavior:this.getAddBehavior,productSub:this[r(586)],mediaDevices:this[r(439)],audioFingerprint:this[r(707)],audioFingerprintExtended:this[r(426)],fonts:this.getFonts,performanceTiming:this.getPerformanceTiming,performanceMemory:this.getPerformanceMemory,plugins:this[r(359)],screen:this.getScreen,sequentum:this[r(606)],sessionStorage:this[r(624)],referrer:this.getReferrer,timezone:this[r(688)],touchSupport:this.getTouchSupport,vendor:this.getVendor,buildID:this[r(725)],webdriver:this[r(418)],webGlRenderer:this.getWebGlRenderer,windowBasedKeys:this[r(569)],windowOuter:this[r(514)],webRTCDisabled:this[r(717)],cryptoBindingData:this[r(633)].bind(this),notificationState:this[r(566)][r(720)](this,"notifications"),geolocationState:this[r(566)][r(720)](this,r(429)),isGeoLocationExists:this[r(518)],isSendBeaconExists:this[r(479)],navigatorPrototype:this[r(379)],installedRelatedApps:this[r(627)],windowConstructorAliasTest:this[r(739)],windowDocumentAuxVarsTest:this[r(636)],CDPRuntimeDomainTest:this[r(686)]}}[Ne(686)](){const t=Ne;let e=!1;const r=new window.Error;return window[t(738)][t(416)](r,"stack",{configurable:!1,enumerable:!1,get:function(){return e=!0,""}}),window[t(399)][t(475)](r[t(705)]),e}[Ne(636)](){const t=Ne;for(const e of window.Object[t(554)](window[t(413)]))if(e==t(453)||/^\$cdc_[a-zA-Z0-9]{22}_$/[t(350)](e))return!0;for(const e of window[t(738)][t(623)](window.Object[t(352)](window[t(413)]))){if(!e[t(511)]||void 0===e.value[t(611)])continue;const r=window[t(738)][t(554)](window[t(738)].getPrototypeOf(e[t(511)])),n=[t(363),t(485),t(593)];if(r.sort(),n[t(351)](),r[t(515)](((t,e)=>t==n[e])))return!0}return!1}[Ne(739)](){const t=Ne,e=window[t(738)][t(554)](window);for(const r of e){if(/^cdc_[a-zA-Z0-9]{22}_(Array|Promise|Symbol)$/[t(350)](r))return!0;for(const e of[window[t(629)],window[t(462)],window[t(718)]])if(r!=(null==e?void 0:e[t(384)])&&"token"!=r&&"getAsyncToken"!=r&&window[r]===e)return!0}return!1}async[Ne(666)](){const t=Ne,e=this[t(494)]();return await this[t(673)](e)}[Ne(494)](){const t=Ne,e={};for(const[r,n]of Object[t(531)](this[t(648)]))if(!this[t(604)][t(537)](r))try{e[r]=Me(n,100)}catch(n){Te[t(484)](t(637),{e:n,key:r}),e[r]=Promise[t(369)]()}return e}async[Ne(673)](t){const e=Ne,r={};for(const[n,o]of Object[e(531)](t))try{r[n]=await o}catch(t){Te.warn(e(708),{e:t,key:n}),r[n]=void 0}return r}[Ne(435)](){const t=navigator[Ne(682)];return Promise.resolve(t)}async[Ne(610)](){const t=Ne;return!!navigator[t(523)]&&await window[t(432)].isUserVerifyingPlatformAuthenticatorAvailable()}getCryptoRandomValues(){const t=Ne,e=window[t(639)][t(395)](new Uint8Array(16));return Array.from(e)}[Ne(717)](){const t=Ne,e=null==window[t(568)];return Promise[t(369)](e)}[Ne(569)](){const t=Ne,e=[t(675),"safari",t(410),t(345),t(445),t(678),t(574),t(498),t(348),t(519),t(594),t(451),t(454),"UCShellJava",t(516),t(392),t(421),t(711),t(601),"emit",t(603),t(458),"domAutomation",t(729),t(500),"calledSelenium",t(380),t(417),t(446),t(608),t(547),t(696),t(536),"__lastWatirAlert",t(580),"__lastWatirPrompt",t(447),t(466),"__webdriver__chr",t(674),t(565),t(667),t(687),t(670),t(544),t(736),t(420),t(559),t(493),t(584),"chrome_asyncScriptInfo",t(640),t(385),"OSMJIF",t(715),"watinExpressionError","watinExpressionResult"],r=[];for(const n of e){const e=window[n];void 0!==e&&null!=e&&r[t(472)](n)}return Promise[t(369)](r)}[Ne(662)](){const t=Ne,e={"dynamic-range":["high",t(362)],"prefers-reduced-motion":[t(354),"reduce"],"prefers-contrast":[t(354),t(703),t(373),t(659),t(444),t(701)],"max-monochrome":["0","10",t(683),t(431)],"forced-colors":[t(464),"none"],"inverted-colors":[t(596),t(558)],"color-gamut":["rec2020","p3","srgb"]},r={};for(const[n,o]of Object[t(531)](e))for(const e of o)r[n[t(714)](/-/g,"_")+"_"+e[t(714)](/-/g,"_")]=window[t(563)]("("+n+": "+e+")").matches;return Promise[t(369)](r)}[Ne(357)](){const t=Ne,e=[Math[t(507)](.12312423423423424),Math.acosh(1e308),(r=1e154,Math.log(r+Math[t(653)](r*r-1))),Math[t(615)](.12312423423423424),Math.asinh(1),Math[t(347)](1+Math[t(653)](2)),Math.atanh(.5),Math[t(347)](3)/2,Math.atan(.5),Math[t(579)](-1e300),Math[t(641)](1),Math[t(632)](1)-1/Math[t(632)](1)/2,Math[t(386)](10.000000000123),Math[t(370)](1),(Math.exp(1)+1/Math[t(632)](1))/2,Math[t(595)](-1e300),Math[t(361)](1),(Math[t(632)](2)-1)/(Math[t(632)](2)+1),Math[t(632)](1),Math[t(552)](1),Math[t(632)](1)-1,Math[t(460)](10),Math.log(11),Math.PI**-100];var r;let n="";for(let r=0;r<e[t(490)];r++)n+=e[r].toString();return Promise[t(369)](ze.hashCodeString(n))}[Ne(521)](){const{connection:t}=navigator,e=(t=>{let{downlink:e,effectiveType:r,rtt:n,saveData:o}=t;return{downlink:e,effectiveType:r,rtt:n,saveData:o}})(t);return Promise.resolve(e)}[Ne(624)](){const t=Ne;return Promise[t(369)](!!window[t(508)])}[Ne(405)](){const t=Ne;return Promise[t(369)](!!window[t(671)])}[Ne(606)](){const t=Ne;return-1!==window[t(654)][t(367)]()[t(469)](t(407))}[Ne(561)](){const t=Ne;return[t(665),t(608),"__webdriver_evaluate","__selenium_evaluate",t(696),t(547),"__webdriver_unwrapped",t(466),t(536),t(417),t(500),t(679),t(391),t(344),t(616),t(550),t(723),t(441),t(689),t(607),"__webdriver_script_fn","__$webdriverAsyncExecutor",t(643),"__lastWatirConfirm",t(424),t(453),"$cdc_asdjflasutopfhvcZLmcfl_",t(527)].filter((t=>navigator[t]))}[Ne(646)](){const t=Ne,e=navigator[t(657)];return Promise[t(369)](e)}getNavigatorUserAgent(){return navigator[Ne(505)]}[Ne(553)](){return navigator[Ne(618)]}getNavigatorHighEntropyData(){return Oe()}navigatorStorageEstimation(){return navigator[Ne(437)].estimate()}[Ne(415)](){return navigator[Ne(609)]}[Ne(530)](){return navigator.userActivation.isActive}async[Ne(566)](t){const e=Ne;try{const r=await navigator[e(664)][e(502)]({name:t});return null==r?void 0:r[e(414)]}catch(t){}}[Ne(518)](){return!!navigator[Ne(429)]}isSendBeaconFunction(){const t=Ne;return typeof navigator[t(406)]===t(719)}[Ne(379)](){const t=Ne;return{hardwareConcurrency:Object[t(631)](Object[t(488)](navigator),t(448))[t(532)].toString(),languages:Object[t(631)](Object[t(488)](navigator),t(634))[t(532)][t(367)]()}}async[Ne(627)](){const t=Ne;if(typeof navigator[t(627)]===t(719))try{const{related_applications:e}=await navigator[t(627)]();if(e&&Array[t(598)](e))return e[t(376)]((e=>{const r=t;return{platform:e[r(651)],url:e[r(509)]}}))}catch(t){}}[Ne(378)](){return document[Ne(442)]}[Ne(577)](){return performance[Ne(456)]}[Ne(560)](){const t=Ne,{jsHeapSizeLimit:e,totalJSHeapSize:r,usedJSHeapSize:n}=performance[t(343)];return{jsHeapSizeLimit:e,totalJSHeapSize:r,usedJSHeapSize:n}}[Ne(690)](){const t=Ne;return Promise[t(369)](!!window[t(655)])}[Ne(581)](){const t=Ne,{openDatabase:e}=window;return Promise[t(369)](!!e)}[Ne(699)](){const t=Ne,e=window[t(726)]&&document instanceof DocumentTouch,r={maxTouchPoints:navigator[t(697)]||navigator[t(436)]||0,documentTouch:e,ontouchstart:t(539)in window};return Promise[t(369)](r)}[Ne(359)](){const t=Ne;function e(t){const e=xe,r=[];for(let n=0;n<t[e(490)];++n)r.push({type:t[n].type,suffixes:t[n].suffixes});return r}const r=[];for(let n=0;n<navigator.plugins.length;++n){const o=navigator[t(614)][n];o&&r[t(472)]({name:o.name,description:o[t(656)],mimeTypes:e(o)})}return Promise.resolve(r)}[Ne(626)](){const t=Ne,e=window.screen||screen,{availLeft:r}=e,{availTop:n}=e,o={availHeight:e[t(440)],availLeft:r,availTop:n,availWidth:e.availWidth,colorDepth:e[t(612)],height:e.height,width:e.width,pixelDepth:e.pixelDepth,orientationAngle:e[t(549)]&&e[t(549)][t(592)],orientationType:e[t(549)]&&e[t(549)][t(513)],devicePixelRatio:window[t(474)]};return Promise[t(369)](o)}static[Ne(408)](t){const e=Ne;if(null==t)return;let r=0,n=0;const o=t[e(490)];for(;n<o;)r=(r<<5)-r+t[e(556)](n++)|0;return r}[Ne(514)](){const t=Ne,e={outerWidth:window[t(545)],outerHeight:window.outerHeight};return Promise[t(369)](e)}getWebDriver(){const t=Ne,e=navigator.webdriver;return Promise[t(369)](e)}[Ne(731)](){const t=window[Ne(549)];return Promise.resolve(t)}[Ne(645)](){const t=Ne,e=navigator[t(651)];return Promise[t(369)](e)}getCpuClass(){const t=Ne,e=navigator[t(535)];return Promise[t(369)](e)}[Ne(730)](){const t=Ne,e=navigator[t(676)];return Promise[t(369)](e)}[Ne(438)](){const t=Ne,e=!!window.HTMLElement[t(710)][t(591)];return Promise[t(369)](e)}[Ne(586)](){const t=Ne,e=navigator[t(540)];return Promise[t(369)](e)}async[Ne(439)](){const t=Ne,e=await navigator[t(423)][t(644)](),r=[];for(const n of e)r[t(472)]({kind:n[t(658)],label:n[t(576)],deviceId:n.deviceId,groupId:n[t(733)]});return r}async[Ne(707)](){const t=Ne,e=window[t(557)]||window[t(486)];if(!e)return-1;const r=new e(1,5e3,44100),n=r[t(573)]();n[t(513)]=t(452),n.frequency[t(511)]=1e4;const o=r[t(525)]();o[t(480)][t(511)]=-50,o[t(390)][t(511)]=40,o.ratio[t(511)]=12,o[t(404)][t(511)]=0,o[t(712)][t(511)]=.25,n.connect(o),o.connect(r.destination),n.start(0);const i=new Promise((async(e,n)=>{const o=t;r[o(587)]=t=>e(t[o(496)]);try{await r[o(487)]()}catch(t){n(t)}})),a=(await i).getChannelData(0)[t(398)](4500);return ze.getHash(a)}async getAudioFingerprintExtended(){const t=Ne;var e;const r=window.OfflineAudioContext||window[t(486)];if(!r)return{};const n=new r(1,5e3,44100),o=n[t(573)]();o[t(513)]="triangle",o[t(481)][t(511)]=1e4;const i=n[t(525)]();i[t(480)][t(511)]=-50,i[t(390)][t(511)]=40,i[t(404)].value=0;const a=n[t(428)]();o.connect(i),i[t(467)](a),i[t(467)](n[t(465)]),o[t(621)](0);try{await n[t(487)](),i[t(700)](),o[t(700)]();const r=new Float32Array(a[t(555)]);null===(e=a.getFloatFrequencyData)||void 0===e||e.call(a,r);const s=new Float32Array(a[t(564)]);return t(694)in a&&a[t(694)](s),{gain:i.reduction.value||i[t(704)],freq:Fe(r),time:Fe(s)}}catch(t){return{}}}static[Ne(735)](t){const e=Ne;let r=0;for(let n=0;n<t[e(490)];++n)r+=Math[e(542)](t[n]);return r}getFonts(){const t=Ne,e=[t(520),t(597),t(504)],r=[t(543),t(491),t(419),t(672),t(685),t(638),t(734),"Batang",t(599),t(401),t(483),"Century Gothic",t(625),t(681),t(381),"Futura Bk BT",t(489),t(571),"Gill Sans",t(677),t(427),t(383),t(590),t(570),t(461),t(477),t(353),"Lucida Sans",t(722),t(583),t(727),t(585),t(529),"MT Extra",t(713),t(492),t(567),t(630),t(412),t(374),"PMingLiU",t(468),t(622),t(425),t(582),t(434),t(459),t(457),t(635),"Univers CE 55 Medium",t(650),t(721)],n=document[t(372)](t(533));n[t(613)][t(619)]=t(364);const o={},i={},a=e=>{const r=t,o=document[r(372)]("span"),{style:i}=o;return i[r(478)]=r(506),i[r(512)]="0",i[r(360)]="0",i[r(706)]=e,i[r(409)]=r(649),o.textContent="mmMwWLliI0O&1",n.appendChild(o),o},s=e[t(376)](a),u=(()=>{const n=t,o={};for(const t of r)o[t]=e[n(376)]((e=>a("'"+t+"',"+e)));return o})();document[t(388)][t(526)](n);try{for(let r=0;r<e[t(490)];r++)o[e[r]]=s[r][t(382)],i[e[r]]=s[r][t(396)];const n=r.filter((r=>(r=>{const n=t;return e[n(698)](((t,e)=>r[e][n(382)]!==o[t]||r[e][n(396)]!==i[t]))})(u[r])));return Promise[t(369)](n)}finally{document[t(388)].removeChild(n)}}[Ne(684)](){const t=Ne,e=(new Date)[t(684)]();return Promise[t(369)](e)}getLanguage(){const t=Ne,e=navigator.language;return Promise[t(369)](e)}getLanguages(){const t=Ne,e=navigator.languages;return Promise[t(369)](e)}getHardwareConcurrency(){const t=Ne,e=navigator[t(448)];return Promise[t(369)](e)}getDeviceMemory(){const t=Ne,e=navigator.deviceMemory;return Promise[t(369)](e)}[Ne(375)](){const t=Ne;return[t(674),t(447),t(687),"__webdriver_script_func","__webdriver_script_fn",t(696),"__driver_unwrapped","__webdriver_unwrapped",t(608),t(466),t(536)][t(546)]((t=>document[t]))}[Ne(688)](){const t=Ne,e=Intl[t(394)]().resolvedOptions()[t(572)];return Promise[t(369)](e)}[Ne(366)](){const t=Ne,e=navigator[t(517)];return Promise[t(369)](e)}getBuildID(){const t=Ne,e=navigator.buildID;return Promise[t(369)](e)}async getCanvasFingerprint(){const t=Ne,e=document.createElement(t(387));e.width=1,e.height=1;const r=e.getContext("2d"),n={winding:function(t){const e=xe;return t[e(463)](0,0,10,10),t[e(463)](2,2,6,6),!t[e(588)](5,5,e(661))}(r),geometry:function(t,e){const r=xe;t[r(470)]=122,t[r(393)]=110,e.globalCompositeOperation="multiply";const n=[[r(628),40,40],["#2ff",80,40],[r(548),60,80]];for(const[t,o,i]of n)e[r(400)]=t,e[r(691)](),e[r(575)](o,i,40,0,2*Math.PI,!0),e[r(389)](),e[r(501)]();return e.fillStyle=r(503),e[r(575)](60,60,60,0,2*Math.PI,!0),e.arc(60,60,20,0,2*Math.PI,!0),e[r(501)](r(661)),ze[r(408)](t[r(397)]())}(e,r),text:function(t,e){const r=xe;t[r(470)]=240,t[r(393)]=60,e[r(495)]=r(450),e.fillStyle=r(449),e[r(647)](100,1,62,20),e.fillStyle=r(443),e[r(737)]=r(617);const n="Cwm fjordbank gly "+String.fromCharCode(55357,56835);return e[r(377)](n,2,15),e.fillStyle=r(497),e.font=r(728),e[r(377)](n,4,45),ze[r(408)](t.toDataURL())}(e,r)};return Promise[t(369)](n)}async getBattery(){const t=Ne,e=await navigator[t(660)]();return{charging:e[t(430)],chargingTime:e[t(663)],dischargingTime:e[t(411)],level:e[t(524)]}}async[Ne(346)](){const t=Ne;return!!navigator[t(605)]&&await navigator[t(605)][t(693)]()}async getWebGlRenderer(){const t=Ne,e=document.createElement(t(387)),r=e[t(652)](t(695))||e[t(652)](t(668)),n=r[t(669)](t(355));return Promise[t(369)](r.getParameter(n[t(371)]))}async[Ne(680)](){const t=Ne,e=document.createElement("video"),r={basic:""===e[t(538)]('video/mp4; codecs="avc1.42E01E"'),advanced:""===e[t(538)](t(473))};return Promise[t(369)](r)}async getCryptoBindingData(){const t=Ne,{publicKey:e,keyIdentifier:r,errors:n}=await this.cryptoBinding[t(356)](),o={publicKey:e,keyIdentifier:r};return(null==n?void 0:n[0])&&(o[t(471)]=n[0]),o}static[Ne(499)](){const t=Ne;return/iPhone|iPad|iPod|Android|MiuiBrowser/i.test(navigator[t(505)])||null!=window[t(549)]||window[t(563)]("only screen and (max-width: 600px)")[t(455)]}}const Ue=je;var Ve;!function(){const t=je,e=We();for(;;)try{if(341031==parseInt(t(128))/1*(parseInt(t(140))/2)+parseInt(t(130))/3+parseInt(t(136))/4*(parseInt(t(131))/5)+parseInt(t(138))/6+-parseInt(t(125))/7*(-parseInt(t(142))/8)+-parseInt(t(143))/9*(-parseInt(t(129))/10)+-parseInt(t(124))/11*(parseInt(t(132))/12))break;e.push(e.shift())}catch(t){e.push(e.shift())}}(),function(t){const e=je;t[e(135)]=e(126),t[e(133)]=e(139),t[e(134)]="interaction",t[e(123)]=e(137),t[e(141)]="action_result"}(Ve||(Ve={}));const He="desktop_web";function je(t,e){return t-=123,We()[t]}const Ge=Ue(127);function We(){const t=["mobile_web","1DmOloV","3692960VwgNyK","924909csWGvF","3292100JeUgXB","12KXeaNR","EVENT_TYPE_DEVICE","EVENT_TYPE_INTERACTION","EVENT_TYPE_ACTION","4DHHIcF","identification","2928030dYGHPV","device","439594fMgLVr","EVENT_TYPE_ACTION_RESULT","1816216vCzajy","9oJeDWp","EVENT_TYPE_IDENTIFICATION","21227987rNFUMN","7EfrOWp","action"];return(We=function(){return t})()}const Xe=Ke;function Ye(){const t=["device/conf?tenantId=","error fetching config","186228DSROEL","98RVVseV","setItemLocalStorageSafe","getConfValue","conf","21973743pcLfvL","error","6CNclCv","439912otWUJz","shouldUpdateConf","fetchConf","2428120RhMzOC","refreshConf","error loading config","loadConf","timestamp","storageManager","207436PmxEDw","stringify","3813136rlnhUe","isMobile","now","requestsManager","keys","getData","403474AkaNLL"];return(Ye=function(){return t})()}!function(){const t=Ke,e=Ye();for(;;)try{if(253202==-parseInt(t(168))/1+-parseInt(t(185))/2*(parseInt(t(167))/3)+parseInt(t(177))/4+-parseInt(t(171))/5+-parseInt(t(188))/6*(parseInt(t(189))/7)+-parseInt(t(179))/8+parseInt(t(193))/9)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();const Ze=Xe(175);class qe{constructor(t,e){const r=Xe;this.storageManager=t,this[r(182)]=e,this.conf=this[r(174)]()}async fetchConf(t){const e=Xe;try{const r=ze[e(180)]()?Ge:He,n=e(186)+t+"&type="+r,o=await this[e(182)][e(184)](n);return null!=o?o:{}}catch(r){return Te[e(166)](e(187),{clientId:t,error:r}),{}}}[Xe(174)](){const t=Xe,e=this[t(176)].getItemLocalStorageSafe("ric");if(null!=e)try{return JSON.parse(e)}catch(e){Te[t(166)](t(173),{error:e})}return{}}shouldUpdateConf(){const t=Xe,e=this[t(191)](Ze,0);return Date[t(181)]()-e>36e5}async[Xe(172)](t){const e=Xe;if(!this[e(169)]())return!1;let r=await this[e(170)](t);return 0==Object[e(183)](r).length?r=this.loadConf():this.storageManager[e(190)]("ric",JSON[e(178)](r)),this[e(192)]=r,!0}[Xe(191)](t,e){const r=Xe,n=void 0!==this[r(192)]?this[r(192)][t]:void 0;return null!=n?n:e}}function Ke(t,e){return t-=166,Ye()[t]}function $e(t,e){return t-=211,tr()[t]}const Je=$e;!function(){const t=$e,e=tr();for(;;)try{if(266472==parseInt(t(226))/1+-parseInt(t(224))/2*(-parseInt(t(217))/3)+parseInt(t(216))/4+-parseInt(t(222))/5*(parseInt(t(219))/6)+-parseInt(t(218))/7+parseInt(t(214))/8+-parseInt(t(228))/9*(-parseInt(t(227))/10))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class Qe{static maintainLastXItems(t,e,r){const n=$e;return t.length>=e&&t[n(221)](0,1),t[n(225)](r),t}static[Je(213)](t){const e=Je;var r,n;return(null!==(r=performance[e(215)])&&void 0!==r?r:Date[e(223)]()-performance[e(223)]())+(null!==(n=null==t?void 0:t[e(229)])&&void 0!==n?n:performance[e(223)]())}static base64UrlEncode(t){const e=Je,r=(new TextEncoder)[e(212)](t),n=String.fromCharCode(...r);return btoa(n)[e(211)](/\+/g,"-")[e(211)](/\//g,"_").replace(/=/g,"")}static[Je(220)](t){const e=Je;return t.replace(/\+/g,"-").replace(/\//g,"_")[e(211)](/=/g,"")}}function tr(){const t=["274782mocrNp","base64ToBase64Url","splice","55MQLkEt","now","2BOgnUb","push","110478IQfoFW","10LYRIES","767889yMXdaZ","timeStamp","replace","encode","getEventHighResTimestamp","2386400TZrXwz","timeOrigin","1313540wFNSUZ","641499svFKoT","1862546ngrTdo"];return(tr=function(){return t})()}function er(){const t=["function","cancelable","3388470ygJfjA","165456ZqfVWz","shiftKey","extractEventData","22926filQCk","metaKey","getEventHighResTimestamp","length","inputType","1227624FihvTp","maintainLastXItems","collect","composed","data","extractButtonsPressedData","detail","buffer","1379181kPSjEx","270571wKsMZI","sourceCapabilities","firesTouchEvents","altKey","getCoalescedEvents","parentId","ctrlKey","164460TUKYIw","offsetY","bufferSize","forEach","8PVLGmc","now","target","buttons","getData","offsetX","view","isTrusted"];return(er=function(){return t})()}const rr=nr;function nr(t,e){return t-=335,er()[t]}!function(){const t=nr,e=er();for(;;)try{if(301781==parseInt(t(343))/1+parseInt(t(340))/2+parseInt(t(356))/3+parseInt(t(348))/4+parseInt(t(364))/5+-parseInt(t(339))/6+-parseInt(t(357))/7*(parseInt(t(368))/8))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class or{constructor(t){const e=nr;this[e(352)]=[],this[e(355)]=t}[rr(350)](t){const e=rr,r=this[e(342)](t);Qe[e(349)](this.data,this[e(355)],r)}getData(){return this.data}[rr(342)](t){const e=rr;return o({x:t.x,y:t.y,tspl:Date[e(369)]()},this[e(353)](t))}extractButtonsPressedData(t){const e=rr;return o(o(o(o({},t[e(363)]&&{ctrlKey:!0}),t[e(360)]&&{altKey:!0}),t[e(341)]&&{shiftKey:!0}),0!=t[e(371)]&&{buttons:t.buttons})}}class ir{constructor(t){const e=rr;this.data=[],this[e(366)]=t}collect(t){const e=rr,r=Qe[e(345)](t);if(typeof t[e(361)]===e(337)){const n=t[e(361)]();if(n&&n[e(346)]>0)return void n[e(367)]((t=>{const n=e,o=this[n(342)](t,r,!0);Qe[n(349)](this[n(352)],this[n(366)],o)}))}const n=this[e(342)](t,r,!1);Qe[e(349)](this.data,this.bufferSize,n)}getData(){return this[rr(352)]}[rr(342)](t,e,r){const n=rr,i=o({x:t.x,y:t.y,timestampHighRes:Qe.getEventHighResTimestamp(t)},this[n(353)](t));return r&&(i[n(362)]=e),i}[rr(353)](t){const e=rr;return o(o(o(o({},t.ctrlKey&&{ctrlKey:!0}),t.altKey&&{altKey:!0}),t[e(341)]&&{shiftKey:!0}),0!=t[e(371)]&&{buttons:t[e(371)]})}}class ar{constructor(t){const e=rr;this[e(352)]=[],this[e(355)]=t}[rr(350)](t){const e=rr;var r;const n={x:t.x,y:t.y,timestamp:Date.now(),mouseButtonType:t[e(354)],offsetX:t[e(373)],offsetY:t[e(365)],isPressed:null==(null===(r=t.sourceCapabilities)||void 0===r?void 0:r.firesTouchEvents)?null:!t[e(358)].firesTouchEvents,target_id:t[e(370)].id};Qe.maintainLastXItems(this[e(352)],this[e(355)],n)}[rr(372)](){const t=[...this[rr(352)]];return this.data=[],t}}class sr{constructor(t){const e=rr;this[e(352)]=[],this[e(366)]=t}[rr(350)](t){const e=rr;var r;const n={isTrusted:t.isTrusted,cancelable:t.cancelable,composed:t[e(351)],isView:!!t[e(335)],shiftKey:t.shiftKey,metaKey:t[e(344)],ctrlKey:t[e(363)],altKey:t[e(360)],firesTouchEvents:null===(r=t[e(358)])||void 0===r?void 0:r[e(359)],timestamp:Date.now()};Qe[e(349)](this.data,this.bufferSize,n)}[rr(372)](){const t=rr,e=[...this.data];return this[t(352)]=[],e}}class ur{constructor(t){const e=rr;this[e(352)]=[],this[e(366)]=t}[rr(350)](t){const e=rr;var r;const n={isTrusted:t[e(336)],cancelable:t[e(338)],composed:t[e(351)],isView:!!t[e(335)],location:t.location,shiftKey:t[e(341)],ctrlKey:t.ctrlKey,altKey:t.altKey,firesTouchEvents:null===(r=t[e(358)])||void 0===r?void 0:r[e(359)],timestamp:Date[e(369)]()};Qe[e(349)](this.data,this[e(366)],n)}[rr(372)](){const t=rr,e=this[t(352)];return this[t(352)]=[],e}}class cr{constructor(t){const e=rr;this[e(352)]=[],this[e(366)]=t}[rr(350)](t){const e=rr,r={isTrusted:t.isTrusted,cancelable:t[e(338)],composed:t[e(351)],inputType:t[e(347)],isView:!!t[e(335)],timestamp:Date[e(369)]()};Qe[e(349)](this.data,this.bufferSize,r)}getData(){const t=rr,e=this.data;return this[t(352)]=[],e}}class lr{constructor(t){const e=rr;this[e(352)]=[],this[e(366)]=t}[rr(350)](t){const e=rr,r={isTrusted:t[e(336)],cancelable:t[e(338)],composed:t[e(351)],timestamp:Date[e(369)]()};Qe[e(349)](this[e(352)],this[e(366)],r)}[rr(372)](){const t=rr,e=this.data;return this[t(352)]=[],e}}const dr=Pr;function hr(){const t=["getGenericAttributes","selectMoveEventTypeBasedOnRollout","input","10947640ItJMDM","moveEventType","persistRolloutAndMoveEventTypeSelections","focus","PointerEvent","cancelable","keyup","error","mouseEventsCollectionBuffer","visibilitychange","addEventListener","href","getStoredMoveEventType","firesTouchEvents","deviceEventDataCollectionIgnoreList","filter","interactionEventsCollectorsData","pecrp","cmet","getData","SELECT","Error while adding listener","getAttachedData","virtualKeyboard","getItemLocalStorageSafe","INPUT","clipboardData","isTrusted","pointermove","100ODiELc","offsetY","mouseup","paste","target","change","989030aCtfqJ","composed","keydown","addSafeInteractionListener","sourceCapabilities","visibilityState","1172612gjmEDE","overlaysContent","getEventHighResTimestamp","208218msgxDx","tagName","hasFocus","storageManager","3266240NleYgq","includes","dropEffect","forEach","setItemLocalStorageSafe","pagehide","TEXTAREA","offsetX","handleEvent","eventTypesToAttach","random","pointerMoveRolloutPercentage","inputTypeFilter","undefined","448976xraPNk","pageshow","detectMoveEventType","effectAllowed","click","blur","collect","pointerevents","mousemove","keys","submit","54642oFXrIJ","error adding interaction listener","entries","safeEventCallback"];return(hr=function(){return t})()}!function(){const t=Pr,e=hr();for(;;)try{if(451766==-parseInt(t(509))/1+-parseInt(t(482))/2+-parseInt(t(440))/3+-parseInt(t(495))/4+-parseInt(t(476))/5*(-parseInt(t(491))/6)+parseInt(t(488))/7+parseInt(t(447))/8)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();const fr=dr(481),pr=dr(513),gr=dr(479),mr=dr(437),yr=dr(475),wr=dr(478),_r="mousedown",vr=dr(439),Er=dr(453),br=dr(484),Ar=dr(446),Cr="focusout",Ir=dr(450),Sr=dr(514),Tr=dr(456),Dr=dr(500),Or=dr(510),Rr=dr(436),Mr=[dr(472),dr(467),dr(501)],Nr=dr(464),kr=dr(465);class xr{constructor(t,e,r,n,i){const a=dr;this[a(494)]=n,this[a(461)]=t,this[a(455)]=e,this[a(443)]=r,this[a(506)]=i,this[a(448)]=this[a(511)](),this[a(463)]={[pr]:{eventTypesToAttach:[this[a(448)],wr,_r],attributesMapper:t=>{const e=a;var r;return{x:t.x,y:t.y,mouseButtonType:t.detail,isPressed:null==(null===(r=t[e(486)])||void 0===r?void 0:r[e(460)])?null:!t[e(486)][e(460)],offsetX:t[e(502)],offsetY:t[e(477)],target_id:t[e(480)].id}}},[gr]:{attributesMapper:t=>{const e=a;return{target_id:t.target.id,isTrusted:t[e(474)],cancelable:t[e(452)],composed:t[e(483)],dropEffect:t[e(473)][e(497)],effectAllowed:t[e(473)][e(512)]}}},[vr]:{attributesMapper:t=>({target_id:t[a(480)].id})},[mr]:{continousCollectors:[new or(this[a(455)])]},[yr]:{continousCollectors:[new ir(this.mouseEventsCollectionBuffer)]},[wr]:{continousCollectors:[new ar(1)]},[_r]:{continousCollectors:[new ar(1)]},[Cr]:{eventTypesToAttach:[Ar,Er,br,fr],filter:this[a(507)],attributesMapper:t=>{const e=a,{target:r,isTrusted:n,cancelable:i,composed:s}=t;return o({target_id:r.id,dataset_keys:Object[e(438)](r.dataset||{}),isTrusted:n,cancelable:i,composed:s},navigator[e(470)]&&{navigator_virtualKeyboard:navigator[e(470)][e(489)]})}},[Ar]:{filter:this.inputTypeFilter,continousCollectors:[new cr(50)]},[Er]:{filter:this[a(507)],continousCollectors:[new ur(50)]},[br]:{filter:this[a(507)],continousCollectors:[new sr(50)]},[fr]:{continousCollectors:[new lr(50)]},[Ir]:{attributesMapper:t=>{const e=a;var r;return{visibilityState:document[e(487)],hasFocus:document[e(493)](),timestampHighRes:Qe[e(490)](t),target_id:null===(r=t.target)||void 0===r?void 0:r.id}}},[Sr]:{attributesMapper:t=>{const e=a;var r;return{visibilityState:document.visibilityState,hasFocus:document[e(493)](),timestampHighRes:Qe[e(490)](t),target_id:null===(r=t[e(480)])||void 0===r?void 0:r.id}}},[Tr]:{attributesMapper:t=>{const e=a;return{visibilityState:document[e(487)],hasFocus:document[e(493)](),timestampHighRes:Qe[e(490)](t)}}},[Dr]:{attributesMapper:t=>{const e=a;return{visibilityState:document.visibilityState,hasFocus:document[e(493)](),timestampHighRes:Qe[e(490)](t)}}},[Or]:{attributesMapper:t=>{const e=a;return{visibilityState:document[e(487)],hasFocus:document[e(493)](),timestampHighRes:Qe[e(490)](t)}}}}}[dr(511)](){const t=dr;return typeof window!==t(508)&&window[t(451)]?this[t(445)]():mr}selectMoveEventTypeBasedOnRollout(){const t=dr,e=this.storageManager[t(471)](Nr);if((null!=e?Number(e):null)!==this.pointerMoveRolloutPercentage){const e=Math[t(505)]()<this.pointerMoveRolloutPercentage/100?yr:mr;return this[t(449)](e),e}return this[t(459)]()}[dr(449)](t){const e=dr;this.storageManager[e(499)](Nr,this.pointerMoveRolloutPercentage),this[e(494)].setItemLocalStorageSafe(kr,t)}[dr(459)](){const t=this[dr(494)].getItemLocalStorageSafe(kr);return(e=t)===yr||e===mr?t:mr;var e}[dr(507)](t){const e=dr;var r;const n=null===(r=t[e(480)])||void 0===r?void 0:r[e(492)];return Mr.includes(n)}registerEventListeners(){const t=dr;for(const[e,r]of Object[t(442)](this[t(463)]))if(!this[t(461)][t(496)](e)&&!(e===mr&&this[t(448)]===yr||e===yr&&this[t(448)]===mr))try{this.addSafeInteractionListener(e,r)}catch(r){Te[t(454)](t(468),{error:r,eventType:e})}}[dr(462)](t,e){const r=dr;return!t.filter||t[r(462)](e)}async[dr(503)](t,e,r){const n=dr,{attributesMapper:i,continousCollectors:a}=t;if(!this[n(462)](t,e))return!1;if(a)a.forEach((t=>{t[n(515)](e)}));else{const t=this[n(444)](),a=this[n(469)](r),s=o(o(o({},t),i(e)),a&&{attachedEventsData:a});await this.safeEventCallback(r,s)}return!0}[dr(485)](t,e){const r=dr;window[r(457)](t,(async n=>{const o=r;try{await this[o(503)](e,n,t)}catch(t){Te[o(454)](o(441),{error:t})}}),t===Ir||t===Sr)}[dr(469)](t){const e=dr;let r;const n=this[e(463)][t][e(504)];return n&&(r={},n[e(498)]((t=>{const n=e,{continousCollectors:o}=this[n(463)][t];if(o){const e=t===yr?Rr:t;o[n(498)]((t=>r[e]=t[n(466)]()))}}))),r}[dr(444)](){const t=dr;return{location:window.location[t(458)]}}}function Pr(t,e){return t-=436,hr()[t]}function Br(t,e){return t-=402,Fr()[t]}function Fr(){var t=["70443LQNIlU","510455gmfSoO","compressed","1928MUqsbD","9IhXwmx","compress","158JpldRY","589360wezGtx","ALLOW","TRUST","uncompressed","CHALLENGE","4fssBIU","DENY","672wqVEQO","5141961naToty","5418mogKSs","533140aXYoUF"];return(Fr=function(){return t})()}var Lr,zr,Ur,Vr,Hr,jr;function Gr(t,e){return t-=139,Wr()[t]}function Wr(){const t=["6IoRakW","encrypt","exportKey","3091yAhlbY","crypto","encryptPayload","importPublicKey","string","21ZefatE","375105zdHDlv","fromCharCode","decrypt","7QoNBiD","encryptSymKeyBundle","crypto is not supported","parse","arrayBufferToBase64","btoa","17001HpmaEx","590ZAuGNk","SHA-256","stringify","subtle","31606BrgOLB","getRandomValues","byteLength","3382424zJubRI","AES-GCM","encode","generateKey","raw","22332LWNSTk","jwk","662470QbBeYL","configManager","1131756QCXCJK"];return(Wr=function(){return t})()}!function(){for(var t=Br,e=Fr();;)try{if(227039==-parseInt(t(411))/1*(parseInt(t(414))/2)+parseInt(t(408))/3+parseInt(t(402))/4*(parseInt(t(409))/5)+-parseInt(t(406))/6*(parseInt(t(404))/7)+-parseInt(t(415))/8*(parseInt(t(412))/9)+-parseInt(t(407))/10+parseInt(t(405))/11)break;e.push(e.shift())}catch(t){e.push(e.shift())}}(),(zr=Lr||(Lr={}))[(Ur=Br)(413)]=Ur(410),zr[Ur(418)]="uncompressed",jr=Br,(Hr=Vr||(Vr={})).ALLOW=jr(416),Hr[jr(419)]=jr(419),Hr[jr(403)]=jr(403),Hr[jr(417)]=jr(417);const Xr=Gr;!function(){const t=Gr,e=Wr();for(;;)try{if(219918==parseInt(t(154))/1*(-parseInt(t(169))/2)+parseInt(t(155))/3+parseInt(t(145))/4+-parseInt(t(143))/5*(-parseInt(t(146))/6)+-parseInt(t(158))/7*(-parseInt(t(172))/8)+parseInt(t(164))/9*(parseInt(t(165))/10)+parseInt(t(149))/11*(-parseInt(t(141))/12))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class Yr{constructor(t){this[Gr(144)]=t}generateSymKey(){const t=Gr;return window[t(150)].subtle[t(139)]({name:t(173),length:256},!0,[t(147),t(157)])}async[Xr(151)](t,e){const r=Xr,n=typeof t===r(153)?(new TextEncoder).encode(t):t,o=window[r(150)][r(170)](new Uint8Array(12)),i={name:r(173),iv:o},a=await window[r(150)].subtle[r(147)](i,e,n);return{payloadCipherText:this[r(162)](a),iv:o}}async[Xr(159)](t,e,r){const n=Xr,o=await window[n(150)][n(168)][n(148)](n(140),t),i=this[n(162)](o),a=this[n(162)](e),s=(new TextEncoder)[n(174)](JSON[n(167)]({symKey:i,iv:a})),u=await window[n(150)][n(168)][n(147)]({name:"RSA-OAEP"},r,s);return this[n(162)](u)}[Xr(162)](t){const e=Xr;let r="";const n=new Uint8Array(t),o=n[e(171)];for(let t=0;t<o;t++)r+=String[e(156)](n[t]);return window[e(163)](r)}[Xr(152)](t){const e=Xr;return window[e(150)][e(168)].importKey(e(142),JSON[e(161)](t),{name:"RSA-OAEP",hash:e(166)},!0,[e(147)])}async encrypt(t,e){const r=Xr;if(!window[r(150)]||!window[r(150)].subtle)throw new Error(r(160));const n=await this.generateSymKey(),{payloadCipherText:o,iv:i}=await this[r(151)](e,n),a=await this[r(152)](t);return{encryptedData:o,encryptedKey:await this.encryptSymKeyBundle(n,i,a)}}}var Zr,qr,Kr,$r=Jr;function Jr(t,e){return t-=366,Qr()[t]}function Qr(){var t=["145siJtkj",", errorCode: ","160aIRYAM","2191244uOkLrj","390uQWNaz","COMMUNICATION","SERVER","1126584rSasqx","toString","7055667iNVHTq","error","errorCode","CLIENT","toLog","113154kUsjXr","1121180BHpjdG","errorSpace","name","message","63HTTxWi",", errorSpace: ","communication","323hshBeZ","736821RiXfQK","server"];return(Qr=function(){return t})()}!function(){for(var t=Jr,e=Qr();;)try{if(686656==parseInt(t(384))/1*(parseInt(t(366))/2)+-parseInt(t(385))/3+parseInt(t(377))/4+-parseInt(t(387))/5*(parseInt(t(376))/6)+parseInt(t(381))/7*(-parseInt(t(369))/8)+-parseInt(t(371))/9+-parseInt(t(389))/10*(-parseInt(t(390))/11))break;e.push(e.shift())}catch(t){e.push(e.shift())}}(),(qr=Zr||(Zr={}))[(Kr=Jr)(374)]="client",qr[Kr(368)]=Kr(386),qr[Kr(367)]=Kr(383);class tn extends Error{constructor(t,e,r){var n,o,i=Jr;super(),this[i(372)]=t,this[i(378)]=e,this[i(373)]=r,this[i(380)]=(null===(n=this[i(372)])||void 0===n?void 0:n.message)||this[i(372)].toString(),this.name=(null===(o=this.error)||void 0===o?void 0:o[i(379)])||tn[i(379)]}[$r(370)](){var t=$r;return"SDKError: "+this[t(380)]+(this[t(378)]?t(382)+this.errorSpace:"")+(this[t(373)]?t(388)+this[t(373)]:"")}[$r(375)](){var t=$r;return o(o({name:this[t(379)],message:this[t(380)]},this.errorSpace&&{errorSpace:this[t(378)]}),this[t(373)]&&{errorCode:this[t(373)]})}}function en(t,e){return t-=282,rn()[t]}function rn(){const t=["21746784pWaMmG","join","148WfoOCj","1185686fWDRrz","140665VWmfWD","20gNHtdY","195752VlKwIl","7917720emygJs","11woIVkf","1960422OLizPB","645444ieBpgO","3ruJqxP","21DbXLjq"];return(rn=function(){return t})()}!function(){const t=en,e=rn();for(;;)try{if(527156==parseInt(t(287))/1+parseInt(t(284))/2*(-parseInt(t(292))/3)+-parseInt(t(283))/4*(parseInt(t(285))/5)+-parseInt(t(290))/6*(parseInt(t(293))/7)+parseInt(t(288))/8+-parseInt(t(291))/9*(-parseInt(t(286))/10)+parseInt(t(289))/11*(parseInt(t(294))/12))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();const nn=on;function on(t,e){return t-=109,an()[t]}function an(){const t=["localStoredEventTypes","EVENT_TYPE_ACTION_RESULT","getDeviceId","addEventToLocalStorage","EVENT_TYPE_IDENTIFICATION","catch","setSessionToken","Error while emitting event","[Lightweight] getPayload() can only be called in lightweight mode","mouseEventsCollectionBuffer","removeItemLocalStorageSafe","flushLock","[Lightweight] Failed to collect device data","setUserId","token","get","map","getItemLocalStorageSafe","interactionEventsManager","uncompressed","storageManager","actionToken","size","1482LAOxxJ","device/events","setDeviceId","timestamp","[Lightweight] clearQueue() called in standard mode - ignoring","parse","getClientId","ACTION_TOKEN_CACHE_MAX_SIZE","Crypto-binding is not supported. ","page_load","pointerEventRolloutPercentage","EVENT_TYPE_INTERACTION","forEach","toString","info","eventIndex","getRotationData","add","lightweight","key_rotation_data","safeEventCallback","1372HRhLxU","EVENT_TYPE_DEVICE","bufferSize","increaseEventIndex","Failed to compress data, sending the data to the service uncompressed","Error while emitting event (delayed flush)","push","emitEvent","setItemLocalStorageSafe","pollingInterval","1102bvxCjU","keyIdentifier","delete","isNaN","now","min","identityManager","126zEmzUC","value","eventTypesToStore","processingEvents","getConfValue","61810omNmOK","has","history","index","deviceDataManager","getPublicData","registerEventListeners","eventIdMap","799421onEswr","events","Failed to refresh data","no need to send device event","type","fetchEventsFromLocalStorage","getPayload","key_rotation_status","crypto","enablePendingQueue","sessionToken","rei","length","warn","publicKeyId","error","configManager","headers","popAllEvents","getTabId","performance","publicKey","correlationId","cacheActionToken","stringify","userId","pop","actionTokenCache","extractWindowRespurces","isTokenExpired","encrypt","navigatorHighEntropyData","generateEventIdentifier","attributes","referrer","207TliPEf","errorCode","buildEncryptedRequestBody","lastDeviceInDeviceEvent","[Lightweight] Event queue cleared","flushTimeoutHandle","standard","filter","6751870RDxLfv","serverPath","next","ACTION_TOKEN_CACHE_TTL","deviceId","cleanupSentEvents","includes","cleanLocalStorageEvents","pendingQueueEnabled","sort","EVENT_TYPE_ACTION","location","refreshSessionToken","find","maxLocalStoredEvents","[Lightweight] Building fresh device payload","set","maintainLastXItems","requestsManager","COMMUNICATION","getUserId","isMobile","cryptoBinding","isArray","maxEventStored","tabId","sdkVersion","eventsQueue","enableSessionToken","getActionEventCacheKey","pollingSessionToken","sendDeviceDataEvent","getEntriesByType","platform","flush","compress","getDeviceData","shouldSendDeviceEvent","50504cGoZqm","lse","tier","getCachedActionToken","569862vefvxJ","data","parseInt","Failed to polling data","ddls"];return(an=function(){return t})()}!function(){const t=on,e=an();for(;;)try{if(176658==-parseInt(t(246))/1*(parseInt(t(191))/2)+-parseInt(t(160))/3*(parseInt(t(181))/4)+-parseInt(t(203))/5*(parseInt(t(198))/6)+parseInt(t(211))/7+-parseInt(t(128))/8+-parseInt(t(132))/9+parseInt(t(254))/10)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();const sn=nn(136),un=nn(249),cn=nn(222),ln=nn(129),dn=nn(146),hn="deviceEventDataCollectionIgnoreList",fn=nn(232),pn=nn(183),gn=[Ve[nn(264)],Ve.EVENT_TYPE_IDENTIFICATION,Ve[nn(182)],Ve[nn(138)]],mn=[Ve.EVENT_TYPE_ACTION,Ve[nn(141)]],yn=nn(137),wn=nn(268),_n=nn(179),vn=nn(218),En=nn(170);class bn{get[nn(262)](){const t=nn;return this[t(227)][t(202)](t(220),!1)}constructor(t,e,r,n,i,a,s,u){let c=arguments.length>8&&void 0!==arguments[8]?arguments[8]:nn(252);const l=nn;this[l(227)]=t,this[l(157)]=e,this[l(207)]=r,this[l(272)]=n,this.identityManager=i,this[l(112)]=a,this[l(255)]=s,this[l(118)]=u,this[l(130)]=c,this[l(175)]=null,this[l(210)]=new WeakMap,this.flushLock=!1,this[l(201)]=new Map,this.actionTokenCache=new Map,this[l(257)]=36e5,this[l(167)]=100,this[l(251)]=null,this[l(180)]=async(t,e)=>{const r=l;try{const n=o({},o({interaction_type:t},e)),i={type:Ve[r(171)],attributes:n};return await this[r(188)](i)}catch(t){}},this.enableSessionToken=u,this[l(117)]=[],this[l(219)]=new Yr(t),this.interactionEventsManager=new xr(this[l(227)][l(202)](hn,[]),this[l(227)].getConfValue(dn,100),this[l(180)],this[l(157)],this[l(227)][l(202)](En,0)),this[l(111)]=ze[l(111)](),this.eventTypesToStore=this[l(227)][l(202)](yn,[Ve[l(264)],Ve[l(182)]]),this[l(114)]=this[l(227)][l(202)](wn,4),this[l(190)]=36e4,this.tier!==l(178)&&this.pollingSessionToken()}[nn(243)](t){const e=nn;var r;if(this[e(210)].has(t))return this[e(210)][e(152)](t);const n=function(t,e,r,n,o,i,a){const s=en;return[t,e,r,n,o,void 0!==i?i:"",a||""].filter((t=>""!==t))[s(282)]("-")}(t[e(215)]||"",this[e(197)][e(166)](),this[e(197)].getDeviceId()||"",this[e(197)][e(110)]()||"",t[e(163)],t[e(206)],null===(r=t[e(244)])||void 0===r?void 0:r.action_type);return this.eventIdMap[e(270)](t,n),n}[nn(119)](t){const e=nn;var r;return((null==t?void 0:t.type)||"")+"-"+(this[e(197)].getClientId()||"")+"-"+(this.identityManager[e(139)]()||"")+"-"+((null==t?void 0:t[e(236)])||this[e(197)].getUserId()||"")+"-"+((null==t?void 0:t.timestamp)||"")+"-"+((null==t?void 0:t.index)||"")+"-"+((null===(r=null==t?void 0:t[e(244)])||void 0===r?void 0:r.action_type)||(null==t?void 0:t[e(233)])||"")}[nn(131)](t){const e=nn;if(!mn.includes(null==t?void 0:t[e(215)]))return null;const r=this[e(119)](t),n=this[e(238)][e(152)](r);return n?Date[e(195)]()-n[e(163)]>this[e(257)]?(this.actionTokenCache[e(193)](r),null):n[e(151)]:null}[nn(234)](t,e){const r=nn;if(!mn[r(260)](null==t?void 0:t[r(215)])||!e)return;if(this.actionTokenCache[r(159)]>=this.ACTION_TOKEN_CACHE_MAX_SIZE){const t=this.actionTokenCache.keys()[r(256)]()[r(199)];this[r(238)][r(193)](t)}const n=this[r(119)](t);this[r(238)].set(n,{token:e,timestamp:Date[r(195)]()})}async emitEvent(t){const e=nn;if(this[e(262)]&&mn[e(260)](null==t?void 0:t[e(215)])){const r=this[e(131)](t);if(r)return Te[e(174)]("Returning cached action token",{actionType:t[e(215)],correlationId:t[e(233)]}),{actionToken:r}}t[e(206)]=this[e(184)](),t[e(265)]=location[e(173)](),t[e(123)]=navigator[e(123)],t[e(116)]="2.4.0",t[e(255)]=this[e(255)],t[e(115)]=this.identityManager[e(230)](),t[e(163)]=Date[e(195)](),await this.enrichUADataIfDoesNotExist(t);let r=0;if(this[e(200)].includes(t[e(215)])?r=this.addEventToLocalStorage(t):this.eventsQueue.push(t),this.tier===e(178))return{};const n=this.configManager[e(202)](pn,2);if(this.eventsQueue[e(223)]+r>=n||gn.includes(t.type)){this[e(251)]&&(clearTimeout(this[e(251)]),this[e(251)]=null);try{return await this[e(124)]()}catch(r){throw Te[e(226)](e(144),{clientId:this[e(197)].getClientId(),eventType:t[e(215)],error:r.errorCode?r.toLog():r}),r}}if(!this[e(251)]&&this[e(117)][e(223)]>0){const r=this[e(227)][e(202)]("bufferInterval",2),n=Math[e(196)](r,30);this[e(251)]=setTimeout((()=>{const r=e;this[r(251)]=null,this[r(124)]()[r(142)]((e=>{const n=r;Te.error(n(186),{clientId:this[n(197)][n(166)](),eventType:t[n(215)],error:e[n(247)]?e.toLog():e})}))}),1e3*n)}return{}}async[nn(266)](){const t=nn;try{return this.eventsQueue.length>0||await this[t(121)](!0),await this[t(124)]()}catch(e){Te[t(226)](t(213),{e:e})}}async[nn(120)](){const t=nn;try{this[t(197)][t(240)]()&&await this[t(266)]()}catch(e){Te.error(t(135),{e:e})}finally{setTimeout((async()=>{const e=t;await this[e(120)]()}),this[t(190)])}}async enrichUADataIfDoesNotExist(t){const e=nn;var r;if(!(null===(r=t[e(244)])||void 0===r?void 0:r[e(242)]))try{t[e(244)][e(242)]=await Oe()}catch(t){}}[nn(229)](){const t=nn;if(this[t(262)]){const e=[],r=new Set;for(;this[t(117)][t(223)];){const n=this.eventsQueue[t(237)]();if(!n)break;const o=this.generateEventIdentifier(n);this.processingEvents.has(o)||!r[t(204)](o)&&(r.add(o),e[t(187)](n))}const n=this[t(216)]();return(null==n?void 0:n[t(223)])&&n[t(172)]((n=>{const o=t,i=this.generateEventIdentifier(n);this[o(201)][o(204)](i)||!r.has(i)&&(r[o(177)](i),e.push(n))})),e[t(263)](((e,r)=>e[t(163)]-r[t(163)]))}{const e=[],r=this[t(216)]();for(;this.eventsQueue.length;){const r=this.eventsQueue[t(237)]();if(!r)break;e[t(187)](r)}return(null==r?void 0:r[t(223)])&&e[t(187)](...r),e[t(263)](((e,r)=>e[t(163)]-r[t(163)]))}}async[nn(124)](){const t=nn;let e=[];if(this.pendingQueueEnabled){for(;this[t(148)];)await new Promise((t=>setTimeout(t,10)));this[t(148)]=!0;try{if(e=this.popAllEvents(),0===e[t(223)])return{};e[t(172)]((e=>{const r=t,n=this[r(243)](e);this[r(201)][r(270)](n,e)}))}finally{this[t(148)]=!1}}else if(e=this[t(229)](),0===e[t(223)])return{};const r={};r.clientId=this[t(197)][t(166)](),r[t(258)]=this.identityManager.getDeviceId(),r[t(236)]=this[t(197)][t(110)](),r.sdkPlatform=this.isMobile?Ge:He,r[t(212)]=e;try{const{keyIdentifier:e,publicKeyId:n}=await this[t(112)][t(208)]();r[t(192)]=e,r[t(225)]=n}catch(e){Te[t(224)](t(168)+e)}this[t(118)]&&(r[t(221)]=!0);try{const n=await this[t(248)](r,!0),i=await this[t(112)][t(176)]();let a;i&&(a=[{type:_n,data:i[t(133)],signature:i.signature}]);const s=await this.requestsManager.postData(t(161),o(o({},n),a?{headers:a}:{}));if(s[t(228)]){const e=s.headers[t(267)]((e=>e[t(215)]===vn));e&&e[t(199)]&&this[t(112)].handleRotateResponse(e[t(199)])}return s[t(258)]&&this.identityManager[t(162)](s[t(258)]),s[t(221)]&&this.identityManager[t(143)](s.sessionToken),s.userId&&this[t(197)][t(150)](s[t(236)]),this[t(262)]?(e.forEach((e=>{const r=t;mn[r(260)](e[r(215)])&&s.actionToken&&this[r(234)](e,s[r(158)])})),this[t(259)](e),e[t(172)]((e=>{const r=t,n=this[r(243)](e);this.processingEvents[r(193)](n)}))):this.cleanLocalStorageEvents(),s}catch(r){throw this[t(262)]&&e.forEach((e=>{const r=t,n=this[r(243)](e);this[r(201)][r(193)](n)})),r}}async[nn(248)](t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const r=nn,n=this.configManager[r(202)](fn,null);if(null===n&&e)return await this[r(227)].refreshConf(this[r(197)][r(166)]()),await this[r(248)](t);if(null===n)throw new tn(new Error("Encryption error - missing public key"),Zr[r(109)]);try{const e=JSON.stringify(t),o=this.compressData(e),i=o||e,{encryptedData:a,encryptedKey:s}=await this.crypto[r(241)](n,i);return{data:a,key:s,dataType:o?Lr[r(125)]:Lr[r(156)]}}catch(t){throw new tn(t,Zr.CLIENT)}}compressData(t){const e=nn;try{return fe(t)}catch(t){Te[e(226)](e(185),{clientId:this[e(197)][e(166)](),error:t})}}[nn(184)](){const t=nn;if(null===this[t(175)]){const e=this[t(157)][t(154)](cn),r=Number[t(134)](e);this[t(175)]=Number[t(194)](r)?-1:r}return this[t(175)]++,this.storageManager[t(189)](cn,this[t(175)][t(173)]()),this[t(175)]}[nn(127)](){const t=nn,e=this[t(157)].getItemLocalStorageSafe(sn),r=this[t(157)][t(154)](un);return!e||!r||Date.now()-e>864e5||r!=this[t(197)].getDeviceId()}async[nn(121)](t){const e=nn;if(!t&&!this[e(127)]())return Te.info(e(214)),!1;const r=await this[e(207)].getDeviceData(),n={type:Ve[e(182)],attributes:r},o=await this[e(188)](n);return o&&(this[e(157)][e(189)](sn,Date[e(195)]()),this[e(157)][e(189)](un,this[e(197)][e(139)]())),o}async sendPageLoadEvent(){const t=nn,e=t(169);if(this.configManager[t(202)](hn,[])[t(260)](e))return!1;const r=this[t(239)]();return await this[t(188)]({type:Ve[t(171)],attributes:o(o({interaction_type:e,location:window[t(265)].href,referrer:document[t(245)]},window[t(205)]&&{window_historyLength:window.history.length}),r&&{windowResources:r})}),!0}extractWindowRespurces(){const t=nn;try{const e=window[t(231)][t(122)]("resources");return e&&Array[t(113)](e)?e[t(153)]((t=>({name:t.name,initiatorType:t.initiatorType}))):void 0}catch(t){}}registerEventListeners(){const t=nn;this[t(155)][t(209)](),this[t(197)].registerEventListeners()}async[nn(217)](){const t=nn;if(this[t(130)]!==t(178))throw new Error(t(145));let e;Te[t(174)](t(269));try{e=await this.deviceDataManager[t(126)]()}catch(e){throw Te[t(226)](t(149),{error:e}),new Error(t(149))}const r=[{type:Ve[t(182)],attributes:e,timestamp:Date[t(195)](),index:this.increaseEventIndex(),location:location[t(173)](),platform:navigator[t(123)],sdkVersion:"2.4.0",serverPath:this[t(255)],tabId:this[t(197)][t(230)]()}],n=this[t(197)][t(139)]();return{clientId:this.identityManager[t(166)](),deviceId:n||void 0,userId:this.identityManager[t(110)]()||null,sdkPlatform:this[t(111)]?"mobile_web":"desktop_web",events:r}}clearQueue(){const t=nn;this[t(130)]===t(178)?(this[t(117)]=[],this[t(157)].removeItemLocalStorageSafe(ln),Te[t(174)](t(250))):Te[t(224)](t(164))}[nn(216)](){const t=nn,e=this[t(157)][t(154)](ln);if(!e)return[];try{return JSON[t(165)](e)}catch(t){return Te.error("Failed to parse events from localStorage",{error:t}),[]}}[nn(140)](t){const e=nn,r=this[e(216)]();return Qe[e(271)](r,this[e(114)],t),this[e(157)][e(189)](ln,JSON[e(235)](r)),r[e(223)]}[nn(261)](){const t=nn;this[t(157)][t(147)](ln)}[nn(259)](t){const e=nn;if(0===t[e(223)])return;const r=this[e(216)]();if(!r||0===r[e(223)])return;const n=new Set;for(const r of t)n[e(177)](this[e(243)](r));const o=r[e(253)]((t=>!n[e(204)](this.generateEventIdentifier(t))));o[e(223)]!==r.length&&(o[e(223)]>0?this[e(157)][e(189)](ln,JSON[e(235)](o)):this[e(157)][e(147)](ln))}}function An(){const t=["getPublicData","Failed to generate secure session token:","setClientId","setDeviceId","rdi","loadDeviceId","loadTabId","actionType","setItemSessionStorageSafe","7476teCuMC","Updating DeviceId","1766472Bmdavd","base64UrlEncode","split","411awDIxM","toString","1.0","JWT","setItemLocalStorageSafe","877616lsvkJD","setCryptoBinding","stringify","removeItemLocalStorageSafe","RS256","removeItemSessionStorageSafe","27OVPmda","rci","info","rdit","2675230yBPNBF","getDeviceId","exp","removeUserId","tabId","isTokenExpired","saveTabIdOnUnload","getSessionToken","registerEventListeners","getUserId","getItemSessionStorageSafe","rui","load","addEventListener","storageManager","CryptoBinding not available for secure session token generation","configManager","getConfValue","2449132kjaTih","error","warn","now","3089152tEhipR","floor","setUserId","rst","12286beDcia","iat","deviceId","setSessionToken","clientId","getClientId","getItemLocalStorageSafe","userIdStorageExpiry","MAX_SAFE_INTEGER","cryptoBinding"];return(An=function(){return t})()}const Cn=In;function In(t,e){return t-=294,An()[t]}!function(){const t=In,e=An();for(;;)try{if(446452==parseInt(t(311))/1+-parseInt(t(330))/2*(-parseInt(t(335))/3)+parseInt(t(307))/4+-parseInt(t(350))/5+-parseInt(t(332))/6+-parseInt(t(303))/7+-parseInt(t(340))/8*(-parseInt(t(346))/9))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();const Sn=Cn(296),Tn=Cn(347),Dn=Cn(325),On=Cn(349),Rn="rti",Mn=Cn(310),Nn=Cn(318),kn=Cn(337);class xn{constructor(t,e,r){const n=Cn;this[n(299)]=t,this[n(301)]=e,this[n(315)]=r,this[n(320)]=null,this[n(323)](this[n(315)])}[Cn(341)](t){this[Cn(320)]=t}[Cn(297)](){const t=Cn;this[t(326)](),this[t(327)]()}[Cn(358)](){const t=Cn;window[t(298)]("beforeunload",(async()=>this[t(356)]()))}[Cn(351)](){return this.deviceId}[Cn(324)](t){const e=Cn;this[e(313)]!==t&&(Te[e(348)](e(331),{deviceId:t}),this.deviceId=t,this[e(299)][e(329)](Dn,t),this.storageManager.setItemLocalStorageSafe(Dn,t))}[Cn(326)](){const t=Cn,e=this[t(299)][t(295)](Dn)||this[t(299)][t(317)](Dn);return null!=e&&this[t(324)](e),e}[Cn(316)](){return this.clientId}[Cn(323)](t){this[Cn(299)].getClientId()!=t&&this.storageManager.setClientId(t),this.storageManager.setItemSessionStorageSafe(Tn,t)}[Cn(294)](){const t=Cn;if(Number(this[t(299)][t(317)](On))+this[t(301)][t(302)](Nn,864e5)<Date.now())return this[t(353)](),null;const e=this[t(299)][t(295)](Sn);return null!=e?e:this.storageManager.getItemLocalStorageSafe(Sn)}[Cn(309)](t){const e=Cn;this.userId=t,this[e(299)][e(329)](Sn,t),this.storageManager[e(339)](Sn,t),this[e(299)].setItemLocalStorageSafe(On,Date[e(306)]())}removeUserId(){const t=Cn;this[t(299)][t(345)](Sn),this[t(299)][t(343)](Sn),this[t(299)].removeItemLocalStorageSafe(On)}loadTabId(){const t=Cn,e=this[t(299)][t(295)](Rn);e?(this[t(299)][t(345)](Rn),this[t(354)]=e):this[t(354)]=Math[t(308)](Math.random()*Number[t(319)])[t(336)]()}getTabId(){return this[Cn(354)]}saveTabIdOnUnload(){const t=Cn;this.storageManager[t(329)](Rn,this[t(354)])}[Cn(314)](t){const e=Cn;this.storageManager[e(339)](Mn,t)}[Cn(357)](){const t=Cn;return this.storageManager[t(317)](Mn)||this[t(299)][t(295)](Mn)}async getSecureSessionToken(t){const e=Cn;var r,n;const i=null!==(r=null==t?void 0:t[e(328)])&&void 0!==r?r:null,a=null!==(n=null==t?void 0:t.expirationSeconds)&&void 0!==n?n:300;if(!this[e(320)])return Te[e(305)](e(300)),null;const s=this[e(357)]();if(!s)return Te[e(305)]("No backend session token available"),null;try{const{publicKey:t}=await this[e(320)][e(321)](),r=Math[e(308)](Date.now()/1e3),n=r+a,u=o({backendSessionToken:s,securedToken:!0,version:kn,clientParams:{clientId:this[e(316)](),deviceId:this[e(351)](),userId:this[e(294)]()},iat:r,exp:n,publicKey:t},i&&{actionType:i}),c={alg:e(344),typ:e(338)},l=Qe[e(333)](JSON.stringify(c))+"."+Qe.base64UrlEncode(JSON[e(342)](u)),d=await this[e(320)].sign(l);return l+"."+Qe.base64ToBase64Url(d)}catch(t){return Te[e(304)](e(322),{error:t}),null}}[Cn(355)](){const t=Cn;var e;const r=this[t(357)]();if(!r)return!0;try{const n=JSON.parse(atob(r[t(334)](".")[1]));let o=(null!==(e=n[t(352)])&&void 0!==e?e:n[t(312)])*(n[t(352)]&&n[t(352)]<1e12?1e3:1);return!n.exp&&(o+=9e5),Date[t(306)]()>=o}catch(e){return Te[t(304)]("Invalid JWT:",{error:e}),!0}}}const Pn=Bn;function Bn(t,e){return t-=431,Fn()[t]}function Fn(){const t=["3404NRRDTq","COMMUNICATION","include","postDataFromURL","POST","fetch","getData","status","258217vkbnAH","serverPath","987yRvBoi","statusText","application/json","1489176anExuU","6688835pKnIXW","callServer","9aioGuL","GET","CLIENT","20409810QLmkIh","1034352JlkncC","49IwSAlz","548382wRvNCI"];return(Fn=function(){return t})()}!function(){const t=Bn,e=Fn();for(;;)try{if(700491==-parseInt(t(441))/1+parseInt(t(446))/2+parseInt(t(443))/3*(parseInt(t(433))/4)+-parseInt(t(447))/5+-parseInt(t(432))/6*(parseInt(t(431))/7)+-parseInt(t(453))/8+-parseInt(t(449))/9*(-parseInt(t(452))/10))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class Ln{constructor(t){this[Bn(442)]=t}async postData(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=Bn;return this[n(436)](this[n(442)]+t,e,r)}async[Pn(436)](t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=Pn,i={method:n(437),credentials:n(435),headers:new Headers(o({"Content-Type":n(445)},r)),body:JSON.stringify(e)};return await this[n(448)](t,i)}async[Pn(439)](t){const e=Pn,r=this[e(442)]+t,n={method:e(450),credentials:e(435)};return await this.callServer(r,n)}async[Pn(448)](t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=Pn;if(!(r(438)in window))throw new tn(new Error("fetch-api is not supported"),Zr[r(451)]);try{const n=await fetch(t,e),o=await n.json();if(n.ok)return o;throw new tn(new Error(o.message||n[r(444)]),Zr.SERVER,n[r(440)])}catch(t){if(!(t instanceof tn))throw new tn(new Error(t.message),Zr[r(434)]);throw t}}}const zn=Vn;function Un(){const t=["info","4610322ZZqhff","21XlydEp","835508KbpKCO","throwError","14PBCade","serverPath","filter","string","logIfInvalid","641364LEzIgP","REQUIRED_SDK_PARAMS","options","10129032nLQaJx","4080465WEmtKm","throwOrReturnResult","10840544xttsmA","109443GaFKNX","Invalid SDK params was provided: ","length","tier","push"];return(Un=function(){return t})()}function Vn(t,e){return t-=241,Un()[t]}!function(){const t=Vn,e=Un();for(;;)try{if(941963==parseInt(t(259))/1+parseInt(t(252))/2+parseInt(t(244))/3*(parseInt(t(245))/4)+parseInt(t(256))/5+-parseInt(t(243))/6*(parseInt(t(247))/7)+-parseInt(t(258))/8+parseInt(t(255))/9)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class Hn{constructor(){const t=Vn;this[t(253)]={clientId:t(250)}}[zn(257)](t,e,r){const n=zn;if(!t&&((null==e?void 0:e[n(251)])&&Te[n(242)](r),null==e?void 0:e[n(246)]))throw new Error(r);return t}validateSDKParams(t,e){const r=zn;var n,o,i,a;const s=Object.keys(this[r(253)])[r(249)]((e=>typeof t[e]!=this[r(253)][e]));if("lightweight"!==(null!==(n=t[r(262)])&&void 0!==n?n:null===(o=t[r(254)])||void 0===o?void 0:o[r(262)])){const e=null!==(a=null===(i=t.options)||void 0===i?void 0:i[r(248)])&&void 0!==a?a:t[r(248)];("string"!=typeof e||!e)&&s[r(241)](r(248))}return this[r(257)](0==s[r(261)],e,r(260)+JSON.stringify(s))}}const jn=Wn;function Gn(){const t=["2003553pDeinw","enableLogsReporting","logsMinimumBatch","logsMinimumDelay","middlewares","9059116fbpuGg","logs","reportLogs","lastTimeLogsSent","flush","identityManager","configManager","16ahYjNY","length","now","6372776GpxexQ","511672nJFASf","getConfValue","305697vcZlJi","getClientId","requestsManager","942610LbyVVa","logMiddleware","push","platform","10FxbGXk","1398iLFVWs","3795jRqZpC","36sOdZnO"];return(Gn=function(){return t})()}function Wn(t,e){return t-=320,Gn()[t]}!function(){const t=Wn,e=Gn();for(;;)try{if(532911==parseInt(t(320))/1+-parseInt(t(330))/2*(parseInt(t(331))/3)+-parseInt(t(345))/4*(parseInt(t(325))/5)+parseInt(t(332))/6*(parseInt(t(322))/7)+parseInt(t(348))/8+-parseInt(t(333))/9+parseInt(t(329))/10*(parseInt(t(338))/11))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class Xn{constructor(t,e,r){const n=Wn;this[n(324)]=t,this[n(343)]=e,this[n(344)]=r,this[n(341)]=0,this[n(326)]=async()=>{const t=n;try{await this[t(340)]()}catch(t){}},Te[n(337)][n(327)](this.logMiddleware)}async[jn(340)](){const t=jn;if(!this.configManager[t(321)](t(334),!1))return;const e=this[t(344)][t(321)](t(335),6),r=this[t(344)].getConfValue(t(336),12e4);if(Te[t(339)][t(346)]<e||this[t(341)]+r>Date[t(347)]())return;this[t(341)]=Date[t(347)]();const n=Te[t(342)](),o=this[t(343)][t(323)](),i=Math.floor(Date[t(347)]()/1e3),a={sdkVersion:"2.4.0",platform:navigator[t(328)],clientId:o,timestamp:i,logEntries:n};await this[t(324)].postData("device/logs",a)}}function Yn(t,e){return t-=432,$n()[t]}const Zn=Yn;!function(){const t=Yn,e=$n();for(;;)try{if(511117==-parseInt(t(433))/1+parseInt(t(435))/2+-parseInt(t(432))/3+-parseInt(t(446))/4+parseInt(t(438))/5+-parseInt(t(441))/6+parseInt(t(439))/7*(parseInt(t(451))/8))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();const qn=Zn(445);class Kn{constructor(t,e,r){const n=Zn;this[n(436)]=t,this[n(448)]=e,this[n(443)]=r}async[Zn(434)](t){const e=Zn;if(this[e(443)][e(442)](qn)!=e(450)){const r=this.identityManager.getDeviceId(),n=this[e(436)].getClientId(),o=(t[e(444)]("/")?t:t+"/")+e(437),i=await this.requestsManager[e(440)](o,{deviceId:r,clientId:n});i[e(447)]&&i[e(447)]==r&&this[e(443)][e(449)](qn,e(450))}}}function $n(){const t=["storageManager","endsWith","rimd","989412HCaFqm","deviceId","requestsManager","setItemLocalStorageSafe","true","4518704JwyJLt","1756227XlPjdB","803531XeZwNk","migrateIdentifiers","157604WnhiQd","identityManager","device/migrate-identifiers","3117345oVRKoa","21ylWglJ","postDataFromURL","1496250PJBmuK","getItemLocalStorageSafe"];return($n=function(){return t})()}const Jn=to;function Qn(){const t=["getActions","isTokenExpired","identifiersMigrationEnabled","unknown","idbWriteTimeoutMs","string","enabled","[Lightweight] SDK initialized in lightweight mode","serverPath","warn","ssn","getDeviceData","standard","28691810KpYiFl","phone_number","3723044cGGVth","reportActionResult failed to send","2111346DAhGsG","message","config_disabled","options","sign","enableSessionToken","5yaaKAR","RiskID","errorSpace","disabledReason","extensionMetadata","_error_","reportActionResult","eventsManager","[Lightweight] triggerActionEvent() cannot be used in lightweight tier. Use getPayload() instead.","actions","getSecureSessionToken","initializedInstance","enableIdentifiersMigration","sendDeviceDataEvent","action","validateSDKParams","national_id","other","startedAt","uploadFile","[Lightweight] Setting deviceId from backend","extensionDeviceAttributes","hasOwnClientId","mainEntry","createCryptoBinding","configManager","crypto","getSessionToken","10229121qbtecF","EVENT_TYPE_ACTION","RiskIDReady","challengeType","toString","Invalid action type","claimedUserId","_error_'invalid action type - ","SDK disabled","keyRotation","keys","sdk init started","enableDeviceAttributesInActions","includes","Session token is not enabled","suspiciousContext","cryptoBinding","init","unexpected_error_","email","migrationsManager","migrateIdentifiers","identifyUser","userId","registerEventListeners","fallbackClientId","[Lightweight] Skipping auto-event collection and event listeners","40elmZNy","invalid_params","reportActionResult called without actionToken or result","clearUser","invalid_claimed_user_id_type_","init_not_called","tier","triggerActionEvent","setDeviceId","identityManager","[Lightweight] getPayload() can only be used in lightweight tier","initialize","deviceDataManager","expiryDays","setUserId","drivers_license_number","passport_number","transactionData","errorCode","claimedUserIdType","setAuthenticatedUser","SDK already initialized","refreshConf","[Lightweight] getSecureSessionToken() cannot be used in lightweight tier. Session tokens are not supported in lightweight mode.","storageManager","generateDisabledToken","identifyUser called without a valid userid","session","CLIENT","Invalid claimedUserIdType","sdk init done","SERVER","TSAccountProtectionReady","dispatchEvent","2ywJDpw","TSAccountProtection","sendPageLoadEvent","deviceId","customAttributes","EVENT_TYPE_ACTION_RESULT","__UNIFIED_SDK_VERSIONS__","flush","info","setCryptoBinding","downloadFile","clearQueue","clientId","stringify","serverPath is required","account_id","isInitialized","requestsManager","refreshSessionToken","getUserId","slice","correlationId","removeUserId","1538999ZMdurM","lightweight","validationManager","getConfValue","publicKey","now","getPayload","logsReporter","verbose","[Lightweight] deviceId must be a non-empty string","trim","disabled_sdk_","firstPartyMigrationUrl","unified-platform","catch","object","length","emitEvent","3166644OonIod","tenantId","initializationPromise","1167268hWJtwI","updateUserId","[Lightweight] reportActionResult() cannot be used in lightweight tier.","privateUserIdentifier"];return(Qn=function(){return t})()}function to(t,e){return t-=269,Qn()[t]}!function(){const t=to,e=Qn();for(;;)try{if(761045==parseInt(t(389))/1*(parseInt(t(345))/2)+-parseInt(t(386))/3+-parseInt(t(408))/4*(-parseInt(t(416))/5)+parseInt(t(410))/6+parseInt(t(368))/7*(parseInt(t(311))/8)+parseInt(t(284))/9+-parseInt(t(406))/10)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();const eo=[null,void 0,"undefined","",0],ro=Jn(397),no=Jn(428),oo=Jn(376),io=Jn(296),ao=Jn(425),so=[Jn(303),Jn(407),Jn(360),Jn(403),Jn(272),Jn(327),Jn(326),Jn(273)];class uo{constructor(t,e){const r=Jn;var n,o;if(this.initializationPromise=null,this[r(419)]=null,this[r(415)]=!1,this[r(395)]=!1,this.firstPartyMigrationUrl=null,this[r(278)]=!1,this.tier="standard",this[r(370)]=new Hn,uo.initializedInstance)throw new Error(r(332));uo[r(427)]=!0;const i="string"==typeof e;this.clientId=i?e:t,this[r(413)]=i?{serverPath:t}:e,this[r(317)]=(null===(n=this.options)||void 0===n?void 0:n[r(317)])||r(405);const a=typeof(null===(o=this[r(413)])||void 0===o?void 0:o.serverPath)===r(398)&&this[r(413)][r(401)][r(378)]()[r(384)]>0;if("lightweight"!==this[r(317)]&&!a)throw new Error(r(359));a&&(this.options[r(401)]=new URL(this[r(413)][r(401)])[r(288)]()),this[r(380)]=this.options.firstPartyMigrationUrl||null,"lightweight"===this[r(317)]&&Te[r(353)](r(400),{serverPath:this[r(413)][r(401)]}),Te[r(399)]=!!this[r(413)][r(376)],!this.validationManager[r(271)](this,{throwError:!0,logIfInvalid:!0})&&(this[r(419)]=r(312)),this[r(335)]=new be(this.clientId),this[r(362)]=new Ln(this[r(413)][r(401)]),this[r(281)]=new qe(this[r(335)],this[r(362)]),this[r(320)]=new xn(this[r(335)],this[r(281)],this[r(357)]),this.identityManager.load(),this[r(304)]=new Kn(this[r(320)],this[r(362)],this[r(335)]),this[r(415)]=this.options[r(415)]||!1,this[r(278)]=this[r(413)][r(278)]||!1,this[r(375)]=new Xn(this[r(362)],this[r(320)],this.configManager)}[Jn(336)](t){const e=Jn,r=Date[e(373)]();return e(379)+(this[e(419)]||e(396))+"_"+t+"_"+r}get[Jn(425)](){return this[Jn(281)].getConfValue(ao,[])}async[Jn(393)](){const t=Jn;return await this.isInitialized(),this[t(425)]}async[Jn(283)](){const t=Jn;if(this[t(317)]===t(369))throw new Error("[Lightweight] getSessionToken() cannot be used in lightweight tier. Session tokens are not supported in lightweight mode.");if(!this[t(415)])throw new Error(t(298));return await this[t(361)]()?(this[t(320)][t(394)]()&&await this[t(423)].refreshSessionToken(),this.identityManager.getSessionToken()):(Te[t(353)]("SDK disabled"),this.generateDisabledToken(t(338)))}async[Jn(374)](){const t=Jn;if(this[t(317)]!==t(369))throw new Error(t(321));return await this[t(361)](),await this[t(423)][t(374)]()}[Jn(356)](){const t=Jn;if(this[t(317)]!==t(369))throw new Error("[Lightweight] clearQueue() can only be used in lightweight tier");this[t(423)].clearQueue()}[Jn(319)](t){const e=Jn;if(this.tier!==e(369))throw new Error("[Lightweight] setDeviceId() can only be used in lightweight tier");if(!t||"string"!=typeof t)throw new Error(e(377));Te[e(353)](e(276),{deviceId:t}),this.identityManager.setDeviceId(t)}async[Jn(301)](t){const e=Jn,r=typeof t!==e(383)?t:null==t?void 0:t[e(307)];return Te[e(353)](e(295)),this[e(388)]=(async()=>{const t=e;this.tier!==t(369)&&await this[t(281)][t(333)](this.identityManager.getClientId());const n=this.configManager.getConfValue(t(387),null),o=this[t(281)][t(371)](t(293),null),i=this[t(281)].getConfValue(ro,void 0),a={};if((null==o?void 0:o.isEnabled)&&(a[t(293)]={isEnabled:!0,expiryDays:o[t(324)],startedAt:o[t(274)],tenantId:n}),void 0!==i&&(a[t(397)]=i),this[t(278)]&&(a[t(309)]=this[t(357)]),this[t(300)]=we[t(282)][t(280)](t(414),Object[t(294)](a)[t(384)]>0?a:void 0),this[t(320)][t(354)](this.cryptoBinding),this.deviceDataManager=new Le(this.storageManager,this[t(281)],this[t(300)]),this[t(423)]=new bn(this[t(281)],this.storageManager,this[t(323)],this[t(362)],this[t(320)],this[t(300)],this[t(413)][t(401)],this.enableSessionToken,this[t(317)]),null!==this.disabledReason)return!1;const s=this.configManager[t(371)]("sdkEnabled",void 0);return s?(this[t(395)]=this.identifiersMigrationEnabled||this[t(281)][t(371)](no,!1),this[t(395)]&&this[t(380)]&&await this[t(304)][t(305)](this[t(380)]),Te[t(399)]=Te[t(399)]||!!this[t(281)][t(371)](oo,!1),this.tier!==t(369)?(await this[t(423)][t(269)]()[t(382)]((()=>{})),await this[t(423)][t(347)]()[t(382)]((()=>{})),await this[t(390)](r)[t(382)]((()=>{})),this[t(423)][t(308)](),await this[t(423)][t(352)]()[t(382)]((()=>{}))):Te.info(t(310)),Te.info(t(341)),!0):(this[t(419)]=void 0===s?"missing_config":t(412),!1)})(),await this[e(388)]}async[Jn(361)](){const t=Jn;if(null===this[t(388)])return!this[t(419)]&&(this[t(419)]=t(316)),!1;const e=await this.initializationPromise;return!e&&!this[t(419)]&&(this[t(419)]="init_failed"),e}async[Jn(318)](t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=Jn;var n;if(this[r(317)]===r(369))throw new Error(r(424));const i=Date[r(373)]();if(!await this.isInitialized())return Te.info(r(292)),{actionToken:this[r(336)](r(270))};if(!this[r(425)][r(297)](t))return Te[r(402)](r(289),{actionType:t}),{actionToken:Zr[r(339)]+r(291)+t+"'_"+i};const a=null==e?void 0:e[r(330)];if(a&&!so.includes(a))return Te[r(402)](r(340),{claimedUserIdType:a}),{actionToken:r(315)+a+"_"+i};let s;this[r(281)][r(371)](io,!1)&&(s=await this[r(323)][r(404)]());const u=o({type:Ve[r(285)],attributes:o(o(o(o(o(o(o(o(o(o(o(o(o({action_type:t},(null==e?void 0:e.correlationId)&&{correlation_id:e[r(366)]}),(null==e?void 0:e[r(290)])&&{claimed_user_id:e[r(290)]}),a&&{claimed_user_id_type:a}),(null==e?void 0:e[r(372)])&&{public_key:e[r(372)]}),(null==e?void 0:e[r(420)])&&{extension_metadata:e[r(420)]}),(null==e?void 0:e[r(277)])&&{extension_device_attributes:e.extensionDeviceAttributes}),(null==e?void 0:e.suspiciousSignals)&&{suspicious_signals:e.suspiciousSignals}),(null==e?void 0:e[r(299)])&&{suspicious_context:e.suspiciousContext}),(null==e?void 0:e[r(355)])&&{download_file:e[r(355)]}),(null==e?void 0:e.uploadFile)&&{upload_file:e[r(275)]}),(null==e?void 0:e.transactionData)&&{transactionData:e[r(328)]}),"undefined"!=typeof globalThis&&(null===(n=globalThis[r(351)])||void 0===n?void 0:n[r(381)])&&{platform_sdk_version:globalThis[r(351)][r(381)]}),s)},(null==e?void 0:e.customAttributes)&&{customAttributes:e[r(349)]});try{const t=await this[r(423)][r(385)](u),{actionToken:e}=t;if(!e)throw new tn(new Error("Unhandled SDK error. Received eventResponse: "+(typeof t==r(383)?JSON[r(358)](t)[r(365)](15):t)),Zr.CLIENT);return t}catch(e){return{actionToken:e instanceof tn?e[r(418)]===Zr[r(342)]?e[r(418)]+r(421)+t+"_"+e[r(329)]+"_'"+e[r(411)]+"'_"+i:e[r(418)]+"_error_"+t+"_'"+e[r(411)]+"'_"+i:r(302)+t+"_"+i}}}async[Jn(390)](t){const e=Jn;if(eo[e(297)](t))return Te[e(353)](e(337),{userId:t}),!1;t=t[e(288)](),Te.info(e(306),{userId:t});const r=this[e(320)][e(364)]();return r===t||(this.identityManager[e(325)](t),!!(await this[e(423)].emitEvent({type:Ve.EVENT_TYPE_IDENTIFICATION,attributes:{previous_user_id:r,user_id:t}}))[e(348)])}async[Jn(331)](t){const e=Jn;return await this[e(361)]()?this.updateUserId(t):(Te[e(353)](e(292)),!1)}async[Jn(422)](t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=Jn;if(this.tier===n(369))throw new Error(n(391));if(!await this[n(361)]())return Te[n(353)]("SDK disabled"),!1;if(!t||!e)return Te[n(402)](n(313),{result:e}),!1;const i={type:Ve[n(350)],attributes:o(o(o({action_token:t,result_feedback:e},(null==r?void 0:r[n(287)])&&{challenge_type:r[n(287)]}),(null==r?void 0:r.userId)&&{user_id:r[n(307)]}),(null==r?void 0:r[n(392)])&&{privateUserIdentifier:r.privateUserIdentifier})};try{const t=await this[n(423)][n(385)](i);return typeof t===n(383)&&null!==t}catch(t){return Te.warn(n(409),{error:t}),!1}}async[Jn(314)](){const t=Jn;if(!await this[t(361)]())return Te[t(353)]("SDK disabled"),!1;const e=this[t(320)][t(364)]();return null!=e&&this[t(320)][t(367)](),!!(await this[t(423)].emitEvent({type:Ve.EVENT_TYPE_IDENTIFICATION,attributes:{previous_user_id:e}}))[t(348)]}async[Jn(426)](){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:300;const r=Jn;if("lightweight"===this.tier)throw new Error(r(334));if(!this[r(415)])throw new Error(r(298));return await this.isInitialized()?(this.identityManager[r(394)]()&&await this[r(423)][r(363)](),await this[r(320)][r(426)]({actionType:t,expirationSeconds:e})||this[r(336)](r(338))):(Te[r(353)](r(292)),this[r(336)](r(338)))}}uo.initializedInstance=!1,document.dispatchEvent(new CustomEvent(Jn(343)));const co=lo;function lo(t,e){return t-=145,fo()[t]}!function(){const t=lo,e=fo();for(;;)try{if(299018==parseInt(t(149))/1*(parseInt(t(157))/2)+-parseInt(t(162))/3+-parseInt(t(169))/4+-parseInt(t(171))/5+-parseInt(t(170))/6+parseInt(t(168))/7*(-parseInt(t(161))/8)+parseInt(t(159))/9)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();let ho=null;function fo(){const t=["clientId","init","27167PxLlLt","134564zuaxMD","2631084EcZLNV","1321915xtxjKC","not_initialized","identityManager","getSessionToken","eventsManager","reportActionResult","getActions","513019NxijEZ","events","getSecureSessionToken","MODULE_INITIALIZED","getPayload","moduleMetadata","flush","triggerActionEvent","2GNNvLY","utils","8878941bkdrhK","getInitConfig","880sRVXTI","111306lSyvch","TsError","setAuthenticatedUser","getDeviceId"];return(fo=function(){return t})()}we[co(150)].on(we.events[co(152)],(()=>{const t=co,{clientId:e,drs:r}=we[t(154)][t(160)](),n=r||{},{enabled:i,userId:a,serverPath:s}=n,u=function(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(-1!==e.indexOf(n))continue;r[n]=t[n]}return r}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],-1===e.indexOf(r)&&{}.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}(n,pe);if(!1===i)return;const c=(null==r?void 0:r.clientId)||e,l=!!(null==r?void 0:r[t(166)]);ho=new uo(c,o(o({},u),{},{hasOwnClientId:l,serverPath:s})),ho[t(167)]({userId:a})}));const po=function(){const t=co;return function(t){const e=co;if(!t)throw new(we[e(158)].exceptions[e(163)])(e(172),"tsPlatform not initialized")}(ho),ho[t(145)]()};class go extends Error{constructor(t,e,r){super(r),this.name="ApiError",this.url=e.url,this.status=e.status,this.statusText=e.statusText,this.body=e.body,this.request=t}}const mo={BASE:window.location.origin,VERSION:"",WITH_CREDENTIALS:!1,CREDENTIALS:"include",TOKEN:void 0,USERNAME:void 0,PASSWORD:void 0,HEADERS:void 0,ENCODE_PATH:void 0};var yo,wo,_o,vo;!function(t){var e;(e=t.feedback||(t.feedback={})).OK="ok",e.OTHER="other",e.DOCUMENT_NOT_FOUND="document_not_found",e.FACE_NOT_FOUND="face_not_found",e.DOCUMENT_FACE_NOT_FOUND="document_face_not_found",e.OBSTRUCTED="obstructed",e.BLUR="blur",e.GLARE="glare",e.DOCUMENT_NOT_SUPPORTED="document_not_supported",e.DOCUMENT_NOT_MATCHING="document_not_matching",e.WRONG_DOCUMENT_SIDE="wrong_document_side",e.MULTI_FACE="multi_face",e.FACE_ROTATED="face_rotated",e.FACE_TOO_SMALL="face_too_small",e.FACE_TOO_CLOSE="face_too_close",e.CLOSED_EYES="closed_eyes",e.FACE_ANGLE_TOO_LARGE="face_angle_too_large",e.FACE_CLOSE_TO_BORDER="face_close_to_border",e.FACE_OCCLUDED="face_occluded",e.FACE_CROPPED="face_cropped",e.BARCODE_NOT_FOUND="barcode_not_found",e.GLARE_SELFIE="glare_selfie",e.BLUR_SELFIE="blur_selfie",e.RESTRICTED_CRITERIA="restricted_criteria",e.UNCLASSIFIABLE="unclassifiable"}(yo||(yo={})),function(t){var e;(e=t.image_type||(t.image_type={})).DOCUMENT_FRONT="document_front",e.DOCUMENT_BACK="document_back",e.SELFIE="selfie"}(wo||(wo={})),function(t){var e,r;(e=t.status||(t.status={})).PENDING="pending",e.CAPTURING="capturing",e.PROCESSING="processing",e.RECAPTURE="recapture",e.COMPLETE="complete",e.ERROR="error",e.EXPIRED="expired",(r=t.recapture_reason||(t.recapture_reason={})).IMAGE_MISSING="image_missing",r.DOCUMENT_EXPIRED="document_expired",r.DOCUMENT_NOT_SUPPORTED="document_not_supported",r.DOCUMENT_DAMAGED="document_damaged",r.POOR_IMAGE_QUALITY="poor_image_quality",r.DOCUMENT_NOT_FOUND="document_not_found",r.OBSTRUCTED="obstructed",r.BLUR="blur",r.GLARE="glare",r.DOCUMENT_NOT_MATCHING="document_not_matching",r.WRONG_DOCUMENT_SIDE="wrong_document_side",r.FACE_NOT_FOUND="face_not_found",r.DOCUMENT_FACE_NOT_FOUND="document_face_not_found",r.INVALID_INPUT="invalid_input",r.MULTI_FACE="multi_face",r.FACE_ROTATED="face_rotated",r.FACE_TOO_SMALL="face_too_small",r.FACE_TOO_CLOSE="face_too_close",r.CLOSED_EYES="closed_eyes",r.FACE_ANGLE_TOO_LARGE="face_angle_too_large",r.FACE_CLOSE_TO_BORDER="face_close_to_border",r.FACE_OCCLUDED="face_occluded",r.FACE_CROPPED="face_cropped",r.BARCODE_NOT_FOUND="barcode_not_found",r.GLARE_SELFIE="glare_selfie",r.BLUR_SELFIE="blur_selfie",r.NO_FACE="no_face",r.DOCUMENT_TYPE_RESTRICTED="document_type_restricted"}(_o||(_o={})),function(t){var e;(e=t.client_type||(t.client_type={})).HOSTED_APP="hosted_app",e.MOBILE_SDK="mobile_sdk"}(vo||(vo={}));var Eo,bo,Ao={},Co={get exports(){return Ao},set exports(t){Ao=t}};Eo=Co,bo=Ao,function(t,e){var r="function",n="undefined",o="object",i="string",a="major",s="model",u="name",c="type",l="vendor",d="version",h="architecture",f="console",p="mobile",g="tablet",m="smarttv",y="wearable",w="embedded",_="Amazon",v="Apple",E="ASUS",b="BlackBerry",A="Browser",C="Chrome",I="Firefox",S="Google",T="Huawei",D="LG",O="Microsoft",R="Motorola",M="Opera",N="Samsung",k="Sharp",x="Sony",P="Xiaomi",B="Zebra",F="Facebook",L="Chromium OS",z="Mac OS",U=" Browser",V=function(t){for(var e={},r=0;r<t.length;r++)e[t[r].toUpperCase()]=t[r];return e},H=function(t,e){return typeof t===i&&-1!==j(e).indexOf(j(t))},j=function(t){return t.toLowerCase()},G=function(t,e){if(typeof t===i)return t=t.replace(/^\s\s*/,""),typeof e===n?t:t.substring(0,500)},W=function(t,n){for(var i,a,s,u,c,l,d=0;d<n.length&&!c;){var h=n[d],f=n[d+1];for(i=a=0;i<h.length&&!c&&h[i];)if(c=h[i++].exec(t))for(s=0;s<f.length;s++)l=c[++a],typeof(u=f[s])===o&&u.length>0?2===u.length?typeof u[1]==r?this[u[0]]=u[1].call(this,l):this[u[0]]=u[1]:3===u.length?typeof u[1]!==r||u[1].exec&&u[1].test?this[u[0]]=l?l.replace(u[1],u[2]):e:this[u[0]]=l?u[1].call(this,l,u[2]):e:4===u.length&&(this[u[0]]=l?u[3].call(this,l.replace(u[1],u[2])):e):this[u]=l||e;d+=2}},X=function(t,r){for(var n in r)if(typeof r[n]===o&&r[n].length>0){for(var i=0;i<r[n].length;i++)if(H(r[n][i],t))return"?"===n?e:n}else if(H(r[n],t))return"?"===n?e:n;return r.hasOwnProperty("*")?r["*"]:t},Y={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},Z={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[d,[u,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[d,[u,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[u,d],[/opios[\/ ]+([\w\.]+)/i],[d,[u,M+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[d,[u,M+" GX"]],[/\bopr\/([\w\.]+)/i],[d,[u,M]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[d,[u,"Baidu"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\w\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[u,d],[/quark(?:pc)?\/([-\w\.]+)/i],[d,[u,"Quark"]],[/\bddg\/([\w\.]+)/i],[d,[u,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[d,[u,"UC"+A]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[d,[u,"WeChat"]],[/konqueror\/([\w\.]+)/i],[d,[u,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[d,[u,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[d,[u,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[d,[u,"Smart Lenovo "+A]],[/(avast|avg)\/([\w\.]+)/i],[[u,/(.+)/,"$1 Secure "+A],d],[/\bfocus\/([\w\.]+)/i],[d,[u,I+" Focus"]],[/\bopt\/([\w\.]+)/i],[d,[u,M+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[d,[u,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[d,[u,"Dolphin"]],[/coast\/([\w\.]+)/i],[d,[u,M+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[d,[u,"MIUI "+A]],[/fxios\/([-\w\.]+)/i],[d,[u,I]],[/\bqihu|(qi?ho?o?|360)browser/i],[[u,"360"+U]],[/\b(qq)\/([\w\.]+)/i],[[u,/(.+)/,"$1Browser"],d],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[u,/(.+)/,"$1"+U],d],[/samsungbrowser\/([\w\.]+)/i],[d,[u,N+" Internet"]],[/(comodo_dragon)\/([\w\.]+)/i],[[u,/_/g," "],d],[/metasr[\/ ]?([\d\.]+)/i],[d,[u,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[u,"Sogou Mobile"],d],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i],[u,d],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[u],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[u,F],d],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[u,d],[/\bgsa\/([\w\.]+) .*safari\//i],[d,[u,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[d,[u,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[d,[u,C+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[u,C+" WebView"],d],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[d,[u,"Android "+A]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[u,d],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[d,[u,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[d,u],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[u,[d,X,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[u,d],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[u,"Netscape"],d],[/(wolvic)\/([\w\.]+)/i],[u,d],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[d,[u,I+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[u,[d,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[u,[d,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[h,"amd64"]],[/(ia32(?=;))/i],[[h,j]],[/((?:i[346]|x)86)[;\)]/i],[[h,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[h,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[h,"armhf"]],[/windows (ce|mobile); ppc;/i],[[h,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[h,/ower/,"",j]],[/(sun4\w)[;\)]/i],[[h,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[h,j]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[s,[l,N],[c,g]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[s,[l,N],[c,p]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[s,[l,v],[c,p]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[s,[l,v],[c,g]],[/(macintosh);/i],[s,[l,v]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[s,[l,k],[c,p]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[s,[l,T],[c,g]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[s,[l,T],[c,p]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i],[[s,/_/g," "],[l,P],[c,p]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[s,/_/g," "],[l,P],[c,g]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[s,[l,"OPPO"],[c,p]],[/\b(opd2\d{3}a?) bui/i],[s,[l,"OPPO"],[c,g]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[s,[l,"Vivo"],[c,p]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[s,[l,"Realme"],[c,p]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[s,[l,R],[c,p]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[s,[l,R],[c,g]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[s,[l,D],[c,g]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[s,[l,D],[c,p]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[s,[l,"Lenovo"],[c,g]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[s,/_/g," "],[l,"Nokia"],[c,p]],[/(pixel c)\b/i],[s,[l,S],[c,g]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[s,[l,S],[c,p]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[s,[l,x],[c,p]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[s,"Xperia Tablet"],[l,x],[c,g]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[s,[l,"OnePlus"],[c,p]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[s,[l,_],[c,g]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[s,/(.+)/g,"Fire Phone $1"],[l,_],[c,p]],[/(playbook);[-\w\),; ]+(rim)/i],[s,l,[c,g]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[s,[l,b],[c,p]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[s,[l,E],[c,g]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[s,[l,E],[c,p]],[/(nexus 9)/i],[s,[l,"HTC"],[c,g]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[l,[s,/_/g," "],[c,p]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[s,[l,"TCL"],[c,g]],[/(itel) ((\w+))/i],[[l,j],s,[c,X,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[s,[l,"Acer"],[c,g]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[s,[l,"Meizu"],[c,p]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[s,[l,"Ulefone"],[c,p]],[/droid.+; (a(?:015|06[35]|142p?))/i],[s,[l,"Nothing"],[c,p]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[l,s,[c,p]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[l,s,[c,g]],[/(surface duo)/i],[s,[l,O],[c,g]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[s,[l,"Fairphone"],[c,p]],[/(u304aa)/i],[s,[l,"AT&T"],[c,p]],[/\bsie-(\w*)/i],[s,[l,"Siemens"],[c,p]],[/\b(rct\w+) b/i],[s,[l,"RCA"],[c,g]],[/\b(venue[\d ]{2,7}) b/i],[s,[l,"Dell"],[c,g]],[/\b(q(?:mv|ta)\w+) b/i],[s,[l,"Verizon"],[c,g]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[s,[l,"Barnes & Noble"],[c,g]],[/\b(tm\d{3}\w+) b/i],[s,[l,"NuVision"],[c,g]],[/\b(k88) b/i],[s,[l,"ZTE"],[c,g]],[/\b(nx\d{3}j) b/i],[s,[l,"ZTE"],[c,p]],[/\b(gen\d{3}) b.+49h/i],[s,[l,"Swiss"],[c,p]],[/\b(zur\d{3}) b/i],[s,[l,"Swiss"],[c,g]],[/\b((zeki)?tb.*\b) b/i],[s,[l,"Zeki"],[c,g]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[l,"Dragon Touch"],s,[c,g]],[/\b(ns-?\w{0,9}) b/i],[s,[l,"Insignia"],[c,g]],[/\b((nxa|next)-?\w{0,9}) b/i],[s,[l,"NextBook"],[c,g]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[l,"Voice"],s,[c,p]],[/\b(lvtel\-)?(v1[12]) b/i],[[l,"LvTel"],s,[c,p]],[/\b(ph-1) /i],[s,[l,"Essential"],[c,p]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[s,[l,"Envizen"],[c,g]],[/\b(trio[-\w\. ]+) b/i],[s,[l,"MachSpeed"],[c,g]],[/\btu_(1491) b/i],[s,[l,"Rotor"],[c,g]],[/(shield[\w ]+) b/i],[s,[l,"Nvidia"],[c,g]],[/(sprint) (\w+)/i],[l,s,[c,p]],[/(kin\.[onetw]{3})/i],[[s,/\./g," "],[l,O],[c,p]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[s,[l,B],[c,g]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[s,[l,B],[c,p]],[/smart-tv.+(samsung)/i],[l,[c,m]],[/hbbtv.+maple;(\d+)/i],[[s,/^/,"SmartTV"],[l,N],[c,m]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[l,D],[c,m]],[/(apple) ?tv/i],[l,[s,v+" TV"],[c,m]],[/crkey/i],[[s,C+"cast"],[l,S],[c,m]],[/droid.+aft(\w+)( bui|\))/i],[s,[l,_],[c,m]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[s,[l,k],[c,m]],[/(bravia[\w ]+)( bui|\))/i],[s,[l,x],[c,m]],[/(mitv-\w{5}) bui/i],[s,[l,P],[c,m]],[/Hbbtv.*(technisat) (.*);/i],[l,s,[c,m]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[l,G],[s,G],[c,m]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[c,m]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[l,s,[c,f]],[/droid.+; (shield) bui/i],[s,[l,"Nvidia"],[c,f]],[/(playstation [345portablevi]+)/i],[s,[l,x],[c,f]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[s,[l,O],[c,f]],[/\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i],[s,[l,N],[c,y]],[/((pebble))app/i],[l,s,[c,y]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[s,[l,v],[c,y]],[/droid.+; (glass) \d/i],[s,[l,S],[c,y]],[/droid.+; (wt63?0{2,3})\)/i],[s,[l,B],[c,y]],[/(quest( \d| pro)?)/i],[s,[l,F],[c,y]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[l,[c,w]],[/(aeobc)\b/i],[s,[l,_],[c,w]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[s,[c,p]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[s,[c,g]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[c,g]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[c,p]],[/(android[-\w\. ]{0,9});.+buil/i],[s,[l,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[d,[u,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[d,[u,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[u,d],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[d,u]],os:[[/microsoft (windows) (vista|xp)/i],[u,d],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[u,[d,X,Y]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[d,X,Y],[u,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[d,/_/g,"."],[u,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[u,z],[d,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[d,u],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[u,d],[/\(bb(10);/i],[d,[u,b]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[d,[u,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[d,[u,I+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[d,[u,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[d,[u,"watchOS"]],[/crkey\/([\d\.]+)/i],[d,[u,C+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[u,L],d],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[u,d],[/(sunos) ?([\w\.\d]*)/i],[[u,"Solaris"],d],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[u,d]]},q=function(f,m){if(typeof f===o&&(m=f,f=e),!(this instanceof q))return new q(f,m).getResult();var y=typeof t!==n&&t.navigator?t.navigator:e,w=f||(y&&y.userAgent?y.userAgent:""),_=y&&y.userAgentData?y.userAgentData:e,v=m?function(t,e){var r={};for(var n in t)e[n]&&e[n].length%2==0?r[n]=e[n].concat(t[n]):r[n]=t[n];return r}(Z,m):Z,E=y&&y.userAgent==w;return this.getBrowser=function(){var t={};return t[u]=e,t[d]=e,W.call(t,w,v.browser),t[a]=function(t){return typeof t===i?t.replace(/[^\d\.]/g,"").split(".")[0]:e}(t[d]),E&&y&&y.brave&&typeof y.brave.isBrave==r&&(t[u]="Brave"),t},this.getCPU=function(){var t={};return t[h]=e,W.call(t,w,v.cpu),t},this.getDevice=function(){var t={};return t[l]=e,t[s]=e,t[c]=e,W.call(t,w,v.device),E&&!t[c]&&_&&_.mobile&&(t[c]=p),E&&"Macintosh"==t[s]&&y&&typeof y.standalone!==n&&y.maxTouchPoints&&y.maxTouchPoints>2&&(t[s]="iPad",t[c]=g),t},this.getEngine=function(){var t={};return t[u]=e,t[d]=e,W.call(t,w,v.engine),t},this.getOS=function(){var t={};return t[u]=e,t[d]=e,W.call(t,w,v.os),E&&!t[u]&&_&&_.platform&&"Unknown"!=_.platform&&(t[u]=_.platform.replace(/chrome os/i,L).replace(/macos/i,z)),t},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return w},this.setUA=function(t){return w=typeof t===i&&t.length>500?G(t,500):t,this},this.setUA(w),this};q.VERSION="1.0.39",q.BROWSER=V([u,d,a]),q.CPU=V([h]),q.DEVICE=V([s,l,c,f,p,m,g,y,w]),q.ENGINE=q.OS=V([u,d]),Eo.exports&&(bo=Eo.exports=q),bo.UAParser=q;var K=typeof t!==n&&(t.jQuery||t.Zepto);if(K&&!K.ua){var $=new q;K.ua=$.getResult(),K.ua.get=function(){return $.getUA()},K.ua.set=function(t){$.setUA(t);var e=$.getResult();for(var r in e)K.ua[r]=e[r]}}}("object"==typeof window?window:i);const Io="1.6.3",So=Ao.UAParser(),To=Io;function Do(t,e){var r,n,o,i,a;return{Authorization:`Bearer ${e}`,"ts-sdk-version":To,"ts-client-id":t,"ts-user-agent":navigator.userAgent,"ts-platform":"web-sdk","ts-os":null===(r=null==So?void 0:So.os)||void 0===r?void 0:r.name,"ts-os-version":null===(n=null==So?void 0:So.os)||void 0===n?void 0:n.version,"ts-device-model":null===(o=null==So?void 0:So.device)||void 0===o?void 0:o.model,"ts-manufacturer":null===(i=null==So?void 0:So.device)||void 0===i?void 0:i.vendor,"ts-browser":null===(a=null==So?void 0:So.browser)||void 0===a?void 0:a.name,"Content-Type":"application/json","X-TS-client-time":(new Date).toUTCString(),"X-TS-ua":navigator.userAgent}}var Oo="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},Ro=[],Mo=[],No="undefined"!=typeof Uint8Array?Uint8Array:Array,ko=!1;function xo(){ko=!0;for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0;e<64;++e)Ro[e]=t[e],Mo[t.charCodeAt(e)]=e;Mo["-".charCodeAt(0)]=62,Mo["_".charCodeAt(0)]=63}function Po(t,e,r){for(var n,o,i=[],a=e;a<r;a+=3)n=(t[a]<<16)+(t[a+1]<<8)+t[a+2],i.push(Ro[(o=n)>>18&63]+Ro[o>>12&63]+Ro[o>>6&63]+Ro[63&o]);return i.join("")}function Bo(t){var e;ko||xo();for(var r=t.length,n=r%3,o="",i=[],a=16383,s=0,u=r-n;s<u;s+=a)i.push(Po(t,s,s+a>u?u:s+a));return 1===n?(e=t[r-1],o+=Ro[e>>2],o+=Ro[e<<4&63],o+="=="):2===n&&(e=(t[r-2]<<8)+t[r-1],o+=Ro[e>>10],o+=Ro[e>>4&63],o+=Ro[e<<2&63],o+="="),i.push(o),i.join("")}function Fo(t,e,r,n,o){var i,a,s=8*o-n-1,u=(1<<s)-1,c=u>>1,l=-7,d=r?o-1:0,h=r?-1:1,f=t[e+d];for(d+=h,i=f&(1<<-l)-1,f>>=-l,l+=s;l>0;i=256*i+t[e+d],d+=h,l-=8);for(a=i&(1<<-l)-1,i>>=-l,l+=n;l>0;a=256*a+t[e+d],d+=h,l-=8);if(0===i)i=1-c;else{if(i===u)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,n),i-=c}return(f?-1:1)*a*Math.pow(2,i-n)}function Lo(t,e,r,n,o,i){var a,s,u,c=8*i-o-1,l=(1<<c)-1,d=l>>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:i-1,p=n?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=l):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),(e+=a+d>=1?h/u:h*Math.pow(2,1-d))*u>=2&&(a++,u/=2),a+d>=l?(s=0,a=l):a+d>=1?(s=(e*u-1)*Math.pow(2,o),a+=d):(s=e*Math.pow(2,d-1)*Math.pow(2,o),a=0));o>=8;t[r+f]=255&s,f+=p,s/=256,o-=8);for(a=a<<o|s,c+=o;c>0;t[r+f]=255&a,f+=p,a/=256,c-=8);t[r+f-p]|=128*g}var zo={}.toString,Uo=Array.isArray||function(t){return"[object Array]"==zo.call(t)};function Vo(){return jo.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Ho(t,e){if(Vo()<e)throw new RangeError("Invalid typed array length");return jo.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=jo.prototype:(null===t&&(t=new jo(e)),t.length=e),t}function jo(t,e,r){if(!(jo.TYPED_ARRAY_SUPPORT||this instanceof jo))return new jo(t,e,r);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return Xo(this,t)}return Go(this,t,e,r)}function Go(t,e,r,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,r,n){if(e.byteLength,r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");e=void 0===r&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,r):new Uint8Array(e,r,n);jo.TYPED_ARRAY_SUPPORT?(t=e).__proto__=jo.prototype:t=Yo(t,e);return t}(t,e,r,n):"string"==typeof e?function(t,e,r){"string"==typeof r&&""!==r||(r="utf8");if(!jo.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|Ko(e,r);t=Ho(t,n);var o=t.write(e,r);o!==n&&(t=t.slice(0,o));return t}(t,e,r):function(t,e){if(qo(e)){var r=0|Zo(e.length);return 0===(t=Ho(t,r)).length||e.copy(t,0,0,r),t}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(n=e.length)!=n?Ho(t,0):Yo(t,e);if("Buffer"===e.type&&Uo(e.data))return Yo(t,e.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function Wo(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function Xo(t,e){if(Wo(e),t=Ho(t,e<0?0:0|Zo(e)),!jo.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)t[r]=0;return t}function Yo(t,e){var r=e.length<0?0:0|Zo(e.length);t=Ho(t,r);for(var n=0;n<r;n+=1)t[n]=255&e[n];return t}function Zo(t){if(t>=Vo())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Vo().toString(16)+" bytes");return 0|t}function qo(t){return!(null==t||!t._isBuffer)}function Ko(t,e){if(qo(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return Ai(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return Ci(t).length;default:if(n)return Ai(t).length;e=(""+e).toLowerCase(),n=!0}}function $o(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return hi(this,e,r);case"utf8":case"utf-8":return ui(this,e,r);case"ascii":return li(this,e,r);case"latin1":case"binary":return di(this,e,r);case"base64":return si(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return fi(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function Jo(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function Qo(t,e,r,n,o){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=o?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(o)return-1;r=t.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof e&&(e=jo.from(e,n)),qo(e))return 0===e.length?-1:ti(t,e,r,n,o);if("number"==typeof e)return e&=255,jo.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):ti(t,[e],r,n,o);throw new TypeError("val must be string, number or Buffer")}function ti(t,e,r,n,o){var i,a=1,s=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;a=2,s/=2,u/=2,r/=2}function c(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(o){var l=-1;for(i=r;i<s;i++)if(c(t,i)===c(e,-1===l?0:i-l)){if(-1===l&&(l=i),i-l+1===u)return l*a}else-1!==l&&(i-=i-l),l=-1}else for(r+u>s&&(r=s-u),i=r;i>=0;i--){for(var d=!0,h=0;h<u;h++)if(c(t,i+h)!==c(e,h)){d=!1;break}if(d)return i}return-1}function ei(t,e,r,n){r=Number(r)||0;var o=t.length-r;n?(n=Number(n))>o&&(n=o):n=o;var i=e.length;if(i%2!=0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var a=0;a<n;++a){var s=parseInt(e.substr(2*a,2),16);if(isNaN(s))return a;t[r+a]=s}return a}function ri(t,e,r,n){return Ii(Ai(e,t.length-r),t,r,n)}function ni(t,e,r,n){return Ii(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function oi(t,e,r,n){return ni(t,e,r,n)}function ii(t,e,r,n){return Ii(Ci(e),t,r,n)}function ai(t,e,r,n){return Ii(function(t,e){for(var r,n,o,i=[],a=0;a<t.length&&!((e-=2)<0);++a)n=(r=t.charCodeAt(a))>>8,o=r%256,i.push(o),i.push(n);return i}(e,t.length-r),t,r,n)}function si(t,e,r){return 0===e&&r===t.length?Bo(t):Bo(t.slice(e,r))}function ui(t,e,r){r=Math.min(t.length,r);for(var n=[],o=e;o<r;){var i,a,s,u,c=t[o],l=null,d=c>239?4:c>223?3:c>191?2:1;if(o+d<=r)switch(d){case 1:c<128&&(l=c);break;case 2:128==(192&(i=t[o+1]))&&(u=(31&c)<<6|63&i)>127&&(l=u);break;case 3:i=t[o+1],a=t[o+2],128==(192&i)&&128==(192&a)&&(u=(15&c)<<12|(63&i)<<6|63&a)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:i=t[o+1],a=t[o+2],s=t[o+3],128==(192&i)&&128==(192&a)&&128==(192&s)&&(u=(15&c)<<18|(63&i)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(l=u)}null===l?(l=65533,d=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),o+=d}return function(t){var e=t.length;if(e<=ci)return String.fromCharCode.apply(String,t);var r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=ci));return r}(n)}jo.TYPED_ARRAY_SUPPORT=void 0===Oo.TYPED_ARRAY_SUPPORT||Oo.TYPED_ARRAY_SUPPORT,Vo(),jo.poolSize=8192,jo._augment=function(t){return t.__proto__=jo.prototype,t},jo.from=function(t,e,r){return Go(null,t,e,r)},jo.TYPED_ARRAY_SUPPORT&&(jo.prototype.__proto__=Uint8Array.prototype,jo.__proto__=Uint8Array),jo.alloc=function(t,e,r){return function(t,e,r,n){return Wo(e),e<=0?Ho(t,e):void 0!==r?"string"==typeof n?Ho(t,e).fill(r,n):Ho(t,e).fill(r):Ho(t,e)}(null,t,e,r)},jo.allocUnsafe=function(t){return Xo(null,t)},jo.allocUnsafeSlow=function(t){return Xo(null,t)},jo.isBuffer=function(t){return null!=t&&(!!t._isBuffer||Si(t)||function(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&Si(t.slice(0,0))}(t))},jo.compare=function(t,e){if(!qo(t)||!qo(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,n=e.length,o=0,i=Math.min(r,n);o<i;++o)if(t[o]!==e[o]){r=t[o],n=e[o];break}return r<n?-1:n<r?1:0},jo.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},jo.concat=function(t,e){if(!Uo(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return jo.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=jo.allocUnsafe(e),o=0;for(r=0;r<t.length;++r){var i=t[r];if(!qo(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(n,o),o+=i.length}return n},jo.byteLength=Ko,jo.prototype._isBuffer=!0,jo.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)Jo(this,e,e+1);return this},jo.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)Jo(this,e,e+3),Jo(this,e+1,e+2);return this},jo.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)Jo(this,e,e+7),Jo(this,e+1,e+6),Jo(this,e+2,e+5),Jo(this,e+3,e+4);return this},jo.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?ui(this,0,t):$o.apply(this,arguments)},jo.prototype.equals=function(t){if(!qo(t))throw new TypeError("Argument must be a Buffer");return this===t||0===jo.compare(this,t)},jo.prototype.inspect=function(){var t="";return this.length>0&&(t=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(t+=" ... ")),"<Buffer "+t+">"},jo.prototype.compare=function(t,e,r,n,o){if(!qo(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),e<0||r>t.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&e>=r)return 0;if(n>=o)return-1;if(e>=r)return 1;if(this===t)return 0;for(var i=(o>>>=0)-(n>>>=0),a=(r>>>=0)-(e>>>=0),s=Math.min(i,a),u=this.slice(n,o),c=t.slice(e,r),l=0;l<s;++l)if(u[l]!==c[l]){i=u[l],a=c[l];break}return i<a?-1:a<i?1:0},jo.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},jo.prototype.indexOf=function(t,e,r){return Qo(this,t,e,r,!0)},jo.prototype.lastIndexOf=function(t,e,r){return Qo(this,t,e,r,!1)},jo.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var o=this.length-e;if((void 0===r||r>o)&&(r=o),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return ei(this,t,e,r);case"utf8":case"utf-8":return ri(this,t,e,r);case"ascii":return ni(this,t,e,r);case"latin1":case"binary":return oi(this,t,e,r);case"base64":return ii(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ai(this,t,e,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},jo.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var ci=4096;function li(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;o<r;++o)n+=String.fromCharCode(127&t[o]);return n}function di(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;o<r;++o)n+=String.fromCharCode(t[o]);return n}function hi(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var o="",i=e;i<r;++i)o+=bi(t[i]);return o}function fi(t,e,r){for(var n=t.slice(e,r),o="",i=0;i<n.length;i+=2)o+=String.fromCharCode(n[i]+256*n[i+1]);return o}function pi(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function gi(t,e,r,n,o,i){if(!qo(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||e<i)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function mi(t,e,r,n){e<0&&(e=65535+e+1);for(var o=0,i=Math.min(t.length-r,2);o<i;++o)t[r+o]=(e&255<<8*(n?o:1-o))>>>8*(n?o:1-o)}function yi(t,e,r,n){e<0&&(e=4294967295+e+1);for(var o=0,i=Math.min(t.length-r,4);o<i;++o)t[r+o]=e>>>8*(n?o:3-o)&255}function wi(t,e,r,n,o,i){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function _i(t,e,r,n,o){return o||wi(t,0,r,4),Lo(t,e,r,n,23,4),r+4}function vi(t,e,r,n,o){return o||wi(t,0,r,8),Lo(t,e,r,n,52,8),r+8}jo.prototype.slice=function(t,e){var r,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t),jo.TYPED_ARRAY_SUPPORT)(r=this.subarray(t,e)).__proto__=jo.prototype;else{var o=e-t;r=new jo(o,void 0);for(var i=0;i<o;++i)r[i]=this[i+t]}return r},jo.prototype.readUIntLE=function(t,e,r){t|=0,e|=0,r||pi(t,e,this.length);for(var n=this[t],o=1,i=0;++i<e&&(o*=256);)n+=this[t+i]*o;return n},jo.prototype.readUIntBE=function(t,e,r){t|=0,e|=0,r||pi(t,e,this.length);for(var n=this[t+--e],o=1;e>0&&(o*=256);)n+=this[t+--e]*o;return n},jo.prototype.readUInt8=function(t,e){return e||pi(t,1,this.length),this[t]},jo.prototype.readUInt16LE=function(t,e){return e||pi(t,2,this.length),this[t]|this[t+1]<<8},jo.prototype.readUInt16BE=function(t,e){return e||pi(t,2,this.length),this[t]<<8|this[t+1]},jo.prototype.readUInt32LE=function(t,e){return e||pi(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},jo.prototype.readUInt32BE=function(t,e){return e||pi(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},jo.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||pi(t,e,this.length);for(var n=this[t],o=1,i=0;++i<e&&(o*=256);)n+=this[t+i]*o;return n>=(o*=128)&&(n-=Math.pow(2,8*e)),n},jo.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||pi(t,e,this.length);for(var n=e,o=1,i=this[t+--n];n>0&&(o*=256);)i+=this[t+--n]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*e)),i},jo.prototype.readInt8=function(t,e){return e||pi(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},jo.prototype.readInt16LE=function(t,e){e||pi(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},jo.prototype.readInt16BE=function(t,e){e||pi(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},jo.prototype.readInt32LE=function(t,e){return e||pi(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},jo.prototype.readInt32BE=function(t,e){return e||pi(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},jo.prototype.readFloatLE=function(t,e){return e||pi(t,4,this.length),Fo(this,t,!0,23,4)},jo.prototype.readFloatBE=function(t,e){return e||pi(t,4,this.length),Fo(this,t,!1,23,4)},jo.prototype.readDoubleLE=function(t,e){return e||pi(t,8,this.length),Fo(this,t,!0,52,8)},jo.prototype.readDoubleBE=function(t,e){return e||pi(t,8,this.length),Fo(this,t,!1,52,8)},jo.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||gi(this,t,e,r,Math.pow(2,8*r)-1,0);var o=1,i=0;for(this[e]=255&t;++i<r&&(o*=256);)this[e+i]=t/o&255;return e+r},jo.prototype.writeUIntBE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||gi(this,t,e,r,Math.pow(2,8*r)-1,0);var o=r-1,i=1;for(this[e+o]=255&t;--o>=0&&(i*=256);)this[e+o]=t/i&255;return e+r},jo.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||gi(this,t,e,1,255,0),jo.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},jo.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||gi(this,t,e,2,65535,0),jo.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):mi(this,t,e,!0),e+2},jo.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||gi(this,t,e,2,65535,0),jo.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):mi(this,t,e,!1),e+2},jo.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||gi(this,t,e,4,4294967295,0),jo.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):yi(this,t,e,!0),e+4},jo.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||gi(this,t,e,4,4294967295,0),jo.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):yi(this,t,e,!1),e+4},jo.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var o=Math.pow(2,8*r-1);gi(this,t,e,r,o-1,-o)}var i=0,a=1,s=0;for(this[e]=255&t;++i<r&&(a*=256);)t<0&&0===s&&0!==this[e+i-1]&&(s=1),this[e+i]=(t/a|0)-s&255;return e+r},jo.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var o=Math.pow(2,8*r-1);gi(this,t,e,r,o-1,-o)}var i=r-1,a=1,s=0;for(this[e+i]=255&t;--i>=0&&(a*=256);)t<0&&0===s&&0!==this[e+i+1]&&(s=1),this[e+i]=(t/a|0)-s&255;return e+r},jo.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||gi(this,t,e,1,127,-128),jo.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},jo.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||gi(this,t,e,2,32767,-32768),jo.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):mi(this,t,e,!0),e+2},jo.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||gi(this,t,e,2,32767,-32768),jo.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):mi(this,t,e,!1),e+2},jo.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||gi(this,t,e,4,2147483647,-2147483648),jo.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):yi(this,t,e,!0),e+4},jo.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||gi(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),jo.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):yi(this,t,e,!1),e+4},jo.prototype.writeFloatLE=function(t,e,r){return _i(this,t,e,!0,r)},jo.prototype.writeFloatBE=function(t,e,r){return _i(this,t,e,!1,r)},jo.prototype.writeDoubleLE=function(t,e,r){return vi(this,t,e,!0,r)},jo.prototype.writeDoubleBE=function(t,e,r){return vi(this,t,e,!1,r)},jo.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var o,i=n-r;if(this===t&&r<e&&e<n)for(o=i-1;o>=0;--o)t[o+e]=this[o+r];else if(i<1e3||!jo.TYPED_ARRAY_SUPPORT)for(o=0;o<i;++o)t[o+e]=this[o+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+i),e);return i},jo.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===t.length){var o=t.charCodeAt(0);o<256&&(t=o)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!jo.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var i;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(i=e;i<r;++i)this[i]=t;else{var a=qo(t)?t:Ai(new jo(t,n).toString()),s=a.length;for(i=0;i<r-e;++i)this[i+e]=a[i%s]}return this};var Ei=/[^+\/0-9A-Za-z-_]/g;function bi(t){return t<16?"0"+t.toString(16):t.toString(16)}function Ai(t,e){var r;e=e||1/0;for(var n=t.length,o=null,i=[],a=0;a<n;++a){if((r=t.charCodeAt(a))>55295&&r<57344){if(!o){if(r>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(a+1===n){(e-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(e-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((e-=1)<0)break;i.push(r)}else if(r<2048){if((e-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function Ci(t){return function(t){var e,r,n,o,i,a;ko||xo();var s=t.length;if(s%4>0)throw new Error("Invalid string. Length must be a multiple of 4");i="="===t[s-2]?2:"="===t[s-1]?1:0,a=new No(3*s/4-i),n=i>0?s-4:s;var u=0;for(e=0,r=0;e<n;e+=4,r+=3)o=Mo[t.charCodeAt(e)]<<18|Mo[t.charCodeAt(e+1)]<<12|Mo[t.charCodeAt(e+2)]<<6|Mo[t.charCodeAt(e+3)],a[u++]=o>>16&255,a[u++]=o>>8&255,a[u++]=255&o;return 2===i?(o=Mo[t.charCodeAt(e)]<<2|Mo[t.charCodeAt(e+1)]>>4,a[u++]=255&o):1===i&&(o=Mo[t.charCodeAt(e)]<<10|Mo[t.charCodeAt(e+1)]<<4|Mo[t.charCodeAt(e+2)]>>2,a[u++]=o>>8&255,a[u++]=255&o),a}(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(Ei,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function Ii(t,e,r,n){for(var o=0;o<n&&!(o+r>=e.length||o>=t.length);++o)e[o+r]=t[o];return o}function Si(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}const Ti=t=>null!=t,Di=t=>"string"==typeof t,Oi=t=>Di(t)&&""!==t,Ri=t=>"object"==typeof t&&"string"==typeof t.type&&"function"==typeof t.stream&&"function"==typeof t.arrayBuffer&&"function"==typeof t.constructor&&"string"==typeof t.constructor.name&&/^(Blob|File)$/.test(t.constructor.name)&&/^(Blob|File)$/.test(t[Symbol.toStringTag]),Mi=t=>t instanceof FormData,Ni=t=>{const e=[],r=(t,n)=>{Ti(n)&&(Array.isArray(n)?n.forEach((e=>{r(t,e)})):"object"==typeof n?Object.entries(n).forEach((e=>{let[n,o]=e;r(`${t}[${n}]`,o)})):((t,r)=>{e.push(`${encodeURIComponent(t)}=${encodeURIComponent(String(r))}`)})(t,n))};return Object.entries(t).forEach((t=>{let[e,n]=t;r(e,n)})),e.length>0?`?${e.join("&")}`:""},ki=async(t,e)=>"function"==typeof e?e(t):e,xi=async(t,e)=>{const r=await ki(e,t.TOKEN),n=await ki(e,t.USERNAME),i=await ki(e,t.PASSWORD),a=await ki(e,t.HEADERS),s=Object.entries(o(o({Accept:"application/json"},a),e.headers)).filter((t=>{let[e,r]=t;return Ti(r)})).reduce(((t,e)=>{let[r,n]=e;return o(o({},t),{},{[r]:String(n)})}),{});if(Oi(r)&&(s.Authorization=`Bearer ${r}`),Oi(n)&&Oi(i)){const t=(t=>{try{return btoa(t)}catch(e){return jo.from(t).toString("base64")}})(`${n}:${i}`);s.Authorization=`Basic ${t}`}return e.body&&(e.mediaType?s["Content-Type"]=e.mediaType:Ri(e.body)?s["Content-Type"]=e.body.type||"application/octet-stream":Di(e.body)?s["Content-Type"]="text/plain":Mi(e.body)||(s["Content-Type"]="application/json")),new Headers(s)},Pi=(t,e)=>new Promise((async(r,n)=>{try{const n=((t,e)=>{const r=t.ENCODE_PATH||encodeURI,n=null==e?void 0:e.url.replace("{api-version}",t.VERSION).replace(/{(.*?)}/g,((t,n)=>{var o;return(null===(o=null==e?void 0:e.path)||void 0===o?void 0:o.hasOwnProperty(n))?r(String(e.path[n])):t})),o=`${t.BASE}${n}`;return e.query?`${o}${Ni(e.query)}`:o})(t,e),i=(t=>{if(t.formData){const e=new FormData,r=(t,r)=>{Di(r)||Ri(r)?e.append(t,r):e.append(t,JSON.stringify(r))};return Object.entries(t.formData).filter((t=>{let[e,r]=t;return Ti(r)})).forEach((t=>{let[e,n]=t;Array.isArray(n)?n.forEach((t=>r(e,t))):r(e,n)})),e}})(e),a=(t=>{var e;if(void 0!==t.body)return(null===(e=t.mediaType)||void 0===e?void 0:e.includes("/json"))?JSON.stringify(t.body):Di(t.body)||Ri(t.body)||Mi(t.body)?t.body:JSON.stringify(t.body)})(e),s=await xi(t,e),u=await(async(t,e,r,n,o,i)=>{const a=new AbortController,s={headers:i,body:null!=n?n:o,method:e.method,signal:a.signal};return t.WITH_CREDENTIALS&&(s.credentials=t.CREDENTIALS),await fetch(r,s)})(t,e,n,a,i,s),c=await(async t=>{if(204!==t.status)try{const e=t.headers.get("Content-Type");if(e)return["application/json","application/problem+json"].some((t=>e.toLowerCase().startsWith(t)))?await t.json():await t.text()}catch(t){console.error(t)}})(u),l=((t,e)=>{if(e){const r=t.headers.get(e);if(Di(r))return r}})(u,e.responseHeader),d={url:n,ok:u.ok,status:u.status,statusText:u.statusText,headers:u.headers,body:null!=l?l:c};((t,e)=>{var r,n;const i=o({400:"Bad Request",401:"Unauthorized",403:"Forbidden",404:"Not Found",500:"Internal Server Error",502:"Bad Gateway",503:"Service Unavailable"},t.errors)[e.status];if(i)throw new go(t,e,i);if(!e.ok){const o=null!==(r=e.status)&&void 0!==r?r:"unknown",i=null!==(n=e.statusText)&&void 0!==n?n:"unknown",a=(()=>{try{return JSON.stringify(e.body,null,2)}catch(t){return}})();throw new go(t,e,`Generic Error: status: ${o}; status text: ${i}; body: ${a}`)}})(e,d),r(d)}catch(t){n(t)}})),Bi=new t("idv"),Fi=Symbol(),Li=Symbol(),zi="verify-id-sdk";function Ui(t){return sessionStorage.getItem(t)}const Vi=new Map;function Hi(t,e){const r=Vi.get(t);Bi.events.emit(r,e)}function ji(t){Hi(Fi,t)}function Gi(t,e){ji({type:"session-id-acquired",step:t,sessionId:e})}function Wi(t,e,r,n,o){ji({type:"verification-result",status:e,step:t,state:n,callbackUrl:o,sessionId:r})}function Xi(t,e){ji({type:"capture-error",errorCode:e,step:t})}function Yi(t,e,r){ji({type:"api-request-error",errorCode:e,step:t,error:r})}function Zi(t,e){return Pi(mo,t).catch((r=>(t.url.endsWith("/events")||Yi(e,"request-error",r.message),Promise.reject(r))))}async function qi(t){var e;mo.HEADERS=Do(t);const r=await function(t){return Zi({keepalive:!0,method:"GET",url:`/verify/api/v1/sdk-settings?clientId=${t}`},"init")}(t);return{autocapture_settings:null!==(e=r.body.autocapture_settings)&&void 0!==e?e:void 0,autocapture_enabled:r.body.autocapture_enabled,strings:r.body.strings,capture_approval_settings:r.body.capture_approval_settings}}Vi.set(Fi,Fi),Vi.set(Li,Li);var Ki={setStep(t,e){t.commit("setStep",e)},setSessionId(t,e){t.commit("setSessionId",e)},setIsCapturingProcessStarted(t,e){t.commit("setIsCapturingProcessStarted",e)},setServerPath(t,e){t.commit("setServerPath",e)},setStartToken(t,e){t.commit("setStartToken",e)},setRootElement(t,e){t.commit("setRootElement",e)},setLanguage(t,e){t.commit("setLanguage",e)},setCallback(t,e){t.commit("setCallback",e)},setUserToken(t,e){t.commit("setUserToken",e)},setConsentVersion(t,e){t.commit("setConsentVersion",e)},setMissingImages(t,e){t.commit("setMissingImages",e)},setClientId(t,e){t.commit("setClientId",e)},setStatus(t,e){t.commit("setStatus",e)},setMarkdownSupportText(t,e){t.commit("setMarkdownSupportText",e)},setVideoCaptureSettings(t,e){t.commit("setVideoCaptureSettings",e)},setCdnHost(t,e){t.commit("setCdnHost",e)},setIsImageSigningEnabled(t,e){t.commit("setIsImageSigningEnabled",e)},setAutoCaptureSettings(t,e){t.commit("setAutoCaptureSettings",e)},setCaptureApprovalSettings(t,e){t.commit("setCaptureApprovalSettings",e)},setFlowType(t,e){t.commit("setFlowType",e)}},$i={setStep:(t,e)=>(t.step=e,t),setSessionId:(t,e)=>(t.sessionId=e,t),setIsCapturingProcessStarted:(t,e)=>(t.isCapturingProcessStarted=e,t),setServerPath:(t,e)=>(t.serverPath=e,t),setStartToken:(t,e)=>(t.startToken=e,t),setRootElement:(t,e)=>(t.rootElementId=e,t),setLanguage:(t,e)=>(t.language=e,t),setCallback:(t,e)=>(t.callback=e,t),setUserToken:(t,e)=>(t.userToken=e,t),setConsentVersion:(t,e)=>(t.consentVersion=e,t),setMissingImages:(t,e)=>(t.missingImages=e,t),setClientId:(t,e)=>(t.clientId=e,t),setStatus:(t,e)=>(t.verificationStatus=e,t),setMarkdownSupportText:(t,e)=>(t.markdownSupportText=e,t),setVideoCaptureSettings:(t,e)=>(t.videoCaptureSettings=e,t),setCdnHost:(t,e)=>(t.cdnHost=e,t),setIsImageSigningEnabled:(t,e)=>(t.isImageSigningEnabled=e,t),setAutoCaptureSettings:(t,e)=>(t.autoCaptureSettings=e,t),setCaptureApprovalSettings:(t,e)=>(t.captureApprovalSettings=e,t),setFlowType:(t,e)=>(t.flowType=e,t)};const Ji=new class{constructor(t){this.actions={},this.mutations={},this.state={},this.status="resting",Object.prototype.hasOwnProperty.call(t,"actions")&&(this.actions=t.actions),Object.prototype.hasOwnProperty.call(t,"mutations")&&(this.mutations=t.mutations);const e=this;this.state=new Proxy(t.state||{},{get:function(t,e){return t[e]},set:function(t,r,n){return t[r]=n,Hi(Li,{key:r,state:t}),"mutation"!==e.status&&console.warn(`You should use a mutation to set ${String(r)}`),e.status="resting",!0}})}dispatch(t,e){return"function"!=typeof this.actions[t]?(console.error(`Action "${t} doesn't exist.`),!1):(this.status="action",this.actions[t](this,e),!0)}commit(t,e){if("function"!=typeof this.mutations[t])return console.info(`Mutation "${t}" doesn't exist`),!1;this.status="mutation";const r=this.mutations[t](this.state,e);return this.state=r,!0}}({actions:Ki,mutations:$i,state:{step:"",sessionId:"",serverPath:"",startToken:"",rootElementId:"",language:"en",callback:()=>null,userToken:"",missingImages:[],consentVersion:"",clientId:"",verificationStatus:"pending",markdownSupportText:"",isImageSigningEnabled:!0,isCapturingProcessStarted:!1}});var Qi;function ta(t){const e=[],r=function(t){var e,r,n,o;const i=t.stats.get(Qi.BLUR_DETECTION),a=t.stats.get(Qi.GLARE_DETECTION);if(!i&&!a||0===(null==i?void 0:i.durations.length)&&0===(null==a?void 0:a.durations.length))return;const s=na(null!==(e=null==i?void 0:i.durations)&&void 0!==e?e:null==a?void 0:a.durations),u=i&&a?Math.min(i.countSuccess,a.countSuccess):null!==(r=null==i?void 0:i.countSuccess)&&void 0!==r?r:null==a?void 0:a.countSuccess;return{name:ra(Qi.BLUR_DETECTION),count_success:u,count_failure_glare:null!==(n=null==a?void 0:a.countFailed)&&void 0!==n?n:0,count_failure_blur:null!==(o=null==i?void 0:i.countFailed)&&void 0!==o?o:0,avg_duration:s.duration_avg,std_duration:s.duration_std}}(t);r&&e.push(r);const n=function(t){var e,r;const n=t.stats.get(Qi.FACE_DETECTION),o=t.stats.get(Qi.FACE_POSITION);if(!n||0===n.durations.length)return;const i=na(n.durations);return{name:ra(Qi.FACE_DETECTION),count_success:null!==(e=null==o?void 0:o.countSuccess)&&void 0!==e?e:n.countSuccess,count_failure:n.countFailed+(null!==(r=null==o?void 0:o.countFailed)&&void 0!==r?r:0),avg_duration:i.duration_avg,std_duration:i.duration_std}}(t);n&&e.push(n);for(const[r,n]of t.stats.entries())r!==Qi.BLUR_DETECTION&&r!==Qi.GLARE_DETECTION&&r!==Qi.FACE_DETECTION&&r!==Qi.FACE_POSITION&&n.durations.length>0&&e.push(ea(n,r));return t.frameHandleDurations.length>0&&e.push(function(t){const e=na(t.frameHandleDurations);return{name:"stability_manager",avg_stable_count:Math.round(t.stableCounts.reduce(((t,e)=>t+e),0)/t.stableCounts.length),avg_duration:e.duration_avg,std_duration:e.duration_std}}(t)),e}function ea(t,e){const r=na(t.durations);return{name:ra(e),count_success:t.countSuccess,count_failure:t.countFailed,avg_duration:r.duration_avg,std_duration:r.duration_std}}function ra(t){switch(t){case Qi.BLUR_DETECTION:case Qi.GLARE_DETECTION:return"blur_glare_detector";case Qi.DOCUMENT_DETECTION:return"doc_detector";case Qi.DOCUMENT_POSITION:return"frame_detector";case Qi.BARCODE_DETECTION:return"barcode_detector";case Qi.FACE_DETECTION:case Qi.FACE_POSITION:return"face_detector";default:return t}}function na(t){var e;if(t.length<2)return{duration_avg:null!==(e=t[0])&&void 0!==e?e:0,duration_std:0};const r=t.length,n=t.reduce(((t,e)=>t+e),0)/r;let o=0;for(let e=0;e<r;e++){const r=t[e];o+=Math.pow(r-n,2)}const i=Math.sqrt(o/(r-1));return{duration_avg:Math.round(n),duration_std:Math.round(i)}}!function(t){t.DOCUMENT_DETECTION="document_detection",t.DOCUMENT_POSITION="document_position",t.GLARE_DETECTION="glare_detection",t.BLUR_DETECTION="blur_detection",t.BARCODE_DETECTION="barcode_detection",t.FACE_DETECTION="face_detection",t.FACE_POSITION="face_position"}(Qi||(Qi={}));const oa=new class{createUploadImageEvent(t,e,r,n){return{event_type:"upload_image",upload_image_req:{process_result:"success",image_type:t,request_total_time_ms:String(e),request_processing_time_ms:String(r),request_build_time_ms:String(n)}}}createPageViewEvent(t){return{event_type:"page_view",page_view_req:{page_name:t}}}createProcessingCompleteEvent(){return{event_type:"processing_complete",processing_complete_req:{status:"complete"}}}createSdkInitEvent(t,e){return{event_type:"sdk_init",sdk_init_req:{user_wait_time:Math.round(t),model_stats:this.convertModelStats(e)}}}convertModelStats(t){return t.map((t=>({model_name:t.modelName,init_duration:Math.round(t.initDuration),download_duration:Math.round(t.downloadDuration)})))}async createCaptureStartEvent(t,e){var r,n,i;const a=await async function(){var t,e,r,n,o,i,a,s;const u=Ao.UAParser(),c={vendor:null===(t=u.device)||void 0===t?void 0:t.vendor,model:null===(e=u.device)||void 0===e?void 0:e.model,type:null===(r=u.device)||void 0===r?void 0:r.type,os:null===(n=u.os)||void 0===n?void 0:n.name,os_version:null===(o=u.os)||void 0===o?void 0:o.version,browser:null===(i=u.browser)||void 0===i?void 0:i.name,browser_version:null===(a=u.browser)||void 0===a?void 0:a.version},l=navigator.userAgentData;if(!l)return c;try{const t=await l.getHighEntropyValues(["model","platformVersion","fullVersionList"]);t.model&&(c.model=t.model),l.platform&&(c.os=l.platform),t.platformVersion&&(c.os_version=t.platformVersion);const e=(null!==(s=t.fullVersionList)&&void 0!==s?s:[]).find((t=>!t.brand.includes("Not")&&"Chromium"!==t.brand));e&&(c.browser=e.brand,c.browser_version=e.version)}catch(t){}return c}();return{event_type:"capture_start",capture_start_req:{page_name:t,autocapture_enabled:null!==(i=null===(n=null===(r=Ji.state)||void 0===r?void 0:r.autoCaptureSettings)||void 0===n?void 0:n.enabled)&&void 0!==i&&i,camera:o({},e),device:a}}}createUserActionEvent(t,e,r){var n,o,i;const a={user_action_type:t,page_name:e,autocapture:!!r,autocapture_enabled:null!==(i=null===(o=null===(n=Ji.state)||void 0===n?void 0:n.autoCaptureSettings)||void 0===o?void 0:o.enabled)&&void 0!==i&&i};if(r){const t=ta(r);a.stats=t}return{event_type:"user_action",user_action_req:a}}createErrorEvent(t,e,r){return{event_type:"error",error_req:{error_name:e,error_description:t,step:r}}}createCameraNotAllowedEvent(t,e){return{event_type:"error",error_req:{error_name:"camera_not_allowed",error_description:t,step:e}}}createDrsInitFailureEvent(t,e){return{event_type:"error",error_req:{error_name:"missing_drs_action_token",error_description:t,step:e}}}};async function ia(t,e,r,n,o){r?(mo.HEADERS=Do(n,e),await function(t,e,r){return Zi({keepalive:!0,method:"POST",url:`/verify/api/v1/verification/${t}/events`,path:{sid:t},body:e},r)}(r,o,t)):console.error("cannot send event, sessionId or startToken is not set")}const aa=new class{handelEventData(t){if("session-id-acquired"===t.type)this.sendRiskSessionToken()}sendRiskSessionToken(){try{const t=`${mo.BASE}/verify/api/v1/verification/${Ji.state.sessionId}/risk-session-token`,e=Ji.state.clientId,r=Do(e,Ji.state.userToken);po().then((e=>{Bi.http.httpPost(t,{session_token:e},null,r).catch((e=>{throw console.log("unable to send session token to IDV",t),console.error(e),e}))})).catch((e=>{var r,n,o,i;console.log("unable to get session token from DRS",t),console.error(e);const a=(null==e?void 0:e.message)||"failed to initialize DRS",s=oa.createDrsInitFailureEvent(a,"init");ia(null===(r=Ji.state)||void 0===r?void 0:r.step,null===(n=Ji.state)||void 0===n?void 0:n.userToken,null===(o=Ji.state)||void 0===o?void 0:o.sessionId,null===(i=Ji.state)||void 0===i?void 0:i.clientId,s).then((()=>{ji({type:"failed-to-init-drs",errorCode:"other",step:"init"})}))}))}catch(t){throw console.log("Error sending risk session token"),console.error(t),t}}};async function sa(t,e,r){const n=oa.createErrorEvent(t,e,r);await ua(r,n)}async function ua(t,e){var r,n,o,i,a;const s=null===(r=Ji.state)||void 0===r?void 0:r.userToken,u=(null===(n=Ji.state)||void 0===n?void 0:n.sessionId)||(null===(o=Ji.state)||void 0===o?void 0:o.startToken),c=null===(i=Ji.state)||void 0===i?void 0:i.clientId,l=(null===(a=Ji.state)||void 0===a?void 0:a.step)||t;await ia(l,s,u,c,e)}const ca={blur_message:"Please focus camera on the document before capturing",blur_title:"Blurred image",document_incorrect_position_message:"Please make sure the document is fully within the frame, and nothing covers it",document_incorrect_position_title:"Incorrect document position",document_not_found_message:"Make sure you capture a valid government issued ID",document_not_found_title:"Document not detected",document_not_matching_message:"Please make sure to capture the back side of the document",document_not_matching_title:"Back image mismatch",document_not_supported_message:"Please use a different government issued ID instead",document_not_supported_title:"Document not supported",capturing_in_progress_message:"Capturing, stay steady",capturing_in_progress_title:"Capturing in progress",face_not_found_message:"Ensure your face is not covered and fully visible",face_not_found_title:"Face not detected",glare_message:"Avoid any direct light reflecting with glare",glare_title:"Glare detected",main_title_document_back:"Back side",main_title_document_face:"Selfie",main_title_document_front:"Front side",obstructed_message:"Some of the document parts are covered or missing",obstructed_title:"Missing information",other_error_code_message:"Please try again",other_error_code_title:"An error occurred",page_header_document:"Scan document",loading_screen_small_title:"Preparing...",page_header_face:"Face Recognition",second_title_document_back:"Please place your document on a solid surface, back side up.",second_title_document_face:"Please position your face in the center of the oval below.",second_title_document_front:"Please place your document on a solid surface, photo side up.",wrong_document_side_message:"The wrong document side has been detected",wrong_document_side_title:"Wrong document side detected",face_angle_too_large_title:"your face is not directly aligned with the camera",face_angle_too_large_message:"Please take another photo with your face fully visible for accurate detection",face_close_to_border_title:"Your face is too close to the edge",face_close_to_border_message:"Please adjust your position and make sure your entire face is within the frame",face_too_small_title:"Your face is too distant from the edge",face_too_small_message:"Please move closer to the camera so your face is clearer and easier to detect",face_too_close_title:"Your face is too close ",face_too_close_message:"Please adjust your position and make sure your entire face is within the frame",face_cropped_title:"Your face is partially cropped",face_cropped_message:"Please adjust your position and make sure your entire face is within the frame for optimal",no_face_title:"Face not found",no_face_message:"Please move closer to the camera or adjust your position so your face is clearer and easier to detect",multi_face_title:"Multiple faces detected",multi_face_message:"Please make sure only one face is visible in the frame to proceed",blur_selfie_title:"The selfie is out of focus",blur_selfie_message:"Please try taking another one with clearer focus for better detection",glare_selfie_title:"Too much reflection in your selfie",glare_selfie_message:"Please try taking another photo with better lighting and without glare for accurate detection",closed_eyes_title:"It looks like your eyes are closed",closed_eyes_message:"Please retake the photo with your eyes open",face_occluded_title:"Your face is partially hidden",face_occluded_message:"Please take another photo with your face fully visible for accurate detection",face_rotated_title:"Your face is not directly aligned with the camera",face_rotated_message:"Please take another photo with your face fully visible for accurate detection",barcode_not_found_title:"We are having trouble capturing some important elements of your document, Please try placing it in a clearer spot",barcode_not_found_message:"We are having trouble capturing some important elements of your document, Please try placing it in a clearer spot",searching_document_autocapture:"Searching for document",capturing_document_autocapture:"Capturing, please hold steady",click_manual_autocapture:"Click to capture manually",glare_blur_issues_autocapture:"Please make sure there are no light reflections, and try again",doc_not_in_frame_issues_autocapture:"Please bring the document closer and ensure it is fully within the capture frame for a clear image.",doc_not_found_autocapture:"Looking for document",capturing_face_issue_closer:"Please move closer to the frame",second_title_face_autocapture:"Get ready! Your selfie will be auto-captured, or tap to capture it manually",capturing_face_autocapture3:"Capturing... please, hold steady for 3",capturing_face_autocapture2:"Capturing... please, hold steady for 2",capturing_face_autocapture1:"Capturing... please, hold steady for 1",selfie_approval_autocapture:"Great job! Approve your selfie to continue",approve_button:"Approve",retake_button:"Retake"};const la=new class{constructor(t){this.translations=t,this.translations=new Proxy(this.translations,{get:function(t,e){return t[e]},set:function(t,e,r){return t[e]=r,!0}})}overrideLanguage(t){Object.assign(this.translations,t)}translate(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];let o=this.translations[t];return o||(o=t),o.replace(/{(\d+)}/g,(function(t,e){return void 0!==r[e]?r[e]:t}))}}(ca),da={en:ca,es:{blur_message:"Favor enfoca la cámara en tú cédula antes de la captura",blur_title:"Imagen borrosa",document_incorrect_position_message:"Asegúrate de que la cédula esté completamente dentro del marco y nada la cubra",document_incorrect_position_title:"Posición incorrecta del documento",capturing_in_progress_title:"Capturando en progreso",capturing_in_progress_message:"Capturando, mantente estable",document_not_found_message:"Asegúrate de utilizar una cédula valida",document_not_found_title:"Cédula no detectada",document_not_matching_message:"Favor Asegúrate de capturar la parte trasera de tu cédula",document_not_matching_title:"Parte trasera no corresponde",document_not_supported_message:"Favor utliza tu cédula",document_not_supported_title:"Cédula no compatible",face_not_found_message:"Asegurase de no tapar su rostro",face_not_found_title:"Selfie no detectada",glare_message:"Evite luz directa que pueda generar brillo",glare_title:"Demasiado brillo",main_title_document_back:"Parte trasera de tu cédula",main_title_document_face:"Tómate un Selfie",main_title_document_front:"Parte frontal de tu cédula",obstructed_message:"Parte de la cédula documento no está visible o falta información",obstructed_title:"Falta información",other_error_code_message:"Intenta nuevamente",other_error_code_title:"Ha ocurrido un error",page_header_document:"Escanéa tu cédula",page_header_face:"Reconocimiento Facial",second_title_document_back:"Asegúrate de poner su cédula en una superfice plana con la parte trasera visible.",second_title_document_face:"Asegúrate de posicionar tu rostro en el centro del circulo.",second_title_document_front:"Asegúrate de poner su cédula en una superfice plana con la parte frontal visible.",wrong_document_side_message:"Lado incorrecto de tu cédula ha sido detectado",wrong_document_side_title:"Lado de tu cédula incorrecto",face_angle_too_large_title:"Tu rostro no está directamente alineado con la cámara.",face_angle_too_large_message:"Por favor, toma otra foto con tu rostro completamente visible para una detección precisa.",face_close_to_border_title:"Tu rostro está demasiado cerca del borde.",face_close_to_border_message:"Por favor, cambia la posicion de tu rostro y asegúrate de que todo tu rostro esté dentro del marco.",face_too_small_title:"Tu rostro está demasiado lejos del borde.",face_too_small_message:"Por favor, acércate más a la cámara para que tu rostro esté más claro y sea más fácil de detectar.",face_too_close_title:"Tu rostro está demasiado cerca",face_too_close_message:"Acomode la posición y asegúrese de que toda su rostro esté dentro del marco.",face_cropped_title:"Tu rostro está parcialmente recortado.",face_cropped_message:"Por favor, cambia tu posición y asegúrate de que todo tu rostro esté dentro del marco para una detección óptima.",no_face_title:"Rostro no encontrado.",no_face_message:"Por favor, acércate más a la cámara o ajusta tu posición para que tu rostro esté más claro y sea más fácil de detectar.",multi_face_title:"Se detectaron múltiples rostros.",multi_face_message:"Por favor, asegúrate de que solo haya un rostro visible en el marco para continuar.",blur_selfie_title:"El autorretrato está fuera de foco.",blur_selfie_message:"Por favor, intenta tomar una nueva imagen con un enfoque más claro para una mejor detección.",glare_selfie_title:"Demasiado reflejo en tu autorretrato.",glare_selfie_message:"Por favor, intenta tomar otra foto con una mejor iluminación y sin brillos para una detección precisa.",closed_eyes_title:"Parece que tienes los ojos cerrados.",closed_eyes_message:"Por favor, vuelve a tomar la foto con los ojos abiertos.",face_occluded_title:"Tu rostro está parcialmente oculto.",face_occluded_message:"Por favor, toma otra foto con tu rostro completamente visible para una detección precisa.",face_rotated_title:"Tu rostro está fuera de foco.",face_rotated_message:"Por favor, intenta tomar otro con un enfoque más claro para una mejor detección.",barcode_not_found_title:"Estamos teniendo problemas para capturar algunos elementos importantes de su documento, Intente colocarlo en un lugar más despejado.",barcode_not_found_message:"Estamos teniendo problemas para capturar algunos elementos importantes de su documento, Intente colocarlo en un lugar más despejado.",searching_document_autocapture:"Buscando la cedula",capturing_document_autocapture:"Capturando, por favor mantente quieto",click_manual_autocapture:"Haz clic para capturar manualmente",glare_blur_issues_autocapture:"Por favor, asegúrate de que no haya reflejos de luz antes de intentarlo de nuevo",doc_not_in_frame_issues_autocapture:"Por favor, acerque la cedula y asegúrese de que esté completamente dentro del marco de captura para obtener una imagen clara",second_title_face_autocapture:"¡Prepárate! Tu selfie se capturará automáticamente, o toca para capturarla manualmente",capturing_face_autocapture3:"Capturando... por favor, mantente quieto durante 3",capturing_face_autocapture2:"Capturando... por favor, mantente quieto durante 2",capturing_face_autocapture1:"Capturando... por favor, mantente quieto durante 1",selfie_approval_autocapture:"¡Buen trabajo! Aprueba tu selfie para continuar",approve_button:"Aprobar",retake_button:"Volver a tomar"},pt:{blur_message:"Por favor, foque a câmera no documento antes de capturar",blur_title:"Imagem borrada",document_incorrect_position_message:"Certifique-se de que o documento esteja totalmente dentro do quadro e nada o cubra",document_incorrect_position_title:"Posição incorreta do documento",document_not_found_message:"Certifique-se de capturar um documento válido emitido pelo governo",document_not_found_title:"Documento não detectado",document_not_matching_message:"Por favor, certifique-se de capturar o verso do documento",document_not_matching_title:"Imagem do verso incorreta",document_not_supported_message:"Por favor, utilize um documento diferente emitido pelo governo",document_not_supported_title:"Documento não suportado",capturing_in_progress_message:"Capturando, mantenha-se firme",capturing_in_progress_title:"Captura em andamento",face_not_found_message:"Certifique-se de que seu rosto não esteja coberto e esteja totalmente visível",face_not_found_title:"Rosto não detectado",glare_message:"Evite qualquer luz direta refletindo com brilho",glare_title:"Brilho detectado",main_title_document_back:"Verso",main_title_document_face:"Selfie",main_title_document_front:"Frente",obstructed_message:"Algumas partes do documento estão encobertas ou ausentes",obstructed_title:"Informações incompletas",other_error_code_message:"Por favor, tente novamente",other_error_code_title:"Ocorreu um eprro",page_header_document:"Digitalizar o documento",page_header_face:"Reconhecimento facial",second_title_document_back:"Coloque o documento em uma superfície sólida, com o verso voltado para cima.",second_title_document_face:"Por favor, posicione seu rosto no centro do oval abaixo.",second_title_document_front:"Coloque o documento em uma superfície sólida, com a foto voltada para cima.",wrong_document_side_message:"O lado errado do documento foi detectado",wrong_document_side_title:"Lado incorreto do documento identificado",face_angle_too_large_title:"Seu rosto não está diretamente alinhado com a câmera.",face_angle_too_large_message:"Tire outra foto com seu rosto totalmente visível para uma detecção precisa.",face_close_to_border_title:"Seu rosto está muito próximo da borda.",face_close_to_border_message:"Por favor, reposicione seu rosto e certifique-se de que todo o seu rosto esteja dentro da moldura.",face_too_small_title:"Seu rosto está muito longe da borda.",face_too_small_message:"Aproxime-se da câmera para que seu rosto fique mais claro e fácil de detectar.",face_too_close_title:"Seu rosto está muito perto",face_too_close_message:"Ajuste a posição e certifique-se de que todo o seu rosto esteja dentro da moldura.",face_cropped_title:"Seu rosto está parcialmente cortado.",face_cropped_message:"Mude sua posição e certifique-se de que todo o seu rosto esteja dentro do enquadramento para uma detecção ideal.",no_face_title:"Rosto não encontrado..",no_face_message:"Aproxime-se da câmera ou ajuste sua posição para que seu rosto fique mais claro e fácil de detectar.",multi_face_title:"Vários rostos foram detectados.",multi_face_message:"Certifique-se de que haja apenas um rosto visível no quadro para continuar.",blur_selfie_title:"O autorretrato está fora de foco.",blur_selfie_message:"Tente tirar uma nova imagem com foco mais claro para melhor detecção.",glare_selfie_title:"Muita reflexão em seu autorretrato.",glare_selfie_message:"Tente tirar outra foto com melhor iluminação e sem brilho para uma detecção precisa.",closed_eyes_title:"Parece que seus olhos estão fechados.",closed_eyes_message:"Por favor, tire a foto novamente com os olhos abertos.",face_occluded_title:"Seu rosto está parcialmente oculto.",face_occluded_message:"Tire outra foto com seu rosto totalmente visível para uma detecção precisa.",face_rotated_title:"Seu rosto está fora de foco.",face_rotated_message:"Por favor, tente pegar outro com foco mais claro para melhor detecção.",barcode_not_found_title:"Estamos tendo problemas para capturar alguns elementos importantes do seu documento, Experimente colocá-lo em um local mais claro.",barcode_not_found_message:"Estamos tendo problemas para capturar alguns elementos importantes do seu documento, Experimente colocá-lo em um local mais claro.",searching_document_autocapture:"Buscando o documento",capturing_document_autocapture:"Capturando, por favor mantenha-se imóvel",click_manual_autocapture:"Clique para capturar manualmente.",glare_blur_issues_autocapture:"Por favor, certifique-se de que não há reflexos de luz antes de tentar novamente",doc_not_in_frame_issues_autocapture:"Por favor, aproxime o documento e certifique-se de que está totalmente dentro da moldura de captura para uma imagem nítida",second_title_face_autocapture:"Prepare-se! Sua selfie será capturada automaticamente, ou toque para capturá-la manualmente",capturing_face_autocapture3:"Capturando... por favor, fique parado por 3",capturing_face_autocapture2:"Capturando... por favor, fique parado por 2",capturing_face_autocapture1:"Capturando... por favor, fique parado por 1",selfie_approval_autocapture:"Ótimo trabalho! Aprove sua selfie para continuar",approve_button:"Aprovar",retake_button:"Tirar novamente"},frCa:{blur_message:"Veuillez faire la mise au point de l’appareil photo sur le document avant de le capturer",blur_title:"Image floue",document_not_found_message:"Munissez-vous d’une pièce d’identité valide délivrée par le gouvernement",document_not_found_title:"Document non détecté",document_not_matching_message:"Veillez à capturer le verso du document",document_not_matching_title:"Non-concordance entre les images du recto et du verso",document_not_supported_message:"Veuillez utiliser une autre pièce d’identité délivrée par le gouvernement",document_not_supported_title:"Document non pris en charge",face_not_found_message:"Assurez-vous que votre visage n’est pas couvert et qu’il est entièrement visible",face_not_found_title:"Visage non détecté",glare_message:"Évitez la lumière directe qui pourrait se refléter sur le document",glare_title:"Reflet détecté",main_title_document_back:"Verso",main_title_document_face:"Égoportrait",main_title_document_front:"Face avant",obstructed_message:"Le document comporte des parties manquantes ou couvertes",obstructed_title:"Informations manquantes",other_error_code_message:"Veuillez réessayer",other_error_code_title:"Une erreur s’est produite",page_header_document:"Numériser le document",page_header_face:"Reconnaissance faciale",second_title_document_back:"Veuillez placer votre document sur une surface solide, le verso vers le haut.",second_title_document_face:"Veuillez positionner votre visage au centre de l’ovale ci-dessous.",second_title_document_front:"Veuillez placer votre document sur une surface solide, photo vers le haut.",wrong_document_side_message:"Le mauvais côté du document a été détecté",wrong_document_side_title:"Mauvais côté du document détecté",face_angle_too_large_title:"votre visage n’est pas directement aligné avec l’appareil photo",face_angle_too_large_message:"Veuillez prendre une autre photo avec votre visage entièrement visible pour une détection précise",face_close_to_border_title:"Votre visage est trop près du bord",face_close_to_border_message:"Veuillez ajuster votre position et vous assurer que l’ensemble de votre visage se trouve dans le cadre",face_too_small_title:"Votre visage est trop éloigné du bord",face_too_small_message:"Veuillez vous rapprocher de la caméra pour que votre visage soit plus clair et plus facile à détecter",face_too_close_title:"Votre visage est trop proche",face_too_close_message:"Veuillez ajuster votre position et vous assurer que l’ensemble de votre visage se trouve dans le cadre",face_cropped_title:"Votre visage est partiellement rogné",face_cropped_message:"Veuillez ajuster votre position et vous assurer que l’ensemble de votre visage se trouve dans le cadre pour optimiser",no_face_title:"Visage introuvable",no_face_message:"Veuillez vous rapprocher de la caméra ou ajuster votre position pour que votre visage soit plus clair et plus facile à détecter",multi_face_title:"Plusieurs visages détectés",multi_face_message:"Veuillez vous assurer qu’un seul visage est visible dans le cadre pour continuer",blur_selfie_title:"L’égoportrait n’est pas net",blur_selfie_message:"Essayez d’en prendre un autre avec une mise au point plus claire pour une meilleure détection",glare_selfie_title:"Trop de reflets sur votre égoportrait",glare_selfie_message:"Veuillez essayer de prendre une autre photo avec un meilleur éclairage et sans reflet pour une détection précise",closed_eyes_title:"Il semble que vos yeux soient fermés.",closed_eyes_message:"Veuillez reprendre la photo avec les yeux ouverts",face_occluded_title:"Votre visage est partiellement caché.",face_occluded_message:"Veuillez prendre une autre photo avec votre visage entièrement visible pour une détection précise",face_rotated_title:"votre visage n’est pas directement aligné avec l’appareil photo",face_rotated_message:"Veuillez prendre une autre photo avec votre visage entièrement visible pour une détection précise",barcode_not_found_title:"Nous avons des difficultés à capturer certains éléments importants de votre document. Veuillez essayer de le placer à un endroit plus clair",barcode_not_found_message:"Nous avons des difficultés à capturer certains éléments importants de votre document. Veuillez essayer de le placer à un endroit plus clair",searching_document_autocapture:"Recherche du document",capturing_document_autocapture:"Capture en cours, veuillez rester immobile",click_manual_autocapture:"Cliquez pour capturer manuellement",glare_blur_issues_autocapture:"Veuillez vous assurer qu’il n’y a pas de reflets de lumière avant de réessayer",doc_not_in_frame_issues_autocapture:"Veuillez rapprocher le document et assurez-vous qu’il soit entièrement dans le cadre de capture pour une image claire",second_title_face_autocapture:"Préparez-vous! Votre selfie sera capturé automatiquement, ou appuyez pour le capturer manuellement",capturing_face_autocapture3:"Capture... en cours, veuillez rester immobile pendant 3",capturing_face_autocapture2:"Capture... en cours, veuillez rester immobile pendant 2",capturing_face_autocapture1:"Capture... en cours, veuillez rester immobile pendant 1",selfie_approval_autocapture:"Bon travail! Approuvez votre selfie pour continuer",approve_button:"Approuver",retake_button:"Reprendre"}};const ha=function(){var t,e;(null===(e=null===(t=Ji.state.autoCaptureSettings)||void 0===t?void 0:t.settings)||void 0===e?void 0:e.debug)&&console.log(...arguments)};var fa;!function(t){t.DOCUMENT_DETECTOR="document_detector",t.BLUR_GLARE_CLASSIFIER="blur_glare_classifier",t.FACE_LANDMARK="face_landmark"}(fa||(fa={}));var pa,ga,ma=(pa=function(t,e){return pa=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},pa(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}pa(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),ya=function(t){function e(e,r){var n,o,i,a=this.constructor,s=t.call(this,e,r)||this;return Object.defineProperty(s,"name",{value:a.name,enumerable:!1,configurable:!0}),n=s,o=a.prototype,(i=Object.setPrototypeOf)?i(n,o):n.__proto__=o,function(t,e){void 0===e&&(e=t.constructor);var r=Error.captureStackTrace;r&&r(t,e)}(s),s}return ma(e,t),e}(Error),wa=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),_a=function(t){function e(e){void 0===e&&(e=void 0);var r=t.call(this,e)||this;return r.message=e,r}return wa(e,t),e.prototype.getKind=function(){return this.constructor.kind},e.kind="Exception",e}(ya),va=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ea=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return va(e,t),e.kind="ArgumentException",e}(_a),ba=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Aa=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ba(e,t),e.kind="IllegalArgumentException",e}(_a),Ca=function(){function t(t){if(this.binarizer=t,null===t)throw new Aa("Binarizer must be non-null.")}return t.prototype.getWidth=function(){return this.binarizer.getWidth()},t.prototype.getHeight=function(){return this.binarizer.getHeight()},t.prototype.getBlackRow=function(t,e){return this.binarizer.getBlackRow(t,e)},t.prototype.getBlackMatrix=function(){return null!==this.matrix&&void 0!==this.matrix||(this.matrix=this.binarizer.getBlackMatrix()),this.matrix},t.prototype.isCropSupported=function(){return this.binarizer.getLuminanceSource().isCropSupported()},t.prototype.crop=function(e,r,n,o){var i=this.binarizer.getLuminanceSource().crop(e,r,n,o);return new t(this.binarizer.createBinarizer(i))},t.prototype.isRotateSupported=function(){return this.binarizer.getLuminanceSource().isRotateSupported()},t.prototype.rotateCounterClockwise=function(){var e=this.binarizer.getLuminanceSource().rotateCounterClockwise();return new t(this.binarizer.createBinarizer(e))},t.prototype.rotateCounterClockwise45=function(){var e=this.binarizer.getLuminanceSource().rotateCounterClockwise45();return new t(this.binarizer.createBinarizer(e))},t.prototype.toString=function(){try{return this.getBlackMatrix().toString()}catch(t){return""}},t}(),Ia=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Sa=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Ia(e,t),e.getChecksumInstance=function(){return new e},e.kind="ChecksumException",e}(_a),Ta=function(){function t(t){this.source=t}return t.prototype.getLuminanceSource=function(){return this.source},t.prototype.getWidth=function(){return this.source.getWidth()},t.prototype.getHeight=function(){return this.source.getHeight()},t}(),Da=function(){function t(){}return t.arraycopy=function(t,e,r,n,o){for(;o--;)r[n++]=t[e++]},t.currentTimeMillis=function(){return Date.now()},t}(),Oa=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ra=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Oa(e,t),e.kind="IndexOutOfBoundsException",e}(_a),Ma=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Na=function(t){function e(e,r){void 0===e&&(e=void 0),void 0===r&&(r=void 0);var n=t.call(this,r)||this;return n.index=e,n.message=r,n}return Ma(e,t),e.kind="ArrayIndexOutOfBoundsException",e}(Ra),ka=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},xa=function(){function t(){}return t.fill=function(t,e){for(var r=0,n=t.length;r<n;r++)t[r]=e},t.fillWithin=function(e,r,n,o){t.rangeCheck(e.length,r,n);for(var i=r;i<n;i++)e[i]=o},t.rangeCheck=function(t,e,r){if(e>r)throw new Aa("fromIndex("+e+") > toIndex("+r+")");if(e<0)throw new Na(e);if(r>t)throw new Na(r)},t.asList=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t},t.create=function(t,e,r){return Array.from({length:t}).map((function(t){return Array.from({length:e}).fill(r)}))},t.createInt32Array=function(t,e,r){return Array.from({length:t}).map((function(t){return Int32Array.from({length:e}).fill(r)}))},t.equals=function(t,e){if(!t)return!1;if(!e)return!1;if(!t.length)return!1;if(!e.length)return!1;if(t.length!==e.length)return!1;for(var r=0,n=t.length;r<n;r++)if(t[r]!==e[r])return!1;return!0},t.hashCode=function(t){var e,r;if(null===t)return 0;var n=1;try{for(var o=ka(t),i=o.next();!i.done;i=o.next()){n=31*n+i.value}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}return n},t.fillUint8Array=function(t,e){for(var r=0;r!==t.length;r++)t[r]=e},t.copyOf=function(t,e){return t.slice(0,e)},t.copyOfUint8Array=function(t,e){if(t.length<=e){var r=new Uint8Array(e);return r.set(t),r}return t.slice(0,e)},t.copyOfRange=function(t,e,r){var n=r-e,o=new Int32Array(n);return Da.arraycopy(t,e,o,0,n),o},t.binarySearch=function(e,r,n){void 0===n&&(n=t.numberComparator);for(var o=0,i=e.length-1;o<=i;){var a=i+o>>1,s=n(r,e[a]);if(s>0)o=a+1;else{if(!(s<0))return a;i=a-1}}return-o-1},t.numberComparator=function(t,e){return t-e},t}(),Pa=function(){function t(){}return t.numberOfTrailingZeros=function(t){var e;if(0===t)return 32;var r=31;return 0!==(e=t<<16)&&(r-=16,t=e),0!==(e=t<<8)&&(r-=8,t=e),0!==(e=t<<4)&&(r-=4,t=e),0!==(e=t<<2)&&(r-=2,t=e),r-(t<<1>>>31)},t.numberOfLeadingZeros=function(t){if(0===t)return 32;var e=1;return t>>>16==0&&(e+=16,t<<=16),t>>>24==0&&(e+=8,t<<=8),t>>>28==0&&(e+=4,t<<=4),t>>>30==0&&(e+=2,t<<=2),e-=t>>>31},t.toHexString=function(t){return t.toString(16)},t.toBinaryString=function(t){return String(parseInt(String(t),2))},t.bitCount=function(t){return t=(t=(858993459&(t-=t>>>1&1431655765))+(t>>>2&858993459))+(t>>>4)&252645135,t+=t>>>8,63&(t+=t>>>16)},t.truncDivision=function(t,e){return Math.trunc(t/e)},t.parseInt=function(t,e){return void 0===e&&(e=void 0),parseInt(t,e)},t.MIN_VALUE_32_BITS=-2147483648,t.MAX_VALUE=Number.MAX_SAFE_INTEGER,t}(),Ba=function(){function t(e,r){void 0===e?(this.size=0,this.bits=new Int32Array(1)):(this.size=e,this.bits=null==r?t.makeArray(e):r)}return t.prototype.getSize=function(){return this.size},t.prototype.getSizeInBytes=function(){return Math.floor((this.size+7)/8)},t.prototype.ensureCapacity=function(e){if(e>32*this.bits.length){var r=t.makeArray(e);Da.arraycopy(this.bits,0,r,0,this.bits.length),this.bits=r}},t.prototype.get=function(t){return!!(this.bits[Math.floor(t/32)]&1<<(31&t))},t.prototype.set=function(t){this.bits[Math.floor(t/32)]|=1<<(31&t)},t.prototype.flip=function(t){this.bits[Math.floor(t/32)]^=1<<(31&t)},t.prototype.getNextSet=function(t){var e=this.size;if(t>=e)return e;var r=this.bits,n=Math.floor(t/32),o=r[n];o&=~((1<<(31&t))-1);for(var i=r.length;0===o;){if(++n===i)return e;o=r[n]}var a=32*n+Pa.numberOfTrailingZeros(o);return a>e?e:a},t.prototype.getNextUnset=function(t){var e=this.size;if(t>=e)return e;var r=this.bits,n=Math.floor(t/32),o=~r[n];o&=~((1<<(31&t))-1);for(var i=r.length;0===o;){if(++n===i)return e;o=~r[n]}var a=32*n+Pa.numberOfTrailingZeros(o);return a>e?e:a},t.prototype.setBulk=function(t,e){this.bits[Math.floor(t/32)]=e},t.prototype.setRange=function(t,e){if(e<t||t<0||e>this.size)throw new Aa;if(e!==t){e--;for(var r=Math.floor(t/32),n=Math.floor(e/32),o=this.bits,i=r;i<=n;i++){var a=(2<<(i<n?31:31&e))-(1<<(i>r?0:31&t));o[i]|=a}}},t.prototype.clear=function(){for(var t=this.bits.length,e=this.bits,r=0;r<t;r++)e[r]=0},t.prototype.isRange=function(t,e,r){if(e<t||t<0||e>this.size)throw new Aa;if(e===t)return!0;e--;for(var n=Math.floor(t/32),o=Math.floor(e/32),i=this.bits,a=n;a<=o;a++){var s=(2<<(a<o?31:31&e))-(1<<(a>n?0:31&t))&4294967295;if((i[a]&s)!==(r?s:0))return!1}return!0},t.prototype.appendBit=function(t){this.ensureCapacity(this.size+1),t&&(this.bits[Math.floor(this.size/32)]|=1<<(31&this.size)),this.size++},t.prototype.appendBits=function(t,e){if(e<0||e>32)throw new Aa("Num bits must be between 0 and 32");this.ensureCapacity(this.size+e);for(var r=e;r>0;r--)this.appendBit(1==(t>>r-1&1))},t.prototype.appendBitArray=function(t){var e=t.size;this.ensureCapacity(this.size+e);for(var r=0;r<e;r++)this.appendBit(t.get(r))},t.prototype.xor=function(t){if(this.size!==t.size)throw new Aa("Sizes don't match");for(var e=this.bits,r=0,n=e.length;r<n;r++)e[r]^=t.bits[r]},t.prototype.toBytes=function(t,e,r,n){for(var o=0;o<n;o++){for(var i=0,a=0;a<8;a++)this.get(t)&&(i|=1<<7-a),t++;e[r+o]=i}},t.prototype.getBitArray=function(){return this.bits},t.prototype.reverse=function(){for(var t=new Int32Array(this.bits.length),e=Math.floor((this.size-1)/32),r=e+1,n=this.bits,o=0;o<r;o++){var i=n[o];i=(i=(i=(i=(i=i>>1&1431655765|(1431655765&i)<<1)>>2&858993459|(858993459&i)<<2)>>4&252645135|(252645135&i)<<4)>>8&16711935|(16711935&i)<<8)>>16&65535|(65535&i)<<16,t[e-o]=i}if(this.size!==32*r){var a=32*r-this.size,s=t[0]>>>a;for(o=1;o<r;o++){var u=t[o];s|=u<<32-a,t[o-1]=s,s=u>>>a}t[r-1]=s}this.bits=t},t.makeArray=function(t){return new Int32Array(Math.floor((t+31)/32))},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.size===r.size&&xa.equals(this.bits,r.bits)},t.prototype.hashCode=function(){return 31*this.size+xa.hashCode(this.bits)},t.prototype.toString=function(){for(var t="",e=0,r=this.size;e<r;e++)7&e||(t+=" "),t+=this.get(e)?"X":".";return t},t.prototype.clone=function(){return new t(this.size,this.bits.slice())},t.prototype.toArray=function(){for(var t=[],e=0,r=this.size;e<r;e++)t.push(this.get(e));return t},t}();!function(t){t[t.OTHER=0]="OTHER",t[t.PURE_BARCODE=1]="PURE_BARCODE",t[t.POSSIBLE_FORMATS=2]="POSSIBLE_FORMATS",t[t.TRY_HARDER=3]="TRY_HARDER",t[t.CHARACTER_SET=4]="CHARACTER_SET",t[t.ALLOWED_LENGTHS=5]="ALLOWED_LENGTHS",t[t.ASSUME_CODE_39_CHECK_DIGIT=6]="ASSUME_CODE_39_CHECK_DIGIT",t[t.ENABLE_CODE_39_EXTENDED_MODE=7]="ENABLE_CODE_39_EXTENDED_MODE",t[t.ASSUME_GS1=8]="ASSUME_GS1",t[t.RETURN_CODABAR_START_END=9]="RETURN_CODABAR_START_END",t[t.NEED_RESULT_POINT_CALLBACK=10]="NEED_RESULT_POINT_CALLBACK",t[t.ALLOWED_EAN_EXTENSIONS=11]="ALLOWED_EAN_EXTENSIONS"}(ga||(ga={}));var Fa,La=ga,za=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ua=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return za(e,t),e.getFormatInstance=function(){return new e},e.kind="FormatException",e}(_a),Va=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};!function(t){t[t.Cp437=0]="Cp437",t[t.ISO8859_1=1]="ISO8859_1",t[t.ISO8859_2=2]="ISO8859_2",t[t.ISO8859_3=3]="ISO8859_3",t[t.ISO8859_4=4]="ISO8859_4",t[t.ISO8859_5=5]="ISO8859_5",t[t.ISO8859_6=6]="ISO8859_6",t[t.ISO8859_7=7]="ISO8859_7",t[t.ISO8859_8=8]="ISO8859_8",t[t.ISO8859_9=9]="ISO8859_9",t[t.ISO8859_10=10]="ISO8859_10",t[t.ISO8859_11=11]="ISO8859_11",t[t.ISO8859_13=12]="ISO8859_13",t[t.ISO8859_14=13]="ISO8859_14",t[t.ISO8859_15=14]="ISO8859_15",t[t.ISO8859_16=15]="ISO8859_16",t[t.SJIS=16]="SJIS",t[t.Cp1250=17]="Cp1250",t[t.Cp1251=18]="Cp1251",t[t.Cp1252=19]="Cp1252",t[t.Cp1256=20]="Cp1256",t[t.UnicodeBigUnmarked=21]="UnicodeBigUnmarked",t[t.UTF8=22]="UTF8",t[t.ASCII=23]="ASCII",t[t.Big5=24]="Big5",t[t.GB18030=25]="GB18030",t[t.EUC_KR=26]="EUC_KR"}(Fa||(Fa={}));var Ha,ja=function(){function t(e,r,n){for(var o,i,a=[],s=3;s<arguments.length;s++)a[s-3]=arguments[s];this.valueIdentifier=e,this.name=n,this.values="number"==typeof r?Int32Array.from([r]):r,this.otherEncodingNames=a,t.VALUE_IDENTIFIER_TO_ECI.set(e,this),t.NAME_TO_ECI.set(n,this);for(var u=this.values,c=0,l=u.length;c!==l;c++){var d=u[c];t.VALUES_TO_ECI.set(d,this)}try{for(var h=Va(a),f=h.next();!f.done;f=h.next()){var p=f.value;t.NAME_TO_ECI.set(p,this)}}catch(t){o={error:t}}finally{try{f&&!f.done&&(i=h.return)&&i.call(h)}finally{if(o)throw o.error}}}return t.prototype.getValueIdentifier=function(){return this.valueIdentifier},t.prototype.getName=function(){return this.name},t.prototype.getValue=function(){return this.values[0]},t.getCharacterSetECIByValue=function(e){if(e<0||e>=900)throw new Ua("incorect value");var r=t.VALUES_TO_ECI.get(e);if(void 0===r)throw new Ua("incorect value");return r},t.getCharacterSetECIByName=function(e){var r=t.NAME_TO_ECI.get(e);if(void 0===r)throw new Ua("incorect value");return r},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.getName()===r.getName()},t.VALUE_IDENTIFIER_TO_ECI=new Map,t.VALUES_TO_ECI=new Map,t.NAME_TO_ECI=new Map,t.Cp437=new t(Fa.Cp437,Int32Array.from([0,2]),"Cp437"),t.ISO8859_1=new t(Fa.ISO8859_1,Int32Array.from([1,3]),"ISO-8859-1","ISO88591","ISO8859_1"),t.ISO8859_2=new t(Fa.ISO8859_2,4,"ISO-8859-2","ISO88592","ISO8859_2"),t.ISO8859_3=new t(Fa.ISO8859_3,5,"ISO-8859-3","ISO88593","ISO8859_3"),t.ISO8859_4=new t(Fa.ISO8859_4,6,"ISO-8859-4","ISO88594","ISO8859_4"),t.ISO8859_5=new t(Fa.ISO8859_5,7,"ISO-8859-5","ISO88595","ISO8859_5"),t.ISO8859_6=new t(Fa.ISO8859_6,8,"ISO-8859-6","ISO88596","ISO8859_6"),t.ISO8859_7=new t(Fa.ISO8859_7,9,"ISO-8859-7","ISO88597","ISO8859_7"),t.ISO8859_8=new t(Fa.ISO8859_8,10,"ISO-8859-8","ISO88598","ISO8859_8"),t.ISO8859_9=new t(Fa.ISO8859_9,11,"ISO-8859-9","ISO88599","ISO8859_9"),t.ISO8859_10=new t(Fa.ISO8859_10,12,"ISO-8859-10","ISO885910","ISO8859_10"),t.ISO8859_11=new t(Fa.ISO8859_11,13,"ISO-8859-11","ISO885911","ISO8859_11"),t.ISO8859_13=new t(Fa.ISO8859_13,15,"ISO-8859-13","ISO885913","ISO8859_13"),t.ISO8859_14=new t(Fa.ISO8859_14,16,"ISO-8859-14","ISO885914","ISO8859_14"),t.ISO8859_15=new t(Fa.ISO8859_15,17,"ISO-8859-15","ISO885915","ISO8859_15"),t.ISO8859_16=new t(Fa.ISO8859_16,18,"ISO-8859-16","ISO885916","ISO8859_16"),t.SJIS=new t(Fa.SJIS,20,"SJIS","Shift_JIS"),t.Cp1250=new t(Fa.Cp1250,21,"Cp1250","windows-1250"),t.Cp1251=new t(Fa.Cp1251,22,"Cp1251","windows-1251"),t.Cp1252=new t(Fa.Cp1252,23,"Cp1252","windows-1252"),t.Cp1256=new t(Fa.Cp1256,24,"Cp1256","windows-1256"),t.UnicodeBigUnmarked=new t(Fa.UnicodeBigUnmarked,25,"UnicodeBigUnmarked","UTF-16BE","UnicodeBig"),t.UTF8=new t(Fa.UTF8,26,"UTF8","UTF-8"),t.ASCII=new t(Fa.ASCII,Int32Array.from([27,170]),"ASCII","US-ASCII"),t.Big5=new t(Fa.Big5,28,"Big5"),t.GB18030=new t(Fa.GB18030,29,"GB18030","GB2312","EUC_CN","GBK"),t.EUC_KR=new t(Fa.EUC_KR,30,"EUC_KR","EUC-KR"),t}(),Ga=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Wa=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Ga(e,t),e.kind="UnsupportedOperationException",e}(_a),Xa=function(){function t(){}return t.decode=function(t,e){var r=this.encodingName(e);return this.customDecoder?this.customDecoder(t,r):"undefined"==typeof TextDecoder||this.shouldDecodeOnFallback(r)?this.decodeFallback(t,r):new TextDecoder(r).decode(t)},t.shouldDecodeOnFallback=function(e){return!t.isBrowser()&&"ISO-8859-1"===e},t.encode=function(t,e){var r=this.encodingName(e);return this.customEncoder?this.customEncoder(t,r):"undefined"==typeof TextEncoder?this.encodeFallback(t):(new TextEncoder).encode(t)},t.isBrowser=function(){return"undefined"!=typeof window&&"[object Window]"==={}.toString.call(window)},t.encodingName=function(t){return"string"==typeof t?t:t.getName()},t.encodingCharacterSet=function(t){return t instanceof ja?t:ja.getCharacterSetECIByName(t)},t.decodeFallback=function(e,r){var n=this.encodingCharacterSet(r);if(t.isDecodeFallbackSupported(n)){for(var o="",i=0,a=e.length;i<a;i++){var s=e[i].toString(16);s.length<2&&(s="0"+s),o+="%"+s}return decodeURIComponent(o)}if(n.equals(ja.UnicodeBigUnmarked))return String.fromCharCode.apply(null,new Uint16Array(e.buffer));throw new Wa("Encoding "+this.encodingName(r)+" not supported by fallback.")},t.isDecodeFallbackSupported=function(t){return t.equals(ja.UTF8)||t.equals(ja.ISO8859_1)||t.equals(ja.ASCII)},t.encodeFallback=function(t){for(var e=btoa(unescape(encodeURIComponent(t))).split(""),r=[],n=0;n<e.length;n++)r.push(e[n].charCodeAt(0));return new Uint8Array(r)},t}(),Ya=function(){function t(){}return t.castAsNonUtf8Char=function(t,e){void 0===e&&(e=null);var r=e?e.getName():this.ISO88591;return Xa.decode(new Uint8Array([t]),r)},t.guessEncoding=function(e,r){if(null!=r&&void 0!==r.get(La.CHARACTER_SET))return r.get(La.CHARACTER_SET).toString();for(var n=e.length,o=!0,i=!0,a=!0,s=0,u=0,c=0,l=0,d=0,h=0,f=0,p=0,g=0,m=0,y=0,w=e.length>3&&239===e[0]&&187===e[1]&&191===e[2],_=0;_<n&&(o||i||a);_++){var v=255&e[_];a&&(s>0?128&v?s--:a=!1:128&v&&(64&v?(s++,32&v?(s++,16&v?(s++,8&v?a=!1:l++):c++):u++):a=!1)),o&&(v>127&&v<160?o=!1:v>159&&(v<192||215===v||247===v)&&y++),i&&(d>0?v<64||127===v||v>252?i=!1:d--:128===v||160===v||v>239?i=!1:v>160&&v<224?(h++,p=0,++f>g&&(g=f)):v>127?(d++,f=0,++p>m&&(m=p)):(f=0,p=0))}return a&&s>0&&(a=!1),i&&d>0&&(i=!1),a&&(w||u+c+l>0)?t.UTF8:i&&(t.ASSUME_SHIFT_JIS||g>=3||m>=3)?t.SHIFT_JIS:o&&i?2===g&&2===h||10*y>=n?t.SHIFT_JIS:t.ISO88591:o?t.ISO88591:i?t.SHIFT_JIS:a?t.UTF8:t.PLATFORM_DEFAULT_ENCODING},t.format=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var n=-1;return t.replace(/%(-)?(0?[0-9]+)?([.][0-9]+)?([#][0-9]+)?([scfpexd%])/g,(function(t,r,o,i,a,s){if("%%"===t)return"%";if(void 0!==e[++n]){t=i?parseInt(i.substr(1)):void 0;var u,c=a?parseInt(a.substr(1)):void 0;switch(s){case"s":u=e[n];break;case"c":u=e[n][0];break;case"f":u=parseFloat(e[n]).toFixed(t);break;case"p":u=parseFloat(e[n]).toPrecision(t);break;case"e":u=parseFloat(e[n]).toExponential(t);break;case"x":u=parseInt(e[n]).toString(c||16);break;case"d":u=parseFloat(parseInt(e[n],c||10).toPrecision(t)).toFixed(0)}u="object"==typeof u?JSON.stringify(u):(+u).toString(c);for(var l=parseInt(o),d=o&&o[0]+""=="0"?"0":" ";u.length<l;)u=void 0!==r?u+d:d+u;return u}}))},t.getBytes=function(t,e){return Xa.encode(t,e)},t.getCharCode=function(t,e){return void 0===e&&(e=0),t.charCodeAt(e)},t.getCharAt=function(t){return String.fromCharCode(t)},t.SHIFT_JIS=ja.SJIS.getName(),t.GB2312="GB2312",t.ISO88591=ja.ISO8859_1.getName(),t.EUC_JP="EUC_JP",t.UTF8=ja.UTF8.getName(),t.PLATFORM_DEFAULT_ENCODING=t.UTF8,t.ASSUME_SHIFT_JIS=!1,t}(),Za=function(){function t(t){void 0===t&&(t=""),this.value=t}return t.prototype.enableDecoding=function(t){return this.encoding=t,this},t.prototype.append=function(t){return"string"==typeof t?this.value+=t.toString():this.encoding?this.value+=Ya.castAsNonUtf8Char(t,this.encoding):this.value+=String.fromCharCode(t),this},t.prototype.appendChars=function(t,e,r){for(var n=e;e<e+r;n++)this.append(t[n]);return this},t.prototype.length=function(){return this.value.length},t.prototype.charAt=function(t){return this.value.charAt(t)},t.prototype.deleteCharAt=function(t){this.value=this.value.substr(0,t)+this.value.substring(t+1)},t.prototype.setCharAt=function(t,e){this.value=this.value.substr(0,t)+e+this.value.substr(t+1)},t.prototype.substring=function(t,e){return this.value.substring(t,e)},t.prototype.setLengthToZero=function(){this.value=""},t.prototype.toString=function(){return this.value},t.prototype.insert=function(t,e){this.value=this.value.substring(0,t)+e+this.value.substring(t)},t}(),qa=function(){function t(t,e,r,n){if(this.width=t,this.height=e,this.rowSize=r,this.bits=n,null==e&&(e=t),this.height=e,t<1||e<1)throw new Aa("Both dimensions must be greater than 0");null==r&&(r=Math.floor((t+31)/32)),this.rowSize=r,null==n&&(this.bits=new Int32Array(this.rowSize*this.height))}return t.parseFromBooleanArray=function(e){for(var r=e.length,n=e[0].length,o=new t(n,r),i=0;i<r;i++)for(var a=e[i],s=0;s<n;s++)a[s]&&o.set(s,i);return o},t.parseFromString=function(e,r,n){if(null===e)throw new Aa("stringRepresentation cannot be null");for(var o=new Array(e.length),i=0,a=0,s=-1,u=0,c=0;c<e.length;)if("\n"===e.charAt(c)||"\r"===e.charAt(c)){if(i>a){if(-1===s)s=i-a;else if(i-a!==s)throw new Aa("row lengths do not match");a=i,u++}c++}else if(e.substring(c,c+r.length)===r)c+=r.length,o[i]=!0,i++;else{if(e.substring(c,c+n.length)!==n)throw new Aa("illegal character encountered: "+e.substring(c));c+=n.length,o[i]=!1,i++}if(i>a){if(-1===s)s=i-a;else if(i-a!==s)throw new Aa("row lengths do not match");u++}for(var l=new t(s,u),d=0;d<i;d++)o[d]&&l.set(Math.floor(d%s),Math.floor(d/s));return l},t.prototype.get=function(t,e){var r=e*this.rowSize+Math.floor(t/32);return!!(this.bits[r]>>>(31&t)&1)},t.prototype.set=function(t,e){var r=e*this.rowSize+Math.floor(t/32);this.bits[r]|=1<<(31&t)&4294967295},t.prototype.unset=function(t,e){var r=e*this.rowSize+Math.floor(t/32);this.bits[r]&=~(1<<(31&t)&4294967295)},t.prototype.flip=function(t,e){var r=e*this.rowSize+Math.floor(t/32);this.bits[r]^=1<<(31&t)&4294967295},t.prototype.xor=function(t){if(this.width!==t.getWidth()||this.height!==t.getHeight()||this.rowSize!==t.getRowSize())throw new Aa("input matrix dimensions do not match");for(var e=new Ba(Math.floor(this.width/32)+1),r=this.rowSize,n=this.bits,o=0,i=this.height;o<i;o++)for(var a=o*r,s=t.getRow(o,e).getBitArray(),u=0;u<r;u++)n[a+u]^=s[u]},t.prototype.clear=function(){for(var t=this.bits,e=t.length,r=0;r<e;r++)t[r]=0},t.prototype.setRegion=function(t,e,r,n){if(e<0||t<0)throw new Aa("Left and top must be nonnegative");if(n<1||r<1)throw new Aa("Height and width must be at least 1");var o=t+r,i=e+n;if(i>this.height||o>this.width)throw new Aa("The region must fit inside the matrix");for(var a=this.rowSize,s=this.bits,u=e;u<i;u++)for(var c=u*a,l=t;l<o;l++)s[c+Math.floor(l/32)]|=1<<(31&l)&4294967295},t.prototype.getRow=function(t,e){null==e||e.getSize()<this.width?e=new Ba(this.width):e.clear();for(var r=this.rowSize,n=this.bits,o=t*r,i=0;i<r;i++)e.setBulk(32*i,n[o+i]);return e},t.prototype.setRow=function(t,e){Da.arraycopy(e.getBitArray(),0,this.bits,t*this.rowSize,this.rowSize)},t.prototype.rotate180=function(){for(var t=this.getWidth(),e=this.getHeight(),r=new Ba(t),n=new Ba(t),o=0,i=Math.floor((e+1)/2);o<i;o++)r=this.getRow(o,r),n=this.getRow(e-1-o,n),r.reverse(),n.reverse(),this.setRow(o,n),this.setRow(e-1-o,r)},t.prototype.getEnclosingRectangle=function(){for(var t=this.width,e=this.height,r=this.rowSize,n=this.bits,o=t,i=e,a=-1,s=-1,u=0;u<e;u++)for(var c=0;c<r;c++){var l=n[u*r+c];if(0!==l){if(u<i&&(i=u),u>s&&(s=u),32*c<o){for(var d=0;!(l<<31-d&4294967295);)d++;32*c+d<o&&(o=32*c+d)}if(32*c+31>a){for(d=31;l>>>d==0;)d--;32*c+d>a&&(a=32*c+d)}}}return a<o||s<i?null:Int32Array.from([o,i,a-o+1,s-i+1])},t.prototype.getTopLeftOnBit=function(){for(var t=this.rowSize,e=this.bits,r=0;r<e.length&&0===e[r];)r++;if(r===e.length)return null;for(var n=r/t,o=r%t*32,i=e[r],a=0;!(i<<31-a&4294967295);)a++;return o+=a,Int32Array.from([o,n])},t.prototype.getBottomRightOnBit=function(){for(var t=this.rowSize,e=this.bits,r=e.length-1;r>=0&&0===e[r];)r--;if(r<0)return null;for(var n=Math.floor(r/t),o=32*Math.floor(r%t),i=e[r],a=31;i>>>a==0;)a--;return o+=a,Int32Array.from([o,n])},t.prototype.getWidth=function(){return this.width},t.prototype.getHeight=function(){return this.height},t.prototype.getRowSize=function(){return this.rowSize},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.width===r.width&&this.height===r.height&&this.rowSize===r.rowSize&&xa.equals(this.bits,r.bits)},t.prototype.hashCode=function(){var t=this.width;return t=31*(t=31*(t=31*(t=31*t+this.width)+this.height)+this.rowSize)+xa.hashCode(this.bits)},t.prototype.toString=function(t,e,r){return void 0===t&&(t="X "),void 0===e&&(e=" "),void 0===r&&(r="\n"),this.buildToString(t,e,r)},t.prototype.buildToString=function(t,e,r){for(var n=new Za,o=0,i=this.height;o<i;o++){for(var a=0,s=this.width;a<s;a++)n.append(this.get(a,o)?t:e);n.append(r)}return n.toString()},t.prototype.clone=function(){return new t(this.width,this.height,this.rowSize,this.bits.slice())},t}(),Ka=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),$a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Ka(e,t),e.getNotFoundInstance=function(){return new e},e.kind="NotFoundException",e}(_a),Ja=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Qa=function(t){function e(r){var n=t.call(this,r)||this;return n.luminances=e.EMPTY,n.buckets=new Int32Array(e.LUMINANCE_BUCKETS),n}return Ja(e,t),e.prototype.getBlackRow=function(t,r){var n=this.getLuminanceSource(),o=n.getWidth();null==r||r.getSize()<o?r=new Ba(o):r.clear(),this.initArrays(o);for(var i=n.getRow(t,this.luminances),a=this.buckets,s=0;s<o;s++)a[(255&i[s])>>e.LUMINANCE_SHIFT]++;var u=e.estimateBlackPoint(a);if(o<3)for(s=0;s<o;s++)(255&i[s])<u&&r.set(s);else{var c=255&i[0],l=255&i[1];for(s=1;s<o-1;s++){var d=255&i[s+1];(4*l-c-d)/2<u&&r.set(s),c=l,l=d}}return r},e.prototype.getBlackMatrix=function(){var t=this.getLuminanceSource(),r=t.getWidth(),n=t.getHeight(),o=new qa(r,n);this.initArrays(r);for(var i=this.buckets,a=1;a<5;a++)for(var s=Math.floor(n*a/5),u=t.getRow(s,this.luminances),c=Math.floor(4*r/5),l=Math.floor(r/5);l<c;l++){i[(255&u[l])>>e.LUMINANCE_SHIFT]++}var d=e.estimateBlackPoint(i),h=t.getMatrix();for(a=0;a<n;a++){var f=a*r;for(l=0;l<r;l++){(255&h[f+l])<d&&o.set(l,a)}}return o},e.prototype.createBinarizer=function(t){return new e(t)},e.prototype.initArrays=function(t){this.luminances.length<t&&(this.luminances=new Uint8ClampedArray(t));for(var r=this.buckets,n=0;n<e.LUMINANCE_BUCKETS;n++)r[n]=0},e.estimateBlackPoint=function(t){for(var r=t.length,n=0,o=0,i=0,a=0;a<r;a++)t[a]>i&&(o=a,i=t[a]),t[a]>n&&(n=t[a]);var s=0,u=0;for(a=0;a<r;a++){var c=a-o;(f=t[a]*c*c)>u&&(s=a,u=f)}if(o>s){var l=o;o=s,s=l}if(s-o<=r/16)throw new $a;var d=s-1,h=-1;for(a=s-1;a>o;a--){var f,p=a-o;(f=p*p*(s-a)*(n-t[a]))>h&&(d=a,h=f)}return d<<e.LUMINANCE_SHIFT},e.LUMINANCE_BITS=5,e.LUMINANCE_SHIFT=8-e.LUMINANCE_BITS,e.LUMINANCE_BUCKETS=1<<e.LUMINANCE_BITS,e.EMPTY=Uint8ClampedArray.from([0]),e}(Ta),ts=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),es=function(t){function e(e){var r=t.call(this,e)||this;return r.matrix=null,r}return ts(e,t),e.prototype.getBlackMatrix=function(){if(null!==this.matrix)return this.matrix;var r=this.getLuminanceSource(),n=r.getWidth(),o=r.getHeight();if(n>=e.MINIMUM_DIMENSION&&o>=e.MINIMUM_DIMENSION){var i=r.getMatrix(),a=n>>e.BLOCK_SIZE_POWER;n&e.BLOCK_SIZE_MASK&&a++;var s=o>>e.BLOCK_SIZE_POWER;o&e.BLOCK_SIZE_MASK&&s++;var u=e.calculateBlackPoints(i,a,s,n,o),c=new qa(n,o);e.calculateThresholdForBlock(i,a,s,n,o,u,c),this.matrix=c}else this.matrix=t.prototype.getBlackMatrix.call(this);return this.matrix},e.prototype.createBinarizer=function(t){return new e(t)},e.calculateThresholdForBlock=function(t,r,n,o,i,a,s){for(var u=i-e.BLOCK_SIZE,c=o-e.BLOCK_SIZE,l=0;l<n;l++){var d=l<<e.BLOCK_SIZE_POWER;d>u&&(d=u);for(var h=e.cap(l,2,n-3),f=0;f<r;f++){var p=f<<e.BLOCK_SIZE_POWER;p>c&&(p=c);for(var g=e.cap(f,2,r-3),m=0,y=-2;y<=2;y++){var w=a[h+y];m+=w[g-2]+w[g-1]+w[g]+w[g+1]+w[g+2]}var _=m/25;e.thresholdBlock(t,p,d,_,o,s)}}},e.cap=function(t,e,r){return t<e?e:t>r?r:t},e.thresholdBlock=function(t,r,n,o,i,a){for(var s=0,u=n*i+r;s<e.BLOCK_SIZE;s++,u+=i)for(var c=0;c<e.BLOCK_SIZE;c++)(255&t[u+c])<=o&&a.set(r+c,n+s)},e.calculateBlackPoints=function(t,r,n,o,i){for(var a=i-e.BLOCK_SIZE,s=o-e.BLOCK_SIZE,u=new Array(n),c=0;c<n;c++){u[c]=new Int32Array(r);var l=c<<e.BLOCK_SIZE_POWER;l>a&&(l=a);for(var d=0;d<r;d++){var h=d<<e.BLOCK_SIZE_POWER;h>s&&(h=s);for(var f=0,p=255,g=0,m=0,y=l*o+h;m<e.BLOCK_SIZE;m++,y+=o){for(var w=0;w<e.BLOCK_SIZE;w++){var _=255&t[y+w];f+=_,_<p&&(p=_),_>g&&(g=_)}if(g-p>e.MIN_DYNAMIC_RANGE)for(m++,y+=o;m<e.BLOCK_SIZE;m++,y+=o)for(w=0;w<e.BLOCK_SIZE;w++)f+=255&t[y+w]}var v=f>>2*e.BLOCK_SIZE_POWER;if(g-p<=e.MIN_DYNAMIC_RANGE&&(v=p/2,c>0&&d>0)){var E=(u[c-1][d]+2*u[c][d-1]+u[c-1][d-1])/4;p<E&&(v=E)}u[c][d]=v}}return u},e.BLOCK_SIZE_POWER=3,e.BLOCK_SIZE=1<<e.BLOCK_SIZE_POWER,e.BLOCK_SIZE_MASK=e.BLOCK_SIZE-1,e.MINIMUM_DIMENSION=5*e.BLOCK_SIZE,e.MIN_DYNAMIC_RANGE=24,e}(Qa),rs=function(){function t(t,e){this.width=t,this.height=e}return t.prototype.getWidth=function(){return this.width},t.prototype.getHeight=function(){return this.height},t.prototype.isCropSupported=function(){return!1},t.prototype.crop=function(t,e,r,n){throw new Wa("This luminance source does not support cropping.")},t.prototype.isRotateSupported=function(){return!1},t.prototype.rotateCounterClockwise=function(){throw new Wa("This luminance source does not support rotation by 90 degrees.")},t.prototype.rotateCounterClockwise45=function(){throw new Wa("This luminance source does not support rotation by 45 degrees.")},t.prototype.toString=function(){for(var t=new Uint8ClampedArray(this.width),e=new Za,r=0;r<this.height;r++){for(var n=this.getRow(r,t),o=0;o<this.width;o++){var i=255&n[o],a=void 0;a=i<64?"#":i<128?"+":i<192?".":" ",e.append(a)}e.append("\n")}return e.toString()},t}(),ns=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),os=function(t){function e(e){var r=t.call(this,e.getWidth(),e.getHeight())||this;return r.delegate=e,r}return ns(e,t),e.prototype.getRow=function(t,e){for(var r=this.delegate.getRow(t,e),n=this.getWidth(),o=0;o<n;o++)r[o]=255-(255&r[o]);return r},e.prototype.getMatrix=function(){for(var t=this.delegate.getMatrix(),e=this.getWidth()*this.getHeight(),r=new Uint8ClampedArray(e),n=0;n<e;n++)r[n]=255-(255&t[n]);return r},e.prototype.isCropSupported=function(){return this.delegate.isCropSupported()},e.prototype.crop=function(t,r,n,o){return new e(this.delegate.crop(t,r,n,o))},e.prototype.isRotateSupported=function(){return this.delegate.isRotateSupported()},e.prototype.invert=function(){return this.delegate},e.prototype.rotateCounterClockwise=function(){return new e(this.delegate.rotateCounterClockwise())},e.prototype.rotateCounterClockwise45=function(){return new e(this.delegate.rotateCounterClockwise45())},e}(rs),is=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),as=function(t){function e(r,n){void 0===n&&(n=!1);var o=t.call(this,r.width,r.height)||this;return o.canvas=r,o.tempCanvasElement=null,o.buffer=e.makeBufferFromCanvasImageData(r,n),o}return is(e,t),e.makeBufferFromCanvasImageData=function(t,r){void 0===r&&(r=!1);var n=t.getContext("2d").getImageData(0,0,t.width,t.height);return e.toGrayscaleBuffer(n.data,t.width,t.height,r)},e.toGrayscaleBuffer=function(t,r,n,o){void 0===o&&(o=!1);var i=new Uint8ClampedArray(r*n);if(e.FRAME_INDEX=!e.FRAME_INDEX,e.FRAME_INDEX||!o)for(var a=0,s=0,u=t.length;a<u;a+=4,s++){var c=void 0;if(0===t[a+3])c=255;else c=306*t[a]+601*t[a+1]+117*t[a+2]+512>>10;i[s]=c}else{a=0,s=0;for(var l=t.length;a<l;a+=4,s++){c=void 0;if(0===t[a+3])c=255;else c=306*t[a]+601*t[a+1]+117*t[a+2]+512>>10;i[s]=255-c}}return i},e.prototype.getRow=function(t,e){if(t<0||t>=this.getHeight())throw new Aa("Requested row is outside the image: "+t);var r=this.getWidth(),n=t*r;return null===e?e=this.buffer.slice(n,n+r):(e.length<r&&(e=new Uint8ClampedArray(r)),e.set(this.buffer.slice(n,n+r))),e},e.prototype.getMatrix=function(){return this.buffer},e.prototype.isCropSupported=function(){return!0},e.prototype.crop=function(e,r,n,o){return t.prototype.crop.call(this,e,r,n,o),this},e.prototype.isRotateSupported=function(){return!0},e.prototype.rotateCounterClockwise=function(){return this.rotate(-90),this},e.prototype.rotateCounterClockwise45=function(){return this.rotate(-45),this},e.prototype.getTempCanvasElement=function(){if(null===this.tempCanvasElement){var t=this.canvas.ownerDocument.createElement("canvas");t.width=this.canvas.width,t.height=this.canvas.height,this.tempCanvasElement=t}return this.tempCanvasElement},e.prototype.rotate=function(t){var r=this.getTempCanvasElement(),n=r.getContext("2d"),o=t*e.DEGREE_TO_RADIANS,i=this.canvas.width,a=this.canvas.height,s=Math.ceil(Math.abs(Math.cos(o))*i+Math.abs(Math.sin(o))*a),u=Math.ceil(Math.abs(Math.sin(o))*i+Math.abs(Math.cos(o))*a);return r.width=s,r.height=u,n.translate(s/2,u/2),n.rotate(o),n.drawImage(this.canvas,i/-2,a/-2),this.buffer=e.makeBufferFromCanvasImageData(r),this},e.prototype.invert=function(){return new os(this)},e.DEGREE_TO_RADIANS=Math.PI/180,e.FRAME_INDEX=!0,e}(rs),ss=function(){function t(t,e,r){this.deviceId=t,this.label=e,this.kind="videoinput",this.groupId=r||void 0}return t.prototype.toJSON=function(){return{kind:this.kind,groupId:this.groupId,deviceId:this.deviceId,label:this.label}},t}(),us=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{u(n.next(t))}catch(t){i(t)}}function s(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))},cs=function(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},ls=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},ds=function(){function t(t,e,r){void 0===e&&(e=500),this.reader=t,this.timeBetweenScansMillis=e,this._hints=r,this._stopContinuousDecode=!1,this._stopAsyncDecode=!1,this._timeBetweenDecodingAttempts=0}return Object.defineProperty(t.prototype,"hasNavigator",{get:function(){return"undefined"!=typeof navigator},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isMediaDevicesSuported",{get:function(){return this.hasNavigator&&!!navigator.mediaDevices},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"canEnumerateDevices",{get:function(){return!(!this.isMediaDevicesSuported||!navigator.mediaDevices.enumerateDevices)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"timeBetweenDecodingAttempts",{get:function(){return this._timeBetweenDecodingAttempts},set:function(t){this._timeBetweenDecodingAttempts=t<0?0:t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hints",{get:function(){return this._hints},set:function(t){this._hints=t||null},enumerable:!1,configurable:!0}),t.prototype.listVideoInputDevices=function(){return us(this,void 0,void 0,(function(){var t,e,r,n,o,i,a,s,u,c,l,d;return cs(this,(function(h){switch(h.label){case 0:if(!this.hasNavigator)throw new Error("Can't enumerate devices, navigator is not present.");if(!this.canEnumerateDevices)throw new Error("Can't enumerate devices, method not supported.");return[4,navigator.mediaDevices.enumerateDevices()];case 1:t=h.sent(),e=[];try{for(r=ls(t),n=r.next();!n.done;n=r.next())o=n.value,"videoinput"===(i="video"===o.kind?"videoinput":o.kind)&&(a=o.deviceId||o.id,s=o.label||"Video device "+(e.length+1),u=o.groupId,c={deviceId:a,label:s,kind:i,groupId:u},e.push(c))}catch(t){l={error:t}}finally{try{n&&!n.done&&(d=r.return)&&d.call(r)}finally{if(l)throw l.error}}return[2,e]}}))}))},t.prototype.getVideoInputDevices=function(){return us(this,void 0,void 0,(function(){return cs(this,(function(t){switch(t.label){case 0:return[4,this.listVideoInputDevices()];case 1:return[2,t.sent().map((function(t){return new ss(t.deviceId,t.label)}))]}}))}))},t.prototype.findDeviceById=function(t){return us(this,void 0,void 0,(function(){var e;return cs(this,(function(r){switch(r.label){case 0:return[4,this.listVideoInputDevices()];case 1:return(e=r.sent())?[2,e.find((function(e){return e.deviceId===t}))]:[2,null]}}))}))},t.prototype.decodeFromInputVideoDevice=function(t,e){return us(this,void 0,void 0,(function(){return cs(this,(function(r){switch(r.label){case 0:return[4,this.decodeOnceFromVideoDevice(t,e)];case 1:return[2,r.sent()]}}))}))},t.prototype.decodeOnceFromVideoDevice=function(t,e){return us(this,void 0,void 0,(function(){var r;return cs(this,(function(n){switch(n.label){case 0:return this.reset(),r={video:t?{deviceId:{exact:t}}:{facingMode:"environment"}},[4,this.decodeOnceFromConstraints(r,e)];case 1:return[2,n.sent()]}}))}))},t.prototype.decodeOnceFromConstraints=function(t,e){return us(this,void 0,void 0,(function(){var r;return cs(this,(function(n){switch(n.label){case 0:return[4,navigator.mediaDevices.getUserMedia(t)];case 1:return r=n.sent(),[4,this.decodeOnceFromStream(r,e)];case 2:return[2,n.sent()]}}))}))},t.prototype.decodeOnceFromStream=function(t,e){return us(this,void 0,void 0,(function(){var r;return cs(this,(function(n){switch(n.label){case 0:return this.reset(),[4,this.attachStreamToVideo(t,e)];case 1:return r=n.sent(),[4,this.decodeOnce(r)];case 2:return[2,n.sent()]}}))}))},t.prototype.decodeFromInputVideoDeviceContinuously=function(t,e,r){return us(this,void 0,void 0,(function(){return cs(this,(function(n){switch(n.label){case 0:return[4,this.decodeFromVideoDevice(t,e,r)];case 1:return[2,n.sent()]}}))}))},t.prototype.decodeFromVideoDevice=function(t,e,r){return us(this,void 0,void 0,(function(){var n;return cs(this,(function(o){switch(o.label){case 0:return n={video:t?{deviceId:{exact:t}}:{facingMode:"environment"}},[4,this.decodeFromConstraints(n,e,r)];case 1:return[2,o.sent()]}}))}))},t.prototype.decodeFromConstraints=function(t,e,r){return us(this,void 0,void 0,(function(){var n;return cs(this,(function(o){switch(o.label){case 0:return[4,navigator.mediaDevices.getUserMedia(t)];case 1:return n=o.sent(),[4,this.decodeFromStream(n,e,r)];case 2:return[2,o.sent()]}}))}))},t.prototype.decodeFromStream=function(t,e,r){return us(this,void 0,void 0,(function(){var n;return cs(this,(function(o){switch(o.label){case 0:return this.reset(),[4,this.attachStreamToVideo(t,e)];case 1:return n=o.sent(),[4,this.decodeContinuously(n,r)];case 2:return[2,o.sent()]}}))}))},t.prototype.stopAsyncDecode=function(){this._stopAsyncDecode=!0},t.prototype.stopContinuousDecode=function(){this._stopContinuousDecode=!0},t.prototype.attachStreamToVideo=function(t,e){return us(this,void 0,void 0,(function(){var r;return cs(this,(function(n){switch(n.label){case 0:return r=this.prepareVideoElement(e),this.addVideoSource(r,t),this.videoElement=r,this.stream=t,[4,this.playVideoOnLoadAsync(r)];case 1:return n.sent(),[2,r]}}))}))},t.prototype.playVideoOnLoadAsync=function(t){var e=this;return new Promise((function(r,n){return e.playVideoOnLoad(t,(function(){return r()}))}))},t.prototype.playVideoOnLoad=function(t,e){var r=this;this.videoEndedListener=function(){return r.stopStreams()},this.videoCanPlayListener=function(){return r.tryPlayVideo(t)},t.addEventListener("ended",this.videoEndedListener),t.addEventListener("canplay",this.videoCanPlayListener),t.addEventListener("playing",e),this.tryPlayVideo(t)},t.prototype.isVideoPlaying=function(t){return t.currentTime>0&&!t.paused&&!t.ended&&t.readyState>2},t.prototype.tryPlayVideo=function(t){return us(this,void 0,void 0,(function(){return cs(this,(function(e){switch(e.label){case 0:if(this.isVideoPlaying(t))return console.warn("Trying to play video that is already playing."),[2];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,t.play()];case 2:return e.sent(),[3,4];case 3:return e.sent(),console.warn("It was not possible to play the video."),[3,4];case 4:return[2]}}))}))},t.prototype.getMediaElement=function(t,e){var r=document.getElementById(t);if(!r)throw new Ea("element with id '"+t+"' not found");if(r.nodeName.toLowerCase()!==e.toLowerCase())throw new Ea("element with id '"+t+"' must be an "+e+" element");return r},t.prototype.decodeFromImage=function(t,e){if(!t&&!e)throw new Ea("either imageElement with a src set or an url must be provided");return e&&!t?this.decodeFromImageUrl(e):this.decodeFromImageElement(t)},t.prototype.decodeFromVideo=function(t,e){if(!t&&!e)throw new Ea("Either an element with a src set or an URL must be provided");return e&&!t?this.decodeFromVideoUrl(e):this.decodeFromVideoElement(t)},t.prototype.decodeFromVideoContinuously=function(t,e,r){if(void 0===t&&void 0===e)throw new Ea("Either an element with a src set or an URL must be provided");return e&&!t?this.decodeFromVideoUrlContinuously(e,r):this.decodeFromVideoElementContinuously(t,r)},t.prototype.decodeFromImageElement=function(t){if(!t)throw new Ea("An image element must be provided.");this.reset();var e=this.prepareImageElement(t);return this.imageElement=e,this.isImageLoaded(e)?this.decodeOnce(e,!1,!0):this._decodeOnLoadImage(e)},t.prototype.decodeFromVideoElement=function(t){var e=this._decodeFromVideoElementSetup(t);return this._decodeOnLoadVideo(e)},t.prototype.decodeFromVideoElementContinuously=function(t,e){var r=this._decodeFromVideoElementSetup(t);return this._decodeOnLoadVideoContinuously(r,e)},t.prototype._decodeFromVideoElementSetup=function(t){if(!t)throw new Ea("A video element must be provided.");this.reset();var e=this.prepareVideoElement(t);return this.videoElement=e,e},t.prototype.decodeFromImageUrl=function(t){if(!t)throw new Ea("An URL must be provided.");this.reset();var e=this.prepareImageElement();this.imageElement=e;var r=this._decodeOnLoadImage(e);return e.src=t,r},t.prototype.decodeFromVideoUrl=function(t){if(!t)throw new Ea("An URL must be provided.");this.reset();var e=this.prepareVideoElement(),r=this.decodeFromVideoElement(e);return e.src=t,r},t.prototype.decodeFromVideoUrlContinuously=function(t,e){if(!t)throw new Ea("An URL must be provided.");this.reset();var r=this.prepareVideoElement(),n=this.decodeFromVideoElementContinuously(r,e);return r.src=t,n},t.prototype._decodeOnLoadImage=function(t){var e=this;return new Promise((function(r,n){e.imageLoadedListener=function(){return e.decodeOnce(t,!1,!0).then(r,n)},t.addEventListener("load",e.imageLoadedListener)}))},t.prototype._decodeOnLoadVideo=function(t){return us(this,void 0,void 0,(function(){return cs(this,(function(e){switch(e.label){case 0:return[4,this.playVideoOnLoadAsync(t)];case 1:return e.sent(),[4,this.decodeOnce(t)];case 2:return[2,e.sent()]}}))}))},t.prototype._decodeOnLoadVideoContinuously=function(t,e){return us(this,void 0,void 0,(function(){return cs(this,(function(r){switch(r.label){case 0:return[4,this.playVideoOnLoadAsync(t)];case 1:return r.sent(),this.decodeContinuously(t,e),[2]}}))}))},t.prototype.isImageLoaded=function(t){return!!t.complete&&0!==t.naturalWidth},t.prototype.prepareImageElement=function(t){var e;return void 0===t&&((e=document.createElement("img")).width=200,e.height=200),"string"==typeof t&&(e=this.getMediaElement(t,"img")),t instanceof HTMLImageElement&&(e=t),e},t.prototype.prepareVideoElement=function(t){var e;return t||"undefined"==typeof document||((e=document.createElement("video")).width=200,e.height=200),"string"==typeof t&&(e=this.getMediaElement(t,"video")),t instanceof HTMLVideoElement&&(e=t),e.setAttribute("autoplay","true"),e.setAttribute("muted","true"),e.setAttribute("playsinline","true"),e},t.prototype.decodeOnce=function(t,e,r){var n=this;void 0===e&&(e=!0),void 0===r&&(r=!0),this._stopAsyncDecode=!1;var o=function(i,a){if(n._stopAsyncDecode)return a(new $a("Video stream has ended before any code could be detected.")),void(n._stopAsyncDecode=void 0);try{i(n.decode(t))}catch(t){if(e&&t instanceof $a||(t instanceof Sa||t instanceof Ua)&&r)return setTimeout(o,n._timeBetweenDecodingAttempts,i,a);a(t)}};return new Promise((function(t,e){return o(t,e)}))},t.prototype.decodeContinuously=function(t,e){var r=this;this._stopContinuousDecode=!1;var n=function(){if(r._stopContinuousDecode)r._stopContinuousDecode=void 0;else try{var o=r.decode(t);e(o,null),setTimeout(n,r.timeBetweenScansMillis)}catch(t){e(null,t),(t instanceof Sa||t instanceof Ua||t instanceof $a)&&setTimeout(n,r._timeBetweenDecodingAttempts)}};n()},t.prototype.decode=function(t){var e=this.createBinaryBitmap(t);return this.decodeBitmap(e)},t.prototype.createBinaryBitmap=function(t){this.getCaptureCanvasContext(t);var e=!1;t instanceof HTMLVideoElement?(this.drawFrameOnCanvas(t),e=!0):this.drawImageOnCanvas(t);var r=this.getCaptureCanvas(t),n=new as(r,e),o=new es(n);return new Ca(o)},t.prototype.getCaptureCanvasContext=function(t){if(!this.captureCanvasContext){var e=this.getCaptureCanvas(t),r=void 0;try{r=e.getContext("2d",{willReadFrequently:!0})}catch(t){r=e.getContext("2d")}this.captureCanvasContext=r}return this.captureCanvasContext},t.prototype.getCaptureCanvas=function(t){if(!this.captureCanvas){var e=this.createCaptureCanvas(t);this.captureCanvas=e}return this.captureCanvas},t.prototype.drawFrameOnCanvas=function(t,e,r){void 0===e&&(e={sx:0,sy:0,sWidth:t.videoWidth,sHeight:t.videoHeight,dx:0,dy:0,dWidth:t.videoWidth,dHeight:t.videoHeight}),void 0===r&&(r=this.captureCanvasContext),r.drawImage(t,e.sx,e.sy,e.sWidth,e.sHeight,e.dx,e.dy,e.dWidth,e.dHeight)},t.prototype.drawImageOnCanvas=function(t,e,r){void 0===e&&(e={sx:0,sy:0,sWidth:t.naturalWidth,sHeight:t.naturalHeight,dx:0,dy:0,dWidth:t.naturalWidth,dHeight:t.naturalHeight}),void 0===r&&(r=this.captureCanvasContext),r.drawImage(t,e.sx,e.sy,e.sWidth,e.sHeight,e.dx,e.dy,e.dWidth,e.dHeight)},t.prototype.decodeBitmap=function(t){return this.reader.decode(t,this._hints)},t.prototype.createCaptureCanvas=function(t){if("undefined"==typeof document)return this._destroyCaptureCanvas(),null;var e,r,n=document.createElement("canvas");return void 0!==t&&(t instanceof HTMLVideoElement?(e=t.videoWidth,r=t.videoHeight):t instanceof HTMLImageElement&&(e=t.naturalWidth||t.width,r=t.naturalHeight||t.height)),n.style.width=e+"px",n.style.height=r+"px",n.width=e,n.height=r,n},t.prototype.stopStreams=function(){this.stream&&(this.stream.getVideoTracks().forEach((function(t){return t.stop()})),this.stream=void 0),!1===this._stopAsyncDecode&&this.stopAsyncDecode(),!1===this._stopContinuousDecode&&this.stopContinuousDecode()},t.prototype.reset=function(){this.stopStreams(),this._destroyVideoElement(),this._destroyImageElement(),this._destroyCaptureCanvas()},t.prototype._destroyVideoElement=function(){this.videoElement&&(void 0!==this.videoEndedListener&&this.videoElement.removeEventListener("ended",this.videoEndedListener),void 0!==this.videoPlayingEventListener&&this.videoElement.removeEventListener("playing",this.videoPlayingEventListener),void 0!==this.videoCanPlayListener&&this.videoElement.removeEventListener("loadedmetadata",this.videoCanPlayListener),this.cleanVideoSource(this.videoElement),this.videoElement=void 0)},t.prototype._destroyImageElement=function(){this.imageElement&&(void 0!==this.imageLoadedListener&&this.imageElement.removeEventListener("load",this.imageLoadedListener),this.imageElement.src=void 0,this.imageElement.removeAttribute("src"),this.imageElement=void 0)},t.prototype._destroyCaptureCanvas=function(){this.captureCanvasContext=void 0,this.captureCanvas=void 0},t.prototype.addVideoSource=function(t,e){try{t.srcObject=e}catch(r){t.src=URL.createObjectURL(e)}},t.prototype.cleanVideoSource=function(t){try{t.srcObject=null}catch(e){t.src=""}this.videoElement.removeAttribute("src")},t}(),hs=function(){function t(t,e,r,n,o,i){void 0===r&&(r=null==e?0:8*e.length),void 0===i&&(i=Da.currentTimeMillis()),this.text=t,this.rawBytes=e,this.numBits=r,this.resultPoints=n,this.format=o,this.timestamp=i,this.text=t,this.rawBytes=e,this.numBits=null==r?null==e?0:8*e.length:r,this.resultPoints=n,this.format=o,this.resultMetadata=null,this.timestamp=null==i?Da.currentTimeMillis():i}return t.prototype.getText=function(){return this.text},t.prototype.getRawBytes=function(){return this.rawBytes},t.prototype.getNumBits=function(){return this.numBits},t.prototype.getResultPoints=function(){return this.resultPoints},t.prototype.getBarcodeFormat=function(){return this.format},t.prototype.getResultMetadata=function(){return this.resultMetadata},t.prototype.putMetadata=function(t,e){null===this.resultMetadata&&(this.resultMetadata=new Map),this.resultMetadata.set(t,e)},t.prototype.putAllMetadata=function(t){null!==t&&(null===this.resultMetadata?this.resultMetadata=t:this.resultMetadata=new Map(t))},t.prototype.addResultPoints=function(t){var e=this.resultPoints;if(null===e)this.resultPoints=t;else if(null!==t&&t.length>0){var r=new Array(e.length+t.length);Da.arraycopy(e,0,r,0,e.length),Da.arraycopy(t,0,r,e.length,t.length),this.resultPoints=r}},t.prototype.getTimestamp=function(){return this.timestamp},t.prototype.toString=function(){return this.text},t}();!function(t){t[t.AZTEC=0]="AZTEC",t[t.CODABAR=1]="CODABAR",t[t.CODE_39=2]="CODE_39",t[t.CODE_93=3]="CODE_93",t[t.CODE_128=4]="CODE_128",t[t.DATA_MATRIX=5]="DATA_MATRIX",t[t.EAN_8=6]="EAN_8",t[t.EAN_13=7]="EAN_13",t[t.ITF=8]="ITF",t[t.MAXICODE=9]="MAXICODE",t[t.PDF_417=10]="PDF_417",t[t.QR_CODE=11]="QR_CODE",t[t.RSS_14=12]="RSS_14",t[t.RSS_EXPANDED=13]="RSS_EXPANDED",t[t.UPC_A=14]="UPC_A",t[t.UPC_E=15]="UPC_E",t[t.UPC_EAN_EXTENSION=16]="UPC_EAN_EXTENSION"}(Ha||(Ha={}));var fs,ps=Ha;!function(t){t[t.OTHER=0]="OTHER",t[t.ORIENTATION=1]="ORIENTATION",t[t.BYTE_SEGMENTS=2]="BYTE_SEGMENTS",t[t.ERROR_CORRECTION_LEVEL=3]="ERROR_CORRECTION_LEVEL",t[t.ISSUE_NUMBER=4]="ISSUE_NUMBER",t[t.SUGGESTED_PRICE=5]="SUGGESTED_PRICE",t[t.POSSIBLE_COUNTRY=6]="POSSIBLE_COUNTRY",t[t.UPC_EAN_EXTENSION=7]="UPC_EAN_EXTENSION",t[t.PDF417_EXTRA_METADATA=8]="PDF417_EXTRA_METADATA",t[t.STRUCTURED_APPEND_SEQUENCE=9]="STRUCTURED_APPEND_SEQUENCE",t[t.STRUCTURED_APPEND_PARITY=10]="STRUCTURED_APPEND_PARITY"}(fs||(fs={}));var gs,ms=fs,ys=function(){function t(t,e,r,n,o,i){void 0===o&&(o=-1),void 0===i&&(i=-1),this.rawBytes=t,this.text=e,this.byteSegments=r,this.ecLevel=n,this.structuredAppendSequenceNumber=o,this.structuredAppendParity=i,this.numBits=null==t?0:8*t.length}return t.prototype.getRawBytes=function(){return this.rawBytes},t.prototype.getNumBits=function(){return this.numBits},t.prototype.setNumBits=function(t){this.numBits=t},t.prototype.getText=function(){return this.text},t.prototype.getByteSegments=function(){return this.byteSegments},t.prototype.getECLevel=function(){return this.ecLevel},t.prototype.getErrorsCorrected=function(){return this.errorsCorrected},t.prototype.setErrorsCorrected=function(t){this.errorsCorrected=t},t.prototype.getErasures=function(){return this.erasures},t.prototype.setErasures=function(t){this.erasures=t},t.prototype.getOther=function(){return this.other},t.prototype.setOther=function(t){this.other=t},t.prototype.hasStructuredAppend=function(){return this.structuredAppendParity>=0&&this.structuredAppendSequenceNumber>=0},t.prototype.getStructuredAppendParity=function(){return this.structuredAppendParity},t.prototype.getStructuredAppendSequenceNumber=function(){return this.structuredAppendSequenceNumber},t}(),ws=function(){function t(){}return t.prototype.exp=function(t){return this.expTable[t]},t.prototype.log=function(t){if(0===t)throw new Aa;return this.logTable[t]},t.addOrSubtract=function(t,e){return t^e},t}(),_s=function(){function t(t,e){if(0===e.length)throw new Aa;this.field=t;var r=e.length;if(r>1&&0===e[0]){for(var n=1;n<r&&0===e[n];)n++;n===r?this.coefficients=Int32Array.from([0]):(this.coefficients=new Int32Array(r-n),Da.arraycopy(e,n,this.coefficients,0,this.coefficients.length))}else this.coefficients=e}return t.prototype.getCoefficients=function(){return this.coefficients},t.prototype.getDegree=function(){return this.coefficients.length-1},t.prototype.isZero=function(){return 0===this.coefficients[0]},t.prototype.getCoefficient=function(t){return this.coefficients[this.coefficients.length-1-t]},t.prototype.evaluateAt=function(t){if(0===t)return this.getCoefficient(0);var e,r=this.coefficients;if(1===t){e=0;for(var n=0,o=r.length;n!==o;n++){var i=r[n];e=ws.addOrSubtract(e,i)}return e}e=r[0];var a=r.length,s=this.field;for(n=1;n<a;n++)e=ws.addOrSubtract(s.multiply(t,e),r[n]);return e},t.prototype.addOrSubtract=function(e){if(!this.field.equals(e.field))throw new Aa("GenericGFPolys do not have same GenericGF field");if(this.isZero())return e;if(e.isZero())return this;var r=this.coefficients,n=e.coefficients;if(r.length>n.length){var o=r;r=n,n=o}var i=new Int32Array(n.length),a=n.length-r.length;Da.arraycopy(n,0,i,0,a);for(var s=a;s<n.length;s++)i[s]=ws.addOrSubtract(r[s-a],n[s]);return new t(this.field,i)},t.prototype.multiply=function(e){if(!this.field.equals(e.field))throw new Aa("GenericGFPolys do not have same GenericGF field");if(this.isZero()||e.isZero())return this.field.getZero();for(var r=this.coefficients,n=r.length,o=e.coefficients,i=o.length,a=new Int32Array(n+i-1),s=this.field,u=0;u<n;u++)for(var c=r[u],l=0;l<i;l++)a[u+l]=ws.addOrSubtract(a[u+l],s.multiply(c,o[l]));return new t(s,a)},t.prototype.multiplyScalar=function(e){if(0===e)return this.field.getZero();if(1===e)return this;for(var r=this.coefficients.length,n=this.field,o=new Int32Array(r),i=this.coefficients,a=0;a<r;a++)o[a]=n.multiply(i[a],e);return new t(n,o)},t.prototype.multiplyByMonomial=function(e,r){if(e<0)throw new Aa;if(0===r)return this.field.getZero();for(var n=this.coefficients,o=n.length,i=new Int32Array(o+e),a=this.field,s=0;s<o;s++)i[s]=a.multiply(n[s],r);return new t(a,i)},t.prototype.divide=function(t){if(!this.field.equals(t.field))throw new Aa("GenericGFPolys do not have same GenericGF field");if(t.isZero())throw new Aa("Divide by 0");for(var e=this.field,r=e.getZero(),n=this,o=t.getCoefficient(t.getDegree()),i=e.inverse(o);n.getDegree()>=t.getDegree()&&!n.isZero();){var a=n.getDegree()-t.getDegree(),s=e.multiply(n.getCoefficient(n.getDegree()),i),u=t.multiplyByMonomial(a,s),c=e.buildMonomial(a,s);r=r.addOrSubtract(c),n=n.addOrSubtract(u)}return[r,n]},t.prototype.toString=function(){for(var t="",e=this.getDegree();e>=0;e--){var r=this.getCoefficient(e);if(0!==r){if(r<0?(t+=" - ",r=-r):t.length>0&&(t+=" + "),0===e||1!==r){var n=this.field.log(r);0===n?t+="1":1===n?t+="a":(t+="a^",t+=n)}0!==e&&(1===e?t+="x":(t+="x^",t+=e))}}return t},t}(),vs=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Es=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return vs(e,t),e.kind="ArithmeticException",e}(_a),bs=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),As=function(t){function e(e,r,n){var o=t.call(this)||this;o.primitive=e,o.size=r,o.generatorBase=n;for(var i=new Int32Array(r),a=1,s=0;s<r;s++)i[s]=a,(a*=2)>=r&&(a^=e,a&=r-1);o.expTable=i;var u=new Int32Array(r);for(s=0;s<r-1;s++)u[i[s]]=s;return o.logTable=u,o.zero=new _s(o,Int32Array.from([0])),o.one=new _s(o,Int32Array.from([1])),o}return bs(e,t),e.prototype.getZero=function(){return this.zero},e.prototype.getOne=function(){return this.one},e.prototype.buildMonomial=function(t,e){if(t<0)throw new Aa;if(0===e)return this.zero;var r=new Int32Array(t+1);return r[0]=e,new _s(this,r)},e.prototype.inverse=function(t){if(0===t)throw new Es;return this.expTable[this.size-this.logTable[t]-1]},e.prototype.multiply=function(t,e){return 0===t||0===e?0:this.expTable[(this.logTable[t]+this.logTable[e])%(this.size-1)]},e.prototype.getSize=function(){return this.size},e.prototype.getGeneratorBase=function(){return this.generatorBase},e.prototype.toString=function(){return"GF(0x"+Pa.toHexString(this.primitive)+","+this.size+")"},e.prototype.equals=function(t){return t===this},e.AZTEC_DATA_12=new e(4201,4096,1),e.AZTEC_DATA_10=new e(1033,1024,1),e.AZTEC_DATA_6=new e(67,64,1),e.AZTEC_PARAM=new e(19,16,1),e.QR_CODE_FIELD_256=new e(285,256,0),e.DATA_MATRIX_FIELD_256=new e(301,256,1),e.AZTEC_DATA_8=e.DATA_MATRIX_FIELD_256,e.MAXICODE_FIELD_64=e.AZTEC_DATA_6,e}(ws),Cs=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Is=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Cs(e,t),e.kind="ReedSolomonException",e}(_a),Ss=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ts=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Ss(e,t),e.kind="IllegalStateException",e}(_a),Ds=function(){function t(t){this.field=t}return t.prototype.decode=function(t,e){for(var r=this.field,n=new _s(r,t),o=new Int32Array(e),i=!0,a=0;a<e;a++){var s=n.evaluateAt(r.exp(a+r.getGeneratorBase()));o[o.length-1-a]=s,0!==s&&(i=!1)}if(!i){var u=new _s(r,o),c=this.runEuclideanAlgorithm(r.buildMonomial(e,1),u,e),l=c[0],d=c[1],h=this.findErrorLocations(l),f=this.findErrorMagnitudes(d,h);for(a=0;a<h.length;a++){var p=t.length-1-r.log(h[a]);if(p<0)throw new Is("Bad error location");t[p]=As.addOrSubtract(t[p],f[a])}}},t.prototype.runEuclideanAlgorithm=function(t,e,r){if(t.getDegree()<e.getDegree()){var n=t;t=e,e=n}for(var o=this.field,i=t,a=e,s=o.getZero(),u=o.getOne();a.getDegree()>=(r/2|0);){var c=i,l=s;if(s=u,(i=a).isZero())throw new Is("r_{i-1} was zero");a=c;for(var d=o.getZero(),h=i.getCoefficient(i.getDegree()),f=o.inverse(h);a.getDegree()>=i.getDegree()&&!a.isZero();){var p=a.getDegree()-i.getDegree(),g=o.multiply(a.getCoefficient(a.getDegree()),f);d=d.addOrSubtract(o.buildMonomial(p,g)),a=a.addOrSubtract(i.multiplyByMonomial(p,g))}if(u=d.multiply(s).addOrSubtract(l),a.getDegree()>=i.getDegree())throw new Ts("Division algorithm failed to reduce polynomial?")}var m=u.getCoefficient(0);if(0===m)throw new Is("sigmaTilde(0) was zero");var y=o.inverse(m);return[u.multiplyScalar(y),a.multiplyScalar(y)]},t.prototype.findErrorLocations=function(t){var e=t.getDegree();if(1===e)return Int32Array.from([t.getCoefficient(1)]);for(var r=new Int32Array(e),n=0,o=this.field,i=1;i<o.getSize()&&n<e;i++)0===t.evaluateAt(i)&&(r[n]=o.inverse(i),n++);if(n!==e)throw new Is("Error locator degree does not match number of roots");return r},t.prototype.findErrorMagnitudes=function(t,e){for(var r=e.length,n=new Int32Array(r),o=this.field,i=0;i<r;i++){for(var a=o.inverse(e[i]),s=1,u=0;u<r;u++)if(i!==u){var c=o.multiply(e[u],a),l=1&c?-2&c:1|c;s=o.multiply(s,l)}n[i]=o.multiply(t.evaluateAt(a),o.inverse(s)),0!==o.getGeneratorBase()&&(n[i]=o.multiply(n[i],a))}return n},t}();!function(t){t[t.UPPER=0]="UPPER",t[t.LOWER=1]="LOWER",t[t.MIXED=2]="MIXED",t[t.DIGIT=3]="DIGIT",t[t.PUNCT=4]="PUNCT",t[t.BINARY=5]="BINARY"}(gs||(gs={}));var Os=function(){function t(){}return t.prototype.decode=function(e){this.ddata=e;var r=e.getBits(),n=this.extractBits(r),o=this.correctBits(n),i=t.convertBoolArrayToByteArray(o),a=t.getEncodedData(o),s=new ys(i,a,null,null);return s.setNumBits(o.length),s},t.highLevelDecode=function(t){return this.getEncodedData(t)},t.getEncodedData=function(e){for(var r=e.length,n=gs.UPPER,o=gs.UPPER,i="",a=0;a<r;)if(o===gs.BINARY){if(r-a<5)break;var s=t.readCode(e,a,5);if(a+=5,0===s){if(r-a<11)break;s=t.readCode(e,a,11)+31,a+=11}for(var u=0;u<s;u++){if(r-a<8){a=r;break}var c=t.readCode(e,a,8);i+=Ya.castAsNonUtf8Char(c),a+=8}o=n}else{var l=o===gs.DIGIT?4:5;if(r-a<l)break;c=t.readCode(e,a,l);a+=l;var d=t.getCharacter(o,c);d.startsWith("CTRL_")?(n=o,o=t.getTable(d.charAt(5)),"L"===d.charAt(6)&&(n=o)):(i+=d,o=n)}return i},t.getTable=function(t){switch(t){case"L":return gs.LOWER;case"P":return gs.PUNCT;case"M":return gs.MIXED;case"D":return gs.DIGIT;case"B":return gs.BINARY;default:return gs.UPPER}},t.getCharacter=function(e,r){switch(e){case gs.UPPER:return t.UPPER_TABLE[r];case gs.LOWER:return t.LOWER_TABLE[r];case gs.MIXED:return t.MIXED_TABLE[r];case gs.PUNCT:return t.PUNCT_TABLE[r];case gs.DIGIT:return t.DIGIT_TABLE[r];default:throw new Ts("Bad table")}},t.prototype.correctBits=function(e){var r,n;this.ddata.getNbLayers()<=2?(n=6,r=As.AZTEC_DATA_6):this.ddata.getNbLayers()<=8?(n=8,r=As.AZTEC_DATA_8):this.ddata.getNbLayers()<=22?(n=10,r=As.AZTEC_DATA_10):(n=12,r=As.AZTEC_DATA_12);var o=this.ddata.getNbDatablocks(),i=e.length/n;if(i<o)throw new Ua;for(var a=e.length%n,s=new Int32Array(i),u=0;u<i;u++,a+=n)s[u]=t.readCode(e,a,n);try{new Ds(r).decode(s,i-o)}catch(t){throw new Ua(t)}var c=(1<<n)-1,l=0;for(u=0;u<o;u++){if(0===(f=s[u])||f===c)throw new Ua;1!==f&&f!==c-1||l++}var d=new Array(o*n-l),h=0;for(u=0;u<o;u++){var f;if(1===(f=s[u])||f===c-1)d.fill(f>1,h,h+n-1),h+=n-1;else for(var p=n-1;p>=0;--p)d[h++]=!!(f&1<<p)}return d},t.prototype.extractBits=function(t){var e=this.ddata.isCompact(),r=this.ddata.getNbLayers(),n=(e?11:14)+4*r,o=new Int32Array(n),i=new Array(this.totalBitsInLayer(r,e));if(e)for(var a=0;a<o.length;a++)o[a]=a;else{var s=n+1+2*Pa.truncDivision(Pa.truncDivision(n,2)-1,15),u=n/2,c=Pa.truncDivision(s,2);for(a=0;a<u;a++){var l=a+Pa.truncDivision(a,15);o[u-a-1]=c-l-1,o[u+a]=c+l+1}}a=0;for(var d=0;a<r;a++){for(var h=4*(r-a)+(e?9:12),f=2*a,p=n-1-f,g=0;g<h;g++)for(var m=2*g,y=0;y<2;y++)i[d+m+y]=t.get(o[f+y],o[f+g]),i[d+2*h+m+y]=t.get(o[f+g],o[p-y]),i[d+4*h+m+y]=t.get(o[p-y],o[p-g]),i[d+6*h+m+y]=t.get(o[p-g],o[f+y]);d+=8*h}return i},t.readCode=function(t,e,r){for(var n=0,o=e;o<e+r;o++)n<<=1,t[o]&&(n|=1);return n},t.readByte=function(e,r){var n=e.length-r;return n>=8?t.readCode(e,r,8):t.readCode(e,r,n)<<8-n},t.convertBoolArrayToByteArray=function(e){for(var r=new Uint8Array((e.length+7)/8),n=0;n<r.length;n++)r[n]=t.readByte(e,8*n);return r},t.prototype.totalBitsInLayer=function(t,e){return((e?88:112)+16*t)*t},t.UPPER_TABLE=["CTRL_PS"," ","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","CTRL_LL","CTRL_ML","CTRL_DL","CTRL_BS"],t.LOWER_TABLE=["CTRL_PS"," ","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","CTRL_US","CTRL_ML","CTRL_DL","CTRL_BS"],t.MIXED_TABLE=["CTRL_PS"," ","","","","","","","","\b","\t","\n","\v","\f","\r","","","","","","@","\\","^","_","`","|","~","","CTRL_LL","CTRL_UL","CTRL_PL","CTRL_BS"],t.PUNCT_TABLE=["","\r","\r\n",". ",", ",": ","!",'"',"#","$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","?","[","]","{","}","CTRL_UL"],t.DIGIT_TABLE=["CTRL_PS"," ","0","1","2","3","4","5","6","7","8","9",",",".","CTRL_UL","CTRL_US"],t}(),Rs=function(){function t(){}return t.round=function(t){return isNaN(t)?0:t<=Number.MIN_SAFE_INTEGER?Number.MIN_SAFE_INTEGER:t>=Number.MAX_SAFE_INTEGER?Number.MAX_SAFE_INTEGER:t+(t<0?-.5:.5)|0},t.distance=function(t,e,r,n){var o=t-r,i=e-n;return Math.sqrt(o*o+i*i)},t.sum=function(t){for(var e=0,r=0,n=t.length;r!==n;r++){e+=t[r]}return e},t}(),Ms=function(){function t(){}return t.floatToIntBits=function(t){return t},t.MAX_VALUE=Number.MAX_SAFE_INTEGER,t}(),Ns=function(){function t(t,e){this.x=t,this.y=e}return t.prototype.getX=function(){return this.x},t.prototype.getY=function(){return this.y},t.prototype.equals=function(e){if(e instanceof t){var r=e;return this.x===r.x&&this.y===r.y}return!1},t.prototype.hashCode=function(){return 31*Ms.floatToIntBits(this.x)+Ms.floatToIntBits(this.y)},t.prototype.toString=function(){return"("+this.x+","+this.y+")"},t.orderBestPatterns=function(t){var e,r,n,o=this.distance(t[0],t[1]),i=this.distance(t[1],t[2]),a=this.distance(t[0],t[2]);if(i>=o&&i>=a?(r=t[0],e=t[1],n=t[2]):a>=i&&a>=o?(r=t[1],e=t[0],n=t[2]):(r=t[2],e=t[0],n=t[1]),this.crossProductZ(e,r,n)<0){var s=e;e=n,n=s}t[0]=e,t[1]=r,t[2]=n},t.distance=function(t,e){return Rs.distance(t.x,t.y,e.x,e.y)},t.crossProductZ=function(t,e,r){var n=e.x,o=e.y;return(r.x-n)*(t.y-o)-(r.y-o)*(t.x-n)},t}(),ks=function(){function t(t,e){this.bits=t,this.points=e}return t.prototype.getBits=function(){return this.bits},t.prototype.getPoints=function(){return this.points},t}(),xs=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ps=function(t){function e(e,r,n,o,i){var a=t.call(this,e,r)||this;return a.compact=n,a.nbDatablocks=o,a.nbLayers=i,a}return xs(e,t),e.prototype.getNbLayers=function(){return this.nbLayers},e.prototype.getNbDatablocks=function(){return this.nbDatablocks},e.prototype.isCompact=function(){return this.compact},e}(ks),Bs=function(){function t(e,r,n,o){this.image=e,this.height=e.getHeight(),this.width=e.getWidth(),null==r&&(r=t.INIT_SIZE),null==n&&(n=e.getWidth()/2|0),null==o&&(o=e.getHeight()/2|0);var i=r/2|0;if(this.leftInit=n-i,this.rightInit=n+i,this.upInit=o-i,this.downInit=o+i,this.upInit<0||this.leftInit<0||this.downInit>=this.height||this.rightInit>=this.width)throw new $a}return t.prototype.detect=function(){for(var t=this.leftInit,e=this.rightInit,r=this.upInit,n=this.downInit,o=!1,i=!0,a=!1,s=!1,u=!1,c=!1,l=!1,d=this.width,h=this.height;i;){i=!1;for(var f=!0;(f||!s)&&e<d;)(f=this.containsBlackPoint(r,n,e,!1))?(e++,i=!0,s=!0):s||e++;if(e>=d){o=!0;break}for(var p=!0;(p||!u)&&n<h;)(p=this.containsBlackPoint(t,e,n,!0))?(n++,i=!0,u=!0):u||n++;if(n>=h){o=!0;break}for(var g=!0;(g||!c)&&t>=0;)(g=this.containsBlackPoint(r,n,t,!1))?(t--,i=!0,c=!0):c||t--;if(t<0){o=!0;break}for(var m=!0;(m||!l)&&r>=0;)(m=this.containsBlackPoint(t,e,r,!0))?(r--,i=!0,l=!0):l||r--;if(r<0){o=!0;break}i&&(a=!0)}if(!o&&a){for(var y=e-t,w=null,_=1;null===w&&_<y;_++)w=this.getBlackPointOnSegment(t,n-_,t+_,n);if(null==w)throw new $a;var v=null;for(_=1;null===v&&_<y;_++)v=this.getBlackPointOnSegment(t,r+_,t+_,r);if(null==v)throw new $a;var E=null;for(_=1;null===E&&_<y;_++)E=this.getBlackPointOnSegment(e,r+_,e-_,r);if(null==E)throw new $a;var b=null;for(_=1;null===b&&_<y;_++)b=this.getBlackPointOnSegment(e,n-_,e-_,n);if(null==b)throw new $a;return this.centerEdges(b,w,E,v)}throw new $a},t.prototype.getBlackPointOnSegment=function(t,e,r,n){for(var o=Rs.round(Rs.distance(t,e,r,n)),i=(r-t)/o,a=(n-e)/o,s=this.image,u=0;u<o;u++){var c=Rs.round(t+u*i),l=Rs.round(e+u*a);if(s.get(c,l))return new Ns(c,l)}return null},t.prototype.centerEdges=function(e,r,n,o){var i=e.getX(),a=e.getY(),s=r.getX(),u=r.getY(),c=n.getX(),l=n.getY(),d=o.getX(),h=o.getY(),f=t.CORR;return i<this.width/2?[new Ns(d-f,h+f),new Ns(s+f,u+f),new Ns(c-f,l-f),new Ns(i+f,a-f)]:[new Ns(d+f,h+f),new Ns(s+f,u-f),new Ns(c-f,l+f),new Ns(i-f,a-f)]},t.prototype.containsBlackPoint=function(t,e,r,n){var o=this.image;if(n){for(var i=t;i<=e;i++)if(o.get(i,r))return!0}else for(var a=t;a<=e;a++)if(o.get(r,a))return!0;return!1},t.INIT_SIZE=10,t.CORR=1,t}(),Fs=function(){function t(){}return t.checkAndNudgePoints=function(t,e){for(var r=t.getWidth(),n=t.getHeight(),o=!0,i=0;i<e.length&&o;i+=2){var a=Math.floor(e[i]),s=Math.floor(e[i+1]);if(a<-1||a>r||s<-1||s>n)throw new $a;o=!1,-1===a?(e[i]=0,o=!0):a===r&&(e[i]=r-1,o=!0),-1===s?(e[i+1]=0,o=!0):s===n&&(e[i+1]=n-1,o=!0)}o=!0;for(i=e.length-2;i>=0&&o;i-=2){a=Math.floor(e[i]),s=Math.floor(e[i+1]);if(a<-1||a>r||s<-1||s>n)throw new $a;o=!1,-1===a?(e[i]=0,o=!0):a===r&&(e[i]=r-1,o=!0),-1===s?(e[i+1]=0,o=!0):s===n&&(e[i+1]=n-1,o=!0)}},t}(),Ls=function(){function t(t,e,r,n,o,i,a,s,u){this.a11=t,this.a21=e,this.a31=r,this.a12=n,this.a22=o,this.a32=i,this.a13=a,this.a23=s,this.a33=u}return t.quadrilateralToQuadrilateral=function(e,r,n,o,i,a,s,u,c,l,d,h,f,p,g,m){var y=t.quadrilateralToSquare(e,r,n,o,i,a,s,u);return t.squareToQuadrilateral(c,l,d,h,f,p,g,m).times(y)},t.prototype.transformPoints=function(t){for(var e=t.length,r=this.a11,n=this.a12,o=this.a13,i=this.a21,a=this.a22,s=this.a23,u=this.a31,c=this.a32,l=this.a33,d=0;d<e;d+=2){var h=t[d],f=t[d+1],p=o*h+s*f+l;t[d]=(r*h+i*f+u)/p,t[d+1]=(n*h+a*f+c)/p}},t.prototype.transformPointsWithValues=function(t,e){for(var r=this.a11,n=this.a12,o=this.a13,i=this.a21,a=this.a22,s=this.a23,u=this.a31,c=this.a32,l=this.a33,d=t.length,h=0;h<d;h++){var f=t[h],p=e[h],g=o*f+s*p+l;t[h]=(r*f+i*p+u)/g,e[h]=(n*f+a*p+c)/g}},t.squareToQuadrilateral=function(e,r,n,o,i,a,s,u){var c=e-n+i-s,l=r-o+a-u;if(0===c&&0===l)return new t(n-e,i-n,e,o-r,a-o,r,0,0,1);var d=n-i,h=s-i,f=o-a,p=u-a,g=d*p-h*f,m=(c*p-h*l)/g,y=(d*l-c*f)/g;return new t(n-e+m*n,s-e+y*s,e,o-r+m*o,u-r+y*u,r,m,y,1)},t.quadrilateralToSquare=function(e,r,n,o,i,a,s,u){return t.squareToQuadrilateral(e,r,n,o,i,a,s,u).buildAdjoint()},t.prototype.buildAdjoint=function(){return new t(this.a22*this.a33-this.a23*this.a32,this.a23*this.a31-this.a21*this.a33,this.a21*this.a32-this.a22*this.a31,this.a13*this.a32-this.a12*this.a33,this.a11*this.a33-this.a13*this.a31,this.a12*this.a31-this.a11*this.a32,this.a12*this.a23-this.a13*this.a22,this.a13*this.a21-this.a11*this.a23,this.a11*this.a22-this.a12*this.a21)},t.prototype.times=function(e){return new t(this.a11*e.a11+this.a21*e.a12+this.a31*e.a13,this.a11*e.a21+this.a21*e.a22+this.a31*e.a23,this.a11*e.a31+this.a21*e.a32+this.a31*e.a33,this.a12*e.a11+this.a22*e.a12+this.a32*e.a13,this.a12*e.a21+this.a22*e.a22+this.a32*e.a23,this.a12*e.a31+this.a22*e.a32+this.a32*e.a33,this.a13*e.a11+this.a23*e.a12+this.a33*e.a13,this.a13*e.a21+this.a23*e.a22+this.a33*e.a23,this.a13*e.a31+this.a23*e.a32+this.a33*e.a33)},t}(),zs=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Us=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return zs(e,t),e.prototype.sampleGrid=function(t,e,r,n,o,i,a,s,u,c,l,d,h,f,p,g,m,y,w){var _=Ls.quadrilateralToQuadrilateral(n,o,i,a,s,u,c,l,d,h,f,p,g,m,y,w);return this.sampleGridWithTransform(t,e,r,_)},e.prototype.sampleGridWithTransform=function(t,e,r,n){if(e<=0||r<=0)throw new $a;for(var o=new qa(e,r),i=new Float32Array(2*e),a=0;a<r;a++){for(var s=i.length,u=a+.5,c=0;c<s;c+=2)i[c]=c/2+.5,i[c+1]=u;n.transformPoints(i),Fs.checkAndNudgePoints(t,i);try{for(c=0;c<s;c+=2)t.get(Math.floor(i[c]),Math.floor(i[c+1]))&&o.set(c/2,a)}catch(t){throw new $a}}return o},e}(Fs),Vs=function(){function t(){}return t.setGridSampler=function(e){t.gridSampler=e},t.getInstance=function(){return t.gridSampler},t.gridSampler=new Us,t}(),Hs=function(){function t(t,e){this.x=t,this.y=e}return t.prototype.toResultPoint=function(){return new Ns(this.getX(),this.getY())},t.prototype.getX=function(){return this.x},t.prototype.getY=function(){return this.y},t}(),js=function(){function t(t){this.EXPECTED_CORNER_BITS=new Int32Array([3808,476,2107,1799]),this.image=t}return t.prototype.detect=function(){return this.detectMirror(!1)},t.prototype.detectMirror=function(t){var e=this.getMatrixCenter(),r=this.getBullsEyeCorners(e);if(t){var n=r[0];r[0]=r[2],r[2]=n}this.extractParameters(r);var o=this.sampleGrid(this.image,r[this.shift%4],r[(this.shift+1)%4],r[(this.shift+2)%4],r[(this.shift+3)%4]),i=this.getMatrixCornerPoints(r);return new Ps(o,i,this.compact,this.nbDataBlocks,this.nbLayers)},t.prototype.extractParameters=function(t){if(!(this.isValidPoint(t[0])&&this.isValidPoint(t[1])&&this.isValidPoint(t[2])&&this.isValidPoint(t[3])))throw new $a;var e=2*this.nbCenterLayers,r=new Int32Array([this.sampleLine(t[0],t[1],e),this.sampleLine(t[1],t[2],e),this.sampleLine(t[2],t[3],e),this.sampleLine(t[3],t[0],e)]);this.shift=this.getRotation(r,e);for(var n=0,o=0;o<4;o++){var i=r[(this.shift+o)%4];this.compact?(n<<=7,n+=i>>1&127):(n<<=10,n+=(i>>2&992)+(i>>1&31))}var a=this.getCorrectedParameterData(n,this.compact);this.compact?(this.nbLayers=1+(a>>6),this.nbDataBlocks=1+(63&a)):(this.nbLayers=1+(a>>11),this.nbDataBlocks=1+(2047&a))},t.prototype.getRotation=function(t,e){var r=0;t.forEach((function(t,n,o){r=(r<<3)+((t>>e-2<<1)+(1&t))})),r=((1&r)<<11)+(r>>1);for(var n=0;n<4;n++)if(Pa.bitCount(r^this.EXPECTED_CORNER_BITS[n])<=2)return n;throw new $a},t.prototype.getCorrectedParameterData=function(t,e){var r,n;e?(r=7,n=2):(r=10,n=4);for(var o=r-n,i=new Int32Array(r),a=r-1;a>=0;--a)i[a]=15&t,t>>=4;try{new Ds(As.AZTEC_PARAM).decode(i,o)}catch(t){throw new $a}var s=0;for(a=0;a<n;a++)s=(s<<4)+i[a];return s},t.prototype.getBullsEyeCorners=function(t){var e=t,r=t,n=t,o=t,i=!0;for(this.nbCenterLayers=1;this.nbCenterLayers<9;this.nbCenterLayers++){var a=this.getFirstDifferent(e,i,1,-1),s=this.getFirstDifferent(r,i,1,1),u=this.getFirstDifferent(n,i,-1,1),c=this.getFirstDifferent(o,i,-1,-1);if(this.nbCenterLayers>2){var l=this.distancePoint(c,a)*this.nbCenterLayers/(this.distancePoint(o,e)*(this.nbCenterLayers+2));if(l<.75||l>1.25||!this.isWhiteOrBlackRectangle(a,s,u,c))break}e=a,r=s,n=u,o=c,i=!i}if(5!==this.nbCenterLayers&&7!==this.nbCenterLayers)throw new $a;this.compact=5===this.nbCenterLayers;var d=new Ns(e.getX()+.5,e.getY()-.5),h=new Ns(r.getX()+.5,r.getY()+.5),f=new Ns(n.getX()-.5,n.getY()+.5),p=new Ns(o.getX()-.5,o.getY()-.5);return this.expandSquare([d,h,f,p],2*this.nbCenterLayers-3,2*this.nbCenterLayers)},t.prototype.getMatrixCenter=function(){var t,e,r,n;try{t=(u=new Bs(this.image).detect())[0],e=u[1],r=u[2],n=u[3]}catch(a){var o=this.image.getWidth()/2,i=this.image.getHeight()/2;t=this.getFirstDifferent(new Hs(o+7,i-7),!1,1,-1).toResultPoint(),e=this.getFirstDifferent(new Hs(o+7,i+7),!1,1,1).toResultPoint(),r=this.getFirstDifferent(new Hs(o-7,i+7),!1,-1,1).toResultPoint(),n=this.getFirstDifferent(new Hs(o-7,i-7),!1,-1,-1).toResultPoint()}var a=Rs.round((t.getX()+n.getX()+e.getX()+r.getX())/4),s=Rs.round((t.getY()+n.getY()+e.getY()+r.getY())/4);try{var u;t=(u=new Bs(this.image,15,a,s).detect())[0],e=u[1],r=u[2],n=u[3]}catch(o){t=this.getFirstDifferent(new Hs(a+7,s-7),!1,1,-1).toResultPoint(),e=this.getFirstDifferent(new Hs(a+7,s+7),!1,1,1).toResultPoint(),r=this.getFirstDifferent(new Hs(a-7,s+7),!1,-1,1).toResultPoint(),n=this.getFirstDifferent(new Hs(a-7,s-7),!1,-1,-1).toResultPoint()}return a=Rs.round((t.getX()+n.getX()+e.getX()+r.getX())/4),s=Rs.round((t.getY()+n.getY()+e.getY()+r.getY())/4),new Hs(a,s)},t.prototype.getMatrixCornerPoints=function(t){return this.expandSquare(t,2*this.nbCenterLayers,this.getDimension())},t.prototype.sampleGrid=function(t,e,r,n,o){var i=Vs.getInstance(),a=this.getDimension(),s=a/2-this.nbCenterLayers,u=a/2+this.nbCenterLayers;return i.sampleGrid(t,a,a,s,s,u,s,u,u,s,u,e.getX(),e.getY(),r.getX(),r.getY(),n.getX(),n.getY(),o.getX(),o.getY())},t.prototype.sampleLine=function(t,e,r){for(var n=0,o=this.distanceResultPoint(t,e),i=o/r,a=t.getX(),s=t.getY(),u=i*(e.getX()-t.getX())/o,c=i*(e.getY()-t.getY())/o,l=0;l<r;l++)this.image.get(Rs.round(a+l*u),Rs.round(s+l*c))&&(n|=1<<r-l-1);return n},t.prototype.isWhiteOrBlackRectangle=function(t,e,r,n){t=new Hs(t.getX()-3,t.getY()+3),e=new Hs(e.getX()-3,e.getY()-3),r=new Hs(r.getX()+3,r.getY()-3),n=new Hs(n.getX()+3,n.getY()+3);var o=this.getColor(n,t);if(0===o)return!1;var i=this.getColor(t,e);return i===o&&((i=this.getColor(e,r))===o&&(i=this.getColor(r,n))===o)},t.prototype.getColor=function(t,e){for(var r=this.distancePoint(t,e),n=(e.getX()-t.getX())/r,o=(e.getY()-t.getY())/r,i=0,a=t.getX(),s=t.getY(),u=this.image.get(t.getX(),t.getY()),c=Math.ceil(r),l=0;l<c;l++)a+=n,s+=o,this.image.get(Rs.round(a),Rs.round(s))!==u&&i++;var d=i/r;return d>.1&&d<.9?0:d<=.1===u?1:-1},t.prototype.getFirstDifferent=function(t,e,r,n){for(var o=t.getX()+r,i=t.getY()+n;this.isValid(o,i)&&this.image.get(o,i)===e;)o+=r,i+=n;for(o-=r,i-=n;this.isValid(o,i)&&this.image.get(o,i)===e;)o+=r;for(o-=r;this.isValid(o,i)&&this.image.get(o,i)===e;)i+=n;return new Hs(o,i-=n)},t.prototype.expandSquare=function(t,e,r){var n=r/(2*e),o=t[0].getX()-t[2].getX(),i=t[0].getY()-t[2].getY(),a=(t[0].getX()+t[2].getX())/2,s=(t[0].getY()+t[2].getY())/2,u=new Ns(a+n*o,s+n*i),c=new Ns(a-n*o,s-n*i);return o=t[1].getX()-t[3].getX(),i=t[1].getY()-t[3].getY(),a=(t[1].getX()+t[3].getX())/2,s=(t[1].getY()+t[3].getY())/2,[u,new Ns(a+n*o,s+n*i),c,new Ns(a-n*o,s-n*i)]},t.prototype.isValid=function(t,e){return t>=0&&t<this.image.getWidth()&&e>0&&e<this.image.getHeight()},t.prototype.isValidPoint=function(t){var e=Rs.round(t.getX()),r=Rs.round(t.getY());return this.isValid(e,r)},t.prototype.distancePoint=function(t,e){return Rs.distance(t.getX(),t.getY(),e.getX(),e.getY())},t.prototype.distanceResultPoint=function(t,e){return Rs.distance(t.getX(),t.getY(),e.getX(),e.getY())},t.prototype.getDimension=function(){return this.compact?4*this.nbLayers+11:this.nbLayers<=4?4*this.nbLayers+15:4*this.nbLayers+2*(Pa.truncDivision(this.nbLayers-4,8)+1)+15},t}(),Gs=function(){function t(){}return t.prototype.decode=function(t,e){void 0===e&&(e=null);var r=null,n=new js(t.getBlackMatrix()),o=null,i=null;try{o=(a=n.detectMirror(!1)).getPoints(),this.reportFoundResultPoints(e,o),i=(new Os).decode(a)}catch(t){r=t}if(null==i)try{var a;o=(a=n.detectMirror(!0)).getPoints(),this.reportFoundResultPoints(e,o),i=(new Os).decode(a)}catch(t){if(null!=r)throw r;throw t}var s=new hs(i.getText(),i.getRawBytes(),i.getNumBits(),o,ps.AZTEC,Da.currentTimeMillis()),u=i.getByteSegments();null!=u&&s.putMetadata(ms.BYTE_SEGMENTS,u);var c=i.getECLevel();return null!=c&&s.putMetadata(ms.ERROR_CORRECTION_LEVEL,c),s},t.prototype.reportFoundResultPoints=function(t,e){if(null!=t){var r=t.get(La.NEED_RESULT_POINT_CALLBACK);null!=r&&e.forEach((function(t,e,n){r.foundPossibleResultPoint(t)}))}},t.prototype.reset=function(){},t}(),Ws=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){function e(e){return void 0===e&&(e=500),t.call(this,new Gs,e)||this}Ws(e,t)}(ds);var Xs=function(){function t(){}return t.prototype.decode=function(t,e){try{return this.doDecode(t,e)}catch(c){if(e&&!0===e.get(La.TRY_HARDER)&&t.isRotateSupported()){var r=t.rotateCounterClockwise(),n=this.doDecode(r,e),o=n.getResultMetadata(),i=270;null!==o&&!0===o.get(ms.ORIENTATION)&&(i+=o.get(ms.ORIENTATION)%360),n.putMetadata(ms.ORIENTATION,i);var a=n.getResultPoints();if(null!==a)for(var s=r.getHeight(),u=0;u<a.length;u++)a[u]=new Ns(s-a[u].getY()-1,a[u].getX());return n}throw new $a}},t.prototype.reset=function(){},t.prototype.doDecode=function(t,e){var r,n=t.getWidth(),o=t.getHeight(),i=new Ba(n),a=e&&!0===e.get(La.TRY_HARDER),s=Math.max(1,o>>(a?8:5));r=a?o:15;for(var u=Math.trunc(o/2),c=0;c<r;c++){var l=Math.trunc((c+1)/2),d=u+s*(!(1&c)?l:-l);if(d<0||d>=o)break;try{i=t.getBlackRow(d,i)}catch(t){continue}for(var h=function(t){if(1===t&&(i.reverse(),e&&!0===e.get(La.NEED_RESULT_POINT_CALLBACK))){var r=new Map;e.forEach((function(t,e){return r.set(e,t)})),r.delete(La.NEED_RESULT_POINT_CALLBACK),e=r}try{var o=f.decodeRow(d,i,e);if(1===t){o.putMetadata(ms.ORIENTATION,180);var a=o.getResultPoints();null!==a&&(a[0]=new Ns(n-a[0].getX()-1,a[0].getY()),a[1]=new Ns(n-a[1].getX()-1,a[1].getY()))}return{value:o}}catch(t){}},f=this,p=0;p<2;p++){var g=h(p);if("object"==typeof g)return g.value}}throw new $a},t.recordPattern=function(t,e,r){for(var n=r.length,o=0;o<n;o++)r[o]=0;var i=t.getSize();if(e>=i)throw new $a;for(var a=!t.get(e),s=0,u=e;u<i;){if(t.get(u)!==a)r[s]++;else{if(++s===n)break;r[s]=1,a=!a}u++}if(s!==n&&(s!==n-1||u!==i))throw new $a},t.recordPatternInReverse=function(e,r,n){for(var o=n.length,i=e.get(r);r>0&&o>=0;)e.get(--r)!==i&&(o--,i=!i);if(o>=0)throw new $a;t.recordPattern(e,r+1,n)},t.patternMatchVariance=function(t,e,r){for(var n=t.length,o=0,i=0,a=0;a<n;a++)o+=t[a],i+=e[a];if(o<i)return Number.POSITIVE_INFINITY;var s=o/i;r*=s;for(var u=0,c=0;c<n;c++){var l=t[c],d=e[c]*s,h=l>d?l-d:d-l;if(h>r)return Number.POSITIVE_INFINITY;u+=h}return u/o},t}(),Ys=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Zs=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Ys(e,t),e.findStartPattern=function(t){for(var r=t.getSize(),n=t.getNextSet(0),o=0,i=Int32Array.from([0,0,0,0,0,0]),a=n,s=!1,u=n;u<r;u++)if(t.get(u)!==s)i[o]++;else{if(5===o){for(var c=e.MAX_AVG_VARIANCE,l=-1,d=e.CODE_START_A;d<=e.CODE_START_C;d++){var h=Xs.patternMatchVariance(i,e.CODE_PATTERNS[d],e.MAX_INDIVIDUAL_VARIANCE);h<c&&(c=h,l=d)}if(l>=0&&t.isRange(Math.max(0,a-(u-a)/2),a,!1))return Int32Array.from([a,u,l]);a+=i[0]+i[1],(i=i.slice(2,i.length))[o-1]=0,i[o]=0,o--}else o++;i[o]=1,s=!s}throw new $a},e.decodeCode=function(t,r,n){Xs.recordPattern(t,n,r);for(var o=e.MAX_AVG_VARIANCE,i=-1,a=0;a<e.CODE_PATTERNS.length;a++){var s=e.CODE_PATTERNS[a],u=this.patternMatchVariance(r,s,e.MAX_INDIVIDUAL_VARIANCE);u<o&&(o=u,i=a)}if(i>=0)return i;throw new $a},e.prototype.decodeRow=function(t,r,n){var o,i=n&&!0===n.get(La.ASSUME_GS1),a=e.findStartPattern(r),s=a[2],u=0,c=new Uint8Array(20);switch(c[u++]=s,s){case e.CODE_START_A:o=e.CODE_CODE_A;break;case e.CODE_START_B:o=e.CODE_CODE_B;break;case e.CODE_START_C:o=e.CODE_CODE_C;break;default:throw new Ua}for(var l=!1,d=!1,h="",f=a[0],p=a[1],g=Int32Array.from([0,0,0,0,0,0]),m=0,y=0,w=s,_=0,v=!0,E=!1,b=!1;!l;){var A=d;switch(d=!1,m=y,y=e.decodeCode(r,g,p),c[u++]=y,y!==e.CODE_STOP&&(v=!0),y!==e.CODE_STOP&&(w+=++_*y),f=p,p+=g.reduce((function(t,e){return t+e}),0),y){case e.CODE_START_A:case e.CODE_START_B:case e.CODE_START_C:throw new Ua}switch(o){case e.CODE_CODE_A:if(y<64)h+=b===E?String.fromCharCode(" ".charCodeAt(0)+y):String.fromCharCode(" ".charCodeAt(0)+y+128),b=!1;else if(y<96)h+=b===E?String.fromCharCode(y-64):String.fromCharCode(y+64),b=!1;else switch(y!==e.CODE_STOP&&(v=!1),y){case e.CODE_FNC_1:i&&(0===h.length?h+="]C1":h+=String.fromCharCode(29));break;case e.CODE_FNC_2:case e.CODE_FNC_3:break;case e.CODE_FNC_4_A:!E&&b?(E=!0,b=!1):E&&b?(E=!1,b=!1):b=!0;break;case e.CODE_SHIFT:d=!0,o=e.CODE_CODE_B;break;case e.CODE_CODE_B:o=e.CODE_CODE_B;break;case e.CODE_CODE_C:o=e.CODE_CODE_C;break;case e.CODE_STOP:l=!0}break;case e.CODE_CODE_B:if(y<96)h+=b===E?String.fromCharCode(" ".charCodeAt(0)+y):String.fromCharCode(" ".charCodeAt(0)+y+128),b=!1;else switch(y!==e.CODE_STOP&&(v=!1),y){case e.CODE_FNC_1:i&&(0===h.length?h+="]C1":h+=String.fromCharCode(29));break;case e.CODE_FNC_2:case e.CODE_FNC_3:break;case e.CODE_FNC_4_B:!E&&b?(E=!0,b=!1):E&&b?(E=!1,b=!1):b=!0;break;case e.CODE_SHIFT:d=!0,o=e.CODE_CODE_A;break;case e.CODE_CODE_A:o=e.CODE_CODE_A;break;case e.CODE_CODE_C:o=e.CODE_CODE_C;break;case e.CODE_STOP:l=!0}break;case e.CODE_CODE_C:if(y<100)y<10&&(h+="0"),h+=y;else switch(y!==e.CODE_STOP&&(v=!1),y){case e.CODE_FNC_1:i&&(0===h.length?h+="]C1":h+=String.fromCharCode(29));break;case e.CODE_CODE_A:o=e.CODE_CODE_A;break;case e.CODE_CODE_B:o=e.CODE_CODE_B;break;case e.CODE_STOP:l=!0}}A&&(o=o===e.CODE_CODE_A?e.CODE_CODE_B:e.CODE_CODE_A)}var C=p-f;if(p=r.getNextUnset(p),!r.isRange(p,Math.min(r.getSize(),p+(p-f)/2),!1))throw new $a;if((w-=_*m)%103!==m)throw new Sa;var I=h.length;if(0===I)throw new $a;I>0&&v&&(h=o===e.CODE_CODE_C?h.substring(0,I-2):h.substring(0,I-1));for(var S=(a[1]+a[0])/2,T=f+C/2,D=c.length,O=new Uint8Array(D),R=0;R<D;R++)O[R]=c[R];var M=[new Ns(S,t),new Ns(T,t)];return new hs(h,O,0,M,ps.CODE_128,(new Date).getTime())},e.CODE_PATTERNS=[Int32Array.from([2,1,2,2,2,2]),Int32Array.from([2,2,2,1,2,2]),Int32Array.from([2,2,2,2,2,1]),Int32Array.from([1,2,1,2,2,3]),Int32Array.from([1,2,1,3,2,2]),Int32Array.from([1,3,1,2,2,2]),Int32Array.from([1,2,2,2,1,3]),Int32Array.from([1,2,2,3,1,2]),Int32Array.from([1,3,2,2,1,2]),Int32Array.from([2,2,1,2,1,3]),Int32Array.from([2,2,1,3,1,2]),Int32Array.from([2,3,1,2,1,2]),Int32Array.from([1,1,2,2,3,2]),Int32Array.from([1,2,2,1,3,2]),Int32Array.from([1,2,2,2,3,1]),Int32Array.from([1,1,3,2,2,2]),Int32Array.from([1,2,3,1,2,2]),Int32Array.from([1,2,3,2,2,1]),Int32Array.from([2,2,3,2,1,1]),Int32Array.from([2,2,1,1,3,2]),Int32Array.from([2,2,1,2,3,1]),Int32Array.from([2,1,3,2,1,2]),Int32Array.from([2,2,3,1,1,2]),Int32Array.from([3,1,2,1,3,1]),Int32Array.from([3,1,1,2,2,2]),Int32Array.from([3,2,1,1,2,2]),Int32Array.from([3,2,1,2,2,1]),Int32Array.from([3,1,2,2,1,2]),Int32Array.from([3,2,2,1,1,2]),Int32Array.from([3,2,2,2,1,1]),Int32Array.from([2,1,2,1,2,3]),Int32Array.from([2,1,2,3,2,1]),Int32Array.from([2,3,2,1,2,1]),Int32Array.from([1,1,1,3,2,3]),Int32Array.from([1,3,1,1,2,3]),Int32Array.from([1,3,1,3,2,1]),Int32Array.from([1,1,2,3,1,3]),Int32Array.from([1,3,2,1,1,3]),Int32Array.from([1,3,2,3,1,1]),Int32Array.from([2,1,1,3,1,3]),Int32Array.from([2,3,1,1,1,3]),Int32Array.from([2,3,1,3,1,1]),Int32Array.from([1,1,2,1,3,3]),Int32Array.from([1,1,2,3,3,1]),Int32Array.from([1,3,2,1,3,1]),Int32Array.from([1,1,3,1,2,3]),Int32Array.from([1,1,3,3,2,1]),Int32Array.from([1,3,3,1,2,1]),Int32Array.from([3,1,3,1,2,1]),Int32Array.from([2,1,1,3,3,1]),Int32Array.from([2,3,1,1,3,1]),Int32Array.from([2,1,3,1,1,3]),Int32Array.from([2,1,3,3,1,1]),Int32Array.from([2,1,3,1,3,1]),Int32Array.from([3,1,1,1,2,3]),Int32Array.from([3,1,1,3,2,1]),Int32Array.from([3,3,1,1,2,1]),Int32Array.from([3,1,2,1,1,3]),Int32Array.from([3,1,2,3,1,1]),Int32Array.from([3,3,2,1,1,1]),Int32Array.from([3,1,4,1,1,1]),Int32Array.from([2,2,1,4,1,1]),Int32Array.from([4,3,1,1,1,1]),Int32Array.from([1,1,1,2,2,4]),Int32Array.from([1,1,1,4,2,2]),Int32Array.from([1,2,1,1,2,4]),Int32Array.from([1,2,1,4,2,1]),Int32Array.from([1,4,1,1,2,2]),Int32Array.from([1,4,1,2,2,1]),Int32Array.from([1,1,2,2,1,4]),Int32Array.from([1,1,2,4,1,2]),Int32Array.from([1,2,2,1,1,4]),Int32Array.from([1,2,2,4,1,1]),Int32Array.from([1,4,2,1,1,2]),Int32Array.from([1,4,2,2,1,1]),Int32Array.from([2,4,1,2,1,1]),Int32Array.from([2,2,1,1,1,4]),Int32Array.from([4,1,3,1,1,1]),Int32Array.from([2,4,1,1,1,2]),Int32Array.from([1,3,4,1,1,1]),Int32Array.from([1,1,1,2,4,2]),Int32Array.from([1,2,1,1,4,2]),Int32Array.from([1,2,1,2,4,1]),Int32Array.from([1,1,4,2,1,2]),Int32Array.from([1,2,4,1,1,2]),Int32Array.from([1,2,4,2,1,1]),Int32Array.from([4,1,1,2,1,2]),Int32Array.from([4,2,1,1,1,2]),Int32Array.from([4,2,1,2,1,1]),Int32Array.from([2,1,2,1,4,1]),Int32Array.from([2,1,4,1,2,1]),Int32Array.from([4,1,2,1,2,1]),Int32Array.from([1,1,1,1,4,3]),Int32Array.from([1,1,1,3,4,1]),Int32Array.from([1,3,1,1,4,1]),Int32Array.from([1,1,4,1,1,3]),Int32Array.from([1,1,4,3,1,1]),Int32Array.from([4,1,1,1,1,3]),Int32Array.from([4,1,1,3,1,1]),Int32Array.from([1,1,3,1,4,1]),Int32Array.from([1,1,4,1,3,1]),Int32Array.from([3,1,1,1,4,1]),Int32Array.from([4,1,1,1,3,1]),Int32Array.from([2,1,1,4,1,2]),Int32Array.from([2,1,1,2,1,4]),Int32Array.from([2,1,1,2,3,2]),Int32Array.from([2,3,3,1,1,1,2])],e.MAX_AVG_VARIANCE=.25,e.MAX_INDIVIDUAL_VARIANCE=.7,e.CODE_SHIFT=98,e.CODE_CODE_C=99,e.CODE_CODE_B=100,e.CODE_CODE_A=101,e.CODE_FNC_1=102,e.CODE_FNC_2=97,e.CODE_FNC_3=96,e.CODE_FNC_4_A=101,e.CODE_FNC_4_B=100,e.CODE_START_A=103,e.CODE_START_B=104,e.CODE_START_C=105,e.CODE_STOP=106,e}(Xs),qs=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ks=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},$s=function(t){function e(e,r){void 0===e&&(e=!1),void 0===r&&(r=!1);var n=t.call(this)||this;return n.usingCheckDigit=e,n.extendedMode=r,n.decodeRowResult="",n.counters=new Int32Array(9),n}return qs(e,t),e.prototype.decodeRow=function(t,r,n){var o,i,a,s,u=this.counters;u.fill(0),this.decodeRowResult="";var c,l,d=e.findAsteriskPattern(r,u),h=r.getNextSet(d[1]),f=r.getSize();do{e.recordPattern(r,h,u);var p=e.toNarrowWidePattern(u);if(p<0)throw new $a;c=e.patternToChar(p),this.decodeRowResult+=c,l=h;try{for(var g=(o=void 0,Ks(u)),m=g.next();!m.done;m=g.next()){h+=m.value}}catch(t){o={error:t}}finally{try{m&&!m.done&&(i=g.return)&&i.call(g)}finally{if(o)throw o.error}}h=r.getNextSet(h)}while("*"!==c);this.decodeRowResult=this.decodeRowResult.substring(0,this.decodeRowResult.length-1);var y,w=0;try{for(var _=Ks(u),v=_.next();!v.done;v=_.next()){w+=v.value}}catch(t){a={error:t}}finally{try{v&&!v.done&&(s=_.return)&&s.call(_)}finally{if(a)throw a.error}}if(h!==f&&2*(h-l-w)<w)throw new $a;if(this.usingCheckDigit){for(var E=this.decodeRowResult.length-1,b=0,A=0;A<E;A++)b+=e.ALPHABET_STRING.indexOf(this.decodeRowResult.charAt(A));if(this.decodeRowResult.charAt(E)!==e.ALPHABET_STRING.charAt(b%43))throw new Sa;this.decodeRowResult=this.decodeRowResult.substring(0,E)}if(0===this.decodeRowResult.length)throw new $a;y=this.extendedMode?e.decodeExtended(this.decodeRowResult):this.decodeRowResult;var C=(d[1]+d[0])/2,I=l+w/2;return new hs(y,null,0,[new Ns(C,t),new Ns(I,t)],ps.CODE_39,(new Date).getTime())},e.findAsteriskPattern=function(t,r){for(var n=t.getSize(),o=t.getNextSet(0),i=0,a=o,s=!1,u=r.length,c=o;c<n;c++)if(t.get(c)!==s)r[i]++;else{if(i===u-1){if(this.toNarrowWidePattern(r)===e.ASTERISK_ENCODING&&t.isRange(Math.max(0,a-Math.floor((c-a)/2)),a,!1))return[a,c];a+=r[0]+r[1],r.copyWithin(0,2,2+i-1),r[i-1]=0,r[i]=0,i--}else i++;r[i]=1,s=!s}throw new $a},e.toNarrowWidePattern=function(t){var e,r,n,o=t.length,i=0;do{var a=2147483647;try{for(var s=(e=void 0,Ks(t)),u=s.next();!u.done;u=s.next()){(h=u.value)<a&&h>i&&(a=h)}}catch(t){e={error:t}}finally{try{u&&!u.done&&(r=s.return)&&r.call(s)}finally{if(e)throw e.error}}i=a,n=0;for(var c=0,l=0,d=0;d<o;d++){(h=t[d])>i&&(l|=1<<o-1-d,n++,c+=h)}if(3===n){for(d=0;d<o&&n>0;d++){var h;if((h=t[d])>i&&(n--,2*h>=c))return-1}return l}}while(n>3);return-1},e.patternToChar=function(t){for(var r=0;r<e.CHARACTER_ENCODINGS.length;r++)if(e.CHARACTER_ENCODINGS[r]===t)return e.ALPHABET_STRING.charAt(r);if(t===e.ASTERISK_ENCODING)return"*";throw new $a},e.decodeExtended=function(t){for(var e=t.length,r="",n=0;n<e;n++){var o=t.charAt(n);if("+"===o||"$"===o||"%"===o||"/"===o){var i=t.charAt(n+1),a="\0";switch(o){case"+":if(!(i>="A"&&i<="Z"))throw new Ua;a=String.fromCharCode(i.charCodeAt(0)+32);break;case"$":if(!(i>="A"&&i<="Z"))throw new Ua;a=String.fromCharCode(i.charCodeAt(0)-64);break;case"%":if(i>="A"&&i<="E")a=String.fromCharCode(i.charCodeAt(0)-38);else if(i>="F"&&i<="J")a=String.fromCharCode(i.charCodeAt(0)-11);else if(i>="K"&&i<="O")a=String.fromCharCode(i.charCodeAt(0)+16);else if(i>="P"&&i<="T")a=String.fromCharCode(i.charCodeAt(0)+43);else if("U"===i)a="\0";else if("V"===i)a="@";else if("W"===i)a="`";else{if("X"!==i&&"Y"!==i&&"Z"!==i)throw new Ua;a=""}break;case"/":if(i>="A"&&i<="O")a=String.fromCharCode(i.charCodeAt(0)-32);else{if("Z"!==i)throw new Ua;a=":"}}r+=a,n++}else r+=o}return r},e.ALPHABET_STRING="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%",e.CHARACTER_ENCODINGS=[52,289,97,352,49,304,112,37,292,100,265,73,328,25,280,88,13,268,76,28,259,67,322,19,274,82,7,262,70,22,385,193,448,145,400,208,133,388,196,168,162,138,42],e.ASTERISK_ENCODING=148,e}(Xs),Js=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Qs=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},tu=function(t){function e(){var e=t.call(this)||this;return e.decodeRowResult="",e.counters=new Int32Array(6),e}return Js(e,t),e.prototype.decodeRow=function(t,r,n){var o,i,a,s,u,c,l=this.findAsteriskPattern(r),d=r.getNextSet(l[1]),h=r.getSize(),f=this.counters;f.fill(0),this.decodeRowResult="";do{e.recordPattern(r,d,f);var p=this.toPattern(f);if(p<0)throw new $a;u=this.patternToChar(p),this.decodeRowResult+=u,c=d;try{for(var g=(o=void 0,Qs(f)),m=g.next();!m.done;m=g.next()){d+=m.value}}catch(t){o={error:t}}finally{try{m&&!m.done&&(i=g.return)&&i.call(g)}finally{if(o)throw o.error}}d=r.getNextSet(d)}while("*"!==u);this.decodeRowResult=this.decodeRowResult.substring(0,this.decodeRowResult.length-1);var y=0;try{for(var w=Qs(f),_=w.next();!_.done;_=w.next()){y+=_.value}}catch(t){a={error:t}}finally{try{_&&!_.done&&(s=w.return)&&s.call(w)}finally{if(a)throw a.error}}if(d===h||!r.get(d))throw new $a;if(this.decodeRowResult.length<2)throw new $a;this.checkChecksums(this.decodeRowResult),this.decodeRowResult=this.decodeRowResult.substring(0,this.decodeRowResult.length-2);var v=this.decodeExtended(this.decodeRowResult),E=(l[1]+l[0])/2,b=c+y/2;return new hs(v,null,0,[new Ns(E,t),new Ns(b,t)],ps.CODE_93,(new Date).getTime())},e.prototype.findAsteriskPattern=function(t){var r=t.getSize(),n=t.getNextSet(0);this.counters.fill(0);for(var o=this.counters,i=n,a=!1,s=o.length,u=0,c=n;c<r;c++)if(t.get(c)!==a)o[u]++;else{if(u===s-1){if(this.toPattern(o)===e.ASTERISK_ENCODING)return new Int32Array([i,c]);i+=o[0]+o[1],o.copyWithin(0,2,2+u-1),o[u-1]=0,o[u]=0,u--}else u++;o[u]=1,a=!a}throw new $a},e.prototype.toPattern=function(t){var e,r,n=0;try{for(var o=Qs(t),i=o.next();!i.done;i=o.next()){n+=i.value}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}for(var a=0,s=t.length,u=0;u<s;u++){var c=Math.round(9*t[u]/n);if(c<1||c>4)return-1;if(1&u)a<<=c;else for(var l=0;l<c;l++)a=a<<1|1}return a},e.prototype.patternToChar=function(t){for(var r=0;r<e.CHARACTER_ENCODINGS.length;r++)if(e.CHARACTER_ENCODINGS[r]===t)return e.ALPHABET_STRING.charAt(r);throw new $a},e.prototype.decodeExtended=function(t){for(var e=t.length,r="",n=0;n<e;n++){var o=t.charAt(n);if(o>="a"&&o<="d"){if(n>=e-1)throw new Ua;var i=t.charAt(n+1),a="\0";switch(o){case"d":if(!(i>="A"&&i<="Z"))throw new Ua;a=String.fromCharCode(i.charCodeAt(0)+32);break;case"a":if(!(i>="A"&&i<="Z"))throw new Ua;a=String.fromCharCode(i.charCodeAt(0)-64);break;case"b":if(i>="A"&&i<="E")a=String.fromCharCode(i.charCodeAt(0)-38);else if(i>="F"&&i<="J")a=String.fromCharCode(i.charCodeAt(0)-11);else if(i>="K"&&i<="O")a=String.fromCharCode(i.charCodeAt(0)+16);else if(i>="P"&&i<="T")a=String.fromCharCode(i.charCodeAt(0)+43);else if("U"===i)a="\0";else if("V"===i)a="@";else if("W"===i)a="`";else{if(!(i>="X"&&i<="Z"))throw new Ua;a=String.fromCharCode(127)}break;case"c":if(i>="A"&&i<="O")a=String.fromCharCode(i.charCodeAt(0)-32);else{if("Z"!==i)throw new Ua;a=":"}}r+=a,n++}else r+=o}return r},e.prototype.checkChecksums=function(t){var e=t.length;this.checkOneChecksum(t,e-2,20),this.checkOneChecksum(t,e-1,15)},e.prototype.checkOneChecksum=function(t,r,n){for(var o=1,i=0,a=r-1;a>=0;a--)i+=o*e.ALPHABET_STRING.indexOf(t.charAt(a)),++o>n&&(o=1);if(t.charAt(r)!==e.ALPHABET_STRING[i%47])throw new Sa},e.ALPHABET_STRING="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%abcd*",e.CHARACTER_ENCODINGS=[276,328,324,322,296,292,290,336,274,266,424,420,418,404,402,394,360,356,354,308,282,344,332,326,300,278,436,434,428,422,406,410,364,358,310,314,302,468,466,458,366,374,430,294,474,470,306,350],e.ASTERISK_ENCODING=e.CHARACTER_ENCODINGS[47],e}(Xs),eu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),ru=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},nu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.narrowLineWidth=-1,e}return eu(e,t),e.prototype.decodeRow=function(t,r,n){var o,i,a=this.decodeStart(r),s=this.decodeEnd(r),u=new Za;e.decodeMiddle(r,a[1],s[0],u);var c=u.toString(),l=null;null!=n&&(l=n.get(La.ALLOWED_LENGTHS)),null==l&&(l=e.DEFAULT_ALLOWED_LENGTHS);var d=c.length,h=!1,f=0;try{for(var p=ru(l),g=p.next();!g.done;g=p.next()){var m=g.value;if(d===m){h=!0;break}m>f&&(f=m)}}catch(t){o={error:t}}finally{try{g&&!g.done&&(i=p.return)&&i.call(p)}finally{if(o)throw o.error}}if(!h&&d>f&&(h=!0),!h)throw new Ua;var y=[new Ns(a[1],t),new Ns(s[0],t)];return new hs(c,null,0,y,ps.ITF,(new Date).getTime())},e.decodeMiddle=function(t,r,n,o){var i=new Int32Array(10),a=new Int32Array(5),s=new Int32Array(5);for(i.fill(0),a.fill(0),s.fill(0);r<n;){Xs.recordPattern(t,r,i);for(var u=0;u<5;u++){var c=2*u;a[u]=i[c],s[u]=i[c+1]}var l=e.decodeDigit(a);o.append(l.toString()),l=this.decodeDigit(s),o.append(l.toString()),i.forEach((function(t){r+=t}))}},e.prototype.decodeStart=function(t){var r=e.skipWhiteSpace(t),n=e.findGuardPattern(t,r,e.START_PATTERN);return this.narrowLineWidth=(n[1]-n[0])/4,this.validateQuietZone(t,n[0]),n},e.prototype.validateQuietZone=function(t,e){var r=10*this.narrowLineWidth;r=r<e?r:e;for(var n=e-1;r>0&&n>=0&&!t.get(n);n--)r--;if(0!==r)throw new $a},e.skipWhiteSpace=function(t){var e=t.getSize(),r=t.getNextSet(0);if(r===e)throw new $a;return r},e.prototype.decodeEnd=function(t){t.reverse();try{var r=e.skipWhiteSpace(t),n=void 0;try{n=e.findGuardPattern(t,r,e.END_PATTERN_REVERSED[0])}catch(o){o instanceof $a&&(n=e.findGuardPattern(t,r,e.END_PATTERN_REVERSED[1]))}this.validateQuietZone(t,n[0]);var o=n[0];return n[0]=t.getSize()-n[1],n[1]=t.getSize()-o,n}finally{t.reverse()}},e.findGuardPattern=function(t,r,n){var o=n.length,i=new Int32Array(o),a=t.getSize(),s=!1,u=0,c=r;i.fill(0);for(var l=r;l<a;l++)if(t.get(l)!==s)i[u]++;else{if(u===o-1){if(Xs.patternMatchVariance(i,n,e.MAX_INDIVIDUAL_VARIANCE)<e.MAX_AVG_VARIANCE)return[c,l];c+=i[0]+i[1],Da.arraycopy(i,2,i,0,u-1),i[u-1]=0,i[u]=0,u--}else u++;i[u]=1,s=!s}throw new $a},e.decodeDigit=function(t){for(var r=e.MAX_AVG_VARIANCE,n=-1,o=e.PATTERNS.length,i=0;i<o;i++){var a=e.PATTERNS[i],s=Xs.patternMatchVariance(t,a,e.MAX_INDIVIDUAL_VARIANCE);s<r?(r=s,n=i):s===r&&(n=-1)}if(n>=0)return n%10;throw new $a},e.PATTERNS=[Int32Array.from([1,1,2,2,1]),Int32Array.from([2,1,1,1,2]),Int32Array.from([1,2,1,1,2]),Int32Array.from([2,2,1,1,1]),Int32Array.from([1,1,2,1,2]),Int32Array.from([2,1,2,1,1]),Int32Array.from([1,2,2,1,1]),Int32Array.from([1,1,1,2,2]),Int32Array.from([2,1,1,2,1]),Int32Array.from([1,2,1,2,1]),Int32Array.from([1,1,3,3,1]),Int32Array.from([3,1,1,1,3]),Int32Array.from([1,3,1,1,3]),Int32Array.from([3,3,1,1,1]),Int32Array.from([1,1,3,1,3]),Int32Array.from([3,1,3,1,1]),Int32Array.from([1,3,3,1,1]),Int32Array.from([1,1,1,3,3]),Int32Array.from([3,1,1,3,1]),Int32Array.from([1,3,1,3,1])],e.MAX_AVG_VARIANCE=.38,e.MAX_INDIVIDUAL_VARIANCE=.5,e.DEFAULT_ALLOWED_LENGTHS=[6,8,10,12,14],e.START_PATTERN=Int32Array.from([1,1,1,1]),e.END_PATTERN_REVERSED=[Int32Array.from([1,1,2]),Int32Array.from([1,1,3])],e}(Xs),ou=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),iu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.decodeRowStringBuffer="",e}return ou(e,t),e.findStartGuardPattern=function(t){for(var r,n=!1,o=0,i=Int32Array.from([0,0,0]);!n;){i=Int32Array.from([0,0,0]);var a=(r=e.findGuardPattern(t,o,!1,this.START_END_PATTERN,i))[0],s=a-((o=r[1])-a);s>=0&&(n=t.isRange(s,a,!1))}return r},e.checkChecksum=function(t){return e.checkStandardUPCEANChecksum(t)},e.checkStandardUPCEANChecksum=function(t){var r=t.length;if(0===r)return!1;var n=parseInt(t.charAt(r-1),10);return e.getStandardUPCEANChecksum(t.substring(0,r-1))===n},e.getStandardUPCEANChecksum=function(t){for(var e=t.length,r=0,n=e-1;n>=0;n-=2){if((o=t.charAt(n).charCodeAt(0)-"0".charCodeAt(0))<0||o>9)throw new Ua;r+=o}r*=3;for(n=e-2;n>=0;n-=2){var o;if((o=t.charAt(n).charCodeAt(0)-"0".charCodeAt(0))<0||o>9)throw new Ua;r+=o}return(1e3-r)%10},e.decodeEnd=function(t,r){return e.findGuardPattern(t,r,!1,e.START_END_PATTERN,new Int32Array(e.START_END_PATTERN.length).fill(0))},e.findGuardPatternWithoutCounters=function(t,e,r,n){return this.findGuardPattern(t,e,r,n,new Int32Array(n.length))},e.findGuardPattern=function(t,r,n,o,i){for(var a=t.getSize(),s=0,u=r=n?t.getNextUnset(r):t.getNextSet(r),c=o.length,l=n,d=r;d<a;d++)if(t.get(d)!==l)i[s]++;else{if(s===c-1){if(Xs.patternMatchVariance(i,o,e.MAX_INDIVIDUAL_VARIANCE)<e.MAX_AVG_VARIANCE)return Int32Array.from([u,d]);u+=i[0]+i[1];for(var h=i.slice(2,i.length),f=0;f<s-1;f++)i[f]=h[f];i[s-1]=0,i[s]=0,s--}else s++;i[s]=1,l=!l}throw new $a},e.decodeDigit=function(t,r,n,o){this.recordPattern(t,n,r);for(var i=this.MAX_AVG_VARIANCE,a=-1,s=o.length,u=0;u<s;u++){var c=o[u],l=Xs.patternMatchVariance(r,c,e.MAX_INDIVIDUAL_VARIANCE);l<i&&(i=l,a=u)}if(a>=0)return a;throw new $a},e.MAX_AVG_VARIANCE=.48,e.MAX_INDIVIDUAL_VARIANCE=.7,e.START_END_PATTERN=Int32Array.from([1,1,1]),e.MIDDLE_PATTERN=Int32Array.from([1,1,1,1,1]),e.END_PATTERN=Int32Array.from([1,1,1,1,1,1]),e.L_PATTERNS=[Int32Array.from([3,2,1,1]),Int32Array.from([2,2,2,1]),Int32Array.from([2,1,2,2]),Int32Array.from([1,4,1,1]),Int32Array.from([1,1,3,2]),Int32Array.from([1,2,3,1]),Int32Array.from([1,1,1,4]),Int32Array.from([1,3,1,2]),Int32Array.from([1,2,1,3]),Int32Array.from([3,1,1,2])],e}(Xs),au=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},su=function(){function t(){this.CHECK_DIGIT_ENCODINGS=[24,20,18,17,12,6,3,10,9,5],this.decodeMiddleCounters=Int32Array.from([0,0,0,0]),this.decodeRowStringBuffer=""}return t.prototype.decodeRow=function(e,r,n){var o=this.decodeRowStringBuffer,i=this.decodeMiddle(r,n,o),a=o.toString(),s=t.parseExtensionString(a),u=[new Ns((n[0]+n[1])/2,e),new Ns(i,e)],c=new hs(a,null,0,u,ps.UPC_EAN_EXTENSION,(new Date).getTime());return null!=s&&c.putAllMetadata(s),c},t.prototype.decodeMiddle=function(e,r,n){var o,i,a=this.decodeMiddleCounters;a[0]=0,a[1]=0,a[2]=0,a[3]=0;for(var s=e.getSize(),u=r[1],c=0,l=0;l<5&&u<s;l++){var d=iu.decodeDigit(e,a,u,iu.L_AND_G_PATTERNS);n+=String.fromCharCode("0".charCodeAt(0)+d%10);try{for(var h=(o=void 0,au(a)),f=h.next();!f.done;f=h.next()){u+=f.value}}catch(t){o={error:t}}finally{try{f&&!f.done&&(i=h.return)&&i.call(h)}finally{if(o)throw o.error}}d>=10&&(c|=1<<4-l),4!==l&&(u=e.getNextSet(u),u=e.getNextUnset(u))}if(5!==n.length)throw new $a;var p=this.determineCheckDigit(c);if(t.extensionChecksum(n.toString())!==p)throw new $a;return u},t.extensionChecksum=function(t){for(var e=t.length,r=0,n=e-2;n>=0;n-=2)r+=t.charAt(n).charCodeAt(0)-"0".charCodeAt(0);r*=3;for(n=e-1;n>=0;n-=2)r+=t.charAt(n).charCodeAt(0)-"0".charCodeAt(0);return(r*=3)%10},t.prototype.determineCheckDigit=function(t){for(var e=0;e<10;e++)if(t===this.CHECK_DIGIT_ENCODINGS[e])return e;throw new $a},t.parseExtensionString=function(e){if(5!==e.length)return null;var r=t.parseExtension5String(e);return null==r?null:new Map([[ms.SUGGESTED_PRICE,r]])},t.parseExtension5String=function(t){var e;switch(t.charAt(0)){case"0":e="£";break;case"5":e="$";break;case"9":switch(t){case"90000":return null;case"99991":return"0.00";case"99990":return"Used"}e="";break;default:e=""}var r=parseInt(t.substring(1)),n=r%100;return e+(r/100).toString()+"."+(n<10?"0"+n:n.toString())},t}(),uu=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},cu=function(){function t(){this.decodeMiddleCounters=Int32Array.from([0,0,0,0]),this.decodeRowStringBuffer=""}return t.prototype.decodeRow=function(e,r,n){var o=this.decodeRowStringBuffer,i=this.decodeMiddle(r,n,o),a=o.toString(),s=t.parseExtensionString(a),u=[new Ns((n[0]+n[1])/2,e),new Ns(i,e)],c=new hs(a,null,0,u,ps.UPC_EAN_EXTENSION,(new Date).getTime());return null!=s&&c.putAllMetadata(s),c},t.prototype.decodeMiddle=function(t,e,r){var n,o,i=this.decodeMiddleCounters;i[0]=0,i[1]=0,i[2]=0,i[3]=0;for(var a=t.getSize(),s=e[1],u=0,c=0;c<2&&s<a;c++){var l=iu.decodeDigit(t,i,s,iu.L_AND_G_PATTERNS);r+=String.fromCharCode("0".charCodeAt(0)+l%10);try{for(var d=(n=void 0,uu(i)),h=d.next();!h.done;h=d.next()){s+=h.value}}catch(t){n={error:t}}finally{try{h&&!h.done&&(o=d.return)&&o.call(d)}finally{if(n)throw n.error}}l>=10&&(u|=1<<1-c),1!==c&&(s=t.getNextSet(s),s=t.getNextUnset(s))}if(2!==r.length)throw new $a;if(parseInt(r.toString())%4!==u)throw new $a;return s},t.parseExtensionString=function(t){return 2!==t.length?null:new Map([[ms.ISSUE_NUMBER,parseInt(t)]])},t}(),lu=function(){function t(){}return t.decodeRow=function(t,e,r){var n=iu.findGuardPattern(e,r,!1,this.EXTENSION_START_PATTERN,new Int32Array(this.EXTENSION_START_PATTERN.length).fill(0));try{return(new su).decodeRow(t,e,n)}catch(r){return(new cu).decodeRow(t,e,n)}},t.EXTENSION_START_PATTERN=Int32Array.from([1,1,2]),t}(),du=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),hu=function(t){function e(){var r=t.call(this)||this;r.decodeRowStringBuffer="",e.L_AND_G_PATTERNS=e.L_PATTERNS.map((function(t){return Int32Array.from(t)}));for(var n=10;n<20;n++){for(var o=e.L_PATTERNS[n-10],i=new Int32Array(o.length),a=0;a<o.length;a++)i[a]=o[o.length-a-1];e.L_AND_G_PATTERNS[n]=i}return r}return du(e,t),e.prototype.decodeRow=function(t,r,n){var o=e.findStartGuardPattern(r),i=null==n?null:n.get(La.NEED_RESULT_POINT_CALLBACK);if(null!=i){var a=new Ns((o[0]+o[1])/2,t);i.foundPossibleResultPoint(a)}var s=this.decodeMiddle(r,o,this.decodeRowStringBuffer),u=s.rowOffset,c=s.resultString;if(null!=i){var l=new Ns(u,t);i.foundPossibleResultPoint(l)}var d=e.decodeEnd(r,u);if(null!=i){var h=new Ns((d[0]+d[1])/2,t);i.foundPossibleResultPoint(h)}var f=d[1],p=f+(f-d[0]);if(p>=r.getSize()||!r.isRange(f,p,!1))throw new $a;var g=c.toString();if(g.length<8)throw new Ua;if(!e.checkChecksum(g))throw new Sa;var m=(o[1]+o[0])/2,y=(d[1]+d[0])/2,w=this.getBarcodeFormat(),_=[new Ns(m,t),new Ns(y,t)],v=new hs(g,null,0,_,w,(new Date).getTime()),E=0;try{var b=lu.decodeRow(t,r,d[1]);v.putMetadata(ms.UPC_EAN_EXTENSION,b.getText()),v.putAllMetadata(b.getResultMetadata()),v.addResultPoints(b.getResultPoints()),E=b.getText().length}catch(t){}var A=null==n?null:n.get(La.ALLOWED_EAN_EXTENSIONS);if(null!=A){var C=!1;for(var I in A)if(E.toString()===I){C=!0;break}if(!C)throw new $a}return w===ps.EAN_13||ps.UPC_A,v},e.checkChecksum=function(t){return e.checkStandardUPCEANChecksum(t)},e.checkStandardUPCEANChecksum=function(t){var r=t.length;if(0===r)return!1;var n=parseInt(t.charAt(r-1),10);return e.getStandardUPCEANChecksum(t.substring(0,r-1))===n},e.getStandardUPCEANChecksum=function(t){for(var e=t.length,r=0,n=e-1;n>=0;n-=2){if((o=t.charAt(n).charCodeAt(0)-"0".charCodeAt(0))<0||o>9)throw new Ua;r+=o}r*=3;for(n=e-2;n>=0;n-=2){var o;if((o=t.charAt(n).charCodeAt(0)-"0".charCodeAt(0))<0||o>9)throw new Ua;r+=o}return(1e3-r)%10},e.decodeEnd=function(t,r){return e.findGuardPattern(t,r,!1,e.START_END_PATTERN,new Int32Array(e.START_END_PATTERN.length).fill(0))},e}(iu),fu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),pu=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},gu=function(t){function e(){var e=t.call(this)||this;return e.decodeMiddleCounters=Int32Array.from([0,0,0,0]),e}return fu(e,t),e.prototype.decodeMiddle=function(t,r,n){var o,i,a,s,u=this.decodeMiddleCounters;u[0]=0,u[1]=0,u[2]=0,u[3]=0;for(var c=t.getSize(),l=r[1],d=0,h=0;h<6&&l<c;h++){var f=hu.decodeDigit(t,u,l,hu.L_AND_G_PATTERNS);n+=String.fromCharCode("0".charCodeAt(0)+f%10);try{for(var p=(o=void 0,pu(u)),g=p.next();!g.done;g=p.next()){l+=g.value}}catch(t){o={error:t}}finally{try{g&&!g.done&&(i=p.return)&&i.call(p)}finally{if(o)throw o.error}}f>=10&&(d|=1<<5-h)}n=e.determineFirstDigit(n,d),l=hu.findGuardPattern(t,l,!0,hu.MIDDLE_PATTERN,new Int32Array(hu.MIDDLE_PATTERN.length).fill(0))[1];for(h=0;h<6&&l<c;h++){f=hu.decodeDigit(t,u,l,hu.L_PATTERNS);n+=String.fromCharCode("0".charCodeAt(0)+f);try{for(var m=(a=void 0,pu(u)),y=m.next();!y.done;y=m.next()){l+=y.value}}catch(t){a={error:t}}finally{try{y&&!y.done&&(s=m.return)&&s.call(m)}finally{if(a)throw a.error}}}return{rowOffset:l,resultString:n}},e.prototype.getBarcodeFormat=function(){return ps.EAN_13},e.determineFirstDigit=function(t,e){for(var r=0;r<10;r++)if(e===this.FIRST_DIGIT_ENCODINGS[r])return t=String.fromCharCode("0".charCodeAt(0)+r)+t;throw new $a},e.FIRST_DIGIT_ENCODINGS=[0,11,13,14,19,25,28,21,22,26],e}(hu),mu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),yu=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},wu=function(t){function e(){var e=t.call(this)||this;return e.decodeMiddleCounters=Int32Array.from([0,0,0,0]),e}return mu(e,t),e.prototype.decodeMiddle=function(t,e,r){var n,o,i,a,s=this.decodeMiddleCounters;s[0]=0,s[1]=0,s[2]=0,s[3]=0;for(var u=t.getSize(),c=e[1],l=0;l<4&&c<u;l++){var d=hu.decodeDigit(t,s,c,hu.L_PATTERNS);r+=String.fromCharCode("0".charCodeAt(0)+d);try{for(var h=(n=void 0,yu(s)),f=h.next();!f.done;f=h.next()){c+=f.value}}catch(t){n={error:t}}finally{try{f&&!f.done&&(o=h.return)&&o.call(h)}finally{if(n)throw n.error}}}c=hu.findGuardPattern(t,c,!0,hu.MIDDLE_PATTERN,new Int32Array(hu.MIDDLE_PATTERN.length).fill(0))[1];for(l=0;l<4&&c<u;l++){d=hu.decodeDigit(t,s,c,hu.L_PATTERNS);r+=String.fromCharCode("0".charCodeAt(0)+d);try{for(var p=(i=void 0,yu(s)),g=p.next();!g.done;g=p.next()){c+=g.value}}catch(t){i={error:t}}finally{try{g&&!g.done&&(a=p.return)&&a.call(p)}finally{if(i)throw i.error}}}return{rowOffset:c,resultString:r}},e.prototype.getBarcodeFormat=function(){return ps.EAN_8},e}(hu),_u=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),vu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.ean13Reader=new gu,e}return _u(e,t),e.prototype.getBarcodeFormat=function(){return ps.UPC_A},e.prototype.decode=function(t,e){return this.maybeReturnResult(this.ean13Reader.decode(t))},e.prototype.decodeRow=function(t,e,r){return this.maybeReturnResult(this.ean13Reader.decodeRow(t,e,r))},e.prototype.decodeMiddle=function(t,e,r){return this.ean13Reader.decodeMiddle(t,e,r)},e.prototype.maybeReturnResult=function(t){var e=t.getText();if("0"===e.charAt(0)){var r=new hs(e.substring(1),null,null,t.getResultPoints(),ps.UPC_A);return null!=t.getResultMetadata()&&r.putAllMetadata(t.getResultMetadata()),r}throw new $a},e.prototype.reset=function(){this.ean13Reader.reset()},e}(hu),Eu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),bu=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Au=function(t){function e(){var e=t.call(this)||this;return e.decodeMiddleCounters=new Int32Array(4),e}return Eu(e,t),e.prototype.decodeMiddle=function(t,r,n){var o,i,a=this.decodeMiddleCounters.map((function(t){return t}));a[0]=0,a[1]=0,a[2]=0,a[3]=0;for(var s=t.getSize(),u=r[1],c=0,l=0;l<6&&u<s;l++){var d=e.decodeDigit(t,a,u,e.L_AND_G_PATTERNS);n+=String.fromCharCode("0".charCodeAt(0)+d%10);try{for(var h=(o=void 0,bu(a)),f=h.next();!f.done;f=h.next()){u+=f.value}}catch(t){o={error:t}}finally{try{f&&!f.done&&(i=h.return)&&i.call(h)}finally{if(o)throw o.error}}d>=10&&(c|=1<<5-l)}return e.determineNumSysAndCheckDigit(new Za(n),c),u},e.prototype.decodeEnd=function(t,r){return e.findGuardPatternWithoutCounters(t,r,!0,e.MIDDLE_END_PATTERN)},e.prototype.checkChecksum=function(t){return hu.checkChecksum(e.convertUPCEtoUPCA(t))},e.determineNumSysAndCheckDigit=function(t,e){for(var r=0;r<=1;r++)for(var n=0;n<10;n++)if(e===this.NUMSYS_AND_CHECK_DIGIT_PATTERNS[r][n])return t.insert(0,"0"+r),void t.append("0"+n);throw $a.getNotFoundInstance()},e.prototype.getBarcodeFormat=function(){return ps.UPC_E},e.convertUPCEtoUPCA=function(t){var e=t.slice(1,7).split("").map((function(t){return t.charCodeAt(0)})),r=new Za;r.append(t.charAt(0));var n=e[5];switch(n){case 0:case 1:case 2:r.appendChars(e,0,2),r.append(n),r.append("0000"),r.appendChars(e,2,3);break;case 3:r.appendChars(e,0,3),r.append("00000"),r.appendChars(e,3,2);break;case 4:r.appendChars(e,0,4),r.append("00000"),r.append(e[4]);break;default:r.appendChars(e,0,5),r.append("0000"),r.append(n)}return t.length>=8&&r.append(t.charAt(7)),r.toString()},e.MIDDLE_END_PATTERN=Int32Array.from([1,1,1,1,1,1]),e.NUMSYS_AND_CHECK_DIGIT_PATTERNS=[Int32Array.from([56,52,50,49,44,38,35,42,41,37]),Int32Array.from([7,11,13,14,19,25,28,21,22,1])],e}(hu),Cu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Iu=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Su=function(t){function e(e){var r=t.call(this)||this,n=null==e?null:e.get(La.POSSIBLE_FORMATS),o=[];return null!=n&&(n.indexOf(ps.EAN_13)>-1&&o.push(new gu),n.indexOf(ps.UPC_A)>-1&&o.push(new vu),n.indexOf(ps.EAN_8)>-1&&o.push(new wu),n.indexOf(ps.UPC_E)>-1&&o.push(new Au)),0===o.length&&(o.push(new gu),o.push(new vu),o.push(new wu),o.push(new Au)),r.readers=o,r}return Cu(e,t),e.prototype.decodeRow=function(t,e,r){var n,o;try{for(var i=Iu(this.readers),a=i.next();!a.done;a=i.next()){var s=a.value;try{var u=s.decodeRow(t,e,r),c=u.getBarcodeFormat()===ps.EAN_13&&"0"===u.getText().charAt(0),l=null==r?null:r.get(La.POSSIBLE_FORMATS),d=null==l||l.includes(ps.UPC_A);if(c&&d){var h=u.getRawBytes(),f=new hs(u.getText().substring(1),h,h?h.length:null,u.getResultPoints(),ps.UPC_A);return f.putAllMetadata(u.getResultMetadata()),f}return u}catch(t){}}}catch(t){n={error:t}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}throw new $a},e.prototype.reset=function(){var t,e;try{for(var r=Iu(this.readers),n=r.next();!n.done;n=r.next()){n.value.reset()}}catch(e){t={error:e}}finally{try{n&&!n.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}},e}(Xs),Tu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Du=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.CODA_BAR_CHAR_SET={nnnnnww:"0",nnnnwwn:"1",nnnwnnw:"2",wwnnnnn:"3",nnwnnwn:"4",wnnnnwn:"5",nwnnnnw:"6",nwnnwnn:"7",nwwnnnn:"8",wnnwnnn:"9",nnnwwnn:"-",nnwwnnn:"$",wnnnwnw:":",wnwnnnw:"/",wnwnwnn:".",nnwwwww:"+",nnwwnwn:"A",nwnwnnw:"B",nnnwnww:"C",nnnwwwn:"D"},e}return Tu(e,t),e.prototype.decodeRow=function(t,e,r){var n=this.getValidRowData(e);if(!n)throw new $a;var o=this.codaBarDecodeRow(n.row);if(!o)throw new $a;return new hs(o,null,0,[new Ns(n.left,t),new Ns(n.right,t)],ps.CODABAR,(new Date).getTime())},e.prototype.getValidRowData=function(t){var e=t.toArray(),r=e.indexOf(!0);if(-1===r)return null;var n=e.lastIndexOf(!0);if(n<=r)return null;for(var o=[],i=(e=e.slice(r,n+1))[0],a=1,s=1;s<e.length;s++)e[s]===i?a++:(i=e[s],o.push(a),a=1);return o.push(a),o.length<23&&(o.length+1)%8!=0?null:{row:o,left:r,right:n}},e.prototype.codaBarDecodeRow=function(t){for(var e=[],r=Math.ceil(t.reduce((function(t,e){return(t+e)/2}),0));t.length>0;){var n=t.splice(0,8).splice(0,7).map((function(t){return t<r?"n":"w"})).join("");if(void 0===this.CODA_BAR_CHAR_SET[n])return null;e.push(this.CODA_BAR_CHAR_SET[n])}var o=e.join("");return this.validCodaBarString(o)?o:null},e.prototype.validCodaBarString=function(t){return/^[A-D].{1,}[A-D]$/.test(t)},e}(Xs),Ou=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ru=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Mu=function(t){function e(){var e=t.call(this)||this;return e.decodeFinderCounters=new Int32Array(4),e.dataCharacterCounters=new Int32Array(8),e.oddRoundingErrors=new Array(4),e.evenRoundingErrors=new Array(4),e.oddCounts=new Array(e.dataCharacterCounters.length/2),e.evenCounts=new Array(e.dataCharacterCounters.length/2),e}return Ou(e,t),e.prototype.getDecodeFinderCounters=function(){return this.decodeFinderCounters},e.prototype.getDataCharacterCounters=function(){return this.dataCharacterCounters},e.prototype.getOddRoundingErrors=function(){return this.oddRoundingErrors},e.prototype.getEvenRoundingErrors=function(){return this.evenRoundingErrors},e.prototype.getOddCounts=function(){return this.oddCounts},e.prototype.getEvenCounts=function(){return this.evenCounts},e.prototype.parseFinderValue=function(t,r){for(var n=0;n<r.length;n++)if(Xs.patternMatchVariance(t,r[n],e.MAX_INDIVIDUAL_VARIANCE)<e.MAX_AVG_VARIANCE)return n;throw new $a},e.count=function(t){return Rs.sum(new Int32Array(t))},e.increment=function(t,e){for(var r=0,n=e[0],o=1;o<t.length;o++)e[o]>n&&(n=e[o],r=o);t[r]++},e.decrement=function(t,e){for(var r=0,n=e[0],o=1;o<t.length;o++)e[o]<n&&(n=e[o],r=o);t[r]--},e.isFinderPattern=function(t){var r,n,o=t[0]+t[1],i=o/(o+t[2]+t[3]);if(i>=e.MIN_FINDER_PATTERN_RATIO&&i<=e.MAX_FINDER_PATTERN_RATIO){var a=Number.MAX_SAFE_INTEGER,s=Number.MIN_SAFE_INTEGER;try{for(var u=Ru(t),c=u.next();!c.done;c=u.next()){var l=c.value;l>s&&(s=l),l<a&&(a=l)}}catch(t){r={error:t}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(r)throw r.error}}return s<10*a}return!1},e.MAX_AVG_VARIANCE=.2,e.MAX_INDIVIDUAL_VARIANCE=.45,e.MIN_FINDER_PATTERN_RATIO=9.5/12,e.MAX_FINDER_PATTERN_RATIO=12.5/14,e}(Xs),Nu=function(){function t(t,e){this.value=t,this.checksumPortion=e}return t.prototype.getValue=function(){return this.value},t.prototype.getChecksumPortion=function(){return this.checksumPortion},t.prototype.toString=function(){return this.value+"("+this.checksumPortion+")"},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.value===r.value&&this.checksumPortion===r.checksumPortion},t.prototype.hashCode=function(){return this.value^this.checksumPortion},t}(),ku=function(){function t(t,e,r,n,o){this.value=t,this.startEnd=e,this.value=t,this.startEnd=e,this.resultPoints=new Array,this.resultPoints.push(new Ns(r,o)),this.resultPoints.push(new Ns(n,o))}return t.prototype.getValue=function(){return this.value},t.prototype.getStartEnd=function(){return this.startEnd},t.prototype.getResultPoints=function(){return this.resultPoints},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.value===r.value},t.prototype.hashCode=function(){return this.value},t}(),xu=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Pu=function(){function t(){}return t.getRSSvalue=function(e,r,n){var o,i,a=0;try{for(var s=xu(e),u=s.next();!u.done;u=s.next()){a+=u.value}}catch(t){o={error:t}}finally{try{u&&!u.done&&(i=s.return)&&i.call(s)}finally{if(o)throw o.error}}for(var c=0,l=0,d=e.length,h=0;h<d-1;h++){var f=void 0;for(f=1,l|=1<<h;f<e[h];f++,l&=~(1<<h)){var p=t.combins(a-f-1,d-h-2);if(n&&0===l&&a-f-(d-h-1)>=d-h-1&&(p-=t.combins(a-f-(d-h),d-h-2)),d-h-1>1){for(var g=0,m=a-f-(d-h-2);m>r;m--)g+=t.combins(a-f-m-1,d-h-3);p-=g*(d-1-h)}else a-f>r&&p--;c+=p}a-=f}return c},t.combins=function(t,e){var r,n;t-e>e?(n=e,r=t-e):(n=t-e,r=e);for(var o=1,i=1,a=t;a>r;a--)o*=a,i<=n&&(o/=i,i++);for(;i<=n;)o/=i,i++;return o},t}(),Bu=function(){function t(){}return t.buildBitArray=function(t){var e=2*t.length-1;null==t[t.length-1].getRightChar()&&(e-=1);for(var r=new Ba(12*e),n=0,o=t[0].getRightChar().getValue(),i=11;i>=0;--i)o&1<<i&&r.set(n),n++;for(i=1;i<t.length;++i){for(var a=t[i],s=a.getLeftChar().getValue(),u=11;u>=0;--u)s&1<<u&&r.set(n),n++;if(null!==a.getRightChar()){var c=a.getRightChar().getValue();for(u=11;u>=0;--u)c&1<<u&&r.set(n),n++}}return r},t}(),Fu=function(){function t(t,e){e?this.decodedInformation=null:(this.finished=t,this.decodedInformation=e)}return t.prototype.getDecodedInformation=function(){return this.decodedInformation},t.prototype.isFinished=function(){return this.finished},t}(),Lu=function(){function t(t){this.newPosition=t}return t.prototype.getNewPosition=function(){return this.newPosition},t}(),zu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Uu=function(t){function e(e,r){var n=t.call(this,e)||this;return n.value=r,n}return zu(e,t),e.prototype.getValue=function(){return this.value},e.prototype.isFNC1=function(){return this.value===e.FNC1},e.FNC1="$",e}(Lu),Vu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Hu=function(t){function e(e,r,n){var o=t.call(this,e)||this;return n?(o.remaining=!0,o.remainingValue=o.remainingValue):(o.remaining=!1,o.remainingValue=0),o.newString=r,o}return Vu(e,t),e.prototype.getNewString=function(){return this.newString},e.prototype.isRemaining=function(){return this.remaining},e.prototype.getRemainingValue=function(){return this.remainingValue},e}(Lu),ju=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Gu=function(t){function e(e,r,n){var o=t.call(this,e)||this;if(r<0||r>10||n<0||n>10)throw new Ua;return o.firstDigit=r,o.secondDigit=n,o}return ju(e,t),e.prototype.getFirstDigit=function(){return this.firstDigit},e.prototype.getSecondDigit=function(){return this.secondDigit},e.prototype.getValue=function(){return 10*this.firstDigit+this.secondDigit},e.prototype.isFirstDigitFNC1=function(){return this.firstDigit===e.FNC1},e.prototype.isSecondDigitFNC1=function(){return this.secondDigit===e.FNC1},e.prototype.isAnyFNC1=function(){return this.firstDigit===e.FNC1||this.secondDigit===e.FNC1},e.FNC1=10,e}(Lu),Wu=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Xu=function(){function t(){}return t.parseFieldsInGeneralPurpose=function(e){var r,n,o,i,a,s,u,c;if(!e)return null;if(e.length<2)throw new $a;var l=e.substring(0,2);try{for(var d=Wu(t.TWO_DIGIT_DATA_LENGTH),h=d.next();!h.done;h=d.next()){if((E=h.value)[0]===l)return E[1]===t.VARIABLE_LENGTH?t.processVariableAI(2,E[2],e):t.processFixedAI(2,E[1],e)}}catch(t){r={error:t}}finally{try{h&&!h.done&&(n=d.return)&&n.call(d)}finally{if(r)throw r.error}}if(e.length<3)throw new $a;var f=e.substring(0,3);try{for(var p=Wu(t.THREE_DIGIT_DATA_LENGTH),g=p.next();!g.done;g=p.next()){if((E=g.value)[0]===f)return E[1]===t.VARIABLE_LENGTH?t.processVariableAI(3,E[2],e):t.processFixedAI(3,E[1],e)}}catch(t){o={error:t}}finally{try{g&&!g.done&&(i=p.return)&&i.call(p)}finally{if(o)throw o.error}}try{for(var m=Wu(t.THREE_DIGIT_PLUS_DIGIT_DATA_LENGTH),y=m.next();!y.done;y=m.next()){if((E=y.value)[0]===f)return E[1]===t.VARIABLE_LENGTH?t.processVariableAI(4,E[2],e):t.processFixedAI(4,E[1],e)}}catch(t){a={error:t}}finally{try{y&&!y.done&&(s=m.return)&&s.call(m)}finally{if(a)throw a.error}}if(e.length<4)throw new $a;var w=e.substring(0,4);try{for(var _=Wu(t.FOUR_DIGIT_DATA_LENGTH),v=_.next();!v.done;v=_.next()){var E;if((E=v.value)[0]===w)return E[1]===t.VARIABLE_LENGTH?t.processVariableAI(4,E[2],e):t.processFixedAI(4,E[1],e)}}catch(t){u={error:t}}finally{try{v&&!v.done&&(c=_.return)&&c.call(_)}finally{if(u)throw u.error}}throw new $a},t.processFixedAI=function(e,r,n){if(n.length<e)throw new $a;var o=n.substring(0,e);if(n.length<e+r)throw new $a;var i=n.substring(e,e+r),a=n.substring(e+r),s="("+o+")"+i,u=t.parseFieldsInGeneralPurpose(a);return null==u?s:s+u},t.processVariableAI=function(e,r,n){var o,i=n.substring(0,e);o=n.length<e+r?n.length:e+r;var a=n.substring(e,o),s=n.substring(o),u="("+i+")"+a,c=t.parseFieldsInGeneralPurpose(s);return null==c?u:u+c},t.VARIABLE_LENGTH=[],t.TWO_DIGIT_DATA_LENGTH=[["00",18],["01",14],["02",14],["10",t.VARIABLE_LENGTH,20],["11",6],["12",6],["13",6],["15",6],["17",6],["20",2],["21",t.VARIABLE_LENGTH,20],["22",t.VARIABLE_LENGTH,29],["30",t.VARIABLE_LENGTH,8],["37",t.VARIABLE_LENGTH,8],["90",t.VARIABLE_LENGTH,30],["91",t.VARIABLE_LENGTH,30],["92",t.VARIABLE_LENGTH,30],["93",t.VARIABLE_LENGTH,30],["94",t.VARIABLE_LENGTH,30],["95",t.VARIABLE_LENGTH,30],["96",t.VARIABLE_LENGTH,30],["97",t.VARIABLE_LENGTH,3],["98",t.VARIABLE_LENGTH,30],["99",t.VARIABLE_LENGTH,30]],t.THREE_DIGIT_DATA_LENGTH=[["240",t.VARIABLE_LENGTH,30],["241",t.VARIABLE_LENGTH,30],["242",t.VARIABLE_LENGTH,6],["250",t.VARIABLE_LENGTH,30],["251",t.VARIABLE_LENGTH,30],["253",t.VARIABLE_LENGTH,17],["254",t.VARIABLE_LENGTH,20],["400",t.VARIABLE_LENGTH,30],["401",t.VARIABLE_LENGTH,30],["402",17],["403",t.VARIABLE_LENGTH,30],["410",13],["411",13],["412",13],["413",13],["414",13],["420",t.VARIABLE_LENGTH,20],["421",t.VARIABLE_LENGTH,15],["422",3],["423",t.VARIABLE_LENGTH,15],["424",3],["425",3],["426",3]],t.THREE_DIGIT_PLUS_DIGIT_DATA_LENGTH=[["310",6],["311",6],["312",6],["313",6],["314",6],["315",6],["316",6],["320",6],["321",6],["322",6],["323",6],["324",6],["325",6],["326",6],["327",6],["328",6],["329",6],["330",6],["331",6],["332",6],["333",6],["334",6],["335",6],["336",6],["340",6],["341",6],["342",6],["343",6],["344",6],["345",6],["346",6],["347",6],["348",6],["349",6],["350",6],["351",6],["352",6],["353",6],["354",6],["355",6],["356",6],["357",6],["360",6],["361",6],["362",6],["363",6],["364",6],["365",6],["366",6],["367",6],["368",6],["369",6],["390",t.VARIABLE_LENGTH,15],["391",t.VARIABLE_LENGTH,18],["392",t.VARIABLE_LENGTH,15],["393",t.VARIABLE_LENGTH,18],["703",t.VARIABLE_LENGTH,30]],t.FOUR_DIGIT_DATA_LENGTH=[["7001",13],["7002",t.VARIABLE_LENGTH,30],["7003",10],["8001",14],["8002",t.VARIABLE_LENGTH,20],["8003",t.VARIABLE_LENGTH,30],["8004",t.VARIABLE_LENGTH,30],["8005",6],["8006",18],["8007",t.VARIABLE_LENGTH,30],["8008",t.VARIABLE_LENGTH,12],["8018",18],["8020",t.VARIABLE_LENGTH,25],["8100",6],["8101",10],["8102",2],["8110",t.VARIABLE_LENGTH,70],["8200",t.VARIABLE_LENGTH,70]],t}(),Yu=function(){function t(t){this.buffer=new Za,this.information=t}return t.prototype.decodeAllCodes=function(t,e){for(var r=e,n=null;;){var o=this.decodeGeneralPurposeField(r,n),i=Xu.parseFieldsInGeneralPurpose(o.getNewString());if(null!=i&&t.append(i),n=o.isRemaining()?""+o.getRemainingValue():null,r===o.getNewPosition())break;r=o.getNewPosition()}return t.toString()},t.prototype.isStillNumeric=function(t){if(t+7>this.information.getSize())return t+4<=this.information.getSize();for(var e=t;e<t+3;++e)if(this.information.get(e))return!0;return this.information.get(t+3)},t.prototype.decodeNumeric=function(t){if(t+7>this.information.getSize()){var e=this.extractNumericValueFromBitArray(t,4);return new Gu(this.information.getSize(),0===e?Gu.FNC1:e-1,Gu.FNC1)}var r=this.extractNumericValueFromBitArray(t,7);return new Gu(t+7,(r-8)/11,(r-8)%11)},t.prototype.extractNumericValueFromBitArray=function(e,r){return t.extractNumericValueFromBitArray(this.information,e,r)},t.extractNumericValueFromBitArray=function(t,e,r){for(var n=0,o=0;o<r;++o)t.get(e+o)&&(n|=1<<r-o-1);return n},t.prototype.decodeGeneralPurposeField=function(t,e){this.buffer.setLengthToZero(),null!=e&&this.buffer.append(e),this.current.setPosition(t);var r=this.parseBlocks();return null!=r&&r.isRemaining()?new Hu(this.current.getPosition(),this.buffer.toString(),r.getRemainingValue()):new Hu(this.current.getPosition(),this.buffer.toString())},t.prototype.parseBlocks=function(){var t,e;do{var r=this.current.getPosition();if(t=this.current.isAlpha()?(e=this.parseAlphaBlock()).isFinished():this.current.isIsoIec646()?(e=this.parseIsoIec646Block()).isFinished():(e=this.parseNumericBlock()).isFinished(),!(r!==this.current.getPosition())&&!t)break}while(!t);return e.getDecodedInformation()},t.prototype.parseNumericBlock=function(){for(;this.isStillNumeric(this.current.getPosition());){var t=this.decodeNumeric(this.current.getPosition());if(this.current.setPosition(t.getNewPosition()),t.isFirstDigitFNC1()){var e=void 0;return e=t.isSecondDigitFNC1()?new Hu(this.current.getPosition(),this.buffer.toString()):new Hu(this.current.getPosition(),this.buffer.toString(),t.getSecondDigit()),new Fu(!0,e)}if(this.buffer.append(t.getFirstDigit()),t.isSecondDigitFNC1()){e=new Hu(this.current.getPosition(),this.buffer.toString());return new Fu(!0,e)}this.buffer.append(t.getSecondDigit())}return this.isNumericToAlphaNumericLatch(this.current.getPosition())&&(this.current.setAlpha(),this.current.incrementPosition(4)),new Fu(!1)},t.prototype.parseIsoIec646Block=function(){for(;this.isStillIsoIec646(this.current.getPosition());){var t=this.decodeIsoIec646(this.current.getPosition());if(this.current.setPosition(t.getNewPosition()),t.isFNC1()){var e=new Hu(this.current.getPosition(),this.buffer.toString());return new Fu(!0,e)}this.buffer.append(t.getValue())}return this.isAlphaOr646ToNumericLatch(this.current.getPosition())?(this.current.incrementPosition(3),this.current.setNumeric()):this.isAlphaTo646ToAlphaLatch(this.current.getPosition())&&(this.current.getPosition()+5<this.information.getSize()?this.current.incrementPosition(5):this.current.setPosition(this.information.getSize()),this.current.setAlpha()),new Fu(!1)},t.prototype.parseAlphaBlock=function(){for(;this.isStillAlpha(this.current.getPosition());){var t=this.decodeAlphanumeric(this.current.getPosition());if(this.current.setPosition(t.getNewPosition()),t.isFNC1()){var e=new Hu(this.current.getPosition(),this.buffer.toString());return new Fu(!0,e)}this.buffer.append(t.getValue())}return this.isAlphaOr646ToNumericLatch(this.current.getPosition())?(this.current.incrementPosition(3),this.current.setNumeric()):this.isAlphaTo646ToAlphaLatch(this.current.getPosition())&&(this.current.getPosition()+5<this.information.getSize()?this.current.incrementPosition(5):this.current.setPosition(this.information.getSize()),this.current.setIsoIec646()),new Fu(!1)},t.prototype.isStillIsoIec646=function(t){if(t+5>this.information.getSize())return!1;var e=this.extractNumericValueFromBitArray(t,5);if(e>=5&&e<16)return!0;if(t+7>this.information.getSize())return!1;var r=this.extractNumericValueFromBitArray(t,7);if(r>=64&&r<116)return!0;if(t+8>this.information.getSize())return!1;var n=this.extractNumericValueFromBitArray(t,8);return n>=232&&n<253},t.prototype.decodeIsoIec646=function(t){var e=this.extractNumericValueFromBitArray(t,5);if(15===e)return new Uu(t+5,Uu.FNC1);if(e>=5&&e<15)return new Uu(t+5,"0"+(e-5));var r,n=this.extractNumericValueFromBitArray(t,7);if(n>=64&&n<90)return new Uu(t+7,""+(n+1));if(n>=90&&n<116)return new Uu(t+7,""+(n+7));switch(this.extractNumericValueFromBitArray(t,8)){case 232:r="!";break;case 233:r='"';break;case 234:r="%";break;case 235:r="&";break;case 236:r="'";break;case 237:r="(";break;case 238:r=")";break;case 239:r="*";break;case 240:r="+";break;case 241:r=",";break;case 242:r="-";break;case 243:r=".";break;case 244:r="/";break;case 245:r=":";break;case 246:r=";";break;case 247:r="<";break;case 248:r="=";break;case 249:r=">";break;case 250:r="?";break;case 251:r="_";break;case 252:r=" ";break;default:throw new Ua}return new Uu(t+8,r)},t.prototype.isStillAlpha=function(t){if(t+5>this.information.getSize())return!1;var e=this.extractNumericValueFromBitArray(t,5);if(e>=5&&e<16)return!0;if(t+6>this.information.getSize())return!1;var r=this.extractNumericValueFromBitArray(t,6);return r>=16&&r<63},t.prototype.decodeAlphanumeric=function(t){var e=this.extractNumericValueFromBitArray(t,5);if(15===e)return new Uu(t+5,Uu.FNC1);if(e>=5&&e<15)return new Uu(t+5,"0"+(e-5));var r,n=this.extractNumericValueFromBitArray(t,6);if(n>=32&&n<58)return new Uu(t+6,""+(n+33));switch(n){case 58:r="*";break;case 59:r=",";break;case 60:r="-";break;case 61:r=".";break;case 62:r="/";break;default:throw new Ts("Decoding invalid alphanumeric value: "+n)}return new Uu(t+6,r)},t.prototype.isAlphaTo646ToAlphaLatch=function(t){if(t+1>this.information.getSize())return!1;for(var e=0;e<5&&e+t<this.information.getSize();++e)if(2===e){if(!this.information.get(t+2))return!1}else if(this.information.get(t+e))return!1;return!0},t.prototype.isAlphaOr646ToNumericLatch=function(t){if(t+3>this.information.getSize())return!1;for(var e=t;e<t+3;++e)if(this.information.get(e))return!1;return!0},t.prototype.isNumericToAlphaNumericLatch=function(t){if(t+1>this.information.getSize())return!1;for(var e=0;e<4&&e+t<this.information.getSize();++e)if(this.information.get(t+e))return!1;return!0},t}(),Zu=function(){function t(t){this.information=t,this.generalDecoder=new Yu(t)}return t.prototype.getInformation=function(){return this.information},t.prototype.getGeneralDecoder=function(){return this.generalDecoder},t}(),qu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ku=function(t){function e(e){return t.call(this,e)||this}return qu(e,t),e.prototype.encodeCompressedGtin=function(t,e){t.append("(01)");var r=t.length();t.append("9"),this.encodeCompressedGtinWithoutAI(t,e,r)},e.prototype.encodeCompressedGtinWithoutAI=function(t,r,n){for(var o=0;o<4;++o){var i=this.getGeneralDecoder().extractNumericValueFromBitArray(r+10*o,10);i/100==0&&t.append("0"),i/10==0&&t.append("0"),t.append(i)}e.appendCheckDigit(t,n)},e.appendCheckDigit=function(t,e){for(var r=0,n=0;n<13;n++){var o=t.charAt(n+e).charCodeAt(0)-"0".charCodeAt(0);r+=1&n?o:3*o}10===(r=10-r%10)&&(r=0),t.append(r)},e.GTIN_SIZE=40,e}(Zu),$u=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ju=function(t){function e(e){return t.call(this,e)||this}return $u(e,t),e.prototype.parseInformation=function(){var t=new Za;t.append("(01)");var r=t.length(),n=this.getGeneralDecoder().extractNumericValueFromBitArray(e.HEADER_SIZE,4);return t.append(n),this.encodeCompressedGtinWithoutAI(t,e.HEADER_SIZE+4,r),this.getGeneralDecoder().decodeAllCodes(t,e.HEADER_SIZE+44)},e.HEADER_SIZE=4,e}(Ku),Qu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),tc=function(t){function e(e){return t.call(this,e)||this}return Qu(e,t),e.prototype.parseInformation=function(){var t=new Za;return this.getGeneralDecoder().decodeAllCodes(t,e.HEADER_SIZE)},e.HEADER_SIZE=5,e}(Zu),ec=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),rc=function(t){function e(e){return t.call(this,e)||this}return ec(e,t),e.prototype.encodeCompressedWeight=function(t,e,r){var n=this.getGeneralDecoder().extractNumericValueFromBitArray(e,r);this.addWeightCode(t,n);for(var o=this.checkWeight(n),i=1e5,a=0;a<5;++a)o/i==0&&t.append("0"),i/=10;t.append(o)},e}(Ku),nc=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),oc=function(t){function e(e){return t.call(this,e)||this}return nc(e,t),e.prototype.parseInformation=function(){if(this.getInformation().getSize()!==e.HEADER_SIZE+rc.GTIN_SIZE+e.WEIGHT_SIZE)throw new $a;var t=new Za;return this.encodeCompressedGtin(t,e.HEADER_SIZE),this.encodeCompressedWeight(t,e.HEADER_SIZE+rc.GTIN_SIZE,e.WEIGHT_SIZE),t.toString()},e.HEADER_SIZE=5,e.WEIGHT_SIZE=15,e}(rc),ic=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),ac=function(t){function e(e){return t.call(this,e)||this}return ic(e,t),e.prototype.addWeightCode=function(t,e){t.append("(3103)")},e.prototype.checkWeight=function(t){return t},e}(oc),sc=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),uc=function(t){function e(e){return t.call(this,e)||this}return sc(e,t),e.prototype.addWeightCode=function(t,e){e<1e4?t.append("(3202)"):t.append("(3203)")},e.prototype.checkWeight=function(t){return t<1e4?t:t-1e4},e}(oc),cc=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),lc=function(t){function e(e){return t.call(this,e)||this}return cc(e,t),e.prototype.parseInformation=function(){if(this.getInformation().getSize()<e.HEADER_SIZE+Ku.GTIN_SIZE)throw new $a;var t=new Za;this.encodeCompressedGtin(t,e.HEADER_SIZE);var r=this.getGeneralDecoder().extractNumericValueFromBitArray(e.HEADER_SIZE+Ku.GTIN_SIZE,e.LAST_DIGIT_SIZE);t.append("(392"),t.append(r),t.append(")");var n=this.getGeneralDecoder().decodeGeneralPurposeField(e.HEADER_SIZE+Ku.GTIN_SIZE+e.LAST_DIGIT_SIZE,null);return t.append(n.getNewString()),t.toString()},e.HEADER_SIZE=8,e.LAST_DIGIT_SIZE=2,e}(Ku),dc=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),hc=function(t){function e(e){return t.call(this,e)||this}return dc(e,t),e.prototype.parseInformation=function(){if(this.getInformation().getSize()<e.HEADER_SIZE+Ku.GTIN_SIZE)throw new $a;var t=new Za;this.encodeCompressedGtin(t,e.HEADER_SIZE);var r=this.getGeneralDecoder().extractNumericValueFromBitArray(e.HEADER_SIZE+Ku.GTIN_SIZE,e.LAST_DIGIT_SIZE);t.append("(393"),t.append(r),t.append(")");var n=this.getGeneralDecoder().extractNumericValueFromBitArray(e.HEADER_SIZE+Ku.GTIN_SIZE+e.LAST_DIGIT_SIZE,e.FIRST_THREE_DIGITS_SIZE);n/100==0&&t.append("0"),n/10==0&&t.append("0"),t.append(n);var o=this.getGeneralDecoder().decodeGeneralPurposeField(e.HEADER_SIZE+Ku.GTIN_SIZE+e.LAST_DIGIT_SIZE+e.FIRST_THREE_DIGITS_SIZE,null);return t.append(o.getNewString()),t.toString()},e.HEADER_SIZE=8,e.LAST_DIGIT_SIZE=2,e.FIRST_THREE_DIGITS_SIZE=10,e}(Ku),fc=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),pc=function(t){function e(e,r,n){var o=t.call(this,e)||this;return o.dateCode=n,o.firstAIdigits=r,o}return fc(e,t),e.prototype.parseInformation=function(){if(this.getInformation().getSize()!==e.HEADER_SIZE+e.GTIN_SIZE+e.WEIGHT_SIZE+e.DATE_SIZE)throw new $a;var t=new Za;return this.encodeCompressedGtin(t,e.HEADER_SIZE),this.encodeCompressedWeight(t,e.HEADER_SIZE+e.GTIN_SIZE,e.WEIGHT_SIZE),this.encodeCompressedDate(t,e.HEADER_SIZE+e.GTIN_SIZE+e.WEIGHT_SIZE),t.toString()},e.prototype.encodeCompressedDate=function(t,r){var n=this.getGeneralDecoder().extractNumericValueFromBitArray(r,e.DATE_SIZE);if(38400!==n){t.append("("),t.append(this.dateCode),t.append(")");var o=n%32,i=(n/=32)%12+1,a=n/=12;a/10==0&&t.append("0"),t.append(a),i/10==0&&t.append("0"),t.append(i),o/10==0&&t.append("0"),t.append(o)}},e.prototype.addWeightCode=function(t,e){t.append("("),t.append(this.firstAIdigits),t.append(e/1e5),t.append(")")},e.prototype.checkWeight=function(t){return t%1e5},e.HEADER_SIZE=8,e.WEIGHT_SIZE=20,e.DATE_SIZE=16,e}(rc);var gc=function(){function t(t,e,r,n){this.leftchar=t,this.rightchar=e,this.finderpattern=r,this.maybeLast=n}return t.prototype.mayBeLast=function(){return this.maybeLast},t.prototype.getLeftChar=function(){return this.leftchar},t.prototype.getRightChar=function(){return this.rightchar},t.prototype.getFinderPattern=function(){return this.finderpattern},t.prototype.mustBeLast=function(){return null==this.rightchar},t.prototype.toString=function(){return"[ "+this.leftchar+", "+this.rightchar+" : "+(null==this.finderpattern?"null":this.finderpattern.getValue())+" ]"},t.equals=function(e,r){return e instanceof t&&(t.equalsOrNull(e.leftchar,r.leftchar)&&t.equalsOrNull(e.rightchar,r.rightchar)&&t.equalsOrNull(e.finderpattern,r.finderpattern))},t.equalsOrNull=function(e,r){return null===e?null===r:t.equals(e,r)},t.prototype.hashCode=function(){return this.leftchar.getValue()^this.rightchar.getValue()^this.finderpattern.getValue()},t}(),mc=function(){function t(t,e,r){this.pairs=t,this.rowNumber=e,this.wasReversed=r}return t.prototype.getPairs=function(){return this.pairs},t.prototype.getRowNumber=function(){return this.rowNumber},t.prototype.isReversed=function(){return this.wasReversed},t.prototype.isEquivalent=function(t){return this.checkEqualitity(this,t)},t.prototype.toString=function(){return"{ "+this.pairs+" }"},t.prototype.equals=function(e,r){return e instanceof t&&(this.checkEqualitity(e,r)&&e.wasReversed===r.wasReversed)},t.prototype.checkEqualitity=function(t,e){var r;if(t&&e)return t.forEach((function(t,n){e.forEach((function(e){t.getLeftChar().getValue()===e.getLeftChar().getValue()&&t.getRightChar().getValue()===e.getRightChar().getValue()&&t.getFinderPatter().getValue()===e.getFinderPatter().getValue()&&(r=!0)}))})),r},t}(),yc=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),wc=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},_c=function(t){function e(){var r=null!==t&&t.apply(this,arguments)||this;return r.pairs=new Array(e.MAX_PAIRS),r.rows=new Array,r.startEnd=[2],r}return yc(e,t),e.prototype.decodeRow=function(t,r,n){this.pairs.length=0,this.startFromEven=!1;try{return e.constructResult(this.decodeRow2pairs(t,r))}catch(t){}return this.pairs.length=0,this.startFromEven=!0,e.constructResult(this.decodeRow2pairs(t,r))},e.prototype.reset=function(){this.pairs.length=0,this.rows.length=0},e.prototype.decodeRow2pairs=function(t,e){for(var r,n=!1;!n;)try{this.pairs.push(this.retrieveNextPair(e,this.pairs,t))}catch(t){if(t instanceof $a){if(!this.pairs.length)throw new $a;n=!0}}if(this.checkChecksum())return this.pairs;if(r=!!this.rows.length,this.storeRow(t,!1),r){var o=this.checkRowsBoolean(!1);if(null!=o)return o;if(null!=(o=this.checkRowsBoolean(!0)))return o}throw new $a},e.prototype.checkRowsBoolean=function(t){if(this.rows.length>25)return this.rows.length=0,null;this.pairs.length=0,t&&(this.rows=this.rows.reverse());var e=null;try{e=this.checkRows(new Array,0)}catch(t){console.log(t)}return t&&(this.rows=this.rows.reverse()),e},e.prototype.checkRows=function(t,r){for(var n,o,i=r;i<this.rows.length;i++){var a=this.rows[i];this.pairs.length=0;try{for(var s=(n=void 0,wc(t)),u=s.next();!u.done;u=s.next()){var c=u.value;this.pairs.push(c.getPairs())}}catch(t){n={error:t}}finally{try{u&&!u.done&&(o=s.return)&&o.call(s)}finally{if(n)throw n.error}}if(this.pairs.push(a.getPairs()),e.isValidSequence(this.pairs)){if(this.checkChecksum())return this.pairs;var l=new Array(t);l.push(a);try{return this.checkRows(l,i+1)}catch(t){console.log(t)}}}throw new $a},e.isValidSequence=function(t){var r,n;try{for(var o=wc(e.FINDER_PATTERN_SEQUENCES),i=o.next();!i.done;i=o.next()){var a=i.value;if(!(t.length>a.length)){for(var s=!0,u=0;u<t.length;u++)if(t[u].getFinderPattern().getValue()!==a[u]){s=!1;break}if(s)return!0}}}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return!1},e.prototype.storeRow=function(t,r){for(var n=0,o=!1,i=!1;n<this.rows.length;){var a=this.rows[n];if(a.getRowNumber()>t){i=a.isEquivalent(this.pairs);break}o=a.isEquivalent(this.pairs),n++}i||o||e.isPartialRow(this.pairs,this.rows)||(this.rows.push(n,new mc(this.pairs,t,r)),this.removePartialRows(this.pairs,this.rows))},e.prototype.removePartialRows=function(t,e){var r,n,o,i,a,s;try{for(var u=wc(e),c=u.next();!c.done;c=u.next()){var l=c.value;if(l.getPairs().length!==t.length){try{for(var d=(o=void 0,wc(l.getPairs())),h=d.next();!h.done;h=d.next()){var f=h.value,p=!1;try{for(var g=(a=void 0,wc(t)),m=g.next();!m.done;m=g.next()){var y=m.value;if(gc.equals(f,y)){p=!0;break}}}catch(t){a={error:t}}finally{try{m&&!m.done&&(s=g.return)&&s.call(g)}finally{if(a)throw a.error}}p||!1}}catch(t){o={error:t}}finally{try{h&&!h.done&&(i=d.return)&&i.call(d)}finally{if(o)throw o.error}}}}}catch(t){r={error:t}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(r)throw r.error}}},e.isPartialRow=function(t,e){var r,n,o,i,a,s;try{for(var u=wc(e),c=u.next();!c.done;c=u.next()){var l=c.value,d=!0;try{for(var h=(o=void 0,wc(t)),f=h.next();!f.done;f=h.next()){var p=f.value,g=!1;try{for(var m=(a=void 0,wc(l.getPairs())),y=m.next();!y.done;y=m.next()){var w=y.value;if(p.equals(w)){g=!0;break}}}catch(t){a={error:t}}finally{try{y&&!y.done&&(s=m.return)&&s.call(m)}finally{if(a)throw a.error}}if(!g){d=!1;break}}}catch(t){o={error:t}}finally{try{f&&!f.done&&(i=h.return)&&i.call(h)}finally{if(o)throw o.error}}if(d)return!0}}catch(t){r={error:t}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(r)throw r.error}}return!1},e.prototype.getRows=function(){return this.rows},e.constructResult=function(t){var e=function(t){try{if(t.get(1))return new Ju(t);if(!t.get(2))return new tc(t);switch(Yu.extractNumericValueFromBitArray(t,1,4)){case 4:return new ac(t);case 5:return new uc(t)}switch(Yu.extractNumericValueFromBitArray(t,1,5)){case 12:return new lc(t);case 13:return new hc(t)}switch(Yu.extractNumericValueFromBitArray(t,1,7)){case 56:return new pc(t,"310","11");case 57:return new pc(t,"320","11");case 58:return new pc(t,"310","13");case 59:return new pc(t,"320","13");case 60:return new pc(t,"310","15");case 61:return new pc(t,"320","15");case 62:return new pc(t,"310","17");case 63:return new pc(t,"320","17")}}catch(e){throw console.log(e),new Ts("unknown decoder: "+t)}}(Bu.buildBitArray(t)).parseInformation(),r=t[0].getFinderPattern().getResultPoints(),n=t[t.length-1].getFinderPattern().getResultPoints(),o=[r[0],r[1],n[0],n[1]];return new hs(e,null,null,o,ps.RSS_EXPANDED,null)},e.prototype.checkChecksum=function(){var t=this.pairs.get(0),e=t.getLeftChar(),r=t.getRightChar();if(null===r)return!1;for(var n=r.getChecksumPortion(),o=2,i=1;i<this.pairs.size();++i){var a=this.pairs.get(i);n+=a.getLeftChar().getChecksumPortion(),o++;var s=a.getRightChar();null!=s&&(n+=s.getChecksumPortion(),o++)}return 211*(o-4)+(n%=211)===e.getValue()},e.getNextSecondBar=function(t,e){var r;return t.get(e)?(r=t.getNextUnset(e),r=t.getNextSet(r)):(r=t.getNextSet(e),r=t.getNextUnset(r)),r},e.prototype.retrieveNextPair=function(t,r,n){var o,i=r.length%2==0;this.startFromEven&&(i=!i);var a=!0,s=-1;do{this.findNextPair(t,r,s),null===(o=this.parseFoundFinderPattern(t,n,i))?s=e.getNextSecondBar(t,this.startEnd[0]):a=!1}while(a);var u,c=this.decodeDataCharacter(t,o,i,!0);if(!this.isEmptyPair(r)&&r[r.length-1].mustBeLast())throw new $a;try{u=this.decodeDataCharacter(t,o,i,!1)}catch(t){u=null,console.log(t)}return new gc(c,u,o,!0)},e.prototype.isEmptyPair=function(t){return 0===t.length},e.prototype.findNextPair=function(t,r,n){var o=this.getDecodeFinderCounters();o[0]=0,o[1]=0,o[2]=0,o[3]=0;var i,a=t.getSize();if(n>=0)i=n;else if(this.isEmptyPair(r))i=0;else{i=r[r.length-1].getFinderPattern().getStartEnd()[1]}var s=r.length%2!=0;this.startFromEven&&(s=!s);for(var u=!1;i<a&&(u=!t.get(i));)i++;for(var c=0,l=i,d=i;d<a;d++)if(t.get(d)!==u)o[c]++;else{if(3===c){if(s&&e.reverseCounters(o),e.isFinderPattern(o))return this.startEnd[0]=l,void(this.startEnd[1]=d);s&&e.reverseCounters(o),l+=o[0]+o[1],o[0]=o[2],o[1]=o[3],o[2]=0,o[3]=0,c--}else c++;o[c]=1,u=!u}throw new $a},e.reverseCounters=function(t){for(var e=t.length,r=0;r<e/2;++r){var n=t[r];t[r]=t[e-r-1],t[e-r-1]=n}},e.prototype.parseFoundFinderPattern=function(t,r,n){var o,i,a;if(n){for(var s=this.startEnd[0]-1;s>=0&&!t.get(s);)s--;s++,o=this.startEnd[0]-s,i=s,a=this.startEnd[1]}else i=this.startEnd[0],o=(a=t.getNextUnset(this.startEnd[1]+1))-this.startEnd[1];var u,c=this.getDecodeFinderCounters();Da.arraycopy(c,0,c,1,c.length-1),c[0]=o;try{u=this.parseFinderValue(c,e.FINDER_PATTERNS)}catch(t){return null}return new ku(u,[i,a],i,a,r)},e.prototype.decodeDataCharacter=function(t,r,n,o){for(var i=this.getDataCharacterCounters(),a=0;a<i.length;a++)i[a]=0;if(o)e.recordPatternInReverse(t,r.getStartEnd()[0],i);else{e.recordPattern(t,r.getStartEnd()[1],i);for(var s=0,u=i.length-1;s<u;s++,u--){var c=i[s];i[s]=i[u],i[u]=c}}var l=Rs.sum(new Int32Array(i))/17,d=(r.getStartEnd()[1]-r.getStartEnd()[0])/15;if(Math.abs(l-d)/d>.3)throw new $a;var h=this.getOddCounts(),f=this.getEvenCounts(),p=this.getOddRoundingErrors(),g=this.getEvenRoundingErrors();for(s=0;s<i.length;s++){var m=1*i[s]/l,y=m+.5;if(y<1){if(m<.3)throw new $a;y=1}else if(y>8){if(m>8.7)throw new $a;y=8}var w=s/2;1&s?(f[w]=y,g[w]=m-y):(h[w]=y,p[w]=m-y)}this.adjustOddEvenCounts(17);var _=4*r.getValue()+(n?0:2)+(o?0:1)-1,v=0,E=0;for(s=h.length-1;s>=0;s--){if(e.isNotA1left(r,n,o)){var b=e.WEIGHTS[_][2*s];E+=h[s]*b}v+=h[s]}var A=0;for(s=f.length-1;s>=0;s--)if(e.isNotA1left(r,n,o)){b=e.WEIGHTS[_][2*s+1];A+=f[s]*b}var C=E+A;if(1&v||v>13||v<4)throw new $a;var I=(13-v)/2,S=e.SYMBOL_WIDEST[I],T=9-S,D=Pu.getRSSvalue(h,S,!0),O=Pu.getRSSvalue(f,T,!1),R=e.EVEN_TOTAL_SUBSET[I],M=e.GSUM[I];return new Nu(D*R+O+M,C)},e.isNotA1left=function(t,e,r){return!(0===t.getValue()&&e&&r)},e.prototype.adjustOddEvenCounts=function(t){var r=Rs.sum(new Int32Array(this.getOddCounts())),n=Rs.sum(new Int32Array(this.getEvenCounts())),o=!1,i=!1;r>13?i=!0:r<4&&(o=!0);var a=!1,s=!1;n>13?s=!0:n<4&&(a=!0);var u=r+n-t,c=!(1&~r),l=!(1&n);if(1===u)if(c){if(l)throw new $a;i=!0}else{if(!l)throw new $a;s=!0}else if(-1===u)if(c){if(l)throw new $a;o=!0}else{if(!l)throw new $a;a=!0}else{if(0!==u)throw new $a;if(c){if(!l)throw new $a;r<n?(o=!0,s=!0):(i=!0,a=!0)}else if(l)throw new $a}if(o){if(i)throw new $a;e.increment(this.getOddCounts(),this.getOddRoundingErrors())}if(i&&e.decrement(this.getOddCounts(),this.getOddRoundingErrors()),a){if(s)throw new $a;e.increment(this.getEvenCounts(),this.getOddRoundingErrors())}s&&e.decrement(this.getEvenCounts(),this.getEvenRoundingErrors())},e.SYMBOL_WIDEST=[7,5,4,3,1],e.EVEN_TOTAL_SUBSET=[4,20,52,104,204],e.GSUM=[0,348,1388,2948,3988],e.FINDER_PATTERNS=[Int32Array.from([1,8,4,1]),Int32Array.from([3,6,4,1]),Int32Array.from([3,4,6,1]),Int32Array.from([3,2,8,1]),Int32Array.from([2,6,5,1]),Int32Array.from([2,2,9,1])],e.WEIGHTS=[[1,3,9,27,81,32,96,77],[20,60,180,118,143,7,21,63],[189,145,13,39,117,140,209,205],[193,157,49,147,19,57,171,91],[62,186,136,197,169,85,44,132],[185,133,188,142,4,12,36,108],[113,128,173,97,80,29,87,50],[150,28,84,41,123,158,52,156],[46,138,203,187,139,206,196,166],[76,17,51,153,37,111,122,155],[43,129,176,106,107,110,119,146],[16,48,144,10,30,90,59,177],[109,116,137,200,178,112,125,164],[70,210,208,202,184,130,179,115],[134,191,151,31,93,68,204,190],[148,22,66,198,172,94,71,2],[6,18,54,162,64,192,154,40],[120,149,25,75,14,42,126,167],[79,26,78,23,69,207,199,175],[103,98,83,38,114,131,182,124],[161,61,183,127,170,88,53,159],[55,165,73,8,24,72,5,15],[45,135,194,160,58,174,100,89]],e.FINDER_PAT_A=0,e.FINDER_PAT_B=1,e.FINDER_PAT_C=2,e.FINDER_PAT_D=3,e.FINDER_PAT_E=4,e.FINDER_PAT_F=5,e.FINDER_PATTERN_SEQUENCES=[[e.FINDER_PAT_A,e.FINDER_PAT_A],[e.FINDER_PAT_A,e.FINDER_PAT_B,e.FINDER_PAT_B],[e.FINDER_PAT_A,e.FINDER_PAT_C,e.FINDER_PAT_B,e.FINDER_PAT_D],[e.FINDER_PAT_A,e.FINDER_PAT_E,e.FINDER_PAT_B,e.FINDER_PAT_D,e.FINDER_PAT_C],[e.FINDER_PAT_A,e.FINDER_PAT_E,e.FINDER_PAT_B,e.FINDER_PAT_D,e.FINDER_PAT_D,e.FINDER_PAT_F],[e.FINDER_PAT_A,e.FINDER_PAT_E,e.FINDER_PAT_B,e.FINDER_PAT_D,e.FINDER_PAT_E,e.FINDER_PAT_F,e.FINDER_PAT_F],[e.FINDER_PAT_A,e.FINDER_PAT_A,e.FINDER_PAT_B,e.FINDER_PAT_B,e.FINDER_PAT_C,e.FINDER_PAT_C,e.FINDER_PAT_D,e.FINDER_PAT_D],[e.FINDER_PAT_A,e.FINDER_PAT_A,e.FINDER_PAT_B,e.FINDER_PAT_B,e.FINDER_PAT_C,e.FINDER_PAT_C,e.FINDER_PAT_D,e.FINDER_PAT_E,e.FINDER_PAT_E],[e.FINDER_PAT_A,e.FINDER_PAT_A,e.FINDER_PAT_B,e.FINDER_PAT_B,e.FINDER_PAT_C,e.FINDER_PAT_C,e.FINDER_PAT_D,e.FINDER_PAT_E,e.FINDER_PAT_F,e.FINDER_PAT_F],[e.FINDER_PAT_A,e.FINDER_PAT_A,e.FINDER_PAT_B,e.FINDER_PAT_B,e.FINDER_PAT_C,e.FINDER_PAT_D,e.FINDER_PAT_D,e.FINDER_PAT_E,e.FINDER_PAT_E,e.FINDER_PAT_F,e.FINDER_PAT_F]],e.MAX_PAIRS=11,e}(Mu),vc=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ec=function(t){function e(e,r,n){var o=t.call(this,e,r)||this;return o.count=0,o.finderPattern=n,o}return vc(e,t),e.prototype.getFinderPattern=function(){return this.finderPattern},e.prototype.getCount=function(){return this.count},e.prototype.incrementCount=function(){this.count++},e}(Nu),bc=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ac=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Cc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.possibleLeftPairs=[],e.possibleRightPairs=[],e}return bc(e,t),e.prototype.decodeRow=function(t,r,n){var o,i,a,s,u=this.decodePair(r,!1,t,n);e.addOrTally(this.possibleLeftPairs,u),r.reverse();var c=this.decodePair(r,!0,t,n);e.addOrTally(this.possibleRightPairs,c),r.reverse();try{for(var l=Ac(this.possibleLeftPairs),d=l.next();!d.done;d=l.next()){var h=d.value;if(h.getCount()>1)try{for(var f=(a=void 0,Ac(this.possibleRightPairs)),p=f.next();!p.done;p=f.next()){var g=p.value;if(g.getCount()>1&&e.checkChecksum(h,g))return e.constructResult(h,g)}}catch(t){a={error:t}}finally{try{p&&!p.done&&(s=f.return)&&s.call(f)}finally{if(a)throw a.error}}}}catch(t){o={error:t}}finally{try{d&&!d.done&&(i=l.return)&&i.call(l)}finally{if(o)throw o.error}}throw new $a},e.addOrTally=function(t,e){var r,n;if(null!=e){var o=!1;try{for(var i=Ac(t),a=i.next();!a.done;a=i.next()){var s=a.value;if(s.getValue()===e.getValue()){s.incrementCount(),o=!0;break}}}catch(t){r={error:t}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}o||t.push(e)}},e.prototype.reset=function(){this.possibleLeftPairs.length=0,this.possibleRightPairs.length=0},e.constructResult=function(t,e){for(var r=4537077*t.getValue()+e.getValue(),n=new String(r).toString(),o=new Za,i=13-n.length;i>0;i--)o.append("0");o.append(n);var a=0;for(i=0;i<13;i++){var s=o.charAt(i).charCodeAt(0)-"0".charCodeAt(0);a+=1&i?s:3*s}10===(a=10-a%10)&&(a=0),o.append(a.toString());var u=t.getFinderPattern().getResultPoints(),c=e.getFinderPattern().getResultPoints();return new hs(o.toString(),null,0,[u[0],u[1],c[0],c[1]],ps.RSS_14,(new Date).getTime())},e.checkChecksum=function(t,e){var r=(t.getChecksumPortion()+16*e.getChecksumPortion())%79,n=9*t.getFinderPattern().getValue()+e.getFinderPattern().getValue();return n>72&&n--,n>8&&n--,r===n},e.prototype.decodePair=function(t,e,r,n){try{var o=this.findFinderPattern(t,e),i=this.parseFoundFinderPattern(t,r,e,o),a=null==n?null:n.get(La.NEED_RESULT_POINT_CALLBACK);if(null!=a){var s=(o[0]+o[1])/2;e&&(s=t.getSize()-1-s),a.foundPossibleResultPoint(new Ns(s,r))}var u=this.decodeDataCharacter(t,i,!0),c=this.decodeDataCharacter(t,i,!1);return new Ec(1597*u.getValue()+c.getValue(),u.getChecksumPortion()+4*c.getChecksumPortion(),i)}catch(t){return null}},e.prototype.decodeDataCharacter=function(t,r,n){for(var o=this.getDataCharacterCounters(),i=0;i<o.length;i++)o[i]=0;if(n)Xs.recordPatternInReverse(t,r.getStartEnd()[0],o);else{Xs.recordPattern(t,r.getStartEnd()[1]+1,o);for(var a=0,s=o.length-1;a<s;a++,s--){var u=o[a];o[a]=o[s],o[s]=u}}var c=n?16:15,l=Rs.sum(new Int32Array(o))/c,d=this.getOddCounts(),h=this.getEvenCounts(),f=this.getOddRoundingErrors(),p=this.getEvenRoundingErrors();for(a=0;a<o.length;a++){var g=o[a]/l,m=Math.floor(g+.5);m<1?m=1:m>8&&(m=8);var y=Math.floor(a/2);1&a?(h[y]=m,p[y]=g-m):(d[y]=m,f[y]=g-m)}this.adjustOddEvenCounts(n,c);var w=0,_=0;for(a=d.length-1;a>=0;a--)_*=9,_+=d[a],w+=d[a];var v=0,E=0;for(a=h.length-1;a>=0;a--)v*=9,v+=h[a],E+=h[a];var b=_+3*v;if(n){if(1&w||w>12||w<4)throw new $a;var A=(12-w)/2,C=9-(O=e.OUTSIDE_ODD_WIDEST[A]),I=Pu.getRSSvalue(d,O,!1),S=Pu.getRSSvalue(h,C,!0),T=e.OUTSIDE_EVEN_TOTAL_SUBSET[A],D=e.OUTSIDE_GSUM[A];return new Nu(I*T+S+D,b)}if(1&E||E>10||E<4)throw new $a;A=(10-E)/2,C=9-(O=e.INSIDE_ODD_WIDEST[A]),I=Pu.getRSSvalue(d,O,!0),S=Pu.getRSSvalue(h,C,!1);var O,R=e.INSIDE_ODD_TOTAL_SUBSET[A];D=e.INSIDE_GSUM[A];return new Nu(S*R+I+D,b)},e.prototype.findFinderPattern=function(t,e){var r=this.getDecodeFinderCounters();r[0]=0,r[1]=0,r[2]=0,r[3]=0;for(var n=t.getSize(),o=!1,i=0;i<n&&e!==(o=!t.get(i));)i++;for(var a=0,s=i,u=i;u<n;u++)if(t.get(u)!==o)r[a]++;else{if(3===a){if(Mu.isFinderPattern(r))return[s,u];s+=r[0]+r[1],r[0]=r[2],r[1]=r[3],r[2]=0,r[3]=0,a--}else a++;r[a]=1,o=!o}throw new $a},e.prototype.parseFoundFinderPattern=function(t,r,n,o){for(var i=t.get(o[0]),a=o[0]-1;a>=0&&i!==t.get(a);)a--;a++;var s=o[0]-a,u=this.getDecodeFinderCounters(),c=new Int32Array(u.length);Da.arraycopy(u,0,c,1,u.length-1),c[0]=s;var l=this.parseFinderValue(c,e.FINDER_PATTERNS),d=a,h=o[1];return n&&(d=t.getSize()-1-d,h=t.getSize()-1-h),new ku(l,[a,o[1]],d,h,r)},e.prototype.adjustOddEvenCounts=function(t,e){var r=Rs.sum(new Int32Array(this.getOddCounts())),n=Rs.sum(new Int32Array(this.getEvenCounts())),o=!1,i=!1,a=!1,s=!1;t?(r>12?i=!0:r<4&&(o=!0),n>12?s=!0:n<4&&(a=!0)):(r>11?i=!0:r<5&&(o=!0),n>10?s=!0:n<4&&(a=!0));var u=r+n-e,c=(1&r)==(t?1:0),l=!(1&~n);if(1===u)if(c){if(l)throw new $a;i=!0}else{if(!l)throw new $a;s=!0}else if(-1===u)if(c){if(l)throw new $a;o=!0}else{if(!l)throw new $a;a=!0}else{if(0!==u)throw new $a;if(c){if(!l)throw new $a;r<n?(o=!0,s=!0):(i=!0,a=!0)}else if(l)throw new $a}if(o){if(i)throw new $a;Mu.increment(this.getOddCounts(),this.getOddRoundingErrors())}if(i&&Mu.decrement(this.getOddCounts(),this.getOddRoundingErrors()),a){if(s)throw new $a;Mu.increment(this.getEvenCounts(),this.getOddRoundingErrors())}s&&Mu.decrement(this.getEvenCounts(),this.getEvenRoundingErrors())},e.OUTSIDE_EVEN_TOTAL_SUBSET=[1,10,34,70,126],e.INSIDE_ODD_TOTAL_SUBSET=[4,20,48,81],e.OUTSIDE_GSUM=[0,161,961,2015,2715],e.INSIDE_GSUM=[0,336,1036,1516],e.OUTSIDE_ODD_WIDEST=[8,6,4,3,1],e.INSIDE_ODD_WIDEST=[2,4,6,8],e.FINDER_PATTERNS=[Int32Array.from([3,8,2,1]),Int32Array.from([3,5,5,1]),Int32Array.from([3,3,7,1]),Int32Array.from([3,1,9,1]),Int32Array.from([2,7,4,1]),Int32Array.from([2,5,6,1]),Int32Array.from([2,3,8,1]),Int32Array.from([1,5,7,1]),Int32Array.from([1,3,9,1])],e}(Mu),Ic=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Sc=function(t){function e(e){var r=t.call(this)||this;r.readers=[];var n=e?e.get(La.POSSIBLE_FORMATS):null,o=e&&void 0!==e.get(La.ASSUME_CODE_39_CHECK_DIGIT),i=e&&void 0!==e.get(La.ENABLE_CODE_39_EXTENDED_MODE);return n&&((n.includes(ps.EAN_13)||n.includes(ps.UPC_A)||n.includes(ps.EAN_8)||n.includes(ps.UPC_E))&&r.readers.push(new Su(e)),n.includes(ps.CODE_39)&&r.readers.push(new $s(o,i)),n.includes(ps.CODE_93)&&r.readers.push(new tu),n.includes(ps.CODE_128)&&r.readers.push(new Zs),n.includes(ps.ITF)&&r.readers.push(new nu),n.includes(ps.CODABAR)&&r.readers.push(new Du),n.includes(ps.RSS_14)&&r.readers.push(new Cc),n.includes(ps.RSS_EXPANDED)&&(console.warn("RSS Expanded reader IS NOT ready for production yet! use at your own risk."),r.readers.push(new _c))),0===r.readers.length&&(r.readers.push(new Su(e)),r.readers.push(new $s),r.readers.push(new tu),r.readers.push(new Su(e)),r.readers.push(new Zs),r.readers.push(new nu),r.readers.push(new Cc)),r}return Ic(e,t),e.prototype.decodeRow=function(t,e,r){for(var n=0;n<this.readers.length;n++)try{return this.readers[n].decodeRow(t,e,r)}catch(t){}throw new $a},e.prototype.reset=function(){this.readers.forEach((function(t){return t.reset()}))},e}(Xs),Tc=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){function e(e,r){return void 0===e&&(e=500),t.call(this,new Sc(r),e,r)||this}Tc(e,t)}(ds);var Dc,Oc=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Rc=function(){function t(t,e,r){this.ecCodewords=t,this.ecBlocks=[e],r&&this.ecBlocks.push(r)}return t.prototype.getECCodewords=function(){return this.ecCodewords},t.prototype.getECBlocks=function(){return this.ecBlocks},t}(),Mc=function(){function t(t,e){this.count=t,this.dataCodewords=e}return t.prototype.getCount=function(){return this.count},t.prototype.getDataCodewords=function(){return this.dataCodewords},t}(),Nc=function(){function t(t,e,r,n,o,i){var a,s;this.versionNumber=t,this.symbolSizeRows=e,this.symbolSizeColumns=r,this.dataRegionSizeRows=n,this.dataRegionSizeColumns=o,this.ecBlocks=i;var u=0,c=i.getECCodewords(),l=i.getECBlocks();try{for(var d=Oc(l),h=d.next();!h.done;h=d.next()){var f=h.value;u+=f.getCount()*(f.getDataCodewords()+c)}}catch(t){a={error:t}}finally{try{h&&!h.done&&(s=d.return)&&s.call(d)}finally{if(a)throw a.error}}this.totalCodewords=u}return t.prototype.getVersionNumber=function(){return this.versionNumber},t.prototype.getSymbolSizeRows=function(){return this.symbolSizeRows},t.prototype.getSymbolSizeColumns=function(){return this.symbolSizeColumns},t.prototype.getDataRegionSizeRows=function(){return this.dataRegionSizeRows},t.prototype.getDataRegionSizeColumns=function(){return this.dataRegionSizeColumns},t.prototype.getTotalCodewords=function(){return this.totalCodewords},t.prototype.getECBlocks=function(){return this.ecBlocks},t.getVersionForDimensions=function(e,r){var n,o;if(1&e||1&r)throw new Ua;try{for(var i=Oc(t.VERSIONS),a=i.next();!a.done;a=i.next()){var s=a.value;if(s.symbolSizeRows===e&&s.symbolSizeColumns===r)return s}}catch(t){n={error:t}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}throw new Ua},t.prototype.toString=function(){return""+this.versionNumber},t.buildVersions=function(){return[new t(1,10,10,8,8,new Rc(5,new Mc(1,3))),new t(2,12,12,10,10,new Rc(7,new Mc(1,5))),new t(3,14,14,12,12,new Rc(10,new Mc(1,8))),new t(4,16,16,14,14,new Rc(12,new Mc(1,12))),new t(5,18,18,16,16,new Rc(14,new Mc(1,18))),new t(6,20,20,18,18,new Rc(18,new Mc(1,22))),new t(7,22,22,20,20,new Rc(20,new Mc(1,30))),new t(8,24,24,22,22,new Rc(24,new Mc(1,36))),new t(9,26,26,24,24,new Rc(28,new Mc(1,44))),new t(10,32,32,14,14,new Rc(36,new Mc(1,62))),new t(11,36,36,16,16,new Rc(42,new Mc(1,86))),new t(12,40,40,18,18,new Rc(48,new Mc(1,114))),new t(13,44,44,20,20,new Rc(56,new Mc(1,144))),new t(14,48,48,22,22,new Rc(68,new Mc(1,174))),new t(15,52,52,24,24,new Rc(42,new Mc(2,102))),new t(16,64,64,14,14,new Rc(56,new Mc(2,140))),new t(17,72,72,16,16,new Rc(36,new Mc(4,92))),new t(18,80,80,18,18,new Rc(48,new Mc(4,114))),new t(19,88,88,20,20,new Rc(56,new Mc(4,144))),new t(20,96,96,22,22,new Rc(68,new Mc(4,174))),new t(21,104,104,24,24,new Rc(56,new Mc(6,136))),new t(22,120,120,18,18,new Rc(68,new Mc(6,175))),new t(23,132,132,20,20,new Rc(62,new Mc(8,163))),new t(24,144,144,22,22,new Rc(62,new Mc(8,156),new Mc(2,155))),new t(25,8,18,6,16,new Rc(7,new Mc(1,5))),new t(26,8,32,6,14,new Rc(11,new Mc(1,10))),new t(27,12,26,10,24,new Rc(14,new Mc(1,16))),new t(28,12,36,10,16,new Rc(18,new Mc(1,22))),new t(29,16,36,14,16,new Rc(24,new Mc(1,32))),new t(30,16,48,14,22,new Rc(28,new Mc(1,49)))]},t.VERSIONS=t.buildVersions(),t}(),kc=function(){function t(e){var r=e.getHeight();if(r<8||r>144||1&r)throw new Ua;this.version=t.readVersion(e),this.mappingBitMatrix=this.extractDataRegion(e),this.readMappingMatrix=new qa(this.mappingBitMatrix.getWidth(),this.mappingBitMatrix.getHeight())}return t.prototype.getVersion=function(){return this.version},t.readVersion=function(t){var e=t.getHeight(),r=t.getWidth();return Nc.getVersionForDimensions(e,r)},t.prototype.readCodewords=function(){var t=new Int8Array(this.version.getTotalCodewords()),e=0,r=4,n=0,o=this.mappingBitMatrix.getHeight(),i=this.mappingBitMatrix.getWidth(),a=!1,s=!1,u=!1,c=!1;do{if(r!==o||0!==n||a)if(r===o-2&&0===n&&3&i&&!s)t[e++]=255&this.readCorner2(o,i),r-=2,n+=2,s=!0;else if(r!==o+4||2!==n||7&i||u)if(r!==o-2||0!==n||4!=(7&i)||c){do{r<o&&n>=0&&!this.readMappingMatrix.get(n,r)&&(t[e++]=255&this.readUtah(r,n,o,i)),r-=2,n+=2}while(r>=0&&n<i);r+=1,n+=3;do{r>=0&&n<i&&!this.readMappingMatrix.get(n,r)&&(t[e++]=255&this.readUtah(r,n,o,i)),r+=2,n-=2}while(r<o&&n>=0);r+=3,n+=1}else t[e++]=255&this.readCorner4(o,i),r-=2,n+=2,c=!0;else t[e++]=255&this.readCorner3(o,i),r-=2,n+=2,u=!0;else t[e++]=255&this.readCorner1(o,i),r-=2,n+=2,a=!0}while(r<o||n<i);if(e!==this.version.getTotalCodewords())throw new Ua;return t},t.prototype.readModule=function(t,e,r,n){return t<0&&(t+=r,e+=4-(r+4&7)),e<0&&(e+=n,t+=4-(n+4&7)),this.readMappingMatrix.set(e,t),this.mappingBitMatrix.get(e,t)},t.prototype.readUtah=function(t,e,r,n){var o=0;return this.readModule(t-2,e-2,r,n)&&(o|=1),o<<=1,this.readModule(t-2,e-1,r,n)&&(o|=1),o<<=1,this.readModule(t-1,e-2,r,n)&&(o|=1),o<<=1,this.readModule(t-1,e-1,r,n)&&(o|=1),o<<=1,this.readModule(t-1,e,r,n)&&(o|=1),o<<=1,this.readModule(t,e-2,r,n)&&(o|=1),o<<=1,this.readModule(t,e-1,r,n)&&(o|=1),o<<=1,this.readModule(t,e,r,n)&&(o|=1),o},t.prototype.readCorner1=function(t,e){var r=0;return this.readModule(t-1,0,t,e)&&(r|=1),r<<=1,this.readModule(t-1,1,t,e)&&(r|=1),r<<=1,this.readModule(t-1,2,t,e)&&(r|=1),r<<=1,this.readModule(0,e-2,t,e)&&(r|=1),r<<=1,this.readModule(0,e-1,t,e)&&(r|=1),r<<=1,this.readModule(1,e-1,t,e)&&(r|=1),r<<=1,this.readModule(2,e-1,t,e)&&(r|=1),r<<=1,this.readModule(3,e-1,t,e)&&(r|=1),r},t.prototype.readCorner2=function(t,e){var r=0;return this.readModule(t-3,0,t,e)&&(r|=1),r<<=1,this.readModule(t-2,0,t,e)&&(r|=1),r<<=1,this.readModule(t-1,0,t,e)&&(r|=1),r<<=1,this.readModule(0,e-4,t,e)&&(r|=1),r<<=1,this.readModule(0,e-3,t,e)&&(r|=1),r<<=1,this.readModule(0,e-2,t,e)&&(r|=1),r<<=1,this.readModule(0,e-1,t,e)&&(r|=1),r<<=1,this.readModule(1,e-1,t,e)&&(r|=1),r},t.prototype.readCorner3=function(t,e){var r=0;return this.readModule(t-1,0,t,e)&&(r|=1),r<<=1,this.readModule(t-1,e-1,t,e)&&(r|=1),r<<=1,this.readModule(0,e-3,t,e)&&(r|=1),r<<=1,this.readModule(0,e-2,t,e)&&(r|=1),r<<=1,this.readModule(0,e-1,t,e)&&(r|=1),r<<=1,this.readModule(1,e-3,t,e)&&(r|=1),r<<=1,this.readModule(1,e-2,t,e)&&(r|=1),r<<=1,this.readModule(1,e-1,t,e)&&(r|=1),r},t.prototype.readCorner4=function(t,e){var r=0;return this.readModule(t-3,0,t,e)&&(r|=1),r<<=1,this.readModule(t-2,0,t,e)&&(r|=1),r<<=1,this.readModule(t-1,0,t,e)&&(r|=1),r<<=1,this.readModule(0,e-2,t,e)&&(r|=1),r<<=1,this.readModule(0,e-1,t,e)&&(r|=1),r<<=1,this.readModule(1,e-1,t,e)&&(r|=1),r<<=1,this.readModule(2,e-1,t,e)&&(r|=1),r<<=1,this.readModule(3,e-1,t,e)&&(r|=1),r},t.prototype.extractDataRegion=function(t){var e=this.version.getSymbolSizeRows(),r=this.version.getSymbolSizeColumns();if(t.getHeight()!==e)throw new Aa("Dimension of bitMatrix must match the version size");for(var n=this.version.getDataRegionSizeRows(),o=this.version.getDataRegionSizeColumns(),i=e/n|0,a=r/o|0,s=new qa(a*o,i*n),u=0;u<i;++u)for(var c=u*n,l=0;l<a;++l)for(var d=l*o,h=0;h<n;++h)for(var f=u*(n+2)+1+h,p=c+h,g=0;g<o;++g){var m=l*(o+2)+1+g;if(t.get(m,f)){var y=d+g;s.set(y,p)}}return s},t}(),xc=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Pc=function(){function t(t,e){this.numDataCodewords=t,this.codewords=e}return t.getDataBlocks=function(e,r){var n,o,i,a,s=r.getECBlocks(),u=0,c=s.getECBlocks();try{for(var l=xc(c),d=l.next();!d.done;d=l.next()){u+=(m=d.value).getCount()}}catch(t){n={error:t}}finally{try{d&&!d.done&&(o=l.return)&&o.call(l)}finally{if(n)throw n.error}}var h=new Array(u),f=0;try{for(var p=xc(c),g=p.next();!g.done;g=p.next())for(var m=g.value,y=0;y<m.getCount();y++){var w=m.getDataCodewords(),_=s.getECCodewords()+w;h[f++]=new t(w,new Uint8Array(_))}}catch(t){i={error:t}}finally{try{g&&!g.done&&(a=p.return)&&a.call(p)}finally{if(i)throw i.error}}var v=h[0].codewords.length-s.getECCodewords(),E=v-1,b=0;for(y=0;y<E;y++)for(var A=0;A<f;A++)h[A].codewords[y]=e[b++];var C=24===r.getVersionNumber(),I=C?8:f;for(A=0;A<I;A++)h[A].codewords[v-1]=e[b++];var S=h[0].codewords.length;for(y=v;y<S;y++)for(A=0;A<f;A++){var T=C?(A+8)%f:A,D=C&&T>7?y-1:y;h[T].codewords[D]=e[b++]}if(b!==e.length)throw new Aa;return h},t.prototype.getNumDataCodewords=function(){return this.numDataCodewords},t.prototype.getCodewords=function(){return this.codewords},t}(),Bc=function(){function t(t){this.bytes=t,this.byteOffset=0,this.bitOffset=0}return t.prototype.getBitOffset=function(){return this.bitOffset},t.prototype.getByteOffset=function(){return this.byteOffset},t.prototype.readBits=function(t){if(t<1||t>32||t>this.available())throw new Aa(""+t);var e=0,r=this.bitOffset,n=this.byteOffset,o=this.bytes;if(r>0){var i=8-r,a=t<i?t:i,s=255>>8-a<<(u=i-a);e=(o[n]&s)>>u,t-=a,8===(r+=a)&&(r=0,n++)}if(t>0){for(;t>=8;)e=e<<8|255&o[n],n++,t-=8;if(t>0){var u;s=255>>(u=8-t)<<u;e=e<<t|(o[n]&s)>>u,r+=t}}return this.bitOffset=r,this.byteOffset=n,e},t.prototype.available=function(){return 8*(this.bytes.length-this.byteOffset)-this.bitOffset},t}();!function(t){t[t.PAD_ENCODE=0]="PAD_ENCODE",t[t.ASCII_ENCODE=1]="ASCII_ENCODE",t[t.C40_ENCODE=2]="C40_ENCODE",t[t.TEXT_ENCODE=3]="TEXT_ENCODE",t[t.ANSIX12_ENCODE=4]="ANSIX12_ENCODE",t[t.EDIFACT_ENCODE=5]="EDIFACT_ENCODE",t[t.BASE256_ENCODE=6]="BASE256_ENCODE"}(Dc||(Dc={}));var Fc,Lc=function(){function t(){}return t.decode=function(t){var e=new Bc(t),r=new Za,n=new Za,o=new Array,i=Dc.ASCII_ENCODE;do{if(i===Dc.ASCII_ENCODE)i=this.decodeAsciiSegment(e,r,n);else{switch(i){case Dc.C40_ENCODE:this.decodeC40Segment(e,r);break;case Dc.TEXT_ENCODE:this.decodeTextSegment(e,r);break;case Dc.ANSIX12_ENCODE:this.decodeAnsiX12Segment(e,r);break;case Dc.EDIFACT_ENCODE:this.decodeEdifactSegment(e,r);break;case Dc.BASE256_ENCODE:this.decodeBase256Segment(e,r,o);break;default:throw new Ua}i=Dc.ASCII_ENCODE}}while(i!==Dc.PAD_ENCODE&&e.available()>0);return n.length()>0&&r.append(n.toString()),new ys(t,r.toString(),0===o.length?null:o,null)},t.decodeAsciiSegment=function(t,e,r){var n=!1;do{var o=t.readBits(8);if(0===o)throw new Ua;if(o<=128)return n&&(o+=128),e.append(String.fromCharCode(o-1)),Dc.ASCII_ENCODE;if(129===o)return Dc.PAD_ENCODE;if(o<=229){var i=o-130;i<10&&e.append("0"),e.append(""+i)}else switch(o){case 230:return Dc.C40_ENCODE;case 231:return Dc.BASE256_ENCODE;case 232:e.append(String.fromCharCode(29));break;case 233:case 234:case 241:break;case 235:n=!0;break;case 236:e.append("[)>05"),r.insert(0,"");break;case 237:e.append("[)>06"),r.insert(0,"");break;case 238:return Dc.ANSIX12_ENCODE;case 239:return Dc.TEXT_ENCODE;case 240:return Dc.EDIFACT_ENCODE;default:if(254!==o||0!==t.available())throw new Ua}}while(t.available()>0);return Dc.ASCII_ENCODE},t.decodeC40Segment=function(t,e){var r=!1,n=[],o=0;do{if(8===t.available())return;var i=t.readBits(8);if(254===i)return;this.parseTwoBytes(i,t.readBits(8),n);for(var a=0;a<3;a++){var s=n[a];switch(o){case 0:if(s<3)o=s+1;else{if(!(s<this.C40_BASIC_SET_CHARS.length))throw new Ua;var u=this.C40_BASIC_SET_CHARS[s];r?(e.append(String.fromCharCode(u.charCodeAt(0)+128)),r=!1):e.append(u)}break;case 1:r?(e.append(String.fromCharCode(s+128)),r=!1):e.append(String.fromCharCode(s)),o=0;break;case 2:if(s<this.C40_SHIFT2_SET_CHARS.length){u=this.C40_SHIFT2_SET_CHARS[s];r?(e.append(String.fromCharCode(u.charCodeAt(0)+128)),r=!1):e.append(u)}else switch(s){case 27:e.append(String.fromCharCode(29));break;case 30:r=!0;break;default:throw new Ua}o=0;break;case 3:r?(e.append(String.fromCharCode(s+224)),r=!1):e.append(String.fromCharCode(s+96)),o=0;break;default:throw new Ua}}}while(t.available()>0)},t.decodeTextSegment=function(t,e){var r=!1,n=[],o=0;do{if(8===t.available())return;var i=t.readBits(8);if(254===i)return;this.parseTwoBytes(i,t.readBits(8),n);for(var a=0;a<3;a++){var s=n[a];switch(o){case 0:if(s<3)o=s+1;else{if(!(s<this.TEXT_BASIC_SET_CHARS.length))throw new Ua;var u=this.TEXT_BASIC_SET_CHARS[s];r?(e.append(String.fromCharCode(u.charCodeAt(0)+128)),r=!1):e.append(u)}break;case 1:r?(e.append(String.fromCharCode(s+128)),r=!1):e.append(String.fromCharCode(s)),o=0;break;case 2:if(s<this.TEXT_SHIFT2_SET_CHARS.length){u=this.TEXT_SHIFT2_SET_CHARS[s];r?(e.append(String.fromCharCode(u.charCodeAt(0)+128)),r=!1):e.append(u)}else switch(s){case 27:e.append(String.fromCharCode(29));break;case 30:r=!0;break;default:throw new Ua}o=0;break;case 3:if(!(s<this.TEXT_SHIFT3_SET_CHARS.length))throw new Ua;u=this.TEXT_SHIFT3_SET_CHARS[s];r?(e.append(String.fromCharCode(u.charCodeAt(0)+128)),r=!1):e.append(u),o=0;break;default:throw new Ua}}}while(t.available()>0)},t.decodeAnsiX12Segment=function(t,e){var r=[];do{if(8===t.available())return;var n=t.readBits(8);if(254===n)return;this.parseTwoBytes(n,t.readBits(8),r);for(var o=0;o<3;o++){var i=r[o];switch(i){case 0:e.append("\r");break;case 1:e.append("*");break;case 2:e.append(">");break;case 3:e.append(" ");break;default:if(i<14)e.append(String.fromCharCode(i+44));else{if(!(i<40))throw new Ua;e.append(String.fromCharCode(i+51))}}}}while(t.available()>0)},t.parseTwoBytes=function(t,e,r){var n=(t<<8)+e-1,o=Math.floor(n/1600);r[0]=o,n-=1600*o,o=Math.floor(n/40),r[1]=o,r[2]=n-40*o},t.decodeEdifactSegment=function(t,e){do{if(t.available()<=16)return;for(var r=0;r<4;r++){var n=t.readBits(6);if(31===n){var o=8-t.getBitOffset();return void(8!==o&&t.readBits(o))}32&n||(n|=64),e.append(String.fromCharCode(n))}}while(t.available()>0)},t.decodeBase256Segment=function(t,e,r){var n,o=1+t.getByteOffset(),i=this.unrandomize255State(t.readBits(8),o++);if((n=0===i?t.available()/8|0:i<250?i:250*(i-249)+this.unrandomize255State(t.readBits(8),o++))<0)throw new Ua;for(var a=new Uint8Array(n),s=0;s<n;s++){if(t.available()<8)throw new Ua;a[s]=this.unrandomize255State(t.readBits(8),o++)}r.push(a);try{e.append(Xa.decode(a,Ya.ISO88591))}catch(t){throw new Ts("Platform does not support required encoding: "+t.message)}},t.unrandomize255State=function(t,e){var r=t-(149*e%255+1);return r>=0?r:r+256},t.C40_BASIC_SET_CHARS=["*","*","*"," ","0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],t.C40_SHIFT2_SET_CHARS=["!",'"',"#","$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","?","@","[","\\","]","^","_"],t.TEXT_BASIC_SET_CHARS=["*","*","*"," ","0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"],t.TEXT_SHIFT2_SET_CHARS=t.C40_SHIFT2_SET_CHARS,t.TEXT_SHIFT3_SET_CHARS=["`","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","{","|","}","~",String.fromCharCode(127)],t}(),zc=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Uc=function(){function t(){this.rsDecoder=new Ds(As.DATA_MATRIX_FIELD_256)}return t.prototype.decode=function(t){var e,r,n=new kc(t),o=n.getVersion(),i=n.readCodewords(),a=Pc.getDataBlocks(i,o),s=0;try{for(var u=zc(a),c=u.next();!c.done;c=u.next()){s+=c.value.getNumDataCodewords()}}catch(t){e={error:t}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(e)throw e.error}}for(var l=new Uint8Array(s),d=a.length,h=0;h<d;h++){var f=a[h],p=f.getCodewords(),g=f.getNumDataCodewords();this.correctErrors(p,g);for(var m=0;m<g;m++)l[m*d+h]=p[m]}return Lc.decode(l)},t.prototype.correctErrors=function(t,e){var r=new Int32Array(t);try{this.rsDecoder.decode(r,t.length-e)}catch(t){throw new Sa}for(var n=0;n<e;n++)t[n]=r[n]},t}(),Vc=function(){function t(t){this.image=t,this.rectangleDetector=new Bs(this.image)}return t.prototype.detect=function(){var e=this.rectangleDetector.detect(),r=this.detectSolid1(e);if((r=this.detectSolid2(r))[3]=this.correctTopRight(r),!r[3])throw new $a;var n=(r=this.shiftToModuleCenter(r))[0],o=r[1],i=r[2],a=r[3],s=this.transitionsBetween(n,a)+1,u=this.transitionsBetween(i,a)+1;1&~s||(s+=1),1&~u||(u+=1),4*s<7*u&&4*u<7*s&&(s=u=Math.max(s,u));var c=t.sampleGrid(this.image,n,o,i,a,s,u);return new ks(c,[n,o,i,a])},t.shiftPoint=function(t,e,r){var n=(e.getX()-t.getX())/(r+1),o=(e.getY()-t.getY())/(r+1);return new Ns(t.getX()+n,t.getY()+o)},t.moveAway=function(t,e,r){var n=t.getX(),o=t.getY();return n<e?n-=1:n+=1,o<r?o-=1:o+=1,new Ns(n,o)},t.prototype.detectSolid1=function(t){var e=t[0],r=t[1],n=t[3],o=t[2],i=this.transitionsBetween(e,r),a=this.transitionsBetween(r,n),s=this.transitionsBetween(n,o),u=this.transitionsBetween(o,e),c=i,l=[o,e,r,n];return c>a&&(c=a,l[0]=e,l[1]=r,l[2]=n,l[3]=o),c>s&&(c=s,l[0]=r,l[1]=n,l[2]=o,l[3]=e),c>u&&(l[0]=n,l[1]=o,l[2]=e,l[3]=r),l},t.prototype.detectSolid2=function(e){var r=e[0],n=e[1],o=e[2],i=e[3],a=this.transitionsBetween(r,i),s=t.shiftPoint(n,o,4*(a+1)),u=t.shiftPoint(o,n,4*(a+1));return this.transitionsBetween(s,r)<this.transitionsBetween(u,i)?(e[0]=r,e[1]=n,e[2]=o,e[3]=i):(e[0]=n,e[1]=o,e[2]=i,e[3]=r),e},t.prototype.correctTopRight=function(e){var r=e[0],n=e[1],o=e[2],i=e[3],a=this.transitionsBetween(r,i),s=this.transitionsBetween(n,i),u=t.shiftPoint(r,n,4*(s+1)),c=t.shiftPoint(o,n,4*(a+1));a=this.transitionsBetween(u,i),s=this.transitionsBetween(c,i);var l=new Ns(i.getX()+(o.getX()-n.getX())/(a+1),i.getY()+(o.getY()-n.getY())/(a+1)),d=new Ns(i.getX()+(r.getX()-n.getX())/(s+1),i.getY()+(r.getY()-n.getY())/(s+1));return this.isValid(l)?this.isValid(d)?this.transitionsBetween(u,l)+this.transitionsBetween(c,l)>this.transitionsBetween(u,d)+this.transitionsBetween(c,d)?l:d:l:this.isValid(d)?d:null},t.prototype.shiftToModuleCenter=function(e){var r=e[0],n=e[1],o=e[2],i=e[3],a=this.transitionsBetween(r,i)+1,s=this.transitionsBetween(o,i)+1,u=t.shiftPoint(r,n,4*s),c=t.shiftPoint(o,n,4*a);1&~(a=this.transitionsBetween(u,i)+1)||(a+=1),1&~(s=this.transitionsBetween(c,i)+1)||(s+=1);var l,d,h=(r.getX()+n.getX()+o.getX()+i.getX())/4,f=(r.getY()+n.getY()+o.getY()+i.getY())/4;return r=t.moveAway(r,h,f),n=t.moveAway(n,h,f),o=t.moveAway(o,h,f),i=t.moveAway(i,h,f),u=t.shiftPoint(r,n,4*s),u=t.shiftPoint(u,i,4*a),l=t.shiftPoint(n,r,4*s),l=t.shiftPoint(l,o,4*a),c=t.shiftPoint(o,i,4*s),c=t.shiftPoint(c,n,4*a),d=t.shiftPoint(i,o,4*s),[u,l,c,d=t.shiftPoint(d,r,4*a)]},t.prototype.isValid=function(t){return t.getX()>=0&&t.getX()<this.image.getWidth()&&t.getY()>0&&t.getY()<this.image.getHeight()},t.sampleGrid=function(t,e,r,n,o,i,a){return Vs.getInstance().sampleGrid(t,i,a,.5,.5,i-.5,.5,i-.5,a-.5,.5,a-.5,e.getX(),e.getY(),o.getX(),o.getY(),n.getX(),n.getY(),r.getX(),r.getY())},t.prototype.transitionsBetween=function(t,e){var r=Math.trunc(t.getX()),n=Math.trunc(t.getY()),o=Math.trunc(e.getX()),i=Math.trunc(e.getY()),a=Math.abs(i-n)>Math.abs(o-r);if(a){var s=r;r=n,n=s,s=o,o=i,i=s}for(var u=Math.abs(o-r),c=Math.abs(i-n),l=-u/2,d=n<i?1:-1,h=r<o?1:-1,f=0,p=this.image.get(a?n:r,a?r:n),g=r,m=n;g!==o;g+=h){var y=this.image.get(a?m:g,a?g:m);if(y!==p&&(f++,p=y),(l+=c)>0){if(m===i)break;m+=d,l-=u}}return f},t}(),Hc=function(){function t(){this.decoder=new Uc}return t.prototype.decode=function(e,r){var n,o;if(void 0===r&&(r=null),null!=r&&r.has(La.PURE_BARCODE)){var i=t.extractPureBits(e.getBlackMatrix());n=this.decoder.decode(i),o=t.NO_POINTS}else{var a=new Vc(e.getBlackMatrix()).detect();n=this.decoder.decode(a.getBits()),o=a.getPoints()}var s=n.getRawBytes(),u=new hs(n.getText(),s,8*s.length,o,ps.DATA_MATRIX,Da.currentTimeMillis()),c=n.getByteSegments();null!=c&&u.putMetadata(ms.BYTE_SEGMENTS,c);var l=n.getECLevel();return null!=l&&u.putMetadata(ms.ERROR_CORRECTION_LEVEL,l),u},t.prototype.reset=function(){},t.extractPureBits=function(t){var e=t.getTopLeftOnBit(),r=t.getBottomRightOnBit();if(null==e||null==r)throw new $a;var n=this.moduleSize(e,t),o=e[1],i=r[1],a=e[0],s=(r[0]-a+1)/n,u=(i-o+1)/n;if(s<=0||u<=0)throw new $a;var c=n/2;o+=c,a+=c;for(var l=new qa(s,u),d=0;d<u;d++)for(var h=o+d*n,f=0;f<s;f++)t.get(a+f*n,h)&&l.set(f,d);return l},t.moduleSize=function(t,e){for(var r=e.getWidth(),n=t[0],o=t[1];n<r&&e.get(n,o);)n++;if(n===r)throw new $a;var i=n-t[0];if(0===i)throw new $a;return i},t.NO_POINTS=[],t}(),jc=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){function e(e){return void 0===e&&(e=500),t.call(this,new Hc,e)||this}jc(e,t)}(ds),function(t){t[t.L=0]="L",t[t.M=1]="M",t[t.Q=2]="Q",t[t.H=3]="H"}(Fc||(Fc={}));var Gc,Wc=function(){function t(e,r,n){this.value=e,this.stringValue=r,this.bits=n,t.FOR_BITS.set(n,this),t.FOR_VALUE.set(e,this)}return t.prototype.getValue=function(){return this.value},t.prototype.getBits=function(){return this.bits},t.fromString=function(e){switch(e){case"L":return t.L;case"M":return t.M;case"Q":return t.Q;case"H":return t.H;default:throw new Ea(e+"not available")}},t.prototype.toString=function(){return this.stringValue},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.value===r.value},t.forBits=function(e){if(e<0||e>=t.FOR_BITS.size)throw new Aa;return t.FOR_BITS.get(e)},t.FOR_BITS=new Map,t.FOR_VALUE=new Map,t.L=new t(Fc.L,"L",1),t.M=new t(Fc.M,"M",0),t.Q=new t(Fc.Q,"Q",3),t.H=new t(Fc.H,"H",2),t}(),Xc=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Yc=function(){function t(t){this.errorCorrectionLevel=Wc.forBits(t>>3&3),this.dataMask=7&t}return t.numBitsDiffering=function(t,e){return Pa.bitCount(t^e)},t.decodeFormatInformation=function(e,r){var n=t.doDecodeFormatInformation(e,r);return null!==n?n:t.doDecodeFormatInformation(e^t.FORMAT_INFO_MASK_QR,r^t.FORMAT_INFO_MASK_QR)},t.doDecodeFormatInformation=function(e,r){var n,o,i=Number.MAX_SAFE_INTEGER,a=0;try{for(var s=Xc(t.FORMAT_INFO_DECODE_LOOKUP),u=s.next();!u.done;u=s.next()){var c=u.value,l=c[0];if(l===e||l===r)return new t(c[1]);var d=t.numBitsDiffering(e,l);d<i&&(a=c[1],i=d),e!==r&&(d=t.numBitsDiffering(r,l))<i&&(a=c[1],i=d)}}catch(t){n={error:t}}finally{try{u&&!u.done&&(o=s.return)&&o.call(s)}finally{if(n)throw n.error}}return i<=3?new t(a):null},t.prototype.getErrorCorrectionLevel=function(){return this.errorCorrectionLevel},t.prototype.getDataMask=function(){return this.dataMask},t.prototype.hashCode=function(){return this.errorCorrectionLevel.getBits()<<3|this.dataMask},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.errorCorrectionLevel===r.errorCorrectionLevel&&this.dataMask===r.dataMask},t.FORMAT_INFO_MASK_QR=21522,t.FORMAT_INFO_DECODE_LOOKUP=[Int32Array.from([21522,0]),Int32Array.from([20773,1]),Int32Array.from([24188,2]),Int32Array.from([23371,3]),Int32Array.from([17913,4]),Int32Array.from([16590,5]),Int32Array.from([20375,6]),Int32Array.from([19104,7]),Int32Array.from([30660,8]),Int32Array.from([29427,9]),Int32Array.from([32170,10]),Int32Array.from([30877,11]),Int32Array.from([26159,12]),Int32Array.from([25368,13]),Int32Array.from([27713,14]),Int32Array.from([26998,15]),Int32Array.from([5769,16]),Int32Array.from([5054,17]),Int32Array.from([7399,18]),Int32Array.from([6608,19]),Int32Array.from([1890,20]),Int32Array.from([597,21]),Int32Array.from([3340,22]),Int32Array.from([2107,23]),Int32Array.from([13663,24]),Int32Array.from([12392,25]),Int32Array.from([16177,26]),Int32Array.from([14854,27]),Int32Array.from([9396,28]),Int32Array.from([8579,29]),Int32Array.from([11994,30]),Int32Array.from([11245,31])],t}(),Zc=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},qc=function(){function t(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];this.ecCodewordsPerBlock=t,this.ecBlocks=e}return t.prototype.getECCodewordsPerBlock=function(){return this.ecCodewordsPerBlock},t.prototype.getNumBlocks=function(){var t,e,r=0,n=this.ecBlocks;try{for(var o=Zc(n),i=o.next();!i.done;i=o.next()){r+=i.value.getCount()}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return r},t.prototype.getTotalECCodewords=function(){return this.ecCodewordsPerBlock*this.getNumBlocks()},t.prototype.getECBlocks=function(){return this.ecBlocks},t}(),Kc=function(){function t(t,e){this.count=t,this.dataCodewords=e}return t.prototype.getCount=function(){return this.count},t.prototype.getDataCodewords=function(){return this.dataCodewords},t}(),$c=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Jc=function(){function t(t,e){for(var r,n,o=[],i=2;i<arguments.length;i++)o[i-2]=arguments[i];this.versionNumber=t,this.alignmentPatternCenters=e,this.ecBlocks=o;var a=0,s=o[0].getECCodewordsPerBlock(),u=o[0].getECBlocks();try{for(var c=$c(u),l=c.next();!l.done;l=c.next()){var d=l.value;a+=d.getCount()*(d.getDataCodewords()+s)}}catch(t){r={error:t}}finally{try{l&&!l.done&&(n=c.return)&&n.call(c)}finally{if(r)throw r.error}}this.totalCodewords=a}return t.prototype.getVersionNumber=function(){return this.versionNumber},t.prototype.getAlignmentPatternCenters=function(){return this.alignmentPatternCenters},t.prototype.getTotalCodewords=function(){return this.totalCodewords},t.prototype.getDimensionForVersion=function(){return 17+4*this.versionNumber},t.prototype.getECBlocksForLevel=function(t){return this.ecBlocks[t.getValue()]},t.getProvisionalVersionForDimension=function(t){if(t%4!=1)throw new Ua;try{return this.getVersionForNumber((t-17)/4)}catch(t){throw new Ua}},t.getVersionForNumber=function(e){if(e<1||e>40)throw new Aa;return t.VERSIONS[e-1]},t.decodeVersionInformation=function(e){for(var r=Number.MAX_SAFE_INTEGER,n=0,o=0;o<t.VERSION_DECODE_INFO.length;o++){var i=t.VERSION_DECODE_INFO[o];if(i===e)return t.getVersionForNumber(o+7);var a=Yc.numBitsDiffering(e,i);a<r&&(n=o+7,r=a)}return r<=3?t.getVersionForNumber(n):null},t.prototype.buildFunctionPattern=function(){var t=this.getDimensionForVersion(),e=new qa(t);e.setRegion(0,0,9,9),e.setRegion(t-8,0,8,9),e.setRegion(0,t-8,9,8);for(var r=this.alignmentPatternCenters.length,n=0;n<r;n++)for(var o=this.alignmentPatternCenters[n]-2,i=0;i<r;i++)0===n&&(0===i||i===r-1)||n===r-1&&0===i||e.setRegion(this.alignmentPatternCenters[i]-2,o,5,5);return e.setRegion(6,9,1,t-17),e.setRegion(9,6,t-17,1),this.versionNumber>6&&(e.setRegion(t-11,0,3,6),e.setRegion(0,t-11,6,3)),e},t.prototype.toString=function(){return""+this.versionNumber},t.VERSION_DECODE_INFO=Int32Array.from([31892,34236,39577,42195,48118,51042,55367,58893,63784,68472,70749,76311,79154,84390,87683,92361,96236,102084,102881,110507,110734,117786,119615,126325,127568,133589,136944,141498,145311,150283,152622,158308,161089,167017]),t.VERSIONS=[new t(1,new Int32Array(0),new qc(7,new Kc(1,19)),new qc(10,new Kc(1,16)),new qc(13,new Kc(1,13)),new qc(17,new Kc(1,9))),new t(2,Int32Array.from([6,18]),new qc(10,new Kc(1,34)),new qc(16,new Kc(1,28)),new qc(22,new Kc(1,22)),new qc(28,new Kc(1,16))),new t(3,Int32Array.from([6,22]),new qc(15,new Kc(1,55)),new qc(26,new Kc(1,44)),new qc(18,new Kc(2,17)),new qc(22,new Kc(2,13))),new t(4,Int32Array.from([6,26]),new qc(20,new Kc(1,80)),new qc(18,new Kc(2,32)),new qc(26,new Kc(2,24)),new qc(16,new Kc(4,9))),new t(5,Int32Array.from([6,30]),new qc(26,new Kc(1,108)),new qc(24,new Kc(2,43)),new qc(18,new Kc(2,15),new Kc(2,16)),new qc(22,new Kc(2,11),new Kc(2,12))),new t(6,Int32Array.from([6,34]),new qc(18,new Kc(2,68)),new qc(16,new Kc(4,27)),new qc(24,new Kc(4,19)),new qc(28,new Kc(4,15))),new t(7,Int32Array.from([6,22,38]),new qc(20,new Kc(2,78)),new qc(18,new Kc(4,31)),new qc(18,new Kc(2,14),new Kc(4,15)),new qc(26,new Kc(4,13),new Kc(1,14))),new t(8,Int32Array.from([6,24,42]),new qc(24,new Kc(2,97)),new qc(22,new Kc(2,38),new Kc(2,39)),new qc(22,new Kc(4,18),new Kc(2,19)),new qc(26,new Kc(4,14),new Kc(2,15))),new t(9,Int32Array.from([6,26,46]),new qc(30,new Kc(2,116)),new qc(22,new Kc(3,36),new Kc(2,37)),new qc(20,new Kc(4,16),new Kc(4,17)),new qc(24,new Kc(4,12),new Kc(4,13))),new t(10,Int32Array.from([6,28,50]),new qc(18,new Kc(2,68),new Kc(2,69)),new qc(26,new Kc(4,43),new Kc(1,44)),new qc(24,new Kc(6,19),new Kc(2,20)),new qc(28,new Kc(6,15),new Kc(2,16))),new t(11,Int32Array.from([6,30,54]),new qc(20,new Kc(4,81)),new qc(30,new Kc(1,50),new Kc(4,51)),new qc(28,new Kc(4,22),new Kc(4,23)),new qc(24,new Kc(3,12),new Kc(8,13))),new t(12,Int32Array.from([6,32,58]),new qc(24,new Kc(2,92),new Kc(2,93)),new qc(22,new Kc(6,36),new Kc(2,37)),new qc(26,new Kc(4,20),new Kc(6,21)),new qc(28,new Kc(7,14),new Kc(4,15))),new t(13,Int32Array.from([6,34,62]),new qc(26,new Kc(4,107)),new qc(22,new Kc(8,37),new Kc(1,38)),new qc(24,new Kc(8,20),new Kc(4,21)),new qc(22,new Kc(12,11),new Kc(4,12))),new t(14,Int32Array.from([6,26,46,66]),new qc(30,new Kc(3,115),new Kc(1,116)),new qc(24,new Kc(4,40),new Kc(5,41)),new qc(20,new Kc(11,16),new Kc(5,17)),new qc(24,new Kc(11,12),new Kc(5,13))),new t(15,Int32Array.from([6,26,48,70]),new qc(22,new Kc(5,87),new Kc(1,88)),new qc(24,new Kc(5,41),new Kc(5,42)),new qc(30,new Kc(5,24),new Kc(7,25)),new qc(24,new Kc(11,12),new Kc(7,13))),new t(16,Int32Array.from([6,26,50,74]),new qc(24,new Kc(5,98),new Kc(1,99)),new qc(28,new Kc(7,45),new Kc(3,46)),new qc(24,new Kc(15,19),new Kc(2,20)),new qc(30,new Kc(3,15),new Kc(13,16))),new t(17,Int32Array.from([6,30,54,78]),new qc(28,new Kc(1,107),new Kc(5,108)),new qc(28,new Kc(10,46),new Kc(1,47)),new qc(28,new Kc(1,22),new Kc(15,23)),new qc(28,new Kc(2,14),new Kc(17,15))),new t(18,Int32Array.from([6,30,56,82]),new qc(30,new Kc(5,120),new Kc(1,121)),new qc(26,new Kc(9,43),new Kc(4,44)),new qc(28,new Kc(17,22),new Kc(1,23)),new qc(28,new Kc(2,14),new Kc(19,15))),new t(19,Int32Array.from([6,30,58,86]),new qc(28,new Kc(3,113),new Kc(4,114)),new qc(26,new Kc(3,44),new Kc(11,45)),new qc(26,new Kc(17,21),new Kc(4,22)),new qc(26,new Kc(9,13),new Kc(16,14))),new t(20,Int32Array.from([6,34,62,90]),new qc(28,new Kc(3,107),new Kc(5,108)),new qc(26,new Kc(3,41),new Kc(13,42)),new qc(30,new Kc(15,24),new Kc(5,25)),new qc(28,new Kc(15,15),new Kc(10,16))),new t(21,Int32Array.from([6,28,50,72,94]),new qc(28,new Kc(4,116),new Kc(4,117)),new qc(26,new Kc(17,42)),new qc(28,new Kc(17,22),new Kc(6,23)),new qc(30,new Kc(19,16),new Kc(6,17))),new t(22,Int32Array.from([6,26,50,74,98]),new qc(28,new Kc(2,111),new Kc(7,112)),new qc(28,new Kc(17,46)),new qc(30,new Kc(7,24),new Kc(16,25)),new qc(24,new Kc(34,13))),new t(23,Int32Array.from([6,30,54,78,102]),new qc(30,new Kc(4,121),new Kc(5,122)),new qc(28,new Kc(4,47),new Kc(14,48)),new qc(30,new Kc(11,24),new Kc(14,25)),new qc(30,new Kc(16,15),new Kc(14,16))),new t(24,Int32Array.from([6,28,54,80,106]),new qc(30,new Kc(6,117),new Kc(4,118)),new qc(28,new Kc(6,45),new Kc(14,46)),new qc(30,new Kc(11,24),new Kc(16,25)),new qc(30,new Kc(30,16),new Kc(2,17))),new t(25,Int32Array.from([6,32,58,84,110]),new qc(26,new Kc(8,106),new Kc(4,107)),new qc(28,new Kc(8,47),new Kc(13,48)),new qc(30,new Kc(7,24),new Kc(22,25)),new qc(30,new Kc(22,15),new Kc(13,16))),new t(26,Int32Array.from([6,30,58,86,114]),new qc(28,new Kc(10,114),new Kc(2,115)),new qc(28,new Kc(19,46),new Kc(4,47)),new qc(28,new Kc(28,22),new Kc(6,23)),new qc(30,new Kc(33,16),new Kc(4,17))),new t(27,Int32Array.from([6,34,62,90,118]),new qc(30,new Kc(8,122),new Kc(4,123)),new qc(28,new Kc(22,45),new Kc(3,46)),new qc(30,new Kc(8,23),new Kc(26,24)),new qc(30,new Kc(12,15),new Kc(28,16))),new t(28,Int32Array.from([6,26,50,74,98,122]),new qc(30,new Kc(3,117),new Kc(10,118)),new qc(28,new Kc(3,45),new Kc(23,46)),new qc(30,new Kc(4,24),new Kc(31,25)),new qc(30,new Kc(11,15),new Kc(31,16))),new t(29,Int32Array.from([6,30,54,78,102,126]),new qc(30,new Kc(7,116),new Kc(7,117)),new qc(28,new Kc(21,45),new Kc(7,46)),new qc(30,new Kc(1,23),new Kc(37,24)),new qc(30,new Kc(19,15),new Kc(26,16))),new t(30,Int32Array.from([6,26,52,78,104,130]),new qc(30,new Kc(5,115),new Kc(10,116)),new qc(28,new Kc(19,47),new Kc(10,48)),new qc(30,new Kc(15,24),new Kc(25,25)),new qc(30,new Kc(23,15),new Kc(25,16))),new t(31,Int32Array.from([6,30,56,82,108,134]),new qc(30,new Kc(13,115),new Kc(3,116)),new qc(28,new Kc(2,46),new Kc(29,47)),new qc(30,new Kc(42,24),new Kc(1,25)),new qc(30,new Kc(23,15),new Kc(28,16))),new t(32,Int32Array.from([6,34,60,86,112,138]),new qc(30,new Kc(17,115)),new qc(28,new Kc(10,46),new Kc(23,47)),new qc(30,new Kc(10,24),new Kc(35,25)),new qc(30,new Kc(19,15),new Kc(35,16))),new t(33,Int32Array.from([6,30,58,86,114,142]),new qc(30,new Kc(17,115),new Kc(1,116)),new qc(28,new Kc(14,46),new Kc(21,47)),new qc(30,new Kc(29,24),new Kc(19,25)),new qc(30,new Kc(11,15),new Kc(46,16))),new t(34,Int32Array.from([6,34,62,90,118,146]),new qc(30,new Kc(13,115),new Kc(6,116)),new qc(28,new Kc(14,46),new Kc(23,47)),new qc(30,new Kc(44,24),new Kc(7,25)),new qc(30,new Kc(59,16),new Kc(1,17))),new t(35,Int32Array.from([6,30,54,78,102,126,150]),new qc(30,new Kc(12,121),new Kc(7,122)),new qc(28,new Kc(12,47),new Kc(26,48)),new qc(30,new Kc(39,24),new Kc(14,25)),new qc(30,new Kc(22,15),new Kc(41,16))),new t(36,Int32Array.from([6,24,50,76,102,128,154]),new qc(30,new Kc(6,121),new Kc(14,122)),new qc(28,new Kc(6,47),new Kc(34,48)),new qc(30,new Kc(46,24),new Kc(10,25)),new qc(30,new Kc(2,15),new Kc(64,16))),new t(37,Int32Array.from([6,28,54,80,106,132,158]),new qc(30,new Kc(17,122),new Kc(4,123)),new qc(28,new Kc(29,46),new Kc(14,47)),new qc(30,new Kc(49,24),new Kc(10,25)),new qc(30,new Kc(24,15),new Kc(46,16))),new t(38,Int32Array.from([6,32,58,84,110,136,162]),new qc(30,new Kc(4,122),new Kc(18,123)),new qc(28,new Kc(13,46),new Kc(32,47)),new qc(30,new Kc(48,24),new Kc(14,25)),new qc(30,new Kc(42,15),new Kc(32,16))),new t(39,Int32Array.from([6,26,54,82,110,138,166]),new qc(30,new Kc(20,117),new Kc(4,118)),new qc(28,new Kc(40,47),new Kc(7,48)),new qc(30,new Kc(43,24),new Kc(22,25)),new qc(30,new Kc(10,15),new Kc(67,16))),new t(40,Int32Array.from([6,30,58,86,114,142,170]),new qc(30,new Kc(19,118),new Kc(6,119)),new qc(28,new Kc(18,47),new Kc(31,48)),new qc(30,new Kc(34,24),new Kc(34,25)),new qc(30,new Kc(20,15),new Kc(61,16)))],t}();!function(t){t[t.DATA_MASK_000=0]="DATA_MASK_000",t[t.DATA_MASK_001=1]="DATA_MASK_001",t[t.DATA_MASK_010=2]="DATA_MASK_010",t[t.DATA_MASK_011=3]="DATA_MASK_011",t[t.DATA_MASK_100=4]="DATA_MASK_100",t[t.DATA_MASK_101=5]="DATA_MASK_101",t[t.DATA_MASK_110=6]="DATA_MASK_110",t[t.DATA_MASK_111=7]="DATA_MASK_111"}(Gc||(Gc={}));var Qc,tl=function(){function t(t,e){this.value=t,this.isMasked=e}return t.prototype.unmaskBitMatrix=function(t,e){for(var r=0;r<e;r++)for(var n=0;n<e;n++)this.isMasked(r,n)&&t.flip(n,r)},t.values=new Map([[Gc.DATA_MASK_000,new t(Gc.DATA_MASK_000,(function(t,e){return!(t+e&1)}))],[Gc.DATA_MASK_001,new t(Gc.DATA_MASK_001,(function(t,e){return!(1&t)}))],[Gc.DATA_MASK_010,new t(Gc.DATA_MASK_010,(function(t,e){return e%3==0}))],[Gc.DATA_MASK_011,new t(Gc.DATA_MASK_011,(function(t,e){return(t+e)%3==0}))],[Gc.DATA_MASK_100,new t(Gc.DATA_MASK_100,(function(t,e){return!(Math.floor(t/2)+Math.floor(e/3)&1)}))],[Gc.DATA_MASK_101,new t(Gc.DATA_MASK_101,(function(t,e){return t*e%6==0}))],[Gc.DATA_MASK_110,new t(Gc.DATA_MASK_110,(function(t,e){return t*e%6<3}))],[Gc.DATA_MASK_111,new t(Gc.DATA_MASK_111,(function(t,e){return!(t+e+t*e%3&1)}))]]),t}(),el=function(){function t(t){var e=t.getHeight();if(e<21||1!=(3&e))throw new Ua;this.bitMatrix=t}return t.prototype.readFormatInformation=function(){if(null!==this.parsedFormatInfo&&void 0!==this.parsedFormatInfo)return this.parsedFormatInfo;for(var t=0,e=0;e<6;e++)t=this.copyBit(e,8,t);t=this.copyBit(7,8,t),t=this.copyBit(8,8,t),t=this.copyBit(8,7,t);for(var r=5;r>=0;r--)t=this.copyBit(8,r,t);var n=this.bitMatrix.getHeight(),o=0,i=n-7;for(r=n-1;r>=i;r--)o=this.copyBit(8,r,o);for(e=n-8;e<n;e++)o=this.copyBit(e,8,o);if(this.parsedFormatInfo=Yc.decodeFormatInformation(t,o),null!==this.parsedFormatInfo)return this.parsedFormatInfo;throw new Ua},t.prototype.readVersion=function(){if(null!==this.parsedVersion&&void 0!==this.parsedVersion)return this.parsedVersion;var t=this.bitMatrix.getHeight(),e=Math.floor((t-17)/4);if(e<=6)return Jc.getVersionForNumber(e);for(var r=0,n=t-11,o=5;o>=0;o--)for(var i=t-9;i>=n;i--)r=this.copyBit(i,o,r);var a=Jc.decodeVersionInformation(r);if(null!==a&&a.getDimensionForVersion()===t)return this.parsedVersion=a,a;r=0;for(i=5;i>=0;i--)for(o=t-9;o>=n;o--)r=this.copyBit(i,o,r);if(null!==(a=Jc.decodeVersionInformation(r))&&a.getDimensionForVersion()===t)return this.parsedVersion=a,a;throw new Ua},t.prototype.copyBit=function(t,e,r){return(this.isMirror?this.bitMatrix.get(e,t):this.bitMatrix.get(t,e))?r<<1|1:r<<1},t.prototype.readCodewords=function(){var t=this.readFormatInformation(),e=this.readVersion(),r=tl.values.get(t.getDataMask()),n=this.bitMatrix.getHeight();r.unmaskBitMatrix(this.bitMatrix,n);for(var o=e.buildFunctionPattern(),i=!0,a=new Uint8Array(e.getTotalCodewords()),s=0,u=0,c=0,l=n-1;l>0;l-=2){6===l&&l--;for(var d=0;d<n;d++)for(var h=i?n-1-d:d,f=0;f<2;f++)o.get(l-f,h)||(c++,u<<=1,this.bitMatrix.get(l-f,h)&&(u|=1),8===c&&(a[s++]=u,c=0,u=0));i=!i}if(s!==e.getTotalCodewords())throw new Ua;return a},t.prototype.remask=function(){if(null!==this.parsedFormatInfo){var t=tl.values.get(this.parsedFormatInfo.getDataMask()),e=this.bitMatrix.getHeight();t.unmaskBitMatrix(this.bitMatrix,e)}},t.prototype.setMirror=function(t){this.parsedVersion=null,this.parsedFormatInfo=null,this.isMirror=t},t.prototype.mirror=function(){for(var t=this.bitMatrix,e=0,r=t.getWidth();e<r;e++)for(var n=e+1,o=t.getHeight();n<o;n++)t.get(e,n)!==t.get(n,e)&&(t.flip(n,e),t.flip(e,n))},t}(),rl=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},nl=function(){function t(t,e){this.numDataCodewords=t,this.codewords=e}return t.getDataBlocks=function(e,r,n){var o,i,a,s;if(e.length!==r.getTotalCodewords())throw new Aa;var u=r.getECBlocksForLevel(n),c=0,l=u.getECBlocks();try{for(var d=rl(l),h=d.next();!h.done;h=d.next()){c+=(y=h.value).getCount()}}catch(t){o={error:t}}finally{try{h&&!h.done&&(i=d.return)&&i.call(d)}finally{if(o)throw o.error}}var f=new Array(c),p=0;try{for(var g=rl(l),m=g.next();!m.done;m=g.next())for(var y=m.value,w=0;w<y.getCount();w++){var _=y.getDataCodewords(),v=u.getECCodewordsPerBlock()+_;f[p++]=new t(_,new Uint8Array(v))}}catch(t){a={error:t}}finally{try{m&&!m.done&&(s=g.return)&&s.call(g)}finally{if(a)throw a.error}}for(var E=f[0].codewords.length,b=f.length-1;b>=0;){if(f[b].codewords.length===E)break;b--}b++;var A=E-u.getECCodewordsPerBlock(),C=0;for(w=0;w<A;w++)for(var I=0;I<p;I++)f[I].codewords[w]=e[C++];for(I=b;I<p;I++)f[I].codewords[A]=e[C++];var S=f[0].codewords.length;for(w=A;w<S;w++)for(I=0;I<p;I++){var T=I<b?w:w+1;f[I].codewords[T]=e[C++]}return f},t.prototype.getNumDataCodewords=function(){return this.numDataCodewords},t.prototype.getCodewords=function(){return this.codewords},t}();!function(t){t[t.TERMINATOR=0]="TERMINATOR",t[t.NUMERIC=1]="NUMERIC",t[t.ALPHANUMERIC=2]="ALPHANUMERIC",t[t.STRUCTURED_APPEND=3]="STRUCTURED_APPEND",t[t.BYTE=4]="BYTE",t[t.ECI=5]="ECI",t[t.KANJI=6]="KANJI",t[t.FNC1_FIRST_POSITION=7]="FNC1_FIRST_POSITION",t[t.FNC1_SECOND_POSITION=8]="FNC1_SECOND_POSITION",t[t.HANZI=9]="HANZI"}(Qc||(Qc={}));var ol,il,al=function(){function t(e,r,n,o){this.value=e,this.stringValue=r,this.characterCountBitsForVersions=n,this.bits=o,t.FOR_BITS.set(o,this),t.FOR_VALUE.set(e,this)}return t.forBits=function(e){var r=t.FOR_BITS.get(e);if(void 0===r)throw new Aa;return r},t.prototype.getCharacterCountBits=function(t){var e,r=t.getVersionNumber();return e=r<=9?0:r<=26?1:2,this.characterCountBitsForVersions[e]},t.prototype.getValue=function(){return this.value},t.prototype.getBits=function(){return this.bits},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.value===r.value},t.prototype.toString=function(){return this.stringValue},t.FOR_BITS=new Map,t.FOR_VALUE=new Map,t.TERMINATOR=new t(Qc.TERMINATOR,"TERMINATOR",Int32Array.from([0,0,0]),0),t.NUMERIC=new t(Qc.NUMERIC,"NUMERIC",Int32Array.from([10,12,14]),1),t.ALPHANUMERIC=new t(Qc.ALPHANUMERIC,"ALPHANUMERIC",Int32Array.from([9,11,13]),2),t.STRUCTURED_APPEND=new t(Qc.STRUCTURED_APPEND,"STRUCTURED_APPEND",Int32Array.from([0,0,0]),3),t.BYTE=new t(Qc.BYTE,"BYTE",Int32Array.from([8,16,16]),4),t.ECI=new t(Qc.ECI,"ECI",Int32Array.from([0,0,0]),7),t.KANJI=new t(Qc.KANJI,"KANJI",Int32Array.from([8,10,12]),8),t.FNC1_FIRST_POSITION=new t(Qc.FNC1_FIRST_POSITION,"FNC1_FIRST_POSITION",Int32Array.from([0,0,0]),5),t.FNC1_SECOND_POSITION=new t(Qc.FNC1_SECOND_POSITION,"FNC1_SECOND_POSITION",Int32Array.from([0,0,0]),9),t.HANZI=new t(Qc.HANZI,"HANZI",Int32Array.from([8,10,12]),13),t}(),sl=function(){function t(){}return t.decode=function(e,r,n,o){var i=new Bc(e),a=new Za,s=new Array,u=-1,c=-1;try{var l=null,d=!1,h=void 0;do{if(i.available()<4)h=al.TERMINATOR;else{var f=i.readBits(4);h=al.forBits(f)}switch(h){case al.TERMINATOR:break;case al.FNC1_FIRST_POSITION:case al.FNC1_SECOND_POSITION:d=!0;break;case al.STRUCTURED_APPEND:if(i.available()<16)throw new Ua;u=i.readBits(8),c=i.readBits(8);break;case al.ECI:var p=t.parseECIValue(i);if(null===(l=ja.getCharacterSetECIByValue(p)))throw new Ua;break;case al.HANZI:var g=i.readBits(4),m=i.readBits(h.getCharacterCountBits(r));g===t.GB2312_SUBSET&&t.decodeHanziSegment(i,a,m);break;default:var y=i.readBits(h.getCharacterCountBits(r));switch(h){case al.NUMERIC:t.decodeNumericSegment(i,a,y);break;case al.ALPHANUMERIC:t.decodeAlphanumericSegment(i,a,y,d);break;case al.BYTE:t.decodeByteSegment(i,a,y,l,s,o);break;case al.KANJI:t.decodeKanjiSegment(i,a,y);break;default:throw new Ua}}}while(h!==al.TERMINATOR)}catch(t){throw new Ua}return new ys(e,a.toString(),0===s.length?null:s,null===n?null:n.toString(),u,c)},t.decodeHanziSegment=function(t,e,r){if(13*r>t.available())throw new Ua;for(var n=new Uint8Array(2*r),o=0;r>0;){var i=t.readBits(13),a=i/96<<8&4294967295|i%96;a+=a<959?41377:42657,n[o]=a>>8&255,n[o+1]=255&a,o+=2,r--}try{e.append(Xa.decode(n,Ya.GB2312))}catch(t){throw new Ua(t)}},t.decodeKanjiSegment=function(t,e,r){if(13*r>t.available())throw new Ua;for(var n=new Uint8Array(2*r),o=0;r>0;){var i=t.readBits(13),a=i/192<<8&4294967295|i%192;a+=a<7936?33088:49472,n[o]=a>>8,n[o+1]=a,o+=2,r--}try{e.append(Xa.decode(n,Ya.SHIFT_JIS))}catch(t){throw new Ua(t)}},t.decodeByteSegment=function(t,e,r,n,o,i){if(8*r>t.available())throw new Ua;for(var a,s=new Uint8Array(r),u=0;u<r;u++)s[u]=t.readBits(8);a=null===n?Ya.guessEncoding(s,i):n.getName();try{e.append(Xa.decode(s,a))}catch(t){throw new Ua(t)}o.push(s)},t.toAlphaNumericChar=function(e){if(e>=t.ALPHANUMERIC_CHARS.length)throw new Ua;return t.ALPHANUMERIC_CHARS[e]},t.decodeAlphanumericSegment=function(e,r,n,o){for(var i=r.length();n>1;){if(e.available()<11)throw new Ua;var a=e.readBits(11);r.append(t.toAlphaNumericChar(Math.floor(a/45))),r.append(t.toAlphaNumericChar(a%45)),n-=2}if(1===n){if(e.available()<6)throw new Ua;r.append(t.toAlphaNumericChar(e.readBits(6)))}if(o)for(var s=i;s<r.length();s++)"%"===r.charAt(s)&&(s<r.length()-1&&"%"===r.charAt(s+1)?r.deleteCharAt(s+1):r.setCharAt(s,String.fromCharCode(29)))},t.decodeNumericSegment=function(e,r,n){for(;n>=3;){if(e.available()<10)throw new Ua;var o=e.readBits(10);if(o>=1e3)throw new Ua;r.append(t.toAlphaNumericChar(Math.floor(o/100))),r.append(t.toAlphaNumericChar(Math.floor(o/10)%10)),r.append(t.toAlphaNumericChar(o%10)),n-=3}if(2===n){if(e.available()<7)throw new Ua;var i=e.readBits(7);if(i>=100)throw new Ua;r.append(t.toAlphaNumericChar(Math.floor(i/10))),r.append(t.toAlphaNumericChar(i%10))}else if(1===n){if(e.available()<4)throw new Ua;var a=e.readBits(4);if(a>=10)throw new Ua;r.append(t.toAlphaNumericChar(a))}},t.parseECIValue=function(t){var e=t.readBits(8);if(!(128&e))return 127&e;if(128==(192&e))return(63&e)<<8&4294967295|t.readBits(8);if(192==(224&e))return(31&e)<<16&4294967295|t.readBits(16);throw new Ua},t.ALPHANUMERIC_CHARS="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",t.GB2312_SUBSET=1,t}(),ul=function(){function t(t){this.mirrored=t}return t.prototype.isMirrored=function(){return this.mirrored},t.prototype.applyMirroredCorrection=function(t){if(this.mirrored&&null!==t&&!(t.length<3)){var e=t[0];t[0]=t[2],t[2]=e}},t}(),cl=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},ll=function(){function t(){this.rsDecoder=new Ds(As.QR_CODE_FIELD_256)}return t.prototype.decodeBooleanArray=function(t,e){return this.decodeBitMatrix(qa.parseFromBooleanArray(t),e)},t.prototype.decodeBitMatrix=function(t,e){var r=new el(t),n=null;try{return this.decodeBitMatrixParser(r,e)}catch(t){n=t}try{r.remask(),r.setMirror(!0),r.readVersion(),r.readFormatInformation(),r.mirror();var o=this.decodeBitMatrixParser(r,e);return o.setOther(new ul(!0)),o}catch(t){if(null!==n)throw n;throw t}},t.prototype.decodeBitMatrixParser=function(t,e){var r,n,o,i,a=t.readVersion(),s=t.readFormatInformation().getErrorCorrectionLevel(),u=t.readCodewords(),c=nl.getDataBlocks(u,a,s),l=0;try{for(var d=cl(c),h=d.next();!h.done;h=d.next()){l+=(y=h.value).getNumDataCodewords()}}catch(t){r={error:t}}finally{try{h&&!h.done&&(n=d.return)&&n.call(d)}finally{if(r)throw r.error}}var f=new Uint8Array(l),p=0;try{for(var g=cl(c),m=g.next();!m.done;m=g.next()){var y,w=(y=m.value).getCodewords(),_=y.getNumDataCodewords();this.correctErrors(w,_);for(var v=0;v<_;v++)f[p++]=w[v]}}catch(t){o={error:t}}finally{try{m&&!m.done&&(i=g.return)&&i.call(g)}finally{if(o)throw o.error}}return sl.decode(f,a,s,e)},t.prototype.correctErrors=function(t,e){var r=new Int32Array(t);try{this.rsDecoder.decode(r,t.length-e)}catch(t){throw new Sa}for(var n=0;n<e;n++)t[n]=r[n]},t}(),dl=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),hl=function(t){function e(e,r,n){var o=t.call(this,e,r)||this;return o.estimatedModuleSize=n,o}return dl(e,t),e.prototype.aboutEquals=function(t,e,r){if(Math.abs(e-this.getY())<=t&&Math.abs(r-this.getX())<=t){var n=Math.abs(t-this.estimatedModuleSize);return n<=1||n<=this.estimatedModuleSize}return!1},e.prototype.combineEstimate=function(t,r,n){return new e((this.getX()+r)/2,(this.getY()+t)/2,(this.estimatedModuleSize+n)/2)},e}(Ns),fl=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},pl=function(){function t(t,e,r,n,o,i,a){this.image=t,this.startX=e,this.startY=r,this.width=n,this.height=o,this.moduleSize=i,this.resultPointCallback=a,this.possibleCenters=[],this.crossCheckStateCount=new Int32Array(3)}return t.prototype.find=function(){for(var t=this.startX,e=this.height,r=t+this.width,n=this.startY+e/2,o=new Int32Array(3),i=this.image,a=0;a<e;a++){var s=n+(1&a?-Math.floor((a+1)/2):Math.floor((a+1)/2));o[0]=0,o[1]=0,o[2]=0;for(var u=t;u<r&&!i.get(u,s);)u++;for(var c=0;u<r;){if(i.get(u,s))if(1===c)o[1]++;else if(2===c){var l;if(this.foundPatternCross(o))if(null!==(l=this.handlePossibleCenter(o,s,u)))return l;o[0]=o[2],o[1]=1,o[2]=0,c=1}else o[++c]++;else 1===c&&c++,o[c]++;u++}if(this.foundPatternCross(o))if(null!==(l=this.handlePossibleCenter(o,s,r)))return l}if(0!==this.possibleCenters.length)return this.possibleCenters[0];throw new $a},t.centerFromEnd=function(t,e){return e-t[2]-t[1]/2},t.prototype.foundPatternCross=function(t){for(var e=this.moduleSize,r=e/2,n=0;n<3;n++)if(Math.abs(e-t[n])>=r)return!1;return!0},t.prototype.crossCheckVertical=function(e,r,n,o){var i=this.image,a=i.getHeight(),s=this.crossCheckStateCount;s[0]=0,s[1]=0,s[2]=0;for(var u=e;u>=0&&i.get(r,u)&&s[1]<=n;)s[1]++,u--;if(u<0||s[1]>n)return NaN;for(;u>=0&&!i.get(r,u)&&s[0]<=n;)s[0]++,u--;if(s[0]>n)return NaN;for(u=e+1;u<a&&i.get(r,u)&&s[1]<=n;)s[1]++,u++;if(u===a||s[1]>n)return NaN;for(;u<a&&!i.get(r,u)&&s[2]<=n;)s[2]++,u++;if(s[2]>n)return NaN;var c=s[0]+s[1]+s[2];return 5*Math.abs(c-o)>=2*o?NaN:this.foundPatternCross(s)?t.centerFromEnd(s,u):NaN},t.prototype.handlePossibleCenter=function(e,r,n){var o,i,a=e[0]+e[1]+e[2],s=t.centerFromEnd(e,n),u=this.crossCheckVertical(r,s,2*e[1],a);if(!isNaN(u)){var c=(e[0]+e[1]+e[2])/3;try{for(var l=fl(this.possibleCenters),d=l.next();!d.done;d=l.next()){var h=d.value;if(h.aboutEquals(c,u,s))return h.combineEstimate(u,s,c)}}catch(t){o={error:t}}finally{try{d&&!d.done&&(i=l.return)&&i.call(l)}finally{if(o)throw o.error}}var f=new hl(s,u,c);this.possibleCenters.push(f),null!==this.resultPointCallback&&void 0!==this.resultPointCallback&&this.resultPointCallback.foundPossibleResultPoint(f)}return null},t}(),gl=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),ml=function(t){function e(e,r,n,o){var i=t.call(this,e,r)||this;return i.estimatedModuleSize=n,i.count=o,void 0===o&&(i.count=1),i}return gl(e,t),e.prototype.getEstimatedModuleSize=function(){return this.estimatedModuleSize},e.prototype.getCount=function(){return this.count},e.prototype.aboutEquals=function(t,e,r){if(Math.abs(e-this.getY())<=t&&Math.abs(r-this.getX())<=t){var n=Math.abs(t-this.estimatedModuleSize);return n<=1||n<=this.estimatedModuleSize}return!1},e.prototype.combineEstimate=function(t,r,n){var o=this.count+1;return new e((this.count*this.getX()+r)/o,(this.count*this.getY()+t)/o,(this.count*this.estimatedModuleSize+n)/o,o)},e}(Ns),yl=function(){function t(t){this.bottomLeft=t[0],this.topLeft=t[1],this.topRight=t[2]}return t.prototype.getBottomLeft=function(){return this.bottomLeft},t.prototype.getTopLeft=function(){return this.topLeft},t.prototype.getTopRight=function(){return this.topRight},t}(),wl=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},_l=function(){function t(t,e){this.image=t,this.resultPointCallback=e,this.possibleCenters=[],this.crossCheckStateCount=new Int32Array(5),this.resultPointCallback=e}return t.prototype.getImage=function(){return this.image},t.prototype.getPossibleCenters=function(){return this.possibleCenters},t.prototype.find=function(e){var r=null!=e&&void 0!==e.get(La.TRY_HARDER),n=null!=e&&void 0!==e.get(La.PURE_BARCODE),o=this.image,i=o.getHeight(),a=o.getWidth(),s=Math.floor(3*i/(4*t.MAX_MODULES));(s<t.MIN_SKIP||r)&&(s=t.MIN_SKIP);for(var u=!1,c=new Int32Array(5),l=s-1;l<i&&!u;l+=s){c[0]=0,c[1]=0,c[2]=0,c[3]=0,c[4]=0;for(var d=0,h=0;h<a;h++)if(o.get(h,l))1&~d||d++,c[d]++;else if(1&d)c[d]++;else if(4===d)if(t.foundPatternCross(c)){if(!0!==this.handlePossibleCenter(c,l,h,n)){c[0]=c[2],c[1]=c[3],c[2]=c[4],c[3]=1,c[4]=0,d=3;continue}if(s=2,!0===this.hasSkipped)u=this.haveMultiplyConfirmedCenters();else{var f=this.findRowSkip();f>c[2]&&(l+=f-c[2]-s,h=a-1)}d=0,c[0]=0,c[1]=0,c[2]=0,c[3]=0,c[4]=0}else c[0]=c[2],c[1]=c[3],c[2]=c[4],c[3]=1,c[4]=0,d=3;else c[++d]++;if(t.foundPatternCross(c))!0===this.handlePossibleCenter(c,l,a,n)&&(s=c[0],this.hasSkipped&&(u=this.haveMultiplyConfirmedCenters()))}var p=this.selectBestPatterns();return Ns.orderBestPatterns(p),new yl(p)},t.centerFromEnd=function(t,e){return e-t[4]-t[3]-t[2]/2},t.foundPatternCross=function(t){for(var e=0,r=0;r<5;r++){var n=t[r];if(0===n)return!1;e+=n}if(e<7)return!1;var o=e/7,i=o/2;return Math.abs(o-t[0])<i&&Math.abs(o-t[1])<i&&Math.abs(3*o-t[2])<3*i&&Math.abs(o-t[3])<i&&Math.abs(o-t[4])<i},t.prototype.getCrossCheckStateCount=function(){var t=this.crossCheckStateCount;return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t},t.prototype.crossCheckDiagonal=function(e,r,n,o){for(var i=this.getCrossCheckStateCount(),a=0,s=this.image;e>=a&&r>=a&&s.get(r-a,e-a);)i[2]++,a++;if(e<a||r<a)return!1;for(;e>=a&&r>=a&&!s.get(r-a,e-a)&&i[1]<=n;)i[1]++,a++;if(e<a||r<a||i[1]>n)return!1;for(;e>=a&&r>=a&&s.get(r-a,e-a)&&i[0]<=n;)i[0]++,a++;if(i[0]>n)return!1;var u=s.getHeight(),c=s.getWidth();for(a=1;e+a<u&&r+a<c&&s.get(r+a,e+a);)i[2]++,a++;if(e+a>=u||r+a>=c)return!1;for(;e+a<u&&r+a<c&&!s.get(r+a,e+a)&&i[3]<n;)i[3]++,a++;if(e+a>=u||r+a>=c||i[3]>=n)return!1;for(;e+a<u&&r+a<c&&s.get(r+a,e+a)&&i[4]<n;)i[4]++,a++;if(i[4]>=n)return!1;var l=i[0]+i[1]+i[2]+i[3]+i[4];return Math.abs(l-o)<2*o&&t.foundPatternCross(i)},t.prototype.crossCheckVertical=function(e,r,n,o){for(var i=this.image,a=i.getHeight(),s=this.getCrossCheckStateCount(),u=e;u>=0&&i.get(r,u);)s[2]++,u--;if(u<0)return NaN;for(;u>=0&&!i.get(r,u)&&s[1]<=n;)s[1]++,u--;if(u<0||s[1]>n)return NaN;for(;u>=0&&i.get(r,u)&&s[0]<=n;)s[0]++,u--;if(s[0]>n)return NaN;for(u=e+1;u<a&&i.get(r,u);)s[2]++,u++;if(u===a)return NaN;for(;u<a&&!i.get(r,u)&&s[3]<n;)s[3]++,u++;if(u===a||s[3]>=n)return NaN;for(;u<a&&i.get(r,u)&&s[4]<n;)s[4]++,u++;if(s[4]>=n)return NaN;var c=s[0]+s[1]+s[2]+s[3]+s[4];return 5*Math.abs(c-o)>=2*o?NaN:t.foundPatternCross(s)?t.centerFromEnd(s,u):NaN},t.prototype.crossCheckHorizontal=function(e,r,n,o){for(var i=this.image,a=i.getWidth(),s=this.getCrossCheckStateCount(),u=e;u>=0&&i.get(u,r);)s[2]++,u--;if(u<0)return NaN;for(;u>=0&&!i.get(u,r)&&s[1]<=n;)s[1]++,u--;if(u<0||s[1]>n)return NaN;for(;u>=0&&i.get(u,r)&&s[0]<=n;)s[0]++,u--;if(s[0]>n)return NaN;for(u=e+1;u<a&&i.get(u,r);)s[2]++,u++;if(u===a)return NaN;for(;u<a&&!i.get(u,r)&&s[3]<n;)s[3]++,u++;if(u===a||s[3]>=n)return NaN;for(;u<a&&i.get(u,r)&&s[4]<n;)s[4]++,u++;if(s[4]>=n)return NaN;var c=s[0]+s[1]+s[2]+s[3]+s[4];return 5*Math.abs(c-o)>=o?NaN:t.foundPatternCross(s)?t.centerFromEnd(s,u):NaN},t.prototype.handlePossibleCenter=function(e,r,n,o){var i=e[0]+e[1]+e[2]+e[3]+e[4],a=t.centerFromEnd(e,n),s=this.crossCheckVertical(r,Math.floor(a),e[2],i);if(!isNaN(s)&&(a=this.crossCheckHorizontal(Math.floor(a),Math.floor(s),e[2],i),!isNaN(a)&&(!o||this.crossCheckDiagonal(Math.floor(s),Math.floor(a),e[2],i)))){for(var u=i/7,c=!1,l=this.possibleCenters,d=0,h=l.length;d<h;d++){var f=l[d];if(f.aboutEquals(u,s,a)){l[d]=f.combineEstimate(s,a,u),c=!0;break}}if(!c){var p=new ml(a,s,u);l.push(p),null!==this.resultPointCallback&&void 0!==this.resultPointCallback&&this.resultPointCallback.foundPossibleResultPoint(p)}return!0}return!1},t.prototype.findRowSkip=function(){var e,r;if(this.possibleCenters.length<=1)return 0;var n=null;try{for(var o=wl(this.possibleCenters),i=o.next();!i.done;i=o.next()){var a=i.value;if(a.getCount()>=t.CENTER_QUORUM){if(null!=n)return this.hasSkipped=!0,Math.floor((Math.abs(n.getX()-a.getX())-Math.abs(n.getY()-a.getY()))/2);n=a}}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}return 0},t.prototype.haveMultiplyConfirmedCenters=function(){var e,r,n,o,i=0,a=0,s=this.possibleCenters.length;try{for(var u=wl(this.possibleCenters),c=u.next();!c.done;c=u.next()){(p=c.value).getCount()>=t.CENTER_QUORUM&&(i++,a+=p.getEstimatedModuleSize())}}catch(t){e={error:t}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(e)throw e.error}}if(i<3)return!1;var l=a/s,d=0;try{for(var h=wl(this.possibleCenters),f=h.next();!f.done;f=h.next()){var p=f.value;d+=Math.abs(p.getEstimatedModuleSize()-l)}}catch(t){n={error:t}}finally{try{f&&!f.done&&(o=h.return)&&o.call(h)}finally{if(n)throw n.error}}return d<=.05*a},t.prototype.selectBestPatterns=function(){var t,e,r,n,o=this.possibleCenters.length;if(o<3)throw new $a;var i,a=this.possibleCenters;if(o>3){var s=0,u=0;try{for(var c=wl(this.possibleCenters),l=c.next();!l.done;l=c.next()){var d=l.value.getEstimatedModuleSize();s+=d,u+=d*d}}catch(e){t={error:e}}finally{try{l&&!l.done&&(e=c.return)&&e.call(c)}finally{if(t)throw t.error}}i=s/o;var h=Math.sqrt(u/o-i*i);a.sort((function(t,e){var r=Math.abs(e.getEstimatedModuleSize()-i),n=Math.abs(t.getEstimatedModuleSize()-i);return r<n?-1:r>n?1:0}));for(var f=Math.max(.2*i,h),p=0;p<a.length&&a.length>3;p++){var g=a[p];Math.abs(g.getEstimatedModuleSize()-i)>f&&(a.splice(p,1),p--)}}if(a.length>3){s=0;try{for(var m=wl(a),y=m.next();!y.done;y=m.next()){s+=y.value.getEstimatedModuleSize()}}catch(t){r={error:t}}finally{try{y&&!y.done&&(n=m.return)&&n.call(m)}finally{if(r)throw r.error}}i=s/a.length,a.sort((function(t,e){if(e.getCount()===t.getCount()){var r=Math.abs(e.getEstimatedModuleSize()-i),n=Math.abs(t.getEstimatedModuleSize()-i);return r<n?1:r>n?-1:0}return e.getCount()-t.getCount()})),a.splice(3)}return[a[0],a[1],a[2]]},t.CENTER_QUORUM=2,t.MIN_SKIP=3,t.MAX_MODULES=57,t}(),vl=function(){function t(t){this.image=t}return t.prototype.getImage=function(){return this.image},t.prototype.getResultPointCallback=function(){return this.resultPointCallback},t.prototype.detect=function(t){this.resultPointCallback=null==t?null:t.get(La.NEED_RESULT_POINT_CALLBACK);var e=new _l(this.image,this.resultPointCallback).find(t);return this.processFinderPatternInfo(e)},t.prototype.processFinderPatternInfo=function(e){var r=e.getTopLeft(),n=e.getTopRight(),o=e.getBottomLeft(),i=this.calculateModuleSize(r,n,o);if(i<1)throw new $a("No pattern found in proccess finder.");var a=t.computeDimension(r,n,o,i),s=Jc.getProvisionalVersionForDimension(a),u=s.getDimensionForVersion()-7,c=null;if(s.getAlignmentPatternCenters().length>0)for(var l=n.getX()-r.getX()+o.getX(),d=n.getY()-r.getY()+o.getY(),h=1-3/u,f=Math.floor(r.getX()+h*(l-r.getX())),p=Math.floor(r.getY()+h*(d-r.getY())),g=4;g<=16;g<<=1)try{c=this.findAlignmentInRegion(i,f,p,g);break}catch(t){if(!(t instanceof $a))throw t}var m=t.createTransform(r,n,o,c,a),y=t.sampleGrid(this.image,m,a);return new ks(y,null===c?[o,r,n]:[o,r,n,c])},t.createTransform=function(t,e,r,n,o){var i,a,s,u,c=o-3.5;return null!==n?(i=n.getX(),a=n.getY(),u=s=c-3):(i=e.getX()-t.getX()+r.getX(),a=e.getY()-t.getY()+r.getY(),s=c,u=c),Ls.quadrilateralToQuadrilateral(3.5,3.5,c,3.5,s,u,3.5,c,t.getX(),t.getY(),e.getX(),e.getY(),i,a,r.getX(),r.getY())},t.sampleGrid=function(t,e,r){return Vs.getInstance().sampleGridWithTransform(t,r,r,e)},t.computeDimension=function(t,e,r,n){var o=Rs.round(Ns.distance(t,e)/n),i=Rs.round(Ns.distance(t,r)/n),a=Math.floor((o+i)/2)+7;switch(3&a){case 0:a++;break;case 2:a--;break;case 3:throw new $a("Dimensions could be not found.")}return a},t.prototype.calculateModuleSize=function(t,e,r){return(this.calculateModuleSizeOneWay(t,e)+this.calculateModuleSizeOneWay(t,r))/2},t.prototype.calculateModuleSizeOneWay=function(t,e){var r=this.sizeOfBlackWhiteBlackRunBothWays(Math.floor(t.getX()),Math.floor(t.getY()),Math.floor(e.getX()),Math.floor(e.getY())),n=this.sizeOfBlackWhiteBlackRunBothWays(Math.floor(e.getX()),Math.floor(e.getY()),Math.floor(t.getX()),Math.floor(t.getY()));return isNaN(r)?n/7:isNaN(n)?r/7:(r+n)/14},t.prototype.sizeOfBlackWhiteBlackRunBothWays=function(t,e,r,n){var o=this.sizeOfBlackWhiteBlackRun(t,e,r,n),i=1,a=t-(r-t);a<0?(i=t/(t-a),a=0):a>=this.image.getWidth()&&(i=(this.image.getWidth()-1-t)/(a-t),a=this.image.getWidth()-1);var s=Math.floor(e-(n-e)*i);return i=1,s<0?(i=e/(e-s),s=0):s>=this.image.getHeight()&&(i=(this.image.getHeight()-1-e)/(s-e),s=this.image.getHeight()-1),a=Math.floor(t+(a-t)*i),(o+=this.sizeOfBlackWhiteBlackRun(t,e,a,s))-1},t.prototype.sizeOfBlackWhiteBlackRun=function(t,e,r,n){var o=Math.abs(n-e)>Math.abs(r-t);if(o){var i=t;t=e,e=i,i=r,r=n,n=i}for(var a=Math.abs(r-t),s=Math.abs(n-e),u=-a/2,c=t<r?1:-1,l=e<n?1:-1,d=0,h=r+c,f=t,p=e;f!==h;f+=c){var g=o?p:f,m=o?f:p;if(1===d===this.image.get(g,m)){if(2===d)return Rs.distance(f,p,t,e);d++}if((u+=s)>0){if(p===n)break;p+=l,u-=a}}return 2===d?Rs.distance(r+c,n,t,e):NaN},t.prototype.findAlignmentInRegion=function(t,e,r,n){var o=Math.floor(n*t),i=Math.max(0,e-o),a=Math.min(this.image.getWidth()-1,e+o);if(a-i<3*t)throw new $a("Alignment top exceeds estimated module size.");var s=Math.max(0,r-o),u=Math.min(this.image.getHeight()-1,r+o);if(u-s<3*t)throw new $a("Alignment bottom exceeds estimated module size.");return new pl(this.image,i,s,a-i,u-s,t,this.resultPointCallback).find()},t}(),El=function(){function t(){this.decoder=new ll}return t.prototype.getDecoder=function(){return this.decoder},t.prototype.decode=function(e,r){var n,o;if(null!=r&&void 0!==r.get(La.PURE_BARCODE)){var i=t.extractPureBits(e.getBlackMatrix());n=this.decoder.decodeBitMatrix(i,r),o=t.NO_POINTS}else{var a=new vl(e.getBlackMatrix()).detect(r);n=this.decoder.decodeBitMatrix(a.getBits(),r),o=a.getPoints()}n.getOther()instanceof ul&&n.getOther().applyMirroredCorrection(o);var s=new hs(n.getText(),n.getRawBytes(),void 0,o,ps.QR_CODE,void 0),u=n.getByteSegments();null!==u&&s.putMetadata(ms.BYTE_SEGMENTS,u);var c=n.getECLevel();return null!==c&&s.putMetadata(ms.ERROR_CORRECTION_LEVEL,c),n.hasStructuredAppend()&&(s.putMetadata(ms.STRUCTURED_APPEND_SEQUENCE,n.getStructuredAppendSequenceNumber()),s.putMetadata(ms.STRUCTURED_APPEND_PARITY,n.getStructuredAppendParity())),s},t.prototype.reset=function(){},t.extractPureBits=function(t){var e=t.getTopLeftOnBit(),r=t.getBottomRightOnBit();if(null===e||null===r)throw new $a;var n=this.moduleSize(e,t),o=e[1],i=r[1],a=e[0],s=r[0];if(a>=s||o>=i)throw new $a;if(i-o!=s-a&&(s=a+(i-o))>=t.getWidth())throw new $a;var u=Math.round((s-a+1)/n),c=Math.round((i-o+1)/n);if(u<=0||c<=0)throw new $a;if(c!==u)throw new $a;var l=Math.floor(n/2);o+=l;var d=(a+=l)+Math.floor((u-1)*n)-s;if(d>0){if(d>l)throw new $a;a-=d}var h=o+Math.floor((c-1)*n)-i;if(h>0){if(h>l)throw new $a;o-=h}for(var f=new qa(u,c),p=0;p<c;p++)for(var g=o+Math.floor(p*n),m=0;m<u;m++)t.get(a+Math.floor(m*n),g)&&f.set(m,p);return f},t.moduleSize=function(t,e){for(var r=e.getHeight(),n=e.getWidth(),o=t[0],i=t[1],a=!0,s=0;o<n&&i<r;){if(a!==e.get(o,i)){if(5==++s)break;a=!a}o++,i++}if(o===n||i===r)throw new $a;return(o-t[0])/7},t.NO_POINTS=new Array,t}(),bl=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Al=function(){function t(){}return t.prototype.PDF417Common=function(){},t.getBitCountSum=function(t){return Rs.sum(t)},t.toIntArray=function(e){var r,n;if(null==e||!e.length)return t.EMPTY_INT_ARRAY;var o=new Int32Array(e.length),i=0;try{for(var a=bl(e),s=a.next();!s.done;s=a.next()){var u=s.value;o[i++]=u}}catch(t){r={error:t}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return o},t.getCodeword=function(e){var r=xa.binarySearch(t.SYMBOL_TABLE,262143&e);return r<0?-1:(t.CODEWORD_TABLE[r]-1)%t.NUMBER_OF_CODEWORDS},t.NUMBER_OF_CODEWORDS=929,t.MAX_CODEWORDS_IN_BARCODE=t.NUMBER_OF_CODEWORDS-1,t.MIN_ROWS_IN_BARCODE=3,t.MAX_ROWS_IN_BARCODE=90,t.MODULES_IN_CODEWORD=17,t.MODULES_IN_STOP_PATTERN=18,t.BARS_IN_MODULE=8,t.EMPTY_INT_ARRAY=new Int32Array([]),t.SYMBOL_TABLE=Int32Array.from([66142,66170,66206,66236,66290,66292,66350,66382,66396,66454,66470,66476,66594,66600,66614,66626,66628,66632,66640,66654,66662,66668,66682,66690,66718,66720,66748,66758,66776,66798,66802,66804,66820,66824,66832,66846,66848,66876,66880,66936,66950,66956,66968,66992,67006,67022,67036,67042,67044,67048,67062,67118,67150,67164,67214,67228,67256,67294,67322,67350,67366,67372,67398,67404,67416,67438,67474,67476,67490,67492,67496,67510,67618,67624,67650,67656,67664,67678,67686,67692,67706,67714,67716,67728,67742,67744,67772,67782,67788,67800,67822,67826,67828,67842,67848,67870,67872,67900,67904,67960,67974,67992,68016,68030,68046,68060,68066,68068,68072,68086,68104,68112,68126,68128,68156,68160,68216,68336,68358,68364,68376,68400,68414,68448,68476,68494,68508,68536,68546,68548,68552,68560,68574,68582,68588,68654,68686,68700,68706,68708,68712,68726,68750,68764,68792,68802,68804,68808,68816,68830,68838,68844,68858,68878,68892,68920,68976,68990,68994,68996,69e3,69008,69022,69024,69052,69062,69068,69080,69102,69106,69108,69142,69158,69164,69190,69208,69230,69254,69260,69272,69296,69310,69326,69340,69386,69394,69396,69410,69416,69430,69442,69444,69448,69456,69470,69478,69484,69554,69556,69666,69672,69698,69704,69712,69726,69754,69762,69764,69776,69790,69792,69820,69830,69836,69848,69870,69874,69876,69890,69918,69920,69948,69952,70008,70022,70040,70064,70078,70094,70108,70114,70116,70120,70134,70152,70174,70176,70264,70384,70412,70448,70462,70496,70524,70542,70556,70584,70594,70600,70608,70622,70630,70636,70664,70672,70686,70688,70716,70720,70776,70896,71136,71180,71192,71216,71230,71264,71292,71360,71416,71452,71480,71536,71550,71554,71556,71560,71568,71582,71584,71612,71622,71628,71640,71662,71726,71732,71758,71772,71778,71780,71784,71798,71822,71836,71864,71874,71880,71888,71902,71910,71916,71930,71950,71964,71992,72048,72062,72066,72068,72080,72094,72096,72124,72134,72140,72152,72174,72178,72180,72206,72220,72248,72304,72318,72416,72444,72456,72464,72478,72480,72508,72512,72568,72588,72600,72624,72638,72654,72668,72674,72676,72680,72694,72726,72742,72748,72774,72780,72792,72814,72838,72856,72880,72894,72910,72924,72930,72932,72936,72950,72966,72972,72984,73008,73022,73056,73084,73102,73116,73144,73156,73160,73168,73182,73190,73196,73210,73226,73234,73236,73250,73252,73256,73270,73282,73284,73296,73310,73318,73324,73346,73348,73352,73360,73374,73376,73404,73414,73420,73432,73454,73498,73518,73522,73524,73550,73564,73570,73572,73576,73590,73800,73822,73858,73860,73872,73886,73888,73916,73944,73970,73972,73992,74014,74016,74044,74048,74104,74118,74136,74160,74174,74210,74212,74216,74230,74244,74256,74270,74272,74360,74480,74502,74508,74544,74558,74592,74620,74638,74652,74680,74690,74696,74704,74726,74732,74782,74784,74812,74992,75232,75288,75326,75360,75388,75456,75512,75576,75632,75646,75650,75652,75664,75678,75680,75708,75718,75724,75736,75758,75808,75836,75840,75896,76016,76256,76736,76824,76848,76862,76896,76924,76992,77048,77296,77340,77368,77424,77438,77536,77564,77572,77576,77584,77600,77628,77632,77688,77702,77708,77720,77744,77758,77774,77788,77870,77902,77916,77922,77928,77966,77980,78008,78018,78024,78032,78046,78060,78074,78094,78136,78192,78206,78210,78212,78224,78238,78240,78268,78278,78284,78296,78322,78324,78350,78364,78448,78462,78560,78588,78600,78622,78624,78652,78656,78712,78726,78744,78768,78782,78798,78812,78818,78820,78824,78838,78862,78876,78904,78960,78974,79072,79100,79296,79352,79368,79376,79390,79392,79420,79424,79480,79600,79628,79640,79664,79678,79712,79740,79772,79800,79810,79812,79816,79824,79838,79846,79852,79894,79910,79916,79942,79948,79960,79982,79988,80006,80024,80048,80062,80078,80092,80098,80100,80104,80134,80140,80176,80190,80224,80252,80270,80284,80312,80328,80336,80350,80358,80364,80378,80390,80396,80408,80432,80446,80480,80508,80576,80632,80654,80668,80696,80752,80766,80776,80784,80798,80800,80828,80844,80856,80878,80882,80884,80914,80916,80930,80932,80936,80950,80962,80968,80976,80990,80998,81004,81026,81028,81040,81054,81056,81084,81094,81100,81112,81134,81154,81156,81160,81168,81182,81184,81212,81216,81272,81286,81292,81304,81328,81342,81358,81372,81380,81384,81398,81434,81454,81458,81460,81486,81500,81506,81508,81512,81526,81550,81564,81592,81602,81604,81608,81616,81630,81638,81644,81702,81708,81722,81734,81740,81752,81774,81778,81780,82050,82078,82080,82108,82180,82184,82192,82206,82208,82236,82240,82296,82316,82328,82352,82366,82402,82404,82408,82440,82448,82462,82464,82492,82496,82552,82672,82694,82700,82712,82736,82750,82784,82812,82830,82882,82884,82888,82896,82918,82924,82952,82960,82974,82976,83004,83008,83064,83184,83424,83468,83480,83504,83518,83552,83580,83648,83704,83740,83768,83824,83838,83842,83844,83848,83856,83872,83900,83910,83916,83928,83950,83984,84e3,84028,84032,84088,84208,84448,84928,85040,85054,85088,85116,85184,85240,85488,85560,85616,85630,85728,85756,85764,85768,85776,85790,85792,85820,85824,85880,85894,85900,85912,85936,85966,85980,86048,86080,86136,86256,86496,86976,88160,88188,88256,88312,88560,89056,89200,89214,89312,89340,89536,89592,89608,89616,89632,89664,89720,89840,89868,89880,89904,89952,89980,89998,90012,90040,90190,90204,90254,90268,90296,90306,90308,90312,90334,90382,90396,90424,90480,90494,90500,90504,90512,90526,90528,90556,90566,90572,90584,90610,90612,90638,90652,90680,90736,90750,90848,90876,90884,90888,90896,90910,90912,90940,90944,91e3,91014,91020,91032,91056,91070,91086,91100,91106,91108,91112,91126,91150,91164,91192,91248,91262,91360,91388,91584,91640,91664,91678,91680,91708,91712,91768,91888,91928,91952,91966,92e3,92028,92046,92060,92088,92098,92100,92104,92112,92126,92134,92140,92188,92216,92272,92384,92412,92608,92664,93168,93200,93214,93216,93244,93248,93304,93424,93664,93720,93744,93758,93792,93820,93888,93944,93980,94008,94064,94078,94084,94088,94096,94110,94112,94140,94150,94156,94168,94246,94252,94278,94284,94296,94318,94342,94348,94360,94384,94398,94414,94428,94440,94470,94476,94488,94512,94526,94560,94588,94606,94620,94648,94658,94660,94664,94672,94686,94694,94700,94714,94726,94732,94744,94768,94782,94816,94844,94912,94968,94990,95004,95032,95088,95102,95112,95120,95134,95136,95164,95180,95192,95214,95218,95220,95244,95256,95280,95294,95328,95356,95424,95480,95728,95758,95772,95800,95856,95870,95968,95996,96008,96016,96030,96032,96060,96064,96120,96152,96176,96190,96220,96226,96228,96232,96290,96292,96296,96310,96322,96324,96328,96336,96350,96358,96364,96386,96388,96392,96400,96414,96416,96444,96454,96460,96472,96494,96498,96500,96514,96516,96520,96528,96542,96544,96572,96576,96632,96646,96652,96664,96688,96702,96718,96732,96738,96740,96744,96758,96772,96776,96784,96798,96800,96828,96832,96888,97008,97030,97036,97048,97072,97086,97120,97148,97166,97180,97208,97220,97224,97232,97246,97254,97260,97326,97330,97332,97358,97372,97378,97380,97384,97398,97422,97436,97464,97474,97476,97480,97488,97502,97510,97516,97550,97564,97592,97648,97666,97668,97672,97680,97694,97696,97724,97734,97740,97752,97774,97830,97836,97850,97862,97868,97880,97902,97906,97908,97926,97932,97944,97968,97998,98012,98018,98020,98024,98038,98618,98674,98676,98838,98854,98874,98892,98904,98926,98930,98932,98968,99006,99042,99044,99048,99062,99166,99194,99246,99286,99350,99366,99372,99386,99398,99416,99438,99442,99444,99462,99504,99518,99534,99548,99554,99556,99560,99574,99590,99596,99608,99632,99646,99680,99708,99726,99740,99768,99778,99780,99784,99792,99806,99814,99820,99834,99858,99860,99874,99880,99894,99906,99920,99934,99962,99970,99972,99976,99984,99998,1e5,100028,100038,100044,100056,100078,100082,100084,100142,100174,100188,100246,100262,100268,100306,100308,100390,100396,100410,100422,100428,100440,100462,100466,100468,100486,100504,100528,100542,100558,100572,100578,100580,100584,100598,100620,100656,100670,100704,100732,100750,100792,100802,100808,100816,100830,100838,100844,100858,100888,100912,100926,100960,100988,101056,101112,101148,101176,101232,101246,101250,101252,101256,101264,101278,101280,101308,101318,101324,101336,101358,101362,101364,101410,101412,101416,101430,101442,101448,101456,101470,101478,101498,101506,101508,101520,101534,101536,101564,101580,101618,101620,101636,101640,101648,101662,101664,101692,101696,101752,101766,101784,101838,101858,101860,101864,101934,101938,101940,101966,101980,101986,101988,101992,102030,102044,102072,102082,102084,102088,102096,102138,102166,102182,102188,102214,102220,102232,102254,102282,102290,102292,102306,102308,102312,102326,102444,102458,102470,102476,102488,102514,102516,102534,102552,102576,102590,102606,102620,102626,102632,102646,102662,102668,102704,102718,102752,102780,102798,102812,102840,102850,102856,102864,102878,102886,102892,102906,102936,102974,103008,103036,103104,103160,103224,103280,103294,103298,103300,103312,103326,103328,103356,103366,103372,103384,103406,103410,103412,103472,103486,103520,103548,103616,103672,103920,103992,104048,104062,104160,104188,104194,104196,104200,104208,104224,104252,104256,104312,104326,104332,104344,104368,104382,104398,104412,104418,104420,104424,104482,104484,104514,104520,104528,104542,104550,104570,104578,104580,104592,104606,104608,104636,104652,104690,104692,104706,104712,104734,104736,104764,104768,104824,104838,104856,104910,104930,104932,104936,104968,104976,104990,104992,105020,105024,105080,105200,105240,105278,105312,105372,105410,105412,105416,105424,105446,105518,105524,105550,105564,105570,105572,105576,105614,105628,105656,105666,105672,105680,105702,105722,105742,105756,105784,105840,105854,105858,105860,105864,105872,105888,105932,105970,105972,106006,106022,106028,106054,106060,106072,106100,106118,106124,106136,106160,106174,106190,106210,106212,106216,106250,106258,106260,106274,106276,106280,106306,106308,106312,106320,106334,106348,106394,106414,106418,106420,106566,106572,106610,106612,106630,106636,106648,106672,106686,106722,106724,106728,106742,106758,106764,106776,106800,106814,106848,106876,106894,106908,106936,106946,106948,106952,106960,106974,106982,106988,107032,107056,107070,107104,107132,107200,107256,107292,107320,107376,107390,107394,107396,107400,107408,107422,107424,107452,107462,107468,107480,107502,107506,107508,107544,107568,107582,107616,107644,107712,107768,108016,108060,108088,108144,108158,108256,108284,108290,108292,108296,108304,108318,108320,108348,108352,108408,108422,108428,108440,108464,108478,108494,108508,108514,108516,108520,108592,108640,108668,108736,108792,109040,109536,109680,109694,109792,109820,110016,110072,110084,110088,110096,110112,110140,110144,110200,110320,110342,110348,110360,110384,110398,110432,110460,110478,110492,110520,110532,110536,110544,110558,110658,110686,110714,110722,110724,110728,110736,110750,110752,110780,110796,110834,110836,110850,110852,110856,110864,110878,110880,110908,110912,110968,110982,111e3,111054,111074,111076,111080,111108,111112,111120,111134,111136,111164,111168,111224,111344,111372,111422,111456,111516,111554,111556,111560,111568,111590,111632,111646,111648,111676,111680,111736,111856,112096,112152,112224,112252,112320,112440,112514,112516,112520,112528,112542,112544,112588,112686,112718,112732,112782,112796,112824,112834,112836,112840,112848,112870,112890,112910,112924,112952,113008,113022,113026,113028,113032,113040,113054,113056,113100,113138,113140,113166,113180,113208,113264,113278,113376,113404,113416,113424,113440,113468,113472,113560,113614,113634,113636,113640,113686,113702,113708,113734,113740,113752,113778,113780,113798,113804,113816,113840,113854,113870,113890,113892,113896,113926,113932,113944,113968,113982,114016,114044,114076,114114,114116,114120,114128,114150,114170,114194,114196,114210,114212,114216,114242,114244,114248,114256,114270,114278,114306,114308,114312,114320,114334,114336,114364,114380,114420,114458,114478,114482,114484,114510,114524,114530,114532,114536,114842,114866,114868,114970,114994,114996,115042,115044,115048,115062,115130,115226,115250,115252,115278,115292,115298,115300,115304,115318,115342,115394,115396,115400,115408,115422,115430,115436,115450,115478,115494,115514,115526,115532,115570,115572,115738,115758,115762,115764,115790,115804,115810,115812,115816,115830,115854,115868,115896,115906,115912,115920,115934,115942,115948,115962,115996,116024,116080,116094,116098,116100,116104,116112,116126,116128,116156,116166,116172,116184,116206,116210,116212,116246,116262,116268,116282,116294,116300,116312,116334,116338,116340,116358,116364,116376,116400,116414,116430,116444,116450,116452,116456,116498,116500,116514,116520,116534,116546,116548,116552,116560,116574,116582,116588,116602,116654,116694,116714,116762,116782,116786,116788,116814,116828,116834,116836,116840,116854,116878,116892,116920,116930,116936,116944,116958,116966,116972,116986,117006,117048,117104,117118,117122,117124,117136,117150,117152,117180,117190,117196,117208,117230,117234,117236,117304,117360,117374,117472,117500,117506,117508,117512,117520,117536,117564,117568,117624,117638,117644,117656,117680,117694,117710,117724,117730,117732,117736,117750,117782,117798,117804,117818,117830,117848,117874,117876,117894,117936,117950,117966,117986,117988,117992,118022,118028,118040,118064,118078,118112,118140,118172,118210,118212,118216,118224,118238,118246,118266,118306,118312,118338,118352,118366,118374,118394,118402,118404,118408,118416,118430,118432,118460,118476,118514,118516,118574,118578,118580,118606,118620,118626,118628,118632,118678,118694,118700,118730,118738,118740,118830,118834,118836,118862,118876,118882,118884,118888,118902,118926,118940,118968,118978,118980,118984,118992,119006,119014,119020,119034,119068,119096,119152,119166,119170,119172,119176,119184,119198,119200,119228,119238,119244,119256,119278,119282,119284,119324,119352,119408,119422,119520,119548,119554,119556,119560,119568,119582,119584,119612,119616,119672,119686,119692,119704,119728,119742,119758,119772,119778,119780,119784,119798,119920,119934,120032,120060,120256,120312,120324,120328,120336,120352,120384,120440,120560,120582,120588,120600,120624,120638,120672,120700,120718,120732,120760,120770,120772,120776,120784,120798,120806,120812,120870,120876,120890,120902,120908,120920,120946,120948,120966,120972,120984,121008,121022,121038,121058,121060,121064,121078,121100,121112,121136,121150,121184,121212,121244,121282,121284,121288,121296,121318,121338,121356,121368,121392,121406,121440,121468,121536,121592,121656,121730,121732,121736,121744,121758,121760,121804,121842,121844,121890,121922,121924,121928,121936,121950,121958,121978,121986,121988,121992,122e3,122014,122016,122044,122060,122098,122100,122116,122120,122128,122142,122144,122172,122176,122232,122246,122264,122318,122338,122340,122344,122414,122418,122420,122446,122460,122466,122468,122472,122510,122524,122552,122562,122564,122568,122576,122598,122618,122646,122662,122668,122694,122700,122712,122738,122740,122762,122770,122772,122786,122788,122792,123018,123026,123028,123042,123044,123048,123062,123098,123146,123154,123156,123170,123172,123176,123190,123202,123204,123208,123216,123238,123244,123258,123290,123314,123316,123402,123410,123412,123426,123428,123432,123446,123458,123464,123472,123486,123494,123500,123514,123522,123524,123528,123536,123552,123580,123590,123596,123608,123630,123634,123636,123674,123698,123700,123740,123746,123748,123752,123834,123914,123922,123924,123938,123944,123958,123970,123976,123984,123998,124006,124012,124026,124034,124036,124048,124062,124064,124092,124102,124108,124120,124142,124146,124148,124162,124164,124168,124176,124190,124192,124220,124224,124280,124294,124300,124312,124336,124350,124366,124380,124386,124388,124392,124406,124442,124462,124466,124468,124494,124508,124514,124520,124558,124572,124600,124610,124612,124616,124624,124646,124666,124694,124710,124716,124730,124742,124748,124760,124786,124788,124818,124820,124834,124836,124840,124854,124946,124948,124962,124964,124968,124982,124994,124996,125e3,125008,125022,125030,125036,125050,125058,125060,125064,125072,125086,125088,125116,125126,125132,125144,125166,125170,125172,125186,125188,125192,125200,125216,125244,125248,125304,125318,125324,125336,125360,125374,125390,125404,125410,125412,125416,125430,125444,125448,125456,125472,125504,125560,125680,125702,125708,125720,125744,125758,125792,125820,125838,125852,125880,125890,125892,125896,125904,125918,125926,125932,125978,125998,126002,126004,126030,126044,126050,126052,126056,126094,126108,126136,126146,126148,126152,126160,126182,126202,126222,126236,126264,126320,126334,126338,126340,126344,126352,126366,126368,126412,126450,126452,126486,126502,126508,126522,126534,126540,126552,126574,126578,126580,126598,126604,126616,126640,126654,126670,126684,126690,126692,126696,126738,126754,126756,126760,126774,126786,126788,126792,126800,126814,126822,126828,126842,126894,126898,126900,126934,127126,127142,127148,127162,127178,127186,127188,127254,127270,127276,127290,127302,127308,127320,127342,127346,127348,127370,127378,127380,127394,127396,127400,127450,127510,127526,127532,127546,127558,127576,127598,127602,127604,127622,127628,127640,127664,127678,127694,127708,127714,127716,127720,127734,127754,127762,127764,127778,127784,127810,127812,127816,127824,127838,127846,127866,127898,127918,127922,127924,128022,128038,128044,128058,128070,128076,128088,128110,128114,128116,128134,128140,128152,128176,128190,128206,128220,128226,128228,128232,128246,128262,128268,128280,128304,128318,128352,128380,128398,128412,128440,128450,128452,128456,128464,128478,128486,128492,128506,128522,128530,128532,128546,128548,128552,128566,128578,128580,128584,128592,128606,128614,128634,128642,128644,128648,128656,128670,128672,128700,128716,128754,128756,128794,128814,128818,128820,128846,128860,128866,128868,128872,128886,128918,128934,128940,128954,128978,128980,129178,129198,129202,129204,129238,129258,129306,129326,129330,129332,129358,129372,129378,129380,129384,129398,129430,129446,129452,129466,129482,129490,129492,129562,129582,129586,129588,129614,129628,129634,129636,129640,129654,129678,129692,129720,129730,129732,129736,129744,129758,129766,129772,129814,129830,129836,129850,129862,129868,129880,129902,129906,129908,129930,129938,129940,129954,129956,129960,129974,130010]),t.CODEWORD_TABLE=Int32Array.from([2627,1819,2622,2621,1813,1812,2729,2724,2723,2779,2774,2773,902,896,908,868,865,861,859,2511,873,871,1780,835,2493,825,2491,842,837,844,1764,1762,811,810,809,2483,807,2482,806,2480,815,814,813,812,2484,817,816,1745,1744,1742,1746,2655,2637,2635,2626,2625,2623,2628,1820,2752,2739,2737,2728,2727,2725,2730,2785,2783,2778,2777,2775,2780,787,781,747,739,736,2413,754,752,1719,692,689,681,2371,678,2369,700,697,694,703,1688,1686,642,638,2343,631,2341,627,2338,651,646,643,2345,654,652,1652,1650,1647,1654,601,599,2322,596,2321,594,2319,2317,611,610,608,606,2324,603,2323,615,614,612,1617,1616,1614,1612,616,1619,1618,2575,2538,2536,905,901,898,909,2509,2507,2504,870,867,864,860,2512,875,872,1781,2490,2489,2487,2485,1748,836,834,832,830,2494,827,2492,843,841,839,845,1765,1763,2701,2676,2674,2653,2648,2656,2634,2633,2631,2629,1821,2638,2636,2770,2763,2761,2750,2745,2753,2736,2735,2733,2731,1848,2740,2738,2786,2784,591,588,576,569,566,2296,1590,537,534,526,2276,522,2274,545,542,539,548,1572,1570,481,2245,466,2242,462,2239,492,485,482,2249,496,494,1534,1531,1528,1538,413,2196,406,2191,2188,425,419,2202,415,2199,432,430,427,1472,1467,1464,433,1476,1474,368,367,2160,365,2159,362,2157,2155,2152,378,377,375,2166,372,2165,369,2162,383,381,379,2168,1419,1418,1416,1414,385,1411,384,1423,1422,1420,1424,2461,802,2441,2439,790,786,783,794,2409,2406,2403,750,742,738,2414,756,753,1720,2367,2365,2362,2359,1663,693,691,684,2373,680,2370,702,699,696,704,1690,1687,2337,2336,2334,2332,1624,2329,1622,640,637,2344,634,2342,630,2340,650,648,645,2346,655,653,1653,1651,1649,1655,2612,2597,2595,2571,2568,2565,2576,2534,2529,2526,1787,2540,2537,907,904,900,910,2503,2502,2500,2498,1768,2495,1767,2510,2508,2506,869,866,863,2513,876,874,1782,2720,2713,2711,2697,2694,2691,2702,2672,2670,2664,1828,2678,2675,2647,2646,2644,2642,1823,2639,1822,2654,2652,2650,2657,2771,1855,2765,2762,1850,1849,2751,2749,2747,2754,353,2148,344,342,336,2142,332,2140,345,1375,1373,306,2130,299,2128,295,2125,319,314,311,2132,1354,1352,1349,1356,262,257,2101,253,2096,2093,274,273,267,2107,263,2104,280,278,275,1316,1311,1308,1320,1318,2052,202,2050,2044,2040,219,2063,212,2060,208,2055,224,221,2066,1260,1258,1252,231,1248,229,1266,1264,1261,1268,155,1998,153,1996,1994,1991,1988,165,164,2007,162,2006,159,2003,2e3,172,171,169,2012,166,2010,1186,1184,1182,1179,175,1176,173,1192,1191,1189,1187,176,1194,1193,2313,2307,2305,592,589,2294,2292,2289,578,572,568,2297,580,1591,2272,2267,2264,1547,538,536,529,2278,525,2275,547,544,541,1574,1571,2237,2235,2229,1493,2225,1489,478,2247,470,2244,465,2241,493,488,484,2250,498,495,1536,1533,1530,1539,2187,2186,2184,2182,1432,2179,1430,2176,1427,414,412,2197,409,2195,405,2193,2190,426,424,421,2203,418,2201,431,429,1473,1471,1469,1466,434,1477,1475,2478,2472,2470,2459,2457,2454,2462,803,2437,2432,2429,1726,2443,2440,792,789,785,2401,2399,2393,1702,2389,1699,2411,2408,2405,745,741,2415,758,755,1721,2358,2357,2355,2353,1661,2350,1660,2347,1657,2368,2366,2364,2361,1666,690,687,2374,683,2372,701,698,705,1691,1689,2619,2617,2610,2608,2605,2613,2593,2588,2585,1803,2599,2596,2563,2561,2555,1797,2551,1795,2573,2570,2567,2577,2525,2524,2522,2520,1786,2517,1785,2514,1783,2535,2533,2531,2528,1788,2541,2539,906,903,911,2721,1844,2715,2712,1838,1836,2699,2696,2693,2703,1827,1826,1824,2673,2671,2669,2666,1829,2679,2677,1858,1857,2772,1854,1853,1851,1856,2766,2764,143,1987,139,1986,135,133,131,1984,128,1983,125,1981,138,137,136,1985,1133,1132,1130,112,110,1974,107,1973,104,1971,1969,122,121,119,117,1977,114,1976,124,1115,1114,1112,1110,1117,1116,84,83,1953,81,1952,78,1950,1948,1945,94,93,91,1959,88,1958,85,1955,99,97,95,1961,1086,1085,1083,1081,1078,100,1090,1089,1087,1091,49,47,1917,44,1915,1913,1910,1907,59,1926,56,1925,53,1922,1919,66,64,1931,61,1929,1042,1040,1038,71,1035,70,1032,68,1048,1047,1045,1043,1050,1049,12,10,1869,1867,1864,1861,21,1880,19,1877,1874,1871,28,1888,25,1886,22,1883,982,980,977,974,32,30,991,989,987,984,34,995,994,992,2151,2150,2147,2146,2144,356,355,354,2149,2139,2138,2136,2134,1359,343,341,338,2143,335,2141,348,347,346,1376,1374,2124,2123,2121,2119,1326,2116,1324,310,308,305,2131,302,2129,298,2127,320,318,316,313,2133,322,321,1355,1353,1351,1357,2092,2091,2089,2087,1276,2084,1274,2081,1271,259,2102,256,2100,252,2098,2095,272,269,2108,266,2106,281,279,277,1317,1315,1313,1310,282,1321,1319,2039,2037,2035,2032,1203,2029,1200,1197,207,2053,205,2051,201,2049,2046,2043,220,218,2064,215,2062,211,2059,228,226,223,2069,1259,1257,1254,232,1251,230,1267,1265,1263,2316,2315,2312,2311,2309,2314,2304,2303,2301,2299,1593,2308,2306,590,2288,2287,2285,2283,1578,2280,1577,2295,2293,2291,579,577,574,571,2298,582,581,1592,2263,2262,2260,2258,1545,2255,1544,2252,1541,2273,2271,2269,2266,1550,535,532,2279,528,2277,546,543,549,1575,1573,2224,2222,2220,1486,2217,1485,2214,1482,1479,2238,2236,2234,2231,1496,2228,1492,480,477,2248,473,2246,469,2243,490,487,2251,497,1537,1535,1532,2477,2476,2474,2479,2469,2468,2466,2464,1730,2473,2471,2453,2452,2450,2448,1729,2445,1728,2460,2458,2456,2463,805,804,2428,2427,2425,2423,1725,2420,1724,2417,1722,2438,2436,2434,2431,1727,2444,2442,793,791,788,795,2388,2386,2384,1697,2381,1696,2378,1694,1692,2402,2400,2398,2395,1703,2392,1701,2412,2410,2407,751,748,744,2416,759,757,1807,2620,2618,1806,1805,2611,2609,2607,2614,1802,1801,1799,2594,2592,2590,2587,1804,2600,2598,1794,1793,1791,1789,2564,2562,2560,2557,1798,2554,1796,2574,2572,2569,2578,1847,1846,2722,1843,1842,1840,1845,2716,2714,1835,1834,1832,1830,1839,1837,2700,2698,2695,2704,1817,1811,1810,897,862,1777,829,826,838,1760,1758,808,2481,1741,1740,1738,1743,2624,1818,2726,2776,782,740,737,1715,686,679,695,1682,1680,639,628,2339,647,644,1645,1643,1640,1648,602,600,597,595,2320,593,2318,609,607,604,1611,1610,1608,1606,613,1615,1613,2328,926,924,892,886,899,857,850,2505,1778,824,823,821,819,2488,818,2486,833,831,828,840,1761,1759,2649,2632,2630,2746,2734,2732,2782,2781,570,567,1587,531,527,523,540,1566,1564,476,467,463,2240,486,483,1524,1521,1518,1529,411,403,2192,399,2189,423,416,1462,1457,1454,428,1468,1465,2210,366,363,2158,360,2156,357,2153,376,373,370,2163,1410,1409,1407,1405,382,1402,380,1417,1415,1412,1421,2175,2174,777,774,771,784,732,725,722,2404,743,1716,676,674,668,2363,665,2360,685,1684,1681,626,624,622,2335,620,2333,617,2330,641,635,649,1646,1644,1642,2566,928,925,2530,2527,894,891,888,2501,2499,2496,858,856,854,851,1779,2692,2668,2665,2645,2643,2640,2651,2768,2759,2757,2744,2743,2741,2748,352,1382,340,337,333,1371,1369,307,300,296,2126,315,312,1347,1342,1350,261,258,250,2097,246,2094,271,268,264,1306,1301,1298,276,1312,1309,2115,203,2048,195,2045,191,2041,213,209,2056,1246,1244,1238,225,1234,222,1256,1253,1249,1262,2080,2079,154,1997,150,1995,147,1992,1989,163,160,2004,156,2001,1175,1174,1172,1170,1167,170,1164,167,1185,1183,1180,1177,174,1190,1188,2025,2024,2022,587,586,564,559,556,2290,573,1588,520,518,512,2268,508,2265,530,1568,1565,461,457,2233,450,2230,446,2226,479,471,489,1526,1523,1520,397,395,2185,392,2183,389,2180,2177,410,2194,402,422,1463,1461,1459,1456,1470,2455,799,2433,2430,779,776,773,2397,2394,2390,734,728,724,746,1717,2356,2354,2351,2348,1658,677,675,673,670,667,688,1685,1683,2606,2589,2586,2559,2556,2552,927,2523,2521,2518,2515,1784,2532,895,893,890,2718,2709,2707,2689,2687,2684,2663,2662,2660,2658,1825,2667,2769,1852,2760,2758,142,141,1139,1138,134,132,129,126,1982,1129,1128,1126,1131,113,111,108,105,1972,101,1970,120,118,115,1109,1108,1106,1104,123,1113,1111,82,79,1951,75,1949,72,1946,92,89,86,1956,1077,1076,1074,1072,98,1069,96,1084,1082,1079,1088,1968,1967,48,45,1916,42,1914,39,1911,1908,60,57,54,1923,50,1920,1031,1030,1028,1026,67,1023,65,1020,62,1041,1039,1036,1033,69,1046,1044,1944,1943,1941,11,9,1868,7,1865,1862,1859,20,1878,16,1875,13,1872,970,968,966,963,29,960,26,23,983,981,978,975,33,971,31,990,988,985,1906,1904,1902,993,351,2145,1383,331,330,328,326,2137,323,2135,339,1372,1370,294,293,291,289,2122,286,2120,283,2117,309,303,317,1348,1346,1344,245,244,242,2090,239,2088,236,2085,2082,260,2099,249,270,1307,1305,1303,1300,1314,189,2038,186,2036,183,2033,2030,2026,206,198,2047,194,216,1247,1245,1243,1240,227,1237,1255,2310,2302,2300,2286,2284,2281,565,563,561,558,575,1589,2261,2259,2256,2253,1542,521,519,517,514,2270,511,533,1569,1567,2223,2221,2218,2215,1483,2211,1480,459,456,453,2232,449,474,491,1527,1525,1522,2475,2467,2465,2451,2449,2446,801,800,2426,2424,2421,2418,1723,2435,780,778,775,2387,2385,2382,2379,1695,2375,1693,2396,735,733,730,727,749,1718,2616,2615,2604,2603,2601,2584,2583,2581,2579,1800,2591,2550,2549,2547,2545,1792,2542,1790,2558,929,2719,1841,2710,2708,1833,1831,2690,2688,2686,1815,1809,1808,1774,1756,1754,1737,1736,1734,1739,1816,1711,1676,1674,633,629,1638,1636,1633,1641,598,1605,1604,1602,1600,605,1609,1607,2327,887,853,1775,822,820,1757,1755,1584,524,1560,1558,468,464,1514,1511,1508,1519,408,404,400,1452,1447,1444,417,1458,1455,2208,364,361,358,2154,1401,1400,1398,1396,374,1393,371,1408,1406,1403,1413,2173,2172,772,726,723,1712,672,669,666,682,1678,1675,625,623,621,618,2331,636,632,1639,1637,1635,920,918,884,880,889,849,848,847,846,2497,855,852,1776,2641,2742,2787,1380,334,1367,1365,301,297,1340,1338,1335,1343,255,251,247,1296,1291,1288,265,1302,1299,2113,204,196,192,2042,1232,1230,1224,214,1220,210,1242,1239,1235,1250,2077,2075,151,148,1993,144,1990,1163,1162,1160,1158,1155,161,1152,157,1173,1171,1168,1165,168,1181,1178,2021,2020,2018,2023,585,560,557,1585,516,509,1562,1559,458,447,2227,472,1516,1513,1510,398,396,393,390,2181,386,2178,407,1453,1451,1449,1446,420,1460,2209,769,764,720,712,2391,729,1713,664,663,661,659,2352,656,2349,671,1679,1677,2553,922,919,2519,2516,885,883,881,2685,2661,2659,2767,2756,2755,140,1137,1136,130,127,1125,1124,1122,1127,109,106,102,1103,1102,1100,1098,116,1107,1105,1980,80,76,73,1947,1068,1067,1065,1063,90,1060,87,1075,1073,1070,1080,1966,1965,46,43,40,1912,36,1909,1019,1018,1016,1014,58,1011,55,1008,51,1029,1027,1024,1021,63,1037,1034,1940,1939,1937,1942,8,1866,4,1863,1,1860,956,954,952,949,946,17,14,969,967,964,961,27,957,24,979,976,972,1901,1900,1898,1896,986,1905,1903,350,349,1381,329,327,324,1368,1366,292,290,287,284,2118,304,1341,1339,1337,1345,243,240,237,2086,233,2083,254,1297,1295,1293,1290,1304,2114,190,187,184,2034,180,2031,177,2027,199,1233,1231,1229,1226,217,1223,1241,2078,2076,584,555,554,552,550,2282,562,1586,507,506,504,502,2257,499,2254,515,1563,1561,445,443,441,2219,438,2216,435,2212,460,454,475,1517,1515,1512,2447,798,797,2422,2419,770,768,766,2383,2380,2376,721,719,717,714,731,1714,2602,2582,2580,2548,2546,2543,923,921,2717,2706,2705,2683,2682,2680,1771,1752,1750,1733,1732,1731,1735,1814,1707,1670,1668,1631,1629,1626,1634,1599,1598,1596,1594,1603,1601,2326,1772,1753,1751,1581,1554,1552,1504,1501,1498,1509,1442,1437,1434,401,1448,1445,2206,1392,1391,1389,1387,1384,359,1399,1397,1394,1404,2171,2170,1708,1672,1669,619,1632,1630,1628,1773,1378,1363,1361,1333,1328,1336,1286,1281,1278,248,1292,1289,2111,1218,1216,1210,197,1206,193,1228,1225,1221,1236,2073,2071,1151,1150,1148,1146,152,1143,149,1140,145,1161,1159,1156,1153,158,1169,1166,2017,2016,2014,2019,1582,510,1556,1553,452,448,1506,1500,394,391,387,1443,1441,1439,1436,1450,2207,765,716,713,1709,662,660,657,1673,1671,916,914,879,878,877,882,1135,1134,1121,1120,1118,1123,1097,1096,1094,1092,103,1101,1099,1979,1059,1058,1056,1054,77,1051,74,1066,1064,1061,1071,1964,1963,1007,1006,1004,1002,999,41,996,37,1017,1015,1012,1009,52,1025,1022,1936,1935,1933,1938,942,940,938,935,932,5,2,955,953,950,947,18,943,15,965,962,958,1895,1894,1892,1890,973,1899,1897,1379,325,1364,1362,288,285,1334,1332,1330,241,238,234,1287,1285,1283,1280,1294,2112,188,185,181,178,2028,1219,1217,1215,1212,200,1209,1227,2074,2072,583,553,551,1583,505,503,500,513,1557,1555,444,442,439,436,2213,455,451,1507,1505,1502,796,763,762,760,767,711,710,708,706,2377,718,715,1710,2544,917,915,2681,1627,1597,1595,2325,1769,1749,1747,1499,1438,1435,2204,1390,1388,1385,1395,2169,2167,1704,1665,1662,1625,1623,1620,1770,1329,1282,1279,2109,1214,1207,1222,2068,2065,1149,1147,1144,1141,146,1157,1154,2013,2011,2008,2015,1579,1549,1546,1495,1487,1433,1431,1428,1425,388,1440,2205,1705,658,1667,1664,1119,1095,1093,1978,1057,1055,1052,1062,1962,1960,1005,1003,1e3,997,38,1013,1010,1932,1930,1927,1934,941,939,936,933,6,930,3,951,948,944,1889,1887,1884,1881,959,1893,1891,35,1377,1360,1358,1327,1325,1322,1331,1277,1275,1272,1269,235,1284,2110,1205,1204,1201,1198,182,1195,179,1213,2070,2067,1580,501,1551,1548,440,437,1497,1494,1490,1503,761,709,707,1706,913,912,2198,1386,2164,2161,1621,1766,2103,1208,2058,2054,1145,1142,2005,2002,1999,2009,1488,1429,1426,2200,1698,1659,1656,1975,1053,1957,1954,1001,998,1924,1921,1918,1928,937,934,931,1879,1876,1873,1870,945,1885,1882,1323,1273,1270,2105,1202,1199,1196,1211,2061,2057,1576,1543,1540,1484,1481,1478,1491,1700]),t}(),Cl=function(){function t(t,e){this.bits=t,this.points=e}return t.prototype.getBits=function(){return this.bits},t.prototype.getPoints=function(){return this.points},t}(),Il=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Sl=function(){function t(){}return t.detectMultiple=function(e,r,n){var o=e.getBlackMatrix(),i=t.detect(n,o);return i.length||((o=o.clone()).rotate180(),i=t.detect(n,o)),new Cl(o,i)},t.detect=function(e,r){for(var n,o,i=new Array,a=0,s=0,u=!1;a<r.getHeight();){var c=t.findVertices(r,a,s);if(null!=c[0]||null!=c[3]){if(u=!0,i.push(c),!e)break;null!=c[2]?(s=Math.trunc(c[2].getX()),a=Math.trunc(c[2].getY())):(s=Math.trunc(c[4].getX()),a=Math.trunc(c[4].getY()))}else{if(!u)break;u=!1,s=0;try{for(var l=(n=void 0,Il(i)),d=l.next();!d.done;d=l.next()){var h=d.value;null!=h[1]&&(a=Math.trunc(Math.max(a,h[1].getY()))),null!=h[3]&&(a=Math.max(a,Math.trunc(h[3].getY())))}}catch(t){n={error:t}}finally{try{d&&!d.done&&(o=l.return)&&o.call(l)}finally{if(n)throw n.error}}a+=t.ROW_STEP}}return i},t.findVertices=function(e,r,n){var o=e.getHeight(),i=e.getWidth(),a=new Array(8);return t.copyToResult(a,t.findRowsWithPattern(e,o,i,r,n,t.START_PATTERN),t.INDEXES_START_PATTERN),null!=a[4]&&(n=Math.trunc(a[4].getX()),r=Math.trunc(a[4].getY())),t.copyToResult(a,t.findRowsWithPattern(e,o,i,r,n,t.STOP_PATTERN),t.INDEXES_STOP_PATTERN),a},t.copyToResult=function(t,e,r){for(var n=0;n<r.length;n++)t[r[n]]=e[n]},t.findRowsWithPattern=function(e,r,n,o,i,a){for(var s=new Array(4),u=!1,c=new Int32Array(a.length);o<r;o+=t.ROW_STEP){if(null!=(f=t.findGuardPattern(e,i,o,n,!1,a,c))){for(;o>0;){if(null==(h=t.findGuardPattern(e,i,--o,n,!1,a,c))){o++;break}f=h}s[0]=new Ns(f[0],o),s[1]=new Ns(f[1],o),u=!0;break}}var l=o+1;if(u){for(var d=0,h=Int32Array.from([Math.trunc(s[0].getX()),Math.trunc(s[1].getX())]);l<r;l++){var f;if(null!=(f=t.findGuardPattern(e,h[0],l,n,!1,a,c))&&Math.abs(h[0]-f[0])<t.MAX_PATTERN_DRIFT&&Math.abs(h[1]-f[1])<t.MAX_PATTERN_DRIFT)h=f,d=0;else{if(d>t.SKIPPED_ROW_COUNT_MAX)break;d++}}l-=d+1,s[2]=new Ns(h[0],l),s[3]=new Ns(h[1],l)}return l-o<t.BARCODE_MIN_HEIGHT&&xa.fill(s,null),s},t.findGuardPattern=function(e,r,n,o,i,a,s){xa.fillWithin(s,0,s.length,0);for(var u=r,c=0;e.get(u,n)&&u>0&&c++<t.MAX_PIXEL_DRIFT;)u--;for(var l=u,d=0,h=a.length,f=i;l<o;l++){if(e.get(l,n)!==f)s[d]++;else{if(d===h-1){if(t.patternMatchVariance(s,a,t.MAX_INDIVIDUAL_VARIANCE)<t.MAX_AVG_VARIANCE)return new Int32Array([u,l]);u+=s[0]+s[1],Da.arraycopy(s,2,s,0,d-1),s[d-1]=0,s[d]=0,d--}else d++;s[d]=1,f=!f}}return d===h-1&&t.patternMatchVariance(s,a,t.MAX_INDIVIDUAL_VARIANCE)<t.MAX_AVG_VARIANCE?new Int32Array([u,l-1]):null},t.patternMatchVariance=function(t,e,r){for(var n=t.length,o=0,i=0,a=0;a<n;a++)o+=t[a],i+=e[a];if(o<i)return 1/0;var s=o/i;r*=s;for(var u=0,c=0;c<n;c++){var l=t[c],d=e[c]*s,h=l>d?l-d:d-l;if(h>r)return 1/0;u+=h}return u/o},t.INDEXES_START_PATTERN=Int32Array.from([0,4,1,5]),t.INDEXES_STOP_PATTERN=Int32Array.from([6,2,7,3]),t.MAX_AVG_VARIANCE=.42,t.MAX_INDIVIDUAL_VARIANCE=.8,t.START_PATTERN=Int32Array.from([8,1,1,1,1,1,1,3]),t.STOP_PATTERN=Int32Array.from([7,1,1,3,1,1,1,2,1]),t.MAX_PIXEL_DRIFT=3,t.MAX_PATTERN_DRIFT=5,t.SKIPPED_ROW_COUNT_MAX=25,t.ROW_STEP=5,t.BARCODE_MIN_HEIGHT=10,t}(),Tl=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Dl=function(){function t(t,e){if(0===e.length)throw new Aa;this.field=t;var r=e.length;if(r>1&&0===e[0]){for(var n=1;n<r&&0===e[n];)n++;n===r?this.coefficients=new Int32Array([0]):(this.coefficients=new Int32Array(r-n),Da.arraycopy(e,n,this.coefficients,0,this.coefficients.length))}else this.coefficients=e}return t.prototype.getCoefficients=function(){return this.coefficients},t.prototype.getDegree=function(){return this.coefficients.length-1},t.prototype.isZero=function(){return 0===this.coefficients[0]},t.prototype.getCoefficient=function(t){return this.coefficients[this.coefficients.length-1-t]},t.prototype.evaluateAt=function(t){var e,r;if(0===t)return this.getCoefficient(0);if(1===t){var n=0;try{for(var o=Tl(this.coefficients),i=o.next();!i.done;i=o.next()){var a=i.value;n=this.field.add(n,a)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}return n}for(var s=this.coefficients[0],u=this.coefficients.length,c=1;c<u;c++)s=this.field.add(this.field.multiply(t,s),this.coefficients[c]);return s},t.prototype.add=function(e){if(!this.field.equals(e.field))throw new Aa("ModulusPolys do not have same ModulusGF field");if(this.isZero())return e;if(e.isZero())return this;var r=this.coefficients,n=e.coefficients;if(r.length>n.length){var o=r;r=n,n=o}var i=new Int32Array(n.length),a=n.length-r.length;Da.arraycopy(n,0,i,0,a);for(var s=a;s<n.length;s++)i[s]=this.field.add(r[s-a],n[s]);return new t(this.field,i)},t.prototype.subtract=function(t){if(!this.field.equals(t.field))throw new Aa("ModulusPolys do not have same ModulusGF field");return t.isZero()?this:this.add(t.negative())},t.prototype.multiply=function(e){return e instanceof t?this.multiplyOther(e):this.multiplyScalar(e)},t.prototype.multiplyOther=function(e){if(!this.field.equals(e.field))throw new Aa("ModulusPolys do not have same ModulusGF field");if(this.isZero()||e.isZero())return new t(this.field,new Int32Array([0]));for(var r=this.coefficients,n=r.length,o=e.coefficients,i=o.length,a=new Int32Array(n+i-1),s=0;s<n;s++)for(var u=r[s],c=0;c<i;c++)a[s+c]=this.field.add(a[s+c],this.field.multiply(u,o[c]));return new t(this.field,a)},t.prototype.negative=function(){for(var e=this.coefficients.length,r=new Int32Array(e),n=0;n<e;n++)r[n]=this.field.subtract(0,this.coefficients[n]);return new t(this.field,r)},t.prototype.multiplyScalar=function(e){if(0===e)return new t(this.field,new Int32Array([0]));if(1===e)return this;for(var r=this.coefficients.length,n=new Int32Array(r),o=0;o<r;o++)n[o]=this.field.multiply(this.coefficients[o],e);return new t(this.field,n)},t.prototype.multiplyByMonomial=function(e,r){if(e<0)throw new Aa;if(0===r)return new t(this.field,new Int32Array([0]));for(var n=this.coefficients.length,o=new Int32Array(n+e),i=0;i<n;i++)o[i]=this.field.multiply(this.coefficients[i],r);return new t(this.field,o)},t.prototype.toString=function(){for(var t=new Za,e=this.getDegree();e>=0;e--){var r=this.getCoefficient(e);0!==r&&(r<0?(t.append(" - "),r=-r):t.length()>0&&t.append(" + "),0!==e&&1===r||t.append(r),0!==e&&(1===e?t.append("x"):(t.append("x^"),t.append(e))))}return t.toString()},t}(),Ol=function(){function t(){}return t.prototype.add=function(t,e){return(t+e)%this.modulus},t.prototype.subtract=function(t,e){return(this.modulus+t-e)%this.modulus},t.prototype.exp=function(t){return this.expTable[t]},t.prototype.log=function(t){if(0===t)throw new Aa;return this.logTable[t]},t.prototype.inverse=function(t){if(0===t)throw new Es;return this.expTable[this.modulus-this.logTable[t]-1]},t.prototype.multiply=function(t,e){return 0===t||0===e?0:this.expTable[(this.logTable[t]+this.logTable[e])%(this.modulus-1)]},t.prototype.getSize=function(){return this.modulus},t.prototype.equals=function(t){return t===this},t}(),Rl=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ml=function(t){function e(e,r){var n=t.call(this)||this;n.modulus=e,n.expTable=new Int32Array(e),n.logTable=new Int32Array(e);for(var o=1,i=0;i<e;i++)n.expTable[i]=o,o=o*r%e;for(i=0;i<e-1;i++)n.logTable[n.expTable[i]]=i;return n.zero=new Dl(n,new Int32Array([0])),n.one=new Dl(n,new Int32Array([1])),n}return Rl(e,t),e.prototype.getZero=function(){return this.zero},e.prototype.getOne=function(){return this.one},e.prototype.buildMonomial=function(t,e){if(t<0)throw new Aa;if(0===e)return this.zero;var r=new Int32Array(t+1);return r[0]=e,new Dl(this,r)},e.PDF417_GF=new e(Al.NUMBER_OF_CODEWORDS,3),e}(Ol),Nl=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},kl=function(){function t(){this.field=Ml.PDF417_GF}return t.prototype.decode=function(t,e,r){for(var n,o,i=new Dl(this.field,t),a=new Int32Array(e),s=!1,u=e;u>0;u--){var c=i.evaluateAt(this.field.exp(u));a[e-u]=c,0!==c&&(s=!0)}if(!s)return 0;var l=this.field.getOne();if(null!=r)try{for(var d=Nl(r),h=d.next();!h.done;h=d.next()){var f=h.value,p=this.field.exp(t.length-1-f),g=new Dl(this.field,new Int32Array([this.field.subtract(0,p),1]));l=l.multiply(g)}}catch(t){n={error:t}}finally{try{h&&!h.done&&(o=d.return)&&o.call(d)}finally{if(n)throw n.error}}var m=new Dl(this.field,a),y=this.runEuclideanAlgorithm(this.field.buildMonomial(e,1),m,e),w=y[0],_=y[1],v=this.findErrorLocations(w),E=this.findErrorMagnitudes(_,w,v);for(u=0;u<v.length;u++){var b=t.length-1-this.field.log(v[u]);if(b<0)throw Sa.getChecksumInstance();t[b]=this.field.subtract(t[b],E[u])}return v.length},t.prototype.runEuclideanAlgorithm=function(t,e,r){if(t.getDegree()<e.getDegree()){var n=t;t=e,e=n}for(var o=t,i=e,a=this.field.getZero(),s=this.field.getOne();i.getDegree()>=Math.round(r/2);){var u=o,c=a;if(a=s,(o=i).isZero())throw Sa.getChecksumInstance();i=u;for(var l=this.field.getZero(),d=o.getCoefficient(o.getDegree()),h=this.field.inverse(d);i.getDegree()>=o.getDegree()&&!i.isZero();){var f=i.getDegree()-o.getDegree(),p=this.field.multiply(i.getCoefficient(i.getDegree()),h);l=l.add(this.field.buildMonomial(f,p)),i=i.subtract(o.multiplyByMonomial(f,p))}s=l.multiply(a).subtract(c).negative()}var g=s.getCoefficient(0);if(0===g)throw Sa.getChecksumInstance();var m=this.field.inverse(g);return[s.multiply(m),i.multiply(m)]},t.prototype.findErrorLocations=function(t){for(var e=t.getDegree(),r=new Int32Array(e),n=0,o=1;o<this.field.getSize()&&n<e;o++)0===t.evaluateAt(o)&&(r[n]=this.field.inverse(o),n++);if(n!==e)throw Sa.getChecksumInstance();return r},t.prototype.findErrorMagnitudes=function(t,e,r){for(var n=e.getDegree(),o=new Int32Array(n),i=1;i<=n;i++)o[n-i]=this.field.multiply(i,e.getCoefficient(i));var a=new Dl(this.field,o),s=r.length,u=new Int32Array(s);for(i=0;i<s;i++){var c=this.field.inverse(r[i]),l=this.field.subtract(0,t.evaluateAt(c)),d=this.field.inverse(a.evaluateAt(c));u[i]=this.field.multiply(l,d)}return u},t}(),xl=function(){function t(e,r,n,o,i){e instanceof t?this.constructor_2(e):this.constructor_1(e,r,n,o,i)}return t.prototype.constructor_1=function(t,e,r,n,o){var i=null==e||null==r,a=null==n||null==o;if(i&&a)throw new $a;i?(e=new Ns(0,n.getY()),r=new Ns(0,o.getY())):a&&(n=new Ns(t.getWidth()-1,e.getY()),o=new Ns(t.getWidth()-1,r.getY())),this.image=t,this.topLeft=e,this.bottomLeft=r,this.topRight=n,this.bottomRight=o,this.minX=Math.trunc(Math.min(e.getX(),r.getX())),this.maxX=Math.trunc(Math.max(n.getX(),o.getX())),this.minY=Math.trunc(Math.min(e.getY(),n.getY())),this.maxY=Math.trunc(Math.max(r.getY(),o.getY()))},t.prototype.constructor_2=function(t){this.image=t.image,this.topLeft=t.getTopLeft(),this.bottomLeft=t.getBottomLeft(),this.topRight=t.getTopRight(),this.bottomRight=t.getBottomRight(),this.minX=t.getMinX(),this.maxX=t.getMaxX(),this.minY=t.getMinY(),this.maxY=t.getMaxY()},t.merge=function(e,r){return null==e?r:null==r?e:new t(e.image,e.topLeft,e.bottomLeft,r.topRight,r.bottomRight)},t.prototype.addMissingRows=function(e,r,n){var o=this.topLeft,i=this.bottomLeft,a=this.topRight,s=this.bottomRight;if(e>0){var u=n?this.topLeft:this.topRight,c=Math.trunc(u.getY()-e);c<0&&(c=0);var l=new Ns(u.getX(),c);n?o=l:a=l}if(r>0){var d=n?this.bottomLeft:this.bottomRight,h=Math.trunc(d.getY()+r);h>=this.image.getHeight()&&(h=this.image.getHeight()-1);var f=new Ns(d.getX(),h);n?i=f:s=f}return new t(this.image,o,i,a,s)},t.prototype.getMinX=function(){return this.minX},t.prototype.getMaxX=function(){return this.maxX},t.prototype.getMinY=function(){return this.minY},t.prototype.getMaxY=function(){return this.maxY},t.prototype.getTopLeft=function(){return this.topLeft},t.prototype.getTopRight=function(){return this.topRight},t.prototype.getBottomLeft=function(){return this.bottomLeft},t.prototype.getBottomRight=function(){return this.bottomRight},t}(),Pl=function(){function t(t,e,r,n){this.columnCount=t,this.errorCorrectionLevel=n,this.rowCountUpperPart=e,this.rowCountLowerPart=r,this.rowCount=e+r}return t.prototype.getColumnCount=function(){return this.columnCount},t.prototype.getErrorCorrectionLevel=function(){return this.errorCorrectionLevel},t.prototype.getRowCount=function(){return this.rowCount},t.prototype.getRowCountUpperPart=function(){return this.rowCountUpperPart},t.prototype.getRowCountLowerPart=function(){return this.rowCountLowerPart},t}(),Bl=function(){function t(){this.buffer=""}return t.form=function(t,e){var r=-1;return t.replace(/%(-)?(0?[0-9]+)?([.][0-9]+)?([#][0-9]+)?([scfpexd%])/g,(function(t,n,o,i,a,s){if("%%"===t)return"%";if(void 0!==e[++r]){t=i?parseInt(i.substr(1)):void 0;var u,c=a?parseInt(a.substr(1)):void 0;switch(s){case"s":u=e[r];break;case"c":u=e[r][0];break;case"f":u=parseFloat(e[r]).toFixed(t);break;case"p":u=parseFloat(e[r]).toPrecision(t);break;case"e":u=parseFloat(e[r]).toExponential(t);break;case"x":u=parseInt(e[r]).toString(c||16);break;case"d":u=parseFloat(parseInt(e[r],c||10).toPrecision(t)).toFixed(0)}u="object"==typeof u?JSON.stringify(u):(+u).toString(c);for(var l=parseInt(o),d=o&&o[0]+""=="0"?"0":" ";u.length<l;)u=void 0!==n?u+d:d+u;return u}}))},t.prototype.format=function(e){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];this.buffer+=t.form(e,r)},t.prototype.toString=function(){return this.buffer},t}(),Fl=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Ll=function(){function t(t){this.boundingBox=new xl(t),this.codewords=new Array(t.getMaxY()-t.getMinY()+1)}return t.prototype.getCodewordNearby=function(e){var r=this.getCodeword(e);if(null!=r)return r;for(var n=1;n<t.MAX_NEARBY_DISTANCE;n++){var o=this.imageRowToCodewordIndex(e)-n;if(o>=0&&null!=(r=this.codewords[o]))return r;if((o=this.imageRowToCodewordIndex(e)+n)<this.codewords.length&&null!=(r=this.codewords[o]))return r}return null},t.prototype.imageRowToCodewordIndex=function(t){return t-this.boundingBox.getMinY()},t.prototype.setCodeword=function(t,e){this.codewords[this.imageRowToCodewordIndex(t)]=e},t.prototype.getCodeword=function(t){return this.codewords[this.imageRowToCodewordIndex(t)]},t.prototype.getBoundingBox=function(){return this.boundingBox},t.prototype.getCodewords=function(){return this.codewords},t.prototype.toString=function(){var t,e,r=new Bl,n=0;try{for(var o=Fl(this.codewords),i=o.next();!i.done;i=o.next()){var a=i.value;null!=a?r.format("%3d: %3d|%3d%n",n++,a.getRowNumber(),a.getValue()):r.format("%3d: | %n",n++)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return r.toString()},t.MAX_NEARBY_DISTANCE=5,t}(),zl=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Ul=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},Vl=function(){function t(){this.values=new Map}return t.prototype.setValue=function(t){t=Math.trunc(t);var e=this.values.get(t);null==e&&(e=0),e++,this.values.set(t,e)},t.prototype.getValue=function(){var t,e,r=-1,n=new Array,o=function(t,e){var o=function(){return t},i=function(){return e};i()>r?(r=i(),(n=[]).push(o())):i()===r&&n.push(o())};try{for(var i=zl(this.values.entries()),a=i.next();!a.done;a=i.next()){var s=Ul(a.value,2);o(s[0],s[1])}}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=i.return)&&e.call(i)}finally{if(t)throw t.error}}return Al.toIntArray(n)},t.prototype.getConfidence=function(t){return this.values.get(t)},t}(),Hl=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),jl=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Gl=function(t){function e(e,r){var n=t.call(this,e)||this;return n._isLeft=r,n}return Hl(e,t),e.prototype.setRowNumbers=function(){var t,e;try{for(var r=jl(this.getCodewords()),n=r.next();!n.done;n=r.next()){var o=n.value;null!=o&&o.setRowNumberAsRowIndicatorColumn()}}catch(e){t={error:e}}finally{try{n&&!n.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}},e.prototype.adjustCompleteIndicatorColumnRowNumbers=function(t){var e=this.getCodewords();this.setRowNumbers(),this.removeIncorrectCodewords(e,t);for(var r=this.getBoundingBox(),n=this._isLeft?r.getTopLeft():r.getTopRight(),o=this._isLeft?r.getBottomLeft():r.getBottomRight(),i=this.imageRowToCodewordIndex(Math.trunc(n.getY())),a=this.imageRowToCodewordIndex(Math.trunc(o.getY())),s=-1,u=1,c=0,l=i;l<a;l++)if(null!=e[l]){var d=e[l],h=d.getRowNumber()-s;if(0===h)c++;else if(1===h)u=Math.max(u,c),c=1,s=d.getRowNumber();else if(h<0||d.getRowNumber()>=t.getRowCount()||h>l)e[l]=null;else{for(var f=void 0,p=(f=u>2?(u-2)*h:h)>=l,g=1;g<=f&&!p;g++)p=null!=e[l-g];p?e[l]=null:(s=d.getRowNumber(),c=1)}}},e.prototype.getRowHeights=function(){var t,e,r=this.getBarcodeMetadata();if(null==r)return null;this.adjustIncompleteIndicatorColumnRowNumbers(r);var n=new Int32Array(r.getRowCount());try{for(var o=jl(this.getCodewords()),i=o.next();!i.done;i=o.next()){var a=i.value;if(null!=a){var s=a.getRowNumber();if(s>=n.length)continue;n[s]++}}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return n},e.prototype.adjustIncompleteIndicatorColumnRowNumbers=function(t){for(var e=this.getBoundingBox(),r=this._isLeft?e.getTopLeft():e.getTopRight(),n=this._isLeft?e.getBottomLeft():e.getBottomRight(),o=this.imageRowToCodewordIndex(Math.trunc(r.getY())),i=this.imageRowToCodewordIndex(Math.trunc(n.getY())),a=this.getCodewords(),s=-1,u=o;u<i;u++)if(null!=a[u]){var c=a[u];c.setRowNumberAsRowIndicatorColumn();var l=c.getRowNumber()-s;0===l||(1===l?s=c.getRowNumber():c.getRowNumber()>=t.getRowCount()?a[u]=null:s=c.getRowNumber())}},e.prototype.getBarcodeMetadata=function(){var t,e,r=this.getCodewords(),n=new Vl,o=new Vl,i=new Vl,a=new Vl;try{for(var s=jl(r),u=s.next();!u.done;u=s.next()){var c=u.value;if(null!=c){c.setRowNumberAsRowIndicatorColumn();var l=c.getValue()%30,d=c.getRowNumber();switch(this._isLeft||(d+=2),d%3){case 0:o.setValue(3*l+1);break;case 1:a.setValue(l/3),i.setValue(l%3);break;case 2:n.setValue(l+1)}}}}catch(e){t={error:e}}finally{try{u&&!u.done&&(e=s.return)&&e.call(s)}finally{if(t)throw t.error}}if(0===n.getValue().length||0===o.getValue().length||0===i.getValue().length||0===a.getValue().length||n.getValue()[0]<1||o.getValue()[0]+i.getValue()[0]<Al.MIN_ROWS_IN_BARCODE||o.getValue()[0]+i.getValue()[0]>Al.MAX_ROWS_IN_BARCODE)return null;var h=new Pl(n.getValue()[0],o.getValue()[0],i.getValue()[0],a.getValue()[0]);return this.removeIncorrectCodewords(r,h),h},e.prototype.removeIncorrectCodewords=function(t,e){for(var r=0;r<t.length;r++){var n=t[r];if(null!=t[r]){var o=n.getValue()%30,i=n.getRowNumber();if(i>e.getRowCount())t[r]=null;else switch(this._isLeft||(i+=2),i%3){case 0:3*o+1!==e.getRowCountUpperPart()&&(t[r]=null);break;case 1:Math.trunc(o/3)===e.getErrorCorrectionLevel()&&o%3===e.getRowCountLowerPart()||(t[r]=null);break;case 2:o+1!==e.getColumnCount()&&(t[r]=null)}}}},e.prototype.isLeft=function(){return this._isLeft},e.prototype.toString=function(){return"IsLeft: "+this._isLeft+"\n"+t.prototype.toString.call(this)},e}(Ll),Wl=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Xl=function(){function t(t,e){this.ADJUST_ROW_NUMBER_SKIP=2,this.barcodeMetadata=t,this.barcodeColumnCount=t.getColumnCount(),this.boundingBox=e,this.detectionResultColumns=new Array(this.barcodeColumnCount+2)}return t.prototype.getDetectionResultColumns=function(){this.adjustIndicatorColumnRowNumbers(this.detectionResultColumns[0]),this.adjustIndicatorColumnRowNumbers(this.detectionResultColumns[this.barcodeColumnCount+1]);var t,e=Al.MAX_CODEWORDS_IN_BARCODE;do{t=e,e=this.adjustRowNumbersAndGetCount()}while(e>0&&e<t);return this.detectionResultColumns},t.prototype.adjustIndicatorColumnRowNumbers=function(t){null!=t&&t.adjustCompleteIndicatorColumnRowNumbers(this.barcodeMetadata)},t.prototype.adjustRowNumbersAndGetCount=function(){var t=this.adjustRowNumbersByRow();if(0===t)return 0;for(var e=1;e<this.barcodeColumnCount+1;e++)for(var r=this.detectionResultColumns[e].getCodewords(),n=0;n<r.length;n++)null!=r[n]&&(r[n].hasValidRowNumber()||this.adjustRowNumbers(e,n,r));return t},t.prototype.adjustRowNumbersByRow=function(){return this.adjustRowNumbersFromBothRI(),this.adjustRowNumbersFromLRI()+this.adjustRowNumbersFromRRI()},t.prototype.adjustRowNumbersFromBothRI=function(){if(null!=this.detectionResultColumns[0]&&null!=this.detectionResultColumns[this.barcodeColumnCount+1])for(var t=this.detectionResultColumns[0].getCodewords(),e=this.detectionResultColumns[this.barcodeColumnCount+1].getCodewords(),r=0;r<t.length;r++)if(null!=t[r]&&null!=e[r]&&t[r].getRowNumber()===e[r].getRowNumber())for(var n=1;n<=this.barcodeColumnCount;n++){var o=this.detectionResultColumns[n].getCodewords()[r];null!=o&&(o.setRowNumber(t[r].getRowNumber()),o.hasValidRowNumber()||(this.detectionResultColumns[n].getCodewords()[r]=null))}},t.prototype.adjustRowNumbersFromRRI=function(){if(null==this.detectionResultColumns[this.barcodeColumnCount+1])return 0;for(var e=0,r=this.detectionResultColumns[this.barcodeColumnCount+1].getCodewords(),n=0;n<r.length;n++)if(null!=r[n])for(var o=r[n].getRowNumber(),i=0,a=this.barcodeColumnCount+1;a>0&&i<this.ADJUST_ROW_NUMBER_SKIP;a--){var s=this.detectionResultColumns[a].getCodewords()[n];null!=s&&(i=t.adjustRowNumberIfValid(o,i,s),s.hasValidRowNumber()||e++)}return e},t.prototype.adjustRowNumbersFromLRI=function(){if(null==this.detectionResultColumns[0])return 0;for(var e=0,r=this.detectionResultColumns[0].getCodewords(),n=0;n<r.length;n++)if(null!=r[n])for(var o=r[n].getRowNumber(),i=0,a=1;a<this.barcodeColumnCount+1&&i<this.ADJUST_ROW_NUMBER_SKIP;a++){var s=this.detectionResultColumns[a].getCodewords()[n];null!=s&&(i=t.adjustRowNumberIfValid(o,i,s),s.hasValidRowNumber()||e++)}return e},t.adjustRowNumberIfValid=function(t,e,r){return null==r||r.hasValidRowNumber()||(r.isValidRowNumber(t)?(r.setRowNumber(t),e=0):++e),e},t.prototype.adjustRowNumbers=function(e,r,n){var o,i;if(null!=this.detectionResultColumns[e-1]){var a=n[r],s=this.detectionResultColumns[e-1].getCodewords(),u=s;null!=this.detectionResultColumns[e+1]&&(u=this.detectionResultColumns[e+1].getCodewords());var c=new Array(14);c[2]=s[r],c[3]=u[r],r>0&&(c[0]=n[r-1],c[4]=s[r-1],c[5]=u[r-1]),r>1&&(c[8]=n[r-2],c[10]=s[r-2],c[11]=u[r-2]),r<n.length-1&&(c[1]=n[r+1],c[6]=s[r+1],c[7]=u[r+1]),r<n.length-2&&(c[9]=n[r+2],c[12]=s[r+2],c[13]=u[r+2]);try{for(var l=Wl(c),d=l.next();!d.done;d=l.next()){var h=d.value;if(t.adjustRowNumber(a,h))return}}catch(t){o={error:t}}finally{try{d&&!d.done&&(i=l.return)&&i.call(l)}finally{if(o)throw o.error}}}},t.adjustRowNumber=function(t,e){return null!=e&&(!(!e.hasValidRowNumber()||e.getBucket()!==t.getBucket())&&(t.setRowNumber(e.getRowNumber()),!0))},t.prototype.getBarcodeColumnCount=function(){return this.barcodeColumnCount},t.prototype.getBarcodeRowCount=function(){return this.barcodeMetadata.getRowCount()},t.prototype.getBarcodeECLevel=function(){return this.barcodeMetadata.getErrorCorrectionLevel()},t.prototype.setBoundingBox=function(t){this.boundingBox=t},t.prototype.getBoundingBox=function(){return this.boundingBox},t.prototype.setDetectionResultColumn=function(t,e){this.detectionResultColumns[t]=e},t.prototype.getDetectionResultColumn=function(t){return this.detectionResultColumns[t]},t.prototype.toString=function(){var t=this.detectionResultColumns[0];null==t&&(t=this.detectionResultColumns[this.barcodeColumnCount+1]);for(var e=new Bl,r=0;r<t.getCodewords().length;r++){e.format("CW %3d:",r);for(var n=0;n<this.barcodeColumnCount+2;n++)if(null!=this.detectionResultColumns[n]){var o=this.detectionResultColumns[n].getCodewords()[r];null!=o?e.format(" %3d|%3d",o.getRowNumber(),o.getValue()):e.format(" | ")}else e.format(" | ");e.format("%n")}return e.toString()},t}(),Yl=function(){function t(e,r,n,o){this.rowNumber=t.BARCODE_ROW_UNKNOWN,this.startX=Math.trunc(e),this.endX=Math.trunc(r),this.bucket=Math.trunc(n),this.value=Math.trunc(o)}return t.prototype.hasValidRowNumber=function(){return this.isValidRowNumber(this.rowNumber)},t.prototype.isValidRowNumber=function(e){return e!==t.BARCODE_ROW_UNKNOWN&&this.bucket===e%3*3},t.prototype.setRowNumberAsRowIndicatorColumn=function(){this.rowNumber=Math.trunc(3*Math.trunc(this.value/30)+Math.trunc(this.bucket/3))},t.prototype.getWidth=function(){return this.endX-this.startX},t.prototype.getStartX=function(){return this.startX},t.prototype.getEndX=function(){return this.endX},t.prototype.getBucket=function(){return this.bucket},t.prototype.getValue=function(){return this.value},t.prototype.getRowNumber=function(){return this.rowNumber},t.prototype.setRowNumber=function(t){this.rowNumber=t},t.prototype.toString=function(){return this.rowNumber+"|"+this.value},t.BARCODE_ROW_UNKNOWN=-1,t}(),Zl=function(){function t(){}return t.initialize=function(){for(var e=0;e<Al.SYMBOL_TABLE.length;e++)for(var r=Al.SYMBOL_TABLE[e],n=1&r,o=0;o<Al.BARS_IN_MODULE;o++){for(var i=0;(1&r)===n;)i+=1,r>>=1;n=1&r,t.RATIOS_TABLE[e]||(t.RATIOS_TABLE[e]=new Array(Al.BARS_IN_MODULE)),t.RATIOS_TABLE[e][Al.BARS_IN_MODULE-o-1]=Math.fround(i/Al.MODULES_IN_CODEWORD)}this.bSymbolTableReady=!0},t.getDecodedValue=function(e){var r=t.getDecodedCodewordValue(t.sampleBitCounts(e));return-1!==r?r:t.getClosestDecodedValue(e)},t.sampleBitCounts=function(t){for(var e=Rs.sum(t),r=new Int32Array(Al.BARS_IN_MODULE),n=0,o=0,i=0;i<Al.MODULES_IN_CODEWORD;i++){var a=e/(2*Al.MODULES_IN_CODEWORD)+i*e/Al.MODULES_IN_CODEWORD;o+t[n]<=a&&(o+=t[n],n++),r[n]++}return r},t.getDecodedCodewordValue=function(e){var r=t.getBitValue(e);return-1===Al.getCodeword(r)?-1:r},t.getBitValue=function(t){for(var e=0,r=0;r<t.length;r++)for(var n=0;n<t[r];n++)e=e<<1|(r%2==0?1:0);return Math.trunc(e)},t.getClosestDecodedValue=function(e){var r=Rs.sum(e),n=new Array(Al.BARS_IN_MODULE);if(r>1)for(var o=0;o<n.length;o++)n[o]=Math.fround(e[o]/r);var i=Ms.MAX_VALUE,a=-1;this.bSymbolTableReady||t.initialize();for(var s=0;s<t.RATIOS_TABLE.length;s++){for(var u=0,c=t.RATIOS_TABLE[s],l=0;l<Al.BARS_IN_MODULE;l++){var d=Math.fround(c[l]-n[l]);if((u+=Math.fround(d*d))>=i)break}u<i&&(i=u,a=Al.SYMBOL_TABLE[s])}return a},t.bSymbolTableReady=!1,t.RATIOS_TABLE=new Array(Al.SYMBOL_TABLE.length).map((function(t){return new Array(Al.BARS_IN_MODULE)})),t}(),ql=function(){function t(){this.segmentCount=-1,this.fileSize=-1,this.timestamp=-1,this.checksum=-1}return t.prototype.getSegmentIndex=function(){return this.segmentIndex},t.prototype.setSegmentIndex=function(t){this.segmentIndex=t},t.prototype.getFileId=function(){return this.fileId},t.prototype.setFileId=function(t){this.fileId=t},t.prototype.getOptionalData=function(){return this.optionalData},t.prototype.setOptionalData=function(t){this.optionalData=t},t.prototype.isLastSegment=function(){return this.lastSegment},t.prototype.setLastSegment=function(t){this.lastSegment=t},t.prototype.getSegmentCount=function(){return this.segmentCount},t.prototype.setSegmentCount=function(t){this.segmentCount=t},t.prototype.getSender=function(){return this.sender||null},t.prototype.setSender=function(t){this.sender=t},t.prototype.getAddressee=function(){return this.addressee||null},t.prototype.setAddressee=function(t){this.addressee=t},t.prototype.getFileName=function(){return this.fileName},t.prototype.setFileName=function(t){this.fileName=t},t.prototype.getFileSize=function(){return this.fileSize},t.prototype.setFileSize=function(t){this.fileSize=t},t.prototype.getChecksum=function(){return this.checksum},t.prototype.setChecksum=function(t){this.checksum=t},t.prototype.getTimestamp=function(){return this.timestamp},t.prototype.setTimestamp=function(t){this.timestamp=t},t}(),Kl=function(){function t(){}return t.parseLong=function(t,e){return void 0===e&&(e=void 0),parseInt(t,e)},t}(),$l=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Jl=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return $l(e,t),e.kind="NullPointerException",e}(_a),Ql=function(){function t(){}return t.prototype.writeBytes=function(t){this.writeBytesOffset(t,0,t.length)},t.prototype.writeBytesOffset=function(t,e,r){if(null==t)throw new Jl;if(e<0||e>t.length||r<0||e+r>t.length||e+r<0)throw new Ra;if(0!==r)for(var n=0;n<r;n++)this.write(t[e+n])},t.prototype.flush=function(){},t.prototype.close=function(){},t}(),td=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),ed=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return td(e,t),e}(_a),rd=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),nd=function(t){function e(e){void 0===e&&(e=32);var r=t.call(this)||this;if(r.count=0,e<0)throw new Aa("Negative initial size: "+e);return r.buf=new Uint8Array(e),r}return rd(e,t),e.prototype.ensureCapacity=function(t){t-this.buf.length>0&&this.grow(t)},e.prototype.grow=function(t){var e=this.buf.length<<1;if(e-t<0&&(e=t),e<0){if(t<0)throw new ed;e=Pa.MAX_VALUE}this.buf=xa.copyOfUint8Array(this.buf,e)},e.prototype.write=function(t){this.ensureCapacity(this.count+1),this.buf[this.count]=t,this.count+=1},e.prototype.writeBytesOffset=function(t,e,r){if(e<0||e>t.length||r<0||e+r-t.length>0)throw new Ra;this.ensureCapacity(this.count+r),Da.arraycopy(t,e,this.buf,this.count,r),this.count+=r},e.prototype.writeTo=function(t){t.writeBytesOffset(this.buf,0,this.count)},e.prototype.reset=function(){this.count=0},e.prototype.toByteArray=function(){return xa.copyOfUint8Array(this.buf,this.count)},e.prototype.size=function(){return this.count},e.prototype.toString=function(t){return t?"string"==typeof t?this.toString_string(t):this.toString_number(t):this.toString_void()},e.prototype.toString_void=function(){return new String(this.buf).toString()},e.prototype.toString_string=function(t){return new String(this.buf).toString()},e.prototype.toString_number=function(t){return new String(this.buf).toString()},e.prototype.close=function(){},e}(Ql);function od(){if("undefined"!=typeof window)return window.BigInt||null;if(void 0!==Oo)return Oo.BigInt||null;if("undefined"!=typeof self)return self.BigInt||null;throw new Error("Can't search globals for BigInt!")}function id(t){if(void 0===il&&(il=od()),null===il)throw new Error("BigInt is not supported!");return il(t)}!function(t){t[t.ALPHA=0]="ALPHA",t[t.LOWER=1]="LOWER",t[t.MIXED=2]="MIXED",t[t.PUNCT=3]="PUNCT",t[t.ALPHA_SHIFT=4]="ALPHA_SHIFT",t[t.PUNCT_SHIFT=5]="PUNCT_SHIFT"}(ol||(ol={}));var ad=function(){function t(){}return t.decode=function(e,r){var n=new Za(""),o=ja.ISO8859_1;n.enableDecoding(o);for(var i=1,a=e[i++],s=new ql;i<e[0];){switch(a){case t.TEXT_COMPACTION_MODE_LATCH:i=t.textCompaction(e,i,n);break;case t.BYTE_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH_6:i=t.byteCompaction(a,e,o,i,n);break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:n.append(e[i++]);break;case t.NUMERIC_COMPACTION_MODE_LATCH:i=t.numericCompaction(e,i,n);break;case t.ECI_CHARSET:ja.getCharacterSetECIByValue(e[i++]);break;case t.ECI_GENERAL_PURPOSE:i+=2;break;case t.ECI_USER_DEFINED:i++;break;case t.BEGIN_MACRO_PDF417_CONTROL_BLOCK:i=t.decodeMacroBlock(e,i,s);break;case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case t.MACRO_PDF417_TERMINATOR:throw new Ua;default:i--,i=t.textCompaction(e,i,n)}if(!(i<e.length))throw Ua.getFormatInstance();a=e[i++]}if(0===n.length())throw Ua.getFormatInstance();var u=new ys(null,n.toString(),null,r);return u.setOther(s),u},t.decodeMacroBlock=function(e,r,n){if(r+t.NUMBER_OF_SEQUENCE_CODEWORDS>e[0])throw Ua.getFormatInstance();for(var o=new Int32Array(t.NUMBER_OF_SEQUENCE_CODEWORDS),i=0;i<t.NUMBER_OF_SEQUENCE_CODEWORDS;i++,r++)o[i]=e[r];n.setSegmentIndex(Pa.parseInt(t.decodeBase900toBase10(o,t.NUMBER_OF_SEQUENCE_CODEWORDS)));var a=new Za;r=t.textCompaction(e,r,a),n.setFileId(a.toString());var s=-1;for(e[r]===t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD&&(s=r+1);r<e[0];)switch(e[r]){case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:switch(e[++r]){case t.MACRO_PDF417_OPTIONAL_FIELD_FILE_NAME:var u=new Za;r=t.textCompaction(e,r+1,u),n.setFileName(u.toString());break;case t.MACRO_PDF417_OPTIONAL_FIELD_SENDER:var c=new Za;r=t.textCompaction(e,r+1,c),n.setSender(c.toString());break;case t.MACRO_PDF417_OPTIONAL_FIELD_ADDRESSEE:var l=new Za;r=t.textCompaction(e,r+1,l),n.setAddressee(l.toString());break;case t.MACRO_PDF417_OPTIONAL_FIELD_SEGMENT_COUNT:var d=new Za;r=t.numericCompaction(e,r+1,d),n.setSegmentCount(Pa.parseInt(d.toString()));break;case t.MACRO_PDF417_OPTIONAL_FIELD_TIME_STAMP:var h=new Za;r=t.numericCompaction(e,r+1,h),n.setTimestamp(Kl.parseLong(h.toString()));break;case t.MACRO_PDF417_OPTIONAL_FIELD_CHECKSUM:var f=new Za;r=t.numericCompaction(e,r+1,f),n.setChecksum(Pa.parseInt(f.toString()));break;case t.MACRO_PDF417_OPTIONAL_FIELD_FILE_SIZE:var p=new Za;r=t.numericCompaction(e,r+1,p),n.setFileSize(Kl.parseLong(p.toString()));break;default:throw Ua.getFormatInstance()}break;case t.MACRO_PDF417_TERMINATOR:r++,n.setLastSegment(!0);break;default:throw Ua.getFormatInstance()}if(-1!==s){var g=r-s;n.isLastSegment()&&g--,n.setOptionalData(xa.copyOfRange(e,s,s+g))}return r},t.textCompaction=function(e,r,n){for(var o=new Int32Array(2*(e[0]-r)),i=new Int32Array(2*(e[0]-r)),a=0,s=!1;r<e[0]&&!s;){var u=e[r++];if(u<t.TEXT_COMPACTION_MODE_LATCH)o[a]=u/30,o[a+1]=u%30,a+=2;else switch(u){case t.TEXT_COMPACTION_MODE_LATCH:o[a++]=t.TEXT_COMPACTION_MODE_LATCH;break;case t.BYTE_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH_6:case t.NUMERIC_COMPACTION_MODE_LATCH:case t.BEGIN_MACRO_PDF417_CONTROL_BLOCK:case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case t.MACRO_PDF417_TERMINATOR:r--,s=!0;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:o[a]=t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE,u=e[r++],i[a]=u,a++}}return t.decodeTextCompaction(o,i,a,n),r},t.decodeTextCompaction=function(e,r,n,o){for(var i=ol.ALPHA,a=ol.ALPHA,s=0;s<n;){var u=e[s],c="";switch(i){case ol.ALPHA:if(u<26)c=String.fromCharCode(65+u);else switch(u){case 26:c=" ";break;case t.LL:i=ol.LOWER;break;case t.ML:i=ol.MIXED;break;case t.PS:a=i,i=ol.PUNCT_SHIFT;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:o.append(r[s]);break;case t.TEXT_COMPACTION_MODE_LATCH:i=ol.ALPHA}break;case ol.LOWER:if(u<26)c=String.fromCharCode(97+u);else switch(u){case 26:c=" ";break;case t.AS:a=i,i=ol.ALPHA_SHIFT;break;case t.ML:i=ol.MIXED;break;case t.PS:a=i,i=ol.PUNCT_SHIFT;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:o.append(r[s]);break;case t.TEXT_COMPACTION_MODE_LATCH:i=ol.ALPHA}break;case ol.MIXED:if(u<t.PL)c=t.MIXED_CHARS[u];else switch(u){case t.PL:i=ol.PUNCT;break;case 26:c=" ";break;case t.LL:i=ol.LOWER;break;case t.AL:i=ol.ALPHA;break;case t.PS:a=i,i=ol.PUNCT_SHIFT;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:o.append(r[s]);break;case t.TEXT_COMPACTION_MODE_LATCH:i=ol.ALPHA}break;case ol.PUNCT:if(u<t.PAL)c=t.PUNCT_CHARS[u];else switch(u){case t.PAL:i=ol.ALPHA;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:o.append(r[s]);break;case t.TEXT_COMPACTION_MODE_LATCH:i=ol.ALPHA}break;case ol.ALPHA_SHIFT:if(i=a,u<26)c=String.fromCharCode(65+u);else switch(u){case 26:c=" ";break;case t.TEXT_COMPACTION_MODE_LATCH:i=ol.ALPHA}break;case ol.PUNCT_SHIFT:if(i=a,u<t.PAL)c=t.PUNCT_CHARS[u];else switch(u){case t.PAL:i=ol.ALPHA;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:o.append(r[s]);break;case t.TEXT_COMPACTION_MODE_LATCH:i=ol.ALPHA}}""!==c&&o.append(c),s++}},t.byteCompaction=function(e,r,n,o,i){var a=new nd,s=0,u=0,c=!1;switch(e){case t.BYTE_COMPACTION_MODE_LATCH:for(var l=new Int32Array(6),d=r[o++];o<r[0]&&!c;)switch(l[s++]=d,u=900*u+d,d=r[o++]){case t.TEXT_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH:case t.NUMERIC_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH_6:case t.BEGIN_MACRO_PDF417_CONTROL_BLOCK:case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case t.MACRO_PDF417_TERMINATOR:o--,c=!0;break;default:if(s%5==0&&s>0){for(var h=0;h<6;++h)a.write(Number(id(u)>>id(8*(5-h))));u=0,s=0}}o===r[0]&&d<t.TEXT_COMPACTION_MODE_LATCH&&(l[s++]=d);for(var f=0;f<s;f++)a.write(l[f]);break;case t.BYTE_COMPACTION_MODE_LATCH_6:for(;o<r[0]&&!c;){var p=r[o++];if(p<t.TEXT_COMPACTION_MODE_LATCH)s++,u=900*u+p;else switch(p){case t.TEXT_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH:case t.NUMERIC_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH_6:case t.BEGIN_MACRO_PDF417_CONTROL_BLOCK:case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case t.MACRO_PDF417_TERMINATOR:o--,c=!0}if(s%5==0&&s>0){for(h=0;h<6;++h)a.write(Number(id(u)>>id(8*(5-h))));u=0,s=0}}}return i.append(Xa.decode(a.toByteArray(),n)),o},t.numericCompaction=function(e,r,n){for(var o=0,i=!1,a=new Int32Array(t.MAX_NUMERIC_CODEWORDS);r<e[0]&&!i;){var s=e[r++];if(r===e[0]&&(i=!0),s<t.TEXT_COMPACTION_MODE_LATCH)a[o]=s,o++;else switch(s){case t.TEXT_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH_6:case t.BEGIN_MACRO_PDF417_CONTROL_BLOCK:case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case t.MACRO_PDF417_TERMINATOR:r--,i=!0}(o%t.MAX_NUMERIC_CODEWORDS==0||s===t.NUMERIC_COMPACTION_MODE_LATCH||i)&&o>0&&(n.append(t.decodeBase900toBase10(a,o)),o=0)}return r},t.decodeBase900toBase10=function(e,r){for(var n=id(0),o=0;o<r;o++)n+=t.EXP900[r-o-1]*id(e[o]);var i=n.toString();if("1"!==i.charAt(0))throw new Ua;return i.substring(1)},t.TEXT_COMPACTION_MODE_LATCH=900,t.BYTE_COMPACTION_MODE_LATCH=901,t.NUMERIC_COMPACTION_MODE_LATCH=902,t.BYTE_COMPACTION_MODE_LATCH_6=924,t.ECI_USER_DEFINED=925,t.ECI_GENERAL_PURPOSE=926,t.ECI_CHARSET=927,t.BEGIN_MACRO_PDF417_CONTROL_BLOCK=928,t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD=923,t.MACRO_PDF417_TERMINATOR=922,t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE=913,t.MAX_NUMERIC_CODEWORDS=15,t.MACRO_PDF417_OPTIONAL_FIELD_FILE_NAME=0,t.MACRO_PDF417_OPTIONAL_FIELD_SEGMENT_COUNT=1,t.MACRO_PDF417_OPTIONAL_FIELD_TIME_STAMP=2,t.MACRO_PDF417_OPTIONAL_FIELD_SENDER=3,t.MACRO_PDF417_OPTIONAL_FIELD_ADDRESSEE=4,t.MACRO_PDF417_OPTIONAL_FIELD_FILE_SIZE=5,t.MACRO_PDF417_OPTIONAL_FIELD_CHECKSUM=6,t.PL=25,t.LL=27,t.AS=27,t.ML=28,t.AL=28,t.PS=29,t.PAL=29,t.PUNCT_CHARS=";<>@[\\]_`~!\r\t,:\n-.$/\"|*()?{}'",t.MIXED_CHARS="0123456789&\r\t,:#-.$/+%*=^",t.EXP900=od()?function(){var t=[];t[0]=id(1);var e=id(900);t[1]=e;for(var r=2;r<16;r++)t[r]=t[r-1]*e;return t}():[],t.NUMBER_OF_SEQUENCE_CODEWORDS=2,t}(),sd=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},ud=function(){function t(){}return t.decode=function(e,r,n,o,i,a,s){for(var u,c=new xl(e,r,n,o,i),l=null,d=null,h=!0;;h=!1){if(null!=r&&(l=t.getRowIndicatorColumn(e,c,r,!0,a,s)),null!=o&&(d=t.getRowIndicatorColumn(e,c,o,!1,a,s)),null==(u=t.merge(l,d)))throw $a.getNotFoundInstance();var f=u.getBoundingBox();if(!h||null==f||!(f.getMinY()<c.getMinY()||f.getMaxY()>c.getMaxY()))break;c=f}u.setBoundingBox(c);var p=u.getBarcodeColumnCount()+1;u.setDetectionResultColumn(0,l),u.setDetectionResultColumn(p,d);for(var g=null!=l,m=1;m<=p;m++){var y=g?m:p-m;if(void 0===u.getDetectionResultColumn(y)){var w=void 0;w=0===y||y===p?new Gl(c,0===y):new Ll(c),u.setDetectionResultColumn(y,w);for(var _=-1,v=_,E=c.getMinY();E<=c.getMaxY();E++){if((_=t.getStartColumn(u,y,E,g))<0||_>c.getMaxX()){if(-1===v)continue;_=v}var b=t.detectCodeword(e,c.getMinX(),c.getMaxX(),g,_,E,a,s);null!=b&&(w.setCodeword(E,b),v=_,a=Math.min(a,b.getWidth()),s=Math.max(s,b.getWidth()))}}}return t.createDecoderResult(u)},t.merge=function(e,r){if(null==e&&null==r)return null;var n=t.getBarcodeMetadata(e,r);if(null==n)return null;var o=xl.merge(t.adjustBoundingBox(e),t.adjustBoundingBox(r));return new Xl(n,o)},t.adjustBoundingBox=function(e){var r,n;if(null==e)return null;var o=e.getRowHeights();if(null==o)return null;var i=t.getMax(o),a=0;try{for(var s=sd(o),u=s.next();!u.done;u=s.next()){var c=u.value;if(a+=i-c,c>0)break}}catch(t){r={error:t}}finally{try{u&&!u.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}for(var l=e.getCodewords(),d=0;a>0&&null==l[d];d++)a--;var h=0;for(d=o.length-1;d>=0&&(h+=i-o[d],!(o[d]>0));d--);for(d=l.length-1;h>0&&null==l[d];d--)h--;return e.getBoundingBox().addMissingRows(a,h,e.isLeft())},t.getMax=function(t){var e,r,n=-1;try{for(var o=sd(t),i=o.next();!i.done;i=o.next()){var a=i.value;n=Math.max(n,a)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}return n},t.getBarcodeMetadata=function(t,e){var r,n;return null==t||null==(r=t.getBarcodeMetadata())?null==e?null:e.getBarcodeMetadata():null==e||null==(n=e.getBarcodeMetadata())?r:r.getColumnCount()!==n.getColumnCount()&&r.getErrorCorrectionLevel()!==n.getErrorCorrectionLevel()&&r.getRowCount()!==n.getRowCount()?null:r},t.getRowIndicatorColumn=function(e,r,n,o,i,a){for(var s=new Gl(r,o),u=0;u<2;u++)for(var c=0===u?1:-1,l=Math.trunc(Math.trunc(n.getX())),d=Math.trunc(Math.trunc(n.getY()));d<=r.getMaxY()&&d>=r.getMinY();d+=c){var h=t.detectCodeword(e,0,e.getWidth(),o,l,d,i,a);null!=h&&(s.setCodeword(d,h),l=o?h.getStartX():h.getEndX())}return s},t.adjustCodewordCount=function(e,r){var n=r[0][1],o=n.getValue(),i=e.getBarcodeColumnCount()*e.getBarcodeRowCount()-t.getNumberOfECCodeWords(e.getBarcodeECLevel());if(0===o.length){if(i<1||i>Al.MAX_CODEWORDS_IN_BARCODE)throw $a.getNotFoundInstance();n.setValue(i)}else o[0]!==i&&n.setValue(i)},t.createDecoderResult=function(e){var r=t.createBarcodeMatrix(e);t.adjustCodewordCount(e,r);for(var n=new Array,o=new Int32Array(e.getBarcodeRowCount()*e.getBarcodeColumnCount()),i=[],a=new Array,s=0;s<e.getBarcodeRowCount();s++)for(var u=0;u<e.getBarcodeColumnCount();u++){var c=r[s][u+1].getValue(),l=s*e.getBarcodeColumnCount()+u;0===c.length?n.push(l):1===c.length?o[l]=c[0]:(a.push(l),i.push(c))}for(var d=new Array(i.length),h=0;h<d.length;h++)d[h]=i[h];return t.createDecoderResultFromAmbiguousValues(e.getBarcodeECLevel(),o,Al.toIntArray(n),Al.toIntArray(a),d)},t.createDecoderResultFromAmbiguousValues=function(e,r,n,o,i){for(var a=new Int32Array(o.length),s=100;s-- >0;){for(var u=0;u<a.length;u++)r[o[u]]=i[u][a[u]];try{return t.decodeCodewords(r,e,n)}catch(t){if(!(t instanceof Sa))throw t}if(0===a.length)throw Sa.getChecksumInstance();for(u=0;u<a.length;u++){if(a[u]<i[u].length-1){a[u]++;break}if(a[u]=0,u===a.length-1)throw Sa.getChecksumInstance()}}throw Sa.getChecksumInstance()},t.createBarcodeMatrix=function(t){for(var e,r,n,o,i=Array.from({length:t.getBarcodeRowCount()},(function(){return new Array(t.getBarcodeColumnCount()+2)})),a=0;a<i.length;a++)for(var s=0;s<i[a].length;s++)i[a][s]=new Vl;var u=0;try{for(var c=sd(t.getDetectionResultColumns()),l=c.next();!l.done;l=c.next()){var d=l.value;if(null!=d)try{for(var h=(n=void 0,sd(d.getCodewords())),f=h.next();!f.done;f=h.next()){var p=f.value;if(null!=p){var g=p.getRowNumber();if(g>=0){if(g>=i.length)continue;i[g][u].setValue(p.getValue())}}}}catch(t){n={error:t}}finally{try{f&&!f.done&&(o=h.return)&&o.call(h)}finally{if(n)throw n.error}}u++}}catch(t){e={error:t}}finally{try{l&&!l.done&&(r=c.return)&&r.call(c)}finally{if(e)throw e.error}}return i},t.isValidBarcodeColumn=function(t,e){return e>=0&&e<=t.getBarcodeColumnCount()+1},t.getStartColumn=function(e,r,n,o){var i,a,s=o?1:-1,u=null;if(t.isValidBarcodeColumn(e,r-s)&&(u=e.getDetectionResultColumn(r-s).getCodeword(n)),null!=u)return o?u.getEndX():u.getStartX();if(null!=(u=e.getDetectionResultColumn(r).getCodewordNearby(n)))return o?u.getStartX():u.getEndX();if(t.isValidBarcodeColumn(e,r-s)&&(u=e.getDetectionResultColumn(r-s).getCodewordNearby(n)),null!=u)return o?u.getEndX():u.getStartX();for(var c=0;t.isValidBarcodeColumn(e,r-s);){r-=s;try{for(var l=(i=void 0,sd(e.getDetectionResultColumn(r).getCodewords())),d=l.next();!d.done;d=l.next()){var h=d.value;if(null!=h)return(o?h.getEndX():h.getStartX())+s*c*(h.getEndX()-h.getStartX())}}catch(t){i={error:t}}finally{try{d&&!d.done&&(a=l.return)&&a.call(l)}finally{if(i)throw i.error}}c++}return o?e.getBoundingBox().getMinX():e.getBoundingBox().getMaxX()},t.detectCodeword=function(e,r,n,o,i,a,s,u){i=t.adjustCodewordStartColumn(e,r,n,o,i,a);var c,l=t.getModuleBitCount(e,r,n,o,i,a);if(null==l)return null;var d=Rs.sum(l);if(o)c=i+d;else{for(var h=0;h<l.length/2;h++){var f=l[h];l[h]=l[l.length-1-h],l[l.length-1-h]=f}i=(c=i)-d}if(!t.checkCodewordSkew(d,s,u))return null;var p=Zl.getDecodedValue(l),g=Al.getCodeword(p);return-1===g?null:new Yl(i,c,t.getCodewordBucketNumber(p),g)},t.getModuleBitCount=function(t,e,r,n,o,i){for(var a=o,s=new Int32Array(8),u=0,c=n?1:-1,l=n;(n?a<r:a>=e)&&u<s.length;)t.get(a,i)===l?(s[u]++,a+=c):(u++,l=!l);return u===s.length||a===(n?r:e)&&u===s.length-1?s:null},t.getNumberOfECCodeWords=function(t){return 2<<t},t.adjustCodewordStartColumn=function(e,r,n,o,i,a){for(var s=i,u=o?-1:1,c=0;c<2;c++){for(;(o?s>=r:s<n)&&o===e.get(s,a);){if(Math.abs(i-s)>t.CODEWORD_SKEW_SIZE)return i;s+=u}u=-u,o=!o}return s},t.checkCodewordSkew=function(e,r,n){return r-t.CODEWORD_SKEW_SIZE<=e&&e<=n+t.CODEWORD_SKEW_SIZE},t.decodeCodewords=function(e,r,n){if(0===e.length)throw Ua.getFormatInstance();var o=1<<r+1,i=t.correctErrors(e,n,o);t.verifyCodewordCount(e,o);var a=ad.decode(e,""+r);return a.setErrorsCorrected(i),a.setErasures(n.length),a},t.correctErrors=function(e,r,n){if(null!=r&&r.length>n/2+t.MAX_ERRORS||n<0||n>t.MAX_EC_CODEWORDS)throw Sa.getChecksumInstance();return t.errorCorrection.decode(e,n,r)},t.verifyCodewordCount=function(t,e){if(t.length<4)throw Ua.getFormatInstance();var r=t[0];if(r>t.length)throw Ua.getFormatInstance();if(0===r){if(!(e<t.length))throw Ua.getFormatInstance();t[0]=t.length-e}},t.getBitCountForCodeword=function(t){for(var e=new Int32Array(8),r=0,n=e.length-1;!((1&t)!==r&&(r=1&t,--n<0));)e[n]++,t>>=1;return e},t.getCodewordBucketNumber=function(t){return t instanceof Int32Array?this.getCodewordBucketNumber_Int32Array(t):this.getCodewordBucketNumber_number(t)},t.getCodewordBucketNumber_number=function(e){return t.getCodewordBucketNumber(t.getBitCountForCodeword(e))},t.getCodewordBucketNumber_Int32Array=function(t){return(t[0]-t[2]+t[4]-t[6]+9)%9},t.toString=function(t){for(var e=new Bl,r=0;r<t.length;r++){e.format("Row %2d: ",r);for(var n=0;n<t[r].length;n++){var o=t[r][n];0===o.getValue().length?e.format(" ",null):e.format("%4d(%2d)",o.getValue()[0],o.getConfidence(o.getValue()[0]))}e.format("%n")}return e.toString()},t.CODEWORD_SKEW_SIZE=2,t.MAX_ERRORS=3,t.MAX_EC_CODEWORDS=512,t.errorCorrection=new kl,t}(),cd=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},ld=function(){function t(){}return t.prototype.decode=function(e,r){void 0===r&&(r=null);var n=t.decode(e,r,!1);if(null==n||0===n.length||null==n[0])throw $a.getNotFoundInstance();return n[0]},t.prototype.decodeMultiple=function(e,r){void 0===r&&(r=null);try{return t.decode(e,r,!0)}catch(t){if(t instanceof Ua||t instanceof Sa)throw $a.getNotFoundInstance();throw t}},t.decode=function(e,r,n){var o,i,a=new Array,s=Sl.detectMultiple(e,r,n);try{for(var u=cd(s.getPoints()),c=u.next();!c.done;c=u.next()){var l=c.value,d=ud.decode(s.getBits(),l[4],l[5],l[6],l[7],t.getMinCodewordWidth(l),t.getMaxCodewordWidth(l)),h=new hs(d.getText(),d.getRawBytes(),void 0,l,ps.PDF_417);h.putMetadata(ms.ERROR_CORRECTION_LEVEL,d.getECLevel());var f=d.getOther();null!=f&&h.putMetadata(ms.PDF417_EXTRA_METADATA,f),a.push(h)}}catch(t){o={error:t}}finally{try{c&&!c.done&&(i=u.return)&&i.call(u)}finally{if(o)throw o.error}}return a.map((function(t){return t}))},t.getMaxWidth=function(t,e){return null==t||null==e?0:Math.trunc(Math.abs(t.getX()-e.getX()))},t.getMinWidth=function(t,e){return null==t||null==e?Pa.MAX_VALUE:Math.trunc(Math.abs(t.getX()-e.getX()))},t.getMaxCodewordWidth=function(e){return Math.floor(Math.max(Math.max(t.getMaxWidth(e[0],e[4]),t.getMaxWidth(e[6],e[2])*Al.MODULES_IN_CODEWORD/Al.MODULES_IN_STOP_PATTERN),Math.max(t.getMaxWidth(e[1],e[5]),t.getMaxWidth(e[7],e[3])*Al.MODULES_IN_CODEWORD/Al.MODULES_IN_STOP_PATTERN)))},t.getMinCodewordWidth=function(e){return Math.floor(Math.min(Math.min(t.getMinWidth(e[0],e[4]),t.getMinWidth(e[6],e[2])*Al.MODULES_IN_CODEWORD/Al.MODULES_IN_STOP_PATTERN),Math.min(t.getMinWidth(e[1],e[5]),t.getMinWidth(e[7],e[3])*Al.MODULES_IN_CODEWORD/Al.MODULES_IN_STOP_PATTERN)))},t.prototype.reset=function(){},t}(),dd=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),hd=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return dd(e,t),e.kind="ReaderException",e}(_a),fd=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},pd=function(){function t(){}return t.prototype.decode=function(t,e){return this.setHints(e),this.decodeInternal(t)},t.prototype.decodeWithState=function(t){return null!==this.readers&&void 0!==this.readers||this.setHints(null),this.decodeInternal(t)},t.prototype.setHints=function(t){this.hints=t;var e=null!=t&&void 0!==t.get(La.TRY_HARDER),r=null==t?null:t.get(La.POSSIBLE_FORMATS),n=new Array;if(null!=r){var o=r.some((function(t){return t===ps.UPC_A||t===ps.UPC_E||t===ps.EAN_13||t===ps.EAN_8||t===ps.CODABAR||t===ps.CODE_39||t===ps.CODE_93||t===ps.CODE_128||t===ps.ITF||t===ps.RSS_14||t===ps.RSS_EXPANDED}));o&&!e&&n.push(new Sc(t)),r.includes(ps.QR_CODE)&&n.push(new El),r.includes(ps.DATA_MATRIX)&&n.push(new Hc),r.includes(ps.AZTEC)&&n.push(new Gs),r.includes(ps.PDF_417)&&n.push(new ld),o&&e&&n.push(new Sc(t))}0===n.length&&(e||n.push(new Sc(t)),n.push(new El),n.push(new Hc),n.push(new Gs),n.push(new ld),e&&n.push(new Sc(t))),this.readers=n},t.prototype.reset=function(){var t,e;if(null!==this.readers)try{for(var r=fd(this.readers),n=r.next();!n.done;n=r.next()){n.value.reset()}}catch(e){t={error:e}}finally{try{n&&!n.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}},t.prototype.decodeInternal=function(t){var e,r;if(null===this.readers)throw new hd("No readers where selected, nothing can be read.");try{for(var n=fd(this.readers),o=n.next();!o.done;o=n.next()){var i=o.value;try{return i.decode(t,this.hints)}catch(t){if(t instanceof hd)continue}}}catch(t){e={error:t}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}throw new $a("No MultiFormat Readers were able to detect the code.")},t}(),gd=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){function e(e,r){void 0===e&&(e=null),void 0===r&&(r=500);var n=new pd;return n.setHints(e),t.call(this,n,r)||this}gd(e,t),e.prototype.decodeBitmap=function(t){return this.reader.decodeWithState(t)}}(ds);var md=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){function e(e){return void 0===e&&(e=500),t.call(this,new ld,e)||this}md(e,t)}(ds);var yd,wd=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){function e(e){return void 0===e&&(e=500),t.call(this,new El,e)||this}wd(e,t)}(ds),function(t){t[t.ERROR_CORRECTION=0]="ERROR_CORRECTION",t[t.CHARACTER_SET=1]="CHARACTER_SET",t[t.DATA_MATRIX_SHAPE=2]="DATA_MATRIX_SHAPE",t[t.DATA_MATRIX_COMPACT=3]="DATA_MATRIX_COMPACT",t[t.MIN_SIZE=4]="MIN_SIZE",t[t.MAX_SIZE=5]="MAX_SIZE",t[t.MARGIN=6]="MARGIN",t[t.PDF417_COMPACT=7]="PDF417_COMPACT",t[t.PDF417_COMPACTION=8]="PDF417_COMPACTION",t[t.PDF417_DIMENSIONS=9]="PDF417_DIMENSIONS",t[t.AZTEC_LAYERS=10]="AZTEC_LAYERS",t[t.QR_VERSION=11]="QR_VERSION",t[t.GS1_FORMAT=12]="GS1_FORMAT",t[t.FORCE_C40=13]="FORCE_C40"}(yd||(yd={}));var _d=yd,vd=function(){function t(t){this.field=t,this.cachedGenerators=[],this.cachedGenerators.push(new _s(t,Int32Array.from([1])))}return t.prototype.buildGenerator=function(t){var e=this.cachedGenerators;if(t>=e.length)for(var r=e[e.length-1],n=this.field,o=e.length;o<=t;o++){var i=r.multiply(new _s(n,Int32Array.from([1,n.exp(o-1+n.getGeneratorBase())])));e.push(i),r=i}return e[t]},t.prototype.encode=function(t,e){if(0===e)throw new Aa("No error correction bytes");var r=t.length-e;if(r<=0)throw new Aa("No data bytes provided");var n=this.buildGenerator(e),o=new Int32Array(r);Da.arraycopy(t,0,o,0,r);for(var i=new _s(this.field,o),a=(i=i.multiplyByMonomial(e,1)).divide(n)[1].getCoefficients(),s=e-a.length,u=0;u<s;u++)t[r+u]=0;Da.arraycopy(a,0,t,r+s,a.length)},t}(),Ed=function(){function t(){}return t.applyMaskPenaltyRule1=function(e){return t.applyMaskPenaltyRule1Internal(e,!0)+t.applyMaskPenaltyRule1Internal(e,!1)},t.applyMaskPenaltyRule2=function(e){for(var r=0,n=e.getArray(),o=e.getWidth(),i=e.getHeight(),a=0;a<i-1;a++)for(var s=n[a],u=0;u<o-1;u++){var c=s[u];c===s[u+1]&&c===n[a+1][u]&&c===n[a+1][u+1]&&r++}return t.N2*r},t.applyMaskPenaltyRule3=function(e){for(var r=0,n=e.getArray(),o=e.getWidth(),i=e.getHeight(),a=0;a<i;a++)for(var s=0;s<o;s++){var u=n[a];s+6<o&&1===u[s]&&0===u[s+1]&&1===u[s+2]&&1===u[s+3]&&1===u[s+4]&&0===u[s+5]&&1===u[s+6]&&(t.isWhiteHorizontal(u,s-4,s)||t.isWhiteHorizontal(u,s+7,s+11))&&r++,a+6<i&&1===n[a][s]&&0===n[a+1][s]&&1===n[a+2][s]&&1===n[a+3][s]&&1===n[a+4][s]&&0===n[a+5][s]&&1===n[a+6][s]&&(t.isWhiteVertical(n,s,a-4,a)||t.isWhiteVertical(n,s,a+7,a+11))&&r++}return r*t.N3},t.isWhiteHorizontal=function(t,e,r){e=Math.max(e,0),r=Math.min(r,t.length);for(var n=e;n<r;n++)if(1===t[n])return!1;return!0},t.isWhiteVertical=function(t,e,r,n){r=Math.max(r,0),n=Math.min(n,t.length);for(var o=r;o<n;o++)if(1===t[o][e])return!1;return!0},t.applyMaskPenaltyRule4=function(e){for(var r=0,n=e.getArray(),o=e.getWidth(),i=e.getHeight(),a=0;a<i;a++)for(var s=n[a],u=0;u<o;u++)1===s[u]&&r++;var c=e.getHeight()*e.getWidth();return Math.floor(10*Math.abs(2*r-c)/c)*t.N4},t.getDataMaskBit=function(t,e,r){var n,o;switch(t){case 0:n=r+e&1;break;case 1:n=1&r;break;case 2:n=e%3;break;case 3:n=(r+e)%3;break;case 4:n=Math.floor(r/2)+Math.floor(e/3)&1;break;case 5:n=(1&(o=r*e))+o%3;break;case 6:n=(1&(o=r*e))+o%3&1;break;case 7:n=(o=r*e)%3+(r+e&1)&1;break;default:throw new Aa("Invalid mask pattern: "+t)}return 0===n},t.applyMaskPenaltyRule1Internal=function(e,r){for(var n=0,o=r?e.getHeight():e.getWidth(),i=r?e.getWidth():e.getHeight(),a=e.getArray(),s=0;s<o;s++){for(var u=0,c=-1,l=0;l<i;l++){var d=r?a[s][l]:a[l][s];d===c?u++:(u>=5&&(n+=t.N1+(u-5)),u=1,c=d)}u>=5&&(n+=t.N1+(u-5))}return n},t.N1=3,t.N2=3,t.N3=40,t.N4=10,t}(),bd=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Ad=function(){function t(t,e){this.width=t,this.height=e;for(var r=new Array(e),n=0;n!==e;n++)r[n]=new Uint8Array(t);this.bytes=r}return t.prototype.getHeight=function(){return this.height},t.prototype.getWidth=function(){return this.width},t.prototype.get=function(t,e){return this.bytes[e][t]},t.prototype.getArray=function(){return this.bytes},t.prototype.setNumber=function(t,e,r){this.bytes[e][t]=r},t.prototype.setBoolean=function(t,e,r){this.bytes[e][t]=r?1:0},t.prototype.clear=function(t){var e,r;try{for(var n=bd(this.bytes),o=n.next();!o.done;o=n.next()){var i=o.value;xa.fill(i,t)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;if(this.width!==r.width)return!1;if(this.height!==r.height)return!1;for(var n=0,o=this.height;n<o;++n)for(var i=this.bytes[n],a=r.bytes[n],s=0,u=this.width;s<u;++s)if(i[s]!==a[s])return!1;return!0},t.prototype.toString=function(){for(var t=new Za,e=0,r=this.height;e<r;++e){for(var n=this.bytes[e],o=0,i=this.width;o<i;++o)switch(n[o]){case 0:t.append(" 0");break;case 1:t.append(" 1");break;default:t.append(" ")}t.append("\n")}return t.toString()},t}(),Cd=function(){function t(){this.maskPattern=-1}return t.prototype.getMode=function(){return this.mode},t.prototype.getECLevel=function(){return this.ecLevel},t.prototype.getVersion=function(){return this.version},t.prototype.getMaskPattern=function(){return this.maskPattern},t.prototype.getMatrix=function(){return this.matrix},t.prototype.toString=function(){var t=new Za;return t.append("<<\n"),t.append(" mode: "),t.append(this.mode?this.mode.toString():"null"),t.append("\n ecLevel: "),t.append(this.ecLevel?this.ecLevel.toString():"null"),t.append("\n version: "),t.append(this.version?this.version.toString():"null"),t.append("\n maskPattern: "),t.append(this.maskPattern.toString()),this.matrix?(t.append("\n matrix:\n"),t.append(this.matrix.toString())):t.append("\n matrix: null\n"),t.append(">>\n"),t.toString()},t.prototype.setMode=function(t){this.mode=t},t.prototype.setECLevel=function(t){this.ecLevel=t},t.prototype.setVersion=function(t){this.version=t},t.prototype.setMaskPattern=function(t){this.maskPattern=t},t.prototype.setMatrix=function(t){this.matrix=t},t.isValidMaskPattern=function(e){return e>=0&&e<t.NUM_MASK_PATTERNS},t.NUM_MASK_PATTERNS=8,t}(),Id=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Sd=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Id(e,t),e.kind="WriterException",e}(_a),Td=function(){function t(){}return t.clearMatrix=function(t){t.clear(255)},t.buildMatrix=function(e,r,n,o,i){t.clearMatrix(i),t.embedBasicPatterns(n,i),t.embedTypeInfo(r,o,i),t.maybeEmbedVersionInfo(n,i),t.embedDataBits(e,o,i)},t.embedBasicPatterns=function(e,r){t.embedPositionDetectionPatternsAndSeparators(r),t.embedDarkDotAtLeftBottomCorner(r),t.maybeEmbedPositionAdjustmentPatterns(e,r),t.embedTimingPatterns(r)},t.embedTypeInfo=function(e,r,n){var o=new Ba;t.makeTypeInfoBits(e,r,o);for(var i=0,a=o.getSize();i<a;++i){var s=o.get(o.getSize()-1-i),u=t.TYPE_INFO_COORDINATES[i],c=u[0],l=u[1];if(n.setBoolean(c,l,s),i<8){var d=n.getWidth()-i-1,h=8;n.setBoolean(d,h,s)}else{d=8,h=n.getHeight()-7+(i-8);n.setBoolean(d,h,s)}}},t.maybeEmbedVersionInfo=function(e,r){if(!(e.getVersionNumber()<7)){var n=new Ba;t.makeVersionInfoBits(e,n);for(var o=17,i=0;i<6;++i)for(var a=0;a<3;++a){var s=n.get(o);o--,r.setBoolean(i,r.getHeight()-11+a,s),r.setBoolean(r.getHeight()-11+a,i,s)}}},t.embedDataBits=function(e,r,n){for(var o=0,i=-1,a=n.getWidth()-1,s=n.getHeight()-1;a>0;){for(6===a&&(a-=1);s>=0&&s<n.getHeight();){for(var u=0;u<2;++u){var c=a-u;if(t.isEmpty(n.get(c,s))){var l=void 0;o<e.getSize()?(l=e.get(o),++o):l=!1,255!==r&&Ed.getDataMaskBit(r,c,s)&&(l=!l),n.setBoolean(c,s,l)}}s+=i}s+=i=-i,a-=2}if(o!==e.getSize())throw new Sd("Not all bits consumed: "+o+"/"+e.getSize())},t.findMSBSet=function(t){return 32-Pa.numberOfLeadingZeros(t)},t.calculateBCHCode=function(e,r){if(0===r)throw new Aa("0 polynomial");var n=t.findMSBSet(r);for(e<<=n-1;t.findMSBSet(e)>=n;)e^=r<<t.findMSBSet(e)-n;return e},t.makeTypeInfoBits=function(e,r,n){if(!Cd.isValidMaskPattern(r))throw new Sd("Invalid mask pattern");var o=e.getBits()<<3|r;n.appendBits(o,5);var i=t.calculateBCHCode(o,t.TYPE_INFO_POLY);n.appendBits(i,10);var a=new Ba;if(a.appendBits(t.TYPE_INFO_MASK_PATTERN,15),n.xor(a),15!==n.getSize())throw new Sd("should not happen but we got: "+n.getSize())},t.makeVersionInfoBits=function(e,r){r.appendBits(e.getVersionNumber(),6);var n=t.calculateBCHCode(e.getVersionNumber(),t.VERSION_INFO_POLY);if(r.appendBits(n,12),18!==r.getSize())throw new Sd("should not happen but we got: "+r.getSize())},t.isEmpty=function(t){return 255===t},t.embedTimingPatterns=function(e){for(var r=8;r<e.getWidth()-8;++r){var n=(r+1)%2;t.isEmpty(e.get(r,6))&&e.setNumber(r,6,n),t.isEmpty(e.get(6,r))&&e.setNumber(6,r,n)}},t.embedDarkDotAtLeftBottomCorner=function(t){if(0===t.get(8,t.getHeight()-8))throw new Sd;t.setNumber(8,t.getHeight()-8,1)},t.embedHorizontalSeparationPattern=function(e,r,n){for(var o=0;o<8;++o){if(!t.isEmpty(n.get(e+o,r)))throw new Sd;n.setNumber(e+o,r,0)}},t.embedVerticalSeparationPattern=function(e,r,n){for(var o=0;o<7;++o){if(!t.isEmpty(n.get(e,r+o)))throw new Sd;n.setNumber(e,r+o,0)}},t.embedPositionAdjustmentPattern=function(e,r,n){for(var o=0;o<5;++o)for(var i=t.POSITION_ADJUSTMENT_PATTERN[o],a=0;a<5;++a)n.setNumber(e+a,r+o,i[a])},t.embedPositionDetectionPattern=function(e,r,n){for(var o=0;o<7;++o)for(var i=t.POSITION_DETECTION_PATTERN[o],a=0;a<7;++a)n.setNumber(e+a,r+o,i[a])},t.embedPositionDetectionPatternsAndSeparators=function(e){var r=t.POSITION_DETECTION_PATTERN[0].length;t.embedPositionDetectionPattern(0,0,e),t.embedPositionDetectionPattern(e.getWidth()-r,0,e),t.embedPositionDetectionPattern(0,e.getWidth()-r,e);t.embedHorizontalSeparationPattern(0,7,e),t.embedHorizontalSeparationPattern(e.getWidth()-8,7,e),t.embedHorizontalSeparationPattern(0,e.getWidth()-8,e);t.embedVerticalSeparationPattern(7,0,e),t.embedVerticalSeparationPattern(e.getHeight()-7-1,0,e),t.embedVerticalSeparationPattern(7,e.getHeight()-7,e)},t.maybeEmbedPositionAdjustmentPatterns=function(e,r){if(!(e.getVersionNumber()<2))for(var n=e.getVersionNumber()-1,o=t.POSITION_ADJUSTMENT_PATTERN_COORDINATE_TABLE[n],i=0,a=o.length;i!==a;i++){var s=o[i];if(s>=0)for(var u=0;u!==a;u++){var c=o[u];c>=0&&t.isEmpty(r.get(c,s))&&t.embedPositionAdjustmentPattern(c-2,s-2,r)}}},t.POSITION_DETECTION_PATTERN=Array.from([Int32Array.from([1,1,1,1,1,1,1]),Int32Array.from([1,0,0,0,0,0,1]),Int32Array.from([1,0,1,1,1,0,1]),Int32Array.from([1,0,1,1,1,0,1]),Int32Array.from([1,0,1,1,1,0,1]),Int32Array.from([1,0,0,0,0,0,1]),Int32Array.from([1,1,1,1,1,1,1])]),t.POSITION_ADJUSTMENT_PATTERN=Array.from([Int32Array.from([1,1,1,1,1]),Int32Array.from([1,0,0,0,1]),Int32Array.from([1,0,1,0,1]),Int32Array.from([1,0,0,0,1]),Int32Array.from([1,1,1,1,1])]),t.POSITION_ADJUSTMENT_PATTERN_COORDINATE_TABLE=Array.from([Int32Array.from([-1,-1,-1,-1,-1,-1,-1]),Int32Array.from([6,18,-1,-1,-1,-1,-1]),Int32Array.from([6,22,-1,-1,-1,-1,-1]),Int32Array.from([6,26,-1,-1,-1,-1,-1]),Int32Array.from([6,30,-1,-1,-1,-1,-1]),Int32Array.from([6,34,-1,-1,-1,-1,-1]),Int32Array.from([6,22,38,-1,-1,-1,-1]),Int32Array.from([6,24,42,-1,-1,-1,-1]),Int32Array.from([6,26,46,-1,-1,-1,-1]),Int32Array.from([6,28,50,-1,-1,-1,-1]),Int32Array.from([6,30,54,-1,-1,-1,-1]),Int32Array.from([6,32,58,-1,-1,-1,-1]),Int32Array.from([6,34,62,-1,-1,-1,-1]),Int32Array.from([6,26,46,66,-1,-1,-1]),Int32Array.from([6,26,48,70,-1,-1,-1]),Int32Array.from([6,26,50,74,-1,-1,-1]),Int32Array.from([6,30,54,78,-1,-1,-1]),Int32Array.from([6,30,56,82,-1,-1,-1]),Int32Array.from([6,30,58,86,-1,-1,-1]),Int32Array.from([6,34,62,90,-1,-1,-1]),Int32Array.from([6,28,50,72,94,-1,-1]),Int32Array.from([6,26,50,74,98,-1,-1]),Int32Array.from([6,30,54,78,102,-1,-1]),Int32Array.from([6,28,54,80,106,-1,-1]),Int32Array.from([6,32,58,84,110,-1,-1]),Int32Array.from([6,30,58,86,114,-1,-1]),Int32Array.from([6,34,62,90,118,-1,-1]),Int32Array.from([6,26,50,74,98,122,-1]),Int32Array.from([6,30,54,78,102,126,-1]),Int32Array.from([6,26,52,78,104,130,-1]),Int32Array.from([6,30,56,82,108,134,-1]),Int32Array.from([6,34,60,86,112,138,-1]),Int32Array.from([6,30,58,86,114,142,-1]),Int32Array.from([6,34,62,90,118,146,-1]),Int32Array.from([6,30,54,78,102,126,150]),Int32Array.from([6,24,50,76,102,128,154]),Int32Array.from([6,28,54,80,106,132,158]),Int32Array.from([6,32,58,84,110,136,162]),Int32Array.from([6,26,54,82,110,138,166]),Int32Array.from([6,30,58,86,114,142,170])]),t.TYPE_INFO_COORDINATES=Array.from([Int32Array.from([8,0]),Int32Array.from([8,1]),Int32Array.from([8,2]),Int32Array.from([8,3]),Int32Array.from([8,4]),Int32Array.from([8,5]),Int32Array.from([8,7]),Int32Array.from([8,8]),Int32Array.from([7,8]),Int32Array.from([5,8]),Int32Array.from([4,8]),Int32Array.from([3,8]),Int32Array.from([2,8]),Int32Array.from([1,8]),Int32Array.from([0,8])]),t.VERSION_INFO_POLY=7973,t.TYPE_INFO_POLY=1335,t.TYPE_INFO_MASK_PATTERN=21522,t}(),Dd=function(){function t(t,e){this.dataBytes=t,this.errorCorrectionBytes=e}return t.prototype.getDataBytes=function(){return this.dataBytes},t.prototype.getErrorCorrectionBytes=function(){return this.errorCorrectionBytes},t}(),Od=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};!function(){function t(){}t.calculateMaskPenalty=function(t){return Ed.applyMaskPenaltyRule1(t)+Ed.applyMaskPenaltyRule2(t)+Ed.applyMaskPenaltyRule3(t)+Ed.applyMaskPenaltyRule4(t)},t.encode=function(e,r,n){void 0===n&&(n=null);var o=t.DEFAULT_BYTE_MODE_ENCODING,i=null!==n&&void 0!==n.get(_d.CHARACTER_SET);i&&(o=n.get(_d.CHARACTER_SET).toString());var a=this.chooseMode(e,o),s=new Ba;if(a===al.BYTE&&(i||t.DEFAULT_BYTE_MODE_ENCODING!==o)){var u=ja.getCharacterSetECIByName(o);void 0!==u&&this.appendECI(u,s)}this.appendModeInfo(a,s);var c,l=new Ba;if(this.appendBytes(e,a,l,o),null!==n&&void 0!==n.get(_d.QR_VERSION)){var d=Number.parseInt(n.get(_d.QR_VERSION).toString(),10);c=Jc.getVersionForNumber(d);var h=this.calculateBitsNeeded(a,s,l,c);if(!this.willFit(h,c,r))throw new Sd("Data too big for requested version")}else c=this.recommendVersion(r,a,s,l);var f=new Ba;f.appendBitArray(s);var p=a===al.BYTE?l.getSizeInBytes():e.length;this.appendLengthInfo(p,c,a,f),f.appendBitArray(l);var g=c.getECBlocksForLevel(r),m=c.getTotalCodewords()-g.getTotalECCodewords();this.terminateBits(m,f);var y=this.interleaveWithECBytes(f,c.getTotalCodewords(),m,g.getNumBlocks()),w=new Cd;w.setECLevel(r),w.setMode(a),w.setVersion(c);var _=c.getDimensionForVersion(),v=new Ad(_,_),E=this.chooseMaskPattern(y,r,c,v);return w.setMaskPattern(E),Td.buildMatrix(y,r,c,E,v),w.setMatrix(v),w},t.recommendVersion=function(t,e,r,n){var o=this.calculateBitsNeeded(e,r,n,Jc.getVersionForNumber(1)),i=this.chooseVersion(o,t),a=this.calculateBitsNeeded(e,r,n,i);return this.chooseVersion(a,t)},t.calculateBitsNeeded=function(t,e,r,n){return e.getSize()+t.getCharacterCountBits(n)+r.getSize()},t.getAlphanumericCode=function(e){return e<t.ALPHANUMERIC_TABLE.length?t.ALPHANUMERIC_TABLE[e]:-1},t.chooseMode=function(e,r){if(void 0===r&&(r=null),ja.SJIS.getName()===r&&this.isOnlyDoubleByteKanji(e))return al.KANJI;for(var n=!1,o=!1,i=0,a=e.length;i<a;++i){var s=e.charAt(i);if(t.isDigit(s))n=!0;else{if(-1===this.getAlphanumericCode(s.charCodeAt(0)))return al.BYTE;o=!0}}return o?al.ALPHANUMERIC:n?al.NUMERIC:al.BYTE},t.isOnlyDoubleByteKanji=function(t){var e;try{e=Xa.encode(t,ja.SJIS)}catch(t){return!1}var r=e.length;if(r%2!=0)return!1;for(var n=0;n<r;n+=2){var o=255&e[n];if((o<129||o>159)&&(o<224||o>235))return!1}return!0},t.chooseMaskPattern=function(t,e,r,n){for(var o=Number.MAX_SAFE_INTEGER,i=-1,a=0;a<Cd.NUM_MASK_PATTERNS;a++){Td.buildMatrix(t,e,r,a,n);var s=this.calculateMaskPenalty(n);s<o&&(o=s,i=a)}return i},t.chooseVersion=function(e,r){for(var n=1;n<=40;n++){var o=Jc.getVersionForNumber(n);if(t.willFit(e,o,r))return o}throw new Sd("Data too big")},t.willFit=function(t,e,r){return e.getTotalCodewords()-e.getECBlocksForLevel(r).getTotalECCodewords()>=(t+7)/8},t.terminateBits=function(t,e){var r=8*t;if(e.getSize()>r)throw new Sd("data bits cannot fit in the QR Code"+e.getSize()+" > "+r);for(var n=0;n<4&&e.getSize()<r;++n)e.appendBit(!1);var o=7&e.getSize();if(o>0)for(n=o;n<8;n++)e.appendBit(!1);var i=t-e.getSizeInBytes();for(n=0;n<i;++n)e.appendBits(1&n?17:236,8);if(e.getSize()!==r)throw new Sd("Bits size does not equal capacity")},t.getNumDataBytesAndNumECBytesForBlockID=function(t,e,r,n,o,i){if(n>=r)throw new Sd("Block ID too large");var a=t%r,s=r-a,u=Math.floor(t/r),c=u+1,l=Math.floor(e/r),d=l+1,h=u-l,f=c-d;if(h!==f)throw new Sd("EC bytes mismatch");if(r!==s+a)throw new Sd("RS blocks mismatch");if(t!==(l+h)*s+(d+f)*a)throw new Sd("Total bytes mismatch");n<s?(o[0]=l,i[0]=h):(o[0]=d,i[0]=f)},t.interleaveWithECBytes=function(e,r,n,o){var i,a,s,u;if(e.getSizeInBytes()!==n)throw new Sd("Number of bits and data bytes does not match");for(var c=0,l=0,d=0,h=new Array,f=0;f<o;++f){var p=new Int32Array(1),g=new Int32Array(1);t.getNumDataBytesAndNumECBytesForBlockID(r,n,o,f,p,g);var m=p[0],y=new Uint8Array(m);e.toBytes(8*c,y,0,m);var w=t.generateECBytes(y,g[0]);h.push(new Dd(y,w)),l=Math.max(l,m),d=Math.max(d,w.length),c+=p[0]}if(n!==c)throw new Sd("Data bytes does not match offset");var _=new Ba;for(f=0;f<l;++f)try{for(var v=(i=void 0,Od(h)),E=v.next();!E.done;E=v.next()){f<(y=E.value.getDataBytes()).length&&_.appendBits(y[f],8)}}catch(t){i={error:t}}finally{try{E&&!E.done&&(a=v.return)&&a.call(v)}finally{if(i)throw i.error}}for(f=0;f<d;++f)try{for(var b=(s=void 0,Od(h)),A=b.next();!A.done;A=b.next()){f<(w=A.value.getErrorCorrectionBytes()).length&&_.appendBits(w[f],8)}}catch(t){s={error:t}}finally{try{A&&!A.done&&(u=b.return)&&u.call(b)}finally{if(s)throw s.error}}if(r!==_.getSizeInBytes())throw new Sd("Interleaving error: "+r+" and "+_.getSizeInBytes()+" differ.");return _},t.generateECBytes=function(t,e){for(var r=t.length,n=new Int32Array(r+e),o=0;o<r;o++)n[o]=255&t[o];new vd(As.QR_CODE_FIELD_256).encode(n,e);var i=new Uint8Array(e);for(o=0;o<e;o++)i[o]=n[r+o];return i},t.appendModeInfo=function(t,e){e.appendBits(t.getBits(),4)},t.appendLengthInfo=function(t,e,r,n){var o=r.getCharacterCountBits(e);if(t>=1<<o)throw new Sd(t+" is bigger than "+((1<<o)-1));n.appendBits(t,o)},t.appendBytes=function(e,r,n,o){switch(r){case al.NUMERIC:t.appendNumericBytes(e,n);break;case al.ALPHANUMERIC:t.appendAlphanumericBytes(e,n);break;case al.BYTE:t.append8BitBytes(e,n,o);break;case al.KANJI:t.appendKanjiBytes(e,n);break;default:throw new Sd("Invalid mode: "+r)}},t.getDigit=function(t){return t.charCodeAt(0)-48},t.isDigit=function(e){var r=t.getDigit(e);return r>=0&&r<=9},t.appendNumericBytes=function(e,r){for(var n=e.length,o=0;o<n;){var i=t.getDigit(e.charAt(o));if(o+2<n){var a=t.getDigit(e.charAt(o+1)),s=t.getDigit(e.charAt(o+2));r.appendBits(100*i+10*a+s,10),o+=3}else if(o+1<n){a=t.getDigit(e.charAt(o+1));r.appendBits(10*i+a,7),o+=2}else r.appendBits(i,4),o++}},t.appendAlphanumericBytes=function(e,r){for(var n=e.length,o=0;o<n;){var i=t.getAlphanumericCode(e.charCodeAt(o));if(-1===i)throw new Sd;if(o+1<n){var a=t.getAlphanumericCode(e.charCodeAt(o+1));if(-1===a)throw new Sd;r.appendBits(45*i+a,11),o+=2}else r.appendBits(i,6),o++}},t.append8BitBytes=function(t,e,r){var n;try{n=Xa.encode(t,r)}catch(t){throw new Sd(t)}for(var o=0,i=n.length;o!==i;o++){var a=n[o];e.appendBits(a,8)}},t.appendKanjiBytes=function(t,e){var r;try{r=Xa.encode(t,ja.SJIS)}catch(t){throw new Sd(t)}for(var n=r.length,o=0;o<n;o+=2){var i=(255&r[o])<<8&4294967295|255&r[o+1],a=-1;if(i>=33088&&i<=40956?a=i-33088:i>=57408&&i<=60351&&(a=i-49472),-1===a)throw new Sd("Invalid byte sequence");var s=192*(a>>8)+(255&a);e.appendBits(s,13)}},t.appendECI=function(t,e){e.appendBits(al.ECI.getBits(),4),e.appendBits(t.getValue(),8)},t.ALPHANUMERIC_TABLE=Int32Array.from([-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,36,-1,-1,-1,37,38,-1,-1,-1,-1,39,40,-1,41,42,43,0,1,2,3,4,5,6,7,8,9,44,-1,-1,-1,-1,-1,-1,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,-1,-1,-1,-1,-1]),t.DEFAULT_BYTE_MODE_ENCODING=ja.UTF8.getName()}();var Rd=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){function e(e,r,n,o,i,a,s,u){var c=t.call(this,a,s)||this;if(c.yuvData=e,c.dataWidth=r,c.dataHeight=n,c.left=o,c.top=i,o+a>r||i+s>n)throw new Aa("Crop rectangle does not fit within image data.");return u&&c.reverseHorizontal(a,s),c}Rd(e,t),e.prototype.getRow=function(t,e){if(t<0||t>=this.getHeight())throw new Aa("Requested row is outside the image: "+t);var r=this.getWidth();(null==e||e.length<r)&&(e=new Uint8ClampedArray(r));var n=(t+this.top)*this.dataWidth+this.left;return Da.arraycopy(this.yuvData,n,e,0,r),e},e.prototype.getMatrix=function(){var t=this.getWidth(),e=this.getHeight();if(t===this.dataWidth&&e===this.dataHeight)return this.yuvData;var r=t*e,n=new Uint8ClampedArray(r),o=this.top*this.dataWidth+this.left;if(t===this.dataWidth)return Da.arraycopy(this.yuvData,o,n,0,r),n;for(var i=0;i<e;i++){var a=i*t;Da.arraycopy(this.yuvData,o,n,a,t),o+=this.dataWidth}return n},e.prototype.isCropSupported=function(){return!0},e.prototype.crop=function(t,r,n,o){return new e(this.yuvData,this.dataWidth,this.dataHeight,this.left+t,this.top+r,n,o,!1)},e.prototype.renderThumbnail=function(){for(var t=this.getWidth()/e.THUMBNAIL_SCALE_FACTOR,r=this.getHeight()/e.THUMBNAIL_SCALE_FACTOR,n=new Int32Array(t*r),o=this.yuvData,i=this.top*this.dataWidth+this.left,a=0;a<r;a++){for(var s=a*t,u=0;u<t;u++){var c=255&o[i+u*e.THUMBNAIL_SCALE_FACTOR];n[s+u]=4278190080|65793*c}i+=this.dataWidth*e.THUMBNAIL_SCALE_FACTOR}return n},e.prototype.getThumbnailWidth=function(){return this.getWidth()/e.THUMBNAIL_SCALE_FACTOR},e.prototype.getThumbnailHeight=function(){return this.getHeight()/e.THUMBNAIL_SCALE_FACTOR},e.prototype.reverseHorizontal=function(t,e){for(var r=this.yuvData,n=0,o=this.top*this.dataWidth+this.left;n<e;n++,o+=this.dataWidth)for(var i=o+t/2,a=o,s=o+t-1;a<i;a++,s--){var u=r[a];r[a]=r[s],r[s]=u}},e.prototype.invert=function(){return new os(this)},e.THUMBNAIL_SCALE_FACTOR=2}(rs);var Md=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){function e(e,r,n,o,i,a,s){var u=t.call(this,r,n)||this;if(u.dataWidth=o,u.dataHeight=i,u.left=a,u.top=s,4===e.BYTES_PER_ELEMENT){for(var c=r*n,l=new Uint8ClampedArray(c),d=0;d<c;d++){var h=e[d],f=h>>16&255,p=h>>7&510,g=255&h;l[d]=(f+p+g)/4&255}u.luminances=l}else u.luminances=e;if(void 0===o&&(u.dataWidth=r),void 0===i&&(u.dataHeight=n),void 0===a&&(u.left=0),void 0===s&&(u.top=0),u.left+r>u.dataWidth||u.top+n>u.dataHeight)throw new Aa("Crop rectangle does not fit within image data.");return u}Md(e,t),e.prototype.getRow=function(t,e){if(t<0||t>=this.getHeight())throw new Aa("Requested row is outside the image: "+t);var r=this.getWidth();(null==e||e.length<r)&&(e=new Uint8ClampedArray(r));var n=(t+this.top)*this.dataWidth+this.left;return Da.arraycopy(this.luminances,n,e,0,r),e},e.prototype.getMatrix=function(){var t=this.getWidth(),e=this.getHeight();if(t===this.dataWidth&&e===this.dataHeight)return this.luminances;var r=t*e,n=new Uint8ClampedArray(r),o=this.top*this.dataWidth+this.left;if(t===this.dataWidth)return Da.arraycopy(this.luminances,o,n,0,r),n;for(var i=0;i<e;i++){var a=i*t;Da.arraycopy(this.luminances,o,n,a,t),o+=this.dataWidth}return n},e.prototype.isCropSupported=function(){return!0},e.prototype.crop=function(t,r,n,o){return new e(this.luminances,n,o,this.dataWidth,this.dataHeight,this.left+t,this.top+r)},e.prototype.invert=function(){return new os(this)}}(rs);var Nd,kd,xd=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Pd=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return xd(e,t),e.forName=function(t){return this.getCharacterSetECIByName(t)},e}(ja),Bd=function(){function t(){}return t.ISO_8859_1=ja.ISO8859_1,t}();Nd=function(t,e){for(var r=1,n=0;n<255;n++)e[n]=r,t[r]=n,(r*=2)>=256&&(r^=301);return{LOG:t,ALOG:e}}([],[]),Nd.LOG,Nd.ALOG,function(t){t[t.FORCE_NONE=0]="FORCE_NONE",t[t.FORCE_SQUARE=1]="FORCE_SQUARE",t[t.FORCE_RECTANGLE=2]="FORCE_RECTANGLE"}(kd||(kd={}));var Fd,Ld="[)>05",zd="[)>06",Ud=function(){function t(){}return t.prototype.getEncodingMode=function(){return 0},t.prototype.encode=function(t){if(eh.determineConsecutiveDigitCount(t.getMessage(),t.pos)>=2)t.writeCodeword(this.encodeASCIIDigits(t.getMessage().charCodeAt(t.pos),t.getMessage().charCodeAt(t.pos+1))),t.pos+=2;else{var e=t.getCurrentChar(),r=eh.lookAheadTest(t.getMessage(),t.pos,this.getEncodingMode());if(r!==this.getEncodingMode())switch(r){case 5:return t.writeCodeword(231),void t.signalEncoderChange(5);case 1:return t.writeCodeword(230),void t.signalEncoderChange(1);case 3:t.writeCodeword(238),t.signalEncoderChange(3);break;case 2:t.writeCodeword(239),t.signalEncoderChange(2);break;case 4:t.writeCodeword(240),t.signalEncoderChange(4);break;default:throw new Error("Illegal mode: "+r)}else eh.isExtendedASCII(e)?(t.writeCodeword(235),t.writeCodeword(e-128+1),t.pos++):(t.writeCodeword(e+1),t.pos++)}},t.prototype.encodeASCIIDigits=function(t,e){if(eh.isDigit(t)&&eh.isDigit(e))return 10*(t-48)+(e-48)+130;throw new Error("not digits: "+t+e)},t}(),Vd=function(){function t(){}return t.prototype.getEncodingMode=function(){return 5},t.prototype.encode=function(t){var e=new Za;for(e.append(0);t.hasMoreCharacters();){var r=t.getCurrentChar();if(e.append(r),t.pos++,eh.lookAheadTest(t.getMessage(),t.pos,this.getEncodingMode())!==this.getEncodingMode()){t.signalEncoderChange(0);break}}var n=e.length()-1,o=t.getCodewordCount()+n+1;t.updateSymbolInfo(o);var i=t.getSymbolInfo().getDataCapacity()-o>0;if(t.hasMoreCharacters()||i)if(n<=249)e.setCharAt(0,Ya.getCharAt(n));else{if(!(n<=1555))throw new Error("Message length not in valid ranges: "+n);e.setCharAt(0,Ya.getCharAt(Math.floor(n/250)+249)),e.insert(1,Ya.getCharAt(n%250))}var a=0;for(r=e.length();a<r;a++)t.writeCodeword(this.randomize255State(e.charAt(a).charCodeAt(0),t.getCodewordCount()+1))},t.prototype.randomize255State=function(t,e){var r=t+(149*e%255+1);return r<=255?r:r-256},t}(),Hd=function(){function t(){}return t.prototype.getEncodingMode=function(){return 1},t.prototype.encodeMaximal=function(t){for(var e=new Za,r=0,n=t.pos,o=0;t.hasMoreCharacters();){var i=t.getCurrentChar();t.pos++,r=this.encodeChar(i,e),e.length()%3==0&&(n=t.pos,o=e.length())}if(o!==e.length()){var a=Math.floor(e.length()/3*2),s=Math.floor(t.getCodewordCount()+a+1);t.updateSymbolInfo(s);var u=t.getSymbolInfo().getDataCapacity()-s,c=Math.floor(e.length()%3);(2===c&&2!==u||1===c&&(r>3||1!==u))&&(t.pos=n)}e.length()>0&&t.writeCodeword(230),this.handleEOD(t,e)},t.prototype.encode=function(t){for(var e=new Za;t.hasMoreCharacters();){var r=t.getCurrentChar();t.pos++;var n=this.encodeChar(r,e),o=2*Math.floor(e.length()/3),i=t.getCodewordCount()+o;t.updateSymbolInfo(i);var a=t.getSymbolInfo().getDataCapacity()-i;if(!t.hasMoreCharacters()){var s=new Za;for(e.length()%3==2&&2!==a&&(n=this.backtrackOneCharacter(t,e,s,n));e.length()%3==1&&(n>3||1!==a);)n=this.backtrackOneCharacter(t,e,s,n);break}if(e.length()%3==0)if(eh.lookAheadTest(t.getMessage(),t.pos,this.getEncodingMode())!==this.getEncodingMode()){t.signalEncoderChange(0);break}}this.handleEOD(t,e)},t.prototype.backtrackOneCharacter=function(t,e,r,n){var o=e.length(),i=e.toString().substring(0,o-n);e.setLengthToZero(),e.append(i),t.pos--;var a=t.getCurrentChar();return n=this.encodeChar(a,r),t.resetSymbolInfo(),n},t.prototype.writeNextTriplet=function(t,e){t.writeCodewords(this.encodeToCodewords(e.toString()));var r=e.toString().substring(3);e.setLengthToZero(),e.append(r)},t.prototype.handleEOD=function(t,e){var r=Math.floor(e.length()/3*2),n=e.length()%3,o=t.getCodewordCount()+r;t.updateSymbolInfo(o);var i=t.getSymbolInfo().getDataCapacity()-o;if(2===n){for(e.append("\0");e.length()>=3;)this.writeNextTriplet(t,e);t.hasMoreCharacters()&&t.writeCodeword(254)}else if(1===i&&1===n){for(;e.length()>=3;)this.writeNextTriplet(t,e);t.hasMoreCharacters()&&t.writeCodeword(254),t.pos--}else{if(0!==n)throw new Error("Unexpected case. Please report!");for(;e.length()>=3;)this.writeNextTriplet(t,e);(i>0||t.hasMoreCharacters())&&t.writeCodeword(254)}t.signalEncoderChange(0)},t.prototype.encodeChar=function(t,e){if(t===" ".charCodeAt(0))return e.append(3),1;if(t>="0".charCodeAt(0)&&t<="9".charCodeAt(0))return e.append(t-48+4),1;if(t>="A".charCodeAt(0)&&t<="Z".charCodeAt(0))return e.append(t-65+14),1;if(t<" ".charCodeAt(0))return e.append(0),e.append(t),2;if(t<="/".charCodeAt(0))return e.append(1),e.append(t-33),2;if(t<="@".charCodeAt(0))return e.append(1),e.append(t-58+15),2;if(t<="_".charCodeAt(0))return e.append(1),e.append(t-91+22),2;if(t<=127)return e.append(2),e.append(t-96),2;e.append("1");var r=2;return r+=this.encodeChar(t-128,e)},t.prototype.encodeToCodewords=function(t){var e=1600*t.charCodeAt(0)+40*t.charCodeAt(1)+t.charCodeAt(2)+1,r=e/256,n=e%256,o=new Za;return o.append(r),o.append(n),o.toString()},t}(),jd=function(){function t(){}return t.prototype.getEncodingMode=function(){return 4},t.prototype.encode=function(t){for(var e=new Za;t.hasMoreCharacters();){var r=t.getCurrentChar();if(this.encodeChar(r,e),t.pos++,e.length()>=4){t.writeCodewords(this.encodeToCodewords(e.toString()));var n=e.toString().substring(4);if(e.setLengthToZero(),e.append(n),eh.lookAheadTest(t.getMessage(),t.pos,this.getEncodingMode())!==this.getEncodingMode()){t.signalEncoderChange(0);break}}}e.append(Ya.getCharAt(31)),this.handleEOD(t,e)},t.prototype.handleEOD=function(t,e){try{var r=e.length();if(0===r)return;if(1===r){t.updateSymbolInfo();var n=t.getSymbolInfo().getDataCapacity()-t.getCodewordCount(),o=t.getRemainingCharacters();if(o>n&&(t.updateSymbolInfo(t.getCodewordCount()+1),n=t.getSymbolInfo().getDataCapacity()-t.getCodewordCount()),o<=n&&n<=2)return}if(r>4)throw new Error("Count must not exceed 4");var i=r-1,a=this.encodeToCodewords(e.toString()),s=!t.hasMoreCharacters()&&i<=2;if(i<=2)t.updateSymbolInfo(t.getCodewordCount()+i),(n=t.getSymbolInfo().getDataCapacity()-t.getCodewordCount())>=3&&(s=!1,t.updateSymbolInfo(t.getCodewordCount()+a.length));s?(t.resetSymbolInfo(),t.pos-=i):t.writeCodewords(a)}finally{t.signalEncoderChange(0)}},t.prototype.encodeChar=function(t,e){t>=" ".charCodeAt(0)&&t<="?".charCodeAt(0)?e.append(t):t>="@".charCodeAt(0)&&t<="^".charCodeAt(0)?e.append(Ya.getCharAt(t-64)):eh.illegalCharacter(Ya.getCharAt(t))},t.prototype.encodeToCodewords=function(t){var e=t.length;if(0===e)throw new Error("StringBuilder must not be empty");var r=(t.charAt(0).charCodeAt(0)<<18)+((e>=2?t.charAt(1).charCodeAt(0):0)<<12)+((e>=3?t.charAt(2).charCodeAt(0):0)<<6)+(e>=4?t.charAt(3).charCodeAt(0):0),n=r>>16&255,o=r>>8&255,i=255&r,a=new Za;return a.append(n),e>=2&&a.append(o),e>=3&&a.append(i),a.toString()},t}(),Gd=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Wd=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Xd=function(){function t(t,e,r,n,o,i,a,s){void 0===a&&(a=0),void 0===s&&(s=0),this.rectangular=t,this.dataCapacity=e,this.errorCodewords=r,this.matrixWidth=n,this.matrixHeight=o,this.dataRegions=i,this.rsBlockData=a,this.rsBlockError=s}return t.lookup=function(t,e,r,n,o){var i,a;void 0===e&&(e=0),void 0===r&&(r=null),void 0===n&&(n=null),void 0===o&&(o=!0);try{for(var s=Wd(Zd),u=s.next();!u.done;u=s.next()){var c=u.value;if((1!==e||!c.rectangular)&&((2!==e||c.rectangular)&&(null==r||!(c.getSymbolWidth()<r.getWidth()||c.getSymbolHeight()<r.getHeight()))&&(null==n||!(c.getSymbolWidth()>n.getWidth()||c.getSymbolHeight()>n.getHeight()))&&t<=c.dataCapacity))return c}}catch(t){i={error:t}}finally{try{u&&!u.done&&(a=s.return)&&a.call(s)}finally{if(i)throw i.error}}if(o)throw new Error("Can't find a symbol arrangement that matches the message. Data codewords: "+t);return null},t.prototype.getHorizontalDataRegions=function(){switch(this.dataRegions){case 1:return 1;case 2:case 4:return 2;case 16:return 4;case 36:return 6;default:throw new Error("Cannot handle this number of data regions")}},t.prototype.getVerticalDataRegions=function(){switch(this.dataRegions){case 1:case 2:return 1;case 4:return 2;case 16:return 4;case 36:return 6;default:throw new Error("Cannot handle this number of data regions")}},t.prototype.getSymbolDataWidth=function(){return this.getHorizontalDataRegions()*this.matrixWidth},t.prototype.getSymbolDataHeight=function(){return this.getVerticalDataRegions()*this.matrixHeight},t.prototype.getSymbolWidth=function(){return this.getSymbolDataWidth()+2*this.getHorizontalDataRegions()},t.prototype.getSymbolHeight=function(){return this.getSymbolDataHeight()+2*this.getVerticalDataRegions()},t.prototype.getCodewordCount=function(){return this.dataCapacity+this.errorCodewords},t.prototype.getInterleavedBlockCount=function(){return this.rsBlockData?this.dataCapacity/this.rsBlockData:1},t.prototype.getDataCapacity=function(){return this.dataCapacity},t.prototype.getErrorCodewords=function(){return this.errorCodewords},t.prototype.getDataLengthForInterleavedBlock=function(t){return this.rsBlockData},t.prototype.getErrorLengthForInterleavedBlock=function(t){return this.rsBlockError},t}(),Yd=function(t){function e(){return t.call(this,!1,1558,620,22,22,36,-1,62)||this}return Gd(e,t),e.prototype.getInterleavedBlockCount=function(){return 10},e.prototype.getDataLengthForInterleavedBlock=function(t){return t<=8?156:155},e}(Xd),Zd=[new Xd(!1,3,5,8,8,1),new Xd(!1,5,7,10,10,1),new Xd(!0,5,7,16,6,1),new Xd(!1,8,10,12,12,1),new Xd(!0,10,11,14,6,2),new Xd(!1,12,12,14,14,1),new Xd(!0,16,14,24,10,1),new Xd(!1,18,14,16,16,1),new Xd(!1,22,18,18,18,1),new Xd(!0,22,18,16,10,2),new Xd(!1,30,20,20,20,1),new Xd(!0,32,24,16,14,2),new Xd(!1,36,24,22,22,1),new Xd(!1,44,28,24,24,1),new Xd(!0,49,28,22,14,2),new Xd(!1,62,36,14,14,4),new Xd(!1,86,42,16,16,4),new Xd(!1,114,48,18,18,4),new Xd(!1,144,56,20,20,4),new Xd(!1,174,68,22,22,4),new Xd(!1,204,84,24,24,4,102,42),new Xd(!1,280,112,14,14,16,140,56),new Xd(!1,368,144,16,16,16,92,36),new Xd(!1,456,192,18,18,16,114,48),new Xd(!1,576,224,20,20,16,144,56),new Xd(!1,696,272,22,22,16,174,68),new Xd(!1,816,336,24,24,16,136,56),new Xd(!1,1050,408,18,18,36,175,68),new Xd(!1,1304,496,20,20,36,163,62),new Yd],qd=function(){function t(t){this.msg=t,this.pos=0,this.skipAtEnd=0;for(var e=t.split("").map((function(t){return t.charCodeAt(0)})),r=new Za,n=0,o=e.length;n<o;n++){var i=String.fromCharCode(255&e[n]);if("?"===i&&"?"!==t.charAt(n))throw new Error("Message contains characters outside ISO-8859-1 encoding.");r.append(i)}this.msg=r.toString(),this.shape=0,this.codewords=new Za,this.newEncoding=-1}return t.prototype.setSymbolShape=function(t){this.shape=t},t.prototype.setSizeConstraints=function(t,e){this.minSize=t,this.maxSize=e},t.prototype.getMessage=function(){return this.msg},t.prototype.setSkipAtEnd=function(t){this.skipAtEnd=t},t.prototype.getCurrentChar=function(){return this.msg.charCodeAt(this.pos)},t.prototype.getCurrent=function(){return this.msg.charCodeAt(this.pos)},t.prototype.getCodewords=function(){return this.codewords},t.prototype.writeCodewords=function(t){this.codewords.append(t)},t.prototype.writeCodeword=function(t){this.codewords.append(t)},t.prototype.getCodewordCount=function(){return this.codewords.length()},t.prototype.getNewEncoding=function(){return this.newEncoding},t.prototype.signalEncoderChange=function(t){this.newEncoding=t},t.prototype.resetEncoderSignal=function(){this.newEncoding=-1},t.prototype.hasMoreCharacters=function(){return this.pos<this.getTotalMessageCharCount()},t.prototype.getTotalMessageCharCount=function(){return this.msg.length-this.skipAtEnd},t.prototype.getRemainingCharacters=function(){return this.getTotalMessageCharCount()-this.pos},t.prototype.getSymbolInfo=function(){return this.symbolInfo},t.prototype.updateSymbolInfo=function(t){void 0===t&&(t=this.getCodewordCount()),(null==this.symbolInfo||t>this.symbolInfo.getDataCapacity())&&(this.symbolInfo=Xd.lookup(t,this.shape,this.minSize,this.maxSize,!0))},t.prototype.resetSymbolInfo=function(){this.symbolInfo=null},t}(),Kd=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),$d=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Kd(e,t),e.prototype.getEncodingMode=function(){return 3},e.prototype.encode=function(t){for(var e=new Za;t.hasMoreCharacters();){var r=t.getCurrentChar();if(t.pos++,this.encodeChar(r,e),e.length()%3==0)if(this.writeNextTriplet(t,e),eh.lookAheadTest(t.getMessage(),t.pos,this.getEncodingMode())!==this.getEncodingMode()){t.signalEncoderChange(0);break}}this.handleEOD(t,e)},e.prototype.encodeChar=function(t,e){switch(t){case 13:e.append(0);break;case"*".charCodeAt(0):e.append(1);break;case">".charCodeAt(0):e.append(2);break;case" ".charCodeAt(0):e.append(3);break;default:t>="0".charCodeAt(0)&&t<="9".charCodeAt(0)?e.append(t-48+4):t>="A".charCodeAt(0)&&t<="Z".charCodeAt(0)?e.append(t-65+14):eh.illegalCharacter(Ya.getCharAt(t))}return 1},e.prototype.handleEOD=function(t,e){t.updateSymbolInfo();var r=t.getSymbolInfo().getDataCapacity()-t.getCodewordCount(),n=e.length();t.pos-=n,(t.getRemainingCharacters()>1||r>1||t.getRemainingCharacters()!==r)&&t.writeCodeword(254),t.getNewEncoding()<0&&t.signalEncoderChange(0)},e}(Hd),Jd=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Qd=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Jd(e,t),e.prototype.getEncodingMode=function(){return 2},e.prototype.encodeChar=function(t,e){if(t===" ".charCodeAt(0))return e.append(3),1;if(t>="0".charCodeAt(0)&&t<="9".charCodeAt(0))return e.append(t-48+4),1;if(t>="a".charCodeAt(0)&&t<="z".charCodeAt(0))return e.append(t-97+14),1;if(t<" ".charCodeAt(0))return e.append(0),e.append(t),2;if(t<="/".charCodeAt(0))return e.append(1),e.append(t-33),2;if(t<="@".charCodeAt(0))return e.append(1),e.append(t-58+15),2;if(t>="[".charCodeAt(0)&&t<="_".charCodeAt(0))return e.append(1),e.append(t-91+22),2;if(t==="`".charCodeAt(0))return e.append(2),e.append(0),2;if(t<="Z".charCodeAt(0))return e.append(2),e.append(t-65+1),2;if(t<=127)return e.append(2),e.append(t-123+27),2;e.append("1");var r=2;return r+=this.encodeChar(t-128,e)},e}(Hd),th=function(){function t(){}return t.randomize253State=function(t){var e=129+(149*t%253+1);return e<=254?e:e-254},t.encodeHighLevel=function(t,e,r,n,o){void 0===e&&(e=0),void 0===r&&(r=null),void 0===n&&(n=null),void 0===o&&(o=!1);var i=new Hd,a=[new Ud,i,new Qd,new $d,new jd,new Vd],s=new qd(t);s.setSymbolShape(e),s.setSizeConstraints(r,n),t.startsWith(Ld)&&t.endsWith("")?(s.writeCodeword(236),s.setSkipAtEnd(2),s.pos+=7):t.startsWith(zd)&&t.endsWith("")&&(s.writeCodeword(237),s.setSkipAtEnd(2),s.pos+=7);var u=0;for(o&&(i.encodeMaximal(s),u=s.getNewEncoding(),s.resetEncoderSignal());s.hasMoreCharacters();)a[u].encode(s),s.getNewEncoding()>=0&&(u=s.getNewEncoding(),s.resetEncoderSignal());var c=s.getCodewordCount();s.updateSymbolInfo();var l=s.getSymbolInfo().getDataCapacity();c<l&&0!==u&&5!==u&&4!==u&&s.writeCodeword("þ");var d=s.getCodewords();for(d.length()<l&&d.append(129);d.length()<l;)d.append(this.randomize253State(d.length()+1));return s.getCodewords().toString()},t.lookAheadTest=function(t,e,r){var n=this.lookAheadTestIntern(t,e,r);if(3===r&&3===n){for(var o=Math.min(e+3,t.length),i=e;i<o;i++)if(!this.isNativeX12(t.charCodeAt(i)))return 0}else if(4===r&&4===n)for(o=Math.min(e+4,t.length),i=e;i<o;i++)if(!this.isNativeEDIFACT(t.charCodeAt(i)))return 0;return n},t.lookAheadTestIntern=function(t,e,r){if(e>=t.length)return r;var n;0===r?n=[0,1,1,1,1,1.25]:(n=[1,2,2,2,2,2.25])[r]=0;for(var o=0,i=new Uint8Array(6),a=[];;){if(e+o===t.length){xa.fill(i,0),xa.fill(a,0);var s=this.findMinimums(n,a,Pa.MAX_VALUE,i),u=this.getMinimumCount(i);if(a[0]===s)return 0;if(1===u){if(i[5]>0)return 5;if(i[4]>0)return 4;if(i[2]>0)return 2;if(i[3]>0)return 3}return 1}var c=t.charCodeAt(e+o);if(o++,this.isDigit(c)?n[0]+=.5:this.isExtendedASCII(c)?(n[0]=Math.ceil(n[0]),n[0]+=2):(n[0]=Math.ceil(n[0]),n[0]++),this.isNativeC40(c)?n[1]+=2/3:this.isExtendedASCII(c)?n[1]+=8/3:n[1]+=4/3,this.isNativeText(c)?n[2]+=2/3:this.isExtendedASCII(c)?n[2]+=8/3:n[2]+=4/3,this.isNativeX12(c)?n[3]+=2/3:this.isExtendedASCII(c)?n[3]+=13/3:n[3]+=10/3,this.isNativeEDIFACT(c)?n[4]+=3/4:this.isExtendedASCII(c)?n[4]+=4.25:n[4]+=3.25,this.isSpecialB256(c)?n[5]+=4:n[5]++,o>=4){if(xa.fill(i,0),xa.fill(a,0),this.findMinimums(n,a,Pa.MAX_VALUE,i),a[0]<this.min(a[5],a[1],a[2],a[3],a[4]))return 0;if(a[5]<a[0]||a[5]+1<this.min(a[1],a[2],a[3],a[4]))return 5;if(a[4]+1<this.min(a[5],a[1],a[2],a[3],a[0]))return 4;if(a[2]+1<this.min(a[5],a[1],a[4],a[3],a[0]))return 2;if(a[3]+1<this.min(a[5],a[1],a[4],a[2],a[0]))return 3;if(a[1]+1<this.min(a[0],a[5],a[4],a[2])){if(a[1]<a[3])return 1;if(a[1]===a[3]){for(var l=e+o+1;l<t.length;){var d=t.charCodeAt(l);if(this.isX12TermSep(d))return 3;if(!this.isNativeX12(d))break;l++}return 1}}}}},t.min=function(t,e,r,n,o){var i=Math.min(t,Math.min(e,Math.min(r,n)));return void 0===o?i:Math.min(i,o)},t.findMinimums=function(t,e,r,n){for(var o=0;o<6;o++){var i=e[o]=Math.ceil(t[o]);r>i&&(r=i,xa.fill(n,0)),r===i&&(n[o]=n[o]+1)}return r},t.getMinimumCount=function(t){for(var e=0,r=0;r<6;r++)e+=t[r];return e||0},t.isDigit=function(t){return t>="0".charCodeAt(0)&&t<="9".charCodeAt(0)},t.isExtendedASCII=function(t){return t>=128&&t<=255},t.isNativeC40=function(t){return t===" ".charCodeAt(0)||t>="0".charCodeAt(0)&&t<="9".charCodeAt(0)||t>="A".charCodeAt(0)&&t<="Z".charCodeAt(0)},t.isNativeText=function(t){return t===" ".charCodeAt(0)||t>="0".charCodeAt(0)&&t<="9".charCodeAt(0)||t>="a".charCodeAt(0)&&t<="z".charCodeAt(0)},t.isNativeX12=function(t){return this.isX12TermSep(t)||t===" ".charCodeAt(0)||t>="0".charCodeAt(0)&&t<="9".charCodeAt(0)||t>="A".charCodeAt(0)&&t<="Z".charCodeAt(0)},t.isX12TermSep=function(t){return 13===t||t==="*".charCodeAt(0)||t===">".charCodeAt(0)},t.isNativeEDIFACT=function(t){return t>=" ".charCodeAt(0)&&t<="^".charCodeAt(0)},t.isSpecialB256=function(t){return!1},t.determineConsecutiveDigitCount=function(t,e){void 0===e&&(e=0);for(var r=t.length,n=e;n<r&&this.isDigit(t.charCodeAt(n));)n++;return n-e},t.illegalCharacter=function(t){var e=Pa.toHexString(t.charCodeAt(0));throw e="0000".substring(0,4-e.length)+e,new Error("Illegal character: "+t+" (0x"+e+")")},t}(),eh=th,rh=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},nh=function(){function t(t){this.charset=t,this.name=t.name}return t.prototype.canEncode=function(t){try{return null!=Xa.encode(t,this.charset)}catch(t){return!1}},t}(),oh=function(){function t(t,e,r){var n,o,i,a,s,u;this.ENCODERS=["IBM437","ISO-8859-2","ISO-8859-3","ISO-8859-4","ISO-8859-5","ISO-8859-6","ISO-8859-7","ISO-8859-8","ISO-8859-9","ISO-8859-10","ISO-8859-11","ISO-8859-13","ISO-8859-14","ISO-8859-15","ISO-8859-16","windows-1250","windows-1251","windows-1252","windows-1256","Shift_JIS"].map((function(t){return new nh(Pd.forName(t))})),this.encoders=[];var c=[];c.push(new nh(Bd.ISO_8859_1));for(var l=null!=e&&e.name.startsWith("UTF"),d=0;d<t.length;d++){var h=!1;try{for(var f=(n=void 0,rh(c)),p=f.next();!p.done;p=f.next()){var g=p.value,m=t.charAt(d);if(m.charCodeAt(0)===r||g.canEncode(m)){h=!0;break}}}catch(t){n={error:t}}finally{try{p&&!p.done&&(o=f.return)&&o.call(f)}finally{if(n)throw n.error}}if(!h)try{for(var y=(i=void 0,rh(this.ENCODERS)),w=y.next();!w.done;w=y.next()){if((g=w.value).canEncode(t.charAt(d))){c.push(g),h=!0;break}}}catch(t){i={error:t}}finally{try{w&&!w.done&&(a=y.return)&&a.call(y)}finally{if(i)throw i.error}}h||(l=!0)}if(1!==c.length||l){this.encoders=[];var _=0;try{for(var v=rh(c),E=v.next();!E.done;E=v.next()){g=E.value;this.encoders[_++]=g}}catch(t){s={error:t}}finally{try{E&&!E.done&&(u=v.return)&&u.call(v)}finally{if(s)throw s.error}}}else this.encoders=[c[0]];var b=-1;if(null!=e)for(d=0;d<this.encoders.length;d++)if(null!=this.encoders[d]&&e.name===this.encoders[d].name){b=d;break}this.priorityEncoderIndex=b}return t.prototype.length=function(){return this.encoders.length},t.prototype.getCharsetName=function(t){if(!(t<this.length()))throw new Error("index must be less than length");return this.encoders[t].name},t.prototype.getCharset=function(t){if(!(t<this.length()))throw new Error("index must be less than length");return this.encoders[t].charset},t.prototype.getECIValue=function(t){return this.encoders[t].charset.getValueIdentifier()},t.prototype.getPriorityEncoderIndex=function(){return this.priorityEncoderIndex},t.prototype.canEncode=function(t,e){if(!(e<this.length()))throw new Error("index must be less than length");return!0},t.prototype.encode=function(t,e){if(!(e<this.length()))throw new Error("index must be less than length");return Xa.encode(Ya.getCharAt(t),this.encoders[e].name)},t}(),ih=function(){function t(t,e,r){this.fnc1=r;var n=new oh(t,e,r);if(1===n.length())for(var o=0;o<this.bytes.length;o++){var i=t.charAt(o).charCodeAt(0);this.bytes[o]=i===r?1e3:i}else this.bytes=this.encodeMinimally(t,n,r)}return t.prototype.getFNC1Character=function(){return this.fnc1},t.prototype.length=function(){return this.bytes.length},t.prototype.haveNCharacters=function(t,e){if(t+e-1>=this.bytes.length)return!1;for(var r=0;r<e;r++)if(this.isECI(t+r))return!1;return!0},t.prototype.charAt=function(t){if(t<0||t>=this.length())throw new Error(""+t);if(this.isECI(t))throw new Error("value at "+t+" is not a character but an ECI");return this.isFNC1(t)?this.fnc1:this.bytes[t]},t.prototype.subSequence=function(t,e){if(t<0||t>e||e>this.length())throw new Error(""+t);for(var r=new Za,n=t;n<e;n++){if(this.isECI(n))throw new Error("value at "+n+" is not a character but an ECI");r.append(this.charAt(n))}return r.toString()},t.prototype.isECI=function(t){if(t<0||t>=this.length())throw new Error(""+t);return this.bytes[t]>255&&this.bytes[t]<=999},t.prototype.isFNC1=function(t){if(t<0||t>=this.length())throw new Error(""+t);return 1e3===this.bytes[t]},t.prototype.getECIValue=function(t){if(t<0||t>=this.length())throw new Error(""+t);if(!this.isECI(t))throw new Error("value at "+t+" is not an ECI but a character");return this.bytes[t]-256},t.prototype.addEdge=function(t,e,r){(null==t[e][r.encoderIndex]||t[e][r.encoderIndex].cachedTotalSize>r.cachedTotalSize)&&(t[e][r.encoderIndex]=r)},t.prototype.addEdges=function(t,e,r,n,o,i){var a=t.charAt(n).charCodeAt(0),s=0,u=e.length();e.getPriorityEncoderIndex()>=0&&(a===i||e.canEncode(a,e.getPriorityEncoderIndex()))&&(u=(s=e.getPriorityEncoderIndex())+1);for(var c=s;c<u;c++)(a===i||e.canEncode(a,c))&&this.addEdge(r,n+1,new ah(a,e,c,o,i))},t.prototype.encodeMinimally=function(t,e,r){var n=t.length,o=new(ah[n+1][e.length()]);this.addEdges(t,e,o,0,null,r);for(var i=1;i<=n;i++){for(var a=0;a<e.length();a++)null!=o[i][a]&&i<n&&this.addEdges(t,e,o,i,o[i][a],r);for(a=0;a<e.length();a++)o[i-1][a]=null}var s=-1,u=Pa.MAX_VALUE;for(a=0;a<e.length();a++)if(null!=o[n][a]){var c=o[n][a];c.cachedTotalSize<u&&(u=c.cachedTotalSize,s=a)}if(s<0)throw new Error('Failed to encode "'+t+'"');for(var l=[],d=o[n][s];null!=d;){if(d.isFNC1())l.unshift(1e3);else{var h=e.encode(d.c,d.encoderIndex);for(i=h.length-1;i>=0;i--)l.unshift(255&h[i])}(null===d.previous?0:d.previous.encoderIndex)!==d.encoderIndex&&l.unshift(256+e.getECIValue(d.encoderIndex)),d=d.previous}var f=[];for(i=0;i<f.length;i++)f[i]=l[i];return f},t}(),ah=function(){function t(t,e,r,n,o){this.c=t,this.encoderSet=e,this.encoderIndex=r,this.previous=n,this.fnc1=o,this.c=t===o?1e3:t;var i=this.isFNC1()?1:e.encode(t,r).length;(null===n?0:n.encoderIndex)!==r&&(i+=3),null!=n&&(i+=n.cachedTotalSize),this.cachedTotalSize=i}return t.prototype.isFNC1=function(){return 1e3===this.c},t}(),sh=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){t[t.ASCII=0]="ASCII",t[t.C40=1]="C40",t[t.TEXT=2]="TEXT",t[t.X12=3]="X12",t[t.EDF=4]="EDF",t[t.B256=5]="B256"}(Fd||(Fd={})),function(t){function e(e,r,n,o,i){var a=t.call(this,e,r,n)||this;return a.shape=o,a.macroId=i,a}sh(e,t),e.prototype.getMacroId=function(){return this.macroId},e.prototype.getShapeHint=function(){return this.shape}}(ih);var uh=function(){function t(t){this.previous=t}return t.prototype.getPrevious=function(){return this.previous},t}(),ch=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),lh=function(t){function e(e,r,n){var o=t.call(this,e)||this;return o.value=r,o.bitCount=n,o}return ch(e,t),e.prototype.appendTo=function(t,e){t.appendBits(this.value,this.bitCount)},e.prototype.add=function(t,r){return new e(this,t,r)},e.prototype.addBinaryShift=function(t,r){return console.warn("addBinaryShift on SimpleToken, this simply returns a copy of this token"),new e(this,t,r)},e.prototype.toString=function(){var t=this.value&(1<<this.bitCount)-1;return t|=1<<this.bitCount,"<"+Pa.toBinaryString(t|1<<this.bitCount).substring(1)+">"},e}(uh),dh=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){function e(e,r,n){var o=t.call(this,e,0,0)||this;return o.binaryShiftStart=r,o.binaryShiftByteCount=n,o}dh(e,t),e.prototype.appendTo=function(t,e){for(var r=0;r<this.binaryShiftByteCount;r++)(0===r||31===r&&this.binaryShiftByteCount<=62)&&(t.appendBits(31,5),this.binaryShiftByteCount>62?t.appendBits(this.binaryShiftByteCount-31,16):0===r?t.appendBits(Math.min(this.binaryShiftByteCount,31),5):t.appendBits(this.binaryShiftByteCount-31,5)),t.appendBits(e[this.binaryShiftStart+r],8)},e.prototype.addBinaryShift=function(t,r){return new e(this,t,r)},e.prototype.toString=function(){return"<"+this.binaryShiftStart+"::"+(this.binaryShiftStart+this.binaryShiftByteCount-1)+">"}}(lh);new lh(null,0,0);var hh=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};!function(t){var e,r;try{for(var n=hh(t),o=n.next();!o.done;o=n.next()){var i=o.value;xa.fill(i,-1)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}t[0][4]=0,t[1][4]=0,t[1][0]=28,t[3][4]=0,t[2][4]=0,t[2][0]=15}(xa.createInt32Array(6,6)),function(t){var e=Ya.getCharCode(" "),r=Ya.getCharCode("."),n=Ya.getCharCode(",");t[0][e]=1;for(var o=Ya.getCharCode("Z"),i=Ya.getCharCode("A"),a=i;a<=o;a++)t[0][a]=a-i+2;t[1][e]=1;var s=Ya.getCharCode("z"),u=Ya.getCharCode("a");for(a=u;a<=s;a++)t[1][a]=a-u+2;t[2][e]=1;var c=Ya.getCharCode("9"),l=Ya.getCharCode("0");for(a=l;a<=c;a++)t[2][a]=a-l+2;t[2][n]=12,t[2][r]=13;for(var d=["\0"," ","","","","","","","","\b","\t","\n","\v","\f","\r","","","","","","@","\\","^","_","`","|","~",""],h=0;h<d.length;h++)t[3][Ya.getCharCode(d[h])]=h;var f=["\0","\r","\0","\0","\0","\0","!","'","#","$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","?","[","]","{","}"];for(h=0;h<f.length;h++)Ya.getCharCode(f[h])>0&&(t[4][Ya.getCharCode(f[h])]=h)}(xa.createInt32Array(5,256));var fh=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),ph=function(t){function e(r){var n=t.call(this,r.width,r.height)||this;return n.canvas=r,n.tempCanvasElement=null,n.buffer=e.makeBufferFromCanvasImageData(r),n}return fh(e,t),e.makeBufferFromCanvasImageData=function(t){var r;try{r=t.getContext("2d",{willReadFrequently:!0})}catch(e){r=t.getContext("2d")}if(!r)throw new Error("Couldn't get canvas context.");var n=r.getImageData(0,0,t.width,t.height);return e.toGrayscaleBuffer(n.data,t.width,t.height)},e.toGrayscaleBuffer=function(t,e,r){for(var n=new Uint8ClampedArray(e*r),o=0,i=0,a=t.length;o<a;o+=4,i++){var s=void 0;if(0===t[o+3])s=255;else s=306*t[o]+601*t[o+1]+117*t[o+2]+512>>10;n[i]=s}return n},e.prototype.getRow=function(t,e){if(t<0||t>=this.getHeight())throw new Aa("Requested row is outside the image: "+t);var r=this.getWidth(),n=t*r;return null===e?e=this.buffer.slice(n,n+r):(e.length<r&&(e=new Uint8ClampedArray(r)),e.set(this.buffer.slice(n,n+r))),e},e.prototype.getMatrix=function(){return this.buffer},e.prototype.isCropSupported=function(){return!0},e.prototype.crop=function(e,r,n,o){return t.prototype.crop.call(this,e,r,n,o),this},e.prototype.isRotateSupported=function(){return!0},e.prototype.rotateCounterClockwise=function(){return this.rotate(-90),this},e.prototype.rotateCounterClockwise45=function(){return this.rotate(-45),this},e.prototype.invert=function(){return new os(this)},e.prototype.getTempCanvasElement=function(){if(null===this.tempCanvasElement){var t=this.canvas.ownerDocument.createElement("canvas");t.width=this.canvas.width,t.height=this.canvas.height,this.tempCanvasElement=t}return this.tempCanvasElement},e.prototype.rotate=function(t){var r=this.getTempCanvasElement();if(!r)throw new Error("Could not create a Canvas element.");var n=t*e.DEGREE_TO_RADIANS,o=this.canvas.width,i=this.canvas.height,a=Math.ceil(Math.abs(Math.cos(n))*o+Math.abs(Math.sin(n))*i),s=Math.ceil(Math.abs(Math.sin(n))*o+Math.abs(Math.cos(n))*i);r.width=a,r.height=s;var u=r.getContext("2d");if(!u)throw new Error("Could not create a Canvas Context element.");return u.translate(a/2,s/2),u.rotate(n),u.drawImage(this.canvas,o/-2,i/-2),this.buffer=e.makeBufferFromCanvasImageData(r),this},e.DEGREE_TO_RADIANS=Math.PI/180,e}(rs);function gh(){return"undefined"!=typeof navigator}function mh(){return!!(gh()&&navigator.mediaDevices&&navigator.mediaDevices.enumerateDevices)}var yh=function(){return yh=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},yh.apply(this,arguments)},wh=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{u(n.next(t))}catch(t){i(t)}}function s(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))},_h=function(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},vh=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Eh={delayBetweenScanAttempts:500,delayBetweenScanSuccess:500,tryPlayVideoTimeout:5e3},bh=function(){function t(t,e,r){void 0===e&&(e=new Map),void 0===r&&(r={}),this.reader=t,this.hints=e,this.options=yh(yh({},Eh),r)}return Object.defineProperty(t.prototype,"possibleFormats",{set:function(t){this.hints.set(La.POSSIBLE_FORMATS,t)},enumerable:!1,configurable:!0}),t.addVideoSource=function(t,e){try{t.srcObject=e}catch(t){console.error("got interrupted by new loading request")}},t.mediaStreamSetTorch=function(t,e){return wh(this,void 0,void 0,(function(){return _h(this,(function(r){switch(r.label){case 0:return[4,t.applyConstraints({advanced:[{fillLightMode:e?"flash":"off",torch:!!e}]})];case 1:return r.sent(),[2]}}))}))},t.mediaStreamIsTorchCompatible=function(e){var r,n,o=e.getVideoTracks();try{for(var i=vh(o),a=i.next();!a.done;a=i.next()){var s=a.value;if(t.mediaStreamIsTorchCompatibleTrack(s))return!0}}catch(t){r={error:t}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return!1},t.mediaStreamIsTorchCompatibleTrack=function(t){try{return"torch"in t.getCapabilities()}catch(t){return console.error(t),console.warn("Your browser may be not fully compatible with WebRTC and/or ImageCapture specs. Torch will not be available."),!1}},t.isVideoPlaying=function(t){return t.currentTime>0&&!t.paused&&t.readyState>2},t.getMediaElement=function(t,e){var r=document.getElementById(t);if(!r)throw new Ea("element with id '".concat(t,"' not found"));if(r.nodeName.toLowerCase()!==e.toLowerCase())throw new Ea("element with id '".concat(t,"' must be an ").concat(e," element"));return r},t.createVideoElement=function(e){if(e instanceof HTMLVideoElement)return e;if("string"==typeof e)return t.getMediaElement(e,"video");if(!e&&"undefined"!=typeof document){var r=document.createElement("video");return r.width=200,r.height=200,r}throw new Error("Couldn't get videoElement from videoSource!")},t.prepareImageElement=function(e){if(e instanceof HTMLImageElement)return e;if("string"==typeof e)return t.getMediaElement(e,"img");if(void 0===e){var r=document.createElement("img");return r.width=200,r.height=200,r}throw new Error("Couldn't get imageElement from imageSource!")},t.prepareVideoElement=function(e){var r=t.createVideoElement(e);return r.setAttribute("autoplay","true"),r.setAttribute("muted","true"),r.setAttribute("playsinline","true"),r},t.isImageLoaded=function(t){return!!t.complete&&0!==t.naturalWidth},t.createBinaryBitmapFromCanvas=function(t){var e=new ph(t),r=new es(e);return new Ca(r)},t.drawImageOnCanvas=function(t,e){t.drawImage(e,0,0)},t.getMediaElementDimensions=function(t){if(t instanceof HTMLVideoElement)return{height:t.videoHeight,width:t.videoWidth};if(t instanceof HTMLImageElement)return{height:t.naturalHeight||t.height,width:t.naturalWidth||t.width};throw new Error("Couldn't find the Source's dimensions!")},t.createCaptureCanvas=function(e){if(!e)throw new Ea("Cannot create a capture canvas without a media element.");if("undefined"==typeof document)throw new Error('The page "Document" is undefined, make sure you\'re running in a browser.');var r=document.createElement("canvas"),n=t.getMediaElementDimensions(e),o=n.width,i=n.height;return r.style.width=o+"px",r.style.height=i+"px",r.width=o,r.height=i,r},t.tryPlayVideo=function(e){return wh(this,void 0,void 0,(function(){var r;return _h(this,(function(n){switch(n.label){case 0:if(null==e?void 0:e.ended)return console.error("Trying to play video that has ended."),[2,!1];if(t.isVideoPlaying(e))return console.warn("Trying to play video that is already playing."),[2,!0];n.label=1;case 1:return n.trys.push([1,3,,4]),[4,e.play()];case 2:return n.sent(),[2,!0];case 3:return r=n.sent(),console.warn("It was not possible to play the video.",r),[2,!1];case 4:return[2]}}))}))},t.createCanvasFromMediaElement=function(e){var r=t.createCaptureCanvas(e),n=r.getContext("2d");if(!n)throw new Error("Couldn't find Canvas 2D Context.");return t.drawImageOnCanvas(n,e),r},t.createBinaryBitmapFromMediaElem=function(e){var r=t.createCanvasFromMediaElement(e);return t.createBinaryBitmapFromCanvas(r)},t.destroyImageElement=function(t){t.src="",t.removeAttribute("src"),t=void 0},t.listVideoInputDevices=function(){return wh(this,void 0,void 0,(function(){var t,e,r,n,o,i,a,s,u,c,l,d;return _h(this,(function(h){switch(h.label){case 0:if(!gh())throw new Error("Can't enumerate devices, navigator is not present.");if(!mh())throw new Error("Can't enumerate devices, method not supported.");return[4,navigator.mediaDevices.enumerateDevices()];case 1:t=h.sent(),e=[];try{for(r=vh(t),n=r.next();!n.done;n=r.next())o=n.value,"videoinput"===(i="video"===o.kind?"videoinput":o.kind)&&(a=o.deviceId||o.id,s=o.label||"Video device ".concat(e.length+1),u=o.groupId,c={deviceId:a,label:s,kind:i,groupId:u},e.push(c))}catch(t){l={error:t}}finally{try{n&&!n.done&&(d=r.return)&&d.call(r)}finally{if(l)throw l.error}}return[2,e]}}))}))},t.findDeviceById=function(e){return wh(this,void 0,void 0,(function(){var r;return _h(this,(function(n){switch(n.label){case 0:return[4,t.listVideoInputDevices()];case 1:return(r=n.sent())?[2,r.find((function(t){return t.deviceId===e}))]:[2]}}))}))},t.cleanVideoSource=function(t){if(t){try{t.srcObject=null}catch(e){t.src=""}t&&t.removeAttribute("src")}},t.releaseAllStreams=function(){0!==t.streamTracker.length&&t.streamTracker.forEach((function(t){t.getTracks().forEach((function(t){return t.stop()}))})),t.streamTracker=[]},t.playVideoOnLoadAsync=function(e,r){return wh(this,void 0,void 0,(function(){return _h(this,(function(n){switch(n.label){case 0:return[4,t.tryPlayVideo(e)];case 1:return n.sent()?[2,!0]:[2,new Promise((function(n,o){var i=setTimeout((function(){t.isVideoPlaying(e)||(o(!1),e.removeEventListener("canplay",a))}),r),a=function(){t.tryPlayVideo(e).then((function(t){clearTimeout(i),e.removeEventListener("canplay",a),n(t)}))};e.addEventListener("canplay",a)}))]}}))}))},t.attachStreamToVideo=function(e,r,n){return void 0===n&&(n=5e3),wh(this,void 0,void 0,(function(){var o;return _h(this,(function(i){switch(i.label){case 0:return o=t.prepareVideoElement(r),t.addVideoSource(o,e),[4,t.playVideoOnLoadAsync(o,n)];case 1:return i.sent(),[2,o]}}))}))},t._waitImageLoad=function(e){return new Promise((function(r,n){var o=setTimeout((function(){t.isImageLoaded(e)||(e.removeEventListener("load",i),n())}),1e4),i=function(){clearTimeout(o),e.removeEventListener("load",i),r()};e.addEventListener("load",i)}))},t.checkCallbackFnOrThrow=function(t){if(!t)throw new Ea("`callbackFn` is a required parameter, you cannot capture results without it.")},t.disposeMediaStream=function(t){t.getVideoTracks().forEach((function(t){return t.stop()})),t=void 0},t.prototype.decode=function(e){var r=t.createCanvasFromMediaElement(e);return this.decodeFromCanvas(r)},t.prototype.decodeBitmap=function(t){return this.reader.decode(t,this.hints)},t.prototype.decodeFromCanvas=function(e){var r=t.createBinaryBitmapFromCanvas(e);return this.decodeBitmap(r)},t.prototype.decodeFromImageElement=function(e){return wh(this,void 0,void 0,(function(){var r;return _h(this,(function(n){switch(n.label){case 0:if(!e)throw new Ea("An image element must be provided.");return r=t.prepareImageElement(e),[4,this._decodeOnLoadImage(r)];case 1:return[2,n.sent()]}}))}))},t.prototype.decodeFromImageUrl=function(e){return wh(this,void 0,void 0,(function(){var r;return _h(this,(function(n){switch(n.label){case 0:if(!e)throw new Ea("An URL must be provided.");(r=t.prepareImageElement()).src=e,n.label=1;case 1:return n.trys.push([1,,3,4]),[4,this.decodeFromImageElement(r)];case 2:return[2,n.sent()];case 3:return t.destroyImageElement(r),[7];case 4:return[2]}}))}))},t.prototype.decodeFromConstraints=function(e,r,n){return wh(this,void 0,void 0,(function(){var o,i;return _h(this,(function(a){switch(a.label){case 0:return t.checkCallbackFnOrThrow(n),[4,this.getUserMedia(e)];case 1:o=a.sent(),a.label=2;case 2:return a.trys.push([2,4,,5]),[4,this.decodeFromStream(o,r,n)];case 3:return[2,a.sent()];case 4:throw i=a.sent(),t.disposeMediaStream(o),i;case 5:return[2]}}))}))},t.prototype.decodeFromStream=function(e,r,n){return wh(this,void 0,void 0,(function(){var o,i,a,s,u,c,l,d,h=this;return _h(this,(function(f){switch(f.label){case 0:return t.checkCallbackFnOrThrow(n),o=this.options.tryPlayVideoTimeout,[4,t.attachStreamToVideo(e,r,o)];case 1:return i=f.sent(),a=function(){t.disposeMediaStream(e),t.cleanVideoSource(i)},s=this.scan(i,n,a),u=e.getVideoTracks(),c=yh(yh({},s),{stop:function(){s.stop()},streamVideoConstraintsApply:function(t,e){return wh(this,void 0,void 0,(function(){var r,n,o,i,a,s;return _h(this,(function(c){switch(c.label){case 0:r=e?u.filter(e):u,c.label=1;case 1:c.trys.push([1,6,7,8]),n=vh(r),o=n.next(),c.label=2;case 2:return o.done?[3,5]:[4,o.value.applyConstraints(t)];case 3:c.sent(),c.label=4;case 4:return o=n.next(),[3,2];case 5:return[3,8];case 6:return i=c.sent(),a={error:i},[3,8];case 7:try{o&&!o.done&&(s=n.return)&&s.call(n)}finally{if(a)throw a.error}return[7];case 8:return[2]}}))}))},streamVideoConstraintsGet:function(t){return u.find(t).getConstraints()},streamVideoSettingsGet:function(t){return u.find(t).getSettings()},streamVideoCapabilitiesGet:function(t){return u.find(t).getCapabilities()}}),t.mediaStreamIsTorchCompatible(e)&&(l=null==u?void 0:u.find((function(e){return t.mediaStreamIsTorchCompatibleTrack(e)})),d=function(e){return wh(h,void 0,void 0,(function(){return _h(this,(function(r){switch(r.label){case 0:return[4,t.mediaStreamSetTorch(l,e)];case 1:return r.sent(),[2]}}))}))},c.switchTorch=d,c.stop=function(){return wh(h,void 0,void 0,(function(){return _h(this,(function(t){switch(t.label){case 0:return s.stop(),[4,d(!1)];case 1:return t.sent(),[2]}}))}))}),[2,c]}}))}))},t.prototype.decodeFromVideoDevice=function(e,r,n){return wh(this,void 0,void 0,(function(){var o;return _h(this,(function(i){switch(i.label){case 0:return t.checkCallbackFnOrThrow(n),o={video:e?{deviceId:{exact:e}}:{facingMode:"environment"}},[4,this.decodeFromConstraints(o,r,n)];case 1:return[2,i.sent()]}}))}))},t.prototype.decodeFromVideoElement=function(e,r){return wh(this,void 0,void 0,(function(){var n,o;return _h(this,(function(i){switch(i.label){case 0:if(t.checkCallbackFnOrThrow(r),!e)throw new Ea("A video element must be provided.");return n=t.prepareVideoElement(e),o=this.options.tryPlayVideoTimeout,[4,t.playVideoOnLoadAsync(n,o)];case 1:return i.sent(),[2,this.scan(n,r)]}}))}))},t.prototype.decodeFromVideoUrl=function(e,r){return wh(this,void 0,void 0,(function(){var n,o,i;return _h(this,(function(a){switch(a.label){case 0:if(t.checkCallbackFnOrThrow(r),!e)throw new Ea("An URL must be provided.");return(n=t.prepareVideoElement()).src=e,o=function(){t.cleanVideoSource(n)},i=this.options.tryPlayVideoTimeout,[4,t.playVideoOnLoadAsync(n,i)];case 1:return a.sent(),[2,this.scan(n,r,o)]}}))}))},t.prototype.decodeOnceFromConstraints=function(t,e){return wh(this,void 0,void 0,(function(){var r;return _h(this,(function(n){switch(n.label){case 0:return[4,this.getUserMedia(t)];case 1:return r=n.sent(),[4,this.decodeOnceFromStream(r,e)];case 2:return[2,n.sent()]}}))}))},t.prototype.decodeOnceFromStream=function(e,r){return wh(this,void 0,void 0,(function(){var n,o;return _h(this,(function(i){switch(i.label){case 0:return n=Boolean(r),[4,t.attachStreamToVideo(e,r)];case 1:o=i.sent(),i.label=2;case 2:return i.trys.push([2,,4,5]),[4,this.scanOneResult(o)];case 3:return[2,i.sent()];case 4:return n||t.cleanVideoSource(o),[7];case 5:return[2]}}))}))},t.prototype.decodeOnceFromVideoDevice=function(t,e){return wh(this,void 0,void 0,(function(){var r;return _h(this,(function(n){switch(n.label){case 0:return r={video:t?{deviceId:{exact:t}}:{facingMode:"environment"}},[4,this.decodeOnceFromConstraints(r,e)];case 1:return[2,n.sent()]}}))}))},t.prototype.decodeOnceFromVideoElement=function(e){return wh(this,void 0,void 0,(function(){var r,n;return _h(this,(function(o){switch(o.label){case 0:if(!e)throw new Ea("A video element must be provided.");return r=t.prepareVideoElement(e),n=this.options.tryPlayVideoTimeout,[4,t.playVideoOnLoadAsync(r,n)];case 1:return o.sent(),[4,this.scanOneResult(r)];case 2:return[2,o.sent()]}}))}))},t.prototype.decodeOnceFromVideoUrl=function(e){return wh(this,void 0,void 0,(function(){var r,n;return _h(this,(function(o){switch(o.label){case 0:if(!e)throw new Ea("An URL must be provided.");(r=t.prepareVideoElement()).src=e,n=this.decodeOnceFromVideoElement(r),o.label=1;case 1:return o.trys.push([1,,3,4]),[4,n];case 2:return[2,o.sent()];case 3:return t.cleanVideoSource(r),[7];case 4:return[2]}}))}))},t.prototype.scanOneResult=function(t,e,r,n){var o=this;return void 0===e&&(e=!0),void 0===r&&(r=!0),void 0===n&&(n=!0),new Promise((function(i,a){o.scan(t,(function(t,o,s){if(t)return i(t),void s.stop();if(o){if(o instanceof $a&&e)return;if(o instanceof Sa&&r)return;if(o instanceof Ua&&n)return;s.stop(),a(o)}}))}))},t.prototype.scan=function(e,r,n){var o=this;t.checkCallbackFnOrThrow(r);var i,a=t.createCaptureCanvas(e);try{i=a.getContext("2d",{willReadFrequently:!0})}catch(t){i=a.getContext("2d")}if(!i)throw new Error("Couldn't create canvas for visual element scan.");var s,u=function(){i=void 0,a=void 0},c=!1,l={stop:function(){c=!0,clearTimeout(s),u(),n&&n()}},d=function(){if(!c)try{t.drawImageOnCanvas(i,e);var h=o.decodeFromCanvas(a);r(h,void 0,l),s=setTimeout(d,o.options.delayBetweenScanSuccess)}catch(t){if(r(void 0,t,l),t instanceof Sa||t instanceof Ua||t instanceof $a)return void(s=setTimeout(d,o.options.delayBetweenScanAttempts));u(),n&&n(t)}};return d(),l},t.prototype._decodeOnLoadImage=function(e){return wh(this,void 0,void 0,(function(){return _h(this,(function(r){switch(r.label){case 0:return t.isImageLoaded(e)?[3,2]:[4,t._waitImageLoad(e)];case 1:r.sent(),r.label=2;case 2:return[2,this.decode(e)]}}))}))},t.prototype.getUserMedia=function(e){return wh(this,void 0,void 0,(function(){var r;return _h(this,(function(n){switch(n.label){case 0:return[4,navigator.mediaDevices.getUserMedia(e)];case 1:return r=n.sent(),t.streamTracker.push(r),[2,r]}}))}))},t.streamTracker=[],t}(),Ah=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){function e(e,r){return t.call(this,new Gs,e,r)||this}Ah(e,t)}(bh);var Ch=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){function e(e,r){return t.call(this,new Sc(e),e,r)||this}Ch(e,t)}(bh);var Ih=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){function e(e,r){return t.call(this,new Hc,e,r)||this}Ih(e,t)}(bh);var Sh=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Th=function(t){function e(e,r){var n=this,o=new pd;return o.setHints(e),(n=t.call(this,o,e,r)||this).reader=o,n}return Sh(e,t),Object.defineProperty(e.prototype,"possibleFormats",{set:function(t){this.hints.set(La.POSSIBLE_FORMATS,t),this.reader.setHints(this.hints)},enumerable:!1,configurable:!0}),e.prototype.decodeBitmap=function(t){return this.reader.decodeWithState(t)},e.prototype.setHints=function(t){this.hints=t,this.reader.setHints(this.hints)},e}(bh),Dh=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){function e(e,r){return t.call(this,new ld,e,r)||this}Dh(e,t)}(bh);var Oh=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){function e(e,r){return t.call(this,new El,e,r)||this}Oh(e,t)}(bh);const Rh=[ps.PDF_417,ps.QR_CODE];class Mh{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Rh;this.reader=new Th,this.formats=t,this.reader.possibleFormats=t,ha("Barcode detector initialized",t.map((t=>ps[t])))}getXYWidthHeight(t){if(!t||0===t.length)return{x:0,y:0,width:0,height:0};let e=1/0,r=-1/0,n=1/0,o=-1/0;for(const i of t){const t=i.getX(),a=i.getY();t<e&&(e=t),t>r&&(r=t),a<n&&(n=a),a>o&&(o=a)}return{x:e,y:n,width:r-e,height:o-n}}detect(t){let e;if(t instanceof HTMLCanvasElement)e=t;else{e=document.createElement("canvas"),e.width=t.width,e.height=t.height;const r=e.getContext("2d");if(!r)return ha("Warning: Unable to get 2D context for canvas."),[];null==r||r.drawImage(t,0,0)}const r=[],n=new Set,o=t=>{try{const t=this.reader.decodeFromCanvas(e);ha("Barcode detected:",t);const o=this.getXYWidthHeight(t.getResultPoints()),i=ps[t.getBarcodeFormat()],a=t.getText(),s=`${i}:${a}`;if(n.has(s))return;n.add(s);const u={class:i,score:1,extra:a,x:o.x,y:o.y,width:o.width,height:o.height};r.push(u),ha("Barcode result:",u)}catch(e){ha(void 0!==t?`Barcode not detected for format ${ps[t]}`:"Barcode not detected"),"NotFoundException"!==(null==e?void 0:e.name)&&ha("Barcode detection error:",e)}};if(0===this.formats.length)return o(),r;for(const t of this.formats){const e=new Map;e.set(La.POSSIBLE_FORMATS,[t]),e.set(La.TRY_HARDER,!0),this.reader.setHints(e),o(t)}return r}}var Nh;!function(t){t.NOT_AVAILABLE="notAvailable",t.LOADING="loading",t.LOADED="loaded"}(Nh||(Nh={}));const kh={[fa.DOCUMENT_DETECTOR]:{status:Nh.LOADING},[fa.BLUR_GLARE_CLASSIFIER]:{status:Nh.LOADING},[fa.FACE_LANDMARK]:{status:Nh.LOADING}};let xh=null;function Ph(t){if(xh)return ha("Reusing existing barcode detector instance"),xh;try{return xh=new Mh((t=>{const e={Aztec:ps.AZTEC,Codabar:ps.CODABAR,Code39:ps.CODE_39,Code93:ps.CODE_93,Code128:ps.CODE_128,DataMatrix:ps.DATA_MATRIX,EAN8:ps.EAN_8,EAN13:ps.EAN_13,ITF:ps.ITF,MaxiCode:ps.MAXICODE,PDF417:ps.PDF_417,QRCode:ps.QR_CODE,UPCA:ps.UPC_A,UPCE:ps.UPC_E};return t.map((t=>e[t])).filter((t=>void 0!==t))})(t)),ha("Created new barcode detector instance"),xh}catch(t){throw ha("Error initializing barcode model",t),sa("Error initializing barcode model","barcode_model_not_supported","init"),t}}const Bh=[fa.DOCUMENT_DETECTOR,fa.BLUR_GLARE_CLASSIFIER],Fh=async()=>{let t=!1;for(;!t;){const e=Object.values(kh).filter((t=>t.status===Nh.NOT_AVAILABLE));if(e.length>0)throw new Error(`Model not available: ${e.join(", ")}`);if(t=Bh.every((t=>kh[t].status===Nh.LOADED)),t)return!0;await new Promise((t=>setTimeout(t,100)))}},Lh=t=>"function"==typeof t,zh=function(t){};let Uh;Bi.events.on(Bi.events.MODULE_INITIALIZED,(function(){const{clientId:t,IDV:e}=Bi.moduleMetadata.getInitConfig();if(!t||!e)return!1;const r=(null==e?void 0:e.serverPath)&&(n=null==e?void 0:e.serverPath,o="/verify",(null==n?void 0:n.endsWith(o))?n.slice(0,n.length-o.length):n);var n,o;if(!r)throw new Error("Failed to load SDK: serverPath param required");mo.BASE=r,Ji.dispatch("setClientId",t),Ji.dispatch("setRootElement",(null==e?void 0:e.rootElement)||"root-element"),Ji.dispatch("setServerPath",null==e?void 0:e.serverPath),Ji.dispatch("setLanguage",null==e?void 0:e.language),Ji.dispatch("setCallback",null==e?void 0:e.callback),Ji.dispatch("setConsentVersion",null==e?void 0:e.consentVersion),Ji.dispatch("setMarkdownSupportText",null==e?void 0:e.markdownSupportText),Ji.dispatch("setVideoCaptureSettings",null==e?void 0:e.videoCaptureSettings),Ji.dispatch("setCdnHost",null==e?void 0:e.cdnHost),void 0!==(null==e?void 0:e.isImageSigningEnabled)&&Ji.dispatch("setIsImageSigningEnabled",e.isImageSigningEnabled);(null==e?void 0:e.callbacks)&&qh(e);return Ji.dispatch("setStartToken",null==e?void 0:e.startToken),Uh=qi(Ji.state.clientId).then((t=>Kh(t))),function(t){ji({type:"init",step:t})}("init"),!0})),Bi.events.on(Fi,(function(t){switch(aa.handelEventData(t),Zh(t),t.type){case"session-granted":Vh({session:Ji.state.sessionId});break;case"session-id-acquired":Hh({session:Ji.state.sessionId});break;case"capture-image-result":jh({session:Ji.state.sessionId},t.imageType);break;case"start-verification-processing":Gh({session:Ji.state.sessionId});break;case"verification-complete":Wh({session:Ji.state.sessionId});break;case"capture-error":case"failed-to-init-drs":case"api-request-error":Yh({session:Ji.state.sessionId},t.errorCode,t.error);break;case"verification-recapture":Xh({session:Ji.state.sessionId},t.reason)}}));let Vh=zh,Hh=zh,jh=zh,Gh=zh,Wh=zh,Xh=zh,Yh=zh,Zh=t=>{};const qh=t=>{let{callbacks:e,callback:r}=t;Lh(e.sessionGranted)&&(Vh=e.sessionGranted),Lh(e.sessionStarted)&&(Hh=e.sessionStarted),Lh(e.imageSubmitted)&&(jh=e.imageSubmitted),Lh(e.processing)&&(Gh=e.processing),Lh(e.completed)&&(Wh=e.completed),Lh(e.recapture)&&(Xh=e.recapture),Lh(e.error)&&(Yh=e.error),Lh(r)&&(Zh=r)};async function Kh(t){if((null==t?void 0:t.strings)&&la.overrideLanguage(t.strings),Ji.dispatch("setCaptureApprovalSettings",null==t?void 0:t.capture_approval_settings),null==t?void 0:t.autocapture_enabled){if("serviceWorker"in navigator)return Ji.dispatch("setAutoCaptureSettings",{enabled:!0,settings:t.autocapture_settings}),ha("service worker available"),void navigator.serviceWorker.addEventListener("message",(t=>{if(t.data&&"MODEL_READY"===t.data.type){const e=t.data.modelName;kh[e]={status:Nh.LOADED,imageDimensions:t.data.imageDimensions,loadingStats:o(o({},t.data.stats),{},{modelName:e})}}else if(t.data&&"MODEL_LOAD_ERROR"===t.data.type){const e=t.data.modelName;kh[e].status=Nh.NOT_AVAILABLE,sa(`${t.data.modelName} error: ${t.data.error}`,"model_load_error","init")}}));sa("service worker not available","service_worker_not_available","init")}Ji.dispatch("setAutoCaptureSettings",{enabled:!1,autocapture_settings:null==t?void 0:t.autocapture_settings})}async function $h(t,e,r){mo.HEADERS=Do(r,e);var n;return(await(n=t,Zi({method:"GET",url:`/verify/api/v1/verification/${n}/status`,path:{sid:n},errors:{404:"Session not found"}},"processing"))).body}async function Jh(t,e,r,n){var i;mo.HEADERS=Do(e);const a=await(s={start_token:t,accessed_from_desktop:!1,client_type:vo.client_type.MOBILE_SDK,consent:{granted:!0,document_id:r},image_signing_public_key:n},Zi({method:"POST",url:"/verify/api/v1/verification/start",headers:{},body:s,mediaType:"application/json"},"init"));var s;const u=a.body.settings,c=null!==(i=null==u?void 0:u.flowType)&&void 0!==i?i:null==u?void 0:u.flow_type,l="string"==typeof c?c:void 0;return o({sessionId:a.body.session_id,userToken:a.body.user_token,requiredImages:a.body.required_images},l&&{flowType:l})}async function Qh(t,e,r){let n,i,a,s;try{const t=Ui(zi),e=JSON.parse(t);n=e.sessionId,i=e.userToken,a=e.flowType,s=e.startToken}catch(t){}const u=n&&i&&(!t||s===t),c=!0===Ji.state.isImageSigningEnabled,l=!c&&u&&null!=n&&null!=i;try{let s;if(l){s=(await $h(n,i,r)).missing_images}else{if(!t)throw new Error(c?"Image signing is enabled but no start token is available to register a public key":"No start token and no valid cached session");let o;if(c){const t=Bi.crypto.createCryptoBinding("sign");if(o=(await t.getPublicData()).publicKey,!o)throw new Error("Image signing is enabled but failed to generate a public key")}const u=await Jh(t,r,e,o);n=u.sessionId,i=u.userToken,s=u.requiredImages,a=u.flowType;const l=JSON.stringify({sessionId:n,userToken:i,flowType:a,startToken:t});d=zi,h=l,sessionStorage.setItem(d,h)}return o({requiredImages:s,sessionId:n.toString(),userToken:i.toString()},void 0!==a&&""!==a&&{flowType:a})}catch(t){throw console.log("Error starting session"),console.error(t),t}var d,h}function tf(t){let{tagName:e,style:r,id:n="",className:o="",testid:i,options:a}=t;const s=document.createElement(e,a);return s.id=n,s.className=o,s.setAttribute("data-auto",i+"-auto"),Object.keys(r).forEach((t=>{s.style[t]=r[t]})),s}function ef(t,e){Array.isArray(e)?e.forEach((e=>{t.appendChild(e)})):t.appendChild(e)}const rf=async(t,e,r,n,i,a,s,u)=>{var c,l,d,h,f,p,g;mo.HEADERS=Do(r,e);const m=Ao.UAParser();let y;if(Ji.state.isImageSigningEnabled){const t=Bi.crypto.createCryptoBinding("sign");y=await t.sign(n.data)}const w=await(_=t,v=o({image:{format:n.format,image_type:a,content:n.data,capture_margins:n.captureMargins,signature:y,raw_barcode_data:s},device_info:{model:null===(c=null==m?void 0:m.device)||void 0===c?void 0:c.model,type:null===(l=null==m?void 0:m.device)||void 0===l?void 0:l.type,manufacturer:null===(d=null==m?void 0:m.device)||void 0===d?void 0:d.vendor,os:null===(h=null==m?void 0:m.os)||void 0===h?void 0:h.name,os_version:null===(f=null==m?void 0:m.os)||void 0===f?void 0:f.version,browser:null===(p=null==m?void 0:m.browser)||void 0===p?void 0:p.name,browser_version:null===(g=null==m?void 0:m.browser)||void 0===g?void 0:g.version,used_camera:null==i?void 0:i.selectedCamera,cameras:null==i?void 0:i.camerasInfo}},u?{acquisition_id:u}:{}),Zi({method:"POST",url:"/verify/api/v1/verification/{sid}/images",path:{sid:_},body:v,mediaType:"application/json",errors:{400:"Request is malformed or missing required fields",401:"Access token is malformed, missing data, or expired",404:"Session not found",409:"All required images were successfully submitted"}},v.image.image_type));var _,v;const E=function(t,e){const r=[...t].find((t=>t.includes(e)));return void 0!==r?r[1]:void 0}(w.headers,"x-ts-processing-time-ms");return"ok"!==w.body.feedback&&console.error("Error",w),{missing_images:w.body.missing_images,feedback:w.body.feedback,custom_feedback:w.body.custom_feedback,has_barcode:w.body.has_barcode,supported_barcode_symbologies:w.body.supported_barcode_symbologies,serverProcessingTime:E}},nf=()=>{const t=document.getElementById("overlay-frame");if(t){const e=t.getBoundingClientRect(),r=(3840-screen.width)/2,n=(2160-screen.height)/2;return{top:n+e.top,bottom:n+e.bottom,right:r+e.right,left:r+e.left}}},of=t=>["document_front","document_back"].includes(t)?"environment":"user";function af(t){switch(t){case"document_front":return wo.image_type.DOCUMENT_FRONT;case"document_back":return wo.image_type.DOCUMENT_BACK;case"selfie":return wo.image_type.SELFIE}}var sf={},uf={get exports(){return sf},set exports(t){sf=t}};uf.exports=function(t){function e(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var r={};return e.m=t,e.c=r,e.d=function(t,r,n){e.o(t,r)||Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:n})},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=4)}([function(t,e,r){r.d(e,"b",(function(){return i})),r.d(e,"c",(function(){return a}));var n=r(1),o=r(7);r.d(e,"a",(function(){return o.a})),r.d(e,"d",(function(){return n.b}));var i=n.a.FACING_MODES,a=n.a.IMAGE_TYPES},function(t,e,r){var n=r(6);r.d(e,"a",(function(){return n.a}));var o=r(2);r.d(e,"b",(function(){return o.a}))},function(t,e,r){function n(t,e){if(!(e>=0&&e<=1))throw new Error(e+" is invalid imageCompression, choose between: [0, 1]");if(!h.f.includes(t))throw new Error(t+" is invalid imageType, choose between: "+h.f.join(", "));return!0}function o(t,e){var r={};try{n(t,e),r.imageType=t,r.imageCompression=e}catch(t){console.error(t),console.error("default value of "+h.c.PNG+" is used"),r.imageType=h.c.PNG,r.imageCompression=null}return r}function i(){var t=window.navigator.platform,e=window.navigator.userAgent;return t||e}function a(){return"ontouchend"in document}function s(t,e,r){var n=t*parseFloat(r);return{imageWidth:n,imageHeight:e/(t/n)}}function u(t,e,r){return o(e,r).imageType===h.c.JPG?r?t.toDataURL(h.b[h.c.JPG],r):t.toDataURL(h.b[h.c.JPG]):t.toDataURL(h.b[e])}function c(t,e){return t||e}function l(){var t=i();if(/iPad|iPhone|iPod/.test(t))return!0;var e=a();return!(!/Mac/.test(t)||!e)}function d(){return{userAgent:window.navigator.userAgent,platform:window.navigator.platform,_getStringWithPlatform:i(),_getHasTouchEvents:a(),getIsIOS:l()}}e.c=s,e.b=u,e.e=c,e.d=l,e.a=d;var h=r(3)},function(t,e,r){function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}r.d(e,"e",(function(){return i})),r.d(e,"a",(function(){return a})),r.d(e,"f",(function(){return s})),r.d(e,"c",(function(){return u})),r.d(e,"b",(function(){return c})),r.d(e,"d",(function(){return l}));var o,i=["user","environment"],a={USER:"user",ENVIRONMENT:"environment"},s=["jpg","png"],u={PNG:"png",JPG:"jpg"},c=(n(o={},"jpg","image/jpeg"),n(o,"png","image/png"),o),l={audio:!1,video:!0}},function(t,e,r){t.exports=r(5)},function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0});var n=r(0);r.d(e,"FACING_MODES",(function(){return n.b})),r.d(e,"IMAGE_TYPES",(function(){return n.c})),r.d(e,"_getDebugPlatformInfo",(function(){return n.d}));var o=r(9);r.d(e,"downloadPhoto",(function(){return o.a})),e.default=n.a},function(t,e,r){function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}r.d(e,"a",(function(){return s}));var o=r(2),i=r(3),a=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),s=function(){function t(){n(this,t)}return a(t,null,[{key:"getDataUri",value:function(t,e){var r=e.sizeFactor,n=e.imageType,i=e.imageCompression,a=e.isImageMirror,s=t.videoWidth,u=t.videoHeight,c=Object(o.c)(s,u,r),l=c.imageWidth,d=c.imageHeight,h=document.createElement("canvas");h.width=l,h.height=d;var f=h.getContext("2d");return a&&f.setTransform(-1,0,0,1,h.width,0),f.drawImage(t,0,0,l,d),Object(o.b)(h,n,i)}},{key:"getWindowURL",value:function(){return window.URL||window.webkitURL||window.mozURL||window.msURL}},{key:"getNavigatorMediaDevices",value:function(){var t=null,e=!(!navigator.mediaDevices||!navigator.mediaDevices.getUserMedia),r=!(!navigator.mozGetUserMedia&&!navigator.webkitGetUserMedia);if(e)t=navigator.mediaDevices;else if(r){var n=navigator.mozGetUserMedia||navigator.webkitGetUserMedia,o={getUserMedia:function(t){return new Promise((function(e,r){n.call(navigator,t,e,r)}))}};t=Object.assign(n,o)}return t}},{key:"isSupportedFacingMode",value:function(){return t.getNavigatorMediaDevices().getSupportedConstraints().facingMode}},{key:"getIdealConstraints",value:function(e,r){if(!Object(o.e)(e,r))return i.d;var n=t.getNavigatorMediaDevices().getSupportedConstraints();if(!n.width||!n.height)return console.error("Constraint width or height not supported! fallback to default resolution"),i.d;var a=void 0,s=void 0;return e&&(i.e.includes(e)?a=e:s={exact:e}),{audio:!1,video:{facingMode:a,deviceId:s,width:r&&r.width,height:r&&r.height}}}},{key:"getMaxResolutionConstraints",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments[1];console.warn("getMaxResolutionConstraints() numberOfMaxResolutionTry:",r);var n=[{width:{min:640}},{width:{min:800}},{width:{min:900}},{width:{min:1024}},{width:{min:1080}},{width:{min:1280}},{width:{min:1920}},{width:{min:2560}},{width:{min:3840}}],i=t.getIdealConstraints(e,{});if(0===r)return Object(o.d)()?(console.warn("fallback to iOS constraints"),t.getIdealConstraints(e,{width:{min:640,ideal:3840},height:{min:480,ideal:2160}})):(i.video.advanced=n,i);if(r<n.length){var a=n.slice(0,-r);return i.video.advanced=a,i}return null}},{key:"FACING_MODES",get:function(){return i.a}},{key:"IMAGE_TYPES",get:function(){return i.c}}]),t}()},function(t,e,r){function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}r.d(e,"a",(function(){return u}));var o=r(1),i=r(8),a=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),s=o.a.IMAGE_TYPES.PNG,u=function(){function t(e){n(this,t),this.videoElement=e,this.stream=null,this.numberOfMaxResolutionTry=0,this.settings=null,this.cameras=[],this.windowURL=o.a.getWindowURL(),this.mediaDevices=o.a.getNavigatorMediaDevices()}return a(t,[{key:"_getStreamDevice",value:function(t,e){var r=this;return new Promise((function(n,i){var a=o.a.getIdealConstraints(t,e);r.mediaDevices.getUserMedia(a).then((function(t){r._gotStream(t),n(t)})).catch((function(t){i(t)}))}))}},{key:"_getStreamDeviceMaxResolution",value:function(t){var e=this,r=o.a.getMaxResolutionConstraints(t,this.numberOfMaxResolutionTry);if(null==r){var n={};return this._getStreamDevice(t,n)}return new Promise((function(n,o){e.mediaDevices.getUserMedia(r).then((function(t){e._gotStream(t),n(t)})).catch((function(r){setTimeout((function(){e.numberOfMaxResolutionTry+=1,e._getStreamDeviceMaxResolution(t).catch((function(){o(r)}))}),20)}))}))}},{key:"_setVideoSrc",value:function(t){if("srcObject"in this.videoElement)this.videoElement.srcObject=t;else{var e=this.windowURL.createObjectURL(t);this.videoElement.src=e}}},{key:"_setSettings",value:function(t){this.settings=null;var e=t&&t.getTracks?t.getTracks():[];e.length>0&&e[0].getSettings&&(this.settings=e[0].getSettings())}},{key:"_enumerateCamerasPromise",value:function(){var t=this;return new Promise((function(e,r){var n=[];t.mediaDevices.enumerateDevices().then((function(t){t.forEach((function(t){"videoinput"===t.kind&&t.deviceId&&n.push(t)})),e(n)})).catch((function(t){r(t)}))}))}},{key:"_gotStream",value:function(t){this.stream=t,this._setSettings(t),this._setVideoSrc(t)}},{key:"getCameraSettings",value:function(){return this.settings}},{key:"enumerateCameras",value:function(){var t=this;return this.stream?this._enumerateCamerasPromise():this.stopCamera().then((function(){})).catch((function(){})).then((function(){var e={video:!0};return t.mediaDevices.getUserMedia(e).then((function(t){setTimeout((function(){t.getTracks().forEach((function(t){t.stop()}))}),20)})).then((function(){})).catch((function(){})).then((function(){return t._enumerateCamerasPromise()}))}))}},{key:"startCamera",value:function(t,e){var r=this;return this.stopCamera().then((function(){})).catch((function(){})).then((function(){return r._getStreamDevice(t,e)}))}},{key:"startCameraMaxResolution",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.numberOfMaxResolutionTry=0,this.stopCamera().then((function(){})).catch((function(){})).then((function(){return t._getStreamDeviceMaxResolution(e)}))}},{key:"getDataUri",value:function(t){var e={sizeFactor:void 0===t.sizeFactor?i.c:t.sizeFactor,imageType:void 0===t.imageType?s:t.imageType,imageCompression:void 0===t.imageCompression?i.a:t.imageCompression,isImageMirror:void 0===t.isImageMirror?i.b:t.isImageMirror};return o.a.getDataUri(this.videoElement,e)}},{key:"stopCamera",value:function(){var t=this;return new Promise((function(e,r){t.stream&&(t.stream.getTracks().forEach((function(t){t.stop()})),t.videoElement.src="",t.stream=null,t._setSettings(null),e()),r(Error("no stream to stop!"))}))}}]),t}()},function(t,e,r){r.d(e,"c",(function(){return n})),r.d(e,"a",(function(){return o})),r.d(e,"b",(function(){return i}));var n=1,o=null,i=!1},function(t,e,r){var n=r(10);r.d(e,"a",(function(){return n.a}))},function(t,e,r){function n(t){for(var e=atob(t.split(",")[1]),r=t.split(",")[0].split(":")[1].split(";")[0],n=new ArrayBuffer(e.length),o=new Uint8Array(n),i=0;i<e.length;i++)o[i]=e.charCodeAt(i);return new Blob([n],{type:r})}function o(t,e){return(t+="").length>=e?t:new Array(e-t.length+1).join("0")+t}function i(t){var e=c.c.PNG;return"image/jpeg"===t&&(e=c.c.JPG),e}function a(t,e,r){return t+"-"+o(e,4)+"."+i(r)}function s(t,e,r){window.URL=window.webkitURL||window.URL;var n=document.createElement("a");n.download=a(e,r,t.type),n.href=window.URL.createObjectURL(t);var o=document.createEvent("MouseEvents");o.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,0,null),n.dispatchEvent(o)}function u(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"photo",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;s(n(t),e,r)}e.a=u;var c=r(0)}]);var cf=a(sf);class lf{constructor(){this.currentStream=null,this.currentConstraints=null}static getInstance(){return lf.instance||(lf.instance=new lf),lf.instance}getStream(){return this.currentStream}isStreaming(){return this.currentStream&&this.currentStream.getTracks().some((t=>"live"===t.readyState))}stopStream(){this.currentStream&&(this.currentStream.getTracks().forEach((t=>t.stop())),this.currentStream=null)}areConstraintsEqual(t){return!!this.currentConstraints&&JSON.stringify(this.currentConstraints)===JSON.stringify(t)}async startNewStream(t){this.isStreaming()&&this.areConstraintsEqual(t)||(this.stopStream(),this.currentStream=await navigator.mediaDevices.getUserMedia(t),this.currentConstraints=t)}async enumerateDevices(){try{return await navigator.mediaDevices.enumerateDevices()}catch(t){throw console.error("Failed to enumerate devices:",t),t}}}const df=["tele","telephoto","macro","portrait","zoom"],hf=["ultra","wide","uw","front","selfie"];function ff(){return/iPad|iPhone|iPod/.test(navigator.userAgent)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1}function pf(t){const e=t.toLowerCase();let r=0;if(ff())"back camera"!==e&&"rear camera"!==e||(r+=5),(e.includes("telephoto")||e.includes("tele"))&&(r-=2),(e.includes("ultra")||e.includes("wide"))&&(r-=3);else{df.forEach((t=>{e.includes(t)&&(r+="macro"===t?4:3)})),hf.forEach((t=>{e.includes(t)&&(r-=3)}));const t=e.match(/(\d+(?:\.\d+)?)x/);t&&(r+=Math.min(parseFloat(t[1]),6));const n=e.match(/camera2?\s+(\d+)/);if(n){const t=parseInt(n[1]);0===t?r+=3:t>=2&&(r-=2)}}return r}async function gf(t){let e=0;try{const r=lf.getInstance();await r.startNewStream({video:{deviceId:{exact:t}},audio:!1});const n=r.getStream();if(!n)return e;const o=n.getVideoTracks()[0].getCapabilities();return r.stopStream(),o.zoom&&(e+=Math.min(o.zoom.max||0,2)),o.focusMode&&Array.isArray(o.focusMode)&&o.focusMode.includes("continuous")&&(e+=2),o.focusDistance&&(e+=1),e}catch(t){return e}}async function mf(){const t=(await async function(){const t=lf.getInstance();let e=await t.enumerateDevices();return e.filter((t=>"videoinput"===t.kind)).every((t=>""===t.label))&&(await t.startNewStream({video:{facingMode:{ideal:"environment"}},audio:!1}),e=await t.enumerateDevices(),t.stopStream()),e}()).filter((t=>{if(!(null==t?void 0:t.label)||"videoinput"!==t.kind||""===t.label)return!1;const e=t.label.toLowerCase();return yf.some((t=>e.includes(t)))}));if(0===t.length)return{optionalCameras:[]};if(ff())return{optionalCameras:t};const e=t.map((t=>({camera:t,score:pf(t.label)}))),r=Math.max(...e.map((t=>t.score)));if(r<=0)return{optionalCameras:t,selectedCamera:t[0]};const n=e.filter((t=>t.score===r));if(1===n.length)return{optionalCameras:t,selectedCamera:n[0].camera};let o=n[0].camera,i=-1/0;for(const{camera:t,score:e}of n){const r=e+await gf(t.deviceId);r>i&&(i=r,o=t)}return{optionalCameras:t,selectedCamera:o}}const yf=["rear","back","tele","telephoto","macro","portrait","rück","arrière","trasera","trás","traseira","posteriore","后面","後面","背面","后置","後置","背置","задней","الخلفية","후","arka","achterzijde","หลัง","baksidan","bagside","sau","bak","tylny","takakamera","belakang","אחורית","πίσω","spate","hátsó","zadní","darrere","zadná","задня","stražnja","belakang","बैक","camera2 0, facing back"],wf={width:{min:640,max:3840,ideal:3840},height:{min:480,max:2160,ideal:2160},frameRate:30},_f={width:{min:640,max:1280,ideal:1280},height:{min:480,max:720,ideal:720},frameRate:30},vf=async t=>{var e,r;let n;return"environment"==t&&(n=await mf()),null!==(r=null===(e=null==n?void 0:n.selectedCamera)||void 0===e?void 0:e.deviceId)&&void 0!==r?r:t},Ef=(t,e)=>{var r,n;return"user"===t?null!==(r=null==e?void 0:e.selfieVideoConstraints)&&void 0!==r?r:_f:null!==(n=null==e?void 0:e.environmentVideoConstraints)&&void 0!==n?n:wf},bf=t=>{const e=tf({tagName:"video",style:{position:"absolute",zIndex:"0",top:"0",width:"100%",height:"100%",objectFit:"cover"},id:"video",testid:"video"});return e.style.transform="user"===t?"scaleX(-1)":"",e.autoplay=!0,e.muted=!0,e.setAttribute("playsinline","true"),e},Af={title:"other_error_code_title",message:"other_error_code_message"},Cf={ok:Af,document_face_not_found:Af,restricted_criteria:Af,other:Af,glare:{title:"glare_title",message:"glare_message"},document_not_found:{title:"document_not_found_title",message:"document_not_found_message"},blur:{title:"blur_title",message:"blur_message"},document_not_supported:{title:"document_not_supported_title",message:"document_not_supported_message"},unclassifiable:{title:"unclassifiable_title",message:"unclassifiable_message"},obstructed:{title:"obstructed_title",message:"obstructed_message"},document_not_matching:{title:"document_not_matching_title",message:"document_not_matching_message"},face_not_found:{title:"face_not_found_title",message:"face_not_found_message"},wrong_document_side:{title:"wrong_document_side_title",message:"wrong_document_side_message"},glare_selfie:{title:"glare_selfie_title",message:"glare_selfie_message"},blur_selfie:{title:"blur_selfie_title",message:"blur_selfie_message"},multi_face:{title:"multi_face_title",message:"multi_face_message"},face_rotated:{title:"face_rotated_title",message:"face_rotated_message"},face_too_small:{title:"face_too_small_title",message:"face_too_small_message"},face_too_close:{title:"face_too_close_title",message:"face_too_close_message"},closed_eyes:{title:"closed_eyes_title",message:"closed_eyes_message"},face_angle_too_large:{title:"face_angle_too_large_title",message:"face_angle_too_large_message"},face_close_to_border:{title:"face_close_to_border_title",message:"face_close_to_border_message"},face_occluded:{title:"face_occluded_title",message:"face_occluded_message"},face_cropped:{title:"face_cropped_title",message:"face_cropped_message"},barcode_not_found:{title:"barcode_not_found_title",message:"barcode_not_found_message"}},If={loading_screen:{page:"page_header_document",title:"main_title_document_front",instructions:"loading_screen_small_title"},document_front:{page:"page_header_document",title:"main_title_document_front",instructions:"second_title_document_front"},document_back:{page:"page_header_document",title:"main_title_document_back",instructions:"second_title_document_back"},selfie:{page:"page_header_face",title:"main_title_document_face",instructions:"second_title_document_face"}},Sf=(t,e)=>{const r=tf({tagName:"div",style:{display:"flex",justifyContent:"center",flexDirection:"column",alignItems:"center",position:"relative",zIndex:"1",background:"transparent",boxShadow:"0 0 0 1000px rgb(0 0 0 / 50%)",borderStyle:"solid",borderWidth:"1px",borderColor:"white"},id:`overlay-frame ${t}`,testid:`overlay-frame ${t}`});if("environment"===t){!function(t){ef(t,tf({tagName:"div",style:{position:"absolute",top:"-2px",left:"-2px",width:"20px",height:"20px",backgroundColor:"transparent",borderTopStyle:"solid",borderRightStyle:"none",borderBottomStyle:"none",borderLeftStyle:"solid",borderColor:"white",borderWidth:"4px"},id:"overlay-frame__top-left",testid:"overlay-frame__top-left"})),ef(t,tf({tagName:"div",style:{position:"absolute",top:"-2px",right:"-2px",width:"20px",height:"20px",backgroundColor:"transparent",borderTopStyle:"solid",borderRightStyle:"solid",borderBottomStyle:"none",borderLeftStyle:"none",borderColor:"white",borderWidth:"4px"},id:"overlay-frame__top-right",testid:"overlay-frame__top-right"})),ef(t,tf({tagName:"div",style:{position:"absolute",bottom:"-2px",right:"-2px",width:"20px",height:"20px",backgroundColor:"transparent",borderTopStyle:"none",borderRightStyle:"solid",borderBottomStyle:"solid",borderLeftStyle:"none",borderColor:"white",borderWidth:"4px"},id:"overlay-frame__bottom-right",testid:"overlay-frame__bottom-right"})),ef(t,tf({tagName:"div",style:{position:"absolute",bottom:"-2px",left:"-2px",width:"20px",height:"20px",backgroundColor:"transparent",borderTopStyle:"none",borderRightStyle:"none",borderBottomStyle:"solid",borderLeftStyle:"solid",borderColor:"white",borderWidth:"4px"},id:"overlay-frame__bottom-left",testid:"overlay-frame__bottom-left"}))}(r);const t=.85*e.clientWidth;r.style.width=`${t}px`,r.style.height=.65*t+"px",r.style.maxHeight=.5*window.innerHeight+"px"}else{const t=e.clientWidth*(e.clientHeight<700?.8:.85);r.style.width=.8*t+"px",r.style.height=`${t}px`,r.style.minHeight=.8*t+"px",r.style.maxHeight=.5*window.innerHeight+"px",r.style.borderRadius="50%"}return r};const Tf=t=>{var e;const r=document.createElementNS("http://www.w3.org/2000/svg","svg");return r.setAttribute("viewBox","0 0 68 68"),r.innerHTML='<style>.spinner-autocapture circle {animation: rotate 1.5s linear infinite;} @keyframes rotate { 50% {stroke-dashoffset: 94; stroke-dasharray: 6 57; } 100% { stroke-dashoffset: 188; stroke-dasharray: 51 12; }} </style> <g class="spinner-autocapture"> <circle cx="34" cy="34" fill="none" r="30" stroke-width="4" stroke="#fff" stroke-dasharray="51 12" stroke-linecap="round" stroke-dashoffset="0" /> </g>',null!=t&&(null===(e=r.querySelector("circle"))||void 0===e||e.setAttribute("stroke",t)),r};function Df(){const t=document.createElementNS("http://www.w3.org/2000/svg","svg");return t.setAttribute("width","16px"),t.setAttribute("height","16px"),t.innerHTML='\n <path d="M8 16C12.4187 16 16 12.4187 16 8C16 3.58125 12.4187 0 8 0C3.58125 0 0 3.58125 0 8C0 12.4187 3.58125 16 8 16ZM8 4C8.41562 4 8.75 4.33437 8.75 4.75V8.25C8.75 8.66562 8.41562 9 8 9C7.58437 9 7.25 8.66562 7.25 8.25V4.75C7.25 4.33437 7.58437 4 8 4ZM9 11C9 11.5531 8.55313 12 8 12C7.44688 12 7 11.5531 7 11C7 10.4469 7.44688 10 8 10C8.55313 10 9 10.4469 9 11Z" fill="#F2F2F2"/>\n ',t}const Of={all:{color:"black",margin:"0"},1:{color:"white",fontSize:"var(--font-size-4xl)",fontWeight:"var(--font-weight-bold)"},2:{color:"white",fontSize:"var(--font-size-2xl)",fontWeight:"var(--font-weight-semibold)"},3:{color:"white",fontSize:"var(--font-size-xl)",fontWeight:"var(--font-weight-medium)"},4:{fontSize:"var(--font-size-lg)",fontWeight:"var(--font-weight-regular)"},5:{fontSize:"var(--font-size-md)",fontWeight:"var(--font-weight-light)"},6:{fontSize:"var(--font-size-sm)",fontWeight:"var(--font-weight-light)"}},Rf=t=>{let{text:e,level:r=1,style:n={},id:i,testid:a}=t;const s=tf({tagName:`h${r}`,style:o(o(o({},Of.all),Of[r]),n),id:i,testid:a});return s.textContent=e,s.id=i,s};var Mf,Nf={};let kf=null;try{kf=(Mf||(Mf=1,function(t){function e(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}function n(e){t.defaults=e}t.defaults={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};const i={exec:()=>null};function a(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r="string"==typeof t?t:t.source;const n={replace:(t,e)=>{let o="string"==typeof e?e:e.source;return o=o.replace(s.caret,"$1"),r=r.replace(t,o),n},getRegex:()=>new RegExp(r,e)};return n}const s={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088F\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5C\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDC-\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7DC\uA7F1-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC\u{10000}-\u{1000B}\u{1000D}-\u{10026}\u{10028}-\u{1003A}\u{1003C}\u{1003D}\u{1003F}-\u{1004D}\u{10050}-\u{1005D}\u{10080}-\u{100FA}\u{10107}-\u{10133}\u{10140}-\u{10178}\u{1018A}\u{1018B}\u{10280}-\u{1029C}\u{102A0}-\u{102D0}\u{102E1}-\u{102FB}\u{10300}-\u{10323}\u{1032D}-\u{1034A}\u{10350}-\u{10375}\u{10380}-\u{1039D}\u{103A0}-\u{103C3}\u{103C8}-\u{103CF}\u{103D1}-\u{103D5}\u{10400}-\u{1049D}\u{104A0}-\u{104A9}\u{104B0}-\u{104D3}\u{104D8}-\u{104FB}\u{10500}-\u{10527}\u{10530}-\u{10563}\u{10570}-\u{1057A}\u{1057C}-\u{1058A}\u{1058C}-\u{10592}\u{10594}\u{10595}\u{10597}-\u{105A1}\u{105A3}-\u{105B1}\u{105B3}-\u{105B9}\u{105BB}\u{105BC}\u{105C0}-\u{105F3}\u{10600}-\u{10736}\u{10740}-\u{10755}\u{10760}-\u{10767}\u{10780}-\u{10785}\u{10787}-\u{107B0}\u{107B2}-\u{107BA}\u{10800}-\u{10805}\u{10808}\u{1080A}-\u{10835}\u{10837}\u{10838}\u{1083C}\u{1083F}-\u{10855}\u{10858}-\u{10876}\u{10879}-\u{1089E}\u{108A7}-\u{108AF}\u{108E0}-\u{108F2}\u{108F4}\u{108F5}\u{108FB}-\u{1091B}\u{10920}-\u{10939}\u{10940}-\u{10959}\u{10980}-\u{109B7}\u{109BC}-\u{109CF}\u{109D2}-\u{10A00}\u{10A10}-\u{10A13}\u{10A15}-\u{10A17}\u{10A19}-\u{10A35}\u{10A40}-\u{10A48}\u{10A60}-\u{10A7E}\u{10A80}-\u{10A9F}\u{10AC0}-\u{10AC7}\u{10AC9}-\u{10AE4}\u{10AEB}-\u{10AEF}\u{10B00}-\u{10B35}\u{10B40}-\u{10B55}\u{10B58}-\u{10B72}\u{10B78}-\u{10B91}\u{10BA9}-\u{10BAF}\u{10C00}-\u{10C48}\u{10C80}-\u{10CB2}\u{10CC0}-\u{10CF2}\u{10CFA}-\u{10D23}\u{10D30}-\u{10D39}\u{10D40}-\u{10D65}\u{10D6F}-\u{10D85}\u{10E60}-\u{10E7E}\u{10E80}-\u{10EA9}\u{10EB0}\u{10EB1}\u{10EC2}-\u{10EC7}\u{10F00}-\u{10F27}\u{10F30}-\u{10F45}\u{10F51}-\u{10F54}\u{10F70}-\u{10F81}\u{10FB0}-\u{10FCB}\u{10FE0}-\u{10FF6}\u{11003}-\u{11037}\u{11052}-\u{1106F}\u{11071}\u{11072}\u{11075}\u{11083}-\u{110AF}\u{110D0}-\u{110E8}\u{110F0}-\u{110F9}\u{11103}-\u{11126}\u{11136}-\u{1113F}\u{11144}\u{11147}\u{11150}-\u{11172}\u{11176}\u{11183}-\u{111B2}\u{111C1}-\u{111C4}\u{111D0}-\u{111DA}\u{111DC}\u{111E1}-\u{111F4}\u{11200}-\u{11211}\u{11213}-\u{1122B}\u{1123F}\u{11240}\u{11280}-\u{11286}\u{11288}\u{1128A}-\u{1128D}\u{1128F}-\u{1129D}\u{1129F}-\u{112A8}\u{112B0}-\u{112DE}\u{112F0}-\u{112F9}\u{11305}-\u{1130C}\u{1130F}\u{11310}\u{11313}-\u{11328}\u{1132A}-\u{11330}\u{11332}\u{11333}\u{11335}-\u{11339}\u{1133D}\u{11350}\u{1135D}-\u{11361}\u{11380}-\u{11389}\u{1138B}\u{1138E}\u{11390}-\u{113B5}\u{113B7}\u{113D1}\u{113D3}\u{11400}-\u{11434}\u{11447}-\u{1144A}\u{11450}-\u{11459}\u{1145F}-\u{11461}\u{11480}-\u{114AF}\u{114C4}\u{114C5}\u{114C7}\u{114D0}-\u{114D9}\u{11580}-\u{115AE}\u{115D8}-\u{115DB}\u{11600}-\u{1162F}\u{11644}\u{11650}-\u{11659}\u{11680}-\u{116AA}\u{116B8}\u{116C0}-\u{116C9}\u{116D0}-\u{116E3}\u{11700}-\u{1171A}\u{11730}-\u{1173B}\u{11740}-\u{11746}\u{11800}-\u{1182B}\u{118A0}-\u{118F2}\u{118FF}-\u{11906}\u{11909}\u{1190C}-\u{11913}\u{11915}\u{11916}\u{11918}-\u{1192F}\u{1193F}\u{11941}\u{11950}-\u{11959}\u{119A0}-\u{119A7}\u{119AA}-\u{119D0}\u{119E1}\u{119E3}\u{11A00}\u{11A0B}-\u{11A32}\u{11A3A}\u{11A50}\u{11A5C}-\u{11A89}\u{11A9D}\u{11AB0}-\u{11AF8}\u{11BC0}-\u{11BE0}\u{11BF0}-\u{11BF9}\u{11C00}-\u{11C08}\u{11C0A}-\u{11C2E}\u{11C40}\u{11C50}-\u{11C6C}\u{11C72}-\u{11C8F}\u{11D00}-\u{11D06}\u{11D08}\u{11D09}\u{11D0B}-\u{11D30}\u{11D46}\u{11D50}-\u{11D59}\u{11D60}-\u{11D65}\u{11D67}\u{11D68}\u{11D6A}-\u{11D89}\u{11D98}\u{11DA0}-\u{11DA9}\u{11DB0}-\u{11DDB}\u{11DE0}-\u{11DE9}\u{11EE0}-\u{11EF2}\u{11F02}\u{11F04}-\u{11F10}\u{11F12}-\u{11F33}\u{11F50}-\u{11F59}\u{11FB0}\u{11FC0}-\u{11FD4}\u{12000}-\u{12399}\u{12400}-\u{1246E}\u{12480}-\u{12543}\u{12F90}-\u{12FF0}\u{13000}-\u{1342F}\u{13441}-\u{13446}\u{13460}-\u{143FA}\u{14400}-\u{14646}\u{16100}-\u{1611D}\u{16130}-\u{16139}\u{16800}-\u{16A38}\u{16A40}-\u{16A5E}\u{16A60}-\u{16A69}\u{16A70}-\u{16ABE}\u{16AC0}-\u{16AC9}\u{16AD0}-\u{16AED}\u{16B00}-\u{16B2F}\u{16B40}-\u{16B43}\u{16B50}-\u{16B59}\u{16B5B}-\u{16B61}\u{16B63}-\u{16B77}\u{16B7D}-\u{16B8F}\u{16D40}-\u{16D6C}\u{16D70}-\u{16D79}\u{16E40}-\u{16E96}\u{16EA0}-\u{16EB8}\u{16EBB}-\u{16ED3}\u{16F00}-\u{16F4A}\u{16F50}\u{16F93}-\u{16F9F}\u{16FE0}\u{16FE1}\u{16FE3}\u{16FF2}-\u{16FF6}\u{17000}-\u{18CD5}\u{18CFF}-\u{18D1E}\u{18D80}-\u{18DF2}\u{1AFF0}-\u{1AFF3}\u{1AFF5}-\u{1AFFB}\u{1AFFD}\u{1AFFE}\u{1B000}-\u{1B122}\u{1B132}\u{1B150}-\u{1B152}\u{1B155}\u{1B164}-\u{1B167}\u{1B170}-\u{1B2FB}\u{1BC00}-\u{1BC6A}\u{1BC70}-\u{1BC7C}\u{1BC80}-\u{1BC88}\u{1BC90}-\u{1BC99}\u{1CCF0}-\u{1CCF9}\u{1D2C0}-\u{1D2D3}\u{1D2E0}-\u{1D2F3}\u{1D360}-\u{1D378}\u{1D400}-\u{1D454}\u{1D456}-\u{1D49C}\u{1D49E}\u{1D49F}\u{1D4A2}\u{1D4A5}\u{1D4A6}\u{1D4A9}-\u{1D4AC}\u{1D4AE}-\u{1D4B9}\u{1D4BB}\u{1D4BD}-\u{1D4C3}\u{1D4C5}-\u{1D505}\u{1D507}-\u{1D50A}\u{1D50D}-\u{1D514}\u{1D516}-\u{1D51C}\u{1D51E}-\u{1D539}\u{1D53B}-\u{1D53E}\u{1D540}-\u{1D544}\u{1D546}\u{1D54A}-\u{1D550}\u{1D552}-\u{1D6A5}\u{1D6A8}-\u{1D6C0}\u{1D6C2}-\u{1D6DA}\u{1D6DC}-\u{1D6FA}\u{1D6FC}-\u{1D714}\u{1D716}-\u{1D734}\u{1D736}-\u{1D74E}\u{1D750}-\u{1D76E}\u{1D770}-\u{1D788}\u{1D78A}-\u{1D7A8}\u{1D7AA}-\u{1D7C2}\u{1D7C4}-\u{1D7CB}\u{1D7CE}-\u{1D7FF}\u{1DF00}-\u{1DF1E}\u{1DF25}-\u{1DF2A}\u{1E030}-\u{1E06D}\u{1E100}-\u{1E12C}\u{1E137}-\u{1E13D}\u{1E140}-\u{1E149}\u{1E14E}\u{1E290}-\u{1E2AD}\u{1E2C0}-\u{1E2EB}\u{1E2F0}-\u{1E2F9}\u{1E4D0}-\u{1E4EB}\u{1E4F0}-\u{1E4F9}\u{1E5D0}-\u{1E5ED}\u{1E5F0}-\u{1E5FA}\u{1E6C0}-\u{1E6DE}\u{1E6E0}-\u{1E6E2}\u{1E6E4}\u{1E6E5}\u{1E6E7}-\u{1E6ED}\u{1E6F0}-\u{1E6F4}\u{1E6FE}\u{1E6FF}\u{1E7E0}-\u{1E7E6}\u{1E7E8}-\u{1E7EB}\u{1E7ED}\u{1E7EE}\u{1E7F0}-\u{1E7FE}\u{1E800}-\u{1E8C4}\u{1E8C7}-\u{1E8CF}\u{1E900}-\u{1E943}\u{1E94B}\u{1E950}-\u{1E959}\u{1EC71}-\u{1ECAB}\u{1ECAD}-\u{1ECAF}\u{1ECB1}-\u{1ECB4}\u{1ED01}-\u{1ED2D}\u{1ED2F}-\u{1ED3D}\u{1EE00}-\u{1EE03}\u{1EE05}-\u{1EE1F}\u{1EE21}\u{1EE22}\u{1EE24}\u{1EE27}\u{1EE29}-\u{1EE32}\u{1EE34}-\u{1EE37}\u{1EE39}\u{1EE3B}\u{1EE42}\u{1EE47}\u{1EE49}\u{1EE4B}\u{1EE4D}-\u{1EE4F}\u{1EE51}\u{1EE52}\u{1EE54}\u{1EE57}\u{1EE59}\u{1EE5B}\u{1EE5D}\u{1EE5F}\u{1EE61}\u{1EE62}\u{1EE64}\u{1EE67}-\u{1EE6A}\u{1EE6C}-\u{1EE72}\u{1EE74}-\u{1EE77}\u{1EE79}-\u{1EE7C}\u{1EE7E}\u{1EE80}-\u{1EE89}\u{1EE8B}-\u{1EE9B}\u{1EEA1}-\u{1EEA3}\u{1EEA5}-\u{1EEA9}\u{1EEAB}-\u{1EEBB}\u{1F100}-\u{1F10C}\u{1FBF0}-\u{1FBF9}\u{20000}-\u{2A6DF}\u{2A700}-\u{2B81D}\u{2B820}-\u{2CEAD}\u{2CEB0}-\u{2EBE0}\u{2EBF0}-\u{2EE5D}\u{2F800}-\u{2FA1D}\u{30000}-\u{3134A}\u{31350}-\u{33479}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[\t ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},u=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,c=/(?:[*+-]|\d{1,9}[.)])/,l=a(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,c).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),d=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,h=/(?!\s*\])(?:\\.|[^\[\]\\])+/,f=a(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",h).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),p=a(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,c).getRegex(),g="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",m=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,y=a("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",m).replace("tag",g).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),w=a(d).replace("hr",u).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",g).getRegex(),_={blockquote:a(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",w).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:f,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:u,html:y,lheading:l,list:p,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:w,table:i,text:/^[^\n]+/},v=a("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",u).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",g).getRegex(),E=o(o({},_),{},{table:v,paragraph:a(d).replace("hr",u).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",v).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",g).getRegex()}),b=o(o({},_),{},{html:a("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",m).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:i,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:a(d).replace("hr",u).replace("heading"," *#{1,6} *[^\n]").replace("lheading",l).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()}),A=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,C=/^( {2,}|\\)\n(?!\s*$)/,I="\\p{P}\\p{S}",S=a(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,I).getRegex(),T=a(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,I).getRegex(),D=a("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,I).getRegex(),O=a("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,I).getRegex(),R=a(/\\([punct])/,"gu").replace(/punct/g,I).getRegex(),M=a(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),N=a(m).replace("(?:--\x3e|$)","--\x3e").getRegex(),k=a("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",N).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),x=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,P=a(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",x).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),B=a(/^!?\[(label)\]\[(ref)\]/).replace("label",x).replace("ref",h).getRegex(),F=a(/^!?\[(ref)\](?:\[\])?/).replace("ref",h).getRegex(),L={_backpedal:i,anyPunctuation:R,autolink:M,blockSkip:/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,br:C,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:i,emStrongLDelim:T,emStrongRDelimAst:D,emStrongRDelimUnd:O,escape:A,link:P,nolink:F,punctuation:S,reflink:B,reflinkSearch:a("reflink|nolink(?!\\()","g").replace("reflink",B).replace("nolink",F).getRegex(),tag:k,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:i},z=o(o({},L),{},{link:a(/^!?\[(label)\]\((.*?)\)/).replace("label",x).getRegex(),reflink:a(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",x).getRegex()}),U=o(o({},L),{},{escape:a(A).replace("])","~|])").getRegex(),url:a(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/}),V=o(o({},U),{},{br:a(C).replace("{2,}","*").getRegex(),text:a(U.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()}),H={normal:_,gfm:E,pedantic:b},j={normal:L,gfm:U,breaks:V,pedantic:z},G={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},W=t=>G[t];function X(t,e){if(e){if(s.escapeTest.test(t))return t.replace(s.escapeReplace,W)}else if(s.escapeTestNoEncode.test(t))return t.replace(s.escapeReplaceNoEncode,W);return t}function Y(t){try{t=encodeURI(t).replace(s.percentDecode,"%")}catch(t){return null}return t}function Z(t,e){const r=t.replace(s.findPipe,((t,e,r)=>{let n=!1,o=e;for(;--o>=0&&"\\"===r[o];)n=!n;return n?"|":" |"})).split(s.splitPipe);let n=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),e)if(r.length>e)r.splice(e);else for(;r.length<e;)r.push("");for(;n<r.length;n++)r[n]=r[n].trim().replace(s.slashPipe,"|");return r}function q(t,e,r){const n=t.length;if(0===n)return"";let o=0;for(;o<n;){const i=t.charAt(n-o-1);if(i!==e||r){if(i===e||!r)break;o++}else o++}return t.slice(0,n-o)}function K(t,e,r,n,o){const i=e.href,a=e.title||null,s=t[1].replace(o.other.outputLinkReplace,"$1");if("!"!==t[0].charAt(0)){n.state.inLink=!0;const t={type:"link",raw:r,href:i,title:a,text:s,tokens:n.inlineTokens(s)};return n.state.inLink=!1,t}return{type:"image",raw:r,href:i,title:a,text:s}}class ${constructor(e){r(this,"options",void 0),r(this,"rules",void 0),r(this,"lexer",void 0),this.options=e||t.defaults}space(t){const e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){const e=this.rules.block.code.exec(t);if(e){const t=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:q(t,"\n")}}}fences(t){const e=this.rules.block.fences.exec(t);if(e){const t=e[0],r=function(t,e,r){const n=t.match(r.other.indentCodeCompensation);if(null===n)return e;const o=n[1];return e.split("\n").map((t=>{const e=t.match(r.other.beginningSpace);if(null===e)return t;const[n]=e;return n.length>=o.length?t.slice(o.length):t})).join("\n")}(t,e[3]||"",this.rules);return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:r}}}heading(t){const e=this.rules.block.heading.exec(t);if(e){let t=e[2].trim();if(this.rules.other.endingHash.test(t)){const e=q(t,"#");this.options.pedantic?t=e.trim():e&&!this.rules.other.endingSpaceChar.test(e)||(t=e.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(t){const e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:q(e[0],"\n")}}blockquote(t){const e=this.rules.block.blockquote.exec(t);if(e){let t=q(e[0],"\n").split("\n"),r="",n="";const o=[];for(;t.length>0;){let e=!1;const i=[];let a;for(a=0;a<t.length;a++)if(this.rules.other.blockquoteStart.test(t[a]))i.push(t[a]),e=!0;else{if(e)break;i.push(t[a])}t=t.slice(a);const s=i.join("\n"),u=s.replace(this.rules.other.blockquoteSetextReplace,"\n $1").replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}\n${s}`:s,n=n?`${n}\n${u}`:u;const c=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(u,o,!0),this.lexer.state.top=c,0===t.length)break;const l=o[o.length-1];if("code"===(null==l?void 0:l.type))break;if("blockquote"===(null==l?void 0:l.type)){const e=l,i=e.raw+"\n"+t.join("\n"),a=this.blockquote(i);o[o.length-1]=a,r=r.substring(0,r.length-e.raw.length)+a.raw,n=n.substring(0,n.length-e.text.length)+a.text;break}if("list"!==(null==l?void 0:l.type));else{const e=l,i=e.raw+"\n"+t.join("\n"),a=this.list(i);o[o.length-1]=a,r=r.substring(0,r.length-l.raw.length)+a.raw,n=n.substring(0,n.length-e.raw.length)+a.raw,t=i.substring(o[o.length-1].raw.length).split("\n")}}return{type:"blockquote",raw:r,tokens:o,text:n}}}list(t){let e=this.rules.block.list.exec(t);if(e){let r=e[1].trim();const n=r.length>1,o={type:"list",raw:"",ordered:n,start:n?+r.slice(0,-1):"",loose:!1,items:[]};r=n?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=n?r:"[*+-]");const i=this.rules.other.listItemRegex(r);let a=!1;for(;t;){let r=!1,n="",s="";if(!(e=i.exec(t)))break;if(this.rules.block.hr.test(t))break;n=e[0],t=t.substring(n.length);let u=e[2].split("\n",1)[0].replace(this.rules.other.listReplaceTabs,(t=>" ".repeat(3*t.length))),c=t.split("\n",1)[0],l=!u.trim(),d=0;if(this.options.pedantic?(d=2,s=u.trimStart()):l?d=e[1].length+1:(d=e[2].search(this.rules.other.nonSpaceChar),d=d>4?1:d,s=u.slice(d),d+=e[1].length),l&&this.rules.other.blankLine.test(c)&&(n+=c+"\n",t=t.substring(c.length+1),r=!0),!r){const e=this.rules.other.nextBulletRegex(d),r=this.rules.other.hrRegex(d),o=this.rules.other.fencesBeginRegex(d),i=this.rules.other.headingBeginRegex(d),a=this.rules.other.htmlBeginRegex(d);for(;t;){const h=t.split("\n",1)[0];let f;if(c=h,this.options.pedantic?(c=c.replace(this.rules.other.listReplaceNesting," "),f=c):f=c.replace(this.rules.other.tabCharGlobal," "),o.test(c))break;if(i.test(c))break;if(a.test(c))break;if(e.test(c))break;if(r.test(c))break;if(f.search(this.rules.other.nonSpaceChar)>=d||!c.trim())s+="\n"+f.slice(d);else{if(l)break;if(u.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4)break;if(o.test(u))break;if(i.test(u))break;if(r.test(u))break;s+="\n"+c}l||c.trim()||(l=!0),n+=h+"\n",t=t.substring(h.length+1),u=f.slice(d)}}o.loose||(a?o.loose=!0:this.rules.other.doubleBlankLine.test(n)&&(a=!0));let h,f=null;this.options.gfm&&(f=this.rules.other.listIsTask.exec(s),f&&(h="[ ] "!==f[0],s=s.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:n,task:!!f,checked:h,loose:!1,text:s,tokens:[]}),o.raw+=n}o.items[o.items.length-1].raw=o.items[o.items.length-1].raw.trimEnd(),o.items[o.items.length-1].text=o.items[o.items.length-1].text.trimEnd(),o.raw=o.raw.trimEnd();for(let t=0;t<o.items.length;t++)if(this.lexer.state.top=!1,o.items[t].tokens=this.lexer.blockTokens(o.items[t].text,[]),!o.loose){const e=o.items[t].tokens.filter((t=>"space"===t.type)),r=e.length>0&&e.some((t=>this.rules.other.anyLine.test(t.raw)));o.loose=r}if(o.loose)for(let t=0;t<o.items.length;t++)o.items[t].loose=!0;return o}}html(t){const e=this.rules.block.html.exec(t);if(e)return{type:"html",block:!0,raw:e[0],pre:"pre"===e[1]||"script"===e[1]||"style"===e[1],text:e[0]}}def(t){const e=this.rules.block.def.exec(t);if(e){const t=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",n=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:e[0],href:r,title:n}}}table(t){const e=this.rules.block.table.exec(t);if(!e)return;if(!this.rules.other.tableDelimiter.test(e[2]))return;const r=Z(e[1]),n=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=e[3]&&e[3].trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split("\n"):[],i={type:"table",raw:e[0],header:[],align:[],rows:[]};if(r.length===n.length){for(const t of n)this.rules.other.tableAlignRight.test(t)?i.align.push("right"):this.rules.other.tableAlignCenter.test(t)?i.align.push("center"):this.rules.other.tableAlignLeft.test(t)?i.align.push("left"):i.align.push(null);for(let t=0;t<r.length;t++)i.header.push({text:r[t],tokens:this.lexer.inline(r[t]),header:!0,align:i.align[t]});for(const t of o)i.rows.push(Z(t,i.header.length).map(((t,e)=>({text:t,tokens:this.lexer.inline(t),header:!1,align:i.align[e]}))));return i}}lheading(t){const e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:"="===e[2].charAt(0)?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(t){const e=this.rules.block.paragraph.exec(t);if(e){const t="\n"===e[1].charAt(e[1].length-1)?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(t){const e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){const e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){const e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){const e=this.rules.inline.link.exec(t);if(e){const t=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(t)){if(!this.rules.other.endAngleBracket.test(t))return;const e=q(t.slice(0,-1),"\\");if((t.length-e.length)%2==0)return}else{const t=function(t,e){if(-1===t.indexOf(e[1]))return-1;let r=0;for(let n=0;n<t.length;n++)if("\\"===t[n])n++;else if(t[n]===e[0])r++;else if(t[n]===e[1]&&(r--,r<0))return n;return-1}(e[2],"()");if(t>-1){const r=(0===e[0].indexOf("!")?5:4)+e[1].length+t;e[2]=e[2].substring(0,t),e[0]=e[0].substring(0,r).trim(),e[3]=""}}let r=e[2],n="";if(this.options.pedantic){const t=this.rules.other.pedanticHrefTitle.exec(r);t&&(r=t[1],n=t[3])}else n=e[3]?e[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(r=this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?r.slice(1):r.slice(1,-1)),K(e,{href:r?r.replace(this.rules.inline.anyPunctuation,"$1"):r,title:n?n.replace(this.rules.inline.anyPunctuation,"$1"):n},e[0],this.lexer,this.rules)}}reflink(t,e){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){const t=e[(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!t){const t=r[0].charAt(0);return{type:"text",raw:t,text:t}}return K(r,t,r[0],this.lexer,this.rules)}}emStrong(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",n=this.rules.inline.emStrongLDelim.exec(t);if(n&&(!n[3]||!r.match(this.rules.other.unicodeAlphaNumeric))&&(!n[1]&&!n[2]||!r||this.rules.inline.punctuation.exec(r))){const r=[...n[0]].length-1;let o,i,a=r,s=0;const u="*"===n[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(u.lastIndex=0,e=e.slice(-1*t.length+r);null!=(n=u.exec(e));){if(o=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!o)continue;if(i=[...o].length,n[3]||n[4]){a+=i;continue}if((n[5]||n[6])&&r%3&&!((r+i)%3)){s+=i;continue}if(a-=i,a>0)continue;i=Math.min(i,i+a+s);const e=[...n[0]][0].length,u=t.slice(0,r+n.index+e+i);if(Math.min(r,i)%2){const t=u.slice(1,-1);return{type:"em",raw:u,text:t,tokens:this.lexer.inlineTokens(t)}}const c=u.slice(2,-2);return{type:"strong",raw:u,text:c,tokens:this.lexer.inlineTokens(c)}}}}codespan(t){const e=this.rules.inline.code.exec(t);if(e){let t=e[2].replace(this.rules.other.newLineCharGlobal," ");const r=this.rules.other.nonSpaceChar.test(t),n=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return r&&n&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:e[0],text:t}}}br(t){const e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){const e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){const e=this.rules.inline.autolink.exec(t);if(e){let t,r;return"@"===e[2]?(t=e[1],r="mailto:"+t):(t=e[1],r=t),{type:"link",raw:e[0],text:t,href:r,tokens:[{type:"text",raw:t,text:t}]}}}url(t){let e;if(e=this.rules.inline.url.exec(t)){let t,o;if("@"===e[2])t=e[0],o="mailto:"+t;else{let i;do{var r,n;i=e[0],e[0]=null!==(r=null===(n=this.rules.inline._backpedal.exec(e[0]))||void 0===n?void 0:n[0])&&void 0!==r?r:""}while(i!==e[0]);t=e[0],o="www."===e[1]?"http://"+e[0]:e[0]}return{type:"link",raw:e[0],text:t,href:o,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(t){const e=this.rules.inline.text.exec(t);if(e){const t=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:t}}}}class J{constructor(e){r(this,"tokens",void 0),r(this,"options",void 0),r(this,"state",void 0),r(this,"tokenizer",void 0),r(this,"inlineQueue",void 0),this.tokens=[],this.tokens.links=Object.create(null),this.options=e||t.defaults,this.options.tokenizer=this.options.tokenizer||new $,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const n={other:s,block:H.normal,inline:j.normal};this.options.pedantic?(n.block=H.pedantic,n.inline=j.pedantic):this.options.gfm&&(n.block=H.gfm,this.options.breaks?n.inline=j.breaks:n.inline=j.gfm),this.tokenizer.rules=n}static get rules(){return{block:H,inline:j}}static lex(t,e){return new J(e).lex(t)}static lexInline(t,e){return new J(e).inlineTokens(t)}lex(t){t=t.replace(s.carriageReturn,"\n"),this.blockTokens(t,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){const e=this.inlineQueue[t];this.inlineTokens(e.src,e.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t){let e,r,n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];for(this.options.pedantic&&(t=t.replace(s.tabCharGlobal," ").replace(s.spaceLine,""));t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((r=>!!(e=r.call({lexer:this},t,o))&&(t=t.substring(e.raw.length),o.push(e),!0)))))if(e=this.tokenizer.space(t))t=t.substring(e.raw.length),1===e.raw.length&&o.length>0?o[o.length-1].raw+="\n":o.push(e);else if(e=this.tokenizer.code(t))t=t.substring(e.raw.length),r=o[o.length-1],!r||"paragraph"!==r.type&&"text"!==r.type?o.push(e):(r.raw+="\n"+e.raw,r.text+="\n"+e.text,this.inlineQueue[this.inlineQueue.length-1].src=r.text);else if(e=this.tokenizer.fences(t))t=t.substring(e.raw.length),o.push(e);else if(e=this.tokenizer.heading(t))t=t.substring(e.raw.length),o.push(e);else if(e=this.tokenizer.hr(t))t=t.substring(e.raw.length),o.push(e);else if(e=this.tokenizer.blockquote(t))t=t.substring(e.raw.length),o.push(e);else if(e=this.tokenizer.list(t))t=t.substring(e.raw.length),o.push(e);else if(e=this.tokenizer.html(t))t=t.substring(e.raw.length),o.push(e);else if(e=this.tokenizer.def(t))t=t.substring(e.raw.length),r=o[o.length-1],!r||"paragraph"!==r.type&&"text"!==r.type?this.tokens.links[e.tag]||(this.tokens.links[e.tag]={href:e.href,title:e.title}):(r.raw+="\n"+e.raw,r.text+="\n"+e.raw,this.inlineQueue[this.inlineQueue.length-1].src=r.text);else if(e=this.tokenizer.table(t))t=t.substring(e.raw.length),o.push(e);else if(e=this.tokenizer.lheading(t))t=t.substring(e.raw.length),o.push(e);else{var a;if(n=t,this.options.extensions&&this.options.extensions.startBlock){let e=1/0;const r=t.slice(1);let o;this.options.extensions.startBlock.forEach((t=>{o=t.call({lexer:this},r),"number"==typeof o&&o>=0&&(e=Math.min(e,o))})),e<1/0&&e>=0&&(n=t.substring(0,e+1))}if(this.state.top&&(e=this.tokenizer.paragraph(n)))r=o[o.length-1],i&&"paragraph"===(null===(a=r)||void 0===a?void 0:a.type)?(r.raw+="\n"+e.raw,r.text+="\n"+e.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):o.push(e),i=n.length!==t.length,t=t.substring(e.raw.length);else if(e=this.tokenizer.text(t))t=t.substring(e.raw.length),r=o[o.length-1],r&&"text"===r.type?(r.raw+="\n"+e.raw,r.text+="\n"+e.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):o.push(e);else if(t){const e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}return this.state.top=!0,o}inline(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return this.inlineQueue.push({src:t,tokens:e}),e}inlineTokens(t){let e,r,n,o,i,a,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],u=t;if(this.tokens.links){const t=Object.keys(this.tokens.links);if(t.length>0)for(;null!=(o=this.tokenizer.rules.inline.reflinkSearch.exec(u));)t.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(u=u.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+u.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(o=this.tokenizer.rules.inline.blockSkip.exec(u));)u=u.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+u.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(o=this.tokenizer.rules.inline.anyPunctuation.exec(u));)u=u.slice(0,o.index)+"++"+u.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;t;)if(i||(a=""),i=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((r=>!!(e=r.call({lexer:this},t,s))&&(t=t.substring(e.raw.length),s.push(e),!0)))))if(e=this.tokenizer.escape(t))t=t.substring(e.raw.length),s.push(e);else if(e=this.tokenizer.tag(t))t=t.substring(e.raw.length),r=s[s.length-1],s.push(e);else if(e=this.tokenizer.link(t))t=t.substring(e.raw.length),s.push(e);else if(e=this.tokenizer.reflink(t,this.tokens.links))t=t.substring(e.raw.length),r=s[s.length-1],r&&"text"===e.type&&"text"===r.type?(r.raw+=e.raw,r.text+=e.text):s.push(e);else if(e=this.tokenizer.emStrong(t,u,a))t=t.substring(e.raw.length),s.push(e);else if(e=this.tokenizer.codespan(t))t=t.substring(e.raw.length),s.push(e);else if(e=this.tokenizer.br(t))t=t.substring(e.raw.length),s.push(e);else if(e=this.tokenizer.del(t))t=t.substring(e.raw.length),s.push(e);else if(e=this.tokenizer.autolink(t))t=t.substring(e.raw.length),s.push(e);else if(this.state.inLink||!(e=this.tokenizer.url(t))){if(n=t,this.options.extensions&&this.options.extensions.startInline){let e=1/0;const r=t.slice(1);let o;this.options.extensions.startInline.forEach((t=>{o=t.call({lexer:this},r),"number"==typeof o&&o>=0&&(e=Math.min(e,o))})),e<1/0&&e>=0&&(n=t.substring(0,e+1))}if(e=this.tokenizer.inlineText(n))t=t.substring(e.raw.length),"_"!==e.raw.slice(-1)&&(a=e.raw.slice(-1)),i=!0,r=s[s.length-1],r&&"text"===r.type?(r.raw+=e.raw,r.text+=e.text):s.push(e);else if(t){const e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}else t=t.substring(e.raw.length),s.push(e);return s}}class Q{constructor(e){r(this,"options",void 0),r(this,"parser",void 0),this.options=e||t.defaults}space(t){return""}code(t){var e;let{text:r,lang:n,escaped:o}=t;const i=null===(e=(n||"").match(s.notSpaceStart))||void 0===e?void 0:e[0],a=r.replace(s.endingNewline,"")+"\n";return i?'<pre><code class="language-'+X(i)+'">'+(o?a:X(a,!0))+"</code></pre>\n":"<pre><code>"+(o?a:X(a,!0))+"</code></pre>\n"}blockquote(t){let{tokens:e}=t;return`<blockquote>\n${this.parser.parse(e)}</blockquote>\n`}html(t){let{text:e}=t;return e}heading(t){let{tokens:e,depth:r}=t;return`<h${r}>${this.parser.parseInline(e)}</h${r}>\n`}hr(t){return"<hr>\n"}list(t){const e=t.ordered,r=t.start;let n="";for(let e=0;e<t.items.length;e++){const r=t.items[e];n+=this.listitem(r)}const o=e?"ol":"ul";return"<"+o+(e&&1!==r?' start="'+r+'"':"")+">\n"+n+"</"+o+">\n"}listitem(t){let e="";if(t.task){const r=this.checkbox({checked:!!t.checked});t.loose?t.tokens.length>0&&"paragraph"===t.tokens[0].type?(t.tokens[0].text=r+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&"text"===t.tokens[0].tokens[0].type&&(t.tokens[0].tokens[0].text=r+" "+X(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:r+" ",text:r+" ",escaped:!0}):e+=r+" "}return e+=this.parser.parse(t.tokens,!!t.loose),`<li>${e}</li>\n`}checkbox(t){let{checked:e}=t;return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph(t){let{tokens:e}=t;return`<p>${this.parser.parseInline(e)}</p>\n`}table(t){let e="",r="";for(let e=0;e<t.header.length;e++)r+=this.tablecell(t.header[e]);e+=this.tablerow({text:r});let n="";for(let e=0;e<t.rows.length;e++){const o=t.rows[e];r="";for(let t=0;t<o.length;t++)r+=this.tablecell(o[t]);n+=this.tablerow({text:r})}return n&&(n=`<tbody>${n}</tbody>`),"<table>\n<thead>\n"+e+"</thead>\n"+n+"</table>\n"}tablerow(t){let{text:e}=t;return`<tr>\n${e}</tr>\n`}tablecell(t){const e=this.parser.parseInline(t.tokens),r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+e+`</${r}>\n`}strong(t){let{tokens:e}=t;return`<strong>${this.parser.parseInline(e)}</strong>`}em(t){let{tokens:e}=t;return`<em>${this.parser.parseInline(e)}</em>`}codespan(t){let{text:e}=t;return`<code>${X(e,!0)}</code>`}br(t){return"<br>"}del(t){let{tokens:e}=t;return`<del>${this.parser.parseInline(e)}</del>`}link(t){let{href:e,title:r,tokens:n}=t;const o=this.parser.parseInline(n),i=Y(e);if(null===i)return o;let a='<a href="'+(e=i)+'"';return r&&(a+=' title="'+X(r)+'"'),a+=">"+o+"</a>",a}image(t){let{href:e,title:r,text:n}=t;const o=Y(e);if(null===o)return X(n);let i=`<img src="${e=o}" alt="${n}"`;return r&&(i+=` title="${X(r)}"`),i+=">",i}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:X(t.text)}}class tt{strong(t){let{text:e}=t;return e}em(t){let{text:e}=t;return e}codespan(t){let{text:e}=t;return e}del(t){let{text:e}=t;return e}html(t){let{text:e}=t;return e}text(t){let{text:e}=t;return e}link(t){let{text:e}=t;return""+e}image(t){let{text:e}=t;return""+e}br(){return""}}class et{constructor(e){r(this,"options",void 0),r(this,"renderer",void 0),r(this,"textRenderer",void 0),this.options=e||t.defaults,this.options.renderer=this.options.renderer||new Q,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new tt}static parse(t,e){return new et(e).parse(t)}static parseInline(t,e){return new et(e).parseInline(t)}parse(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r="";for(let n=0;n<t.length;n++){const o=t[n];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[o.type]){const t=o,e=this.options.extensions.renderers[t.type].call({parser:this},t);if(!1!==e||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(t.type)){r+=e||"";continue}}const i=o;switch(i.type){case"space":r+=this.renderer.space(i);continue;case"hr":r+=this.renderer.hr(i);continue;case"heading":r+=this.renderer.heading(i);continue;case"code":r+=this.renderer.code(i);continue;case"table":r+=this.renderer.table(i);continue;case"blockquote":r+=this.renderer.blockquote(i);continue;case"list":r+=this.renderer.list(i);continue;case"html":r+=this.renderer.html(i);continue;case"paragraph":r+=this.renderer.paragraph(i);continue;case"text":{let o=i,a=this.renderer.text(o);for(;n+1<t.length&&"text"===t[n+1].type;)o=t[++n],a+="\n"+this.renderer.text(o);r+=e?this.renderer.paragraph({type:"paragraph",raw:a,text:a,tokens:[{type:"text",raw:a,text:a,escaped:!0}]}):a;continue}default:{const t='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(t),"";throw new Error(t)}}}return r}parseInline(t,e){e=e||this.renderer;let r="";for(let n=0;n<t.length;n++){const o=t[n];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[o.type]){const t=this.options.extensions.renderers[o.type].call({parser:this},o);if(!1!==t||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){r+=t||"";continue}}const i=o;switch(i.type){case"escape":case"text":r+=e.text(i);break;case"html":r+=e.html(i);break;case"link":r+=e.link(i);break;case"image":r+=e.image(i);break;case"strong":r+=e.strong(i);break;case"em":r+=e.em(i);break;case"codespan":r+=e.codespan(i);break;case"br":r+=e.br(i);break;case"del":r+=e.del(i);break;default:{const t='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(t),"";throw new Error(t)}}}return r}}class rt{constructor(e){r(this,"options",void 0),r(this,"block",void 0),this.options=e||t.defaults}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}provideLexer(){return this.block?J.lex:J.lexInline}provideParser(){return this.block?et.parse:et.parseInline}}r(rt,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"]));class nt{constructor(){r(this,"defaults",{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}),r(this,"options",this.setOptions),r(this,"parse",this.parseMarkdown(!0)),r(this,"parseInline",this.parseMarkdown(!1)),r(this,"Parser",et),r(this,"Renderer",Q),r(this,"TextRenderer",tt),r(this,"Lexer",J),r(this,"Tokenizer",$),r(this,"Hooks",rt),this.use(...arguments)}walkTokens(t,e){let r=[];for(const o of t)switch(r=r.concat(e.call(this,o)),o.type){case"table":{const t=o;for(const n of t.header)r=r.concat(this.walkTokens(n.tokens,e));for(const n of t.rows)for(const t of n)r=r.concat(this.walkTokens(t.tokens,e));break}case"list":{const t=o;r=r.concat(this.walkTokens(t.items,e));break}default:{var n;const t=o;null!==(n=this.defaults.extensions)&&void 0!==n&&null!==(n=n.childTokens)&&void 0!==n&&n[t.type]?this.defaults.extensions.childTokens[t.type].forEach((n=>{const o=t[n].flat(1/0);r=r.concat(this.walkTokens(o,e))})):t.tokens&&(r=r.concat(this.walkTokens(t.tokens,e)))}}return r}use(){const t=this.defaults.extensions||{renderers:{},childTokens:{}};for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return r.forEach((e=>{const r=o({},e);if(r.async=this.defaults.async||r.async||!1,e.extensions&&(e.extensions.forEach((e=>{if(!e.name)throw new Error("extension name required");if("renderer"in e){const r=t.renderers[e.name];t.renderers[e.name]=r?function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];let i=e.renderer.apply(this,n);return!1===i&&(i=r.apply(this,n)),i}:e.renderer}if("tokenizer"in e){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");const r=t[e.level];r?r.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&("block"===e.level?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:"inline"===e.level&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}"childTokens"in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)})),r.extensions=t),e.renderer){const t=this.defaults.renderer||new Q(this.defaults);for(const r in e.renderer){if(!(r in t))throw new Error(`renderer '${r}' does not exist`);if(["options","parser"].includes(r))continue;const n=r,o=e.renderer[n],i=t[n];t[n]=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];let a=o.apply(t,r);return!1===a&&(a=i.apply(t,r)),a||""}}r.renderer=t}if(e.tokenizer){const t=this.defaults.tokenizer||new $(this.defaults);for(const r in e.tokenizer){if(!(r in t))throw new Error(`tokenizer '${r}' does not exist`);if(["options","rules","lexer"].includes(r))continue;const n=r,o=e.tokenizer[n],i=t[n];t[n]=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];let a=o.apply(t,r);return!1===a&&(a=i.apply(t,r)),a}}r.tokenizer=t}if(e.hooks){const t=this.defaults.hooks||new rt;for(const r in e.hooks){if(!(r in t))throw new Error(`hook '${r}' does not exist`);if(["options","block"].includes(r))continue;const n=r,o=e.hooks[n],i=t[n];rt.passThroughHooks.has(r)?t[n]=e=>{if(this.defaults.async)return Promise.resolve(o.call(t,e)).then((e=>i.call(t,e)));const r=o.call(t,e);return i.call(t,r)}:t[n]=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];let a=o.apply(t,r);return!1===a&&(a=i.apply(t,r)),a}}r.hooks=t}if(e.walkTokens){const t=this.defaults.walkTokens,n=e.walkTokens;r.walkTokens=function(e){let r=[];return r.push(n.call(this,e)),t&&(r=r.concat(t.call(this,e))),r}}this.defaults=o(o({},this.defaults),r)})),this}setOptions(t){return this.defaults=o(o({},this.defaults),t),this}lexer(t,e){return J.lex(t,null!=e?e:this.defaults)}parser(t,e){return et.parse(t,null!=e?e:this.defaults)}parseMarkdown(t){return(e,r)=>{const n=o({},r),i=o(o({},this.defaults),n),a=this.onError(!!i.silent,!!i.async);if(!0===this.defaults.async&&!1===n.async)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(null==e)return a(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof e)return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));i.hooks&&(i.hooks.options=i,i.hooks.block=t);const s=i.hooks?i.hooks.provideLexer():t?J.lex:J.lexInline,u=i.hooks?i.hooks.provideParser():t?et.parse:et.parseInline;if(i.async)return Promise.resolve(i.hooks?i.hooks.preprocess(e):e).then((t=>s(t,i))).then((t=>i.hooks?i.hooks.processAllTokens(t):t)).then((t=>i.walkTokens?Promise.all(this.walkTokens(t,i.walkTokens)).then((()=>t)):t)).then((t=>u(t,i))).then((t=>i.hooks?i.hooks.postprocess(t):t)).catch(a);try{i.hooks&&(e=i.hooks.preprocess(e));let t=s(e,i);i.hooks&&(t=i.hooks.processAllTokens(t)),i.walkTokens&&this.walkTokens(t,i.walkTokens);let r=u(t,i);return i.hooks&&(r=i.hooks.postprocess(r)),r}catch(t){return a(t)}}}onError(t,e){return r=>{if(r.message+="\nPlease report this to https://github.com/markedjs/marked.",t){const t="<p>An error occurred:</p><pre>"+X(r.message+"",!0)+"</pre>";return e?Promise.resolve(t):t}if(e)return Promise.reject(r);throw r}}}const ot=new nt;function it(t,e){return ot.parse(t,e)}it.options=it.setOptions=function(t){return ot.setOptions(t),it.defaults=ot.defaults,n(it.defaults),it},it.getDefaults=e,it.defaults=t.defaults,it.use=function(){return ot.use(...arguments),it.defaults=ot.defaults,n(it.defaults),it},it.walkTokens=function(t,e){return ot.walkTokens(t,e)},it.parseInline=ot.parseInline,it.Parser=et,it.parser=et.parse,it.Renderer=Q,it.TextRenderer=tt,it.Lexer=J,it.lexer=J.lex,it.Tokenizer=$,it.Hooks=rt,it.parse=it;const at=it.options,st=it.setOptions,ut=it.use,ct=it.walkTokens,lt=it.parseInline,dt=it,ht=et.parse,ft=J.lex;t.Hooks=rt,t.Lexer=J,t.Marked=nt,t.Parser=et,t.Renderer=Q,t.TextRenderer=tt,t.Tokenizer=$,t.getDefaults=e,t.lexer=ft,t.marked=it,t.options=at,t.parse=dt,t.parseInline=lt,t.parser=ht,t.setOptions=st,t.use=ut,t.walkTokens=ct}(Nf)),Nf).marked}catch(t){console.log("marked is not supported",t)}const xf=kf,Pf=t=>{let{text:e,id:r,testid:n,clientHeight:o}=t;const i=!!o&&o<700,a=tf({tagName:"div",style:{position:"relative",zIndex:"2",width:"100%",minHeight:i?"48px":"70px",textAlign:"center",backgroundColor:"#262626",display:"flex",justifyContent:"center",alignItems:"center"},id:r,testid:n});return ef(a,Rf({text:e,level:i?6:5,style:{color:"white"},id:"page-header-text"})),a};const Bf=t=>{let e;return e="document_front"===t?function(){const t=document.createElementNS("http://www.w3.org/2000/svg","svg");return t.setAttribute("id","front-document-animation"),t.setAttribute("viewBox","0 0 235 147"),t.setAttribute("preserveAspectRatio","xMidYMid meet"),t.innerHTML='\n <style>\n .s0 { opacity: .4;fill: #ffffff } \n .s1 { opacity: .4;fill: none;stroke: #6981ff;stroke-width: 2 } \n .s2 { opacity: .4;fill: #6981ff } \n .s3 { opacity: .4;fill: #c3cdff } \n .s4 { opacity: .4;fill: #f0f2ff } \n </style>\n <path class="s0" d="m229.43 3h-224.86c-2.21 0-4 1.79-4 4v130.14c0 2.21 1.79 4 4 4h224.86c2.21 0 4-1.79 4-4v-130.14c0-2.21-1.79-4-4-4z"/>\n <path class="s1" d="m229.43 4h-224.86c-1.66 0-3 1.34-3 3v130.14c0 1.65 1.34 3 3 3h224.86c1.66 0 3-1.35 3-3v-130.14c0-1.66-1.34-3-3-3z"/>\n <path class="s2" d="m1.56 5.99c0-1.11 0.89-2 2-2h225.9c1.1 0 1.99 0.89 1.99 2v17.73h-229.89z"/>\n <path class="s2" d="m59.77 76.46h-7.89c-5.45 0-9.87 4.42-9.87 9.87 0 1.08 0.89 1.97 1.98 1.97h23.68c1.09 0 1.97-0.88 1.97-1.97 0-5.45-4.42-9.87-9.87-9.87z"/>\n <path class="s2" d="m56.08 73.8c4.71 0 8.53-3.82 8.53-8.54 0-4.71-3.82-8.53-8.53-8.53-4.72 0-8.54 3.82-8.54 8.53 0 4.72 3.82 8.54 8.54 8.54z"/>\n <path class="s1" d="m43.99 50.36h-7.84c-2.21 0-4 1.79-4 4v7.84"/>\n <path class="s1" d="m32.15 83.91v7.84c0 2.21 1.79 4 4 4h7.84"/>\n <path class="s1" d="m66.68 95.75h7.84c2.21 0 4-1.79 4-4v-7.84"/>\n <path class="s1" d="m78.52 62.2v-7.84c0-2.21-1.79-4-4-4h-7.84"/>\n <path class="s2" d="m107.13 53.32c0-2.18-1.76-3.95-3.94-3.95-2.18 0-3.95 1.77-3.95 3.95 0 2.18 1.77 3.95 3.95 3.95 2.18 0 3.94-1.77 3.94-3.95z"/>\n <path class="s3" d="m200.85 49.37h-84.82c-0.56 0-1 0.45-1 1v5.9c0 0.55 0.44 1 1 1h84.82c0.56 0 1-0.45 1-1v-5.9c0-0.55-0.44-1-1-1z"/>\n <path class="s2" d="m107.13 73.05c0-2.17-1.76-3.94-3.94-3.94-2.18 0-3.95 1.77-3.95 3.94 0 2.18 1.77 3.95 3.95 3.95 2.18 0 3.94-1.77 3.94-3.95z"/>\n <path class="s3" d="m179.15 69.11h-63.12c-0.56 0-1 0.45-1 1v5.89c0 0.55 0.44 1 1 1h63.12c0.55 0 1-0.45 1-1v-5.89c0-0.55-0.45-1-1-1z"/>\n <path class="s2" d="m107.13 92.79c0-2.18-1.76-3.95-3.94-3.95-2.18 0-3.95 1.77-3.95 3.95 0 2.18 1.77 3.94 3.95 3.94 2.18 0 3.94-1.76 3.94-3.94z"/>\n <path class="s3" d="m166.32 88.84h-50.29c-0.55 0-1 0.45-1 1v5.89c0 0.56 0.45 1 1 1h50.29c0.55 0 1-0.44 1-1v-5.89c0-0.55-0.45-1-1-1z"/>\n <path class="s4" d="m221.57 11.88h-84.82c-0.56 0-1 0.45-1 1v1.95c0 0.55 0.44 1 1 1h84.82c0.56 0 1-0.45 1-1v-1.95c0-0.55-0.44-1-1-1z"/>\n <g style="opacity: .05">\n </g>\n ',t}():function(){const t=document.createElementNS("http://www.w3.org/2000/svg","svg");return t.setAttribute("width","270"),t.setAttribute("height","175"),t.setAttribute("viewBox","40 60 250 140"),t.innerHTML='\n <g transform="matrix(1,0,0,1,0,0)"><g id="12" opacity="1" style="mix-blend-mode:normal"><g><defs><clipPath id="12_clipPath" x="-50%" y="-50%" width="200%" height="200%"><path d="M0,260v-260h333v260z" fill="white" clip-rule="nonzero"></path></clipPath></defs><g clip-path="url(#12_clipPath)"><g transform="matrix(1,0,0,1,48,60)"><g id="83287" opacity="1" style="mix-blend-mode:normal"><g><g><g transform="matrix(1,0,0,1,0,0)"><g id="83288" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83288_fill_path" d="M4,140c-2.20914,0 -4,-1.79086 -4,-4v-132c0,-2.20914 1.79086,-4 4,-4h228c2.20914,0 4,1.79086 4,4v132c0,2.20914 -1.79086,4 -4,4z" fill-rule="nonzero" fill="rgb(255, 255, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path><defs><clipPath id="ligziij3rlyasnggflf" clipPathUnits="userSpaceOnUse"><path d="M4,140c-2.20914,0 -4,-1.79086 -4,-4v-132c0,-2.20914 1.79086,-4 4,-4h228c2.20914,0 4,1.79086 4,4v132c0,2.20914 -1.79086,4 -4,4z"></path></clipPath></defs><path id="83288_stroke_path" d="M4,140c-2.20914,0 -4,-1.79086 -4,-4v-132c0,-2.20914 1.79086,-4 4,-4h228c2.20914,0 4,1.79086 4,4v132c0,2.20914 -1.79086,4 -4,4z" fill="none" stroke="rgb(195, 205, 255)" stroke-width="4" stroke-linecap="butt" stroke-linejoin="butt" stroke-dasharray="0 0" stroke-opacity="1" clip-path="url(#ligziij3rlyasnggflf)"></path></g></g></g></g><g transform="matrix(1,0,0,1,97,116.5)"><g id="83289" opacity="0.4" style="mix-blend-mode:normal"><g><g><path id="83289_fill_path" d="M135,0l-135,23.5h135z" fill-rule="nonzero" fill="rgb(244, 247, 251)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,2,2)"><g id="83290" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83290_fill_path" d="M0,2c0,-1 1,-2 2,-2h228c1,0 2,1 2,2v18h-232z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(-1,0,0,-1,228.54000000000002,62.99940000000001)"><g id="83291" opacity="0.2" style="mix-blend-mode:lighten"><g><g><path id="83291_fill_path" d="M227,-0.00002l-227,60.99934l226.99998,0.00002z" fill-rule="nonzero" fill="rgb(255, 255, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,24,42)"><g id="83292" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83292_fill_path" d="M1,8c-0.55228,0 -1,-0.44772 -1,-1v-6c0,-0.55228 0.44772,-1 1,-1h109c0.55228,0 1,0.44772 1,1v6c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(195, 205, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,143,42)"><g id="83293" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83293_fill_path" d="M1,8c-0.55228,0 -1,-0.44772 -1,-1v-6c0,-0.55228 0.44772,-1 1,-1h65c0.55228,0 1,0.44772 1,1v6c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(195, 205, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,24,58)"><g id="83294" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83294_fill_path" d="M1,8c-0.55228,0 -1,-0.44772 -1,-1v-6c0,-0.55228 0.44772,-1 1,-1h64c0.55228,0 1,0.44772 1,1v6c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(195, 205, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,98,58)"><g id="83295" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83295_fill_path" d="M1,8c-0.55228,0 -1,-0.44772 -1,-1v-6c0,-0.55228 0.44772,-1 1,-1h86c0.55228,0 1,0.44772 1,1v6c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(195, 205, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,194,58)"><g id="83296" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83296_fill_path" d="M1,8c-0.55228,0 -1,-0.44772 -1,-1v-6c0,-0.55228 0.44772,-1 1,-1h14c0.55228,0 1,0.44772 1,1v6c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(195, 205, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,24,74)"><g id="83297" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83297_fill_path" d="M1,6c-0.55228,0 -1,-0.44772 -1,-1v-4c0,-0.55228 0.44772,-1 1,-1h83c0.55228,0 1,0.44772 1,1v4c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(244, 247, 251)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,117,74)"><g id="83298" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83298_fill_path" d="M1,6c-0.55228,0 -1,-0.44772 -1,-1v-4c0,-0.55228 0.44772,-1 1,-1h38c0.55228,0 1,0.44772 1,1v4c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(244, 247, 251)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,165,74)"><g id="83299" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83299_fill_path" d="M1,6c-0.55228,0 -1,-0.44772 -1,-1v-4c0,-0.55228 0.44772,-1 1,-1h43c0.55228,0 1,0.44772 1,1v4c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,68,92)"><g id="83300" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83300_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,74,92)"><g id="83301" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83301_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,80,92)"><g id="83302" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83302_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,86,92)"><g id="83303" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83303_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,92,92)"><g id="83304" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83304_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,98,92)"><g id="83305" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83305_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,104,92)"><g id="83306" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83306_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,110,92)"><g id="83307" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83307_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,116,92)"><g id="83308" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83308_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,122,92)"><g id="83309" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83309_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,128,92)"><g id="83310" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83310_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,134,92)"><g id="83311" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83311_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,140,92)"><g id="83312" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83312_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,146,92)"><g id="83313" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83313_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,152,92)"><g id="83314" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83314_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,158,92)"><g id="83315" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83315_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,164,92)"><g id="83316" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83316_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,170,92)"><g id="83317" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83317_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,97,116)"><g id="83318" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83318_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h38c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(195, 205, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,2,21)"><g id="83320" opacity="0.2" style="mix-blend-mode:normal"><g><g><path id="83320_fill_path" d="M0,118v-118h234v118z" fill-rule="nonzero" fill="rgb(255, 255, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g></g></g></g></g><g transform="matrix(1,0,0,1,48,60)"><g id="83268" opacity="1" style="mix-blend-mode:normal"><g><g><g transform="matrix(1,0,0,1,0,0)"><g id="83269" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83269_fill_path" d="M4,140c-2.20914,0 -4,-1.79086 -4,-4v-132c0,-2.20914 1.79086,-4 4,-4h228c2.20914,0 4,1.79086 4,4v132c0,2.20914 -1.79086,4 -4,4z" fill-rule="nonzero" fill="rgb(255, 255, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path><defs><clipPath id="ligziij4hmxrv43iz67" clipPathUnits="userSpaceOnUse"><path d="M4,140c-2.20914,0 -4,-1.79086 -4,-4v-132c0,-2.20914 1.79086,-4 4,-4h228c2.20914,0 4,1.79086 4,4v132c0,2.20914 -1.79086,4 -4,4z"></path></clipPath></defs><path id="83269_stroke_path" d="M4,140c-2.20914,0 -4,-1.79086 -4,-4v-132c0,-2.20914 1.79086,-4 4,-4h228c2.20914,0 4,1.79086 4,4v132c0,2.20914 -1.79086,4 -4,4z" fill="none" stroke="rgb(195, 205, 255)" stroke-width="4" stroke-linecap="butt" stroke-linejoin="butt" stroke-dasharray="0 0" stroke-opacity="1" clip-path="url(#ligziij4hmxrv43iz67)"></path></g></g></g></g><g transform="matrix(1,0,0,1,196,100)"><g id="83270" opacity="0.4" style="mix-blend-mode:normal"><g><g><defs><clipPath id="ligziij4roiiqcgytn" clipPathUnits="userSpaceOnUse"><path d="M24,12c0,1.2588 -0.198,2.5104 -0.5868,3.708c-0.3888,1.1976 -0.9648,2.3268 -1.7052,3.3456c-0.7404,1.0188 -1.6356,1.914 -2.6544,2.6544c-1.0188,0.7404 -2.148,1.3164 -3.3456,1.7052c-1.1976,0.3888 -2.4492,0.5868 -3.708,0.5868c-1.2588,0 -2.5104,-0.198 -3.708,-0.5868c-1.1976,-0.3888 -2.3268,-0.9648 -3.3456,-1.7052c-1.0188,-0.7404 -1.914,-1.6356 -2.6544,-2.6544c-0.7404,-1.0188 -1.3164,-2.148 -1.7052,-3.3456c-0.3888,-1.1976 -0.5868,-2.4492 -0.5868,-3.708c0,-1.2588 0.198,-2.5104 0.5868,-3.708c0.3888,-1.1976 0.9648,-2.3268 1.7052,-3.3456c0.7404,-1.0188 1.6356,-1.914 2.6544,-2.6544c1.0188,-0.7404 2.148,-1.3164 3.3456,-1.7052c1.1976,-0.3888 2.4492,-0.5868 3.708,-0.5868c1.2588,0 2.5104,0.198 3.708,0.5868c1.1976,0.3888 2.3268,0.9648 3.3456,1.7052c1.0188,0.7404 1.914,1.6356 2.6544,2.6544c0.7404,1.0188 1.3164,2.148 1.7052,3.3456c0.3888,1.1976 0.5868,2.4492 0.5868,3.708z"></path></clipPath></defs><path id="83270_stroke_path" d="M24,12c0,1.2588 -0.198,2.5104 -0.5868,3.708c-0.3888,1.1976 -0.9648,2.3268 -1.7052,3.3456c-0.7404,1.0188 -1.6356,1.914 -2.6544,2.6544c-1.0188,0.7404 -2.148,1.3164 -3.3456,1.7052c-1.1976,0.3888 -2.4492,0.5868 -3.708,0.5868c-1.2588,0 -2.5104,-0.198 -3.708,-0.5868c-1.1976,-0.3888 -2.3268,-0.9648 -3.3456,-1.7052c-1.0188,-0.7404 -1.914,-1.6356 -2.6544,-2.6544c-0.7404,-1.0188 -1.3164,-2.148 -1.7052,-3.3456c-0.3888,-1.1976 -0.5868,-2.4492 -0.5868,-3.708c0,-1.2588 0.198,-2.5104 0.5868,-3.708c0.3888,-1.1976 0.9648,-2.3268 1.7052,-3.3456c0.7404,-1.0188 1.6356,-1.914 2.6544,-2.6544c1.0188,-0.7404 2.148,-1.3164 3.3456,-1.7052c1.1976,-0.3888 2.4492,-0.5868 3.708,-0.5868c1.2588,0 2.5104,0.198 3.708,0.5868c1.1976,0.3888 2.3268,0.9648 3.3456,1.7052c1.0188,0.7404 1.914,1.6356 2.6544,2.6544c0.7404,1.0188 1.3164,2.148 1.7052,3.3456c0.3888,1.1976 0.5868,2.4492 0.5868,3.708z" fill="none" stroke="rgb(195, 205, 255)" stroke-width="10" stroke-linecap="butt" stroke-linejoin="butt" stroke-dasharray="0 0" stroke-opacity="1" clip-path="url(#ligziij4roiiqcgytn)"></path></g></g></g></g><g transform="matrix(1,0,0,1,98,98)"><g id="83271" opacity="0.4" style="mix-blend-mode:normal"><g><g><path id="83271_fill_path" d="M135,0l-135,40h135z" fill-rule="nonzero" fill="rgb(244, 247, 251)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,1,1)"><g id="83272" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83272_fill_path" d="M0,2c0,-1 1,-2 2,-2h229c1,0 2,1 2,2v18h-233z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,42,74.4508)"><g id="83273" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83273_fill_path" d="M18.00001,0h-8c-5.5225,0 -10.00001,4.47496 -10.00001,9.99992c0,1.09999 0.895,1.99998 2,1.99998h24.00002c1.1045,0 2,-0.89549 2,-1.99998c0,-5.52496 -4.475,-9.99992 -10.00001,-9.99992z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,47.5999,54.4509)"><g id="83274" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83274_fill_path" d="M17.306,8.653c0,0.9077 -0.1428,1.8102 -0.4232,2.6738c-0.2804,0.8636 -0.6957,1.6778 -1.2296,2.4124c-0.5339,0.7346 -1.1794,1.3801 -1.914,1.914c-0.7346,0.5339 -1.5488,0.9492 -2.4124,1.2296c-0.8636,0.2804 -1.7661,0.4232 -2.6738,0.4232c-0.9077,0 -1.8102,-0.1428 -2.6738,-0.4232c-0.8636,-0.2804 -1.6778,-0.6957 -2.4124,-1.2296c-0.7346,-0.5339 -1.3801,-1.1794 -1.914,-1.914c-0.5339,-0.7346 -0.9492,-1.5488 -1.2296,-2.4124c-0.2804,-0.8636 -0.4232,-1.7661 -0.4232,-2.6738c0,-0.9077 0.1428,-1.8102 0.4232,-2.6738c0.2804,-0.8636 0.6957,-1.6778 1.2296,-2.4124c0.5339,-0.7346 1.1794,-1.3801 1.914,-1.914c0.7346,-0.5339 1.5488,-0.9492 2.4124,-1.2296c0.8636,-0.2804 1.7661,-0.4232 2.6738,-0.4232c0.9077,0 1.8102,0.1428 2.6738,0.4232c0.8636,0.2804 1.6778,0.6957 2.4124,1.2296c0.7346,0.5339 1.3801,1.1794 1.914,1.914c0.5339,0.7346 0.9492,1.5488 1.2296,2.4124c0.2804,0.8636 0.4232,1.7661 0.4232,2.6738z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,32,48)"><g id="83275" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83275_fill_path" d="M12,0c0,0 -7.7348,0 -8,0c-0.2652,0 -0.5204,0.0252 -0.7804,0.0768c-0.26,0.0516 -0.5052,0.126 -0.7504,0.2276c-0.2452,0.1016 -0.4712,0.2224 -0.6916,0.3696c-0.2204,0.1472 -0.4184,0.31 -0.606,0.4976c-0.1876,0.1876 -0.3504,0.3856 -0.4976,0.606c-0.1472,0.2204 -0.268,0.4464 -0.3696,0.6916c-0.1016,0.2452 -0.176,0.4904 -0.2276,0.7504c-0.0516,0.26 -0.0768,0.5152 -0.0768,0.7804c0,0.2652 0,8 0,8" fill-rule="nonzero" fill="rgb(255, 255, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path><path id="83275_stroke_path" d="M12,0c0,0 -7.7348,0 -8,0c-0.2652,0 -0.5204,0.0252 -0.7804,0.0768c-0.26,0.0516 -0.5052,0.126 -0.7504,0.2276c-0.2452,0.1016 -0.4712,0.2224 -0.6916,0.3696c-0.2204,0.1472 -0.4184,0.31 -0.606,0.4976c-0.1876,0.1876 -0.3504,0.3856 -0.4976,0.606c-0.1472,0.2204 -0.268,0.4464 -0.3696,0.6916c-0.1016,0.2452 -0.176,0.4904 -0.2276,0.7504c-0.0516,0.26 -0.0768,0.5152 -0.0768,0.7804c0,0.2652 0,8 0,8" fill="none" stroke="rgb(195, 205, 255)" stroke-width="2" stroke-linecap="butt" stroke-linejoin="butt" stroke-dasharray="0 0" stroke-opacity="1"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,-1,1,6.123233995736766e-17,32,94)"><g id="83276" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83276_fill_path" d="M12,0c0,0 -7.7348,0 -8,0c-0.2652,0 -0.5204,0.0252 -0.7804,0.0768c-0.26,0.0516 -0.5052,0.126 -0.7504,0.2276c-0.2452,0.1016 -0.4712,0.2224 -0.6916,0.3696c-0.2204,0.1472 -0.4184,0.31 -0.606,0.4976c-0.1876,0.1876 -0.3504,0.3856 -0.4976,0.606c-0.1472,0.2204 -0.268,0.4464 -0.3696,0.6916c-0.1016,0.2452 -0.176,0.4904 -0.2276,0.7504c-0.0516,0.26 -0.0768,0.5152 -0.0768,0.7804c0,0.2652 0,8 0,8" fill-rule="nonzero" fill="rgb(255, 255, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path><path id="83276_stroke_path" d="M12,0c0,0 -7.7348,0 -8,0c-0.2652,0 -0.5204,0.0252 -0.7804,0.0768c-0.26,0.0516 -0.5052,0.126 -0.7504,0.2276c-0.2452,0.1016 -0.4712,0.2224 -0.6916,0.3696c-0.2204,0.1472 -0.4184,0.31 -0.606,0.4976c-0.1876,0.1876 -0.3504,0.3856 -0.4976,0.606c-0.1472,0.2204 -0.268,0.4464 -0.3696,0.6916c-0.1016,0.2452 -0.176,0.4904 -0.2276,0.7504c-0.0516,0.26 -0.0768,0.5152 -0.0768,0.7804c0,0.2652 0,8 0,8" fill="none" stroke="rgb(195, 205, 255)" stroke-width="2" stroke-linecap="butt" stroke-linejoin="butt" stroke-dasharray="0 0" stroke-opacity="1"></path></g></g></g></g><g transform="matrix(-1,2.4492935982947064e-16,-2.4492935982947064e-16,-1,79,94)"><g id="83277" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83277_fill_path" d="M12,0c0,0 -7.7348,0 -8,0c-0.2652,0 -0.5204,0.0252 -0.7804,0.0768c-0.26,0.0516 -0.5052,0.126 -0.7504,0.2276c-0.2452,0.1016 -0.4712,0.2224 -0.6916,0.3696c-0.2204,0.1472 -0.4184,0.31 -0.606,0.4976c-0.1876,0.1876 -0.3504,0.3856 -0.4976,0.606c-0.1472,0.2204 -0.268,0.4464 -0.3696,0.6916c-0.1016,0.2452 -0.176,0.4904 -0.2276,0.7504c-0.0516,0.26 -0.0768,0.5152 -0.0768,0.7804c0,0.2652 0,8 0,8" fill-rule="nonzero" fill="rgb(255, 255, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path><path id="83277_stroke_path" d="M12,0c0,0 -7.7348,0 -8,0c-0.2652,0 -0.5204,0.0252 -0.7804,0.0768c-0.26,0.0516 -0.5052,0.126 -0.7504,0.2276c-0.2452,0.1016 -0.4712,0.2224 -0.6916,0.3696c-0.2204,0.1472 -0.4184,0.31 -0.606,0.4976c-0.1876,0.1876 -0.3504,0.3856 -0.4976,0.606c-0.1472,0.2204 -0.268,0.4464 -0.3696,0.6916c-0.1016,0.2452 -0.176,0.4904 -0.2276,0.7504c-0.0516,0.26 -0.0768,0.5152 -0.0768,0.7804c0,0.2652 0,8 0,8" fill="none" stroke="rgb(195, 205, 255)" stroke-width="2" stroke-linecap="butt" stroke-linejoin="butt" stroke-dasharray="0 0" stroke-opacity="1"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,79,48)"><g id="83278" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83278_fill_path" d="M12,0c0,0 -7.7348,0 -8,0c-0.2652,0 -0.5204,0.0252 -0.7804,0.0768c-0.26,0.0516 -0.5052,0.126 -0.7504,0.2276c-0.2452,0.1016 -0.4712,0.2224 -0.6916,0.3696c-0.2204,0.1472 -0.4184,0.31 -0.606,0.4976c-0.1876,0.1876 -0.3504,0.3856 -0.4976,0.606c-0.1472,0.2204 -0.268,0.4464 -0.3696,0.6916c-0.1016,0.2452 -0.176,0.4904 -0.2276,0.7504c-0.0516,0.26 -0.0768,0.5152 -0.0768,0.7804c0,0.2652 0,8 0,8" fill-rule="nonzero" fill="rgb(255, 255, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path><path id="83278_stroke_path" d="M12,0c0,0 -7.7348,0 -8,0c-0.2652,0 -0.5204,0.0252 -0.7804,0.0768c-0.26,0.0516 -0.5052,0.126 -0.7504,0.2276c-0.2452,0.1016 -0.4712,0.2224 -0.6916,0.3696c-0.2204,0.1472 -0.4184,0.31 -0.606,0.4976c-0.1876,0.1876 -0.3504,0.3856 -0.4976,0.606c-0.1472,0.2204 -0.268,0.4464 -0.3696,0.6916c-0.1016,0.2452 -0.176,0.4904 -0.2276,0.7504c-0.0516,0.26 -0.0768,0.5152 -0.0768,0.7804c0,0.2652 0,8 0,8" fill="none" stroke="rgb(195, 205, 255)" stroke-width="2" stroke-linecap="butt" stroke-linejoin="butt" stroke-dasharray="0 0" stroke-opacity="1"></path></g></g></g></g><g transform="matrix(1,0,0,1,100,47)"><g id="83279" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83279_fill_path" d="M4,8c-2.20914,0 -4,-1.79086 -4,-4v0c0,-2.20914 1.79086,-4 4,-4v0c2.20914,0 4,1.79086 4,4v0c0,2.20914 -1.79086,4 -4,4z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,116,47)"><g id="83280" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83280_fill_path" d="M1,8c-0.55228,0 -1,-0.44772 -1,-1v-6c0,-0.55228 0.44772,-1 1,-1h86c0.55228,0 1,0.44772 1,1v6c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(195, 205, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,100,67)"><g id="83281" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83281_fill_path" d="M4,8c-2.20914,0 -4,-1.79086 -4,-4v0c0,-2.20914 1.79086,-4 4,-4v0c2.20914,0 4,1.79086 4,4v0c0,2.20914 -1.79086,4 -4,4z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,116,67)"><g id="83282" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83282_fill_path" d="M1,8c-0.55228,0 -1,-0.44772 -1,-1v-6c0,-0.55228 0.44772,-1 1,-1h64c0.55228,0 1,0.44772 1,1v6c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(195, 205, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,100,87)"><g id="83283" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83283_fill_path" d="M4,8c-2.20914,0 -4,-1.79086 -4,-4v0c0,-2.20914 1.79086,-4 4,-4v0c2.20914,0 4,1.79086 4,4v0c0,2.20914 -1.79086,4 -4,4z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,116,87)"><g id="83284" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83284_fill_path" d="M1,8c-0.55228,0 -1,-0.44772 -1,-1v-6c0,-0.55228 0.44772,-1 1,-1h51c0.55228,0 1,0.44772 1,1v6c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(195, 205, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,137,9)"><g id="83285" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83285_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h86c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(244, 247, 251)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(-1,0,0,-1,92.4999,98.9985)"><g id="83286" opacity="0.2" style="mix-blend-mode:lighten"><g><g><path id="83286_fill_path" d="M90.49994,0l-90.49994,96.99852l90.49994,0.00002z" fill-rule="nonzero" fill="rgb(255, 255, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,0,20)"><g id="83319" opacity="0" style="mix-blend-mode:normal"><g><g><path id="83319_fill_path" d="M0,118v-118h234v118z" fill-rule="nonzero" fill="rgb(255, 255, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g></g></g></g></g></g></g></g></g><animateTransform href="#83287" attributeName="transform" type="translate" values="118 70;118 70;118 70;118 70;118 70" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.37;0.61;0.66;1" keySplines="0.0664 0.4423 0.15 1;0.0664 0.4423 0.1 1;0.0664 0.4423 0.1 1;0.5 0.35 0.1 1" additive="sum" fill="freeze"></animateTransform><animateTransform href="#83287" attributeName="transform" type="scale" values="0 1;0 1;1.02 1;1 1;1 1" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.37;0.61;0.66;1" keySplines="0.0664 0.4423 0.15 1;0.0664 0.4423 0.1 1;0.0664 0.4423 0.1 1;0.5 0.35 0.1 1" additive="sum" fill="freeze"></animateTransform><animateTransform href="#83287" attributeName="transform" type="translate" values="-118 -70;-118 -70;-118 -70;-118 -70;-118 -70" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.37;0.61;0.66;1" keySplines="0.0664 0.4423 0.15 1;0.0664 0.4423 0.1 1;0.0664 0.4423 0.1 1;0.5 0.35 0.1 1" additive="sum" fill="freeze"></animateTransform><animateTransform href="#83291" attributeName="transform" type="translate" values="0 0;0 0;9.018099999999999 -4;9.018099999999999 -4" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.37;0.52;1" keySplines="0.42 0 0.15 1;0.42 0 0.15 1;0.5 0.35 0.15 1" additive="sum" fill="freeze"></animateTransform><animateTransform href="#83291" attributeName="transform" type="translate" values="113.5 30.4997;113.5 30.4997;113.5 30.4997;113.5 30.4997" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.37;0.52;1" keySplines="0.5 0.35 0.15 1;0.5 0.35 0.15 1;0.5 0.35 0.15 1" additive="sum" fill="freeze"></animateTransform><animateTransform href="#83291" attributeName="transform" type="scale" values="-1 -1;-1 -1;-0.88 -0.88;-0.88 -0.88" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.37;0.52;1" keySplines="0.5 0.35 0.15 1;0.5 0.35 0.15 1;0.5 0.35 0.15 1" additive="sum" fill="freeze"></animateTransform><animateTransform href="#83291" attributeName="transform" type="translate" values="-113.5 -30.4997;-113.5 -30.4997;-113.5 -30.4997;-113.5 -30.4997" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.37;0.52;1" keySplines="0.5 0.35 0.15 1;0.5 0.35 0.15 1;0.5 0.35 0.15 1" additive="sum" fill="freeze"></animateTransform><animate href="#83320" attributeName="opacity" values="0.2;0.2;0;0" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.39;0.43;1" keySplines="0.5 0.35 0.15 1;0.5 0.35 0.15 1;0.5 0.35 0.15 1" additive="sum" fill="freeze"></animate><animateTransform href="#83268" attributeName="transform" type="translate" values="117 75;117 75;117 75;117 75" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.09;0.37;1" keySplines="0.5 0.35 0.15 1;0.5 0.35 0.8 0.15;0.5 0.35 0.8 0.15" additive="sum" fill="freeze"></animateTransform><animateTransform href="#83268" attributeName="transform" type="scale" values="1 1;1 1;0 1;0 1" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.09;0.37;1" keySplines="0.5 0.35 0.15 1;0.5 0.35 0.8 0.15;0.5 0.35 0.8 0.15" additive="sum" fill="freeze"></animateTransform><animateTransform href="#83268" attributeName="transform" type="translate" values="-117 -75;-117 -75;-117 -75;-117 -75" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.09;0.37;1" keySplines="0.5 0.35 0.15 1;0.5 0.35 0.8 0.15;0.5 0.35 0.8 0.15" additive="sum" fill="freeze"></animateTransform><animate href="#83271_fill_path" attributeName="d" values="M135,0l-135,40h135z;M135,0l-135,40h135z;M135,0l-135,40h135z;M135,0l-135,40h135z;M135,0l-135,40h135z;M135,0l-135,40h135z;M135,0l-135,40h135z;M135,0l-135,40h135z;M135,0l-135,40h135z;M135,0l-135,40h135z;M135,0l-135,40h135z;M135,0l-135,40h135z;M135,-0.0042l-135.0142,40.0042h135.0142z;M135,-0.0364l-135.1228,40.0364h135.1228z;M135,-0.0975l-135.3292,40.0975h135.3292z;M135,-0.1848l-135.6236,40.1848h135.6236z;M135,-0.2958l-135.9982,40.2958h135.9982z;M135,-0.4285l-136.4462,40.4285h136.4462z;M135,-0.5812l-136.9617,40.5812h136.9617z;M135,-0.7525l-137.5397,40.7525h137.5397z;M135,-0.941l-138.176,40.941h138.176z;M135,-1.1457l-138.8667,41.1457h138.8667z;M135,-1.3655l-139.6085,41.3655h139.6085z;M135,-1.5996l-140.3986,41.5996h140.3986z;M135,-1.8472l-141.2343,41.8472h141.2343z;M135,-2.1077l-142.1134,42.1077h142.1134z;M135,-2.3804l-143.0339,42.3804h143.0339z;M135,-2.6649l-143.994,42.6649h143.994z;M135,-2.9607l-144.9922,42.9607h144.9922z;M135,-3.2673l-146.0272,43.2673h146.0272z;M135,-3.5846l-147.0978,43.5846h147.0978z;M135,-3.9121l-148.2031,43.9121h148.2031z;M135,-4.2497l-149.3424,44.2497h149.3424z;M135,-4.5972l-150.5153,44.5972h150.5153z;M135,-4.9545l-151.7213,44.9545h151.7213z;M135,-5.3218l-152.9607,45.3218h152.9607z;M135,-5.6991l-154.2341,45.6991h154.2341z;M135,-6.0868l-155.5427,46.0868h155.5427z;M135,-6.4858l-156.8893,46.4858h156.8893z;M135,-6.898l-158.2804,46.898h158.2804z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z" dur="2.6s" repeatCount="indefinite" keyTimes="0;0.007692307692307693;0.015384615384615385;0.023076923076923078;0.03076923076923077;0.038461538461538464;0.046153846153846156;0.05384615384615385;0.06153846153846154;0.06923076923076923;0.07692307692307693;0.08461538461538462;0.09230769230769231;0.1;0.1076923076923077;0.11538461538461539;0.12307692307692308;0.13076923076923078;0.13846153846153847;0.14615384615384616;0.15384615384615385;0.16153846153846155;0.16923076923076924;0.17692307692307693;0.18461538461538463;0.19230769230769232;0.2;0.2076923076923077;0.2153846153846154;0.2230769230769231;0.23076923076923078;0.23846153846153847;0.24615384615384617;0.25384615384615383;0.26153846153846155;0.2692307692307692;0.27692307692307694;0.2846153846153846;0.2923076923076923;0.3;0.3076923076923077;0.3153846153846154;0.3230769230769231;0.33076923076923076;0.3384615384615385;0.34615384615384615;0.35384615384615387;0.36153846153846153;0.36923076923076925;0.3769230769230769;0.38461538461538464;0.3923076923076923;0.4;0.4076923076923077;0.4153846153846154;0.4230769230769231;0.4307692307692308;0.43846153846153846;0.4461538461538462;0.45384615384615384;0.46153846153846156;0.46923076923076923;0.47692307692307695;0.4846153846153846;0.49230769230769234;0.5;0.5076923076923077;0.5153846153846153;0.5230769230769231;0.5307692307692308;0.5384615384615384;0.5461538461538461;0.5538461538461539;0.5615384615384615;0.5692307692307692;0.5769230769230769;0.5846153846153846;0.5923076923076923;0.6;0.6076923076923076;0.6153846153846154;0.6230769230769231;0.6307692307692307;0.6384615384615384;0.6461538461538462;0.6538461538461539;0.6615384615384615;0.6692307692307692;0.676923076923077;0.6846153846153846;0.6923076923076923;0.7;0.7076923076923077;0.7153846153846154;0.7230769230769231;0.7307692307692307;0.7384615384615385;0.7461538461538462;0.7538461538461538;0.7615384615384615;0.7692307692307693;0.7769230769230769;0.7846153846153846;0.7923076923076923;0.8;0.8076923076923077;0.8153846153846154;0.823076923076923;0.8307692307692308;0.8384615384615385;0.8461538461538461;0.8538461538461538;0.8615384615384616;0.8692307692307693;0.8769230769230769;0.8846153846153846;0.8923076923076924;0.9;0.9076923076923077;0.9153846153846154;0.9230769230769231;0.9307692307692308;0.9384615384615385;0.9461538461538461;0.9538461538461539;0.9615384615384616;0.9692307692307692;0.9769230769230769;0.9846153846153847;0.9923076923076923;1" fill="freeze"></animate><animateTransform href="#83285" attributeName="transform" type="translate" values="88 2;88 2;88 2;88 2;88 2" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.12;0.27;0.33;1" keySplines="0.42 0 0.15 1;0.42 0 0.48 1;0.42 0 0.48 1;0.5 0.35 0.48 1" additive="sum" fill="freeze"></animateTransform><animateTransform href="#83285" attributeName="transform" type="scale" values="0.98 1;0.98 1;1 1;0.96 1;0.96 1" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.12;0.27;0.33;1" keySplines="0.42 0 0.15 1;0.42 0 0.48 1;0.42 0 0.48 1;0.5 0.35 0.48 1" additive="sum" fill="freeze"></animateTransform><animateTransform href="#83285" attributeName="transform" type="translate" values="-88 -2;-88 -2;-88 -2;-88 -2;-88 -2" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.12;0.27;0.33;1" keySplines="0.42 0 0.15 1;0.42 0 0.48 1;0.42 0 0.48 1;0.5 0.35 0.48 1" additive="sum" fill="freeze"></animateTransform><animateTransform href="#83286" attributeName="transform" type="translate" values="0 0;0 0;0 0;0 0" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.09;0.32;1" keySplines="0.42 0 0.15 1;0.42 0 1 1;0.5 0.35 1 1" additive="sum" fill="freeze"></animateTransform><animateTransform xlink:href="#83286" href="#83286" attributeName="transform" type="skewX" values="0;0;-4;-4" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.09;0.32;1" keySplines="0.42 0 0.15 1;0.42 0 1 1;0.5 0.35 1 1" additive="sum" fill="freeze"></animateTransform><animateTransform xlink:href="#83286" href="#83286" attributeName="transform" type="skewY" values="0;0;0;0" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.09;0.32;1" keySplines="0.42 0 0.15 1;0.42 0 1 1;0.5 0.35 1 1" additive="sum" fill="freeze"></animateTransform><animateTransform xlink:href="#83286" href="#83286" attributeName="transform" type="translate" values="0 0;0 0;0 0;0 0" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.09;0.32;1" keySplines="0.42 0 0.15 1;0.42 0 1 1;0.5 0.35 1 1" additive="sum" fill="freeze"></animateTransform><animate href="#83319" attributeName="opacity" values="0;0;0.18;0.18" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.31;0.36;1" keySplines="0.5 0.35 0.15 1;0.5 0.35 0.15 1;0.5 0.35 0.15 1" additive="sum" fill="freeze"></animate>\n ',t}(),e.setAttribute("style","position: absolute; z-index: 1; opacity: 0; transition: opacity 0.5s ease-in-out;"),"document_front"===t?e.style.opacity="1":"document_back"===t&&(e.style.opacity="1",setTimeout((()=>{e.style.opacity="0"}),5e3)),e};var Ff;!function(t){t.INVALID="invalid",t.VALID="valid",t.ACCEPTED="accepted",t.REJECTED="rejected"}(Ff||(Ff={}));const Lf="#ED3232",zf="#01B678",Uf="#FFF",Vf=50;const Hf=t=>!t.paused&&0!==t.videoWidth,jf=t=>{const e=document.createElement("canvas");e.width=t.videoWidth,e.height=t.videoHeight;return e.getContext("2d").drawImage(t,0,0,t.videoWidth,t.videoHeight),e};async function Gf(t){let{context:e,onDetect:r,frame:n,showError:o,isSelfie:i=!1}=t;const a=e.state.name;if(a===Ff.REJECTED){o(function(t){switch(t){case Qi.DOCUMENT_DETECTION:return"searching_document_autocapture";case Qi.DOCUMENT_POSITION:return"doc_not_in_frame_issues_autocapture";case Qi.BARCODE_DETECTION:return yo.feedback.BARCODE_NOT_FOUND;case Qi.BLUR_DETECTION:return yo.feedback.BLUR;case Qi.GLARE_DETECTION:return yo.feedback.GLARE;case Qi.FACE_DETECTION:return yo.feedback.FACE_NOT_FOUND;case Qi.FACE_POSITION:return yo.feedback.FACE_TOO_SMALL}}(e.invalidFramesCause));Wf("border-color",e.invalidFramesCause===Qi.DOCUMENT_DETECTION?Uf:Lf)}if(a===Ff.VALID)if(i){Wf("border-color",zf);o(`capturing_face_autocapture${Math.ceil((e.validFramesThreshold-e.validFramesCounter)/e.validFramesThreshold*3)}`)}else o("capturing_in_progress_message"),Wf("border-color",Uf);a===Ff.ACCEPTED&&(Wf("border-color",Uf),o(null),"function"==typeof navigator.vibrate&&navigator.vibrate(200),await r({frame:n,suspendedPreview:!0,isManualCapture:!1,context:e}))}function Wf(t,e){document.querySelectorAll('[id^="overlay-frame"]').forEach((r=>{r.style[t]=e}))}function Xf(t){let e,r,n,{captureFrame:o,object:i,videoWidth:a,videoHeight:s,deviceWidth:u,deviceHeight:c,threshold:l,iouThreshold:d=.85}=t;if(a/s>=u/c){n=c/s;const t=(a*n-u)/2;e=i.x*n-t,r=i.y*n}else{n=u/a;const t=(s*n-c)/2;e=i.x*n,r=i.y*n-t}const h=e+i.width*n,f=r+i.height*n;!function(t,e,r,n){var o,i;if(null===(i=null===(o=Ji.state.autoCaptureSettings)||void 0===o?void 0:o.settings)||void 0===i?void 0:i.debug){const o=document.getElementById("image-preview-section"),i=document.getElementById("rectangle");if(i)i.style.width=`${r}px`,i.style.height=`${n}px`,i.style.left=`${t}px`,i.style.top=`${e}px`;else{const i=document.createElement("div");i.id="rectangle",i.style.position="absolute",i.style.border="1px solid yellow",i.style.width=`${r}px`,i.style.height=`${n}px`,i.style.left=`${t}px`,i.style.top=`${e}px`,o.appendChild(i)}}}(e,r,i.width*n,i.height*n);const p=function(t,e){const r=Math.max(t.left,e.left),n=Math.min(t.right,e.right),o=Math.max(t.top,e.top),i=n-r,a=Math.min(t.bottom,e.bottom)-o;if(i<=0||a<=0)return 0;const s=i*a;return s/((t.right-t.left)*(t.bottom-t.top)+(e.right-e.left)*(e.bottom-e.top)-s)}({top:o.top,left:o.left,bottom:o.bottom,right:o.right},{top:r,left:e,bottom:f,right:h}),g=p>d,m=i.width*n*(i.height*n)>l*(o.width*o.height);return g&&m}const Yf=t=>{const e=function(){const t=document.createElementNS("http://www.w3.org/2000/svg","svg");return t.setAttribute("width","64px"),t.setAttribute("height","64px"),t.innerHTML='\n <path d="M10.7202 25.9524C9.81992 25.9524 9.08331 25.2158 9.08331 24.3155V11.2202C9.08331 10.3199 9.81992 9.58333 10.7202 9.58333C11.6205 9.58333 12.3571 10.3199 12.3571 11.2202V20.6938C16.3675 14.0337 23.662 9.58333 32 9.58333C44.6553 9.58333 54.9166 19.8447 54.9166 32.5C54.9166 45.1553 44.6553 55.4167 32 55.4167C23.8257 55.4167 16.654 51.1403 12.5924 44.6949C11.9274 43.631 12.7357 42.3214 13.994 42.3214C14.6079 42.3214 15.1603 42.6488 15.4979 43.1603C18.9968 48.5621 25.0841 52.1429 32 52.1429C42.8445 52.1429 51.6428 43.3445 51.6428 32.5C51.6428 21.6555 42.8445 12.8571 32 12.8571C24.726 12.8571 18.383 16.8062 14.9864 22.6786H23.8155C24.7158 22.6786 25.4524 23.4152 25.4524 24.3155C25.4524 25.2158 24.7158 25.9524 23.8155 25.9524H10.7202Z" fill="#FF8B8B"/> \n ',t}(),r=tf({tagName:"button",style:{zIndex:"2",width:"fit-content",display:"flex",flexDirection:"column",alignItems:"center",backgroundColor:"transparent",border:"none"},id:"retake-image",testid:"retake-image"});return ef(r,e),ef(r,Rf({text:t||"Retake",level:2,style:{color:"#FF8B8B",margin:"0",maxWidth:"100px",textAlign:"center"},id:"retake-image-text"})),r};const Zf=t=>{const e=function(){const t=document.createElementNS("http://www.w3.org/2000/svg","svg");return t.setAttribute("width","64px"),t.setAttribute("height","64px"),t.innerHTML='\n <path d="M32.5 8.66666C38.6884 8.66666 44.6233 11.125 48.9992 15.5008C53.375 19.8767 55.8333 25.8116 55.8333 32C55.8333 38.1884 53.375 44.1233 48.9992 48.4992C44.6233 52.875 38.6884 55.3333 32.5 55.3333C26.3116 55.3333 20.3767 52.875 16.0009 48.4992C11.625 44.1233 9.16668 38.1884 9.16668 32C9.16668 25.8116 11.625 19.8767 16.0009 15.5008C20.3767 11.125 26.3116 8.66666 32.5 8.66666ZM32.5 58.6667C39.5725 58.6667 46.3552 55.8572 51.3562 50.8562C56.3572 45.8552 59.1667 39.0724 59.1667 32C59.1667 24.9276 56.3572 18.1448 51.3562 13.1438C46.3552 8.14284 39.5725 5.33333 32.5 5.33333C25.4276 5.33333 18.6448 8.14284 13.6438 13.1438C8.64286 18.1448 5.83334 24.9276 5.83334 32C5.83334 39.0724 8.64286 45.8552 13.6438 50.8562C18.6448 55.8572 25.4276 58.6667 32.5 58.6667ZM43.6771 26.5104C44.3229 25.8646 44.3229 24.8021 43.6771 24.1562C43.0313 23.5104 41.9688 23.5104 41.3229 24.1562L29.1667 36.3125L23.6771 30.8229C23.0313 30.1771 21.9688 30.1771 21.3229 30.8229C20.6771 31.4687 20.6771 32.5312 21.3229 33.1771L27.9896 39.8437C28.6354 40.4896 29.6979 40.4896 30.3438 39.8437L43.6771 26.5104Z" fill="#BBF7DD"/>\n ',t}(),r=tf({tagName:"button",style:{zIndex:"2",width:"fit-content",display:"flex",flexDirection:"column",alignItems:"center",backgroundColor:"transparent",border:"none"},id:"approve-image",testid:"approve-image"});return ef(r,e),ef(r,Rf({text:t||"Approve",level:2,style:{color:"#BBF7DD",margin:"0",maxWidth:"100px",textAlign:"center"},id:"check-circle-text"})),r},qf=t=>{let{step:e,setImage:r,camera:n}=t;var o,i,a,s;const u=If[e];(null===(o=Ji.state.autoCaptureSettings)||void 0===o?void 0:o.enabled)&&"selfie"===e&&(u.instructions="second_title_face_autocapture");const c=((t,e)=>tf({tagName:"div",style:{display:"flex",height:"100%",justifyContent:"space-between",flexDirection:"column",alignItems:"center"},id:t,testid:"document-capture",className:e}))("document-capture",e),l=tf({tagName:"div",style:{position:"relative",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},id:"camera-hint-section",testid:"camera-hint-section"}),d=tf({tagName:"div",style:{display:"flex",flexDirection:"column",alignItems:"center",width:"100%",height:"80%"},id:"central-container",testid:"central-container"}),h=document.getElementById(Ji.state.rootElementId);if(!h)throw new Error("Root element not found");const f=Sf(of(e),h),p=Bf(e);ef(l,p),ef(l,f),"document_front"===e&&setTimeout((()=>{const t=document.getElementById(`overlay-frame ${of(e)}`),r=document.getElementById("front-document-animation");if(t&&r){const e=t.getBoundingClientRect(),n=l.getBoundingClientRect(),o=8,i=e.width-2*o,a=e.height-2*o,s=235/147;let u=i,c=i/s;c>a&&(c=a,u=c*s);const d=e.left-n.left+(e.width-u)/2,h=e.top-n.top+(e.height-c)/2;r.setAttribute("width",u.toString()),r.setAttribute("height",c.toString()),r.style.width=`${u}px`,r.style.height=`${c}px`,r.style.left=`${d}px`,r.style.top=`${h}px`}}),0);const g=(()=>{const t=tf({tagName:"div",style:{zIndex:"2",width:"80%",height:"50px",color:"white",display:"flex",alignItems:"center",backgroundColor:"#2E2E2E",justifyContent:"center",opacity:".9"},id:"loading-block",testid:"loading-block"}),e=Df();return e.style.width="16px",e.style.height="16px",e.style.margin="0 10px",ef(t,e),ef(t,Rf({text:"This may take a few seconds",level:5,style:{color:"white",margin:"0",width:"80%"},id:"image-loading-message"})),t})();ef(f,g),g.style.visibility="hidden";const m=Pf({text:la.translate(u.page),id:"page-header",testid:"page-header",clientHeight:h.clientHeight}),y=(t=>{let{click:e,id:r,testid:n,color:o,withLoader:i}=t;if(i){const t=Tf();t.style.position="absolute",t.style.left="-7px",t.style.top="-7px",t.style.height="63px",t.style.width="63px";const i=tf({tagName:"button",style:{position:"relative",width:"49px",height:"49px",backgroundColor:o||"white",border:"none",margin:"0 auto",borderRadius:"40px"},id:r+"-inner",testid:n+"-inner"});return ef(i,t),i.addEventListener("click",e),i}{const t=tf({tagName:"button",style:{width:"65px",height:"65px",zIndex:"1",backgroundColor:"black",padding:"0",border:"solid 5px "+(o||"white"),borderRadius:"40px",boxSizing:"border-box",flexShrink:"0",flexGrow:"0"},id:r+"-outer",testid:n+"-outer"});return ef(t,tf({tagName:"div",style:{width:"49px",height:"49px",backgroundColor:o||"white",border:"none",margin:"0 auto",borderRadius:"40px"},id:r+"-inner",testid:n+"-inner"})),t.addEventListener("click",e),t}})({click:()=>r({frame:jf(n.videoElement),suspendedPreview:!1,isManualCapture:!0}),id:"submit-image",testid:"submit-image",withLoader:null===(a=null===(i=Ji.state)||void 0===i?void 0:i.autoCaptureSettings)||void 0===a?void 0:a.enabled}),w=((t,e)=>{const r=tf({tagName:"div",style:{zIndex:"2",width:"70%",paddingBottom:"30px",backgroundColor:"transparent",justifyContent:"space-between",display:"none"},id:"approve-retake-block",testid:"approve-retake-block"}),n=Zf(t);return ef(r,Yf(e)),ef(r,n),r})(la.translate("approve_button"),la.translate("retake_button")),_=(t=>{let{title:e,text:r,clientHeight:n,customTextColor:o}=t;const i=n<700,a=tf({tagName:"div",style:{position:"relative",zIndex:"2",padding:"0 25px",margin:i?"8px 0":"32px 0"},id:"page-info",testid:"page-info"}),s=Rf({text:e,level:i?2:1,style:{color:o||"white",textAlign:"center",marginBottom:i?"4px":"10px"},id:"step-title"}),u=Rf({text:r,level:i?6:5,style:{color:o||"white",textAlign:"center",height:"35px"},id:"step-instructions"});return ef(a,s),ef(a,u),a})({text:la.translate(u.instructions),title:la.translate(u.title),clientHeight:h.clientHeight}),v=(t=>{const e=t<700,r=tf({tagName:"div",style:{zIndex:"2",width:"85%",display:"flex",flexDirection:Ji.state.markdownSupportText?"column":"row",backgroundColor:"#2E2E2E",borderRadius:"4px",padding:"12px",visibility:"hidden",marginTop:"16px"},id:"error-block",testid:"error-block"}),n=tf({tagName:"div",style:{display:"flex",flexDirection:"row",width:"100%",height:"inherit",alignItems:"center",paddingTop:"25px"},id:"image-error-block",testid:"image-error-block"}),o=Df();o.style.width="16px",o.style.height="16px",o.style.margin="0 10px",Ji.state.markdownSupportText?ef(n,o):ef(r,o);const i=Ji.state.markdownSupportText&&null!=xf?xf.parse(Ji.state.markdownSupportText,{async:!1}):"",a=Rf({text:"",level:e?6:5,style:{color:"white",margin:"0",width:"85%",fontWeight:"400",height:"fit-content"},id:"image-error-message"}),s=Rf({text:"",level:5,style:{color:"white",margin:"0",width:"80%"},id:"image-error-support-message"});return i&&(s.innerHTML=i,ef(n,a)),ef(r,i?[n,s]:a),r})(h.clientHeight),E=(null===(s=Ji.state.autoCaptureSettings)||void 0===s?void 0:s.enabled)?Tf():function(){const t=document.createElementNS("http://www.w3.org/2000/svg","svg");return t.setAttribute("width","65"),t.setAttribute("height","65"),t.setAttribute("viewBox","0 0 24 24"),t.innerHTML='\n <path fill="#ffffff" d="M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z" opacity=".25"/><path fill="#ffffff" d="M12,4a8,8,0,0,1,7.89,6.7A1.53,1.53,0,0,0,21.38,12h0a1.5,1.5,0,0,0,1.48-1.75,11,11,0,0,0-21.72,0A1.5,1.5,0,0,0,2.62,12h0a1.53,1.53,0,0,0,1.49-1.3A8,8,0,0,1,12,4Z"><animateTransform attributeName="transform" type="rotate" dur="0.75s" values="0 12 12;360 12 12" repeatCount="indefinite"/></path>\n ',t}();E.style.display="none",ef(d,m),ef(d,_),ef(d,l),ef(d,v),ef(c,d);const b=tf({tagName:"div",style:{width:"100%",margin:"10%",zIndex:"1",display:"flex",justifyContent:"center"},id:"trigger-section",testid:"trigger-section"});ef(b,E),ef(b,y),ef(b,w),ef(c,b),ef(c,n.videoElement);const A=function(t){return tf({tagName:"img",style:{display:"block",position:"absolute",objectFit:arguments.length>1&&void 0!==arguments[1]?arguments[1]:"cover",height:"100%",width:"100%",transform:"user"===t?"scaleX(-1)":""},id:"image-preview",testid:"image-preview"})}(of(e)),C=(t=>{const e=tf({tagName:"div",style:{position:"absolute",height:"100%",width:"100%",objectFit:"cover"},id:"image-preview-section",testid:"image-preview-section"});return e.appendChild(t),e})(A);return ef(c,C),{component:c,setLoadingMode:t=>{var e;y.style.display="none",v.style.visibility="hidden",E.style.display="block",(null===(e=Ji.state.autoCaptureSettings)||void 0===e?void 0:e.enabled)&&(E.style.height="63px",E.style.width="63px"),t&&(g.style.visibility="visible")},setApprovalRetakeButtons:t=>{let{approveAction:e,retakeAction:r}=t;var n,o;y.style.display="none",v.style.display="none",w.style.display="flex";const i=w.querySelector("#approve-image"),a=w.querySelector("#retake-image"),s=i.cloneNode(!0);null===(n=i.parentNode)||void 0===n||n.replaceChild(s,i),s.addEventListener("click",e);const u=a.cloneNode(!0);null===(o=a.parentNode)||void 0===o||o.replaceChild(u,a),u.addEventListener("click",r)},hideApprovalRetakeButtons:()=>{w.style.display="none",v.style.display="flex"},setPreviewImage:function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{hideSpinner:r=!1,objectFit:o}=e;A.src=t,o&&(A.style.objectFit=o),g.style.visibility="hidden",n.videoElement.style.display="none",y.style.display="none",v.style.visibility="hidden",C.style.display="block",E.style.display=r?"none":"block"},setLoadingComplete:()=>{E.style.display="none",g.style.visibility="hidden"},setAutoCapturingError:(t,e)=>{if(!t)return void(v.style.visibility="hidden");let r;r=t==yo.feedback.RESTRICTED_CRITERIA&&e?e:Cf[t]?Cf[t].message:la.translate(t)!==t?t:Cf.other.message,document.getElementById("image-error-message").innerHTML=la.translate(r),v.style.visibility="visible"},enableVideoElement:()=>{A.src="",A.style.objectFit="cover",y.style.display="block",n.videoElement.style.display="block","function"==typeof n.videoElement.play&&n.videoElement.play().catch((()=>{})),C.style.display="none",E.style.display="none"},setCapturingShowErrorMode:(t,e)=>{y.style.display="block",C.style.display="none",n.videoElement.style.display="block","function"==typeof n.videoElement.play&&n.videoElement.play().catch((()=>{}));const r=t==yo.feedback.RESTRICTED_CRITERIA,o=Cf[t]||Cf.other;document.getElementById("image-error-message").innerHTML=e&&r&&null!=xf?xf.parse(e,{async:!1}):la.translate(o.message),v.style.visibility="visible",g.style.visibility="hidden"},setTitleInstructionsMidStep:t=>{let{title:e,instructions:r,pageHeader:n}=t;if(n){const t=document.getElementById("page-header-text");t&&(t.textContent=la.translate(n))}e&&(document.getElementById("step-title").innerHTML=la.translate(e)),r&&(document.getElementById("step-instructions").innerHTML=la.translate(r))}}};class Kf{constructor(){this.isValid=!0,this.failedStep=null,this.steps=[]}addStepResponse(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;e||(this.isValid=!1,this.failedStep=t),this.steps.push(new $f(t,e,r))}}class $f{constructor(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;this.duration=0,this.success=!0,this.step=t,this.success=e,this.duration=r}}class Jf{constructor(){this.name=Ff.ACCEPTED}async handleFrame(){return new Kf}}class Qf{constructor(){this.name=Ff.VALID}async handleFrame(t){let{context:e,frame:r,deviceInfo:n,detectionStrategy:o}=t;const i=await o.validate({frame:r,deviceInfo:n});return i.isValid?(e.validFramesCounter++,e.validFramesCounter>=e.validFramesThreshold&&e.setState(new Jf)):(e.validFramesCounter=0,e.invalidFramesCounter=1,e.invalidFramesCause=i.failedStep,e.setState(new ep)),i}}class tp{constructor(){this.name=Ff.REJECTED}async handleFrame(t){let{context:e,frame:r,detectionStrategy:n,deviceInfo:o}=t;const i=await n.validate({frame:r,deviceInfo:o});return i.isValid?(e.invalidFramesCounter=0,e.validFramesCounter=1,e.validFramesCounter>=e.validFramesThreshold?e.setState(new Jf):e.setState(new Qf),i):e.invalidFramesCause!==i.failedStep?(e.invalidFramesCounter=1,e.invalidFramesCause=i.failedStep,e.setState(new ep),i):(e.invalidFramesCounter++,i)}}class ep{constructor(){this.name=Ff.INVALID}async handleFrame(t){let{context:e,frame:r,detectionStrategy:n,deviceInfo:o}=t;const i=await n.validate({frame:r,deviceInfo:o});return i.isValid?(e.invalidFramesCounter=0,e.validFramesCounter=1,e.validFramesCounter>=e.validFramesThreshold?e.setState(new Jf):e.setState(new Qf)):e.invalidFramesCause!==i.failedStep?(e.invalidFramesCounter=1,e.invalidFramesCause=i.failedStep):(e.invalidFramesCounter++,e.invalidFramesCounter>=e.invalidFramesThreshold&&e.setState(new tp)),i}}class rp{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3;this.detectionStrategy=t,this.state=new ep,this.validFramesCounter=0,this.invalidFramesCounter=0,this.invalidFramesCause=null,this.validFramesThreshold=e,this.invalidFramesThreshold=r}setState(t){this.state=t}async handleFrame(t){let{frame:e,deviceInfo:r}=t;return await this.state.handleFrame({context:this,frame:e,deviceInfo:r,detectionStrategy:this.detectionStrategy})}}async function np(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=function(t,e,r){const n=document.createElement("canvas"),o=e||{height:t.height,width:t.width},i=n.getContext("2d");n.width=o.width,n.height=o.height,r?null==i||i.drawImage(t,r.x,r.y,r.width,r.height,0,0,o.width,o.height):null==i||i.drawImage(t,0,0,o.width,o.height);const a=null==i?void 0:i.getImageData(0,0,o.width,o.height);return n.remove(),a}(e,arguments.length>3?arguments[3]:void 0,arguments.length>4?arguments[4]:void 0),i=await new Promise(((i,a)=>{navigator.serviceWorker.ready.then((s=>{var u;const c=e=>{e.data.type===t+"_RESULT"&&(navigator.serviceWorker.removeEventListener("message",c),i(e.data.result)),e.data.type===t+"_ERROR"&&(navigator.serviceWorker.removeEventListener("message",c),sa(e.data.error.toString(),t,"error"),a(e.data.error))};navigator.serviceWorker.addEventListener("message",c),null===(u=s.active)||void 0===u||u.postMessage(o({type:t,imageData:n,height:e.height,width:e.width},r))}))}));return ha(`****** in web-SDK return result for ${t}`,i),i}async function op(t){if(t instanceof HTMLVideoElement&&t.paused)return[];return np("DETECT_DOCUMENT",t,{},kh[fa.DOCUMENT_DETECTOR].imageDimensions)}async function ip(t,e){return np("BLUR_GLARE_CLASSIFY",t,{},kh[fa.BLUR_GLARE_CLASSIFIER].imageDimensions,e)}class ap{constructor(t,e){this.hasBarcode=t,this.barcodeModel=t?Ph(e):null,this.rawBarcodeData={}}async validate(t){let{frame:e,deviceInfo:r}=t;var n;const o=new Kf;let i=Date.now();const a=null===(n=await op(e))||void 0===n?void 0:n[0];let s=Date.now()-i;if(o.addStepResponse(Qi.DOCUMENT_DETECTION,void 0!==a,s),!a)return o;i=Date.now();const u=Xf({captureFrame:document.getElementById("overlay-frame environment").getBoundingClientRect(),object:a,videoWidth:e.width,videoHeight:e.height,deviceWidth:r.width,deviceHeight:r.height,threshold:Ji.state.autoCaptureSettings.settings.capture.documentBackSizeThreshold,iouThreshold:Ji.state.autoCaptureSettings.settings.capture.documentBackIouThreshold});if(s=Date.now()-i,o.addStepResponse(Qi.DOCUMENT_POSITION,u,s),!u)return o;i=Date.now();const c=await ip(e,a);s=Date.now()-i;const l=c.some((t=>"blur"===t.class));if(o.addStepResponse(Qi.BLUR_DETECTION,!l,s),l)return o;const d=c.some((t=>"glare"===t.class));if(o.addStepResponse(Qi.GLARE_DETECTION,!d,s),d)return o;if(this.hasBarcode){i=Date.now();const t=this.barcodeModel.detect(e);this.rawBarcodeData=null==t?void 0:t.reduce(((t,e)=>("string"==typeof e.extra&&(t[e.class]=e.extra),t)),{}),s=Date.now()-i;const r=Object.keys(this.rawBarcodeData).length>0;if(o.addStepResponse(Qi.BARCODE_DETECTION,r,s),!r)return o}return o}}class sp{constructor(){this.durations=[],this.countSuccess=0,this.countFailed=0}}class up{constructor(){this.frameHandleDurations=[],this.stableCounts=[0],this.stats=new Map,Object.values(Qi).forEach((t=>{this.stats.set(t,new sp)}))}addStats(t,e){this.frameHandleDurations.push(e),t.isValid?this.stableCounts[this.stableCounts.length-1]++:this.stableCounts.push(0),t.steps.forEach((t=>{this.addStat(t.step,t.duration,t.success?1:0,t.success?0:1)}))}addStat(t,e,r,n){const o=this.stats.get(t);if(!o)throw new Error(`Stat for step ${t} not found`);o.durations.push(e),o.countSuccess+=r,o.countFailed+=n}}let cp=!1;const lp=t=>{cp=t};async function dp(t){let{camera:e,onDetect:r,showError:n,onMetricsBatch:o,hasBarcode:i,supportedBarcodeSymbologies:a}=t;var s,u,c,l,d;const h=new rp(new ap(i,a),function(t){var e;const r=null===(e=Ji.state.autoCaptureSettings.settings)||void 0===e?void 0:e.stability,n=t?null==r?void 0:r.documentBackStableFramesCountWithBarcode:null==r?void 0:r.documentBackStableFramesCountNoBarcode,o=null!=n?n:null==r?void 0:r.documentBackStableFramesCount;return Number.isFinite(o)&&o>0?o:1}(i)),f=null===(s=Ji.state.autoCaptureSettings.settings)||void 0===s?void 0:s.frameSamplingThreshold;lp(!0);const p=new up;let g=new up,m=0;for(;h.state.name!==Ff.ACCEPTED&&cp;)if(Hf(e.videoElement)){try{const t=Date.now(),i=jf(e.videoElement),a={width:null!==(c=null===(u=e.videoElement.getBoundingClientRect())||void 0===u?void 0:u.width)&&void 0!==c?c:0,height:null!==(d=null===(l=e.videoElement.getBoundingClientRect())||void 0===l?void 0:l.height)&&void 0!==d?d:0},s=await h.handleFrame({frame:i,deviceInfo:a}),y=Date.now()-t+Vf;p.addStats(s,y),g.addStats(s,y),m++,h.stats=p,f&&m>=f&&(null==o||o(g),g=new up,m=0),await Gf({context:h,onDetect:r,showError:n,frame:i})}catch(t){ha("autocapture back-doc frame skipped after error",t)}await new Promise((t=>setTimeout(t,Vf)))}else await new Promise((t=>setTimeout(t,Vf)));m>0&&(null==o||o(g))}class hp{async validate(t){let{frame:e,deviceInfo:r}=t;var n;const o=new Kf;let i=Date.now();const a=null===(n=await op(e))||void 0===n?void 0:n[0];let s=Date.now()-i;if(o.addStepResponse(Qi.DOCUMENT_DETECTION,void 0!==a,s),!a)return o;i=Date.now();const u=Xf({captureFrame:document.getElementById("overlay-frame environment").getBoundingClientRect(),object:a,videoWidth:e.width,videoHeight:e.height,deviceWidth:r.width,deviceHeight:r.height,threshold:Ji.state.autoCaptureSettings.settings.capture.documentFrontSizeThreshold,iouThreshold:Ji.state.autoCaptureSettings.settings.capture.documentFrontIouThreshold});if(s=Date.now()-i,o.addStepResponse(Qi.DOCUMENT_POSITION,u,s),!u)return o;i=Date.now();const c=await ip(e,a);s=Date.now()-i;const l=c.some((t=>"blur"===t.class));if(o.addStepResponse(Qi.BLUR_DETECTION,!l,s),l)return o;const d=c.some((t=>"glare"===t.class));return o.addStepResponse(Qi.GLARE_DETECTION,!d,s),o}}let fp=!1;const pp=t=>{fp=t};class gp{async validate(t){let{frame:e,deviceInfo:r}=t;var n;const o=new Kf;let i=Date.now();const a=null===(n=await async function(t){return t instanceof HTMLVideoElement&&t.paused?[]:np("DETECT_FACE_LANDMARKS",t)}(e))||void 0===n?void 0:n[0];let s=Date.now()-i;if(o.addStepResponse(Qi.FACE_DETECTION,"face"===(null==a?void 0:a.class),s),!a)return o;i=Date.now();const u=Xf({captureFrame:document.getElementById("overlay-frame user").getBoundingClientRect(),object:a,videoWidth:e.width,videoHeight:e.height,deviceWidth:r.width,deviceHeight:r.height,threshold:Ji.state.autoCaptureSettings.settings.faceDetector.selfieSizeThreshold,iouThreshold:Ji.state.autoCaptureSettings.settings.faceDetector.selfieIouThreshold});return s=Date.now()-i,o.addStepResponse(Qi.FACE_POSITION,u,s),o}}let mp=!1;const yp=t=>{mp=t};const wp=new Map;class _p extends Error{constructor(t,e,r){super(r||`Error during ${e}: ${t}`),this.errorCode=t,this.step=e,this.name="CaptureError"}}function vp(t,e){const r=wp.get(t);r&&(r.reject(e),wp.delete(t))}function Ep(t,e,r){const n=wp.get(t);return n&&(n.reject(new _p("other","document"===t?"document_front":"selfie",`New capture${"document"===t?"Document":"Selfie"} call cancelled previous one`)),wp.delete(t)),new Promise(((n,o)=>{wp.set(t,{resolve:n,reject:o,onCapture:r,captures:[],stepType:t,acquisitionId:e})}))}const bp={document_front:!1,document_back:!1,selfie:!0};function Ap(t){return"document_front"===t||"document_back"===t?"document":"selfie"===t?"selfie":null}async function Cp(t,e){var r,n,o,i;let a="camera-error";if("NotAllowedError"===e.name){a="Permission dismissed"===e.message?"camera-permission-dismissed":"camera-permission-denied";const s=oa.createCameraNotAllowedEvent(e.message,t);await ia(null===(r=Ji.state)||void 0===r?void 0:r.step,null===(n=Ji.state)||void 0===n?void 0:n.userToken,null===(o=Ji.state)||void 0===o?void 0:o.sessionId,null===(i=Ji.state)||void 0===i?void 0:i.clientId,s),Ji.dispatch("setIsCapturingProcessStarted",!1);const u=Ap(t);u&&vp(u,new _p(a,t))}Xi(t,a)}function Ip(t){const e=(t=>{var e,r,n,o;const[i,a]=t.split(",");if(!i||!a)throw new Error("unable-to-parse-data-uri");const s=null===(n=null===(r=null===(e=i.split(";"))||void 0===e?void 0:e[0])||void 0===r?void 0:r.split(":"))||void 0===n?void 0:n[1];if(!s)throw new Error("unable-to-parse-data-uri");const u=null===(o=s.split("/"))||void 0===o?void 0:o[1];if(!u)throw new Error("unable-to-parse-data-uri");return{data:a,format:u}})(t);return{image:{data:e.data,format:e.format,captureMargins:nf()}}}let Sp,Tp=!1;const Dp=async t=>{"expired"===(null==t?void 0:t.status)&&Yi("processing","session-expired",`Session expired for session id: ${Ji.state.sessionId}`)},Op=t=>{let{step:e}=t;var r,n,o;const i=null===(n=null===(r=Ji.state)||void 0===r?void 0:r.autoCaptureSettings)||void 0===n?void 0:n.enabled;let a=!1;const s=null===(o=Ji.state)||void 0===o?void 0:o.videoCaptureSettings,u=(t=>{let e,r,n=!1;const o=bf(t),i=new cf(o),a=async()=>{n&&(await i.stopCamera(),i.stream&&i.stream.getTracks().forEach((t=>{"live"==t.readyState&&t.stop()})),n=!1)};return{get videoStream(){return r},startVideoFeed:async t=>{var o,s,u;n&&await a(),"environment"==t&&(e=await mf());const c=null!==(s=null===(o=null==e?void 0:e.selectedCamera)||void 0===o?void 0:o.deviceId)&&void 0!==s?s:t,l=Ef(t,null===(u=Ji.state)||void 0===u?void 0:u.videoCaptureSettings);lf.getInstance().stopStream(),r=await i.startCamera(c,l),n=!0},stopVideoFeed:a,videoElement:i.videoElement,getDataUri:i.getDataUri,getCameraInfo:()=>e}})(of(e));!function(t){ji({type:"page-load",step:t})}(e),(async()=>{const t=await $h(Ji.state.sessionId,Ji.state.userToken,Ji.state.clientId);Dp(t)})();const c=qf({step:e,setImage:l,camera:u});async function l(t){let{suspendedPreview:r=!1,isManualCapture:n=!0,frame:o,context:i}=t;if(o||(o=jf(u.videoElement)),u.videoElement.style.display="none","function"==typeof u.videoElement.pause&&u.videoElement.pause(),"document_front"===e){pp(!1);const t=document.getElementById("front-document-animation");t&&(t.style.opacity="0")}"document_back"===e&&lp(!1),"selfie"===e&&yp(!1);const l=Date.now(),f=function(t){const e=t.getCameraInfo();return{selectedCamera:(null==e?void 0:e.selectedCamera)&&{label:e.selectedCamera.label},camerasInfo:(null==e?void 0:e.optionalCameras)&&e.optionalCameras.map((t=>({label:t.label})))}}(u);if(!a)return;const p=function(t,e){var r,n;if("document_front"!==t&&"document_back"!==t&&"selfie"!==t)return!1;const o=e?"manual":"autocapture",i=null===(r=Ji.state.captureApprovalSettings)||void 0===r?void 0:r[o];return null!==(n=null==i?void 0:i[t])&&void 0!==n?n:bp[t]}(e,n),g=(t=>t.toDataURL("image/jpeg"))(o);p||c.setLoadingMode(null==s?void 0:s.showLoadingBlock),c.setPreviewImage(g,{hideSpinner:p,objectFit:p&&"selfie"!==e?"contain":void 0}),p?function(t,r,n,o,i){"document_front"===e||"document_back"===e?c.setTitleInstructionsMidStep({pageHeader:"page_header_check_image",title:"main_title_check_image",instructions:"document_approval_instruction"}):c.setTitleInstructionsMidStep({instructions:"selfie_approval_autocapture"});c.setApprovalRetakeButtons({approveAction:async()=>{c.hideApprovalRetakeButtons(),c.setLoadingMode(null==s?void 0:s.showLoadingBlock),await h(t,r,n,o,i)},retakeAction:async()=>{c.hideApprovalRetakeButtons(),d()}})}(r,g,f,l,i):await h(r,g,f,l,i)}function d(){if(function(){if("document_front"===e||"document_back"===e){const t=If[e];c.setTitleInstructionsMidStep({pageHeader:t.page,title:t.title,instructions:t.instructions})}else"selfie"===e&&c.setTitleInstructionsMidStep({instructions:i?"second_title_face_autocapture":"second_title_document_face"})}(),"document_front"===e){const t=document.getElementById("front-document-animation");t&&(t.style.opacity="1")}u.startVideoFeed(of(e)).then((()=>{a=!0,c.enableVideoElement(),i&&(c.setAutoCapturingError(null),g(e))})).catch((async t=>{throw await Cp(e,t),t}))}async function h(t,r,n,o,l){var h,f;const p=[];!function(t){var r,n,o,i;const a=oa.createUserActionEvent("capture_image",e,t);ia(null===(r=Ji.state)||void 0===r?void 0:r.step,null===(n=Ji.state)||void 0===n?void 0:n.userToken,null===(o=Ji.state)||void 0===o?void 0:o.sessionId,null===(i=Ji.state)||void 0===i?void 0:i.clientId,a)}(null==l?void 0:l.stats),function(t,e){ji({type:"capture-image",imageType:e,step:t})}(e,af(e));try{const g=Date.now(),m=Ip(r);a=!1;const y=Ap(e),w=y?function(t){var e;return null===(e=wp.get(t))||void 0===e?void 0:e.acquisitionId}(y):void 0;p.push(rf(Ji.state.sessionId,Ji.state.userToken,Ji.state.clientId,null==m?void 0:m.image,n,af(e),(null==l?void 0:l.detectionStrategy)instanceof ap?null===(h=l.detectionStrategy)||void 0===h?void 0:h.rawBarcodeData:void 0,w)),p.push(t?new Promise((t=>setTimeout(t,500))):Promise.resolve(null)),c.setLoadingMode(null==s?void 0:s.showLoadingBlock);const _=(await Promise.all(p))[0];Object.prototype.hasOwnProperty.call(_,"has_barcode")&&(Tp=_.has_barcode,Sp=null!==(f=_.supported_barcode_symbologies)&&void 0!==f?f:[]),async function(t){let{step:e,requestStartTime:r,imageProcessingStartTime:n,serverProcessingTime:o,userToken:i,sessionId:a,clientId:s}=t;const u=Date.now()-r,c=n?r-n:0,l=oa.createUploadImageEvent(e,String(u),String(o),String(c));await ia(e,i,a,s,l)}({step:e,requestStartTime:g,imageProcessingStartTime:o,serverProcessingTime:_.serverProcessingTime,userToken:Ji.state.userToken,sessionId:Ji.state.sessionId,clientId:Ji.state.clientId}),Ji.dispatch("setMissingImages",_.missing_images),c.setLoadingComplete(),function(t,e,r){ji({type:"capture-image-result",imageType:e,feedback:r,step:t})}(e,af(e),_.feedback);const v=Ap(e);if(v&&"modular"===Ji.state.flowType){const t=af(e);!function(t,e){let r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const n=wp.get(t);if(n){if(n.onCapture)try{n.onCapture(e)}catch(t){console.error("onCapture callback error:",t)}r&&n.captures.push(e)}}(v,{sessionId:Ji.state.sessionId,type:t===wo.image_type.DOCUMENT_FRONT?"document_front":t===wo.image_type.DOCUMENT_BACK?"document_back":"selfie",feedback:_.feedback})}if("ok"!==_.feedback)return await async function(t){Wf("border-color",Lf),i?c.setAutoCapturingError(t.feedback,t.custom_feedback):c.setCapturingShowErrorMode(t.feedback,t.custom_feedback),await new Promise((t=>setTimeout(t,1e3))),Wf("border-color",Uf)}(_),void d();if(await u.stopVideoFeed(),Wf("border-color",zf),await new Promise((t=>setTimeout(t,750))),Wf("border-color",Uf),"modular"===Ji.state.flowType)if("document_front"===e&&_.missing_images.includes(wo.image_type.DOCUMENT_BACK))Ji.dispatch("setStep","document_back");else{const t=document.getElementById(Ji.state.rootElementId);t&&(t.style.visibility="hidden"),v&&function(t){const e=wp.get(t);e&&(e.resolve({captures:[...e.captures]}),wp.delete(t))}(v)}else{const t=(t=>{if("modular"===Ji.state.flowType)return null;let e;return e=t&&t.length>0?t[0]:"processing",e})(Ji.state.missingImages);t&&Ji.dispatch("setStep",t)}}catch(t){c.setLoadingComplete(),c.setCapturingShowErrorMode(yo.feedback.OTHER);const r=Ap(e);r&&"modular"===Ji.state.flowType&&vp(r,new _p("failed-to-submit-image",e)),u.startVideoFeed(of(e)).then((()=>{a=!0,i&&g(e)})).catch((async t=>{throw await Cp(e,t),t})),Xi(e,"failed-to-submit-image")}}function f(t){var r,n,o,i;const a=oa.createUserActionEvent("autocapture_stats",e,t);ia(null===(r=Ji.state)||void 0===r?void 0:r.step,null===(n=Ji.state)||void 0===n?void 0:n.userToken,null===(o=Ji.state)||void 0===o?void 0:o.sessionId,null===(i=Ji.state)||void 0===i?void 0:i.clientId,a)}async function p(){var t,r,n,o,i;try{const a=u.getCameraInfo(),s=function(t,e){const r=ff(),n={label:e,is_ios:r};if(r||!t)return n;const o=t.getVideoTracks()[0];if(!o)return n;try{const t=o.getSettings();n.width=t.width,n.height=t.height,n.frame_rate=t.frameRate?Math.round(t.frameRate):void 0}catch(t){}try{const t=o.getCapabilities(),e=Array.isArray(t.focusMode)?t.focusMode:[];e.length>0&&(n.has_continuous_focus=e.includes("continuous"))}catch(t){}return n}(u.videoStream,null===(t=null==a?void 0:a.selectedCamera)||void 0===t?void 0:t.label),c=await oa.createCaptureStartEvent(e,s);ia(null===(r=Ji.state)||void 0===r?void 0:r.step,null===(n=Ji.state)||void 0===n?void 0:n.userToken,null===(o=Ji.state)||void 0===o?void 0:o.sessionId,null===(i=Ji.state)||void 0===i?void 0:i.clientId,c)}catch(t){ha("Failed to send `capture_start` event",t)}}async function g(t){if("document_front"===t){for(;!a||!Hf(u.videoElement);)await new Promise((t=>setTimeout(t,100)));return u.videoElement.onloadedmetadata=()=>{var t;ha("video dimensions (width, height, orientation): ",u.videoElement.videoWidth,u.videoElement.videoHeight,null===(t=null===window||void 0===window?void 0:window.screen)||void 0===t?void 0:t.orientation)},await async function(t){let{camera:e,onDetect:r,showError:n,onMetricsBatch:o}=t;var i,a,s,u,c,l,d,h;const f=new rp(new hp,null!==(s=null===(a=null===(i=Ji.state.autoCaptureSettings.settings)||void 0===i?void 0:i.stability)||void 0===a?void 0:a.documentFrontStableFramesCount)&&void 0!==s?s:2),p=null===(u=Ji.state.autoCaptureSettings.settings)||void 0===u?void 0:u.frameSamplingThreshold,g=new up;let m=new up,y=0;for(pp(!0);f.state.name!==Ff.ACCEPTED&&fp;)if(Hf(e.videoElement)){try{const t=Date.now(),i=jf(e.videoElement),a={width:null!==(l=null===(c=e.videoElement.getBoundingClientRect())||void 0===c?void 0:c.width)&&void 0!==l?l:0,height:null!==(h=null===(d=e.videoElement.getBoundingClientRect())||void 0===d?void 0:d.height)&&void 0!==h?h:0},s=await f.handleFrame({frame:i,deviceInfo:a}),u=Date.now()-t+Vf;g.addStats(s,u),m.addStats(s,u),y++,f.stats=g,p&&y>=p&&(null==o||o(m),m=new up,y=0),await Gf({context:f,onDetect:r,showError:n,frame:i})}catch(t){ha("autocapture front-doc frame skipped after error",t)}await new Promise((t=>setTimeout(t,Vf)))}else await new Promise((t=>setTimeout(t,Vf)));y>0&&(null==o||o(m))}({camera:u,onDetect:l,showError:c.setAutoCapturingError,onMetricsBatch:f})}if("document_back"===t){for(;!a||!Hf(u.videoElement);)await new Promise((t=>setTimeout(t,100)));return u.videoElement.onloadedmetadata=()=>{var t;ha("video dimensions (width, height, orientation): ",u.videoElement.videoWidth,u.videoElement.videoHeight,null===(t=null===window||void 0===window?void 0:window.screen)||void 0===t?void 0:t.orientation)},await dp({camera:u,onDetect:l,showError:c.setAutoCapturingError,onMetricsBatch:f,hasBarcode:Tp,supportedBarcodeSymbologies:Sp})}if("selfie"===t){for(;!a||!Hf(u.videoElement);)await new Promise((t=>setTimeout(t,100)));return u.videoElement.onloadedmetadata=()=>{var t;ha("video dimensions (width, height, orientation): ",u.videoElement.videoWidth,u.videoElement.videoHeight,null===(t=null===window||void 0===window?void 0:window.screen)||void 0===t?void 0:t.orientation)},await async function(t){let{camera:e,onDetect:r,showError:n,onMetricsBatch:o}=t;var i,a,s,u,c,l,d,h;const f=new rp(new gp,null!==(s=null===(a=null===(i=Ji.state.autoCaptureSettings.settings)||void 0===i?void 0:i.stability)||void 0===a?void 0:a.selfieStableFramesCount)&&void 0!==s?s:30),p=null===(u=Ji.state.autoCaptureSettings.settings)||void 0===u?void 0:u.frameSamplingThreshold;yp(!0);const g=new up;let m=new up,y=0;for(;f.state.name!==Ff.ACCEPTED&&mp;)if(Hf(e.videoElement)){try{const t=Date.now(),i=jf(e.videoElement),a={width:null!==(l=null===(c=e.videoElement.getBoundingClientRect())||void 0===c?void 0:c.width)&&void 0!==l?l:0,height:null!==(h=null===(d=e.videoElement.getBoundingClientRect())||void 0===d?void 0:d.height)&&void 0!==h?h:0},s=await f.handleFrame({frame:i,deviceInfo:a}),u=Date.now()-t;g.addStats(s,u),m.addStats(s,u),y++,f.stats=g,p&&y>=p&&(null==o||o(m),m=new up,y=0),await Gf({context:f,onDetect:r,showError:n,frame:i,isSelfie:!0})}catch(t){ha("autocapture selfie frame skipped after error",t)}await new Promise((t=>setTimeout(t,50)))}else await new Promise((t=>setTimeout(t,50)));y>0&&(null==o||o(m))}({camera:u,onDetect:l,showError:c.setAutoCapturingError,onMetricsBatch:f})}}i&&g(e),(async t=>{var e,r,n,o;const i=oa.createPageViewEvent(t);await ia(null===(e=Ji.state)||void 0===e?void 0:e.step,null===(r=Ji.state)||void 0===r?void 0:r.userToken,null===(n=Ji.state)||void 0===n?void 0:n.sessionId,null===(o=Ji.state)||void 0===o?void 0:o.clientId,i)})(e);const m=document.getElementById(Ji.state.rootElementId);return m&&(m.style.visibility="hidden"),u.startVideoFeed(of(e)).then((async()=>{a=!0,m&&(m.style.visibility="visible");try{u.videoElement.readyState<HTMLMediaElement.HAVE_METADATA&&await Promise.race([new Promise((t=>u.videoElement.addEventListener("loadedmetadata",(()=>t()),{once:!0}))),new Promise((t=>setTimeout(t,3e3)))]),await p()}catch(t){ha("Failed to send `capture_start` event",t)}})).catch((async t=>{throw await Cp(e,t),t})),c.component},Rp=()=>{ji({type:"start-verification-processing",step:Ji.state.step}),Wi("processing","processing",Ji.state.sessionId);const t=Mp("processing-verification");ef(t,Pf({text:"Processing Verification",id:"processing-verification-header",testid:"processing-verification-header"}));const e=async()=>{const t=await $h(Ji.state.sessionId,Ji.state.userToken,Ji.state.clientId);o(t)},r=()=>{setTimeout(e,3e3)},n=async t=>{Ji.dispatch("setStep",t.status),Ji.dispatch("setStatus",t.status)},o=async t=>{var e,o,i;if(Ji.dispatch("setMissingImages",t.missing_images),t.status)if("complete"===(null==t?void 0:t.status)){lf.getInstance().stopStream();const r=oa.createProcessingCompleteEvent();await ia(Ji.state.step,Ji.state.userToken,null===(e=Ji.state)||void 0===e?void 0:e.sessionId,null===(o=Ji.state)||void 0===o?void 0:o.clientId,r),n(t),Wi("complete",t.status,Ji.state.sessionId),function(t,e,r){ji({type:"verification-complete",step:t,sessionId:e,callbackUrl:r})}("complete",Ji.state.sessionId,t.callback_url),i=zi,sessionStorage.removeItem(i)}else"recapture"===(null==t?void 0:t.status)?(n(t),Ji.dispatch("setIsCapturingProcessStarted",!1),Wi("recapture",t.status,Ji.state.sessionId),function(t,e,r){ji({type:"verification-recapture",step:t,sessionId:e,reason:r})}("recapture",t.status,t.recapture_reason)):"expired"===(null==t?void 0:t.status)?Yi("processing","session-expired",`Session expired for session id: ${Ji.state.sessionId}`):r();else"processing"!==t.state&&(n(t),r())};return e(),t},Mp=t=>tf({tagName:"div",style:{display:"flex",height:"100%",justifyContent:"space-between",flexDirection:"column",alignItems:"center"},id:t,testid:"processing-verification"});function Np(t,e){var r;if(!t)return;null===(r=e.firstChild)||void 0===r||r.remove();const n=function(t){switch(t){case"processing":return Rp;case"document_front":case"document_back":case"selfie":return Op;default:throw new Error("Invalid step")}}(t);ef(e,n({step:t}))}function kp(t){let{key:e,state:r}=t;const n=r.rootElementId,o=document.getElementById(n);"step"===e&&"complete"!==r.step&&"recapture"!==r.step&&Np(r.step,o),o&&"processing"===r.step&&(o.style.visibility="hidden")}function xp(){const t=function(t){try{return JSON.parse(t)}catch(t){return console.error(t),null}}(Ui(zi));if(!t)throw new Error("Error restarting session, stored session data is invalid or missing");const e=t.sessionId,r=t.userToken,n=t.flowType;return Ji.dispatch("setSessionId",e),Ji.dispatch("setUserToken",r),{sessionId:e,userToken:r,flowType:n}}async function Pp(){var t,e;if(null===(t=Ji.state.autoCaptureSettings)||void 0===t?void 0:t.enabled){const t=Date.now();try{await Lp(),ha("all models loaded - auto-capture enabled")}catch(t){Ji.dispatch("setAutoCaptureSettings",{enabled:!1,autocapture_settings:null===(e=Ji.state.autoCaptureSettings)||void 0===e?void 0:e.settings}),ha("Model loading did not complete on time:",t);sa(`timed out loading models: ${Bh.filter((t=>kh[t].status!==Nh.LOADED)).map((t=>t)).join(", ")}`,"model_load_timeout","init")}const r=Object.values(kh).filter((t=>t.status===Nh.LOADED)).map((t=>t.loadingStats));!async function(t,e){const r=oa.createSdkInitEvent(t,e);await ua("init",r)}(Date.now()-t,r)}}async function Bp(t){var e;try{await lf.getInstance().startNewStream({video:o(o({},Ef("environment",null===(e=Ji.state)||void 0===e?void 0:e.videoCaptureSettings)),{},{deviceId:await vf("environment")})}),Gi("init",t),function(t,e,r){const n=document.getElementById(r);if("modular"===Ji.state.flowType)return;n.style.visibility="visible",Np(t[0],n)}(Ji.state.missingImages,Ji.state.sessionId,Ji.state.rootElementId)}catch(t){await Cp("init",t)}}async function Fp(t){let{status:e,sessionId:r,userToken:n,missingImages:o,rootElementId:i,language:a,flowType:s}=t;await async function(){if(Uh)await Uh;else{const t=await qi(Ji.state.clientId);await Kh(t)}}(),void 0!==s&&""!==s&&Ji.dispatch("setFlowType",s),function(t,e){ji({type:"session-granted",step:t,sessionId:e})}("init",r),Ji.dispatch("setStatus",e),Ji.dispatch("setSessionId",r),Ji.dispatch("setUserToken",n),Ji.dispatch("setMissingImages",o),Ji.dispatch("setRootElement",i),Ji.dispatch("setLanguage",a),async function(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"en";la.overrideLanguage(da[r]||da.en);let n=document.getElementById(e);if(!n){n=tf({tagName:"div",style:{background:"#fff",position:"absolute",top:"0",left:"0",zIndex:"1",width:"100%",height:"100%",font:"inherit"},id:e,testid:"root"});const t=document.createElement("style");t.innerHTML=`\n @media only screen and (max-height: 576px) {\n #${e} #trigger-section {\n margin: 0 !important;\n }\n #${e} #page-header {\n height: 5% !important;\n }\n }\n `,ef(document.head,t),ef(document.body,n)}"modular"===Ji.state.flowType&&(n.style.visibility="hidden")}(Ji.state.sessionId,Ji.state.rootElementId,Ji.state.language),function(){try{Bi.events.off(Li,kp)}catch(t){}Bi.events.on(Li,kp)}(),await Pp(),"modular"!==Ji.state.flowType?await Bp(r):Gi("init",r)}const Lp=async()=>{const t=Ji.state.autoCaptureSettings.settings.modelLoadingTimeout;return Promise.race([Fh(),new Promise(((e,r)=>setTimeout((()=>r(new Error(`Model loading timed out after ${t} ms`))),t)))])};async function zp(t){if(Ji.state.isCapturingProcessStarted)return void Xi(Ji.state.step,"trying-to-initialize-active-session");const e=t?await async function(t){let e,r,n;try{const o=await Qh(t,Ji.state.consentVersion,Ji.state.clientId);return e=o.sessionId,r=o.userToken,n=o.flowType,Ji.dispatch("setSessionId",e),Ji.dispatch("setUserToken",r),{sessionId:e,userToken:r,flowType:n}}catch(t){throw console.log("Error starting session"),console.error(t),t}}(t):xp(),r=e.sessionId,n=e.userToken,o=e.flowType;if(!r)return void Xi(Ji.state.step,"other");const{missing_images:i,status:a}=await $h(r,n,Ji.state.clientId);return Ji.dispatch("setIsCapturingProcessStarted",!0),await Fp({status:a,sessionId:r,userToken:n,missingImages:i,rootElementId:Ji.state.rootElementId,language:Ji.state.language,flowType:o}),!0}async function Up(t){if("modular"!==Ji.state.flowType)throw new Error('showStep() is only available when flowType is "modular". Current flowType: '+Ji.state.flowType);if(!Ji.state.isCapturingProcessStarted||!Ji.state.sessionId)throw new Error("Session is not active. Call start() first to start a verification session.");let e;try{e=function(t){if("document"===t)return"document_front";if("selfie"===t)return"selfie";throw new Error(`Invalid step type: ${t}`)}(t)}catch(e){throw new Error(`Cannot show step "${t}": ${e instanceof Error?e.message:"Step type not available in missing_images"}`)}const r=document.getElementById(Ji.state.rootElementId);r&&"modular"===Ji.state.flowType&&(r.style.visibility="hidden"),Ji.dispatch("setStep",e)}async function Vp(t){try{return await zp(t)}catch(t){throw console.log("Error starting session"),console.error(t),t}}async function Hp(){try{return await async function(){if("recapture"===Ji.state.verificationStatus||"pending"===Ji.state.verificationStatus){const{sessionId:t,userToken:e}=xp(),{missing_images:r,status:n}=await $h(t,e,Ji.state.clientId);return await Fp({status:n,sessionId:t,userToken:e,missingImages:r,rootElementId:Ji.state.rootElementId,language:Ji.state.language}),!0}Xi(Ji.state.step,"trying-to-initialize-active-session")}()}catch(t){throw console.log("Error restarting session"),console.error(t),t}}async function jp(t){if(!t||!t.acquisitionId)throw new Error("captureDocument requires an acquisitionId");const e=Ep("document",t.acquisitionId,t.onCapture);return Up("document").catch((t=>{const e=t instanceof Error?t.message:String(t);vp("document",new _p("other","document_front",e))})),e}async function Gp(t){if(!t||!t.acquisitionId)throw new Error("captureSelfie requires an acquisitionId");const e=Ep("selfie",t.acquisitionId,t.onCapture);return Up("selfie").catch((t=>{const e=t instanceof Error?t.message:String(t);vp("selfie",new _p("other","selfie",e))})),e}const Wp=()=>Io;const Xp="2.4.1",Yp={initialize:e,...Object.freeze({__proto__:null,CaptureError:_p,captureDocument:jp,captureSelfie:Gp,recapture:Hp,start:Vp,version:Wp})};export{_p as CaptureError,Xp as PACKAGE_VERSION,jp as captureDocument,Gp as captureSelfie,Yp as idv,Hp as recapture,Vp as start,Wp as version};