/*!
 * html2canvas 1.4.1 <https://html2canvas.hertzen.com>
 * Copyright (c) 2022 Niklas von Hertzen <https://hertzen.com>
 * Released under MIT License
 *//*! *****************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var Ar=function(e,A){return Ar=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,t){r.__proto__=t}||function(r,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n])},Ar(e,A)};function nA(e,A){if(typeof A!="function"&&A!==null)throw new TypeError("Class extends value "+String(A)+" is not a constructor or null");Ar(e,A);function r(){this.constructor=e}e.prototype=A===null?Object.create(A):(r.prototype=A.prototype,new r)}var er=function(){return er=Object.assign||function(A){for(var r,t=1,n=arguments.length;t<n;t++){r=arguments[t];for(var B in r)Object.prototype.hasOwnProperty.call(r,B)&&(A[B]=r[B])}return A},er.apply(this,arguments)};function Y(e,A,r,t){function n(B){return B instanceof r?B:new r(function(s){s(B)})}return new(r||(r=Promise))(function(B,s){function a(c){try{o(t.next(c))}catch(g){s(g)}}function i(c){try{o(t.throw(c))}catch(g){s(g)}}function o(c){c.done?B(c.value):n(c.value).then(a,i)}o((t=t.apply(e,A||[])).next())})}function J(e,A){var r={label:0,sent:function(){if(B[0]&1)throw B[1];return B[1]},trys:[],ops:[]},t,n,B,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(o){return function(c){return i([o,c])}}function i(o){if(t)throw new TypeError("Generator is already executing.");for(;r;)try{if(t=1,n&&(B=o[0]&2?n.return:o[0]?n.throw||((B=n.return)&&B.call(n),0):n.next)&&!(B=B.call(n,o[1])).done)return B;switch(n=0,B&&(o=[o[0]&2,B.value]),o[0]){case 0:case 1:B=o;break;case 4:return r.label++,{value:o[1],done:!1};case 5:r.label++,n=o[1],o=[0];continue;case 7:o=r.ops.pop(),r.trys.pop();continue;default:if(B=r.trys,!(B=B.length>0&&B[B.length-1])&&(o[0]===6||o[0]===2)){r=0;continue}if(o[0]===3&&(!B||o[1]>B[0]&&o[1]<B[3])){r.label=o[1];break}if(o[0]===6&&r.label<B[1]){r.label=B[1],B=o;break}if(B&&r.label<B[2]){r.label=B[2],r.ops.push(o);break}B[2]&&r.ops.pop(),r.trys.pop();continue}o=A.call(e,r)}catch(c){o=[6,c],n=0}finally{t=B=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}}function ve(e,A,r){if(r||arguments.length===2)for(var t=0,n=A.length,B;t<n;t++)(B||!(t in A))&&(B||(B=Array.prototype.slice.call(A,0,t)),B[t]=A[t]);return e.concat(B||A)}var wA=function(){function e(A,r,t,n){this.left=A,this.top=r,this.width=t,this.height=n}return e.prototype.add=function(A,r,t,n){return new e(this.left+A,this.top+r,this.width+t,this.height+n)},e.fromClientRect=function(A,r){return new e(r.left+A.windowBounds.left,r.top+A.windowBounds.top,r.width,r.height)},e.fromDOMRectList=function(A,r){var t=Array.from(r).find(function(n){return n.width!==0});return t?new e(t.left+A.windowBounds.left,t.top+A.windowBounds.top,t.width,t.height):e.EMPTY},e.EMPTY=new e(0,0,0,0),e}(),Qt=function(e,A){return wA.fromClientRect(e,A.getBoundingClientRect())},is=function(e){var A=e.body,r=e.documentElement;if(!A||!r)throw new Error("Unable to get document size");var t=Math.max(Math.max(A.scrollWidth,r.scrollWidth),Math.max(A.offsetWidth,r.offsetWidth),Math.max(A.clientWidth,r.clientWidth)),n=Math.max(Math.max(A.scrollHeight,r.scrollHeight),Math.max(A.offsetHeight,r.offsetHeight),Math.max(A.clientHeight,r.clientHeight));return new wA(0,0,t,n)},lt=function(e){for(var A=[],r=0,t=e.length;r<t;){var n=e.charCodeAt(r++);if(n>=55296&&n<=56319&&r<t){var B=e.charCodeAt(r++);(B&64512)===56320?A.push(((n&1023)<<10)+(B&1023)+65536):(A.push(n),r--)}else A.push(n)}return A},M=function(){for(var e=[],A=0;A<arguments.length;A++)e[A]=arguments[A];if(String.fromCodePoint)return String.fromCodePoint.apply(String,e);var r=e.length;if(!r)return"";for(var t=[],n=-1,B="";++n<r;){var s=e[n];s<=65535?t.push(s):(s-=65536,t.push((s>>10)+55296,s%1024+56320)),(n+1===r||t.length>16384)&&(B+=String.fromCharCode.apply(String,t),t.length=0)}return B},Gr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",as=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(var ye=0;ye<Gr.length;ye++)as[Gr.charCodeAt(ye)]=ye;var Nr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",se=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(var me=0;me<Nr.length;me++)se[Nr.charCodeAt(me)]=me;var os=function(e){var A=e.length*.75,r=e.length,t,n=0,B,s,a,i;e[e.length-1]==="="&&(A--,e[e.length-2]==="="&&A--);var o=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined"&&typeof Uint8Array.prototype.slice!="undefined"?new ArrayBuffer(A):new Array(A),c=Array.isArray(o)?o:new Uint8Array(o);for(t=0;t<r;t+=4)B=se[e.charCodeAt(t)],s=se[e.charCodeAt(t+1)],a=se[e.charCodeAt(t+2)],i=se[e.charCodeAt(t+3)],c[n++]=B<<2|s>>4,c[n++]=(s&15)<<4|a>>2,c[n++]=(a&3)<<6|i&63;return o},cs=function(e){for(var A=e.length,r=[],t=0;t<A;t+=2)r.push(e[t+1]<<8|e[t]);return r},gs=function(e){for(var A=e.length,r=[],t=0;t<A;t+=4)r.push(e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t]);return r},MA=5,yr=6+5,mt=2,us=yr-MA,Pn=65536>>MA,Qs=1<<MA,Kt=Qs-1,ls=1024>>MA,ws=Pn+ls,fs=ws,Cs=32,Us=fs+Cs,Fs=65536>>yr,hs=1<<us,ds=hs-1,Vr=function(e,A,r){return e.slice?e.slice(A,r):new Uint16Array(Array.prototype.slice.call(e,A,r))},Es=function(e,A,r){return e.slice?e.slice(A,r):new Uint32Array(Array.prototype.slice.call(e,A,r))},Hs=function(e,A){var r=os(e),t=Array.isArray(r)?gs(r):new Uint32Array(r),n=Array.isArray(r)?cs(r):new Uint16Array(r),B=24,s=Vr(n,B/2,t[4]/2),a=t[5]===2?Vr(n,(B+t[4])/2):Es(t,Math.ceil((B+t[4])/4));return new ps(t[0],t[1],t[2],t[3],s,a)},ps=function(){function e(A,r,t,n,B,s){this.initialValue=A,this.errorValue=r,this.highStart=t,this.highValueIndex=n,this.index=B,this.data=s}return e.prototype.get=function(A){var r;if(A>=0){if(A<55296||A>56319&&A<=65535)return r=this.index[A>>MA],r=(r<<mt)+(A&Kt),this.data[r];if(A<=65535)return r=this.index[Pn+(A-55296>>MA)],r=(r<<mt)+(A&Kt),this.data[r];if(A<this.highStart)return r=Us-Fs+(A>>yr),r=this.index[r],r+=A>>MA&ds,r=this.index[r],r=(r<<mt)+(A&Kt),this.data[r];if(A<=1114111)return this.data[this.highValueIndex]}return this.errorValue},e}(),Pr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Is=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(var Ke=0;Ke<Pr.length;Ke++)Is[Pr.charCodeAt(Ke)]=Ke;var vs="[encoded data, 52888 characters]",_r=50,ys=1,_n=2,Xn=3,ms=4,Ks=5,Xr=7,Jn=8,Jr=9,dA=10,tr=11,kr=12,rr=13,Ls=14,ie=15,nr=16,Le=17,te=18,bs=19,Yr=20,Br=21,re=22,Lt=23,GA=24,q=25,ae=26,oe=27,NA=28,Ds=29,SA=30,Ts=31,be=32,De=33,sr=34,ir=35,ar=36,Fe=37,or=38,qe=39,je=40,bt=41,kn=42,Ss=43,xs=[9001,65288],Yn="!",K="\xD7",Te="\xF7",cr=Hs(vs),uA=[SA,ar],gr=[ys,_n,Xn,Ks],Wn=[dA,Jn],Wr=[oe,ae],Ms=gr.concat(Wn),Zr=[or,qe,je,sr,ir],Os=[ie,rr],Rs=function(e,A){A===void 0&&(A="strict");var r=[],t=[],n=[];return e.forEach(function(B,s){var a=cr.get(B);if(a>_r?(n.push(!0),a-=_r):n.push(!1),["normal","auto","loose"].indexOf(A)!==-1&&[8208,8211,12316,12448].indexOf(B)!==-1)return t.push(s),r.push(nr);if(a===ms||a===tr){if(s===0)return t.push(s),r.push(SA);var i=r[s-1];return Ms.indexOf(i)===-1?(t.push(t[s-1]),r.push(i)):(t.push(s),r.push(SA))}if(t.push(s),a===Ts)return r.push(A==="strict"?Br:Fe);if(a===kn||a===Ds)return r.push(SA);if(a===Ss)return B>=131072&&B<=196605||B>=196608&&B<=262141?r.push(Fe):r.push(SA);r.push(a)}),[t,r,n]},Dt=function(e,A,r,t){var n=t[r];if(Array.isArray(e)?e.indexOf(n)!==-1:e===n)for(var B=r;B<=t.length;){B++;var s=t[B];if(s===A)return!0;if(s!==dA)break}if(n===dA)for(var B=r;B>0;){B--;var a=t[B];if(Array.isArray(e)?e.indexOf(a)!==-1:e===a)for(var i=r;i<=t.length;){i++;var s=t[i];if(s===A)return!0;if(s!==dA)break}if(a!==dA)break}return!1},zr=function(e,A){for(var r=e;r>=0;){var t=A[r];if(t===dA)r--;else return t}return 0},Gs=function(e,A,r,t,n){if(r[t]===0)return K;var B=t-1;if(Array.isArray(n)&&n[B]===!0)return K;var s=B-1,a=B+1,i=A[B],o=s>=0?A[s]:0,c=A[a];if(i===_n&&c===Xn)return K;if(gr.indexOf(i)!==-1)return Yn;if(gr.indexOf(c)!==-1||Wn.indexOf(c)!==-1)return K;if(zr(B,A)===Jn)return Te;if(cr.get(e[B])===tr||(i===be||i===De)&&cr.get(e[a])===tr||i===Xr||c===Xr||i===Jr||[dA,rr,ie].indexOf(i)===-1&&c===Jr||[Le,te,bs,GA,NA].indexOf(c)!==-1||zr(B,A)===re||Dt(Lt,re,B,A)||Dt([Le,te],Br,B,A)||Dt(kr,kr,B,A))return K;if(i===dA)return Te;if(i===Lt||c===Lt)return K;if(c===nr||i===nr)return Te;if([rr,ie,Br].indexOf(c)!==-1||i===Ls||o===ar&&Os.indexOf(i)!==-1||i===NA&&c===ar||c===Yr||uA.indexOf(c)!==-1&&i===q||uA.indexOf(i)!==-1&&c===q||i===oe&&[Fe,be,De].indexOf(c)!==-1||[Fe,be,De].indexOf(i)!==-1&&c===ae||uA.indexOf(i)!==-1&&Wr.indexOf(c)!==-1||Wr.indexOf(i)!==-1&&uA.indexOf(c)!==-1||[oe,ae].indexOf(i)!==-1&&(c===q||[re,ie].indexOf(c)!==-1&&A[a+1]===q)||[re,ie].indexOf(i)!==-1&&c===q||i===q&&[q,NA,GA].indexOf(c)!==-1)return K;if([q,NA,GA,Le,te].indexOf(c)!==-1)for(var g=B;g>=0;){var u=A[g];if(u===q)return K;if([NA,GA].indexOf(u)!==-1)g--;else break}if([oe,ae].indexOf(c)!==-1)for(var g=[Le,te].indexOf(i)!==-1?s:B;g>=0;){var u=A[g];if(u===q)return K;if([NA,GA].indexOf(u)!==-1)g--;else break}if(or===i&&[or,qe,sr,ir].indexOf(c)!==-1||[qe,sr].indexOf(i)!==-1&&[qe,je].indexOf(c)!==-1||[je,ir].indexOf(i)!==-1&&c===je||Zr.indexOf(i)!==-1&&[Yr,ae].indexOf(c)!==-1||Zr.indexOf(c)!==-1&&i===oe||uA.indexOf(i)!==-1&&uA.indexOf(c)!==-1||i===GA&&uA.indexOf(c)!==-1||uA.concat(q).indexOf(i)!==-1&&c===re&&xs.indexOf(e[a])===-1||uA.concat(q).indexOf(c)!==-1&&i===te)return K;if(i===bt&&c===bt){for(var l=r[B],Q=1;l>0&&(l--,A[l]===bt);)Q++;if(Q%2!==0)return K}return i===be&&c===De?K:Te},Ns=function(e,A){A||(A={lineBreak:"normal",wordBreak:"normal"});var r=Rs(e,A.lineBreak),t=r[0],n=r[1],B=r[2];(A.wordBreak==="break-all"||A.wordBreak==="break-word")&&(n=n.map(function(a){return[q,SA,kn].indexOf(a)!==-1?Fe:a}));var s=A.wordBreak==="keep-all"?B.map(function(a,i){return a&&e[i]>=19968&&e[i]<=40959}):void 0;return[t,n,s]},Vs=function(){function e(A,r,t,n){this.codePoints=A,this.required=r===Yn,this.start=t,this.end=n}return e.prototype.slice=function(){return M.apply(void 0,this.codePoints.slice(this.start,this.end))},e}(),Ps=function(e,A){var r=lt(e),t=Ns(r,A),n=t[0],B=t[1],s=t[2],a=r.length,i=0,o=0;return{next:function(){if(o>=a)return{done:!0,value:null};for(var c=K;o<a&&(c=Gs(r,B,n,++o,s))===K;);if(c!==K||o===a){var g=new Vs(r,c,i,o);return i=o,{value:g,done:!1}}return{done:!0,value:null}}}},_s=1<<0,Xs=1<<1,He=1<<2,qr=1<<3,et=10,jr=47,Qe=92,Js=9,ks=32,Se=34,ne=61,Ys=35,Ws=36,Zs=37,xe=39,Me=40,Be=41,zs=95,z=45,qs=33,js=60,$s=62,Ai=64,ei=91,ti=93,ri=61,ni=123,Oe=63,Bi=125,$r=124,si=126,ii=128,An=65533,Tt=42,xA=43,ai=44,oi=58,ci=59,he=46,gi=0,ui=8,Qi=11,li=14,wi=31,fi=127,sA=-1,Zn=48,zn=97,qn=101,Ci=102,Ui=117,Fi=122,jn=65,$n=69,AB=70,hi=85,di=90,k=function(e){return e>=Zn&&e<=57},Ei=function(e){return e>=55296&&e<=57343},VA=function(e){return k(e)||e>=jn&&e<=AB||e>=zn&&e<=Ci},Hi=function(e){return e>=zn&&e<=Fi},pi=function(e){return e>=jn&&e<=di},Ii=function(e){return Hi(e)||pi(e)},vi=function(e){return e>=ii},Re=function(e){return e===et||e===Js||e===ks},tt=function(e){return Ii(e)||vi(e)||e===zs},en=function(e){return tt(e)||k(e)||e===z},yi=function(e){return e>=gi&&e<=ui||e===Qi||e>=li&&e<=wi||e===fi},hA=function(e,A){return e!==Qe?!1:A!==et},Ge=function(e,A,r){return e===z?tt(A)||hA(A,r):tt(e)?!0:!!(e===Qe&&hA(e,A))},St=function(e,A,r){return e===xA||e===z?k(A)?!0:A===he&&k(r):k(e===he?A:e)},mi=function(e){var A=0,r=1;(e[A]===xA||e[A]===z)&&(e[A]===z&&(r=-1),A++);for(var t=[];k(e[A]);)t.push(e[A++]);var n=t.length?parseInt(M.apply(void 0,t),10):0;e[A]===he&&A++;for(var B=[];k(e[A]);)B.push(e[A++]);var s=B.length,a=s?parseInt(M.apply(void 0,B),10):0;(e[A]===$n||e[A]===qn)&&A++;var i=1;(e[A]===xA||e[A]===z)&&(e[A]===z&&(i=-1),A++);for(var o=[];k(e[A]);)o.push(e[A++]);var c=o.length?parseInt(M.apply(void 0,o),10):0;return r*(n+a*Math.pow(10,-s))*Math.pow(10,i*c)},Ki={type:2},Li={type:3},bi={type:4},Di={type:13},Ti={type:8},Si={type:21},xi={type:9},Mi={type:10},Oi={type:11},Ri={type:12},Gi={type:14},Ne={type:23},Ni={type:1},Vi={type:25},Pi={type:24},_i={type:26},Xi={type:27},Ji={type:28},ki={type:29},Yi={type:31},ur={type:32},eB=function(){function e(){this._value=[]}return e.prototype.write=function(A){this._value=this._value.concat(lt(A))},e.prototype.read=function(){for(var A=[],r=this.consumeToken();r!==ur;)A.push(r),r=this.consumeToken();return A},e.prototype.consumeToken=function(){var A=this.consumeCodePoint();switch(A){case Se:return this.consumeStringToken(Se);case Ys:var r=this.peekCodePoint(0),t=this.peekCodePoint(1),n=this.peekCodePoint(2);if(en(r)||hA(t,n)){var B=Ge(r,t,n)?Xs:_s,s=this.consumeName();return{type:5,value:s,flags:B}}break;case Ws:if(this.peekCodePoint(0)===ne)return this.consumeCodePoint(),Di;break;case xe:return this.consumeStringToken(xe);case Me:return Ki;case Be:return Li;case Tt:if(this.peekCodePoint(0)===ne)return this.consumeCodePoint(),Gi;break;case xA:if(St(A,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(A),this.consumeNumericToken();break;case ai:return bi;case z:var a=A,i=this.peekCodePoint(0),o=this.peekCodePoint(1);if(St(a,i,o))return this.reconsumeCodePoint(A),this.consumeNumericToken();if(Ge(a,i,o))return this.reconsumeCodePoint(A),this.consumeIdentLikeToken();if(i===z&&o===$s)return this.consumeCodePoint(),this.consumeCodePoint(),Pi;break;case he:if(St(A,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(A),this.consumeNumericToken();break;case jr:if(this.peekCodePoint(0)===Tt)for(this.consumeCodePoint();;){var c=this.consumeCodePoint();if(c===Tt&&(c=this.consumeCodePoint(),c===jr))return this.consumeToken();if(c===sA)return this.consumeToken()}break;case oi:return _i;case ci:return Xi;case js:if(this.peekCodePoint(0)===qs&&this.peekCodePoint(1)===z&&this.peekCodePoint(2)===z)return this.consumeCodePoint(),this.consumeCodePoint(),Vi;break;case Ai:var g=this.peekCodePoint(0),u=this.peekCodePoint(1),l=this.peekCodePoint(2);if(Ge(g,u,l)){var s=this.consumeName();return{type:7,value:s}}break;case ei:return Ji;case Qe:if(hA(A,this.peekCodePoint(0)))return this.reconsumeCodePoint(A),this.consumeIdentLikeToken();break;case ti:return ki;case ri:if(this.peekCodePoint(0)===ne)return this.consumeCodePoint(),Ti;break;case ni:return Oi;case Bi:return Ri;case Ui:case hi:var Q=this.peekCodePoint(0),w=this.peekCodePoint(1);return Q===xA&&(VA(w)||w===Oe)&&(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(A),this.consumeIdentLikeToken();case $r:if(this.peekCodePoint(0)===ne)return this.consumeCodePoint(),xi;if(this.peekCodePoint(0)===$r)return this.consumeCodePoint(),Si;break;case si:if(this.peekCodePoint(0)===ne)return this.consumeCodePoint(),Mi;break;case sA:return ur}return Re(A)?(this.consumeWhiteSpace(),Yi):k(A)?(this.reconsumeCodePoint(A),this.consumeNumericToken()):tt(A)?(this.reconsumeCodePoint(A),this.consumeIdentLikeToken()):{type:6,value:M(A)}},e.prototype.consumeCodePoint=function(){var A=this._value.shift();return typeof A=="undefined"?-1:A},e.prototype.reconsumeCodePoint=function(A){this._value.unshift(A)},e.prototype.peekCodePoint=function(A){return A>=this._value.length?-1:this._value[A]},e.prototype.consumeUnicodeRangeToken=function(){for(var A=[],r=this.consumeCodePoint();VA(r)&&A.length<6;)A.push(r),r=this.consumeCodePoint();for(var t=!1;r===Oe&&A.length<6;)A.push(r),r=this.consumeCodePoint(),t=!0;if(t){var n=parseInt(M.apply(void 0,A.map(function(i){return i===Oe?Zn:i})),16),B=parseInt(M.apply(void 0,A.map(function(i){return i===Oe?AB:i})),16);return{type:30,start:n,end:B}}var s=parseInt(M.apply(void 0,A),16);if(this.peekCodePoint(0)===z&&VA(this.peekCodePoint(1))){this.consumeCodePoint(),r=this.consumeCodePoint();for(var a=[];VA(r)&&a.length<6;)a.push(r),r=this.consumeCodePoint();var B=parseInt(M.apply(void 0,a),16);return{type:30,start:s,end:B}}else return{type:30,start:s,end:s}},e.prototype.consumeIdentLikeToken=function(){var A=this.consumeName();return A.toLowerCase()==="url"&&this.peekCodePoint(0)===Me?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===Me?(this.consumeCodePoint(),{type:19,value:A}):{type:20,value:A}},e.prototype.consumeUrlToken=function(){var A=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===sA)return{type:22,value:""};var r=this.peekCodePoint(0);if(r===xe||r===Se){var t=this.consumeStringToken(this.consumeCodePoint());return t.type===0&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===sA||this.peekCodePoint(0)===Be)?(this.consumeCodePoint(),{type:22,value:t.value}):(this.consumeBadUrlRemnants(),Ne)}for(;;){var n=this.consumeCodePoint();if(n===sA||n===Be)return{type:22,value:M.apply(void 0,A)};if(Re(n))return this.consumeWhiteSpace(),this.peekCodePoint(0)===sA||this.peekCodePoint(0)===Be?(this.consumeCodePoint(),{type:22,value:M.apply(void 0,A)}):(this.consumeBadUrlRemnants(),Ne);if(n===Se||n===xe||n===Me||yi(n))return this.consumeBadUrlRemnants(),Ne;if(n===Qe)if(hA(n,this.peekCodePoint(0)))A.push(this.consumeEscapedCodePoint());else return this.consumeBadUrlRemnants(),Ne;else A.push(n)}},e.prototype.consumeWhiteSpace=function(){for(;Re(this.peekCodePoint(0));)this.consumeCodePoint()},e.prototype.consumeBadUrlRemnants=function(){for(;;){var A=this.consumeCodePoint();if(A===Be||A===sA)return;hA(A,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},e.prototype.consumeStringSlice=function(A){for(var r=5e4,t="";A>0;){var n=Math.min(r,A);t+=M.apply(void 0,this._value.splice(0,n)),A-=n}return this._value.shift(),t},e.prototype.consumeStringToken=function(A){var r="",t=0;do{var n=this._value[t];if(n===sA||n===void 0||n===A)return r+=this.consumeStringSlice(t),{type:0,value:r};if(n===et)return this._value.splice(0,t),Ni;if(n===Qe){var B=this._value[t+1];B!==sA&&B!==void 0&&(B===et?(r+=this.consumeStringSlice(t),t=-1,this._value.shift()):hA(n,B)&&(r+=this.consumeStringSlice(t),r+=M(this.consumeEscapedCodePoint()),t=-1))}t++}while(!0)},e.prototype.consumeNumber=function(){var A=[],r=He,t=this.peekCodePoint(0);for((t===xA||t===z)&&A.push(this.consumeCodePoint());k(this.peekCodePoint(0));)A.push(this.consumeCodePoint());t=this.peekCodePoint(0);var n=this.peekCodePoint(1);if(t===he&&k(n))for(A.push(this.consumeCodePoint(),this.consumeCodePoint()),r=qr;k(this.peekCodePoint(0));)A.push(this.consumeCodePoint());t=this.peekCodePoint(0),n=this.peekCodePoint(1);var B=this.peekCodePoint(2);if((t===$n||t===qn)&&((n===xA||n===z)&&k(B)||k(n)))for(A.push(this.consumeCodePoint(),this.consumeCodePoint()),r=qr;k(this.peekCodePoint(0));)A.push(this.consumeCodePoint());return[mi(A),r]},e.prototype.consumeNumericToken=function(){var A=this.consumeNumber(),r=A[0],t=A[1],n=this.peekCodePoint(0),B=this.peekCodePoint(1),s=this.peekCodePoint(2);if(Ge(n,B,s)){var a=this.consumeName();return{type:15,number:r,flags:t,unit:a}}return n===Zs?(this.consumeCodePoint(),{type:16,number:r,flags:t}):{type:17,number:r,flags:t}},e.prototype.consumeEscapedCodePoint=function(){var A=this.consumeCodePoint();if(VA(A)){for(var r=M(A);VA(this.peekCodePoint(0))&&r.length<6;)r+=M(this.consumeCodePoint());Re(this.peekCodePoint(0))&&this.consumeCodePoint();var t=parseInt(r,16);return t===0||Ei(t)||t>1114111?An:t}return A===sA?An:A},e.prototype.consumeName=function(){for(var A="";;){var r=this.consumeCodePoint();if(en(r))A+=M(r);else if(hA(r,this.peekCodePoint(0)))A+=M(this.consumeEscapedCodePoint());else return this.reconsumeCodePoint(r),A}},e}(),tB=function(){function e(A){this._tokens=A}return e.create=function(A){var r=new eB;return r.write(A),new e(r.read())},e.parseValue=function(A){return e.create(A).parseComponentValue()},e.parseValues=function(A){return e.create(A).parseComponentValues()},e.prototype.parseComponentValue=function(){for(var A=this.consumeToken();A.type===31;)A=this.consumeToken();if(A.type===32)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(A);var r=this.consumeComponentValue();do A=this.consumeToken();while(A.type===31);if(A.type===32)return r;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},e.prototype.parseComponentValues=function(){for(var A=[];;){var r=this.consumeComponentValue();if(r.type===32)return A;A.push(r),A.push()}},e.prototype.consumeComponentValue=function(){var A=this.consumeToken();switch(A.type){case 11:case 28:case 2:return this.consumeSimpleBlock(A.type);case 19:return this.consumeFunction(A)}return A},e.prototype.consumeSimpleBlock=function(A){for(var r={type:A,values:[]},t=this.consumeToken();;){if(t.type===32||Zi(t,A))return r;this.reconsumeToken(t),r.values.push(this.consumeComponentValue()),t=this.consumeToken()}},e.prototype.consumeFunction=function(A){for(var r={name:A.value,values:[],type:18};;){var t=this.consumeToken();if(t.type===32||t.type===3)return r;this.reconsumeToken(t),r.values.push(this.consumeComponentValue())}},e.prototype.consumeToken=function(){var A=this._tokens.shift();return typeof A=="undefined"?ur:A},e.prototype.reconsumeToken=function(A){this._tokens.unshift(A)},e}(),pe=function(e){return e.type===15},Ae=function(e){return e.type===17},D=function(e){return e.type===20},Wi=function(e){return e.type===0},Qr=function(e,A){return D(e)&&e.value===A},rB=function(e){return e.type!==31},ZA=function(e){return e.type!==31&&e.type!==4},iA=function(e){var A=[],r=[];return e.forEach(function(t){if(t.type===4){if(r.length===0)throw new Error("Error parsing function args, zero tokens for arg");A.push(r),r=[];return}t.type!==31&&r.push(t)}),r.length&&A.push(r),A},Zi=function(e,A){return A===11&&e.type===12||A===28&&e.type===29?!0:A===2&&e.type===3},yA=function(e){return e.type===17||e.type===15},R=function(e){return e.type===16||yA(e)},nB=function(e){return e.length>1?[e[0],e[1]]:[e[0]]},X={type:17,number:0,flags:He},mr={type:16,number:50,flags:He},EA={type:16,number:100,flags:He},ce=function(e,A,r){var t=e[0],n=e[1];return[T(t,A),T(typeof n!="undefined"?n:t,r)]},T=function(e,A){if(e.type===16)return e.number/100*A;if(pe(e))switch(e.unit){case"rem":case"em":return 16*e.number;case"px":default:return e.number}return e.number},BB="deg",sB="grad",iB="rad",aB="turn",wt={name:"angle",parse:function(e,A){if(A.type===15)switch(A.unit){case BB:return Math.PI*A.number/180;case sB:return Math.PI/200*A.number;case iB:return A.number;case aB:return Math.PI*2*A.number}throw new Error("Unsupported angle type")}},oB=function(e){return e.type===15&&(e.unit===BB||e.unit===sB||e.unit===iB||e.unit===aB)},cB=function(e){var A=e.filter(D).map(function(r){return r.value}).join(" ");switch(A){case"to bottom right":case"to right bottom":case"left top":case"top left":return[X,X];case"to top":case"bottom":return eA(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[X,EA];case"to right":case"left":return eA(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[EA,EA];case"to bottom":case"top":return eA(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[EA,X];case"to left":case"right":return eA(270)}return 0},eA=function(e){return Math.PI*e/180},IA={name:"color",parse:function(e,A){if(A.type===18){var r=zi[A.name];if(typeof r=="undefined")throw new Error('Attempting to parse an unsupported color function "'+A.name+'"');return r(e,A.values)}if(A.type===5){if(A.value.length===3){var t=A.value.substring(0,1),n=A.value.substring(1,2),B=A.value.substring(2,3);return HA(parseInt(t+t,16),parseInt(n+n,16),parseInt(B+B,16),1)}if(A.value.length===4){var t=A.value.substring(0,1),n=A.value.substring(1,2),B=A.value.substring(2,3),s=A.value.substring(3,4);return HA(parseInt(t+t,16),parseInt(n+n,16),parseInt(B+B,16),parseInt(s+s,16)/255)}if(A.value.length===6){var t=A.value.substring(0,2),n=A.value.substring(2,4),B=A.value.substring(4,6);return HA(parseInt(t,16),parseInt(n,16),parseInt(B,16),1)}if(A.value.length===8){var t=A.value.substring(0,2),n=A.value.substring(2,4),B=A.value.substring(4,6),s=A.value.substring(6,8);return HA(parseInt(t,16),parseInt(n,16),parseInt(B,16),parseInt(s,16)/255)}}if(A.type===20){var a=lA[A.value.toUpperCase()];if(typeof a!="undefined")return a}return lA.TRANSPARENT}},vA=function(e){return(255&e)===0},N=function(e){var A=255&e,r=255&e>>8,t=255&e>>16,n=255&e>>24;return A<255?"rgba("+n+","+t+","+r+","+A/255+")":"rgb("+n+","+t+","+r+")"},HA=function(e,A,r,t){return(e<<24|A<<16|r<<8|Math.round(t*255)<<0)>>>0},tn=function(e,A){if(e.type===17)return e.number;if(e.type===16){var r=A===3?1:255;return A===3?e.number/100*r:Math.round(e.number/100*r)}return 0},rn=function(e,A){var r=A.filter(ZA);if(r.length===3){var t=r.map(tn),n=t[0],B=t[1],s=t[2];return HA(n,B,s,1)}if(r.length===4){var a=r.map(tn),n=a[0],B=a[1],s=a[2],i=a[3];return HA(n,B,s,i)}return 0};function xt(e,A,r){return r<0&&(r+=1),r>=1&&(r-=1),r<1/6?(A-e)*r*6+e:r<1/2?A:r<2/3?(A-e)*6*(2/3-r)+e:e}var nn=function(e,A){var r=A.filter(ZA),t=r[0],n=r[1],B=r[2],s=r[3],a=(t.type===17?eA(t.number):wt.parse(e,t))/(Math.PI*2),i=R(n)?n.number/100:0,o=R(B)?B.number/100:0,c=typeof s!="undefined"&&R(s)?T(s,1):1;if(i===0)return HA(o*255,o*255,o*255,1);var g=o<=.5?o*(i+1):o+i-o*i,u=o*2-g,l=xt(u,g,a+1/3),Q=xt(u,g,a),w=xt(u,g,a-1/3);return HA(l*255,Q*255,w*255,c)},zi={hsl:nn,hsla:nn,rgb:rn,rgba:rn},le=function(e,A){return IA.parse(e,tB.create(A).parseComponentValue())},lA={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199},qi={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(e,A){return A.map(function(r){if(D(r))switch(r.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},ji={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},ft=function(e,A){var r=IA.parse(e,A[0]),t=A[1];return t&&R(t)?{color:r,stop:t}:{color:r,stop:null}},Bn=function(e,A){var r=e[0],t=e[e.length-1];r.stop===null&&(r.stop=X),t.stop===null&&(t.stop=EA);for(var n=[],B=0,s=0;s<e.length;s++){var a=e[s].stop;if(a!==null){var i=T(a,A);i>B?n.push(i):n.push(B),B=i}else n.push(null)}for(var o=null,s=0;s<n.length;s++){var c=n[s];if(c===null)o===null&&(o=s);else if(o!==null){for(var g=s-o,u=n[o-1],l=(c-u)/(g+1),Q=1;Q<=g;Q++)n[o+Q-1]=l*Q;o=null}}return e.map(function(w,p){var f=w.color;return{color:f,stop:Math.max(Math.min(1,n[p]/A),0)}})},$i=function(e,A,r){var t=A/2,n=r/2,B=T(e[0],A)-t,s=n-T(e[1],r);return(Math.atan2(s,B)+Math.PI*2)%(Math.PI*2)},Aa=function(e,A,r){var t=typeof e=="number"?e:$i(e,A,r),n=Math.abs(A*Math.sin(t))+Math.abs(r*Math.cos(t)),B=A/2,s=r/2,a=n/2,i=Math.sin(t-Math.PI/2)*a,o=Math.cos(t-Math.PI/2)*a;return[n,B-o,B+o,s-i,s+i]},rA=function(e,A){return Math.sqrt(e*e+A*A)},sn=function(e,A,r,t,n){var B=[[0,0],[0,A],[e,0],[e,A]];return B.reduce(function(s,a){var i=a[0],o=a[1],c=rA(r-i,t-o);return(n?c<s.optimumDistance:c>s.optimumDistance)?{optimumCorner:a,optimumDistance:c}:s},{optimumDistance:n?1/0:-1/0,optimumCorner:null}).optimumCorner},ea=function(e,A,r,t,n){var B=0,s=0;switch(e.size){case 0:e.shape===0?B=s=Math.min(Math.abs(A),Math.abs(A-t),Math.abs(r),Math.abs(r-n)):e.shape===1&&(B=Math.min(Math.abs(A),Math.abs(A-t)),s=Math.min(Math.abs(r),Math.abs(r-n)));break;case 2:if(e.shape===0)B=s=Math.min(rA(A,r),rA(A,r-n),rA(A-t,r),rA(A-t,r-n));else if(e.shape===1){var a=Math.min(Math.abs(r),Math.abs(r-n))/Math.min(Math.abs(A),Math.abs(A-t)),i=sn(t,n,A,r,!0),o=i[0],c=i[1];B=rA(o-A,(c-r)/a),s=a*B}break;case 1:e.shape===0?B=s=Math.max(Math.abs(A),Math.abs(A-t),Math.abs(r),Math.abs(r-n)):e.shape===1&&(B=Math.max(Math.abs(A),Math.abs(A-t)),s=Math.max(Math.abs(r),Math.abs(r-n)));break;case 3:if(e.shape===0)B=s=Math.max(rA(A,r),rA(A,r-n),rA(A-t,r),rA(A-t,r-n));else if(e.shape===1){var a=Math.max(Math.abs(r),Math.abs(r-n))/Math.max(Math.abs(A),Math.abs(A-t)),g=sn(t,n,A,r,!1),o=g[0],c=g[1];B=rA(o-A,(c-r)/a),s=a*B}break}return Array.isArray(e.size)&&(B=T(e.size[0],t),s=e.size.length===2?T(e.size[1],n):B),[B,s]},ta=function(e,A){var r=eA(180),t=[];return iA(A).forEach(function(n,B){if(B===0){var s=n[0];if(s.type===20&&s.value==="to"){r=cB(n);return}else if(oB(s)){r=wt.parse(e,s);return}}var a=ft(e,n);t.push(a)}),{angle:r,stops:t,type:1}},Ve=function(e,A){var r=eA(180),t=[];return iA(A).forEach(function(n,B){if(B===0){var s=n[0];if(s.type===20&&["top","left","right","bottom"].indexOf(s.value)!==-1){r=cB(n);return}else if(oB(s)){r=(wt.parse(e,s)+eA(270))%eA(360);return}}var a=ft(e,n);t.push(a)}),{angle:r,stops:t,type:1}},ra=function(e,A){var r=eA(180),t=[],n=1,B=0,s=3,a=[];return iA(A).forEach(function(i,o){var c=i[0];if(o===0){if(D(c)&&c.value==="linear"){n=1;return}else if(D(c)&&c.value==="radial"){n=2;return}}if(c.type===18){if(c.name==="from"){var g=IA.parse(e,c.values[0]);t.push({stop:X,color:g})}else if(c.name==="to"){var g=IA.parse(e,c.values[0]);t.push({stop:EA,color:g})}else if(c.name==="color-stop"){var u=c.values.filter(ZA);if(u.length===2){var g=IA.parse(e,u[1]),l=u[0];Ae(l)&&t.push({stop:{type:16,number:l.number*100,flags:l.flags},color:g})}}}}),n===1?{angle:(r+eA(180))%eA(360),stops:t,type:n}:{size:s,shape:B,stops:t,position:a,type:n}},gB="closest-side",uB="farthest-side",QB="closest-corner",lB="farthest-corner",wB="circle",fB="ellipse",CB="cover",UB="contain",na=function(e,A){var r=0,t=3,n=[],B=[];return iA(A).forEach(function(s,a){var i=!0;if(a===0){var o=!1;i=s.reduce(function(g,u){if(o)if(D(u))switch(u.value){case"center":return B.push(mr),g;case"top":case"left":return B.push(X),g;case"right":case"bottom":return B.push(EA),g}else(R(u)||yA(u))&&B.push(u);else if(D(u))switch(u.value){case wB:return r=0,!1;case fB:return r=1,!1;case"at":return o=!0,!1;case gB:return t=0,!1;case CB:case uB:return t=1,!1;case UB:case QB:return t=2,!1;case lB:return t=3,!1}else if(yA(u)||R(u))return Array.isArray(t)||(t=[]),t.push(u),!1;return g},i)}if(i){var c=ft(e,s);n.push(c)}}),{size:t,shape:r,stops:n,position:B,type:2}},Pe=function(e,A){var r=0,t=3,n=[],B=[];return iA(A).forEach(function(s,a){var i=!0;if(a===0?i=s.reduce(function(c,g){if(D(g))switch(g.value){case"center":return B.push(mr),!1;case"top":case"left":return B.push(X),!1;case"right":case"bottom":return B.push(EA),!1}else if(R(g)||yA(g))return B.push(g),!1;return c},i):a===1&&(i=s.reduce(function(c,g){if(D(g))switch(g.value){case wB:return r=0,!1;case fB:return r=1,!1;case UB:case gB:return t=0,!1;case uB:return t=1,!1;case QB:return t=2,!1;case CB:case lB:return t=3,!1}else if(yA(g)||R(g))return Array.isArray(t)||(t=[]),t.push(g),!1;return c},i)),i){var o=ft(e,s);n.push(o)}}),{size:t,shape:r,stops:n,position:B,type:2}},Ba=function(e){return e.type===1},sa=function(e){return e.type===2},Kr={name:"image",parse:function(e,A){if(A.type===22){var r={url:A.value,type:0};return e.cache.addImage(A.value),r}if(A.type===18){var t=FB[A.name];if(typeof t=="undefined")throw new Error('Attempting to parse an unsupported image function "'+A.name+'"');return t(e,A.values)}throw new Error("Unsupported image type "+A.type)}};function ia(e){return!(e.type===20&&e.value==="none")&&(e.type!==18||!!FB[e.name])}var FB={"linear-gradient":ta,"-moz-linear-gradient":Ve,"-ms-linear-gradient":Ve,"-o-linear-gradient":Ve,"-webkit-linear-gradient":Ve,"radial-gradient":na,"-moz-radial-gradient":Pe,"-ms-radial-gradient":Pe,"-o-radial-gradient":Pe,"-webkit-radial-gradient":Pe,"-webkit-gradient":ra},aa={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(e,A){if(A.length===0)return[];var r=A[0];return r.type===20&&r.value==="none"?[]:A.filter(function(t){return ZA(t)&&ia(t)}).map(function(t){return Kr.parse(e,t)})}},oa={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(e,A){return A.map(function(r){if(D(r))switch(r.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},ca={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(e,A){return iA(A).map(function(r){return r.filter(R)}).map(nB)}},ga={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(e,A){return iA(A).map(function(r){return r.filter(D).map(function(t){return t.value}).join(" ")}).map(ua)}},ua=function(e){switch(e){case"no-repeat":return 1;case"repeat-x":case"repeat no-repeat":return 2;case"repeat-y":case"no-repeat repeat":return 3;case"repeat":default:return 0}},WA;(function(e){e.AUTO="auto",e.CONTAIN="contain",e.COVER="cover"})(WA||(WA={}));var Qa={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(e,A){return iA(A).map(function(r){return r.filter(la)})}},la=function(e){return D(e)||R(e)},Ct=function(e){return{name:"border-"+e+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},wa=Ct("top"),fa=Ct("right"),Ca=Ct("bottom"),Ua=Ct("left"),Ut=function(e){return{name:"border-radius-"+e,initialValue:"0 0",prefix:!1,type:1,parse:function(A,r){return nB(r.filter(R))}}},Fa=Ut("top-left"),ha=Ut("top-right"),da=Ut("bottom-right"),Ea=Ut("bottom-left"),Ft=function(e){return{name:"border-"+e+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(A,r){switch(r){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}},Ha=Ft("top"),pa=Ft("right"),Ia=Ft("bottom"),va=Ft("left"),ht=function(e){return{name:"border-"+e+"-width",initialValue:"0",type:0,prefix:!1,parse:function(A,r){return pe(r)?r.number:0}}},ya=ht("top"),ma=ht("right"),Ka=ht("bottom"),La=ht("left"),ba={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Da={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(e,A){switch(A){case"rtl":return 1;case"ltr":default:return 0}}},Ta={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(e,A){return A.filter(D).reduce(function(r,t){return r|Sa(t.value)},0)}},Sa=function(e){switch(e){case"block":case"-webkit-box":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0},xa={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(e,A){switch(A){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},Ma={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(e,A){return A.type===20&&A.value==="normal"?0:A.type===17||A.type===15?A.number:0}},rt;(function(e){e.NORMAL="normal",e.STRICT="strict"})(rt||(rt={}));var Oa={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(e,A){switch(A){case"strict":return rt.STRICT;case"normal":default:return rt.NORMAL}}},Ra={name:"line-height",initialValue:"normal",prefix:!1,type:4},an=function(e,A){return D(e)&&e.value==="normal"?1.2*A:e.type===17?A*e.number:R(e)?T(e,A):A},Ga={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(e,A){return A.type===20&&A.value==="none"?null:Kr.parse(e,A)}},Na={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(e,A){switch(A){case"inside":return 0;case"outside":default:return 1}}},lr={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(e,A){switch(A){case"disc":return 0;case"circle":return 1;case"square":return 2;case"decimal":return 3;case"cjk-decimal":return 4;case"decimal-leading-zero":return 5;case"lower-roman":return 6;case"upper-roman":return 7;case"lower-greek":return 8;case"lower-alpha":return 9;case"upper-alpha":return 10;case"arabic-indic":return 11;case"armenian":return 12;case"bengali":return 13;case"cambodian":return 14;case"cjk-earthly-branch":return 15;case"cjk-heavenly-stem":return 16;case"cjk-ideographic":return 17;case"devanagari":return 18;case"ethiopic-numeric":return 19;case"georgian":return 20;case"gujarati":return 21;case"gurmukhi":return 22;case"hebrew":return 22;case"hiragana":return 23;case"hiragana-iroha":return 24;case"japanese-formal":return 25;case"japanese-informal":return 26;case"kannada":return 27;case"katakana":return 28;case"katakana-iroha":return 29;case"khmer":return 30;case"korean-hangul-formal":return 31;case"korean-hanja-formal":return 32;case"korean-hanja-informal":return 33;case"lao":return 34;case"lower-armenian":return 35;case"malayalam":return 36;case"mongolian":return 37;case"myanmar":return 38;case"oriya":return 39;case"persian":return 40;case"simp-chinese-formal":return 41;case"simp-chinese-informal":return 42;case"tamil":return 43;case"telugu":return 44;case"thai":return 45;case"tibetan":return 46;case"trad-chinese-formal":return 47;case"trad-chinese-informal":return 48;case"upper-armenian":return 49;case"disclosure-open":return 50;case"disclosure-closed":return 51;case"none":default:return-1}}},dt=function(e){return{name:"margin-"+e,initialValue:"0",prefix:!1,type:4}},Va=dt("top"),Pa=dt("right"),_a=dt("bottom"),Xa=dt("left"),Ja={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(e,A){return A.filter(D).map(function(r){switch(r.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;case"visible":default:return 0}})}},ka={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(e,A){switch(A){case"break-word":return"break-word";case"normal":default:return"normal"}}},Et=function(e){return{name:"padding-"+e,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},Ya=Et("top"),Wa=Et("right"),Za=Et("bottom"),za=Et("left"),qa={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(e,A){switch(A){case"right":return 2;case"center":case"justify":return 1;case"left":default:return 0}}},ja={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(e,A){switch(A){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},$a={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(e,A){return A.length===1&&Qr(A[0],"none")?[]:iA(A).map(function(r){for(var t={color:lA.TRANSPARENT,offsetX:X,offsetY:X,blur:X},n=0,B=0;B<r.length;B++){var s=r[B];yA(s)?(n===0?t.offsetX=s:n===1?t.offsetY=s:t.blur=s,n++):t.color=IA.parse(e,s)}return t})}},Ao={name:"text-transform",initialValue:"none",prefix:!1,type:2,parse:function(e,A){switch(A){case"uppercase":return 2;case"lowercase":return 1;case"capitalize":return 3}return 0}},eo={name:"transform",initialValue:"none",prefix:!0,type:0,parse:function(e,A){if(A.type===20&&A.value==="none")return null;if(A.type===18){var r=no[A.name];if(typeof r=="undefined")throw new Error('Attempting to parse an unsupported transform function "'+A.name+'"');return r(A.values)}return null}},to=function(e){var A=e.filter(function(r){return r.type===17}).map(function(r){return r.number});return A.length===6?A:null},ro=function(e){var A=e.filter(function(i){return i.type===17}).map(function(i){return i.number}),r=A[0],t=A[1];A[2],A[3];var n=A[4],B=A[5];A[6],A[7],A[8],A[9],A[10],A[11];var s=A[12],a=A[13];return A[14],A[15],A.length===16?[r,t,n,B,s,a]:null},no={matrix:to,matrix3d:ro},on={type:16,number:50,flags:He},Bo=[on,on],so={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(e,A){var r=A.filter(R);return r.length!==2?Bo:[r[0],r[1]]}},io={name:"visible",initialValue:"none",prefix:!1,type:2,parse:function(e,A){switch(A){case"hidden":return 1;case"collapse":return 2;case"visible":default:return 0}}},we;(function(e){e.NORMAL="normal",e.BREAK_ALL="break-all",e.KEEP_ALL="keep-all"})(we||(we={}));var ao={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(e,A){switch(A){case"break-all":return we.BREAK_ALL;case"keep-all":return we.KEEP_ALL;case"normal":default:return we.NORMAL}}},oo={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(e,A){if(A.type===20)return{auto:!0,order:0};if(Ae(A))return{auto:!1,order:A.number};throw new Error("Invalid z-index number parsed")}},hB={name:"time",parse:function(e,A){if(A.type===15)switch(A.unit.toLowerCase()){case"s":return 1e3*A.number;case"ms":return A.number}throw new Error("Unsupported time type")}},co={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(e,A){return Ae(A)?A.number:1}},go={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},uo={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(e,A){return A.filter(D).map(function(r){switch(r.value){case"underline":return 1;case"overline":return 2;case"line-through":return 3;case"none":return 4}return 0}).filter(function(r){return r!==0})}},Qo={name:"font-family",initialValue:"",prefix:!1,type:1,parse:function(e,A){var r=[],t=[];return A.forEach(function(n){switch(n.type){case 20:case 0:r.push(n.value);break;case 17:r.push(n.number.toString());break;case 4:t.push(r.join(" ")),r.length=0;break}}),r.length&&t.push(r.join(" ")),t.map(function(n){return n.indexOf(" ")===-1?n:"'"+n+"'"})}},lo={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},wo={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(e,A){if(Ae(A))return A.number;if(D(A))switch(A.value){case"bold":return 700;case"normal":default:return 400}return 400}},fo={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(e,A){return A.filter(D).map(function(r){return r.value})}},Co={name:"font-style",initialValue:"normal",prefix:!1,type:2,parse:function(e,A){switch(A){case"oblique":return"oblique";case"italic":return"italic";case"normal":default:return"normal"}}},G=function(e,A){return(e&A)!==0},Uo={name:"content",initialValue:"none",type:1,prefix:!1,parse:function(e,A){if(A.length===0)return[];var r=A[0];return r.type===20&&r.value==="none"?[]:A}},Fo={name:"counter-increment",initialValue:"none",prefix:!0,type:1,parse:function(e,A){if(A.length===0)return null;var r=A[0];if(r.type===20&&r.value==="none")return null;for(var t=[],n=A.filter(rB),B=0;B<n.length;B++){var s=n[B],a=n[B+1];if(s.type===20){var i=a&&Ae(a)?a.number:1;t.push({counter:s.value,increment:i})}}return t}},ho={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:function(e,A){if(A.length===0)return[];for(var r=[],t=A.filter(rB),n=0;n<t.length;n++){var B=t[n],s=t[n+1];if(D(B)&&B.value!=="none"){var a=s&&Ae(s)?s.number:0;r.push({counter:B.value,reset:a})}}return r}},Eo={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:function(e,A){return A.filter(pe).map(function(r){return hB.parse(e,r)})}},Ho={name:"quotes",initialValue:"none",prefix:!0,type:1,parse:function(e,A){if(A.length===0)return null;var r=A[0];if(r.type===20&&r.value==="none")return null;var t=[],n=A.filter(Wi);if(n.length%2!==0)return null;for(var B=0;B<n.length;B+=2){var s=n[B].value,a=n[B+1].value;t.push({open:s,close:a})}return t}},cn=function(e,A,r){if(!e)return"";var t=e[Math.min(A,e.length-1)];return t?r?t.open:t.close:""},po={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:function(e,A){return A.length===1&&Qr(A[0],"none")?[]:iA(A).map(function(r){for(var t={color:255,offsetX:X,offsetY:X,blur:X,spread:X,inset:!1},n=0,B=0;B<r.length;B++){var s=r[B];Qr(s,"inset")?t.inset=!0:yA(s)?(n===0?t.offsetX=s:n===1?t.offsetY=s:n===2?t.blur=s:t.spread=s,n++):t.color=IA.parse(e,s)}return t})}},Io={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:function(e,A){var r=[0,1,2],t=[];return A.filter(D).forEach(function(n){switch(n.value){case"stroke":t.push(1);break;case"fill":t.push(0);break;case"markers":t.push(2);break}}),r.forEach(function(n){t.indexOf(n)===-1&&t.push(n)}),t}},vo={name:"-webkit-text-stroke-color",initialValue:"currentcolor",prefix:!1,type:3,format:"color"},yo={name:"-webkit-text-stroke-width",initialValue:"0",type:0,prefix:!1,parse:function(e,A){return pe(A)?A.number:0}},mo=function(){function e(A,r){var t,n;this.animationDuration=H(A,Eo,r.animationDuration),this.backgroundClip=H(A,qi,r.backgroundClip),this.backgroundColor=H(A,ji,r.backgroundColor),this.backgroundImage=H(A,aa,r.backgroundImage),this.backgroundOrigin=H(A,oa,r.backgroundOrigin),this.backgroundPosition=H(A,ca,r.backgroundPosition),this.backgroundRepeat=H(A,ga,r.backgroundRepeat),this.backgroundSize=H(A,Qa,r.backgroundSize),this.borderTopColor=H(A,wa,r.borderTopColor),this.borderRightColor=H(A,fa,r.borderRightColor),this.borderBottomColor=H(A,Ca,r.borderBottomColor),this.borderLeftColor=H(A,Ua,r.borderLeftColor),this.borderTopLeftRadius=H(A,Fa,r.borderTopLeftRadius),this.borderTopRightRadius=H(A,ha,r.borderTopRightRadius),this.borderBottomRightRadius=H(A,da,r.borderBottomRightRadius),this.borderBottomLeftRadius=H(A,Ea,r.borderBottomLeftRadius),this.borderTopStyle=H(A,Ha,r.borderTopStyle),this.borderRightStyle=H(A,pa,r.borderRightStyle),this.borderBottomStyle=H(A,Ia,r.borderBottomStyle),this.borderLeftStyle=H(A,va,r.borderLeftStyle),this.borderTopWidth=H(A,ya,r.borderTopWidth),this.borderRightWidth=H(A,ma,r.borderRightWidth),this.borderBottomWidth=H(A,Ka,r.borderBottomWidth),this.borderLeftWidth=H(A,La,r.borderLeftWidth),this.boxShadow=H(A,po,r.boxShadow),this.color=H(A,ba,r.color),this.direction=H(A,Da,r.direction),this.display=H(A,Ta,r.display),this.float=H(A,xa,r.cssFloat),this.fontFamily=H(A,Qo,r.fontFamily),this.fontSize=H(A,lo,r.fontSize),this.fontStyle=H(A,Co,r.fontStyle),this.fontVariant=H(A,fo,r.fontVariant),this.fontWeight=H(A,wo,r.fontWeight),this.letterSpacing=H(A,Ma,r.letterSpacing),this.lineBreak=H(A,Oa,r.lineBreak),this.lineHeight=H(A,Ra,r.lineHeight),this.listStyleImage=H(A,Ga,r.listStyleImage),this.listStylePosition=H(A,Na,r.listStylePosition),this.listStyleType=H(A,lr,r.listStyleType),this.marginTop=H(A,Va,r.marginTop),this.marginRight=H(A,Pa,r.marginRight),this.marginBottom=H(A,_a,r.marginBottom),this.marginLeft=H(A,Xa,r.marginLeft),this.opacity=H(A,co,r.opacity);var B=H(A,Ja,r.overflow);this.overflowX=B[0],this.overflowY=B[B.length>1?1:0],this.overflowWrap=H(A,ka,r.overflowWrap),this.paddingTop=H(A,Ya,r.paddingTop),this.paddingRight=H(A,Wa,r.paddingRight),this.paddingBottom=H(A,Za,r.paddingBottom),this.paddingLeft=H(A,za,r.paddingLeft),this.paintOrder=H(A,Io,r.paintOrder),this.position=H(A,ja,r.position),this.textAlign=H(A,qa,r.textAlign),this.textDecorationColor=H(A,go,(t=r.textDecorationColor)!==null&&t!==void 0?t:r.color),this.textDecorationLine=H(A,uo,(n=r.textDecorationLine)!==null&&n!==void 0?n:r.textDecoration),this.textShadow=H(A,$a,r.textShadow),this.textTransform=H(A,Ao,r.textTransform),this.transform=H(A,eo,r.transform),this.transformOrigin=H(A,so,r.transformOrigin),this.visibility=H(A,io,r.visibility),this.webkitTextStrokeColor=H(A,vo,r.webkitTextStrokeColor),this.webkitTextStrokeWidth=H(A,yo,r.webkitTextStrokeWidth),this.wordBreak=H(A,ao,r.wordBreak),this.zIndex=H(A,oo,r.zIndex)}return e.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===0},e.prototype.isTransparent=function(){return vA(this.backgroundColor)},e.prototype.isTransformed=function(){return this.transform!==null},e.prototype.isPositioned=function(){return this.position!==0},e.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},e.prototype.isFloating=function(){return this.float!==0},e.prototype.isInlineLevel=function(){return G(this.display,4)||G(this.display,33554432)||G(this.display,268435456)||G(this.display,536870912)||G(this.display,67108864)||G(this.display,134217728)},e}(),Ko=function(){function e(A,r){this.content=H(A,Uo,r.content),this.quotes=H(A,Ho,r.quotes)}return e}(),gn=function(){function e(A,r){this.counterIncrement=H(A,Fo,r.counterIncrement),this.counterReset=H(A,ho,r.counterReset)}return e}(),H=function(e,A,r){var t=new eB,n=r!==null&&typeof r!="undefined"?r.toString():A.initialValue;t.write(n);var B=new tB(t.read());switch(A.type){case 2:var s=B.parseComponentValue();return A.parse(e,D(s)?s.value:A.initialValue);case 0:return A.parse(e,B.parseComponentValue());case 1:return A.parse(e,B.parseComponentValues());case 4:return B.parseComponentValue();case 3:switch(A.format){case"angle":return wt.parse(e,B.parseComponentValue());case"color":return IA.parse(e,B.parseComponentValue());case"image":return Kr.parse(e,B.parseComponentValue());case"length":var a=B.parseComponentValue();return yA(a)?a:X;case"length-percentage":var i=B.parseComponentValue();return R(i)?i:X;case"time":return hB.parse(e,B.parseComponentValue())}break}},Lo="data-html2canvas-debug",bo=function(e){var A=e.getAttribute(Lo);switch(A){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}},wr=function(e,A){var r=bo(e);return r===1||A===r},aA=function(){function e(A,r){if(this.context=A,this.textNodes=[],this.elements=[],this.flags=0,wr(r,3))debugger;this.styles=new mo(A,window.getComputedStyle(r,null)),Ur(r)&&(this.styles.animationDuration.some(function(t){return t>0})&&(r.style.animationDuration="0s"),this.styles.transform!==null&&(r.style.transform="none")),this.bounds=Qt(this.context,r),wr(r,4)&&(this.flags|=16)}return e}(),Do="[encoded data, 26156 characters]",un="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ge=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(var _e=0;_e<un.length;_e++)ge[un.charCodeAt(_e)]=_e;var To=function(e){var A=e.length*.75,r=e.length,t,n=0,B,s,a,i;e[e.length-1]==="="&&(A--,e[e.length-2]==="="&&A--);var o=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined"&&typeof Uint8Array.prototype.slice!="undefined"?new ArrayBuffer(A):new Array(A),c=Array.isArray(o)?o:new Uint8Array(o);for(t=0;t<r;t+=4)B=ge[e.charCodeAt(t)],s=ge[e.charCodeAt(t+1)],a=ge[e.charCodeAt(t+2)],i=ge[e.charCodeAt(t+3)],c[n++]=B<<2|s>>4,c[n++]=(s&15)<<4|a>>2,c[n++]=(a&3)<<6|i&63;return o},So=function(e){for(var A=e.length,r=[],t=0;t<A;t+=2)r.push(e[t+1]<<8|e[t]);return r},xo=function(e){for(var A=e.length,r=[],t=0;t<A;t+=4)r.push(e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t]);return r},OA=5,Lr=6+5,Mt=2,Mo=Lr-OA,dB=65536>>OA,Oo=1<<OA,Ot=Oo-1,Ro=1024>>OA,Go=dB+Ro,No=Go,Vo=32,Po=No+Vo,_o=65536>>Lr,Xo=1<<Mo,Jo=Xo-1,Qn=function(e,A,r){return e.slice?e.slice(A,r):new Uint16Array(Array.prototype.slice.call(e,A,r))},ko=function(e,A,r){return e.slice?e.slice(A,r):new Uint32Array(Array.prototype.slice.call(e,A,r))},Yo=function(e,A){var r=To(e),t=Array.isArray(r)?xo(r):new Uint32Array(r),n=Array.isArray(r)?So(r):new Uint16Array(r),B=24,s=Qn(n,B/2,t[4]/2),a=t[5]===2?Qn(n,(B+t[4])/2):ko(t,Math.ceil((B+t[4])/4));return new Wo(t[0],t[1],t[2],t[3],s,a)},Wo=function(){function e(A,r,t,n,B,s){this.initialValue=A,this.errorValue=r,this.highStart=t,this.highValueIndex=n,this.index=B,this.data=s}return e.prototype.get=function(A){var r;if(A>=0){if(A<55296||A>56319&&A<=65535)return r=this.index[A>>OA],r=(r<<Mt)+(A&Ot),this.data[r];if(A<=65535)return r=this.index[dB+(A-55296>>OA)],r=(r<<Mt)+(A&Ot),this.data[r];if(A<this.highStart)return r=Po-_o+(A>>Lr),r=this.index[r],r+=A>>OA&Jo,r=this.index[r],r=(r<<Mt)+(A&Ot),this.data[r];if(A<=1114111)return this.data[this.highValueIndex]}return this.errorValue},e}(),ln="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Zo=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(var Xe=0;Xe<ln.length;Xe++)Zo[ln.charCodeAt(Xe)]=Xe;var zo=1,Rt=2,Gt=3,wn=4,fn=5,qo=7,Cn=8,Nt=9,Vt=10,Un=11,Fn=12,hn=13,dn=14,Pt=15,jo=function(e){for(var A=[],r=0,t=e.length;r<t;){var n=e.charCodeAt(r++);if(n>=55296&&n<=56319&&r<t){var B=e.charCodeAt(r++);(B&64512)===56320?A.push(((n&1023)<<10)+(B&1023)+65536):(A.push(n),r--)}else A.push(n)}return A},$o=function(){for(var e=[],A=0;A<arguments.length;A++)e[A]=arguments[A];if(String.fromCodePoint)return String.fromCodePoint.apply(String,e);var r=e.length;if(!r)return"";for(var t=[],n=-1,B="";++n<r;){var s=e[n];s<=65535?t.push(s):(s-=65536,t.push((s>>10)+55296,s%1024+56320)),(n+1===r||t.length>16384)&&(B+=String.fromCharCode.apply(String,t),t.length=0)}return B},Ac=Yo(Do),$="\xD7",_t="\xF7",ec=function(e){return Ac.get(e)},tc=function(e,A,r){var t=r-2,n=A[t],B=A[r-1],s=A[r];if(B===Rt&&s===Gt)return $;if(B===Rt||B===Gt||B===wn||s===Rt||s===Gt||s===wn)return _t;if(B===Cn&&[Cn,Nt,Un,Fn].indexOf(s)!==-1||(B===Un||B===Nt)&&(s===Nt||s===Vt)||(B===Fn||B===Vt)&&s===Vt||s===hn||s===fn||s===qo||B===zo)return $;if(B===hn&&s===dn){for(;n===fn;)n=A[--t];if(n===dn)return $}if(B===Pt&&s===Pt){for(var a=0;n===Pt;)a++,n=A[--t];if(a%2===0)return $}return _t},rc=function(e){var A=jo(e),r=A.length,t=0,n=0,B=A.map(ec);return{next:function(){if(t>=r)return{done:!0,value:null};for(var s=$;t<r&&(s=tc(A,B,++t))===$;);if(s!==$||t===r){var a=$o.apply(null,A.slice(n,t));return n=t,{value:a,done:!1}}return{done:!0,value:null}}}},nc=function(e){for(var A=rc(e),r=[],t;!(t=A.next()).done;)t.value&&r.push(t.value.slice());return r},Bc=function(e){var A=123;if(e.createRange){var r=e.createRange();if(r.getBoundingClientRect){var t=e.createElement("boundtest");t.style.height=A+"px",t.style.display="block",e.body.appendChild(t),r.selectNode(t);var n=r.getBoundingClientRect(),B=Math.round(n.height);if(e.body.removeChild(t),B===A)return!0}}return!1},sc=function(e){var A=e.createElement("boundtest");A.style.width="50px",A.style.display="block",A.style.fontSize="12px",A.style.letterSpacing="0px",A.style.wordSpacing="0px",e.body.appendChild(A);var r=e.createRange();A.innerHTML=typeof"".repeat=="function"?"&#128104;".repeat(10):"";var t=A.firstChild,n=lt(t.data).map(function(i){return M(i)}),B=0,s={},a=n.every(function(i,o){r.setStart(t,B),r.setEnd(t,B+i.length);var c=r.getBoundingClientRect();B+=i.length;var g=c.x>s.x||c.y>s.y;return s=c,o===0?!0:g});return e.body.removeChild(A),a},ic=function(){return typeof new Image().crossOrigin!="undefined"},ac=function(){return typeof new XMLHttpRequest().responseType=="string"},oc=function(e){var A=new Image,r=e.createElement("canvas"),t=r.getContext("2d");if(!t)return!1;A.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{t.drawImage(A,0,0),r.toDataURL()}catch{return!1}return!0},En=function(e){return e[0]===0&&e[1]===255&&e[2]===0&&e[3]===255},cc=function(e){var A=e.createElement("canvas"),r=100;A.width=r,A.height=r;var t=A.getContext("2d");if(!t)return Promise.reject(!1);t.fillStyle="rgb(0, 255, 0)",t.fillRect(0,0,r,r);var n=new Image,B=A.toDataURL();n.src=B;var s=fr(r,r,0,0,n);return t.fillStyle="red",t.fillRect(0,0,r,r),Hn(s).then(function(a){t.drawImage(a,0,0);var i=t.getImageData(0,0,r,r).data;t.fillStyle="red",t.fillRect(0,0,r,r);var o=e.createElement("div");return o.style.backgroundImage="url("+B+")",o.style.height=r+"px",En(i)?Hn(fr(r,r,0,0,o)):Promise.reject(!1)}).then(function(a){return t.drawImage(a,0,0),En(t.getImageData(0,0,r,r).data)}).catch(function(){return!1})},fr=function(e,A,r,t,n){var B="http://www.w3.org/2000/svg",s=document.createElementNS(B,"svg"),a=document.createElementNS(B,"foreignObject");return s.setAttributeNS(null,"width",e.toString()),s.setAttributeNS(null,"height",A.toString()),a.setAttributeNS(null,"width","100%"),a.setAttributeNS(null,"height","100%"),a.setAttributeNS(null,"x",r.toString()),a.setAttributeNS(null,"y",t.toString()),a.setAttributeNS(null,"externalResourcesRequired","true"),s.appendChild(a),a.appendChild(n),s},Hn=function(e){return new Promise(function(A,r){var t=new Image;t.onload=function(){return A(t)},t.onerror=r,t.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(e))})},_={get SUPPORT_RANGE_BOUNDS(){var e=Bc(document);return Object.defineProperty(_,"SUPPORT_RANGE_BOUNDS",{value:e}),e},get SUPPORT_WORD_BREAKING(){var e=_.SUPPORT_RANGE_BOUNDS&&sc(document);return Object.defineProperty(_,"SUPPORT_WORD_BREAKING",{value:e}),e},get SUPPORT_SVG_DRAWING(){var e=oc(document);return Object.defineProperty(_,"SUPPORT_SVG_DRAWING",{value:e}),e},get SUPPORT_FOREIGNOBJECT_DRAWING(){var e=typeof Array.from=="function"&&typeof window.fetch=="function"?cc(document):Promise.resolve(!1);return Object.defineProperty(_,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:e}),e},get SUPPORT_CORS_IMAGES(){var e=ic();return Object.defineProperty(_,"SUPPORT_CORS_IMAGES",{value:e}),e},get SUPPORT_RESPONSE_TYPE(){var e=ac();return Object.defineProperty(_,"SUPPORT_RESPONSE_TYPE",{value:e}),e},get SUPPORT_CORS_XHR(){var e="withCredentials"in new XMLHttpRequest;return Object.defineProperty(_,"SUPPORT_CORS_XHR",{value:e}),e},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var e=!!(typeof Intl!="undefined"&&Intl.Segmenter);return Object.defineProperty(_,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:e}),e}},fe=function(){function e(A,r){this.text=A,this.bounds=r}return e}(),gc=function(e,A,r,t){var n=lc(A,r),B=[],s=0;return n.forEach(function(a){if(r.textDecorationLine.length||a.trim().length>0)if(_.SUPPORT_RANGE_BOUNDS){var i=pn(t,s,a.length).getClientRects();if(i.length>1){var o=br(a),c=0;o.forEach(function(u){B.push(new fe(u,wA.fromDOMRectList(e,pn(t,c+s,u.length).getClientRects()))),c+=u.length})}else B.push(new fe(a,wA.fromDOMRectList(e,i)))}else{var g=t.splitText(a.length);B.push(new fe(a,uc(e,t))),t=g}else _.SUPPORT_RANGE_BOUNDS||(t=t.splitText(a.length));s+=a.length}),B},uc=function(e,A){var r=A.ownerDocument;if(r){var t=r.createElement("html2canvaswrapper");t.appendChild(A.cloneNode(!0));var n=A.parentNode;if(n){n.replaceChild(t,A);var B=Qt(e,t);return t.firstChild&&n.replaceChild(t.firstChild,t),B}}return wA.EMPTY},pn=function(e,A,r){var t=e.ownerDocument;if(!t)throw new Error("Node has no owner document");var n=t.createRange();return n.setStart(e,A),n.setEnd(e,A+r),n},br=function(e){if(_.SUPPORT_NATIVE_TEXT_SEGMENTATION){var A=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(A.segment(e)).map(function(r){return r.segment})}return nc(e)},Qc=function(e,A){if(_.SUPPORT_NATIVE_TEXT_SEGMENTATION){var r=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(r.segment(e)).map(function(t){return t.segment})}return fc(e,A)},lc=function(e,A){return A.letterSpacing!==0?br(e):Qc(e,A)},wc=[32,160,4961,65792,65793,4153,4241],fc=function(e,A){for(var r=Ps(e,{lineBreak:A.lineBreak,wordBreak:A.overflowWrap==="break-word"?"break-word":A.wordBreak}),t=[],n,B=function(){if(n.value){var s=n.value.slice(),a=lt(s),i="";a.forEach(function(o){wc.indexOf(o)===-1?i+=M(o):(i.length&&t.push(i),t.push(M(o)),i="")}),i.length&&t.push(i)}};!(n=r.next()).done;)B();return t},Cc=function(){function e(A,r,t){this.text=Uc(r.data,t.textTransform),this.textBounds=gc(A,this.text,t,r)}return e}(),Uc=function(e,A){switch(A){case 1:return e.toLowerCase();case 3:return e.replace(Fc,hc);case 2:return e.toUpperCase();default:return e}},Fc=/(^|\s|:|-|\(|\))([a-z])/g,hc=function(e,A,r){return e.length>0?A+r.toUpperCase():e},EB=function(e){nA(A,e);function A(r,t){var n=e.call(this,r,t)||this;return n.src=t.currentSrc||t.src,n.intrinsicWidth=t.naturalWidth,n.intrinsicHeight=t.naturalHeight,n.context.cache.addImage(n.src),n}return A}(aA),HB=function(e){nA(A,e);function A(r,t){var n=e.call(this,r,t)||this;return n.canvas=t,n.intrinsicWidth=t.width,n.intrinsicHeight=t.height,n}return A}(aA),pB=function(e){nA(A,e);function A(r,t){var n=e.call(this,r,t)||this,B=new XMLSerializer,s=Qt(r,t);return t.setAttribute("width",s.width+"px"),t.setAttribute("height",s.height+"px"),n.svg="data:image/svg+xml,"+encodeURIComponent(B.serializeToString(t)),n.intrinsicWidth=t.width.baseVal.value,n.intrinsicHeight=t.height.baseVal.value,n.context.cache.addImage(n.svg),n}return A}(aA),IB=function(e){nA(A,e);function A(r,t){var n=e.call(this,r,t)||this;return n.value=t.value,n}return A}(aA),Cr=function(e){nA(A,e);function A(r,t){var n=e.call(this,r,t)||this;return n.start=t.start,n.reversed=typeof t.reversed=="boolean"&&t.reversed===!0,n}return A}(aA),dc=[{type:15,flags:0,unit:"px",number:3}],Ec=[{type:16,flags:0,number:50}],Hc=function(e){return e.width>e.height?new wA(e.left+(e.width-e.height)/2,e.top,e.height,e.height):e.width<e.height?new wA(e.left,e.top+(e.height-e.width)/2,e.width,e.width):e},pc=function(e){var A=e.type===Ic?new Array(e.value.length+1).join("\u2022"):e.value;return A.length===0?e.placeholder||"":A},nt="checkbox",Bt="radio",Ic="password",In=707406591,Dr=function(e){nA(A,e);function A(r,t){var n=e.call(this,r,t)||this;switch(n.type=t.type.toLowerCase(),n.checked=t.checked,n.value=pc(t),(n.type===nt||n.type===Bt)&&(n.styles.backgroundColor=3739148031,n.styles.borderTopColor=n.styles.borderRightColor=n.styles.borderBottomColor=n.styles.borderLeftColor=2779096575,n.styles.borderTopWidth=n.styles.borderRightWidth=n.styles.borderBottomWidth=n.styles.borderLeftWidth=1,n.styles.borderTopStyle=n.styles.borderRightStyle=n.styles.borderBottomStyle=n.styles.borderLeftStyle=1,n.styles.backgroundClip=[0],n.styles.backgroundOrigin=[0],n.bounds=Hc(n.bounds)),n.type){case nt:n.styles.borderTopRightRadius=n.styles.borderTopLeftRadius=n.styles.borderBottomRightRadius=n.styles.borderBottomLeftRadius=dc;break;case Bt:n.styles.borderTopRightRadius=n.styles.borderTopLeftRadius=n.styles.borderBottomRightRadius=n.styles.borderBottomLeftRadius=Ec;break}return n}return A}(aA),vB=function(e){nA(A,e);function A(r,t){var n=e.call(this,r,t)||this,B=t.options[t.selectedIndex||0];return n.value=B&&B.text||"",n}return A}(aA),yB=function(e){nA(A,e);function A(r,t){var n=e.call(this,r,t)||this;return n.value=t.value,n}return A}(aA),mB=function(e){nA(A,e);function A(r,t){var n=e.call(this,r,t)||this;n.src=t.src,n.width=parseInt(t.width,10)||0,n.height=parseInt(t.height,10)||0,n.backgroundColor=n.styles.backgroundColor;try{if(t.contentWindow&&t.contentWindow.document&&t.contentWindow.document.documentElement){n.tree=LB(r,t.contentWindow.document.documentElement);var B=t.contentWindow.document.documentElement?le(r,getComputedStyle(t.contentWindow.document.documentElement).backgroundColor):lA.TRANSPARENT,s=t.contentWindow.document.body?le(r,getComputedStyle(t.contentWindow.document.body).backgroundColor):lA.TRANSPARENT;n.backgroundColor=vA(B)?vA(s)?n.styles.backgroundColor:s:B}}catch{}return n}return A}(aA),vc=["OL","UL","MENU"],$e=function(e,A,r,t){for(var n=A.firstChild,B=void 0;n;n=B)if(B=n.nextSibling,bB(n)&&n.data.trim().length>0)r.textNodes.push(new Cc(e,n,r.styles));else if(YA(n))if(xB(n)&&n.assignedNodes)n.assignedNodes().forEach(function(a){return $e(e,a,r,t)});else{var s=KB(e,n);s.styles.isVisible()&&(yc(n,s,t)?s.flags|=4:mc(s.styles)&&(s.flags|=2),vc.indexOf(n.tagName)!==-1&&(s.flags|=8),r.elements.push(s),n.slot,n.shadowRoot?$e(e,n.shadowRoot,s,t):!st(n)&&!DB(n)&&!it(n)&&$e(e,n,s,t))}},KB=function(e,A){return Fr(A)?new EB(e,A):TB(A)?new HB(e,A):DB(A)?new pB(e,A):Kc(A)?new IB(e,A):Lc(A)?new Cr(e,A):bc(A)?new Dr(e,A):it(A)?new vB(e,A):st(A)?new yB(e,A):SB(A)?new mB(e,A):new aA(e,A)},LB=function(e,A){var r=KB(e,A);return r.flags|=4,$e(e,A,r,r),r},yc=function(e,A,r){return A.styles.isPositionedWithZIndex()||A.styles.opacity<1||A.styles.isTransformed()||Tr(e)&&r.styles.isTransparent()},mc=function(e){return e.isPositioned()||e.isFloating()},bB=function(e){return e.nodeType===Node.TEXT_NODE},YA=function(e){return e.nodeType===Node.ELEMENT_NODE},Ur=function(e){return YA(e)&&typeof e.style!="undefined"&&!At(e)},At=function(e){return typeof e.className=="object"},Kc=function(e){return e.tagName==="LI"},Lc=function(e){return e.tagName==="OL"},bc=function(e){return e.tagName==="INPUT"},Dc=function(e){return e.tagName==="HTML"},DB=function(e){return e.tagName==="svg"},Tr=function(e){return e.tagName==="BODY"},TB=function(e){return e.tagName==="CANVAS"},vn=function(e){return e.tagName==="VIDEO"},Fr=function(e){return e.tagName==="IMG"},SB=function(e){return e.tagName==="IFRAME"},yn=function(e){return e.tagName==="STYLE"},Tc=function(e){return e.tagName==="SCRIPT"},st=function(e){return e.tagName==="TEXTAREA"},it=function(e){return e.tagName==="SELECT"},xB=function(e){return e.tagName==="SLOT"},mn=function(e){return e.tagName.indexOf("-")>0},Sc=function(){function e(){this.counters={}}return e.prototype.getCounterValue=function(A){var r=this.counters[A];return r&&r.length?r[r.length-1]:1},e.prototype.getCounterValues=function(A){var r=this.counters[A];return r||[]},e.prototype.pop=function(A){var r=this;A.forEach(function(t){return r.counters[t].pop()})},e.prototype.parse=function(A){var r=this,t=A.counterIncrement,n=A.counterReset,B=!0;t!==null&&t.forEach(function(a){var i=r.counters[a.counter];i&&a.increment!==0&&(B=!1,i.length||i.push(1),i[Math.max(0,i.length-1)]+=a.increment)});var s=[];return B&&n.forEach(function(a){var i=r.counters[a.counter];s.push(a.counter),i||(i=r.counters[a.counter]=[]),i.push(a.reset)}),s},e}(),Kn={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]},Ln={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["\u0554","\u0553","\u0552","\u0551","\u0550","\u054F","\u054E","\u054D","\u054C","\u054B","\u054A","\u0549","\u0548","\u0547","\u0546","\u0545","\u0544","\u0543","\u0542","\u0541","\u0540","\u053F","\u053E","\u053D","\u053C","\u053B","\u053A","\u0539","\u0538","\u0537","\u0536","\u0535","\u0534","\u0533","\u0532","\u0531"]},xc={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["\u05D9\u05F3","\u05D8\u05F3","\u05D7\u05F3","\u05D6\u05F3","\u05D5\u05F3","\u05D4\u05F3","\u05D3\u05F3","\u05D2\u05F3","\u05D1\u05F3","\u05D0\u05F3","\u05EA","\u05E9","\u05E8","\u05E7","\u05E6","\u05E4","\u05E2","\u05E1","\u05E0","\u05DE","\u05DC","\u05DB","\u05D9\u05D8","\u05D9\u05D7","\u05D9\u05D6","\u05D8\u05D6","\u05D8\u05D5","\u05D9","\u05D8","\u05D7","\u05D6","\u05D5","\u05D4","\u05D3","\u05D2","\u05D1","\u05D0"]},Mc={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["\u10F5","\u10F0","\u10EF","\u10F4","\u10EE","\u10ED","\u10EC","\u10EB","\u10EA","\u10E9","\u10E8","\u10E7","\u10E6","\u10E5","\u10E4","\u10F3","\u10E2","\u10E1","\u10E0","\u10DF","\u10DE","\u10DD","\u10F2","\u10DC","\u10DB","\u10DA","\u10D9","\u10D8","\u10D7","\u10F1","\u10D6","\u10D5","\u10D4","\u10D3","\u10D2","\u10D1","\u10D0"]},PA=function(e,A,r,t,n,B){return e<A||e>r?de(e,n,B.length>0):t.integers.reduce(function(s,a,i){for(;e>=a;)e-=a,s+=t.values[i];return s},"")+B},MB=function(e,A,r,t){var n="";do r||e--,n=t(e)+n,e/=A;while(e*A>=A);return n},x=function(e,A,r,t,n){var B=r-A+1;return(e<0?"-":"")+(MB(Math.abs(e),B,t,function(s){return M(Math.floor(s%B)+A)})+n)},TA=function(e,A,r){r===void 0&&(r=". ");var t=A.length;return MB(Math.abs(e),t,!1,function(n){return A[Math.floor(n%t)]})+r},JA=1<<0,UA=1<<1,FA=1<<2,ue=1<<3,QA=function(e,A,r,t,n,B){if(e<-9999||e>9999)return de(e,4,n.length>0);var s=Math.abs(e),a=n;if(s===0)return A[0]+a;for(var i=0;s>0&&i<=4;i++){var o=s%10;o===0&&G(B,JA)&&a!==""?a=A[o]+a:o>1||o===1&&i===0||o===1&&i===1&&G(B,UA)||o===1&&i===1&&G(B,FA)&&e>100||o===1&&i>1&&G(B,ue)?a=A[o]+(i>0?r[i-1]:"")+a:o===1&&i>0&&(a=r[i-1]+a),s=Math.floor(s/10)}return(e<0?t:"")+a},bn="\u5341\u767E\u5343\u842C",Dn="\u62FE\u4F70\u4EDF\u842C",Tn="\u30DE\u30A4\u30CA\u30B9",Xt="\uB9C8\uC774\uB108\uC2A4",de=function(e,A,r){var t=r?". ":"",n=r?"\u3001":"",B=r?", ":"",s=r?" ":"";switch(A){case 0:return"\u2022"+s;case 1:return"\u25E6"+s;case 2:return"\u25FE"+s;case 5:var a=x(e,48,57,!0,t);return a.length<4?"0"+a:a;case 4:return TA(e,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",n);case 6:return PA(e,1,3999,Kn,3,t).toLowerCase();case 7:return PA(e,1,3999,Kn,3,t);case 8:return x(e,945,969,!1,t);case 9:return x(e,97,122,!1,t);case 10:return x(e,65,90,!1,t);case 11:return x(e,1632,1641,!0,t);case 12:case 49:return PA(e,1,9999,Ln,3,t);case 35:return PA(e,1,9999,Ln,3,t).toLowerCase();case 13:return x(e,2534,2543,!0,t);case 14:case 30:return x(e,6112,6121,!0,t);case 15:return TA(e,"\u5B50\u4E11\u5BC5\u536F\u8FB0\u5DF3\u5348\u672A\u7533\u9149\u620C\u4EA5",n);case 16:return TA(e,"\u7532\u4E59\u4E19\u4E01\u620A\u5DF1\u5E9A\u8F9B\u58EC\u7678",n);case 17:case 48:return QA(e,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",bn,"\u8CA0",n,UA|FA|ue);case 47:return QA(e,"\u96F6\u58F9\u8CB3\u53C3\u8086\u4F0D\u9678\u67D2\u634C\u7396",Dn,"\u8CA0",n,JA|UA|FA|ue);case 42:return QA(e,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",bn,"\u8D1F",n,UA|FA|ue);case 41:return QA(e,"\u96F6\u58F9\u8D30\u53C1\u8086\u4F0D\u9646\u67D2\u634C\u7396",Dn,"\u8D1F",n,JA|UA|FA|ue);case 26:return QA(e,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u4E07",Tn,n,0);case 25:return QA(e,"\u96F6\u58F1\u5F10\u53C2\u56DB\u4F0D\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343\u4E07",Tn,n,JA|UA|FA);case 31:return QA(e,"\uC601\uC77C\uC774\uC0BC\uC0AC\uC624\uC721\uCE60\uD314\uAD6C","\uC2ED\uBC31\uCC9C\uB9CC",Xt,B,JA|UA|FA);case 33:return QA(e,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u842C",Xt,B,0);case 32:return QA(e,"\u96F6\u58F9\u8CB3\u53C3\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343",Xt,B,JA|UA|FA);case 18:return x(e,2406,2415,!0,t);case 20:return PA(e,1,19999,Mc,3,t);case 21:return x(e,2790,2799,!0,t);case 22:return x(e,2662,2671,!0,t);case 22:return PA(e,1,10999,xc,3,t);case 23:return TA(e,"\u3042\u3044\u3046\u3048\u304A\u304B\u304D\u304F\u3051\u3053\u3055\u3057\u3059\u305B\u305D\u305F\u3061\u3064\u3066\u3068\u306A\u306B\u306C\u306D\u306E\u306F\u3072\u3075\u3078\u307B\u307E\u307F\u3080\u3081\u3082\u3084\u3086\u3088\u3089\u308A\u308B\u308C\u308D\u308F\u3090\u3091\u3092\u3093");case 24:return TA(e,"\u3044\u308D\u306F\u306B\u307B\u3078\u3068\u3061\u308A\u306C\u308B\u3092\u308F\u304B\u3088\u305F\u308C\u305D\u3064\u306D\u306A\u3089\u3080\u3046\u3090\u306E\u304A\u304F\u3084\u307E\u3051\u3075\u3053\u3048\u3066\u3042\u3055\u304D\u3086\u3081\u307F\u3057\u3091\u3072\u3082\u305B\u3059");case 27:return x(e,3302,3311,!0,t);case 28:return TA(e,"\u30A2\u30A4\u30A6\u30A8\u30AA\u30AB\u30AD\u30AF\u30B1\u30B3\u30B5\u30B7\u30B9\u30BB\u30BD\u30BF\u30C1\u30C4\u30C6\u30C8\u30CA\u30CB\u30CC\u30CD\u30CE\u30CF\u30D2\u30D5\u30D8\u30DB\u30DE\u30DF\u30E0\u30E1\u30E2\u30E4\u30E6\u30E8\u30E9\u30EA\u30EB\u30EC\u30ED\u30EF\u30F0\u30F1\u30F2\u30F3",n);case 29:return TA(e,"\u30A4\u30ED\u30CF\u30CB\u30DB\u30D8\u30C8\u30C1\u30EA\u30CC\u30EB\u30F2\u30EF\u30AB\u30E8\u30BF\u30EC\u30BD\u30C4\u30CD\u30CA\u30E9\u30E0\u30A6\u30F0\u30CE\u30AA\u30AF\u30E4\u30DE\u30B1\u30D5\u30B3\u30A8\u30C6\u30A2\u30B5\u30AD\u30E6\u30E1\u30DF\u30B7\u30F1\u30D2\u30E2\u30BB\u30B9",n);case 34:return x(e,3792,3801,!0,t);case 37:return x(e,6160,6169,!0,t);case 38:return x(e,4160,4169,!0,t);case 39:return x(e,2918,2927,!0,t);case 40:return x(e,1776,1785,!0,t);case 43:return x(e,3046,3055,!0,t);case 44:return x(e,3174,3183,!0,t);case 45:return x(e,3664,3673,!0,t);case 46:return x(e,3872,3881,!0,t);case 3:default:return x(e,48,57,!0,t)}},OB="data-html2canvas-ignore",Sn=function(){function e(A,r,t){if(this.context=A,this.options=t,this.scrolledElements=[],this.referenceElement=r,this.counters=new Sc,this.quoteDepth=0,!r.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(r.ownerDocument.documentElement,!1)}return e.prototype.toIFrame=function(A,r){var t=this,n=Oc(A,r);if(!n.contentWindow)return Promise.reject("Unable to find iframe window");var B=A.defaultView.pageXOffset,s=A.defaultView.pageYOffset,a=n.contentWindow,i=a.document,o=Nc(n).then(function(){return Y(t,void 0,void 0,function(){var c,g;return J(this,function(u){switch(u.label){case 0:return this.scrolledElements.forEach(Xc),a&&(a.scrollTo(r.left,r.top),/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&(a.scrollY!==r.top||a.scrollX!==r.left)&&(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(a.scrollX-r.left,a.scrollY-r.top,0,0))),c=this.options.onclone,g=this.clonedReferenceElement,typeof g=="undefined"?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:i.fonts&&i.fonts.ready?[4,i.fonts.ready]:[3,2];case 1:u.sent(),u.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,Gc(i)]:[3,4];case 3:u.sent(),u.label=4;case 4:return typeof c=="function"?[2,Promise.resolve().then(function(){return c(i,g)}).then(function(){return n})]:[2,n]}})})});return i.open(),i.write(Pc(document.doctype)+"<html></html>"),_c(this.referenceElement.ownerDocument,B,s),i.replaceChild(i.adoptNode(this.documentElement),i.documentElement),i.close(),o},e.prototype.createElementClone=function(A){if(wr(A,2))debugger;if(TB(A))return this.createCanvasClone(A);if(vn(A))return this.createVideoClone(A);if(yn(A))return this.createStyleClone(A);var r=A.cloneNode(!1);return Fr(r)&&(Fr(A)&&A.currentSrc&&A.currentSrc!==A.src&&(r.src=A.currentSrc,r.srcset=""),r.loading==="lazy"&&(r.loading="eager")),mn(r)?this.createCustomElementClone(r):r},e.prototype.createCustomElementClone=function(A){var r=document.createElement("html2canvascustomelement");return Jt(A.style,r),r},e.prototype.createStyleClone=function(A){try{var r=A.sheet;if(r&&r.cssRules){var t=[].slice.call(r.cssRules,0).reduce(function(B,s){return s&&typeof s.cssText=="string"?B+s.cssText:B},""),n=A.cloneNode(!1);return n.textContent=t,n}}catch(B){if(this.context.logger.error("Unable to access cssRules property",B),B.name!=="SecurityError")throw B}return A.cloneNode(!1)},e.prototype.createCanvasClone=function(A){var r;if(this.options.inlineImages&&A.ownerDocument){var t=A.ownerDocument.createElement("img");try{return t.src=A.toDataURL(),t}catch{this.context.logger.info("Unable to inline canvas contents, canvas is tainted",A)}}var n=A.cloneNode(!1);try{n.width=A.width,n.height=A.height;var B=A.getContext("2d"),s=n.getContext("2d");if(s)if(!this.options.allowTaint&&B)s.putImageData(B.getImageData(0,0,A.width,A.height),0,0);else{var a=(r=A.getContext("webgl2"))!==null&&r!==void 0?r:A.getContext("webgl");if(a){var i=a.getContextAttributes();(i==null?void 0:i.preserveDrawingBuffer)===!1&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",A)}s.drawImage(A,0,0)}return n}catch{this.context.logger.info("Unable to clone canvas as it is tainted",A)}return n},e.prototype.createVideoClone=function(A){var r=A.ownerDocument.createElement("canvas");r.width=A.offsetWidth,r.height=A.offsetHeight;var t=r.getContext("2d");try{return t&&(t.drawImage(A,0,0,r.width,r.height),this.options.allowTaint||t.getImageData(0,0,r.width,r.height)),r}catch{this.context.logger.info("Unable to clone video as it is tainted",A)}var n=A.ownerDocument.createElement("canvas");return n.width=A.offsetWidth,n.height=A.offsetHeight,n},e.prototype.appendChildNode=function(A,r,t){(!YA(r)||!Tc(r)&&!r.hasAttribute(OB)&&(typeof this.options.ignoreElements!="function"||!this.options.ignoreElements(r)))&&(!this.options.copyStyles||!YA(r)||!yn(r))&&A.appendChild(this.cloneNode(r,t))},e.prototype.cloneChildNodes=function(A,r,t){for(var n=this,B=A.shadowRoot?A.shadowRoot.firstChild:A.firstChild;B;B=B.nextSibling)if(YA(B)&&xB(B)&&typeof B.assignedNodes=="function"){var s=B.assignedNodes();s.length&&s.forEach(function(a){return n.appendChildNode(r,a,t)})}else this.appendChildNode(r,B,t)},e.prototype.cloneNode=function(A,r){if(bB(A))return document.createTextNode(A.data);if(!A.ownerDocument)return A.cloneNode(!1);var t=A.ownerDocument.defaultView;if(t&&YA(A)&&(Ur(A)||At(A))){var n=this.createElementClone(A);n.style.transitionProperty="none";var B=t.getComputedStyle(A),s=t.getComputedStyle(A,":before"),a=t.getComputedStyle(A,":after");this.referenceElement===A&&Ur(n)&&(this.clonedReferenceElement=n),Tr(n)&&Yc(n);var i=this.counters.parse(new gn(this.context,B)),o=this.resolvePseudoContent(A,n,s,Ce.BEFORE);mn(A)&&(r=!0),vn(A)||this.cloneChildNodes(A,n,r),o&&n.insertBefore(o,n.firstChild);var c=this.resolvePseudoContent(A,n,a,Ce.AFTER);return c&&n.appendChild(c),this.counters.pop(i),(B&&(this.options.copyStyles||At(A))&&!SB(A)||r)&&Jt(B,n),(A.scrollTop!==0||A.scrollLeft!==0)&&this.scrolledElements.push([n,A.scrollLeft,A.scrollTop]),(st(A)||it(A))&&(st(n)||it(n))&&(n.value=A.value),n}return A.cloneNode(!1)},e.prototype.resolvePseudoContent=function(A,r,t,n){var B=this;if(!!t){var s=t.content,a=r.ownerDocument;if(!(!a||!s||s==="none"||s==="-moz-alt-content"||t.display==="none")){this.counters.parse(new gn(this.context,t));var i=new Ko(this.context,t),o=a.createElement("html2canvaspseudoelement");Jt(t,o),i.content.forEach(function(g){if(g.type===0)o.appendChild(a.createTextNode(g.value));else if(g.type===22){var u=a.createElement("img");u.src=g.value,u.style.opacity="1",o.appendChild(u)}else if(g.type===18){if(g.name==="attr"){var l=g.values.filter(D);l.length&&o.appendChild(a.createTextNode(A.getAttribute(l[0].value)||""))}else if(g.name==="counter"){var Q=g.values.filter(ZA),w=Q[0],p=Q[1];if(w&&D(w)){var f=B.counters.getCounterValue(w.value),C=p&&D(p)?lr.parse(B.context,p.value):3;o.appendChild(a.createTextNode(de(f,C,!1)))}}else if(g.name==="counters"){var h=g.values.filter(ZA),w=h[0],F=h[1],p=h[2];if(w&&D(w)){var d=B.counters.getCounterValues(w.value),U=p&&D(p)?lr.parse(B.context,p.value):3,v=F&&F.type===0?F.value:"",y=d.map(function(O){return de(O,U,!1)}).join(v);o.appendChild(a.createTextNode(y))}}}else if(g.type===20)switch(g.value){case"open-quote":o.appendChild(a.createTextNode(cn(i.quotes,B.quoteDepth++,!0)));break;case"close-quote":o.appendChild(a.createTextNode(cn(i.quotes,--B.quoteDepth,!1)));break;default:o.appendChild(a.createTextNode(g.value))}}),o.className=hr+" "+dr;var c=n===Ce.BEFORE?" "+hr:" "+dr;return At(r)?r.className.baseValue+=c:r.className+=c,o}}},e.destroy=function(A){return A.parentNode?(A.parentNode.removeChild(A),!0):!1},e}(),Ce;(function(e){e[e.BEFORE=0]="BEFORE",e[e.AFTER=1]="AFTER"})(Ce||(Ce={}));var Oc=function(e,A){var r=e.createElement("iframe");return r.className="html2canvas-container",r.style.visibility="hidden",r.style.position="fixed",r.style.left="-10000px",r.style.top="0px",r.style.border="0",r.width=A.width.toString(),r.height=A.height.toString(),r.scrolling="no",r.setAttribute(OB,"true"),e.body.appendChild(r),r},Rc=function(e){return new Promise(function(A){if(e.complete){A();return}if(!e.src){A();return}e.onload=A,e.onerror=A})},Gc=function(e){return Promise.all([].slice.call(e.images,0).map(Rc))},Nc=function(e){return new Promise(function(A,r){var t=e.contentWindow;if(!t)return r("No window assigned for iframe");var n=t.document;t.onload=e.onload=function(){t.onload=e.onload=null;var B=setInterval(function(){n.body.childNodes.length>0&&n.readyState==="complete"&&(clearInterval(B),A(e))},50)}})},Vc=["all","d","content"],Jt=function(e,A){for(var r=e.length-1;r>=0;r--){var t=e.item(r);Vc.indexOf(t)===-1&&A.style.setProperty(t,e.getPropertyValue(t))}return A},Pc=function(e){var A="";return e&&(A+="<!DOCTYPE ",e.name&&(A+=e.name),e.internalSubset&&(A+=e.internalSubset),e.publicId&&(A+='"'+e.publicId+'"'),e.systemId&&(A+='"'+e.systemId+'"'),A+=">"),A},_c=function(e,A,r){e&&e.defaultView&&(A!==e.defaultView.pageXOffset||r!==e.defaultView.pageYOffset)&&e.defaultView.scrollTo(A,r)},Xc=function(e){var A=e[0],r=e[1],t=e[2];A.scrollLeft=r,A.scrollTop=t},Jc=":before",kc=":after",hr="___html2canvas___pseudoelement_before",dr="___html2canvas___pseudoelement_after",xn=`{
    content: "" !important;
    display: none !important;
}`,Yc=function(e){Wc(e,"."+hr+Jc+xn+`
         .`+dr+kc+xn)},Wc=function(e,A){var r=e.ownerDocument;if(r){var t=r.createElement("style");t.textContent=A,e.appendChild(t)}},RB=function(){function e(){}return e.getOrigin=function(A){var r=e._link;return r?(r.href=A,r.href=r.href,r.protocol+r.hostname+r.port):"about:blank"},e.isSameOrigin=function(A){return e.getOrigin(A)===e._origin},e.setContext=function(A){e._link=A.document.createElement("a"),e._origin=e.getOrigin(A.location.href)},e._origin="about:blank",e}(),Zc=function(){function e(A,r){this.context=A,this._options=r,this._cache={}}return e.prototype.addImage=function(A){var r=Promise.resolve();return this.has(A)||(Yt(A)||$c(A))&&(this._cache[A]=this.loadImage(A)).catch(function(){}),r},e.prototype.match=function(A){return this._cache[A]},e.prototype.loadImage=function(A){return Y(this,void 0,void 0,function(){var r,t,n,B,s=this;return J(this,function(a){switch(a.label){case 0:return r=RB.isSameOrigin(A),t=!kt(A)&&this._options.useCORS===!0&&_.SUPPORT_CORS_IMAGES&&!r,n=!kt(A)&&!r&&!Yt(A)&&typeof this._options.proxy=="string"&&_.SUPPORT_CORS_XHR&&!t,!r&&this._options.allowTaint===!1&&!kt(A)&&!Yt(A)&&!n&&!t?[2]:(B=A,n?[4,this.proxy(B)]:[3,2]);case 1:B=a.sent(),a.label=2;case 2:return this.context.logger.debug("Added image "+A.substring(0,256)),[4,new Promise(function(i,o){var c=new Image;c.onload=function(){return i(c)},c.onerror=o,(Ag(B)||t)&&(c.crossOrigin="anonymous"),c.src=B,c.complete===!0&&setTimeout(function(){return i(c)},500),s._options.imageTimeout>0&&setTimeout(function(){return o("Timed out ("+s._options.imageTimeout+"ms) loading image")},s._options.imageTimeout)})];case 3:return[2,a.sent()]}})})},e.prototype.has=function(A){return typeof this._cache[A]!="undefined"},e.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},e.prototype.proxy=function(A){var r=this,t=this._options.proxy;if(!t)throw new Error("No proxy defined");var n=A.substring(0,256);return new Promise(function(B,s){var a=_.SUPPORT_RESPONSE_TYPE?"blob":"text",i=new XMLHttpRequest;i.onload=function(){if(i.status===200)if(a==="text")B(i.response);else{var g=new FileReader;g.addEventListener("load",function(){return B(g.result)},!1),g.addEventListener("error",function(u){return s(u)},!1),g.readAsDataURL(i.response)}else s("Failed to proxy resource "+n+" with status code "+i.status)},i.onerror=s;var o=t.indexOf("?")>-1?"&":"?";if(i.open("GET",""+t+o+"url="+encodeURIComponent(A)+"&responseType="+a),a!=="text"&&i instanceof XMLHttpRequest&&(i.responseType=a),r._options.imageTimeout){var c=r._options.imageTimeout;i.timeout=c,i.ontimeout=function(){return s("Timed out ("+c+"ms) proxying "+n)}}i.send()})},e}(),zc=/^data:image\/svg\+xml/i,qc=/^data:image\/.*;base64,/i,jc=/^data:image\/.*/i,$c=function(e){return _.SUPPORT_SVG_DRAWING||!eg(e)},kt=function(e){return jc.test(e)},Ag=function(e){return qc.test(e)},Yt=function(e){return e.substr(0,4)==="blob"},eg=function(e){return e.substr(-3).toLowerCase()==="svg"||zc.test(e)},E=function(){function e(A,r){this.type=0,this.x=A,this.y=r}return e.prototype.add=function(A,r){return new e(this.x+A,this.y+r)},e}(),_A=function(e,A,r){return new E(e.x+(A.x-e.x)*r,e.y+(A.y-e.y)*r)},Je=function(){function e(A,r,t,n){this.type=1,this.start=A,this.startControl=r,this.endControl=t,this.end=n}return e.prototype.subdivide=function(A,r){var t=_A(this.start,this.startControl,A),n=_A(this.startControl,this.endControl,A),B=_A(this.endControl,this.end,A),s=_A(t,n,A),a=_A(n,B,A),i=_A(s,a,A);return r?new e(this.start,t,s,i):new e(i,a,B,this.end)},e.prototype.add=function(A,r){return new e(this.start.add(A,r),this.startControl.add(A,r),this.endControl.add(A,r),this.end.add(A,r))},e.prototype.reverse=function(){return new e(this.end,this.endControl,this.startControl,this.start)},e}(),AA=function(e){return e.type===1},tg=function(){function e(A){var r=A.styles,t=A.bounds,n=ce(r.borderTopLeftRadius,t.width,t.height),B=n[0],s=n[1],a=ce(r.borderTopRightRadius,t.width,t.height),i=a[0],o=a[1],c=ce(r.borderBottomRightRadius,t.width,t.height),g=c[0],u=c[1],l=ce(r.borderBottomLeftRadius,t.width,t.height),Q=l[0],w=l[1],p=[];p.push((B+i)/t.width),p.push((Q+g)/t.width),p.push((s+w)/t.height),p.push((o+u)/t.height);var f=Math.max.apply(Math,p);f>1&&(B/=f,s/=f,i/=f,o/=f,g/=f,u/=f,Q/=f,w/=f);var C=t.width-i,h=t.height-u,F=t.width-g,d=t.height-w,U=r.borderTopWidth,v=r.borderRightWidth,y=r.borderBottomWidth,I=r.borderLeftWidth,L=T(r.paddingTop,A.bounds.width),O=T(r.paddingRight,A.bounds.width),V=T(r.paddingBottom,A.bounds.width),m=T(r.paddingLeft,A.bounds.width);this.topLeftBorderDoubleOuterBox=B>0||s>0?S(t.left+I/3,t.top+U/3,B-I/3,s-U/3,b.TOP_LEFT):new E(t.left+I/3,t.top+U/3),this.topRightBorderDoubleOuterBox=B>0||s>0?S(t.left+C,t.top+U/3,i-v/3,o-U/3,b.TOP_RIGHT):new E(t.left+t.width-v/3,t.top+U/3),this.bottomRightBorderDoubleOuterBox=g>0||u>0?S(t.left+F,t.top+h,g-v/3,u-y/3,b.BOTTOM_RIGHT):new E(t.left+t.width-v/3,t.top+t.height-y/3),this.bottomLeftBorderDoubleOuterBox=Q>0||w>0?S(t.left+I/3,t.top+d,Q-I/3,w-y/3,b.BOTTOM_LEFT):new E(t.left+I/3,t.top+t.height-y/3),this.topLeftBorderDoubleInnerBox=B>0||s>0?S(t.left+I*2/3,t.top+U*2/3,B-I*2/3,s-U*2/3,b.TOP_LEFT):new E(t.left+I*2/3,t.top+U*2/3),this.topRightBorderDoubleInnerBox=B>0||s>0?S(t.left+C,t.top+U*2/3,i-v*2/3,o-U*2/3,b.TOP_RIGHT):new E(t.left+t.width-v*2/3,t.top+U*2/3),this.bottomRightBorderDoubleInnerBox=g>0||u>0?S(t.left+F,t.top+h,g-v*2/3,u-y*2/3,b.BOTTOM_RIGHT):new E(t.left+t.width-v*2/3,t.top+t.height-y*2/3),this.bottomLeftBorderDoubleInnerBox=Q>0||w>0?S(t.left+I*2/3,t.top+d,Q-I*2/3,w-y*2/3,b.BOTTOM_LEFT):new E(t.left+I*2/3,t.top+t.height-y*2/3),this.topLeftBorderStroke=B>0||s>0?S(t.left+I/2,t.top+U/2,B-I/2,s-U/2,b.TOP_LEFT):new E(t.left+I/2,t.top+U/2),this.topRightBorderStroke=B>0||s>0?S(t.left+C,t.top+U/2,i-v/2,o-U/2,b.TOP_RIGHT):new E(t.left+t.width-v/2,t.top+U/2),this.bottomRightBorderStroke=g>0||u>0?S(t.left+F,t.top+h,g-v/2,u-y/2,b.BOTTOM_RIGHT):new E(t.left+t.width-v/2,t.top+t.height-y/2),this.bottomLeftBorderStroke=Q>0||w>0?S(t.left+I/2,t.top+d,Q-I/2,w-y/2,b.BOTTOM_LEFT):new E(t.left+I/2,t.top+t.height-y/2),this.topLeftBorderBox=B>0||s>0?S(t.left,t.top,B,s,b.TOP_LEFT):new E(t.left,t.top),this.topRightBorderBox=i>0||o>0?S(t.left+C,t.top,i,o,b.TOP_RIGHT):new E(t.left+t.width,t.top),this.bottomRightBorderBox=g>0||u>0?S(t.left+F,t.top+h,g,u,b.BOTTOM_RIGHT):new E(t.left+t.width,t.top+t.height),this.bottomLeftBorderBox=Q>0||w>0?S(t.left,t.top+d,Q,w,b.BOTTOM_LEFT):new E(t.left,t.top+t.height),this.topLeftPaddingBox=B>0||s>0?S(t.left+I,t.top+U,Math.max(0,B-I),Math.max(0,s-U),b.TOP_LEFT):new E(t.left+I,t.top+U),this.topRightPaddingBox=i>0||o>0?S(t.left+Math.min(C,t.width-v),t.top+U,C>t.width+v?0:Math.max(0,i-v),Math.max(0,o-U),b.TOP_RIGHT):new E(t.left+t.width-v,t.top+U),this.bottomRightPaddingBox=g>0||u>0?S(t.left+Math.min(F,t.width-I),t.top+Math.min(h,t.height-y),Math.max(0,g-v),Math.max(0,u-y),b.BOTTOM_RIGHT):new E(t.left+t.width-v,t.top+t.height-y),this.bottomLeftPaddingBox=Q>0||w>0?S(t.left+I,t.top+Math.min(d,t.height-y),Math.max(0,Q-I),Math.max(0,w-y),b.BOTTOM_LEFT):new E(t.left+I,t.top+t.height-y),this.topLeftContentBox=B>0||s>0?S(t.left+I+m,t.top+U+L,Math.max(0,B-(I+m)),Math.max(0,s-(U+L)),b.TOP_LEFT):new E(t.left+I+m,t.top+U+L),this.topRightContentBox=i>0||o>0?S(t.left+Math.min(C,t.width+I+m),t.top+U+L,C>t.width+I+m?0:i-I+m,o-(U+L),b.TOP_RIGHT):new E(t.left+t.width-(v+O),t.top+U+L),this.bottomRightContentBox=g>0||u>0?S(t.left+Math.min(F,t.width-(I+m)),t.top+Math.min(h,t.height+U+L),Math.max(0,g-(v+O)),u-(y+V),b.BOTTOM_RIGHT):new E(t.left+t.width-(v+O),t.top+t.height-(y+V)),this.bottomLeftContentBox=Q>0||w>0?S(t.left+I+m,t.top+d,Math.max(0,Q-(I+m)),w-(y+V),b.BOTTOM_LEFT):new E(t.left+I+m,t.top+t.height-(y+V))}return e}(),b;(function(e){e[e.TOP_LEFT=0]="TOP_LEFT",e[e.TOP_RIGHT=1]="TOP_RIGHT",e[e.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",e[e.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(b||(b={}));var S=function(e,A,r,t,n){var B=4*((Math.sqrt(2)-1)/3),s=r*B,a=t*B,i=e+r,o=A+t;switch(n){case b.TOP_LEFT:return new Je(new E(e,o),new E(e,o-a),new E(i-s,A),new E(i,A));case b.TOP_RIGHT:return new Je(new E(e,A),new E(e+s,A),new E(i,o-a),new E(i,o));case b.BOTTOM_RIGHT:return new Je(new E(i,A),new E(i,A+a),new E(e+s,o),new E(e,o));case b.BOTTOM_LEFT:default:return new Je(new E(i,o),new E(i-s,o),new E(e,A+a),new E(e,A))}},at=function(e){return[e.topLeftBorderBox,e.topRightBorderBox,e.bottomRightBorderBox,e.bottomLeftBorderBox]},rg=function(e){return[e.topLeftContentBox,e.topRightContentBox,e.bottomRightContentBox,e.bottomLeftContentBox]},ot=function(e){return[e.topLeftPaddingBox,e.topRightPaddingBox,e.bottomRightPaddingBox,e.bottomLeftPaddingBox]},ng=function(){function e(A,r,t){this.offsetX=A,this.offsetY=r,this.matrix=t,this.type=0,this.target=6}return e}(),ke=function(){function e(A,r){this.path=A,this.target=r,this.type=1}return e}(),Bg=function(){function e(A){this.opacity=A,this.type=2,this.target=6}return e}(),sg=function(e){return e.type===0},GB=function(e){return e.type===1},ig=function(e){return e.type===2},Mn=function(e,A){return e.length===A.length?e.some(function(r,t){return r===A[t]}):!1},ag=function(e,A,r,t,n){return e.map(function(B,s){switch(s){case 0:return B.add(A,r);case 1:return B.add(A+t,r);case 2:return B.add(A+t,r+n);case 3:return B.add(A,r+n)}return B})},NB=function(){function e(A){this.element=A,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return e}(),VB=function(){function e(A,r){if(this.container=A,this.parent=r,this.effects=[],this.curves=new tg(this.container),this.container.styles.opacity<1&&this.effects.push(new Bg(this.container.styles.opacity)),this.container.styles.transform!==null){var t=this.container.bounds.left+this.container.styles.transformOrigin[0].number,n=this.container.bounds.top+this.container.styles.transformOrigin[1].number,B=this.container.styles.transform;this.effects.push(new ng(t,n,B))}if(this.container.styles.overflowX!==0){var s=at(this.curves),a=ot(this.curves);Mn(s,a)?this.effects.push(new ke(s,6)):(this.effects.push(new ke(s,2)),this.effects.push(new ke(a,4)))}}return e.prototype.getEffects=function(A){for(var r=[2,3].indexOf(this.container.styles.position)===-1,t=this.parent,n=this.effects.slice(0);t;){var B=t.effects.filter(function(i){return!GB(i)});if(r||t.container.styles.position!==0||!t.parent){if(n.unshift.apply(n,B),r=[2,3].indexOf(t.container.styles.position)===-1,t.container.styles.overflowX!==0){var s=at(t.curves),a=ot(t.curves);Mn(s,a)||n.unshift(new ke(a,6))}}else n.unshift.apply(n,B);t=t.parent}return n.filter(function(i){return G(i.target,A)})},e}(),Er=function(e,A,r,t){e.container.elements.forEach(function(n){var B=G(n.flags,4),s=G(n.flags,2),a=new VB(n,e);G(n.styles.display,2048)&&t.push(a);var i=G(n.flags,8)?[]:t;if(B||s){var o=B||n.styles.isPositioned()?r:A,c=new NB(a);if(n.styles.isPositioned()||n.styles.opacity<1||n.styles.isTransformed()){var g=n.styles.zIndex.order;if(g<0){var u=0;o.negativeZIndex.some(function(Q,w){return g>Q.element.container.styles.zIndex.order?(u=w,!1):u>0}),o.negativeZIndex.splice(u,0,c)}else if(g>0){var l=0;o.positiveZIndex.some(function(Q,w){return g>=Q.element.container.styles.zIndex.order?(l=w+1,!1):l>0}),o.positiveZIndex.splice(l,0,c)}else o.zeroOrAutoZIndexOrTransformedOrOpacity.push(c)}else n.styles.isFloating()?o.nonPositionedFloats.push(c):o.nonPositionedInlineLevel.push(c);Er(a,c,B?c:r,i)}else n.styles.isInlineLevel()?A.inlineLevel.push(a):A.nonInlineLevel.push(a),Er(a,A,r,i);G(n.flags,8)&&PB(n,i)})},PB=function(e,A){for(var r=e instanceof Cr?e.start:1,t=e instanceof Cr?e.reversed:!1,n=0;n<A.length;n++){var B=A[n];B.container instanceof IB&&typeof B.container.value=="number"&&B.container.value!==0&&(r=B.container.value),B.listValue=de(r,B.container.styles.listStyleType,!0),r+=t?-1:1}},og=function(e){var A=new VB(e,null),r=new NB(A),t=[];return Er(A,r,r,t),PB(A.container,t),r},On=function(e,A){switch(A){case 0:return tA(e.topLeftBorderBox,e.topLeftPaddingBox,e.topRightBorderBox,e.topRightPaddingBox);case 1:return tA(e.topRightBorderBox,e.topRightPaddingBox,e.bottomRightBorderBox,e.bottomRightPaddingBox);case 2:return tA(e.bottomRightBorderBox,e.bottomRightPaddingBox,e.bottomLeftBorderBox,e.bottomLeftPaddingBox);case 3:default:return tA(e.bottomLeftBorderBox,e.bottomLeftPaddingBox,e.topLeftBorderBox,e.topLeftPaddingBox)}},cg=function(e,A){switch(A){case 0:return tA(e.topLeftBorderBox,e.topLeftBorderDoubleOuterBox,e.topRightBorderBox,e.topRightBorderDoubleOuterBox);case 1:return tA(e.topRightBorderBox,e.topRightBorderDoubleOuterBox,e.bottomRightBorderBox,e.bottomRightBorderDoubleOuterBox);case 2:return tA(e.bottomRightBorderBox,e.bottomRightBorderDoubleOuterBox,e.bottomLeftBorderBox,e.bottomLeftBorderDoubleOuterBox);case 3:default:return tA(e.bottomLeftBorderBox,e.bottomLeftBorderDoubleOuterBox,e.topLeftBorderBox,e.topLeftBorderDoubleOuterBox)}},gg=function(e,A){switch(A){case 0:return tA(e.topLeftBorderDoubleInnerBox,e.topLeftPaddingBox,e.topRightBorderDoubleInnerBox,e.topRightPaddingBox);case 1:return tA(e.topRightBorderDoubleInnerBox,e.topRightPaddingBox,e.bottomRightBorderDoubleInnerBox,e.bottomRightPaddingBox);case 2:return tA(e.bottomRightBorderDoubleInnerBox,e.bottomRightPaddingBox,e.bottomLeftBorderDoubleInnerBox,e.bottomLeftPaddingBox);case 3:default:return tA(e.bottomLeftBorderDoubleInnerBox,e.bottomLeftPaddingBox,e.topLeftBorderDoubleInnerBox,e.topLeftPaddingBox)}},ug=function(e,A){switch(A){case 0:return Ye(e.topLeftBorderStroke,e.topRightBorderStroke);case 1:return Ye(e.topRightBorderStroke,e.bottomRightBorderStroke);case 2:return Ye(e.bottomRightBorderStroke,e.bottomLeftBorderStroke);case 3:default:return Ye(e.bottomLeftBorderStroke,e.topLeftBorderStroke)}},Ye=function(e,A){var r=[];return AA(e)?r.push(e.subdivide(.5,!1)):r.push(e),AA(A)?r.push(A.subdivide(.5,!0)):r.push(A),r},tA=function(e,A,r,t){var n=[];return AA(e)?n.push(e.subdivide(.5,!1)):n.push(e),AA(r)?n.push(r.subdivide(.5,!0)):n.push(r),AA(t)?n.push(t.subdivide(.5,!0).reverse()):n.push(t),AA(A)?n.push(A.subdivide(.5,!1).reverse()):n.push(A),n},_B=function(e){var A=e.bounds,r=e.styles;return A.add(r.borderLeftWidth,r.borderTopWidth,-(r.borderRightWidth+r.borderLeftWidth),-(r.borderTopWidth+r.borderBottomWidth))},ct=function(e){var A=e.styles,r=e.bounds,t=T(A.paddingLeft,r.width),n=T(A.paddingRight,r.width),B=T(A.paddingTop,r.width),s=T(A.paddingBottom,r.width);return r.add(t+A.borderLeftWidth,B+A.borderTopWidth,-(A.borderRightWidth+A.borderLeftWidth+t+n),-(A.borderTopWidth+A.borderBottomWidth+B+s))},Qg=function(e,A){return e===0?A.bounds:e===2?ct(A):_B(A)},lg=function(e,A){return e===0?A.bounds:e===2?ct(A):_B(A)},Wt=function(e,A,r){var t=Qg(kA(e.styles.backgroundOrigin,A),e),n=lg(kA(e.styles.backgroundClip,A),e),B=wg(kA(e.styles.backgroundSize,A),r,t),s=B[0],a=B[1],i=ce(kA(e.styles.backgroundPosition,A),t.width-s,t.height-a),o=fg(kA(e.styles.backgroundRepeat,A),i,B,t,n),c=Math.round(t.left+i[0]),g=Math.round(t.top+i[1]);return[o,c,g,s,a]},XA=function(e){return D(e)&&e.value===WA.AUTO},We=function(e){return typeof e=="number"},wg=function(e,A,r){var t=A[0],n=A[1],B=A[2],s=e[0],a=e[1];if(!s)return[0,0];if(R(s)&&a&&R(a))return[T(s,r.width),T(a,r.height)];var i=We(B);if(D(s)&&(s.value===WA.CONTAIN||s.value===WA.COVER)){if(We(B)){var o=r.width/r.height;return o<B!=(s.value===WA.COVER)?[r.width,r.width/B]:[r.height*B,r.height]}return[r.width,r.height]}var c=We(t),g=We(n),u=c||g;if(XA(s)&&(!a||XA(a))){if(c&&g)return[t,n];if(!i&&!u)return[r.width,r.height];if(u&&i){var l=c?t:n*B,Q=g?n:t/B;return[l,Q]}var w=c?t:r.width,p=g?n:r.height;return[w,p]}if(i){var f=0,C=0;return R(s)?f=T(s,r.width):R(a)&&(C=T(a,r.height)),XA(s)?f=C*B:(!a||XA(a))&&(C=f/B),[f,C]}var h=null,F=null;if(R(s)?h=T(s,r.width):a&&R(a)&&(F=T(a,r.height)),h!==null&&(!a||XA(a))&&(F=c&&g?h/t*n:r.height),F!==null&&XA(s)&&(h=c&&g?F/n*t:r.width),h!==null&&F!==null)return[h,F];throw new Error("Unable to calculate background-size for element")},kA=function(e,A){var r=e[A];return typeof r=="undefined"?e[0]:r},fg=function(e,A,r,t,n){var B=A[0],s=A[1],a=r[0],i=r[1];switch(e){case 2:return[new E(Math.round(t.left),Math.round(t.top+s)),new E(Math.round(t.left+t.width),Math.round(t.top+s)),new E(Math.round(t.left+t.width),Math.round(i+t.top+s)),new E(Math.round(t.left),Math.round(i+t.top+s))];case 3:return[new E(Math.round(t.left+B),Math.round(t.top)),new E(Math.round(t.left+B+a),Math.round(t.top)),new E(Math.round(t.left+B+a),Math.round(t.height+t.top)),new E(Math.round(t.left+B),Math.round(t.height+t.top))];case 1:return[new E(Math.round(t.left+B),Math.round(t.top+s)),new E(Math.round(t.left+B+a),Math.round(t.top+s)),new E(Math.round(t.left+B+a),Math.round(t.top+s+i)),new E(Math.round(t.left+B),Math.round(t.top+s+i))];default:return[new E(Math.round(n.left),Math.round(n.top)),new E(Math.round(n.left+n.width),Math.round(n.top)),new E(Math.round(n.left+n.width),Math.round(n.height+n.top)),new E(Math.round(n.left),Math.round(n.height+n.top))]}},Cg="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",Rn="Hidden Text",Ug=function(){function e(A){this._data={},this._document=A}return e.prototype.parseMetrics=function(A,r){var t=this._document.createElement("div"),n=this._document.createElement("img"),B=this._document.createElement("span"),s=this._document.body;t.style.visibility="hidden",t.style.fontFamily=A,t.style.fontSize=r,t.style.margin="0",t.style.padding="0",t.style.whiteSpace="nowrap",s.appendChild(t),n.src=Cg,n.width=1,n.height=1,n.style.margin="0",n.style.padding="0",n.style.verticalAlign="baseline",B.style.fontFamily=A,B.style.fontSize=r,B.style.margin="0",B.style.padding="0",B.appendChild(this._document.createTextNode(Rn)),t.appendChild(B),t.appendChild(n);var a=n.offsetTop-B.offsetTop+2;t.removeChild(B),t.appendChild(this._document.createTextNode(Rn)),t.style.lineHeight="normal",n.style.verticalAlign="super";var i=n.offsetTop-t.offsetTop+2;return s.removeChild(t),{baseline:a,middle:i}},e.prototype.getMetrics=function(A,r){var t=A+" "+r;return typeof this._data[t]=="undefined"&&(this._data[t]=this.parseMetrics(A,r)),this._data[t]},e}(),XB=function(){function e(A,r){this.context=A,this.options=r}return e}(),Fg=1e4,hg=function(e){nA(A,e);function A(r,t){var n=e.call(this,r,t)||this;return n._activeEffects=[],n.canvas=t.canvas?t.canvas:document.createElement("canvas"),n.ctx=n.canvas.getContext("2d"),t.canvas||(n.canvas.width=Math.floor(t.width*t.scale),n.canvas.height=Math.floor(t.height*t.scale),n.canvas.style.width=t.width+"px",n.canvas.style.height=t.height+"px"),n.fontMetrics=new Ug(document),n.ctx.scale(n.options.scale,n.options.scale),n.ctx.translate(-t.x,-t.y),n.ctx.textBaseline="bottom",n._activeEffects=[],n.context.logger.debug("Canvas renderer initialized ("+t.width+"x"+t.height+") with scale "+t.scale),n}return A.prototype.applyEffects=function(r){for(var t=this;this._activeEffects.length;)this.popEffect();r.forEach(function(n){return t.applyEffect(n)})},A.prototype.applyEffect=function(r){this.ctx.save(),ig(r)&&(this.ctx.globalAlpha=r.opacity),sg(r)&&(this.ctx.translate(r.offsetX,r.offsetY),this.ctx.transform(r.matrix[0],r.matrix[1],r.matrix[2],r.matrix[3],r.matrix[4],r.matrix[5]),this.ctx.translate(-r.offsetX,-r.offsetY)),GB(r)&&(this.path(r.path),this.ctx.clip()),this._activeEffects.push(r)},A.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},A.prototype.renderStack=function(r){return Y(this,void 0,void 0,function(){var t;return J(this,function(n){switch(n.label){case 0:return t=r.element.container.styles,t.isVisible()?[4,this.renderStackContent(r)]:[3,2];case 1:n.sent(),n.label=2;case 2:return[2]}})})},A.prototype.renderNode=function(r){return Y(this,void 0,void 0,function(){return J(this,function(t){switch(t.label){case 0:if(G(r.container.flags,16))debugger;return r.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(r)]:[3,3];case 1:return t.sent(),[4,this.renderNodeContent(r)];case 2:t.sent(),t.label=3;case 3:return[2]}})})},A.prototype.renderTextWithLetterSpacing=function(r,t,n){var B=this;if(t===0)this.ctx.fillText(r.text,r.bounds.left,r.bounds.top+n);else{var s=br(r.text);s.reduce(function(a,i){return B.ctx.fillText(i,a,r.bounds.top+n),a+B.ctx.measureText(i).width},r.bounds.left)}},A.prototype.createFontStyle=function(r){var t=r.fontVariant.filter(function(s){return s==="normal"||s==="small-caps"}).join(""),n=Ig(r.fontFamily).join(", "),B=pe(r.fontSize)?""+r.fontSize.number+r.fontSize.unit:r.fontSize.number+"px";return[[r.fontStyle,t,r.fontWeight,B,n].join(" "),n,B]},A.prototype.renderTextNode=function(r,t){return Y(this,void 0,void 0,function(){var n,B,s,a,i,o,c,g,u=this;return J(this,function(l){return n=this.createFontStyle(t),B=n[0],s=n[1],a=n[2],this.ctx.font=B,this.ctx.direction=t.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",i=this.fontMetrics.getMetrics(s,a),o=i.baseline,c=i.middle,g=t.paintOrder,r.textBounds.forEach(function(Q){g.forEach(function(w){switch(w){case 0:u.ctx.fillStyle=N(t.color),u.renderTextWithLetterSpacing(Q,t.letterSpacing,o);var p=t.textShadow;p.length&&Q.text.trim().length&&(p.slice(0).reverse().forEach(function(f){u.ctx.shadowColor=N(f.color),u.ctx.shadowOffsetX=f.offsetX.number*u.options.scale,u.ctx.shadowOffsetY=f.offsetY.number*u.options.scale,u.ctx.shadowBlur=f.blur.number,u.renderTextWithLetterSpacing(Q,t.letterSpacing,o)}),u.ctx.shadowColor="",u.ctx.shadowOffsetX=0,u.ctx.shadowOffsetY=0,u.ctx.shadowBlur=0),t.textDecorationLine.length&&(u.ctx.fillStyle=N(t.textDecorationColor||t.color),t.textDecorationLine.forEach(function(f){switch(f){case 1:u.ctx.fillRect(Q.bounds.left,Math.round(Q.bounds.top+o),Q.bounds.width,1);break;case 2:u.ctx.fillRect(Q.bounds.left,Math.round(Q.bounds.top),Q.bounds.width,1);break;case 3:u.ctx.fillRect(Q.bounds.left,Math.ceil(Q.bounds.top+c),Q.bounds.width,1);break}}));break;case 1:t.webkitTextStrokeWidth&&Q.text.trim().length&&(u.ctx.strokeStyle=N(t.webkitTextStrokeColor),u.ctx.lineWidth=t.webkitTextStrokeWidth,u.ctx.lineJoin=window.chrome?"miter":"round",u.ctx.strokeText(Q.text,Q.bounds.left,Q.bounds.top+o)),u.ctx.strokeStyle="",u.ctx.lineWidth=0,u.ctx.lineJoin="miter";break}})}),[2]})})},A.prototype.renderReplacedElement=function(r,t,n){if(n&&r.intrinsicWidth>0&&r.intrinsicHeight>0){var B=ct(r),s=ot(t);this.path(s),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(n,0,0,r.intrinsicWidth,r.intrinsicHeight,B.left,B.top,B.width,B.height),this.ctx.restore()}},A.prototype.renderNodeContent=function(r){return Y(this,void 0,void 0,function(){var t,n,B,s,a,i,C,C,o,c,g,u,F,l,Q,d,w,p,f,C,h,F,d;return J(this,function(U){switch(U.label){case 0:this.applyEffects(r.getEffects(4)),t=r.container,n=r.curves,B=t.styles,s=0,a=t.textNodes,U.label=1;case 1:return s<a.length?(i=a[s],[4,this.renderTextNode(i,B)]):[3,4];case 2:U.sent(),U.label=3;case 3:return s++,[3,1];case 4:if(!(t instanceof EB))return[3,8];U.label=5;case 5:return U.trys.push([5,7,,8]),[4,this.context.cache.match(t.src)];case 6:return C=U.sent(),this.renderReplacedElement(t,n,C),[3,8];case 7:return U.sent(),this.context.logger.error("Error loading image "+t.src),[3,8];case 8:if(t instanceof HB&&this.renderReplacedElement(t,n,t.canvas),!(t instanceof pB))return[3,12];U.label=9;case 9:return U.trys.push([9,11,,12]),[4,this.context.cache.match(t.svg)];case 10:return C=U.sent(),this.renderReplacedElement(t,n,C),[3,12];case 11:return U.sent(),this.context.logger.error("Error loading svg "+t.svg.substring(0,255)),[3,12];case 12:return t instanceof mB&&t.tree?(o=new A(this.context,{scale:this.options.scale,backgroundColor:t.backgroundColor,x:0,y:0,width:t.width,height:t.height}),[4,o.render(t.tree)]):[3,14];case 13:c=U.sent(),t.width&&t.height&&this.ctx.drawImage(c,0,0,t.width,t.height,t.bounds.left,t.bounds.top,t.bounds.width,t.bounds.height),U.label=14;case 14:if(t instanceof Dr&&(g=Math.min(t.bounds.width,t.bounds.height),t.type===nt?t.checked&&(this.ctx.save(),this.path([new E(t.bounds.left+g*.39363,t.bounds.top+g*.79),new E(t.bounds.left+g*.16,t.bounds.top+g*.5549),new E(t.bounds.left+g*.27347,t.bounds.top+g*.44071),new E(t.bounds.left+g*.39694,t.bounds.top+g*.5649),new E(t.bounds.left+g*.72983,t.bounds.top+g*.23),new E(t.bounds.left+g*.84,t.bounds.top+g*.34085),new E(t.bounds.left+g*.39363,t.bounds.top+g*.79)]),this.ctx.fillStyle=N(In),this.ctx.fill(),this.ctx.restore()):t.type===Bt&&t.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(t.bounds.left+g/2,t.bounds.top+g/2,g/4,0,Math.PI*2,!0),this.ctx.fillStyle=N(In),this.ctx.fill(),this.ctx.restore())),dg(t)&&t.value.length){switch(u=this.createFontStyle(B),F=u[0],l=u[1],Q=this.fontMetrics.getMetrics(F,l).baseline,this.ctx.font=F,this.ctx.fillStyle=N(B.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=Hg(t.styles.textAlign),d=ct(t),w=0,t.styles.textAlign){case 1:w+=d.width/2;break;case 2:w+=d.width;break}p=d.add(w,0,0,-d.height/2+1),this.ctx.save(),this.path([new E(d.left,d.top),new E(d.left+d.width,d.top),new E(d.left+d.width,d.top+d.height),new E(d.left,d.top+d.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new fe(t.value,p),B.letterSpacing,Q),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!G(t.styles.display,2048))return[3,20];if(t.styles.listStyleImage===null)return[3,19];if(f=t.styles.listStyleImage,f.type!==0)return[3,18];C=void 0,h=f.url,U.label=15;case 15:return U.trys.push([15,17,,18]),[4,this.context.cache.match(h)];case 16:return C=U.sent(),this.ctx.drawImage(C,t.bounds.left-(C.width+10),t.bounds.top),[3,18];case 17:return U.sent(),this.context.logger.error("Error loading list-style-image "+h),[3,18];case 18:return[3,20];case 19:r.listValue&&t.styles.listStyleType!==-1&&(F=this.createFontStyle(B)[0],this.ctx.font=F,this.ctx.fillStyle=N(B.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",d=new wA(t.bounds.left,t.bounds.top+T(t.styles.paddingTop,t.bounds.width),t.bounds.width,an(B.lineHeight,B.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new fe(r.listValue,d),B.letterSpacing,an(B.lineHeight,B.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),U.label=20;case 20:return[2]}})})},A.prototype.renderStackContent=function(r){return Y(this,void 0,void 0,function(){var t,n,f,B,s,f,a,i,f,o,c,f,g,u,f,l,Q,f,w,p,f;return J(this,function(C){switch(C.label){case 0:if(G(r.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(r.element)];case 1:C.sent(),t=0,n=r.negativeZIndex,C.label=2;case 2:return t<n.length?(f=n[t],[4,this.renderStack(f)]):[3,5];case 3:C.sent(),C.label=4;case 4:return t++,[3,2];case 5:return[4,this.renderNodeContent(r.element)];case 6:C.sent(),B=0,s=r.nonInlineLevel,C.label=7;case 7:return B<s.length?(f=s[B],[4,this.renderNode(f)]):[3,10];case 8:C.sent(),C.label=9;case 9:return B++,[3,7];case 10:a=0,i=r.nonPositionedFloats,C.label=11;case 11:return a<i.length?(f=i[a],[4,this.renderStack(f)]):[3,14];case 12:C.sent(),C.label=13;case 13:return a++,[3,11];case 14:o=0,c=r.nonPositionedInlineLevel,C.label=15;case 15:return o<c.length?(f=c[o],[4,this.renderStack(f)]):[3,18];case 16:C.sent(),C.label=17;case 17:return o++,[3,15];case 18:g=0,u=r.inlineLevel,C.label=19;case 19:return g<u.length?(f=u[g],[4,this.renderNode(f)]):[3,22];case 20:C.sent(),C.label=21;case 21:return g++,[3,19];case 22:l=0,Q=r.zeroOrAutoZIndexOrTransformedOrOpacity,C.label=23;case 23:return l<Q.length?(f=Q[l],[4,this.renderStack(f)]):[3,26];case 24:C.sent(),C.label=25;case 25:return l++,[3,23];case 26:w=0,p=r.positiveZIndex,C.label=27;case 27:return w<p.length?(f=p[w],[4,this.renderStack(f)]):[3,30];case 28:C.sent(),C.label=29;case 29:return w++,[3,27];case 30:return[2]}})})},A.prototype.mask=function(r){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(r.slice(0).reverse()),this.ctx.closePath()},A.prototype.path=function(r){this.ctx.beginPath(),this.formatPath(r),this.ctx.closePath()},A.prototype.formatPath=function(r){var t=this;r.forEach(function(n,B){var s=AA(n)?n.start:n;B===0?t.ctx.moveTo(s.x,s.y):t.ctx.lineTo(s.x,s.y),AA(n)&&t.ctx.bezierCurveTo(n.startControl.x,n.startControl.y,n.endControl.x,n.endControl.y,n.end.x,n.end.y)})},A.prototype.renderRepeat=function(r,t,n,B){this.path(r),this.ctx.fillStyle=t,this.ctx.translate(n,B),this.ctx.fill(),this.ctx.translate(-n,-B)},A.prototype.resizeImage=function(r,t,n){var B;if(r.width===t&&r.height===n)return r;var s=(B=this.canvas.ownerDocument)!==null&&B!==void 0?B:document,a=s.createElement("canvas");a.width=Math.max(1,t),a.height=Math.max(1,n);var i=a.getContext("2d");return i.drawImage(r,0,0,r.width,r.height,0,0,t,n),a},A.prototype.renderBackgroundImage=function(r){return Y(this,void 0,void 0,function(){var t,n,B,s,a,i;return J(this,function(o){switch(o.label){case 0:t=r.styles.backgroundImage.length-1,n=function(c){var g,u,l,L,W,Z,m,P,y,Q,L,W,Z,m,P,w,p,f,C,h,F,d,U,v,y,I,L,O,V,m,P,fA,W,Z,KA,BA,CA,LA,bA,cA,DA,gA;return J(this,function(RA){switch(RA.label){case 0:if(c.type!==0)return[3,5];g=void 0,u=c.url,RA.label=1;case 1:return RA.trys.push([1,3,,4]),[4,B.context.cache.match(u)];case 2:return g=RA.sent(),[3,4];case 3:return RA.sent(),B.context.logger.error("Error loading background-image "+u),[3,4];case 4:return g&&(l=Wt(r,t,[g.width,g.height,g.width/g.height]),L=l[0],W=l[1],Z=l[2],m=l[3],P=l[4],y=B.ctx.createPattern(B.resizeImage(g,m,P),"repeat"),B.renderRepeat(L,y,W,Z)),[3,6];case 5:Ba(c)?(Q=Wt(r,t,[null,null,null]),L=Q[0],W=Q[1],Z=Q[2],m=Q[3],P=Q[4],w=Aa(c.angle,m,P),p=w[0],f=w[1],C=w[2],h=w[3],F=w[4],d=document.createElement("canvas"),d.width=m,d.height=P,U=d.getContext("2d"),v=U.createLinearGradient(f,h,C,F),Bn(c.stops,p).forEach(function(ee){return v.addColorStop(ee.stop,N(ee.color))}),U.fillStyle=v,U.fillRect(0,0,m,P),m>0&&P>0&&(y=B.ctx.createPattern(d,"repeat"),B.renderRepeat(L,y,W,Z))):sa(c)&&(I=Wt(r,t,[null,null,null]),L=I[0],O=I[1],V=I[2],m=I[3],P=I[4],fA=c.position.length===0?[mr]:c.position,W=T(fA[0],m),Z=T(fA[fA.length-1],P),KA=ea(c,W,Z,m,P),BA=KA[0],CA=KA[1],BA>0&&CA>0&&(LA=B.ctx.createRadialGradient(O+W,V+Z,0,O+W,V+Z,BA),Bn(c.stops,BA*2).forEach(function(ee){return LA.addColorStop(ee.stop,N(ee.color))}),B.path(L),B.ctx.fillStyle=LA,BA!==CA?(bA=r.bounds.left+.5*r.bounds.width,cA=r.bounds.top+.5*r.bounds.height,DA=CA/BA,gA=1/DA,B.ctx.save(),B.ctx.translate(bA,cA),B.ctx.transform(1,0,0,DA,0,0),B.ctx.translate(-bA,-cA),B.ctx.fillRect(O,gA*(V-cA)+cA,m,P*gA),B.ctx.restore()):B.ctx.fill())),RA.label=6;case 6:return t--,[2]}})},B=this,s=0,a=r.styles.backgroundImage.slice(0).reverse(),o.label=1;case 1:return s<a.length?(i=a[s],[5,n(i)]):[3,4];case 2:o.sent(),o.label=3;case 3:return s++,[3,1];case 4:return[2]}})})},A.prototype.renderSolidBorder=function(r,t,n){return Y(this,void 0,void 0,function(){return J(this,function(B){return this.path(On(n,t)),this.ctx.fillStyle=N(r),this.ctx.fill(),[2]})})},A.prototype.renderDoubleBorder=function(r,t,n,B){return Y(this,void 0,void 0,function(){var s,a;return J(this,function(i){switch(i.label){case 0:return t<3?[4,this.renderSolidBorder(r,n,B)]:[3,2];case 1:return i.sent(),[2];case 2:return s=cg(B,n),this.path(s),this.ctx.fillStyle=N(r),this.ctx.fill(),a=gg(B,n),this.path(a),this.ctx.fill(),[2]}})})},A.prototype.renderNodeBackgroundAndBorders=function(r){return Y(this,void 0,void 0,function(){var t,n,B,s,a,i,o,c,g=this;return J(this,function(u){switch(u.label){case 0:return this.applyEffects(r.getEffects(2)),t=r.container.styles,n=!vA(t.backgroundColor)||t.backgroundImage.length,B=[{style:t.borderTopStyle,color:t.borderTopColor,width:t.borderTopWidth},{style:t.borderRightStyle,color:t.borderRightColor,width:t.borderRightWidth},{style:t.borderBottomStyle,color:t.borderBottomColor,width:t.borderBottomWidth},{style:t.borderLeftStyle,color:t.borderLeftColor,width:t.borderLeftWidth}],s=Eg(kA(t.backgroundClip,0),r.curves),n||t.boxShadow.length?(this.ctx.save(),this.path(s),this.ctx.clip(),vA(t.backgroundColor)||(this.ctx.fillStyle=N(t.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(r.container)]):[3,2];case 1:u.sent(),this.ctx.restore(),t.boxShadow.slice(0).reverse().forEach(function(l){g.ctx.save();var Q=at(r.curves),w=l.inset?0:Fg,p=ag(Q,-w+(l.inset?1:-1)*l.spread.number,(l.inset?1:-1)*l.spread.number,l.spread.number*(l.inset?-2:2),l.spread.number*(l.inset?-2:2));l.inset?(g.path(Q),g.ctx.clip(),g.mask(p)):(g.mask(Q),g.ctx.clip(),g.path(p)),g.ctx.shadowOffsetX=l.offsetX.number+w,g.ctx.shadowOffsetY=l.offsetY.number,g.ctx.shadowColor=N(l.color),g.ctx.shadowBlur=l.blur.number,g.ctx.fillStyle=l.inset?N(l.color):"rgba(0,0,0,1)",g.ctx.fill(),g.ctx.restore()}),u.label=2;case 2:a=0,i=0,o=B,u.label=3;case 3:return i<o.length?(c=o[i],c.style!==0&&!vA(c.color)&&c.width>0?c.style!==2?[3,5]:[4,this.renderDashedDottedBorder(c.color,c.width,a,r.curves,2)]:[3,11]):[3,13];case 4:return u.sent(),[3,11];case 5:return c.style!==3?[3,7]:[4,this.renderDashedDottedBorder(c.color,c.width,a,r.curves,3)];case 6:return u.sent(),[3,11];case 7:return c.style!==4?[3,9]:[4,this.renderDoubleBorder(c.color,c.width,a,r.curves)];case 8:return u.sent(),[3,11];case 9:return[4,this.renderSolidBorder(c.color,a,r.curves)];case 10:u.sent(),u.label=11;case 11:a++,u.label=12;case 12:return i++,[3,3];case 13:return[2]}})})},A.prototype.renderDashedDottedBorder=function(r,t,n,B,s){return Y(this,void 0,void 0,function(){var a,i,o,c,g,u,l,Q,w,p,f,C,h,F,d,U,d,U;return J(this,function(v){return this.ctx.save(),a=ug(B,n),i=On(B,n),s===2&&(this.path(i),this.ctx.clip()),AA(i[0])?(o=i[0].start.x,c=i[0].start.y):(o=i[0].x,c=i[0].y),AA(i[1])?(g=i[1].end.x,u=i[1].end.y):(g=i[1].x,u=i[1].y),n===0||n===2?l=Math.abs(o-g):l=Math.abs(c-u),this.ctx.beginPath(),s===3?this.formatPath(a):this.formatPath(i.slice(0,2)),Q=t<3?t*3:t*2,w=t<3?t*2:t,s===3&&(Q=t,w=t),p=!0,l<=Q*2?p=!1:l<=Q*2+w?(f=l/(2*Q+w),Q*=f,w*=f):(C=Math.floor((l+w)/(Q+w)),h=(l-C*Q)/(C-1),F=(l-(C+1)*Q)/C,w=F<=0||Math.abs(w-h)<Math.abs(w-F)?h:F),p&&(s===3?this.ctx.setLineDash([0,Q+w]):this.ctx.setLineDash([Q,w])),s===3?(this.ctx.lineCap="round",this.ctx.lineWidth=t):this.ctx.lineWidth=t*2+1.1,this.ctx.strokeStyle=N(r),this.ctx.stroke(),this.ctx.setLineDash([]),s===2&&(AA(i[0])&&(d=i[3],U=i[0],this.ctx.beginPath(),this.formatPath([new E(d.end.x,d.end.y),new E(U.start.x,U.start.y)]),this.ctx.stroke()),AA(i[1])&&(d=i[1],U=i[2],this.ctx.beginPath(),this.formatPath([new E(d.end.x,d.end.y),new E(U.start.x,U.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},A.prototype.render=function(r){return Y(this,void 0,void 0,function(){var t;return J(this,function(n){switch(n.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=N(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),t=og(r),[4,this.renderStack(t)];case 1:return n.sent(),this.applyEffects([]),[2,this.canvas]}})})},A}(XB),dg=function(e){return e instanceof yB||e instanceof vB?!0:e instanceof Dr&&e.type!==Bt&&e.type!==nt},Eg=function(e,A){switch(e){case 0:return at(A);case 2:return rg(A);case 1:default:return ot(A)}},Hg=function(e){switch(e){case 1:return"center";case 2:return"right";case 0:default:return"left"}},pg=["-apple-system","system-ui"],Ig=function(e){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?e.filter(function(A){return pg.indexOf(A)===-1}):e},vg=function(e){nA(A,e);function A(r,t){var n=e.call(this,r,t)||this;return n.canvas=t.canvas?t.canvas:document.createElement("canvas"),n.ctx=n.canvas.getContext("2d"),n.options=t,n.canvas.width=Math.floor(t.width*t.scale),n.canvas.height=Math.floor(t.height*t.scale),n.canvas.style.width=t.width+"px",n.canvas.style.height=t.height+"px",n.ctx.scale(n.options.scale,n.options.scale),n.ctx.translate(-t.x,-t.y),n.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+t.width+"x"+t.height+" at "+t.x+","+t.y+") with scale "+t.scale),n}return A.prototype.render=function(r){return Y(this,void 0,void 0,function(){var t,n;return J(this,function(B){switch(B.label){case 0:return t=fr(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,r),[4,yg(t)];case 1:return n=B.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=N(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(n,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},A}(XB),yg=function(e){return new Promise(function(A,r){var t=new Image;t.onload=function(){A(t)},t.onerror=r,t.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(e))})},mg=function(){function e(A){var r=A.id,t=A.enabled;this.id=r,this.enabled=t,this.start=Date.now()}return e.prototype.debug=function(){for(var A=[],r=0;r<arguments.length;r++)A[r]=arguments[r];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,ve([this.id,this.getTime()+"ms"],A)):this.info.apply(this,A))},e.prototype.getTime=function(){return Date.now()-this.start},e.prototype.info=function(){for(var A=[],r=0;r<arguments.length;r++)A[r]=arguments[r];this.enabled&&typeof window!="undefined"&&window.console&&typeof console.info=="function"&&console.info.apply(console,ve([this.id,this.getTime()+"ms"],A))},e.prototype.warn=function(){for(var A=[],r=0;r<arguments.length;r++)A[r]=arguments[r];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,ve([this.id,this.getTime()+"ms"],A)):this.info.apply(this,A))},e.prototype.error=function(){for(var A=[],r=0;r<arguments.length;r++)A[r]=arguments[r];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.error=="function"?console.error.apply(console,ve([this.id,this.getTime()+"ms"],A)):this.info.apply(this,A))},e.instances={},e}(),Kg=function(){function e(A,r){var t;this.windowBounds=r,this.instanceName="#"+e.instanceCount++,this.logger=new mg({id:this.instanceName,enabled:A.logging}),this.cache=(t=A.cache)!==null&&t!==void 0?t:new Zc(this,A)}return e.instanceCount=1,e}(),hu=function(e,A){return A===void 0&&(A={}),Lg(e,A)};typeof window!="undefined"&&RB.setContext(window);var Lg=function(e,A){return Y(void 0,void 0,void 0,function(){var r,t,n,B,s,a,i,o,c,g,u,l,Q,w,p,f,C,h,F,d,v,U,v,y,I,L,O,V,m,P,fA,W,Z,KA,BA,CA,LA,bA,cA,DA;return J(this,function(gA){switch(gA.label){case 0:if(!e||typeof e!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(r=e.ownerDocument,!r)throw new Error("Element is not attached to a Document");if(t=r.defaultView,!t)throw new Error("Document is not attached to a Window");return n={allowTaint:(y=A.allowTaint)!==null&&y!==void 0?y:!1,imageTimeout:(I=A.imageTimeout)!==null&&I!==void 0?I:15e3,proxy:A.proxy,useCORS:(L=A.useCORS)!==null&&L!==void 0?L:!1},B=er({logging:(O=A.logging)!==null&&O!==void 0?O:!0,cache:A.cache},n),s={windowWidth:(V=A.windowWidth)!==null&&V!==void 0?V:t.innerWidth,windowHeight:(m=A.windowHeight)!==null&&m!==void 0?m:t.innerHeight,scrollX:(P=A.scrollX)!==null&&P!==void 0?P:t.pageXOffset,scrollY:(fA=A.scrollY)!==null&&fA!==void 0?fA:t.pageYOffset},a=new wA(s.scrollX,s.scrollY,s.windowWidth,s.windowHeight),i=new Kg(B,a),o=(W=A.foreignObjectRendering)!==null&&W!==void 0?W:!1,c={allowTaint:(Z=A.allowTaint)!==null&&Z!==void 0?Z:!1,onclone:A.onclone,ignoreElements:A.ignoreElements,inlineImages:o,copyStyles:o},i.logger.debug("Starting document clone with size "+a.width+"x"+a.height+" scrolled to "+-a.left+","+-a.top),g=new Sn(i,e,c),u=g.clonedReferenceElement,u?[4,g.toIFrame(r,a)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return l=gA.sent(),Q=Tr(u)||Dc(u)?is(u.ownerDocument):Qt(i,u),w=Q.width,p=Q.height,f=Q.left,C=Q.top,h=bg(i,u,A.backgroundColor),F={canvas:A.canvas,backgroundColor:h,scale:(BA=(KA=A.scale)!==null&&KA!==void 0?KA:t.devicePixelRatio)!==null&&BA!==void 0?BA:1,x:((CA=A.x)!==null&&CA!==void 0?CA:0)+f,y:((LA=A.y)!==null&&LA!==void 0?LA:0)+C,width:(bA=A.width)!==null&&bA!==void 0?bA:Math.ceil(w),height:(cA=A.height)!==null&&cA!==void 0?cA:Math.ceil(p)},o?(i.logger.debug("Document cloned, using foreign object rendering"),v=new vg(i,F),[4,v.render(u)]):[3,3];case 2:return d=gA.sent(),[3,5];case 3:return i.logger.debug("Document cloned, element located at "+f+","+C+" with size "+w+"x"+p+" using computed rendering"),i.logger.debug("Starting DOM parsing"),U=LB(i,u),h===U.styles.backgroundColor&&(U.styles.backgroundColor=lA.TRANSPARENT),i.logger.debug("Starting renderer for element at "+F.x+","+F.y+" with size "+F.width+"x"+F.height),v=new hg(i,F),[4,v.render(U)];case 4:d=gA.sent(),gA.label=5;case 5:return(!((DA=A.removeContainer)!==null&&DA!==void 0)||DA)&&(Sn.destroy(l)||i.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),i.logger.debug("Finished rendering"),[2,d]}})})},bg=function(e,A,r){var t=A.ownerDocument,n=t.documentElement?le(e,getComputedStyle(t.documentElement).backgroundColor):lA.TRANSPARENT,B=t.body?le(e,getComputedStyle(t.body).backgroundColor):lA.TRANSPARENT,s=typeof r=="string"?le(e,r):r===null?lA.TRANSPARENT:4294967295;return A===t.documentElement?vA(n)?vA(B)?s:B:n:s},du="./assets/icon_logo.d4268eb2.png",Ht={},Dg=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},JB={},j={};let Sr;const Tg=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];j.getSymbolSize=function(A){if(!A)throw new Error('"version" cannot be null or undefined');if(A<1||A>40)throw new Error('"version" should be in range from 1 to 40');return A*4+17};j.getSymbolTotalCodewords=function(A){return Tg[A]};j.getBCHDigit=function(e){let A=0;for(;e!==0;)A++,e>>>=1;return A};j.setToSJISFunction=function(A){if(typeof A!="function")throw new Error('"toSJISFunc" is not a valid function.');Sr=A};j.isKanjiModeEnabled=function(){return typeof Sr!="undefined"};j.toSJIS=function(A){return Sr(A)};var pt={};(function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function A(r){if(typeof r!="string")throw new Error("Param is not a string");switch(r.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+r)}}e.isValid=function(t){return t&&typeof t.bit!="undefined"&&t.bit>=0&&t.bit<4},e.from=function(t,n){if(e.isValid(t))return t;try{return A(t)}catch{return n}}})(pt);function kB(){this.buffer=[],this.length=0}kB.prototype={get:function(e){const A=Math.floor(e/8);return(this.buffer[A]>>>7-e%8&1)===1},put:function(e,A){for(let r=0;r<A;r++)this.putBit((e>>>A-r-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(e){const A=Math.floor(this.length/8);this.buffer.length<=A&&this.buffer.push(0),e&&(this.buffer[A]|=128>>>this.length%8),this.length++}};var Sg=kB;function Ie(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}Ie.prototype.set=function(e,A,r,t){const n=e*this.size+A;this.data[n]=r,t&&(this.reservedBit[n]=!0)};Ie.prototype.get=function(e,A){return this.data[e*this.size+A]};Ie.prototype.xor=function(e,A,r){this.data[e*this.size+A]^=r};Ie.prototype.isReserved=function(e,A){return this.reservedBit[e*this.size+A]};var xg=Ie,YB={};(function(e){const A=j.getSymbolSize;e.getRowColCoords=function(t){if(t===1)return[];const n=Math.floor(t/7)+2,B=A(t),s=B===145?26:Math.ceil((B-13)/(2*n-2))*2,a=[B-7];for(let i=1;i<n-1;i++)a[i]=a[i-1]-s;return a.push(6),a.reverse()},e.getPositions=function(t){const n=[],B=e.getRowColCoords(t),s=B.length;for(let a=0;a<s;a++)for(let i=0;i<s;i++)a===0&&i===0||a===0&&i===s-1||a===s-1&&i===0||n.push([B[a],B[i]]);return n}})(YB);var WB={};const Mg=j.getSymbolSize,Gn=7;WB.getPositions=function(A){const r=Mg(A);return[[0,0],[r-Gn,0],[0,r-Gn]]};var ZB={};(function(e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const A={N1:3,N2:3,N3:40,N4:10};e.isValid=function(n){return n!=null&&n!==""&&!isNaN(n)&&n>=0&&n<=7},e.from=function(n){return e.isValid(n)?parseInt(n,10):void 0},e.getPenaltyN1=function(n){const B=n.size;let s=0,a=0,i=0,o=null,c=null;for(let g=0;g<B;g++){a=i=0,o=c=null;for(let u=0;u<B;u++){let l=n.get(g,u);l===o?a++:(a>=5&&(s+=A.N1+(a-5)),o=l,a=1),l=n.get(u,g),l===c?i++:(i>=5&&(s+=A.N1+(i-5)),c=l,i=1)}a>=5&&(s+=A.N1+(a-5)),i>=5&&(s+=A.N1+(i-5))}return s},e.getPenaltyN2=function(n){const B=n.size;let s=0;for(let a=0;a<B-1;a++)for(let i=0;i<B-1;i++){const o=n.get(a,i)+n.get(a,i+1)+n.get(a+1,i)+n.get(a+1,i+1);(o===4||o===0)&&s++}return s*A.N2},e.getPenaltyN3=function(n){const B=n.size;let s=0,a=0,i=0;for(let o=0;o<B;o++){a=i=0;for(let c=0;c<B;c++)a=a<<1&2047|n.get(o,c),c>=10&&(a===1488||a===93)&&s++,i=i<<1&2047|n.get(c,o),c>=10&&(i===1488||i===93)&&s++}return s*A.N3},e.getPenaltyN4=function(n){let B=0;const s=n.data.length;for(let i=0;i<s;i++)B+=n.data[i];return Math.abs(Math.ceil(B*100/s/5)-10)*A.N4};function r(t,n,B){switch(t){case e.Patterns.PATTERN000:return(n+B)%2===0;case e.Patterns.PATTERN001:return n%2===0;case e.Patterns.PATTERN010:return B%3===0;case e.Patterns.PATTERN011:return(n+B)%3===0;case e.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(B/3))%2===0;case e.Patterns.PATTERN101:return n*B%2+n*B%3===0;case e.Patterns.PATTERN110:return(n*B%2+n*B%3)%2===0;case e.Patterns.PATTERN111:return(n*B%3+(n+B)%2)%2===0;default:throw new Error("bad maskPattern:"+t)}}e.applyMask=function(n,B){const s=B.size;for(let a=0;a<s;a++)for(let i=0;i<s;i++)B.isReserved(i,a)||B.xor(i,a,r(n,i,a))},e.getBestMask=function(n,B){const s=Object.keys(e.Patterns).length;let a=0,i=1/0;for(let o=0;o<s;o++){B(o),e.applyMask(o,n);const c=e.getPenaltyN1(n)+e.getPenaltyN2(n)+e.getPenaltyN3(n)+e.getPenaltyN4(n);e.applyMask(o,n),c<i&&(i=c,a=o)}return a}})(ZB);var It={};const pA=pt,Ze=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],ze=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];It.getBlocksCount=function(A,r){switch(r){case pA.L:return Ze[(A-1)*4+0];case pA.M:return Ze[(A-1)*4+1];case pA.Q:return Ze[(A-1)*4+2];case pA.H:return Ze[(A-1)*4+3];default:return}};It.getTotalCodewordsCount=function(A,r){switch(r){case pA.L:return ze[(A-1)*4+0];case pA.M:return ze[(A-1)*4+1];case pA.Q:return ze[(A-1)*4+2];case pA.H:return ze[(A-1)*4+3];default:return}};var zB={},vt={};const Ue=new Uint8Array(512),gt=new Uint8Array(256);(function(){let A=1;for(let r=0;r<255;r++)Ue[r]=A,gt[A]=r,A<<=1,A&256&&(A^=285);for(let r=255;r<512;r++)Ue[r]=Ue[r-255]})();vt.log=function(A){if(A<1)throw new Error("log("+A+")");return gt[A]};vt.exp=function(A){return Ue[A]};vt.mul=function(A,r){return A===0||r===0?0:Ue[gt[A]+gt[r]]};(function(e){const A=vt;e.mul=function(t,n){const B=new Uint8Array(t.length+n.length-1);for(let s=0;s<t.length;s++)for(let a=0;a<n.length;a++)B[s+a]^=A.mul(t[s],n[a]);return B},e.mod=function(t,n){let B=new Uint8Array(t);for(;B.length-n.length>=0;){const s=B[0];for(let i=0;i<n.length;i++)B[i]^=A.mul(n[i],s);let a=0;for(;a<B.length&&B[a]===0;)a++;B=B.slice(a)}return B},e.generateECPolynomial=function(t){let n=new Uint8Array([1]);for(let B=0;B<t;B++)n=e.mul(n,new Uint8Array([1,A.exp(B)]));return n}})(zB);const qB=zB;function xr(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}xr.prototype.initialize=function(A){this.degree=A,this.genPoly=qB.generateECPolynomial(this.degree)};xr.prototype.encode=function(A){if(!this.genPoly)throw new Error("Encoder not initialized");const r=new Uint8Array(A.length+this.degree);r.set(A);const t=qB.mod(r,this.genPoly),n=this.degree-t.length;if(n>0){const B=new Uint8Array(this.degree);return B.set(t,n),B}return t};var Og=xr,jB={},mA={},Mr={};Mr.isValid=function(A){return!isNaN(A)&&A>=1&&A<=40};var oA={};const $B="[0-9]+",Rg="[A-Z $%*+\\-./:]+";let Ee="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";Ee=Ee.replace(/u/g,"\\u");const Gg="(?:(?![A-Z0-9 $%*+\\-./:]|"+Ee+`)(?:.|[\r
]))+`;oA.KANJI=new RegExp(Ee,"g");oA.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");oA.BYTE=new RegExp(Gg,"g");oA.NUMERIC=new RegExp($B,"g");oA.ALPHANUMERIC=new RegExp(Rg,"g");const Ng=new RegExp("^"+Ee+"$"),Vg=new RegExp("^"+$B+"$"),Pg=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");oA.testKanji=function(A){return Ng.test(A)};oA.testNumeric=function(A){return Vg.test(A)};oA.testAlphanumeric=function(A){return Pg.test(A)};(function(e){const A=Mr,r=oA;e.NUMERIC={id:"Numeric",bit:1<<0,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:1<<1,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:1<<2,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:1<<3,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(B,s){if(!B.ccBits)throw new Error("Invalid mode: "+B);if(!A.isValid(s))throw new Error("Invalid version: "+s);return s>=1&&s<10?B.ccBits[0]:s<27?B.ccBits[1]:B.ccBits[2]},e.getBestModeForData=function(B){return r.testNumeric(B)?e.NUMERIC:r.testAlphanumeric(B)?e.ALPHANUMERIC:r.testKanji(B)?e.KANJI:e.BYTE},e.toString=function(B){if(B&&B.id)return B.id;throw new Error("Invalid mode")},e.isValid=function(B){return B&&B.bit&&B.ccBits};function t(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+n)}}e.from=function(B,s){if(e.isValid(B))return B;try{return t(B)}catch{return s}}})(mA);(function(e){const A=j,r=It,t=pt,n=mA,B=Mr,s=1<<12|1<<11|1<<10|1<<9|1<<8|1<<5|1<<2|1<<0,a=A.getBCHDigit(s);function i(u,l,Q){for(let w=1;w<=40;w++)if(l<=e.getCapacity(w,Q,u))return w}function o(u,l){return n.getCharCountIndicator(u,l)+4}function c(u,l){let Q=0;return u.forEach(function(w){Q+=o(w.mode,l)+w.getBitsLength()}),Q}function g(u,l){for(let Q=1;Q<=40;Q++)if(c(u,Q)<=e.getCapacity(Q,l,n.MIXED))return Q}e.from=function(l,Q){return B.isValid(l)?parseInt(l,10):Q},e.getCapacity=function(l,Q,w){if(!B.isValid(l))throw new Error("Invalid QR Code version");typeof w=="undefined"&&(w=n.BYTE);const p=A.getSymbolTotalCodewords(l),f=r.getTotalCodewordsCount(l,Q),C=(p-f)*8;if(w===n.MIXED)return C;const h=C-o(w,l);switch(w){case n.NUMERIC:return Math.floor(h/10*3);case n.ALPHANUMERIC:return Math.floor(h/11*2);case n.KANJI:return Math.floor(h/13);case n.BYTE:default:return Math.floor(h/8)}},e.getBestVersionForData=function(l,Q){let w;const p=t.from(Q,t.M);if(Array.isArray(l)){if(l.length>1)return g(l,p);if(l.length===0)return 1;w=l[0]}else w=l;return i(w.mode,w.getLength(),p)},e.getEncodedBits=function(l){if(!B.isValid(l)||l<7)throw new Error("Invalid QR Code version");let Q=l<<12;for(;A.getBCHDigit(Q)-a>=0;)Q^=s<<A.getBCHDigit(Q)-a;return l<<12|Q}})(jB);var As={};const Hr=j,es=1<<10|1<<8|1<<5|1<<4|1<<2|1<<1|1<<0,_g=1<<14|1<<12|1<<10|1<<4|1<<1,Nn=Hr.getBCHDigit(es);As.getEncodedBits=function(A,r){const t=A.bit<<3|r;let n=t<<10;for(;Hr.getBCHDigit(n)-Nn>=0;)n^=es<<Hr.getBCHDigit(n)-Nn;return(t<<10|n)^_g};var ts={};const Xg=mA;function zA(e){this.mode=Xg.NUMERIC,this.data=e.toString()}zA.getBitsLength=function(A){return 10*Math.floor(A/3)+(A%3?A%3*3+1:0)};zA.prototype.getLength=function(){return this.data.length};zA.prototype.getBitsLength=function(){return zA.getBitsLength(this.data.length)};zA.prototype.write=function(A){let r,t,n;for(r=0;r+3<=this.data.length;r+=3)t=this.data.substr(r,3),n=parseInt(t,10),A.put(n,10);const B=this.data.length-r;B>0&&(t=this.data.substr(r),n=parseInt(t,10),A.put(n,B*3+1))};var Jg=zA;const kg=mA,Zt=["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"," ","$","%","*","+","-",".","/",":"];function qA(e){this.mode=kg.ALPHANUMERIC,this.data=e}qA.getBitsLength=function(A){return 11*Math.floor(A/2)+6*(A%2)};qA.prototype.getLength=function(){return this.data.length};qA.prototype.getBitsLength=function(){return qA.getBitsLength(this.data.length)};qA.prototype.write=function(A){let r;for(r=0;r+2<=this.data.length;r+=2){let t=Zt.indexOf(this.data[r])*45;t+=Zt.indexOf(this.data[r+1]),A.put(t,11)}this.data.length%2&&A.put(Zt.indexOf(this.data[r]),6)};var Yg=qA,Wg=function(A){for(var r=[],t=A.length,n=0;n<t;n++){var B=A.charCodeAt(n);if(B>=55296&&B<=56319&&t>n+1){var s=A.charCodeAt(n+1);s>=56320&&s<=57343&&(B=(B-55296)*1024+s-56320+65536,n+=1)}if(B<128){r.push(B);continue}if(B<2048){r.push(B>>6|192),r.push(B&63|128);continue}if(B<55296||B>=57344&&B<65536){r.push(B>>12|224),r.push(B>>6&63|128),r.push(B&63|128);continue}if(B>=65536&&B<=1114111){r.push(B>>18|240),r.push(B>>12&63|128),r.push(B>>6&63|128),r.push(B&63|128);continue}r.push(239,191,189)}return new Uint8Array(r).buffer};const Zg=Wg,zg=mA;function jA(e){this.mode=zg.BYTE,typeof e=="string"&&(e=Zg(e)),this.data=new Uint8Array(e)}jA.getBitsLength=function(A){return A*8};jA.prototype.getLength=function(){return this.data.length};jA.prototype.getBitsLength=function(){return jA.getBitsLength(this.data.length)};jA.prototype.write=function(e){for(let A=0,r=this.data.length;A<r;A++)e.put(this.data[A],8)};var qg=jA;const jg=mA,$g=j;function $A(e){this.mode=jg.KANJI,this.data=e}$A.getBitsLength=function(A){return A*13};$A.prototype.getLength=function(){return this.data.length};$A.prototype.getBitsLength=function(){return $A.getBitsLength(this.data.length)};$A.prototype.write=function(e){let A;for(A=0;A<this.data.length;A++){let r=$g.toSJIS(this.data[A]);if(r>=33088&&r<=40956)r-=33088;else if(r>=57408&&r<=60351)r-=49472;else throw new Error("Invalid SJIS character: "+this.data[A]+`
Make sure your charset is UTF-8`);r=(r>>>8&255)*192+(r&255),e.put(r,13)}};var Au=$A,rs={exports:{}};(function(e){var A={single_source_shortest_paths:function(r,t,n){var B={},s={};s[t]=0;var a=A.PriorityQueue.make();a.push(t,0);for(var i,o,c,g,u,l,Q,w,p;!a.empty();){i=a.pop(),o=i.value,g=i.cost,u=r[o]||{};for(c in u)u.hasOwnProperty(c)&&(l=u[c],Q=g+l,w=s[c],p=typeof s[c]=="undefined",(p||w>Q)&&(s[c]=Q,a.push(c,Q),B[c]=o))}if(typeof n!="undefined"&&typeof s[n]=="undefined"){var f=["Could not find a path from ",t," to ",n,"."].join("");throw new Error(f)}return B},extract_shortest_path_from_predecessor_list:function(r,t){for(var n=[],B=t;B;)n.push(B),r[B],B=r[B];return n.reverse(),n},find_path:function(r,t,n){var B=A.single_source_shortest_paths(r,t,n);return A.extract_shortest_path_from_predecessor_list(B,n)},PriorityQueue:{make:function(r){var t=A.PriorityQueue,n={},B;r=r||{};for(B in t)t.hasOwnProperty(B)&&(n[B]=t[B]);return n.queue=[],n.sorter=r.sorter||t.default_sorter,n},default_sorter:function(r,t){return r.cost-t.cost},push:function(r,t){var n={value:r,cost:t};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};e.exports=A})(rs);(function(e){const A=mA,r=Jg,t=Yg,n=qg,B=Au,s=oA,a=j,i=rs.exports;function o(f){return unescape(encodeURIComponent(f)).length}function c(f,C,h){const F=[];let d;for(;(d=f.exec(h))!==null;)F.push({data:d[0],index:d.index,mode:C,length:d[0].length});return F}function g(f){const C=c(s.NUMERIC,A.NUMERIC,f),h=c(s.ALPHANUMERIC,A.ALPHANUMERIC,f);let F,d;return a.isKanjiModeEnabled()?(F=c(s.BYTE,A.BYTE,f),d=c(s.KANJI,A.KANJI,f)):(F=c(s.BYTE_KANJI,A.BYTE,f),d=[]),C.concat(h,F,d).sort(function(v,y){return v.index-y.index}).map(function(v){return{data:v.data,mode:v.mode,length:v.length}})}function u(f,C){switch(C){case A.NUMERIC:return r.getBitsLength(f);case A.ALPHANUMERIC:return t.getBitsLength(f);case A.KANJI:return B.getBitsLength(f);case A.BYTE:return n.getBitsLength(f)}}function l(f){return f.reduce(function(C,h){const F=C.length-1>=0?C[C.length-1]:null;return F&&F.mode===h.mode?(C[C.length-1].data+=h.data,C):(C.push(h),C)},[])}function Q(f){const C=[];for(let h=0;h<f.length;h++){const F=f[h];switch(F.mode){case A.NUMERIC:C.push([F,{data:F.data,mode:A.ALPHANUMERIC,length:F.length},{data:F.data,mode:A.BYTE,length:F.length}]);break;case A.ALPHANUMERIC:C.push([F,{data:F.data,mode:A.BYTE,length:F.length}]);break;case A.KANJI:C.push([F,{data:F.data,mode:A.BYTE,length:o(F.data)}]);break;case A.BYTE:C.push([{data:F.data,mode:A.BYTE,length:o(F.data)}])}}return C}function w(f,C){const h={},F={start:{}};let d=["start"];for(let U=0;U<f.length;U++){const v=f[U],y=[];for(let I=0;I<v.length;I++){const L=v[I],O=""+U+I;y.push(O),h[O]={node:L,lastCount:0},F[O]={};for(let V=0;V<d.length;V++){const m=d[V];h[m]&&h[m].node.mode===L.mode?(F[m][O]=u(h[m].lastCount+L.length,L.mode)-u(h[m].lastCount,L.mode),h[m].lastCount+=L.length):(h[m]&&(h[m].lastCount=L.length),F[m][O]=u(L.length,L.mode)+4+A.getCharCountIndicator(L.mode,C))}}d=y}for(let U=0;U<d.length;U++)F[d[U]].end=0;return{map:F,table:h}}function p(f,C){let h;const F=A.getBestModeForData(f);if(h=A.from(C,F),h!==A.BYTE&&h.bit<F.bit)throw new Error('"'+f+'" cannot be encoded with mode '+A.toString(h)+`.
 Suggested mode is: `+A.toString(F));switch(h===A.KANJI&&!a.isKanjiModeEnabled()&&(h=A.BYTE),h){case A.NUMERIC:return new r(f);case A.ALPHANUMERIC:return new t(f);case A.KANJI:return new B(f);case A.BYTE:return new n(f)}}e.fromArray=function(C){return C.reduce(function(h,F){return typeof F=="string"?h.push(p(F,null)):F.data&&h.push(p(F.data,F.mode)),h},[])},e.fromString=function(C,h){const F=g(C,a.isKanjiModeEnabled()),d=Q(F),U=w(d,h),v=i.find_path(U.map,"start","end"),y=[];for(let I=1;I<v.length-1;I++)y.push(U.table[v[I]].node);return e.fromArray(l(y))},e.rawSplit=function(C){return e.fromArray(g(C,a.isKanjiModeEnabled()))}})(ts);const yt=j,zt=pt,eu=Sg,tu=xg,ru=YB,nu=WB,pr=ZB,Ir=It,Bu=Og,ut=jB,su=As,iu=mA,qt=ts;function au(e,A){const r=e.size,t=nu.getPositions(A);for(let n=0;n<t.length;n++){const B=t[n][0],s=t[n][1];for(let a=-1;a<=7;a++)if(!(B+a<=-1||r<=B+a))for(let i=-1;i<=7;i++)s+i<=-1||r<=s+i||(a>=0&&a<=6&&(i===0||i===6)||i>=0&&i<=6&&(a===0||a===6)||a>=2&&a<=4&&i>=2&&i<=4?e.set(B+a,s+i,!0,!0):e.set(B+a,s+i,!1,!0))}}function ou(e){const A=e.size;for(let r=8;r<A-8;r++){const t=r%2===0;e.set(r,6,t,!0),e.set(6,r,t,!0)}}function cu(e,A){const r=ru.getPositions(A);for(let t=0;t<r.length;t++){const n=r[t][0],B=r[t][1];for(let s=-2;s<=2;s++)for(let a=-2;a<=2;a++)s===-2||s===2||a===-2||a===2||s===0&&a===0?e.set(n+s,B+a,!0,!0):e.set(n+s,B+a,!1,!0)}}function gu(e,A){const r=e.size,t=ut.getEncodedBits(A);let n,B,s;for(let a=0;a<18;a++)n=Math.floor(a/3),B=a%3+r-8-3,s=(t>>a&1)===1,e.set(n,B,s,!0),e.set(B,n,s,!0)}function jt(e,A,r){const t=e.size,n=su.getEncodedBits(A,r);let B,s;for(B=0;B<15;B++)s=(n>>B&1)===1,B<6?e.set(B,8,s,!0):B<8?e.set(B+1,8,s,!0):e.set(t-15+B,8,s,!0),B<8?e.set(8,t-B-1,s,!0):B<9?e.set(8,15-B-1+1,s,!0):e.set(8,15-B-1,s,!0);e.set(t-8,8,1,!0)}function uu(e,A){const r=e.size;let t=-1,n=r-1,B=7,s=0;for(let a=r-1;a>0;a-=2)for(a===6&&a--;;){for(let i=0;i<2;i++)if(!e.isReserved(n,a-i)){let o=!1;s<A.length&&(o=(A[s]>>>B&1)===1),e.set(n,a-i,o),B--,B===-1&&(s++,B=7)}if(n+=t,n<0||r<=n){n-=t,t=-t;break}}}function Qu(e,A,r){const t=new eu;r.forEach(function(i){t.put(i.mode.bit,4),t.put(i.getLength(),iu.getCharCountIndicator(i.mode,e)),i.write(t)});const n=yt.getSymbolTotalCodewords(e),B=Ir.getTotalCodewordsCount(e,A),s=(n-B)*8;for(t.getLengthInBits()+4<=s&&t.put(0,4);t.getLengthInBits()%8!==0;)t.putBit(0);const a=(s-t.getLengthInBits())/8;for(let i=0;i<a;i++)t.put(i%2?17:236,8);return lu(t,e,A)}function lu(e,A,r){const t=yt.getSymbolTotalCodewords(A),n=Ir.getTotalCodewordsCount(A,r),B=t-n,s=Ir.getBlocksCount(A,r),a=t%s,i=s-a,o=Math.floor(t/s),c=Math.floor(B/s),g=c+1,u=o-c,l=new Bu(u);let Q=0;const w=new Array(s),p=new Array(s);let f=0;const C=new Uint8Array(e.buffer);for(let v=0;v<s;v++){const y=v<i?c:g;w[v]=C.slice(Q,Q+y),p[v]=l.encode(w[v]),Q+=y,f=Math.max(f,y)}const h=new Uint8Array(t);let F=0,d,U;for(d=0;d<f;d++)for(U=0;U<s;U++)d<w[U].length&&(h[F++]=w[U][d]);for(d=0;d<u;d++)for(U=0;U<s;U++)h[F++]=p[U][d];return h}function wu(e,A,r,t){let n;if(Array.isArray(e))n=qt.fromArray(e);else if(typeof e=="string"){let o=A;if(!o){const c=qt.rawSplit(e);o=ut.getBestVersionForData(c,r)}n=qt.fromString(e,o||40)}else throw new Error("Invalid data");const B=ut.getBestVersionForData(n,r);if(!B)throw new Error("The amount of data is too big to be stored in a QR Code");if(!A)A=B;else if(A<B)throw new Error(`
The chosen QR Code version cannot contain this amount of data.
Minimum version required to store current data is: `+B+`.
`);const s=Qu(A,r,n),a=yt.getSymbolSize(A),i=new tu(a);return au(i,A),ou(i),cu(i,A),jt(i,r,0),A>=7&&gu(i,A),uu(i,s),isNaN(t)&&(t=pr.getBestMask(i,jt.bind(null,i,r))),pr.applyMask(t,i),jt(i,r,t),{modules:i,version:A,errorCorrectionLevel:r,maskPattern:t,segments:n}}JB.create=function(A,r){if(typeof A=="undefined"||A==="")throw new Error("No input text");let t=zt.M,n,B;return typeof r!="undefined"&&(t=zt.from(r.errorCorrectionLevel,zt.M),n=ut.from(r.version),B=pr.from(r.maskPattern),r.toSJISFunc&&yt.setToSJISFunction(r.toSJISFunc)),wu(A,n,t,B)};var ns={},Or={};(function(e){function A(r){if(typeof r=="number"&&(r=r.toString()),typeof r!="string")throw new Error("Color should be defined as hex string");let t=r.slice().replace("#","").split("");if(t.length<3||t.length===5||t.length>8)throw new Error("Invalid hex color: "+r);(t.length===3||t.length===4)&&(t=Array.prototype.concat.apply([],t.map(function(B){return[B,B]}))),t.length===6&&t.push("F","F");const n=parseInt(t.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:n&255,hex:"#"+t.slice(0,6).join("")}}e.getOptions=function(t){t||(t={}),t.color||(t.color={});const n=typeof t.margin=="undefined"||t.margin===null||t.margin<0?4:t.margin,B=t.width&&t.width>=21?t.width:void 0,s=t.scale||4;return{width:B,scale:B?4:s,margin:n,color:{dark:A(t.color.dark||"#000000ff"),light:A(t.color.light||"#ffffffff")},type:t.type,rendererOpts:t.rendererOpts||{}}},e.getScale=function(t,n){return n.width&&n.width>=t+n.margin*2?n.width/(t+n.margin*2):n.scale},e.getImageWidth=function(t,n){const B=e.getScale(t,n);return Math.floor((t+n.margin*2)*B)},e.qrToImageData=function(t,n,B){const s=n.modules.size,a=n.modules.data,i=e.getScale(s,B),o=Math.floor((s+B.margin*2)*i),c=B.margin*i,g=[B.color.light,B.color.dark];for(let u=0;u<o;u++)for(let l=0;l<o;l++){let Q=(u*o+l)*4,w=B.color.light;if(u>=c&&l>=c&&u<o-c&&l<o-c){const p=Math.floor((u-c)/i),f=Math.floor((l-c)/i);w=g[a[p*s+f]?1:0]}t[Q++]=w.r,t[Q++]=w.g,t[Q++]=w.b,t[Q]=w.a}}})(Or);(function(e){const A=Or;function r(n,B,s){n.clearRect(0,0,B.width,B.height),B.style||(B.style={}),B.height=s,B.width=s,B.style.height=s+"px",B.style.width=s+"px"}function t(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}e.render=function(B,s,a){let i=a,o=s;typeof i=="undefined"&&(!s||!s.getContext)&&(i=s,s=void 0),s||(o=t()),i=A.getOptions(i);const c=A.getImageWidth(B.modules.size,i),g=o.getContext("2d"),u=g.createImageData(c,c);return A.qrToImageData(u.data,B,i),r(g,o,c),g.putImageData(u,0,0),o},e.renderToDataURL=function(B,s,a){let i=a;typeof i=="undefined"&&(!s||!s.getContext)&&(i=s,s=void 0),i||(i={});const o=e.render(B,s,i),c=i.type||"image/png",g=i.rendererOpts||{};return o.toDataURL(c,g.quality)}})(ns);var Bs={};const fu=Or;function Vn(e,A){const r=e.a/255,t=A+'="'+e.hex+'"';return r<1?t+" "+A+'-opacity="'+r.toFixed(2).slice(1)+'"':t}function $t(e,A,r){let t=e+A;return typeof r!="undefined"&&(t+=" "+r),t}function Cu(e,A,r){let t="",n=0,B=!1,s=0;for(let a=0;a<e.length;a++){const i=Math.floor(a%A),o=Math.floor(a/A);!i&&!B&&(B=!0),e[a]?(s++,a>0&&i>0&&e[a-1]||(t+=B?$t("M",i+r,.5+o+r):$t("m",n,0),n=0,B=!1),i+1<A&&e[a+1]||(t+=$t("h",s),s=0)):n++}return t}Bs.render=function(A,r,t){const n=fu.getOptions(r),B=A.modules.size,s=A.modules.data,a=B+n.margin*2,i=n.color.light.a?"<path "+Vn(n.color.light,"fill")+' d="M0 0h'+a+"v"+a+'H0z"/>':"",o="<path "+Vn(n.color.dark,"stroke")+' d="'+Cu(s,B,n.margin)+'"/>',c='viewBox="0 0 '+a+" "+a+'"',g=n.width?'width="'+n.width+'" height="'+n.width+'" ':"",u='<svg xmlns="http://www.w3.org/2000/svg" '+g+c+' shape-rendering="crispEdges">'+i+o+`</svg>
`;return typeof t=="function"&&t(null,u),u};const Uu=Dg,vr=JB,ss=ns,Fu=Bs;function Rr(e,A,r,t,n){const B=[].slice.call(arguments,1),s=B.length,a=typeof B[s-1]=="function";if(!a&&!Uu())throw new Error("Callback required as last argument");if(a){if(s<2)throw new Error("Too few arguments provided");s===2?(n=r,r=A,A=t=void 0):s===3&&(A.getContext&&typeof n=="undefined"?(n=t,t=void 0):(n=t,t=r,r=A,A=void 0))}else{if(s<1)throw new Error("Too few arguments provided");return s===1?(r=A,A=t=void 0):s===2&&!A.getContext&&(t=r,r=A,A=void 0),new Promise(function(i,o){try{const c=vr.create(r,t);i(e(c,A,t))}catch(c){o(c)}})}try{const i=vr.create(r,t);n(null,e(i,A,t))}catch(i){n(i)}}Ht.create=vr.create;Ht.toCanvas=Rr.bind(null,ss.render);Ht.toDataURL=Rr.bind(null,ss.renderToDataURL);Ht.toString=Rr.bind(null,function(e,A,r){return Fu.render(e,r)});export{Ht as b,hu as h,du as i};
