@tonconnect/ui 2.3.0-beta.2 → 2.3.0-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).TON_CONNECT_UI={})}(this,function(e){"use strict";var t,n,r,o,i,a,s,l,c=Object.defineProperty,u=Object.defineProperties,d=Object.getOwnPropertyDescriptors,h=Object.getOwnPropertySymbols,f=Object.prototype.hasOwnProperty,p=Object.prototype.propertyIsEnumerable,g=(e,t,n)=>t in e?c(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,m=(e,t)=>{for(var n in t||(t={}))f.call(t,n)&&g(e,n,t[n]);if(h)for(var n of h(t))p.call(t,n)&&g(e,n,t[n]);return e},w=(e,t)=>u(e,d(t)),y=(e,t)=>{var n={};for(var r in e)f.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&h)for(var r of h(e))t.indexOf(r)<0&&p.call(e,r)&&(n[r]=e[r]);return n},v=(e,t,n)=>new Promise((r,o)=>{var i=e=>{try{s(n.next(e))}catch(br){o(br)}},a=e=>{try{s(n.throw(e))}catch(br){o(br)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(i,a);s((n=n.apply(e,t)).next())});function b(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function C(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var n=function e(){var n=!1;try{n=this instanceof e}catch(r){}return n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),n}var x,S,k,R,E={exports:{}};const A=b((x||(x=1,k=E.exports,R=function(){var e={};function t(e){if(!/^(?:[A-Za-z0-9+\/]{2}[A-Za-z0-9+\/]{2})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.test(e))throw new TypeError("invalid encoding")}return e.decodeUTF8=function(e){if("string"!=typeof e)throw new TypeError("expected string");var t,n=unescape(encodeURIComponent(e)),r=new Uint8Array(n.length);for(t=0;t<n.length;t++)r[t]=n.charCodeAt(t);return r},e.encodeUTF8=function(e){var t,n=[];for(t=0;t<e.length;t++)n.push(String.fromCharCode(e[t]));return decodeURIComponent(escape(n.join("")))},"undefined"==typeof atob?void 0!==Buffer.from?(e.encodeBase64=function(e){return Buffer.from(e).toString("base64")},e.decodeBase64=function(e){return t(e),new Uint8Array(Array.prototype.slice.call(Buffer.from(e,"base64"),0))}):(e.encodeBase64=function(e){return new Buffer(e).toString("base64")},e.decodeBase64=function(e){return t(e),new Uint8Array(Array.prototype.slice.call(new Buffer(e,"base64"),0))}):(e.encodeBase64=function(e){var t,n=[],r=e.length;for(t=0;t<r;t++)n.push(String.fromCharCode(e[t]));return btoa(n.join(""))},e.decodeBase64=function(e){t(e);var n,r=atob(e),o=new Uint8Array(r.length);for(n=0;n<r.length;n++)o[n]=r.charCodeAt(n);return o}),e},(S=E).exports?S.exports=R():(k.nacl||(k.nacl={}),k.nacl.util=R())),E.exports));function M(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var T={exports:{}};const _=C(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var O;var L=(O||(O=1,function(e){!function(e){var t=function(e){var t,n=new Float64Array(16);if(e)for(t=0;t<e.length;t++)n[t]=e[t];return n},n=function(){throw new Error("no PRNG")},r=new Uint8Array(16),o=new Uint8Array(32);o[0]=9;var i=t(),a=t([1]),s=t([56129,1]),l=t([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),c=t([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),u=t([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),d=t([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),h=t([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function f(e,t,n,r){e[t]=n>>24&255,e[t+1]=n>>16&255,e[t+2]=n>>8&255,e[t+3]=255&n,e[t+4]=r>>24&255,e[t+5]=r>>16&255,e[t+6]=r>>8&255,e[t+7]=255&r}function p(e,t,n,r,o){var i,a=0;for(i=0;i<o;i++)a|=e[t+i]^n[r+i];return(1&a-1>>>8)-1}function g(e,t,n,r){return p(e,t,n,r,16)}function m(e,t,n,r){return p(e,t,n,r,32)}function w(e,t,n,r){!function(e,t,n,r){for(var o,i=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,a=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,s=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,l=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,c=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,u=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,d=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,h=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,f=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,p=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,g=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,m=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,w=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,y=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,v=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,b=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,C=i,x=a,S=s,k=l,R=c,E=u,A=d,M=h,T=f,_=p,O=g,L=m,N=w,I=y,W=v,P=b,U=0;U<20;U+=2)C^=(o=(N^=(o=(T^=(o=(R^=(o=C+N|0)<<7|o>>>25)+C|0)<<9|o>>>23)+R|0)<<13|o>>>19)+T|0)<<18|o>>>14,E^=(o=(x^=(o=(I^=(o=(_^=(o=E+x|0)<<7|o>>>25)+E|0)<<9|o>>>23)+_|0)<<13|o>>>19)+I|0)<<18|o>>>14,O^=(o=(A^=(o=(S^=(o=(W^=(o=O+A|0)<<7|o>>>25)+O|0)<<9|o>>>23)+W|0)<<13|o>>>19)+S|0)<<18|o>>>14,P^=(o=(L^=(o=(M^=(o=(k^=(o=P+L|0)<<7|o>>>25)+P|0)<<9|o>>>23)+k|0)<<13|o>>>19)+M|0)<<18|o>>>14,C^=(o=(k^=(o=(S^=(o=(x^=(o=C+k|0)<<7|o>>>25)+C|0)<<9|o>>>23)+x|0)<<13|o>>>19)+S|0)<<18|o>>>14,E^=(o=(R^=(o=(M^=(o=(A^=(o=E+R|0)<<7|o>>>25)+E|0)<<9|o>>>23)+A|0)<<13|o>>>19)+M|0)<<18|o>>>14,O^=(o=(_^=(o=(T^=(o=(L^=(o=O+_|0)<<7|o>>>25)+O|0)<<9|o>>>23)+L|0)<<13|o>>>19)+T|0)<<18|o>>>14,P^=(o=(W^=(o=(I^=(o=(N^=(o=P+W|0)<<7|o>>>25)+P|0)<<9|o>>>23)+N|0)<<13|o>>>19)+I|0)<<18|o>>>14;C=C+i|0,x=x+a|0,S=S+s|0,k=k+l|0,R=R+c|0,E=E+u|0,A=A+d|0,M=M+h|0,T=T+f|0,_=_+p|0,O=O+g|0,L=L+m|0,N=N+w|0,I=I+y|0,W=W+v|0,P=P+b|0,e[0]=C>>>0&255,e[1]=C>>>8&255,e[2]=C>>>16&255,e[3]=C>>>24&255,e[4]=x>>>0&255,e[5]=x>>>8&255,e[6]=x>>>16&255,e[7]=x>>>24&255,e[8]=S>>>0&255,e[9]=S>>>8&255,e[10]=S>>>16&255,e[11]=S>>>24&255,e[12]=k>>>0&255,e[13]=k>>>8&255,e[14]=k>>>16&255,e[15]=k>>>24&255,e[16]=R>>>0&255,e[17]=R>>>8&255,e[18]=R>>>16&255,e[19]=R>>>24&255,e[20]=E>>>0&255,e[21]=E>>>8&255,e[22]=E>>>16&255,e[23]=E>>>24&255,e[24]=A>>>0&255,e[25]=A>>>8&255,e[26]=A>>>16&255,e[27]=A>>>24&255,e[28]=M>>>0&255,e[29]=M>>>8&255,e[30]=M>>>16&255,e[31]=M>>>24&255,e[32]=T>>>0&255,e[33]=T>>>8&255,e[34]=T>>>16&255,e[35]=T>>>24&255,e[36]=_>>>0&255,e[37]=_>>>8&255,e[38]=_>>>16&255,e[39]=_>>>24&255,e[40]=O>>>0&255,e[41]=O>>>8&255,e[42]=O>>>16&255,e[43]=O>>>24&255,e[44]=L>>>0&255,e[45]=L>>>8&255,e[46]=L>>>16&255,e[47]=L>>>24&255,e[48]=N>>>0&255,e[49]=N>>>8&255,e[50]=N>>>16&255,e[51]=N>>>24&255,e[52]=I>>>0&255,e[53]=I>>>8&255,e[54]=I>>>16&255,e[55]=I>>>24&255,e[56]=W>>>0&255,e[57]=W>>>8&255,e[58]=W>>>16&255,e[59]=W>>>24&255,e[60]=P>>>0&255,e[61]=P>>>8&255,e[62]=P>>>16&255,e[63]=P>>>24&255}(e,t,n,r)}function y(e,t,n,r){!function(e,t,n,r){for(var o,i=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,a=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,s=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,l=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,c=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,u=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,d=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,h=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,f=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,p=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,g=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,m=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,w=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,y=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,v=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,b=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,C=0;C<20;C+=2)i^=(o=(w^=(o=(f^=(o=(c^=(o=i+w|0)<<7|o>>>25)+i|0)<<9|o>>>23)+c|0)<<13|o>>>19)+f|0)<<18|o>>>14,u^=(o=(a^=(o=(y^=(o=(p^=(o=u+a|0)<<7|o>>>25)+u|0)<<9|o>>>23)+p|0)<<13|o>>>19)+y|0)<<18|o>>>14,g^=(o=(d^=(o=(s^=(o=(v^=(o=g+d|0)<<7|o>>>25)+g|0)<<9|o>>>23)+v|0)<<13|o>>>19)+s|0)<<18|o>>>14,b^=(o=(m^=(o=(h^=(o=(l^=(o=b+m|0)<<7|o>>>25)+b|0)<<9|o>>>23)+l|0)<<13|o>>>19)+h|0)<<18|o>>>14,i^=(o=(l^=(o=(s^=(o=(a^=(o=i+l|0)<<7|o>>>25)+i|0)<<9|o>>>23)+a|0)<<13|o>>>19)+s|0)<<18|o>>>14,u^=(o=(c^=(o=(h^=(o=(d^=(o=u+c|0)<<7|o>>>25)+u|0)<<9|o>>>23)+d|0)<<13|o>>>19)+h|0)<<18|o>>>14,g^=(o=(p^=(o=(f^=(o=(m^=(o=g+p|0)<<7|o>>>25)+g|0)<<9|o>>>23)+m|0)<<13|o>>>19)+f|0)<<18|o>>>14,b^=(o=(v^=(o=(y^=(o=(w^=(o=b+v|0)<<7|o>>>25)+b|0)<<9|o>>>23)+w|0)<<13|o>>>19)+y|0)<<18|o>>>14;e[0]=i>>>0&255,e[1]=i>>>8&255,e[2]=i>>>16&255,e[3]=i>>>24&255,e[4]=u>>>0&255,e[5]=u>>>8&255,e[6]=u>>>16&255,e[7]=u>>>24&255,e[8]=g>>>0&255,e[9]=g>>>8&255,e[10]=g>>>16&255,e[11]=g>>>24&255,e[12]=b>>>0&255,e[13]=b>>>8&255,e[14]=b>>>16&255,e[15]=b>>>24&255,e[16]=d>>>0&255,e[17]=d>>>8&255,e[18]=d>>>16&255,e[19]=d>>>24&255,e[20]=h>>>0&255,e[21]=h>>>8&255,e[22]=h>>>16&255,e[23]=h>>>24&255,e[24]=f>>>0&255,e[25]=f>>>8&255,e[26]=f>>>16&255,e[27]=f>>>24&255,e[28]=p>>>0&255,e[29]=p>>>8&255,e[30]=p>>>16&255,e[31]=p>>>24&255}(e,t,n,r)}var v=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function b(e,t,n,r,o,i,a){var s,l,c=new Uint8Array(16),u=new Uint8Array(64);for(l=0;l<16;l++)c[l]=0;for(l=0;l<8;l++)c[l]=i[l];for(;o>=64;){for(w(u,c,a,v),l=0;l<64;l++)e[t+l]=n[r+l]^u[l];for(s=1,l=8;l<16;l++)s=s+(255&c[l])|0,c[l]=255&s,s>>>=8;o-=64,t+=64,r+=64}if(o>0)for(w(u,c,a,v),l=0;l<o;l++)e[t+l]=n[r+l]^u[l];return 0}function C(e,t,n,r,o){var i,a,s=new Uint8Array(16),l=new Uint8Array(64);for(a=0;a<16;a++)s[a]=0;for(a=0;a<8;a++)s[a]=r[a];for(;n>=64;){for(w(l,s,o,v),a=0;a<64;a++)e[t+a]=l[a];for(i=1,a=8;a<16;a++)i=i+(255&s[a])|0,s[a]=255&i,i>>>=8;n-=64,t+=64}if(n>0)for(w(l,s,o,v),a=0;a<n;a++)e[t+a]=l[a];return 0}function x(e,t,n,r,o){var i=new Uint8Array(32);y(i,r,o,v);for(var a=new Uint8Array(8),s=0;s<8;s++)a[s]=r[s+16];return C(e,t,n,a,i)}function S(e,t,n,r,o,i,a){var s=new Uint8Array(32);y(s,i,a,v);for(var l=new Uint8Array(8),c=0;c<8;c++)l[c]=i[c+16];return b(e,t,n,r,o,l,s)}var k=function(e){var t,n,r,o,i,a,s,l;this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.leftover=0,this.fin=0,t=255&e[0]|(255&e[1])<<8,this.r[0]=8191&t,n=255&e[2]|(255&e[3])<<8,this.r[1]=8191&(t>>>13|n<<3),r=255&e[4]|(255&e[5])<<8,this.r[2]=7939&(n>>>10|r<<6),o=255&e[6]|(255&e[7])<<8,this.r[3]=8191&(r>>>7|o<<9),i=255&e[8]|(255&e[9])<<8,this.r[4]=255&(o>>>4|i<<12),this.r[5]=i>>>1&8190,a=255&e[10]|(255&e[11])<<8,this.r[6]=8191&(i>>>14|a<<2),s=255&e[12]|(255&e[13])<<8,this.r[7]=8065&(a>>>11|s<<5),l=255&e[14]|(255&e[15])<<8,this.r[8]=8191&(s>>>8|l<<8),this.r[9]=l>>>5&127,this.pad[0]=255&e[16]|(255&e[17])<<8,this.pad[1]=255&e[18]|(255&e[19])<<8,this.pad[2]=255&e[20]|(255&e[21])<<8,this.pad[3]=255&e[22]|(255&e[23])<<8,this.pad[4]=255&e[24]|(255&e[25])<<8,this.pad[5]=255&e[26]|(255&e[27])<<8,this.pad[6]=255&e[28]|(255&e[29])<<8,this.pad[7]=255&e[30]|(255&e[31])<<8};function R(e,t,n,r,o,i){var a=new k(i);return a.update(n,r,o),a.finish(e,t),0}function E(e,t,n,r,o,i){var a=new Uint8Array(16);return R(a,0,n,r,o,i),g(e,t,a,0)}function A(e,t,n,r,o){var i;if(n<32)return-1;for(S(e,0,t,0,n,r,o),R(e,16,e,32,n-32,e),i=0;i<16;i++)e[i]=0;return 0}function T(e,t,n,r,o){var i,a=new Uint8Array(32);if(n<32)return-1;if(x(a,0,32,r,o),0!==E(t,16,t,32,n-32,a))return-1;for(S(e,0,t,0,n,r,o),i=0;i<32;i++)e[i]=0;return 0}function O(e,t){var n;for(n=0;n<16;n++)e[n]=0|t[n]}function L(e){var t,n,r=1;for(t=0;t<16;t++)n=e[t]+r+65535,r=Math.floor(n/65536),e[t]=n-65536*r;e[0]+=r-1+37*(r-1)}function N(e,t,n){for(var r,o=~(n-1),i=0;i<16;i++)r=o&(e[i]^t[i]),e[i]^=r,t[i]^=r}function I(e,n){var r,o,i,a=t(),s=t();for(r=0;r<16;r++)s[r]=n[r];for(L(s),L(s),L(s),o=0;o<2;o++){for(a[0]=s[0]-65517,r=1;r<15;r++)a[r]=s[r]-65535-(a[r-1]>>16&1),a[r-1]&=65535;a[15]=s[15]-32767-(a[14]>>16&1),i=a[15]>>16&1,a[14]&=65535,N(s,a,1-i)}for(r=0;r<16;r++)e[2*r]=255&s[r],e[2*r+1]=s[r]>>8}function W(e,t){var n=new Uint8Array(32),r=new Uint8Array(32);return I(n,e),I(r,t),m(n,0,r,0)}function P(e){var t=new Uint8Array(32);return I(t,e),1&t[0]}function U(e,t){var n;for(n=0;n<16;n++)e[n]=t[2*n]+(t[2*n+1]<<8);e[15]&=32767}function D(e,t,n){for(var r=0;r<16;r++)e[r]=t[r]+n[r]}function j(e,t,n){for(var r=0;r<16;r++)e[r]=t[r]-n[r]}function B(e,t,n){var r,o,i=0,a=0,s=0,l=0,c=0,u=0,d=0,h=0,f=0,p=0,g=0,m=0,w=0,y=0,v=0,b=0,C=0,x=0,S=0,k=0,R=0,E=0,A=0,M=0,T=0,_=0,O=0,L=0,N=0,I=0,W=0,P=n[0],U=n[1],D=n[2],j=n[3],B=n[4],$=n[5],q=n[6],K=n[7],H=n[8],F=n[9],V=n[10],z=n[11],Z=n[12],G=n[13],Y=n[14],Q=n[15];i+=(r=t[0])*P,a+=r*U,s+=r*D,l+=r*j,c+=r*B,u+=r*$,d+=r*q,h+=r*K,f+=r*H,p+=r*F,g+=r*V,m+=r*z,w+=r*Z,y+=r*G,v+=r*Y,b+=r*Q,a+=(r=t[1])*P,s+=r*U,l+=r*D,c+=r*j,u+=r*B,d+=r*$,h+=r*q,f+=r*K,p+=r*H,g+=r*F,m+=r*V,w+=r*z,y+=r*Z,v+=r*G,b+=r*Y,C+=r*Q,s+=(r=t[2])*P,l+=r*U,c+=r*D,u+=r*j,d+=r*B,h+=r*$,f+=r*q,p+=r*K,g+=r*H,m+=r*F,w+=r*V,y+=r*z,v+=r*Z,b+=r*G,C+=r*Y,x+=r*Q,l+=(r=t[3])*P,c+=r*U,u+=r*D,d+=r*j,h+=r*B,f+=r*$,p+=r*q,g+=r*K,m+=r*H,w+=r*F,y+=r*V,v+=r*z,b+=r*Z,C+=r*G,x+=r*Y,S+=r*Q,c+=(r=t[4])*P,u+=r*U,d+=r*D,h+=r*j,f+=r*B,p+=r*$,g+=r*q,m+=r*K,w+=r*H,y+=r*F,v+=r*V,b+=r*z,C+=r*Z,x+=r*G,S+=r*Y,k+=r*Q,u+=(r=t[5])*P,d+=r*U,h+=r*D,f+=r*j,p+=r*B,g+=r*$,m+=r*q,w+=r*K,y+=r*H,v+=r*F,b+=r*V,C+=r*z,x+=r*Z,S+=r*G,k+=r*Y,R+=r*Q,d+=(r=t[6])*P,h+=r*U,f+=r*D,p+=r*j,g+=r*B,m+=r*$,w+=r*q,y+=r*K,v+=r*H,b+=r*F,C+=r*V,x+=r*z,S+=r*Z,k+=r*G,R+=r*Y,E+=r*Q,h+=(r=t[7])*P,f+=r*U,p+=r*D,g+=r*j,m+=r*B,w+=r*$,y+=r*q,v+=r*K,b+=r*H,C+=r*F,x+=r*V,S+=r*z,k+=r*Z,R+=r*G,E+=r*Y,A+=r*Q,f+=(r=t[8])*P,p+=r*U,g+=r*D,m+=r*j,w+=r*B,y+=r*$,v+=r*q,b+=r*K,C+=r*H,x+=r*F,S+=r*V,k+=r*z,R+=r*Z,E+=r*G,A+=r*Y,M+=r*Q,p+=(r=t[9])*P,g+=r*U,m+=r*D,w+=r*j,y+=r*B,v+=r*$,b+=r*q,C+=r*K,x+=r*H,S+=r*F,k+=r*V,R+=r*z,E+=r*Z,A+=r*G,M+=r*Y,T+=r*Q,g+=(r=t[10])*P,m+=r*U,w+=r*D,y+=r*j,v+=r*B,b+=r*$,C+=r*q,x+=r*K,S+=r*H,k+=r*F,R+=r*V,E+=r*z,A+=r*Z,M+=r*G,T+=r*Y,_+=r*Q,m+=(r=t[11])*P,w+=r*U,y+=r*D,v+=r*j,b+=r*B,C+=r*$,x+=r*q,S+=r*K,k+=r*H,R+=r*F,E+=r*V,A+=r*z,M+=r*Z,T+=r*G,_+=r*Y,O+=r*Q,w+=(r=t[12])*P,y+=r*U,v+=r*D,b+=r*j,C+=r*B,x+=r*$,S+=r*q,k+=r*K,R+=r*H,E+=r*F,A+=r*V,M+=r*z,T+=r*Z,_+=r*G,O+=r*Y,L+=r*Q,y+=(r=t[13])*P,v+=r*U,b+=r*D,C+=r*j,x+=r*B,S+=r*$,k+=r*q,R+=r*K,E+=r*H,A+=r*F,M+=r*V,T+=r*z,_+=r*Z,O+=r*G,L+=r*Y,N+=r*Q,v+=(r=t[14])*P,b+=r*U,C+=r*D,x+=r*j,S+=r*B,k+=r*$,R+=r*q,E+=r*K,A+=r*H,M+=r*F,T+=r*V,_+=r*z,O+=r*Z,L+=r*G,N+=r*Y,I+=r*Q,b+=(r=t[15])*P,a+=38*(x+=r*D),s+=38*(S+=r*j),l+=38*(k+=r*B),c+=38*(R+=r*$),u+=38*(E+=r*q),d+=38*(A+=r*K),h+=38*(M+=r*H),f+=38*(T+=r*F),p+=38*(_+=r*V),g+=38*(O+=r*z),m+=38*(L+=r*Z),w+=38*(N+=r*G),y+=38*(I+=r*Y),v+=38*(W+=r*Q),i=(r=(i+=38*(C+=r*U))+(o=1)+65535)-65536*(o=Math.floor(r/65536)),a=(r=a+o+65535)-65536*(o=Math.floor(r/65536)),s=(r=s+o+65535)-65536*(o=Math.floor(r/65536)),l=(r=l+o+65535)-65536*(o=Math.floor(r/65536)),c=(r=c+o+65535)-65536*(o=Math.floor(r/65536)),u=(r=u+o+65535)-65536*(o=Math.floor(r/65536)),d=(r=d+o+65535)-65536*(o=Math.floor(r/65536)),h=(r=h+o+65535)-65536*(o=Math.floor(r/65536)),f=(r=f+o+65535)-65536*(o=Math.floor(r/65536)),p=(r=p+o+65535)-65536*(o=Math.floor(r/65536)),g=(r=g+o+65535)-65536*(o=Math.floor(r/65536)),m=(r=m+o+65535)-65536*(o=Math.floor(r/65536)),w=(r=w+o+65535)-65536*(o=Math.floor(r/65536)),y=(r=y+o+65535)-65536*(o=Math.floor(r/65536)),v=(r=v+o+65535)-65536*(o=Math.floor(r/65536)),b=(r=b+o+65535)-65536*(o=Math.floor(r/65536)),i=(r=(i+=o-1+37*(o-1))+(o=1)+65535)-65536*(o=Math.floor(r/65536)),a=(r=a+o+65535)-65536*(o=Math.floor(r/65536)),s=(r=s+o+65535)-65536*(o=Math.floor(r/65536)),l=(r=l+o+65535)-65536*(o=Math.floor(r/65536)),c=(r=c+o+65535)-65536*(o=Math.floor(r/65536)),u=(r=u+o+65535)-65536*(o=Math.floor(r/65536)),d=(r=d+o+65535)-65536*(o=Math.floor(r/65536)),h=(r=h+o+65535)-65536*(o=Math.floor(r/65536)),f=(r=f+o+65535)-65536*(o=Math.floor(r/65536)),p=(r=p+o+65535)-65536*(o=Math.floor(r/65536)),g=(r=g+o+65535)-65536*(o=Math.floor(r/65536)),m=(r=m+o+65535)-65536*(o=Math.floor(r/65536)),w=(r=w+o+65535)-65536*(o=Math.floor(r/65536)),y=(r=y+o+65535)-65536*(o=Math.floor(r/65536)),v=(r=v+o+65535)-65536*(o=Math.floor(r/65536)),b=(r=b+o+65535)-65536*(o=Math.floor(r/65536)),i+=o-1+37*(o-1),e[0]=i,e[1]=a,e[2]=s,e[3]=l,e[4]=c,e[5]=u,e[6]=d,e[7]=h,e[8]=f,e[9]=p,e[10]=g,e[11]=m,e[12]=w,e[13]=y,e[14]=v,e[15]=b}function $(e,t){B(e,t,t)}function q(e,n){var r,o=t();for(r=0;r<16;r++)o[r]=n[r];for(r=253;r>=0;r--)$(o,o),2!==r&&4!==r&&B(o,o,n);for(r=0;r<16;r++)e[r]=o[r]}function K(e,n){var r,o=t();for(r=0;r<16;r++)o[r]=n[r];for(r=250;r>=0;r--)$(o,o),1!==r&&B(o,o,n);for(r=0;r<16;r++)e[r]=o[r]}function H(e,n,r){var o,i,a=new Uint8Array(32),l=new Float64Array(80),c=t(),u=t(),d=t(),h=t(),f=t(),p=t();for(i=0;i<31;i++)a[i]=n[i];for(a[31]=127&n[31]|64,a[0]&=248,U(l,r),i=0;i<16;i++)u[i]=l[i],h[i]=c[i]=d[i]=0;for(c[0]=h[0]=1,i=254;i>=0;--i)N(c,u,o=a[i>>>3]>>>(7&i)&1),N(d,h,o),D(f,c,d),j(c,c,d),D(d,u,h),j(u,u,h),$(h,f),$(p,c),B(c,d,c),B(d,u,f),D(f,c,d),j(c,c,d),$(u,c),j(d,h,p),B(c,d,s),D(c,c,h),B(d,d,c),B(c,h,p),B(h,u,l),$(u,f),N(c,u,o),N(d,h,o);for(i=0;i<16;i++)l[i+16]=c[i],l[i+32]=d[i],l[i+48]=u[i],l[i+64]=h[i];var g=l.subarray(32),m=l.subarray(16);return q(g,g),B(m,m,g),I(e,m),0}function F(e,t){return H(e,t,o)}function V(e,t){return n(t,32),F(e,t)}function z(e,t,n){var o=new Uint8Array(32);return H(o,n,t),y(e,r,o,v)}k.prototype.blocks=function(e,t,n){for(var r,o,i,a,s,l,c,u,d,h,f,p,g,m,w,y,v,b,C,x=this.fin?0:2048,S=this.h[0],k=this.h[1],R=this.h[2],E=this.h[3],A=this.h[4],M=this.h[5],T=this.h[6],_=this.h[7],O=this.h[8],L=this.h[9],N=this.r[0],I=this.r[1],W=this.r[2],P=this.r[3],U=this.r[4],D=this.r[5],j=this.r[6],B=this.r[7],$=this.r[8],q=this.r[9];n>=16;)h=d=0,h+=(S+=8191&(r=255&e[t+0]|(255&e[t+1])<<8))*N,h+=(k+=8191&(r>>>13|(o=255&e[t+2]|(255&e[t+3])<<8)<<3))*(5*q),h+=(R+=8191&(o>>>10|(i=255&e[t+4]|(255&e[t+5])<<8)<<6))*(5*$),h+=(E+=8191&(i>>>7|(a=255&e[t+6]|(255&e[t+7])<<8)<<9))*(5*B),d=(h+=(A+=8191&(a>>>4|(s=255&e[t+8]|(255&e[t+9])<<8)<<12))*(5*j))>>>13,h&=8191,h+=(M+=s>>>1&8191)*(5*D),h+=(T+=8191&(s>>>14|(l=255&e[t+10]|(255&e[t+11])<<8)<<2))*(5*U),h+=(_+=8191&(l>>>11|(c=255&e[t+12]|(255&e[t+13])<<8)<<5))*(5*P),h+=(O+=8191&(c>>>8|(u=255&e[t+14]|(255&e[t+15])<<8)<<8))*(5*W),f=d+=(h+=(L+=u>>>5|x)*(5*I))>>>13,f+=S*I,f+=k*N,f+=R*(5*q),f+=E*(5*$),d=(f+=A*(5*B))>>>13,f&=8191,f+=M*(5*j),f+=T*(5*D),f+=_*(5*U),f+=O*(5*P),d+=(f+=L*(5*W))>>>13,f&=8191,p=d,p+=S*W,p+=k*I,p+=R*N,p+=E*(5*q),d=(p+=A*(5*$))>>>13,p&=8191,p+=M*(5*B),p+=T*(5*j),p+=_*(5*D),p+=O*(5*U),g=d+=(p+=L*(5*P))>>>13,g+=S*P,g+=k*W,g+=R*I,g+=E*N,d=(g+=A*(5*q))>>>13,g&=8191,g+=M*(5*$),g+=T*(5*B),g+=_*(5*j),g+=O*(5*D),m=d+=(g+=L*(5*U))>>>13,m+=S*U,m+=k*P,m+=R*W,m+=E*I,d=(m+=A*N)>>>13,m&=8191,m+=M*(5*q),m+=T*(5*$),m+=_*(5*B),m+=O*(5*j),w=d+=(m+=L*(5*D))>>>13,w+=S*D,w+=k*U,w+=R*P,w+=E*W,d=(w+=A*I)>>>13,w&=8191,w+=M*N,w+=T*(5*q),w+=_*(5*$),w+=O*(5*B),y=d+=(w+=L*(5*j))>>>13,y+=S*j,y+=k*D,y+=R*U,y+=E*P,d=(y+=A*W)>>>13,y&=8191,y+=M*I,y+=T*N,y+=_*(5*q),y+=O*(5*$),v=d+=(y+=L*(5*B))>>>13,v+=S*B,v+=k*j,v+=R*D,v+=E*U,d=(v+=A*P)>>>13,v&=8191,v+=M*W,v+=T*I,v+=_*N,v+=O*(5*q),b=d+=(v+=L*(5*$))>>>13,b+=S*$,b+=k*B,b+=R*j,b+=E*D,d=(b+=A*U)>>>13,b&=8191,b+=M*P,b+=T*W,b+=_*I,b+=O*N,C=d+=(b+=L*(5*q))>>>13,C+=S*q,C+=k*$,C+=R*B,C+=E*j,d=(C+=A*D)>>>13,C&=8191,C+=M*U,C+=T*P,C+=_*W,C+=O*I,S=h=8191&(d=(d=((d+=(C+=L*N)>>>13)<<2)+d|0)+(h&=8191)|0),k=f+=d>>>=13,R=p&=8191,E=g&=8191,A=m&=8191,M=w&=8191,T=y&=8191,_=v&=8191,O=b&=8191,L=C&=8191,t+=16,n-=16;this.h[0]=S,this.h[1]=k,this.h[2]=R,this.h[3]=E,this.h[4]=A,this.h[5]=M,this.h[6]=T,this.h[7]=_,this.h[8]=O,this.h[9]=L},k.prototype.finish=function(e,t){var n,r,o,i,a=new Uint16Array(10);if(this.leftover){for(i=this.leftover,this.buffer[i++]=1;i<16;i++)this.buffer[i]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(n=this.h[1]>>>13,this.h[1]&=8191,i=2;i<10;i++)this.h[i]+=n,n=this.h[i]>>>13,this.h[i]&=8191;for(this.h[0]+=5*n,n=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=n,n=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=n,a[0]=this.h[0]+5,n=a[0]>>>13,a[0]&=8191,i=1;i<10;i++)a[i]=this.h[i]+n,n=a[i]>>>13,a[i]&=8191;for(a[9]-=8192,r=(1^n)-1,i=0;i<10;i++)a[i]&=r;for(r=~r,i=0;i<10;i++)this.h[i]=this.h[i]&r|a[i];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),o=this.h[0]+this.pad[0],this.h[0]=65535&o,i=1;i<8;i++)o=(this.h[i]+this.pad[i]|0)+(o>>>16)|0,this.h[i]=65535&o;e[t+0]=this.h[0]>>>0&255,e[t+1]=this.h[0]>>>8&255,e[t+2]=this.h[1]>>>0&255,e[t+3]=this.h[1]>>>8&255,e[t+4]=this.h[2]>>>0&255,e[t+5]=this.h[2]>>>8&255,e[t+6]=this.h[3]>>>0&255,e[t+7]=this.h[3]>>>8&255,e[t+8]=this.h[4]>>>0&255,e[t+9]=this.h[4]>>>8&255,e[t+10]=this.h[5]>>>0&255,e[t+11]=this.h[5]>>>8&255,e[t+12]=this.h[6]>>>0&255,e[t+13]=this.h[6]>>>8&255,e[t+14]=this.h[7]>>>0&255,e[t+15]=this.h[7]>>>8&255},k.prototype.update=function(e,t,n){var r,o;if(this.leftover){for((o=16-this.leftover)>n&&(o=n),r=0;r<o;r++)this.buffer[this.leftover+r]=e[t+r];if(n-=o,t+=o,this.leftover+=o,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(n>=16&&(o=n-n%16,this.blocks(e,t,o),t+=o,n-=o),n){for(r=0;r<n;r++)this.buffer[this.leftover+r]=e[t+r];this.leftover+=n}};var Z=A,G=T,Y=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function Q(e,t,n,r){for(var o,i,a,s,l,c,u,d,h,f,p,g,m,w,y,v,b,C,x,S,k,R,E,A,M,T,_=new Int32Array(16),O=new Int32Array(16),L=e[0],N=e[1],I=e[2],W=e[3],P=e[4],U=e[5],D=e[6],j=e[7],B=t[0],$=t[1],q=t[2],K=t[3],H=t[4],F=t[5],V=t[6],z=t[7],Z=0;r>=128;){for(x=0;x<16;x++)S=8*x+Z,_[x]=n[S+0]<<24|n[S+1]<<16|n[S+2]<<8|n[S+3],O[x]=n[S+4]<<24|n[S+5]<<16|n[S+6]<<8|n[S+7];for(x=0;x<80;x++)if(o=L,i=N,a=I,s=W,l=P,c=U,u=D,h=B,f=$,p=q,g=K,m=H,w=F,y=V,E=65535&(R=z),A=R>>>16,M=65535&(k=j),T=k>>>16,E+=65535&(R=(H>>>14|P<<18)^(H>>>18|P<<14)^(P>>>9|H<<23)),A+=R>>>16,M+=65535&(k=(P>>>14|H<<18)^(P>>>18|H<<14)^(H>>>9|P<<23)),T+=k>>>16,E+=65535&(R=H&F^~H&V),A+=R>>>16,M+=65535&(k=P&U^~P&D),T+=k>>>16,E+=65535&(R=Y[2*x+1]),A+=R>>>16,M+=65535&(k=Y[2*x]),T+=k>>>16,k=_[x%16],A+=(R=O[x%16])>>>16,M+=65535&k,T+=k>>>16,M+=(A+=(E+=65535&R)>>>16)>>>16,E=65535&(R=C=65535&E|A<<16),A=R>>>16,M=65535&(k=b=65535&M|(T+=M>>>16)<<16),T=k>>>16,E+=65535&(R=(B>>>28|L<<4)^(L>>>2|B<<30)^(L>>>7|B<<25)),A+=R>>>16,M+=65535&(k=(L>>>28|B<<4)^(B>>>2|L<<30)^(B>>>7|L<<25)),T+=k>>>16,A+=(R=B&$^B&q^$&q)>>>16,M+=65535&(k=L&N^L&I^N&I),T+=k>>>16,d=65535&(M+=(A+=(E+=65535&R)>>>16)>>>16)|(T+=M>>>16)<<16,v=65535&E|A<<16,E=65535&(R=g),A=R>>>16,M=65535&(k=s),T=k>>>16,A+=(R=C)>>>16,M+=65535&(k=b),T+=k>>>16,N=o,I=i,W=a,P=s=65535&(M+=(A+=(E+=65535&R)>>>16)>>>16)|(T+=M>>>16)<<16,U=l,D=c,j=u,L=d,$=h,q=f,K=p,H=g=65535&E|A<<16,F=m,V=w,z=y,B=v,x%16==15)for(S=0;S<16;S++)k=_[S],E=65535&(R=O[S]),A=R>>>16,M=65535&k,T=k>>>16,k=_[(S+9)%16],E+=65535&(R=O[(S+9)%16]),A+=R>>>16,M+=65535&k,T+=k>>>16,b=_[(S+1)%16],E+=65535&(R=((C=O[(S+1)%16])>>>1|b<<31)^(C>>>8|b<<24)^(C>>>7|b<<25)),A+=R>>>16,M+=65535&(k=(b>>>1|C<<31)^(b>>>8|C<<24)^b>>>7),T+=k>>>16,b=_[(S+14)%16],A+=(R=((C=O[(S+14)%16])>>>19|b<<13)^(b>>>29|C<<3)^(C>>>6|b<<26))>>>16,M+=65535&(k=(b>>>19|C<<13)^(C>>>29|b<<3)^b>>>6),T+=k>>>16,T+=(M+=(A+=(E+=65535&R)>>>16)>>>16)>>>16,_[S]=65535&M|T<<16,O[S]=65535&E|A<<16;E=65535&(R=B),A=R>>>16,M=65535&(k=L),T=k>>>16,k=e[0],A+=(R=t[0])>>>16,M+=65535&k,T+=k>>>16,T+=(M+=(A+=(E+=65535&R)>>>16)>>>16)>>>16,e[0]=L=65535&M|T<<16,t[0]=B=65535&E|A<<16,E=65535&(R=$),A=R>>>16,M=65535&(k=N),T=k>>>16,k=e[1],A+=(R=t[1])>>>16,M+=65535&k,T+=k>>>16,T+=(M+=(A+=(E+=65535&R)>>>16)>>>16)>>>16,e[1]=N=65535&M|T<<16,t[1]=$=65535&E|A<<16,E=65535&(R=q),A=R>>>16,M=65535&(k=I),T=k>>>16,k=e[2],A+=(R=t[2])>>>16,M+=65535&k,T+=k>>>16,T+=(M+=(A+=(E+=65535&R)>>>16)>>>16)>>>16,e[2]=I=65535&M|T<<16,t[2]=q=65535&E|A<<16,E=65535&(R=K),A=R>>>16,M=65535&(k=W),T=k>>>16,k=e[3],A+=(R=t[3])>>>16,M+=65535&k,T+=k>>>16,T+=(M+=(A+=(E+=65535&R)>>>16)>>>16)>>>16,e[3]=W=65535&M|T<<16,t[3]=K=65535&E|A<<16,E=65535&(R=H),A=R>>>16,M=65535&(k=P),T=k>>>16,k=e[4],A+=(R=t[4])>>>16,M+=65535&k,T+=k>>>16,T+=(M+=(A+=(E+=65535&R)>>>16)>>>16)>>>16,e[4]=P=65535&M|T<<16,t[4]=H=65535&E|A<<16,E=65535&(R=F),A=R>>>16,M=65535&(k=U),T=k>>>16,k=e[5],A+=(R=t[5])>>>16,M+=65535&k,T+=k>>>16,T+=(M+=(A+=(E+=65535&R)>>>16)>>>16)>>>16,e[5]=U=65535&M|T<<16,t[5]=F=65535&E|A<<16,E=65535&(R=V),A=R>>>16,M=65535&(k=D),T=k>>>16,k=e[6],A+=(R=t[6])>>>16,M+=65535&k,T+=k>>>16,T+=(M+=(A+=(E+=65535&R)>>>16)>>>16)>>>16,e[6]=D=65535&M|T<<16,t[6]=V=65535&E|A<<16,E=65535&(R=z),A=R>>>16,M=65535&(k=j),T=k>>>16,k=e[7],A+=(R=t[7])>>>16,M+=65535&k,T+=k>>>16,T+=(M+=(A+=(E+=65535&R)>>>16)>>>16)>>>16,e[7]=j=65535&M|T<<16,t[7]=z=65535&E|A<<16,Z+=128,r-=128}return r}function J(e,t,n){var r,o=new Int32Array(8),i=new Int32Array(8),a=new Uint8Array(256),s=n;for(o[0]=1779033703,o[1]=3144134277,o[2]=1013904242,o[3]=2773480762,o[4]=1359893119,o[5]=2600822924,o[6]=528734635,o[7]=1541459225,i[0]=4089235720,i[1]=2227873595,i[2]=4271175723,i[3]=1595750129,i[4]=2917565137,i[5]=725511199,i[6]=4215389547,i[7]=327033209,Q(o,i,t,n),n%=128,r=0;r<n;r++)a[r]=t[s-n+r];for(a[n]=128,a[(n=256-128*(n<112?1:0))-9]=0,f(a,n-8,s/536870912|0,s<<3),Q(o,i,a,n),r=0;r<8;r++)f(e,8*r,o[r],i[r]);return 0}function X(e,n){var r=t(),o=t(),i=t(),a=t(),s=t(),l=t(),u=t(),d=t(),h=t();j(r,e[1],e[0]),j(h,n[1],n[0]),B(r,r,h),D(o,e[0],e[1]),D(h,n[0],n[1]),B(o,o,h),B(i,e[3],n[3]),B(i,i,c),B(a,e[2],n[2]),D(a,a,a),j(s,o,r),j(l,a,i),D(u,a,i),D(d,o,r),B(e[0],s,l),B(e[1],d,u),B(e[2],u,l),B(e[3],s,d)}function ee(e,t,n){var r;for(r=0;r<4;r++)N(e[r],t[r],n)}function te(e,n){var r=t(),o=t(),i=t();q(i,n[2]),B(r,n[0],i),B(o,n[1],i),I(e,o),e[31]^=P(r)<<7}function ne(e,t,n){var r,o;for(O(e[0],i),O(e[1],a),O(e[2],a),O(e[3],i),o=255;o>=0;--o)ee(e,t,r=n[o/8|0]>>(7&o)&1),X(t,e),X(e,e),ee(e,t,r)}function re(e,n){var r=[t(),t(),t(),t()];O(r[0],u),O(r[1],d),O(r[2],a),B(r[3],u,d),ne(e,r,n)}function oe(e,r,o){var i,a=new Uint8Array(64),s=[t(),t(),t(),t()];for(o||n(r,32),J(a,r,32),a[0]&=248,a[31]&=127,a[31]|=64,re(s,a),te(e,s),i=0;i<32;i++)r[i+32]=e[i];return 0}var ie=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function ae(e,t){var n,r,o,i;for(r=63;r>=32;--r){for(n=0,o=r-32,i=r-12;o<i;++o)t[o]+=n-16*t[r]*ie[o-(r-32)],n=Math.floor((t[o]+128)/256),t[o]-=256*n;t[o]+=n,t[r]=0}for(n=0,o=0;o<32;o++)t[o]+=n-(t[31]>>4)*ie[o],n=t[o]>>8,t[o]&=255;for(o=0;o<32;o++)t[o]-=n*ie[o];for(r=0;r<32;r++)t[r+1]+=t[r]>>8,e[r]=255&t[r]}function se(e){var t,n=new Float64Array(64);for(t=0;t<64;t++)n[t]=e[t];for(t=0;t<64;t++)e[t]=0;ae(e,n)}function le(e,n,r,o){var i,a,s=new Uint8Array(64),l=new Uint8Array(64),c=new Uint8Array(64),u=new Float64Array(64),d=[t(),t(),t(),t()];J(s,o,32),s[0]&=248,s[31]&=127,s[31]|=64;var h=r+64;for(i=0;i<r;i++)e[64+i]=n[i];for(i=0;i<32;i++)e[32+i]=s[32+i];for(J(c,e.subarray(32),r+32),se(c),re(d,c),te(e,d),i=32;i<64;i++)e[i]=o[i];for(J(l,e,r+64),se(l),i=0;i<64;i++)u[i]=0;for(i=0;i<32;i++)u[i]=c[i];for(i=0;i<32;i++)for(a=0;a<32;a++)u[i+a]+=l[i]*s[a];return ae(e.subarray(32),u),h}function ce(e,n,r,o){var s,c=new Uint8Array(32),u=new Uint8Array(64),d=[t(),t(),t(),t()],f=[t(),t(),t(),t()];if(r<64)return-1;if(function(e,n){var r=t(),o=t(),s=t(),c=t(),u=t(),d=t(),f=t();return O(e[2],a),U(e[1],n),$(s,e[1]),B(c,s,l),j(s,s,e[2]),D(c,e[2],c),$(u,c),$(d,u),B(f,d,u),B(r,f,s),B(r,r,c),K(r,r),B(r,r,s),B(r,r,c),B(r,r,c),B(e[0],r,c),$(o,e[0]),B(o,o,c),W(o,s)&&B(e[0],e[0],h),$(o,e[0]),B(o,o,c),W(o,s)?-1:(P(e[0])===n[31]>>7&&j(e[0],i,e[0]),B(e[3],e[0],e[1]),0)}(f,o))return-1;for(s=0;s<r;s++)e[s]=n[s];for(s=0;s<32;s++)e[s+32]=o[s];if(J(u,e,r),se(u),ne(d,f,u),re(f,n.subarray(32)),X(d,f),te(c,d),r-=64,m(n,0,c,0)){for(s=0;s<r;s++)e[s]=0;return-1}for(s=0;s<r;s++)e[s]=n[s+64];return r}var ue,de=16,he=64,fe=32,pe=64;function ge(e,t){if(32!==e.length)throw new Error("bad key size");if(24!==t.length)throw new Error("bad nonce size")}function me(){for(var e=0;e<arguments.length;e++)if(!(arguments[e]instanceof Uint8Array))throw new TypeError("unexpected type, use Uint8Array")}function we(e){for(var t=0;t<e.length;t++)e[t]=0}e.lowlevel={crypto_core_hsalsa20:y,crypto_stream_xor:S,crypto_stream:x,crypto_stream_salsa20_xor:b,crypto_stream_salsa20:C,crypto_onetimeauth:R,crypto_onetimeauth_verify:E,crypto_verify_16:g,crypto_verify_32:m,crypto_secretbox:A,crypto_secretbox_open:T,crypto_scalarmult:H,crypto_scalarmult_base:F,crypto_box_beforenm:z,crypto_box_afternm:Z,crypto_box:function(e,t,n,r,o,i){var a=new Uint8Array(32);return z(a,o,i),Z(e,t,n,r,a)},crypto_box_open:function(e,t,n,r,o,i){var a=new Uint8Array(32);return z(a,o,i),G(e,t,n,r,a)},crypto_box_keypair:V,crypto_hash:J,crypto_sign:le,crypto_sign_keypair:oe,crypto_sign_open:ce,crypto_secretbox_KEYBYTES:32,crypto_secretbox_NONCEBYTES:24,crypto_secretbox_ZEROBYTES:32,crypto_secretbox_BOXZEROBYTES:de,crypto_scalarmult_BYTES:32,crypto_scalarmult_SCALARBYTES:32,crypto_box_PUBLICKEYBYTES:32,crypto_box_SECRETKEYBYTES:32,crypto_box_BEFORENMBYTES:32,crypto_box_NONCEBYTES:24,crypto_box_ZEROBYTES:32,crypto_box_BOXZEROBYTES:16,crypto_sign_BYTES:he,crypto_sign_PUBLICKEYBYTES:fe,crypto_sign_SECRETKEYBYTES:pe,crypto_sign_SEEDBYTES:32,crypto_hash_BYTES:64,gf:t,D:l,L:ie,pack25519:I,unpack25519:U,M:B,A:D,S:$,Z:j,pow2523:K,add:X,set25519:O,modL:ae,scalarmult:ne,scalarbase:re},e.randomBytes=function(e){var t=new Uint8Array(e);return n(t,e),t},e.secretbox=function(e,t,n){me(e,t,n),ge(n,t);for(var r=new Uint8Array(32+e.length),o=new Uint8Array(r.length),i=0;i<e.length;i++)r[i+32]=e[i];return A(o,r,r.length,t,n),o.subarray(de)},e.secretbox.open=function(e,t,n){me(e,t,n),ge(n,t);for(var r=new Uint8Array(de+e.length),o=new Uint8Array(r.length),i=0;i<e.length;i++)r[i+de]=e[i];return r.length<32||0!==T(o,r,r.length,t,n)?null:o.subarray(32)},e.secretbox.keyLength=32,e.secretbox.nonceLength=24,e.secretbox.overheadLength=de,e.scalarMult=function(e,t){if(me(e,t),32!==e.length)throw new Error("bad n size");if(32!==t.length)throw new Error("bad p size");var n=new Uint8Array(32);return H(n,e,t),n},e.scalarMult.base=function(e){if(me(e),32!==e.length)throw new Error("bad n size");var t=new Uint8Array(32);return F(t,e),t},e.scalarMult.scalarLength=32,e.scalarMult.groupElementLength=32,e.box=function(t,n,r,o){var i=e.box.before(r,o);return e.secretbox(t,n,i)},e.box.before=function(e,t){me(e,t),function(e,t){if(32!==e.length)throw new Error("bad public key size");if(32!==t.length)throw new Error("bad secret key size")}(e,t);var n=new Uint8Array(32);return z(n,e,t),n},e.box.after=e.secretbox,e.box.open=function(t,n,r,o){var i=e.box.before(r,o);return e.secretbox.open(t,n,i)},e.box.open.after=e.secretbox.open,e.box.keyPair=function(){var e=new Uint8Array(32),t=new Uint8Array(32);return V(e,t),{publicKey:e,secretKey:t}},e.box.keyPair.fromSecretKey=function(e){if(me(e),32!==e.length)throw new Error("bad secret key size");var t=new Uint8Array(32);return F(t,e),{publicKey:t,secretKey:new Uint8Array(e)}},e.box.publicKeyLength=32,e.box.secretKeyLength=32,e.box.sharedKeyLength=32,e.box.nonceLength=24,e.box.overheadLength=e.secretbox.overheadLength,e.sign=function(e,t){if(me(e,t),t.length!==pe)throw new Error("bad secret key size");var n=new Uint8Array(he+e.length);return le(n,e,e.length,t),n},e.sign.open=function(e,t){if(me(e,t),t.length!==fe)throw new Error("bad public key size");var n=new Uint8Array(e.length),r=ce(n,e,e.length,t);if(r<0)return null;for(var o=new Uint8Array(r),i=0;i<o.length;i++)o[i]=n[i];return o},e.sign.detached=function(t,n){for(var r=e.sign(t,n),o=new Uint8Array(he),i=0;i<o.length;i++)o[i]=r[i];return o},e.sign.detached.verify=function(e,t,n){if(me(e,t,n),t.length!==he)throw new Error("bad signature size");if(n.length!==fe)throw new Error("bad public key size");var r,o=new Uint8Array(he+e.length),i=new Uint8Array(he+e.length);for(r=0;r<he;r++)o[r]=t[r];for(r=0;r<e.length;r++)o[r+he]=e[r];return ce(i,o,o.length,n)>=0},e.sign.keyPair=function(){var e=new Uint8Array(fe),t=new Uint8Array(pe);return oe(e,t),{publicKey:e,secretKey:t}},e.sign.keyPair.fromSecretKey=function(e){if(me(e),e.length!==pe)throw new Error("bad secret key size");for(var t=new Uint8Array(fe),n=0;n<t.length;n++)t[n]=e[32+n];return{publicKey:t,secretKey:new Uint8Array(e)}},e.sign.keyPair.fromSeed=function(e){if(me(e),32!==e.length)throw new Error("bad seed size");for(var t=new Uint8Array(fe),n=new Uint8Array(pe),r=0;r<32;r++)n[r]=e[r];return oe(t,n,!0),{publicKey:t,secretKey:n}},e.sign.publicKeyLength=fe,e.sign.secretKeyLength=pe,e.sign.seedLength=32,e.sign.signatureLength=he,e.hash=function(e){me(e);var t=new Uint8Array(64);return J(t,e,e.length),t},e.hash.hashLength=64,e.verify=function(e,t){return me(e,t),0!==e.length&&0!==t.length&&e.length===t.length&&0===p(e,0,t,0,e.length)},e.setPRNG=function(e){n=e},(ue="undefined"!=typeof self?self.crypto||self.msCrypto:null)&&ue.getRandomValues?e.setPRNG(function(e,t){var n,r=new Uint8Array(t);for(n=0;n<t;n+=65536)ue.getRandomValues(r.subarray(n,n+Math.min(t-n,65536)));for(n=0;n<t;n++)e[n]=r[n];we(r)}):void 0!==M&&(ue=_)&&ue.randomBytes&&e.setPRNG(function(e,t){var n,r=ue.randomBytes(t);for(n=0;n<t;n++)e[n]=r[n];we(r)})}(e.exports?e.exports:self.nacl=self.nacl||{})}(T)),T.exports);const N=b(L);var I,W,P,U,D,j,B;e.CONNECT_EVENT_ERROR_CODES=void 0,(I=e.CONNECT_EVENT_ERROR_CODES||(e.CONNECT_EVENT_ERROR_CODES={}))[I.UNKNOWN_ERROR=0]="UNKNOWN_ERROR",I[I.BAD_REQUEST_ERROR=1]="BAD_REQUEST_ERROR",I[I.MANIFEST_NOT_FOUND_ERROR=2]="MANIFEST_NOT_FOUND_ERROR",I[I.MANIFEST_CONTENT_ERROR=3]="MANIFEST_CONTENT_ERROR",I[I.UNKNOWN_APP_ERROR=100]="UNKNOWN_APP_ERROR",I[I.USER_REJECTS_ERROR=300]="USER_REJECTS_ERROR",I[I.METHOD_NOT_SUPPORTED=400]="METHOD_NOT_SUPPORTED",e.CONNECT_ITEM_ERROR_CODES=void 0,(W=e.CONNECT_ITEM_ERROR_CODES||(e.CONNECT_ITEM_ERROR_CODES={}))[W.UNKNOWN_ERROR=0]="UNKNOWN_ERROR",W[W.METHOD_NOT_SUPPORTED=400]="METHOD_NOT_SUPPORTED",e.SEND_TRANSACTION_ERROR_CODES=void 0,(P=e.SEND_TRANSACTION_ERROR_CODES||(e.SEND_TRANSACTION_ERROR_CODES={}))[P.UNKNOWN_ERROR=0]="UNKNOWN_ERROR",P[P.BAD_REQUEST_ERROR=1]="BAD_REQUEST_ERROR",P[P.UNKNOWN_APP_ERROR=100]="UNKNOWN_APP_ERROR",P[P.USER_REJECTS_ERROR=300]="USER_REJECTS_ERROR",P[P.METHOD_NOT_SUPPORTED=400]="METHOD_NOT_SUPPORTED",e.SIGN_DATA_ERROR_CODES=void 0,(U=e.SIGN_DATA_ERROR_CODES||(e.SIGN_DATA_ERROR_CODES={}))[U.UNKNOWN_ERROR=0]="UNKNOWN_ERROR",U[U.BAD_REQUEST_ERROR=1]="BAD_REQUEST_ERROR",U[U.UNKNOWN_APP_ERROR=100]="UNKNOWN_APP_ERROR",U[U.USER_REJECTS_ERROR=300]="USER_REJECTS_ERROR",U[U.METHOD_NOT_SUPPORTED=400]="METHOD_NOT_SUPPORTED",(j=D||(D={}))[j.UNKNOWN_ERROR=0]="UNKNOWN_ERROR",j[j.BAD_REQUEST_ERROR=1]="BAD_REQUEST_ERROR",j[j.UNKNOWN_APP_ERROR=100]="UNKNOWN_APP_ERROR",j[j.METHOD_NOT_SUPPORTED=400]="METHOD_NOT_SUPPORTED",e.CHAIN=void 0,(B=e.CHAIN||(e.CHAIN={})).MAINNET="-239",B.TESTNET="-3";const $={encode:function(e,t=!1){let n;return e instanceof Uint8Array?n=e:("string"!=typeof e&&(e=JSON.stringify(e)),n=A.decodeUTF8(e)),function(e,t){const n=A.encodeBase64(e);return t?encodeURIComponent(n):n}(n,t)},decode:function(e,t=!1){const n=function(e,t){return t&&(e=decodeURIComponent(e)),A.decodeBase64(e)}(e,t);return{toString:()=>A.encodeUTF8(n),toObject(){try{return JSON.parse(A.encodeUTF8(n))}catch(e){return null}},toUint8Array:()=>n}}};function q(e){let t="";return e.forEach(e=>{t+=("0"+(255&e).toString(16)).slice(-2)}),t}function K(e){if(e.length%2!=0)throw new Error(`Cannot convert ${e} to bytesArray`);const t=new Uint8Array(e.length/2);for(let n=0;n<e.length;n+=2)t[n/2]=parseInt(e.slice(n,n+2),16);return t}class H{constructor(e){this.nonceLength=24,this.keyPair=e?this.createKeypairFromString(e):this.createKeypair(),this.sessionId=q(this.keyPair.publicKey)}createKeypair(){return N.box.keyPair()}createKeypairFromString(e){return{publicKey:K(e.publicKey),secretKey:K(e.secretKey)}}createNonce(){return N.randomBytes(this.nonceLength)}encrypt(e,t){const n=(new TextEncoder).encode(e),r=this.createNonce();return function(e,t){const n=new Uint8Array(e.length+t.length);return n.set(e),n.set(t,e.length),n}(r,N.box(n,r,t,this.keyPair.secretKey))}decrypt(e,t){const[n,r]=function(e,t){if(t>=e.length)throw new Error("Index is out of buffer");return[e.slice(0,t),e.slice(t)]}(e,this.nonceLength),o=N.box.open(r,n,t,this.keyPair.secretKey);if(!o)throw new Error(`Decryption error: \n message: ${e.toString()} \n sender pubkey: ${t.toString()} \n keypair pubkey: ${this.keyPair.publicKey.toString()} \n keypair secretkey: ${this.keyPair.secretKey.toString()}`);return(new TextDecoder).decode(o)}stringifyKeypair(){return{publicKey:q(this.keyPair.publicKey),secretKey:q(this.keyPair.secretKey)}}}function F(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function V(e,t,n,r){return new(n||(n=Promise))(function(t,o){function i(e){try{s(r.next(e))}catch(t){o(t)}}function a(e){try{s(r.throw(e))}catch(t){o(t)}}function s(e){var r;e.done?t(e.value):(r=e.value,r instanceof n?r:new n(function(e){e(r)})).then(i,a)}s((r=r.apply(e,[])).next())})}"function"==typeof SuppressedError&&SuppressedError;class z extends Error{get info(){return""}constructor(e,t){super(e,t),this.message=`${z.prefix} ${this.constructor.name}${this.info?": "+this.info:""}${e?"\n"+e:""}`,Object.setPrototypeOf(this,z.prototype)}}z.prefix="[TON_CONNECT_SDK_ERROR]";class Z extends z{get info(){return"Passed DappMetadata is in incorrect format."}constructor(...e){super(...e),Object.setPrototypeOf(this,Z.prototype)}}class G extends z{get info(){return"Passed `tonconnect-manifest.json` contains errors. Check format of your manifest. See more https://github.com/ton-connect/docs/blob/main/requests-responses.md#app-manifest"}constructor(...e){super(...e),Object.setPrototypeOf(this,G.prototype)}}class Y extends z{get info(){return"Manifest not found. Make sure you added `tonconnect-manifest.json` to the root of your app or passed correct manifestUrl. See more https://github.com/ton-connect/docs/blob/main/requests-responses.md#app-manifest"}constructor(...e){super(...e),Object.setPrototypeOf(this,Y.prototype)}}class Q extends z{get info(){return"Wallet connection called but wallet already connected. To avoid the error, disconnect the wallet before doing a new connection."}constructor(...e){super(...e),Object.setPrototypeOf(this,Q.prototype)}}class J extends z{get info(){return"Send transaction or other protocol methods called while wallet is not connected."}constructor(...e){super(...e),Object.setPrototypeOf(this,J.prototype)}}class X extends z{get info(){return"There is an attempt to connect to the injected wallet while it is not exists in the webpage."}constructor(...e){super(...e),Object.setPrototypeOf(this,X.prototype)}}class ee extends z{get info(){return"Wallet doesn't support requested feature method."}constructor(e,t){super(e,t),Object.setPrototypeOf(this,ee.prototype)}}class te extends z{get info(){return"Missing required features. You need to update your wallet."}constructor(e,t){super(e,t),Object.setPrototypeOf(this,te.prototype)}}class ne extends z{get info(){return"User rejects the action in the wallet."}constructor(...e){super(...e),Object.setPrototypeOf(this,ne.prototype)}}class re extends z{get info(){return"Request to the wallet contains errors."}constructor(...e){super(...e),Object.setPrototypeOf(this,re.prototype)}}class oe extends z{get info(){return"App tries to send rpc request to the injected wallet while not connected."}constructor(...e){super(...e),Object.setPrototypeOf(this,oe.prototype)}}class ie extends z{get info(){return"Storage was not specified in the `DappMetadata` and default `localStorage` was not detected in the environment."}constructor(...e){super(...e),Object.setPrototypeOf(this,ie.prototype)}}class ae extends z{get info(){return"An error occurred while fetching the wallets list."}constructor(...e){super(...e),Object.setPrototypeOf(this,ae.prototype)}}class se extends z{get info(){return"Passed address is in incorrect format."}constructor(...e){super(...e),Object.setPrototypeOf(this,se.prototype)}}class le extends z{get info(){return"Passed hex is in incorrect format."}constructor(...e){super(...e),Object.setPrototypeOf(this,le.prototype)}}class ce extends z{constructor(...e){super(...e),Object.setPrototypeOf(this,ce.prototype)}}const ue={[e.CONNECT_EVENT_ERROR_CODES.UNKNOWN_ERROR]:ce,[e.CONNECT_EVENT_ERROR_CODES.USER_REJECTS_ERROR]:ne,[e.CONNECT_EVENT_ERROR_CODES.BAD_REQUEST_ERROR]:re,[e.CONNECT_EVENT_ERROR_CODES.UNKNOWN_APP_ERROR]:oe,[e.CONNECT_EVENT_ERROR_CODES.MANIFEST_NOT_FOUND_ERROR]:Y,[e.CONNECT_EVENT_ERROR_CODES.MANIFEST_CONTENT_ERROR]:G};const de=new class{parseError(e){let t=ce;return e.code in ue&&(t=ue[e.code]||ce),new t(e.message)}};class he{isError(e){return"error"in e}}const fe={[e.SEND_TRANSACTION_ERROR_CODES.UNKNOWN_ERROR]:ce,[e.SEND_TRANSACTION_ERROR_CODES.USER_REJECTS_ERROR]:ne,[e.SEND_TRANSACTION_ERROR_CODES.BAD_REQUEST_ERROR]:re,[e.SEND_TRANSACTION_ERROR_CODES.UNKNOWN_APP_ERROR]:oe};const pe=new class extends he{convertToRpcRequest(e){return{method:"sendTransaction",params:[JSON.stringify(e)]}}parseAndThrowError(e){let t=ce;throw e.error.code in fe&&(t=fe[e.error.code]||ce),new t(e.error.message)}convertFromRpcResponse(e){return{boc:e.result}}},ge={[e.SIGN_DATA_ERROR_CODES.UNKNOWN_ERROR]:ce,[e.SIGN_DATA_ERROR_CODES.USER_REJECTS_ERROR]:ne,[e.SIGN_DATA_ERROR_CODES.BAD_REQUEST_ERROR]:re,[e.SIGN_DATA_ERROR_CODES.UNKNOWN_APP_ERROR]:oe};const me=new class extends he{convertToRpcRequest(e){return{method:"signData",params:[JSON.stringify(e)]}}parseAndThrowError(e){let t=ce;throw e.error.code in ge&&(t=ge[e.error.code]||ce),new t(e.error.message)}convertFromRpcResponse(e){return e.result}};class we{constructor(e,t){this.storage=e,this.storeKey="ton-connect-storage_http-bridge-gateway::"+t}storeLastEventId(e){return V(this,0,void 0,function*(){return this.storage.setItem(this.storeKey,e)})}removeLastEventId(){return V(this,0,void 0,function*(){return this.storage.removeItem(this.storeKey)})}getLastEventId(){return V(this,0,void 0,function*(){const e=yield this.storage.getItem(this.storeKey);return e||null})}}function ye(e,t){return function(e){return"/"===e.slice(-1)?e.slice(0,-1):e}(e)+"/"+t}function ve(e){if(!e)return!1;const t=new URL(e);return"tg:"===t.protocol||"t.me"===t.hostname}function be(e){return e.replaceAll(".","%2E").replaceAll("-","%2D").replaceAll("_","%5F").replaceAll("&","-").replaceAll("=","__").replaceAll("%","--")}function Ce(e,t){return V(this,0,void 0,function*(){return new Promise((t,n)=>{setTimeout(()=>t(),e)})})}function xe(e){const t=new AbortController;return(null==e?void 0:e.aborted)?t.abort():null==e||e.addEventListener("abort",()=>t.abort(),{once:!0}),t}function Se(e,t){return V(this,0,void 0,function*(){var n,r;const o=null!==(n=null==t?void 0:t.attempts)&&void 0!==n?n:10,i=null!==(r=null==t?void 0:t.delayMs)&&void 0!==r?r:200,a=xe(null==t?void 0:t.signal);if("function"!=typeof e)throw new z("Expected a function, got "+typeof e);let s,l=0;for(;l<o;){if(a.signal.aborted)throw new z(`Aborted after attempts ${l}`);try{return yield e({signal:a.signal})}catch(c){s=c,l++,l<o&&(yield Ce(i))}}throw s})}function ke(...e){try{console.debug("[TON_CONNECT_SDK]",...e)}catch(t){}}function Re(...e){try{console.error("[TON_CONNECT_SDK]",...e)}catch(t){}}class Ee{get isReady(){const e=this.eventSource.current();return(null==e?void 0:e.readyState)===EventSource.OPEN}get isClosed(){const e=this.eventSource.current();return(null==e?void 0:e.readyState)!==EventSource.OPEN}get isConnecting(){const e=this.eventSource.current();return(null==e?void 0:e.readyState)===EventSource.CONNECTING}constructor(e,t,n,r,o){this.bridgeUrl=t,this.sessionId=n,this.listener=r,this.errorsListener=o,this.ssePath="events",this.postPath="message",this.heartbeatMessage="heartbeat",this.defaultTtl=300,this.defaultReconnectDelay=2e3,this.defaultResendDelay=5e3,this.eventSource=function(e,t){let n=null,r=null,o=null,i=null,a=null;const s=(s,...l)=>V(this,0,void 0,function*(){if(i=null!=s?s:null,null==a||a.abort(),a=xe(s),a.signal.aborted)throw new z("Resource creation was aborted");r=null!=l?l:null;const c=e(a.signal,...l);o=c;const u=yield c;if(o!==c&&u!==n)throw yield t(u),new z("Resource creation was aborted by a new resource creation");return n=u,n});return{create:s,current:()=>null!=n?n:null,dispose:()=>V(this,0,void 0,function*(){try{const r=n;n=null;const i=o;o=null;try{null==a||a.abort()}catch(e){}yield Promise.allSettled([r?t(r):Promise.resolve(),i?t(yield i):Promise.resolve()])}catch(e){}}),recreate:e=>V(this,0,void 0,function*(){const t=n,a=o,l=r,c=i;if(yield Ce(e),t===n&&a===o&&l===r&&c===i)return yield s(i,...null!=l?l:[]);throw new z("Resource recreation was aborted by a new resource creation")})}}((e,t)=>V(this,0,void 0,function*(){const n={bridgeUrl:this.bridgeUrl,ssePath:this.ssePath,sessionId:this.sessionId,bridgeGatewayStorage:this.bridgeGatewayStorage,errorHandler:this.errorsHandler.bind(this),messageHandler:this.messagesHandler.bind(this),signal:e,openingDeadlineMS:t};return yield function(e){return V(this,0,void 0,function*(){return yield function(e,t){const n=null==t?void 0:t.timeout,r=xe(null==t?void 0:t.signal);return new Promise((t,o)=>V(this,0,void 0,function*(){if(r.signal.aborted)return void o(new z("Operation aborted"));let i;void 0!==n&&(i=setTimeout(()=>{r.abort(),o(new z(`Timeout after ${n}ms`))},n)),r.signal.addEventListener("abort",()=>{clearTimeout(i),o(new z("Operation aborted"))},{once:!0});const a={timeout:n,abort:r.signal};yield e((...e)=>{clearTimeout(i),t(...e)},()=>{clearTimeout(i),o()},a)}))}((t,n,r)=>V(this,0,void 0,function*(){var o;const i=xe(r.signal).signal;if(i.aborted)return void n(new z("Bridge connection aborted"));const a=new URL(ye(e.bridgeUrl,e.ssePath));a.searchParams.append("client_id",e.sessionId);const s=yield e.bridgeGatewayStorage.getLastEventId();if(s&&a.searchParams.append("last_event_id",s),i.aborted)return void n(new z("Bridge connection aborted"));const l=new EventSource(a.toString());l.onerror=r=>V(this,0,void 0,function*(){if(i.aborted)return l.close(),void n(new z("Bridge connection aborted"));try{const n=yield e.errorHandler(l,r);n!==l&&l.close(),n&&n!==l&&t(n)}catch(o){l.close(),n(o)}}),l.onopen=()=>{if(i.aborted)return l.close(),void n(new z("Bridge connection aborted"));t(l)},l.onmessage=t=>{if(i.aborted)return l.close(),void n(new z("Bridge connection aborted"));e.messageHandler(t)},null===(o=e.signal)||void 0===o||o.addEventListener("abort",()=>{l.close(),n(new z("Bridge connection aborted"))})}),{timeout:e.openingDeadlineMS,signal:e.signal})})}(n)}),e=>V(this,0,void 0,function*(){e.close()})),this.bridgeGatewayStorage=new we(e,t)}registerSession(e){return V(this,0,void 0,function*(){yield this.eventSource.create(null==e?void 0:e.signal,null==e?void 0:e.openingDeadlineMS)})}send(e,t,n,r){return V(this,0,void 0,function*(){var o;const i={};"number"==typeof r?i.ttl=r:(i.ttl=null==r?void 0:r.ttl,i.signal=null==r?void 0:r.signal,i.attempts=null==r?void 0:r.attempts);const a=new URL(ye(this.bridgeUrl,this.postPath));a.searchParams.append("client_id",this.sessionId),a.searchParams.append("to",t),a.searchParams.append("ttl",((null==i?void 0:i.ttl)||this.defaultTtl).toString()),a.searchParams.append("topic",n);const s=$.encode(e);yield Se(e=>V(this,0,void 0,function*(){const t=yield this.post(a,s,e.signal);if(!t.ok)throw new z(`Bridge send failed, status ${t.status}`)}),{attempts:null!==(o=null==i?void 0:i.attempts)&&void 0!==o?o:Number.MAX_SAFE_INTEGER,delayMs:this.defaultResendDelay,signal:null==i?void 0:i.signal})})}pause(){this.eventSource.dispose().catch(e=>Re(`Bridge pause failed, ${e}`))}unPause(){return V(this,0,void 0,function*(){yield this.eventSource.recreate(0)})}close(){return V(this,0,void 0,function*(){yield this.eventSource.dispose().catch(e=>Re(`Bridge close failed, ${e}`))})}setListener(e){this.listener=e}setErrorsListener(e){this.errorsListener=e}post(e,t,n){return V(this,0,void 0,function*(){const r=yield fetch(e,{method:"post",body:t,signal:n});if(!r.ok)throw new z(`Bridge send failed, status ${r.status}`);return r})}errorsHandler(e,t){return V(this,0,void 0,function*(){if(this.isConnecting)throw e.close(),new z("Bridge error, failed to connect");if(!this.isReady){if(this.isClosed)return e.close(),ke(`Bridge reconnecting, ${this.defaultReconnectDelay}ms delay`),yield this.eventSource.recreate(this.defaultReconnectDelay);throw new z("Bridge error, unknown state")}try{this.errorsListener(t)}catch(n){}})}messagesHandler(e){return V(this,0,void 0,function*(){if(e.data===this.heartbeatMessage)return;if(yield this.bridgeGatewayStorage.storeLastEventId(e.lastEventId),this.isClosed)return;let t;try{t=JSON.parse(e.data)}catch(n){throw new z(`Bridge message parse failed, message ${e.data}`)}this.listener(t)})}}function Ae(e){return!("connectEvent"in e)}class Me{constructor(e){this.storage=e,this.storeKey="ton-connect-storage_bridge-connection"}storeConnection(e){return V(this,0,void 0,function*(){if("injected"===e.type)return this.storage.setItem(this.storeKey,JSON.stringify(e));if(!Ae(e)){const t={sessionKeyPair:e.session.sessionCrypto.stringifyKeypair(),walletPublicKey:e.session.walletPublicKey,bridgeUrl:e.session.bridgeUrl},n={type:"http",connectEvent:e.connectEvent,session:t,lastWalletEventId:e.lastWalletEventId,nextRpcRequestId:e.nextRpcRequestId};return this.storage.setItem(this.storeKey,JSON.stringify(n))}const t={type:"http",connectionSource:e.connectionSource,sessionCrypto:e.sessionCrypto.stringifyKeypair(),createdAt:Date.now()};return this.storage.setItem(this.storeKey,JSON.stringify(t))})}removeConnection(){return V(this,0,void 0,function*(){return this.storage.removeItem(this.storeKey)})}getConnection(){return V(this,0,void 0,function*(){const e=yield this.storage.getItem(this.storeKey);if(!e)return null;const t=JSON.parse(e);if("injected"===t.type)return t;if(!function(e){return!("connectEvent"in e)}(t)){const e=new H(t.session.sessionKeyPair);return{type:"http",connectEvent:t.connectEvent,lastWalletEventId:t.lastWalletEventId,nextRpcRequestId:t.nextRpcRequestId,session:{sessionCrypto:e,bridgeUrl:t.session.bridgeUrl,walletPublicKey:t.session.walletPublicKey}}}return function(e){var t;return Date.now()-(null!==(t=e.createdAt)&&void 0!==t?t:0)>3e5}(t)?(yield this.removeConnection(),null):{type:"http",sessionCrypto:new H(t.sessionCrypto),connectionSource:t.connectionSource}})}getHttpConnection(){return V(this,0,void 0,function*(){const e=yield this.getConnection();if(!e)throw new z("Trying to read HTTP connection source while nothing is stored");if("injected"===e.type)throw new z("Trying to read HTTP connection source while injected connection is stored");return e})}getHttpPendingConnection(){return V(this,0,void 0,function*(){const e=yield this.getConnection();if(!e)throw new z("Trying to read HTTP connection source while nothing is stored");if("injected"===e.type)throw new z("Trying to read HTTP connection source while injected connection is stored");if(!Ae(e))throw new z("Trying to read HTTP-pending connection while http connection is stored");return e})}getInjectedConnection(){return V(this,0,void 0,function*(){const e=yield this.getConnection();if(!e)throw new z("Trying to read Injected bridge connection source while nothing is stored");if("http"===(null==e?void 0:e.type))throw new z("Trying to read Injected bridge connection source while HTTP connection is stored");return e})}storedConnectionType(){return V(this,0,void 0,function*(){const e=yield this.storage.getItem(this.storeKey);if(!e)return null;return JSON.parse(e).type})}storeLastWalletEventId(e){return V(this,0,void 0,function*(){const t=yield this.getConnection();if(t&&"http"===t.type&&!Ae(t))return t.lastWalletEventId=e,this.storeConnection(t)})}getLastWalletEventId(){return V(this,0,void 0,function*(){const e=yield this.getConnection();if(e&&"lastWalletEventId"in e)return e.lastWalletEventId})}increaseNextRpcRequestId(){return V(this,0,void 0,function*(){const e=yield this.getConnection();if(e&&"nextRpcRequestId"in e){const t=e.nextRpcRequestId||0;return e.nextRpcRequestId=t+1,this.storeConnection(e)}})}getNextRpcRequestId(){return V(this,0,void 0,function*(){const e=yield this.getConnection();return e&&"nextRpcRequestId"in e&&e.nextRpcRequestId||0})}}class Te{static fromStorage(e){return V(this,0,void 0,function*(){const t=new Me(e),n=yield t.getHttpConnection();return Ae(n)?new Te(e,n.connectionSource):new Te(e,{bridgeUrl:n.session.bridgeUrl})})}constructor(e,t){this.storage=e,this.walletConnectionSource=t,this.type="http",this.standardUniversalLink="tc://",this.pendingRequests=new Map,this.session=null,this.gateway=null,this.pendingGateways=[],this.listeners=[],this.defaultOpeningDeadlineMS=12e3,this.defaultRetryTimeoutMS=2e3,this.connectionStorage=new Me(e)}connect(e,t){var n;const r=xe(null==t?void 0:t.signal);null===(n=this.abortController)||void 0===n||n.abort(),this.abortController=r,this.closeGateways();const o=new H;this.session={sessionCrypto:o,bridgeUrl:"bridgeUrl"in this.walletConnectionSource?this.walletConnectionSource.bridgeUrl:""},this.connectionStorage.storeConnection({type:"http",connectionSource:this.walletConnectionSource,sessionCrypto:o}).then(()=>V(this,0,void 0,function*(){r.signal.aborted||(yield Se(e=>{var n;return this.openGateways(o,{openingDeadlineMS:null!==(n=null==t?void 0:t.openingDeadlineMS)&&void 0!==n?n:this.defaultOpeningDeadlineMS,signal:null==e?void 0:e.signal})},{attempts:Number.MAX_SAFE_INTEGER,delayMs:this.defaultRetryTimeoutMS,signal:r.signal}))}));const i="universalLink"in this.walletConnectionSource&&this.walletConnectionSource.universalLink?this.walletConnectionSource.universalLink:this.standardUniversalLink;return this.generateUniversalLink(i,e)}restoreConnection(e){return V(this,0,void 0,function*(){var t,n;const r=xe(null==e?void 0:e.signal);if(null===(t=this.abortController)||void 0===t||t.abort(),this.abortController=r,r.signal.aborted)return;this.closeGateways();const o=yield this.connectionStorage.getHttpConnection();if(!o)return;if(r.signal.aborted)return;const i=null!==(n=null==e?void 0:e.openingDeadlineMS)&&void 0!==n?n:this.defaultOpeningDeadlineMS;if(Ae(o))return this.session={sessionCrypto:o.sessionCrypto,bridgeUrl:"bridgeUrl"in this.walletConnectionSource?this.walletConnectionSource.bridgeUrl:""},yield this.openGateways(o.sessionCrypto,{openingDeadlineMS:i,signal:null==r?void 0:r.signal});if(Array.isArray(this.walletConnectionSource))throw new z("Internal error. Connection source is array while WalletConnectionSourceHTTP was expected.");if(this.session=o.session,this.gateway&&(ke("Gateway is already opened, closing previous gateway"),yield this.gateway.close()),this.gateway=new Ee(this.storage,this.walletConnectionSource.bridgeUrl,o.session.sessionCrypto.sessionId,this.gatewayListener.bind(this),this.gatewayErrorsListener.bind(this)),!r.signal.aborted){this.listeners.forEach(e=>e(o.connectEvent));try{yield Se(e=>this.gateway.registerSession({openingDeadlineMS:i,signal:e.signal}),{attempts:Number.MAX_SAFE_INTEGER,delayMs:this.defaultRetryTimeoutMS,signal:r.signal})}catch(a){return void(yield this.disconnect({signal:r.signal}))}}})}sendRequest(e,t){const n={};return"function"==typeof t?n.onRequestSent=t:(n.onRequestSent=null==t?void 0:t.onRequestSent,n.signal=null==t?void 0:t.signal,n.attempts=null==t?void 0:t.attempts),new Promise((t,r)=>V(this,0,void 0,function*(){var o;if(!this.gateway||!this.session||!("walletPublicKey"in this.session))throw new z("Trying to send bridge request without session");const i=(yield this.connectionStorage.getNextRpcRequestId()).toString();yield this.connectionStorage.increaseNextRpcRequestId(),ke("Send http-bridge request:",Object.assign(Object.assign({},e),{id:i}));const a=this.session.sessionCrypto.encrypt(JSON.stringify(Object.assign(Object.assign({},e),{id:i})),K(this.session.walletPublicKey));try{yield this.gateway.send(a,this.session.walletPublicKey,e.method,{attempts:null==n?void 0:n.attempts,signal:null==n?void 0:n.signal}),null===(o=null==n?void 0:n.onRequestSent)||void 0===o||o.call(n),this.pendingRequests.set(i.toString(),t)}catch(s){r(s)}}))}closeConnection(){this.closeGateways(),this.listeners=[],this.session=null,this.gateway=null}disconnect(e){return V(this,0,void 0,function*(){return new Promise(t=>V(this,0,void 0,function*(){let n=!1,r=null;const o=()=>{n||(n=!0,this.removeBridgeAndSession().then(t))};try{this.closeGateways();const t=xe(null==e?void 0:e.signal);r=setTimeout(()=>{t.abort()},this.defaultOpeningDeadlineMS),yield this.sendRequest({method:"disconnect",params:[]},{onRequestSent:o,signal:t.signal,attempts:1})}catch(i){ke("Disconnect error:",i),n||this.removeBridgeAndSession().then(t)}finally{r&&clearTimeout(r),o()}}))})}listen(e){return this.listeners.push(e),()=>this.listeners=this.listeners.filter(t=>t!==e)}pause(){var e;null===(e=this.gateway)||void 0===e||e.pause(),this.pendingGateways.forEach(e=>e.pause())}unPause(){return V(this,0,void 0,function*(){const e=this.pendingGateways.map(e=>e.unPause());this.gateway&&e.push(this.gateway.unPause()),yield Promise.all(e)})}pendingGatewaysListener(e,t,n){return V(this,0,void 0,function*(){if(this.pendingGateways.includes(e))return this.closeGateways({except:e}),this.gateway&&(ke("Gateway is already opened, closing previous gateway"),yield this.gateway.close()),this.session.bridgeUrl=t,this.gateway=e,this.gateway.setErrorsListener(this.gatewayErrorsListener.bind(this)),this.gateway.setListener(this.gatewayListener.bind(this)),this.gatewayListener(n);yield e.close()})}gatewayListener(e){return V(this,0,void 0,function*(){const t=JSON.parse(this.session.sessionCrypto.decrypt($.decode(e.message).toUint8Array(),K(e.from)));if(ke("Wallet message received:",t),!("event"in t)){const e=t.id.toString(),n=this.pendingRequests.get(e);return n?(n(t),void this.pendingRequests.delete(e)):void ke(`Response id ${e} doesn't match any request's id`)}if(void 0!==t.id){const e=yield this.connectionStorage.getLastWalletEventId();if(void 0!==e&&t.id<=e)return void Re(`Received event id (=${t.id}) must be greater than stored last wallet event id (=${e}) `);"connect"!==t.event&&(yield this.connectionStorage.storeLastWalletEventId(t.id))}const n=this.listeners;"connect"===t.event&&(yield this.updateSession(t,e.from)),"disconnect"===t.event&&(ke("Removing bridge and session: received disconnect event"),yield this.removeBridgeAndSession()),n.forEach(e=>e(t))})}gatewayErrorsListener(e){return V(this,0,void 0,function*(){throw new z(`Bridge error ${JSON.stringify(e)}`)})}updateSession(e,t){return V(this,0,void 0,function*(){this.session=Object.assign(Object.assign({},this.session),{walletPublicKey:t});const n=e.payload.items.find(e=>"ton_addr"===e.name),r=Object.assign(Object.assign({},e),{payload:Object.assign(Object.assign({},e.payload),{items:[n]})});yield this.connectionStorage.storeConnection({type:"http",session:this.session,lastWalletEventId:e.id,connectEvent:r,nextRpcRequestId:0})})}removeBridgeAndSession(){return V(this,0,void 0,function*(){this.closeConnection(),yield this.connectionStorage.removeConnection()})}generateUniversalLink(e,t){return ve(e)?this.generateTGUniversalLink(e,t):this.generateRegularUniversalLink(e,t)}generateRegularUniversalLink(e,t){const n=new URL(e);return n.searchParams.append("v",2..toString()),n.searchParams.append("id",this.session.sessionCrypto.sessionId),n.searchParams.append("r",JSON.stringify(t)),n.toString()}generateTGUniversalLink(e,t){const n="tonconnect-"+be(this.generateRegularUniversalLink("about:blank",t).split("?")[1]),r=this.convertToDirectLink(e),o=new URL(r);return o.searchParams.append("startapp",n),o.toString()}convertToDirectLink(e){const t=new URL(e);return t.searchParams.has("attach")&&(t.searchParams.delete("attach"),t.pathname+="/start"),t.toString()}openGateways(e,t){return V(this,0,void 0,function*(){return Array.isArray(this.walletConnectionSource)?(this.pendingGateways.map(e=>e.close().catch()),this.pendingGateways=this.walletConnectionSource.map(t=>{const n=new Ee(this.storage,t.bridgeUrl,e.sessionId,()=>{},()=>{});return n.setListener(e=>this.pendingGatewaysListener(n,t.bridgeUrl,e)),n}),void(yield Promise.allSettled(this.pendingGateways.map(e=>Se(n=>{var r;return this.pendingGateways.some(t=>t===e)?e.registerSession({openingDeadlineMS:null!==(r=null==t?void 0:t.openingDeadlineMS)&&void 0!==r?r:this.defaultOpeningDeadlineMS,signal:n.signal}):e.close()},{attempts:Number.MAX_SAFE_INTEGER,delayMs:this.defaultRetryTimeoutMS,signal:null==t?void 0:t.signal}))))):(this.gateway&&(ke("Gateway is already opened, closing previous gateway"),yield this.gateway.close()),this.gateway=new Ee(this.storage,this.walletConnectionSource.bridgeUrl,e.sessionId,this.gatewayListener.bind(this),this.gatewayErrorsListener.bind(this)),yield this.gateway.registerSession({openingDeadlineMS:null==t?void 0:t.openingDeadlineMS,signal:null==t?void 0:t.signal}))})}closeGateways(e){var t;null===(t=this.gateway)||void 0===t||t.close(),this.pendingGateways.filter(t=>t!==(null==e?void 0:e.except)).forEach(e=>e.close()),this.pendingGateways=[]}}function _e(e,t){return Oe(e,[t])}function Oe(e,t){return!(!e||"object"!=typeof e)&&t.every(t=>t in e)}let Le=class e{static getInstance(){return e.instance||(e.instance=new e),e.instance}constructor(){this.storage={}}get length(){return Object.keys(this.storage).length}clear(){this.storage={}}getItem(e){var t;return null!==(t=this.storage[e])&&void 0!==t?t:null}key(e){var t;const n=Object.keys(this.storage);return e<0||e>=n.length?null:null!==(t=n[e])&&void 0!==t?t:null}removeItem(e){delete this.storage[e]}setItem(e,t){this.storage[e]=t}};function Ne(){if("undefined"!=typeof window)return window}function Ie(){var e;const t=null===(e=Ne())||void 0===e?void 0:e.location.origin;return t?t+"/tonconnect-manifest.json":""}function We(){if(function(){try{return"undefined"!=typeof localStorage}catch(e){return!1}}())return localStorage;if("undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node)throw new z("`localStorage` is unavailable, but it is required for TonConnect. For more details, see https://github.com/ton-connect/sdk/tree/main/packages/sdk#init-connector");return Le.getInstance()}class Pe{static fromStorage(e){return V(this,0,void 0,function*(){const t=new Me(e),n=yield t.getInjectedConnection();return new Pe(e,n.jsBridgeKey)})}static isWalletInjected(e){return Pe.isWindowContainsWallet(this.window,e)}static isInsideWalletBrowser(e){return!!Pe.isWindowContainsWallet(this.window,e)&&this.window[e].tonconnect.isWalletBrowser}static getCurrentlyInjectedWallets(){if(!this.window)return[];return function(){const e=Ne();if(!e)return[];try{return Object.keys(e)}catch(t){return[]}}().filter(([e,t])=>function(e){try{return!(!_e(e,"tonconnect")||!_e(e.tonconnect,"walletInfo"))&&Oe(e.tonconnect.walletInfo,["name","app_name","image","about_url","platforms"])}catch(t){return!1}}(t)).map(([e,t])=>({name:t.tonconnect.walletInfo.name,appName:t.tonconnect.walletInfo.app_name,aboutUrl:t.tonconnect.walletInfo.about_url,imageUrl:t.tonconnect.walletInfo.image,tondns:t.tonconnect.walletInfo.tondns,jsBridgeKey:e,injected:!0,embedded:t.tonconnect.isWalletBrowser,platforms:t.tonconnect.walletInfo.platforms,features:t.tonconnect.walletInfo.features}))}static isWindowContainsWallet(e,t){return!!e&&t in e&&"object"==typeof e[t]&&"tonconnect"in e[t]}constructor(e,t){this.injectedWalletKey=t,this.type="injected",this.unsubscribeCallback=null,this.listenSubscriptions=!1,this.listeners=[];const n=Pe.window;if(!Pe.isWindowContainsWallet(n,t))throw new X;this.connectionStorage=new Me(e),this.injectedWallet=n[t].tonconnect}connect(e){this._connect(2,e)}restoreConnection(){return V(this,0,void 0,function*(){try{ke("Injected Provider restoring connection...");const e=yield this.injectedWallet.restoreConnection();ke("Injected Provider restoring connection response",e),"connect"===e.event?(this.makeSubscriptions(),this.listeners.forEach(t=>t(e))):yield this.connectionStorage.removeConnection()}catch(e){yield this.connectionStorage.removeConnection(),console.error(e)}})}closeConnection(){this.listenSubscriptions&&this.injectedWallet.disconnect(),this.closeAllListeners()}disconnect(){return V(this,0,void 0,function*(){return new Promise(e=>{const t=()=>{this.closeAllListeners(),this.connectionStorage.removeConnection().then(e)};try{this.injectedWallet.disconnect(),t()}catch(n){ke(n),this.sendRequest({method:"disconnect",params:[]},t)}})})}closeAllListeners(){var e;this.listenSubscriptions=!1,this.listeners=[],null===(e=this.unsubscribeCallback)||void 0===e||e.call(this)}listen(e){return this.listeners.push(e),()=>this.listeners=this.listeners.filter(t=>t!==e)}sendRequest(e,t){return V(this,0,void 0,function*(){var n;const r={};"function"==typeof t?r.onRequestSent=t:(r.onRequestSent=null==t?void 0:t.onRequestSent,r.signal=null==t?void 0:t.signal);const o=(yield this.connectionStorage.getNextRpcRequestId()).toString();yield this.connectionStorage.increaseNextRpcRequestId(),ke("Send injected-bridge request:",Object.assign(Object.assign({},e),{id:o}));const i=this.injectedWallet.send(Object.assign(Object.assign({},e),{id:o}));return i.then(e=>ke("Wallet message received:",e)),null===(n=null==r?void 0:r.onRequestSent)||void 0===n||n.call(r),i})}_connect(e,t){return V(this,0,void 0,function*(){try{ke(`Injected Provider connect request: protocolVersion: ${e}, message:`,t);const n=yield this.injectedWallet.connect(e,t);ke("Injected Provider connect response:",n),"connect"===n.event&&(yield this.updateSession(),this.makeSubscriptions()),this.listeners.forEach(e=>e(n))}catch(n){ke("Injected Provider connect error:",n);const e={event:"connect_error",payload:{code:0,message:null==n?void 0:n.toString()}};this.listeners.forEach(t=>t(e))}})}makeSubscriptions(){this.listenSubscriptions=!0,this.unsubscribeCallback=this.injectedWallet.listen(e=>{ke("Wallet message received:",e),this.listenSubscriptions&&this.listeners.forEach(t=>t(e)),"disconnect"===e.event&&this.disconnect()})}updateSession(){return this.connectionStorage.storeConnection({type:"injected",jsBridgeKey:this.injectedWalletKey,nextRpcRequestId:0})}}Pe.window=Ne();class Ue{constructor(){this.localStorage=We()}getItem(e){return V(this,0,void 0,function*(){return this.localStorage.getItem(e)})}removeItem(e){return V(this,0,void 0,function*(){this.localStorage.removeItem(e)})}setItem(e,t){return V(this,0,void 0,function*(){this.localStorage.setItem(e,t)})}}function De(e){return Be(e)&&e.injected}function je(e){return De(e)&&e.embedded}function Be(e){return"jsBridgeKey"in e}function $e(e){return"bridgeUrl"in e}const qe=[{app_name:"telegram-wallet",name:"Wallet",image:"https://wallet.tg/images/logo-288.png",about_url:"https://wallet.tg/",universal_url:"https://t.me/wallet?attach=wallet",bridge:[{type:"sse",url:"https://walletbot.me/tonconnect-bridge/bridge"}],platforms:["ios","android","macos","windows","linux"]},{app_name:"tonkeeper",name:"Tonkeeper",image:"https://tonkeeper.com/assets/tonconnect-icon.png",tondns:"tonkeeper.ton",about_url:"https://tonkeeper.com",universal_url:"https://app.tonkeeper.com/ton-connect",deepLink:"tonkeeper-tc://",bridge:[{type:"sse",url:"https://bridge.tonapi.io/bridge"},{type:"js",key:"tonkeeper"}],platforms:["ios","android","chrome","firefox","macos"]},{app_name:"mytonwallet",name:"MyTonWallet",image:"https://static.mytonwallet.io/icon-256.png",about_url:"https://mytonwallet.io",universal_url:"https://connect.mytonwallet.org",bridge:[{type:"js",key:"mytonwallet"},{type:"sse",url:"https://tonconnectbridge.mytonwallet.org/bridge/"}],platforms:["chrome","windows","macos","linux","ios","android","firefox"]},{app_name:"tonhub",name:"Tonhub",image:"https://tonhub.com/tonconnect_logo.png",about_url:"https://tonhub.com",universal_url:"https://tonhub.com/ton-connect",bridge:[{type:"js",key:"tonhub"},{type:"sse",url:"https://connect.tonhubapi.com/tonconnect"}],platforms:["ios","android"]},{app_name:"bitgetTonWallet",name:"Bitget Wallet",image:"https://raw.githubusercontent.com/bitgetwallet/download/refs/heads/main/logo/png/bitget_wallet_logo_288_mini.png",about_url:"https://web3.bitget.com",deepLink:"bitkeep://",bridge:[{type:"js",key:"bitgetTonWallet"},{type:"sse",url:"https://ton-connect-bridge.bgwapi.io/bridge"}],platforms:["ios","android","chrome"],universal_url:"https://bkcode.vip/ton-connect"},{app_name:"okxMiniWallet",name:"OKX Mini Wallet",image:"https://static.okx.com/cdn/assets/imgs/2411/8BE1A4A434D8F58A.png",about_url:"https://www.okx.com/web3",universal_url:"https://t.me/OKX_WALLET_BOT?attach=wallet",bridge:[{type:"sse",url:"https://www.okx.com/tonbridge/discover/rpc/bridge"}],platforms:["ios","android","macos","windows","linux"]},{app_name:"binanceWeb3TonWallet",name:"Binance Web3 Wallet",image:"https://public.bnbstatic.com/static/binance-w3w/ton-provider/binancew3w.png",about_url:"https://www.binance.com/en/web3wallet",deepLink:"bnc://app.binance.com/cedefi/ton-connect",bridge:[{type:"js",key:"binancew3w"},{type:"sse",url:"https://wallet.binance.com/tonbridge/bridge"}],platforms:["ios","android","macos","windows","linux"],universal_url:"https://app.binance.com/cedefi/ton-connect"},{app_name:"fintopio-tg",name:"Fintopio",image:"https://fintopio.com/tonconnect-icon.png",about_url:"https://fintopio.com",universal_url:"https://t.me/fintopio?attach=wallet",bridge:[{type:"sse",url:"https://wallet-bridge.fintopio.com/bridge"}],platforms:["ios","android","macos","windows","linux"]},{app_name:"okxTonWallet",name:"OKX Wallet",image:"https://static.okx.com/cdn/assets/imgs/247/58E63FEA47A2B7D7.png",about_url:"https://www.okx.com/web3",universal_url:"https://www.okx.com/download?appendQuery=true&deeplink=okx://web3/wallet/tonconnect",bridge:[{type:"js",key:"okxTonWallet"},{type:"sse",url:"https://www.okx.com/tonbridge/discover/rpc/bridge"}],platforms:["chrome","safari","firefox","ios","android"]},{app_name:"hot",name:"HOT",image:"https://raw.githubusercontent.com/hot-dao/media/main/logo.png",about_url:"https://hot-labs.org/",universal_url:"https://t.me/herewalletbot?attach=wallet",bridge:[{type:"sse",url:"https://sse-bridge.hot-labs.org"},{type:"js",key:"hotWallet"}],platforms:["ios","android","macos","windows","linux"]},{app_name:"bybitTonWallet",name:"Bybit Wallet",image:"https://raw.githubusercontent.com/bybit-web3/bybit-web3.github.io/main/docs/images/bybit-logo.png",about_url:"https://www.bybit.com/web3",universal_url:"https://app.bybit.com/ton-connect",deepLink:"bybitapp://",bridge:[{type:"js",key:"bybitTonWallet"},{type:"sse",url:"https://api-node.bybit.com/spot/api/web3/bridge/ton/bridge"}],platforms:["ios","android","chrome"]},{app_name:"dewallet",name:"DeWallet",image:"https://raw.githubusercontent.com/delab-team/manifests-images/main/WalletAvatar.png",about_url:"https://delabwallet.com",universal_url:"https://t.me/dewallet?attach=wallet",bridge:[{type:"sse",url:"https://bridge.dewallet.pro/bridge"}],platforms:["ios","android","macos","windows","linux"]},{app_name:"safepalwallet",name:"SafePal",image:"https://s.pvcliping.com/web/public_image/SafePal_x288.png",tondns:"",about_url:"https://www.safepal.com",universal_url:"https://link.safepal.io/ton-connect",deepLink:"safepal-tc://",bridge:[{type:"sse",url:"https://ton-bridge.safepal.com/tonbridge/v1/bridge"},{type:"js",key:"safepalwallet"}],platforms:["ios","android","chrome","firefox"]},{app_name:"GateWallet",name:"GateWallet",image:"https://img.gatedataimg.com/prd-ordinal-imgs/036f07bb8730716e/gateio-0925.png",about_url:"https://www.gate.io/",bridge:[{type:"js",key:"gatetonwallet"},{type:"sse",url:"https://dapp.gateio.services/tonbridge_api/bridge/v1"}],platforms:["ios","android"],universal_url:"https://gateio.go.link/gateio/web3?adj_t=1ff8khdw_1fu4ccc7"},{app_name:"openmask",name:"OpenMask",image:"https://raw.githubusercontent.com/OpenProduct/openmask-extension/main/public/openmask-logo-288.png",about_url:"https://www.openmask.app/",bridge:[{type:"js",key:"openmask"}],platforms:["chrome"]},{app_name:"BitgetWeb3",name:"BitgetWeb3",image:"https://img.bitgetimg.com/image/third/1731638059795.png",about_url:"​https://www.bitget.com",universal_url:"https://t.me/BitgetOfficialBot?attach=wallet",bridge:[{type:"sse",url:"https://ton-connect-bridge.bgwapi.io/bridge"}],platforms:["ios","android","windows","macos","linux"]},{app_name:"tobi",name:"Tobi",image:"https://app.tobiwallet.app/icons/logo-288.png",about_url:"https://tobi.fun",universal_url:"https://t.me/TobiCopilotBot?attach=wallet",bridge:[{type:"sse",url:"https://ton-bridge.tobiwallet.app/bridge"}],platforms:["ios","android","macos","windows","linux"]},{app_name:"xtonwallet",name:"XTONWallet",image:"https://xtonwallet.com/assets/img/icon-256-back.png",about_url:"https://xtonwallet.com",bridge:[{type:"js",key:"xtonwallet"}],platforms:["chrome","firefox"]},{app_name:"tonwallet",name:"TON Wallet",image:"https://wallet.ton.org/assets/ui/qr-logo.png",about_url:"https://chrome.google.com/webstore/detail/ton-wallet/nphplpgoakhhjchkkhmiggakijnkhfnd",bridge:[{type:"js",key:"tonwallet"}],platforms:["chrome"]}];let Ke=!1,He=null;function Fe(){return Ke}function Ve(e){Fe()&&console.error(`[QA Mode] Validation failed: ${e}`)}function ze(){if("undefined"==typeof window)return;if(document.getElementById("ton-connect-qa-banner"))return;const e=document.createElement("div");e.id="ton-connect-qa-banner",e.style.cssText="\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n background: linear-gradient(90deg, #ff6b6b, #ff8e8e);\n color: white;\n padding: 12px 20px;\n text-align: center;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;\n font-weight: 600;\n font-size: 14px;\n z-index: 999999;\n box-shadow: 0 2px 8px rgba(0,0,0,0.2);\n animation: slideDown 0.3s ease-out;\n user-select: none;\n pointer-events: none;\n ",e.innerHTML="\n 🚨 QA Mode Active - Validation Disabled (Unsafe for Production)\n ";const t=document.createElement("style");t.textContent="\n @keyframes slideDown {\n from { transform: translateY(-100%); }\n to { transform: translateY(0); }\n }\n ",document.head.appendChild(t),document.body.appendChild(e),Ze()}function Ze(){if("undefined"==typeof window)return;if(document.getElementById("ton-connect-qa-mode-styles"))return;const e=document.createElement("style");e.id="ton-connect-qa-mode-styles",e.textContent="\n body.qa-mode-active {\n padding-top: 48px !important;\n }\n \n body.qa-mode-active header {\n margin-top: 48px !important;\n }\n \n body.qa-mode-active .qa-mode-control {\n top: 128px !important;\n }\n ",document.head.appendChild(e),document.body.classList.add("qa-mode-active")}class Ge{constructor(e){var t;this.walletsListCache=null,this.walletsListCacheCreationTimestamp=null,Fe()?this.walletsListSource="https://raw.githubusercontent.com/ton-connect/wallets-list-staging/refs/heads/main/wallets-v2.json":this.walletsListSource=null!==(t=null==e?void 0:e.walletsListSource)&&void 0!==t?t:"https://raw.githubusercontent.com/ton-blockchain/wallets-list/main/wallets-v2.json",this.cacheTTLMs=null==e?void 0:e.cacheTTLMs}getWallets(){return V(this,0,void 0,function*(){return this.cacheTTLMs&&this.walletsListCacheCreationTimestamp&&Date.now()>this.walletsListCacheCreationTimestamp+this.cacheTTLMs&&(this.walletsListCache=null),this.walletsListCache||(this.walletsListCache=this.fetchWalletsList(),this.walletsListCache.then(()=>{this.walletsListCacheCreationTimestamp=Date.now()}).catch(()=>{this.walletsListCache=null,this.walletsListCacheCreationTimestamp=null})),this.walletsListCache})}getEmbeddedWallet(){return V(this,0,void 0,function*(){const e=(yield this.getWallets()).filter(je);return 1===e.length?e[0]:null})}fetchWalletsList(){return V(this,0,void 0,function*(){let e=[];try{const t=yield fetch(this.walletsListSource);if(e=yield t.json(),!Array.isArray(e))throw new ae("Wrong wallets list format, wallets list must be an array.");const n=e.filter(e=>!this.isCorrectWalletConfigDTO(e));n.length&&(Re(`Wallet(s) ${n.map(e=>(null==e?void 0:e.name)||"unknown").join(", ")} config format is wrong. They were removed from the wallets list.`),e=e.filter(e=>this.isCorrectWalletConfigDTO(e)))}catch(n){Re(n),e=qe}let t=[];try{t=Pe.getCurrentlyInjectedWallets()}catch(n){Re(n)}return this.mergeWalletsLists(this.walletConfigDTOListToWalletConfigList(e),t)})}walletConfigDTOListToWalletConfigList(e){return e.map(e=>{const t={name:e.name,appName:e.app_name,imageUrl:e.image,aboutUrl:e.about_url,tondns:e.tondns,platforms:e.platforms,features:e.features};return e.bridge.forEach(n=>{if("sse"===n.type&&(t.bridgeUrl=n.url,t.universalLink=e.universal_url,t.deepLink=e.deepLink),"js"===n.type){const e=n.key;t.jsBridgeKey=e,t.injected=Pe.isWalletInjected(e),t.embedded=Pe.isInsideWalletBrowser(e)}}),t})}mergeWalletsLists(e,t){return[...new Set(e.concat(t).map(e=>e.name)).values()].map(n=>{const r=e.find(e=>e.name===n),o=t.find(e=>e.name===n);return Object.assign(Object.assign({},r&&Object.assign({},r)),o&&Object.assign({},o))})}isCorrectWalletConfigDTO(e){if(!e||"object"!=typeof e)return!1;if(!("name"in e&&"image"in e&&"about_url"in e&&"platforms"in e&&"app_name"in e))return!1;if(!e.platforms||!Array.isArray(e.platforms)||!e.platforms.length)return!1;if(!("bridge"in e)||!Array.isArray(e.bridge)||!e.bridge.length)return!1;const t=e.bridge;if(t.some(e=>!e||"object"!=typeof e||!("type"in e)))return!1;const n=t.find(e=>"sse"===e.type);if(n&&("object"!=typeof n||!("url"in n)||!n.url||!e.universal_url))return!1;const r=t.find(e=>"js"===e.type);return!!(!r||"object"==typeof r&&"key"in r&&r.key)}}function Ye(e,t){const n=e.includes("SendTransaction"),r=Je(e,"SendTransaction"),o={minMessages:t.requiredMessagesNumber,extraCurrencyRequired:t.requireExtraCurrencies};if(!n&&!r)throw new ee("Wallet doesn't support SendTransaction feature.",{cause:{requiredFeature:{featureName:"SendTransaction",value:o}}});if(t.requireExtraCurrencies&&(!r||!r.extraCurrencySupported))throw new ee("Wallet is not able to handle such SendTransaction request. Extra currencies support is required.",{cause:{requiredFeature:{featureName:"SendTransaction",value:o}}});if(r&&void 0!==r.maxMessages){if(r.maxMessages<t.requiredMessagesNumber)throw new ee(`Wallet is not able to handle such SendTransaction request. Max support messages number is ${r.maxMessages}, but ${t.requiredMessagesNumber} is required.`,{cause:{requiredFeature:{featureName:"SendTransaction",value:o}}})}else!function(...e){try{console.warn("[TON_CONNECT_SDK]",...e)}catch(t){}}("Connected wallet didn't provide information about max allowed messages in the SendTransaction request. Request may be rejected by the wallet.")}function Qe(e,t){if("object"!=typeof t)return!0;const{sendTransaction:n,signData:r}=t;if(n){const t=Je(e,"SendTransaction");if(!t)return!1;if(!function(e,t){const n=void 0===t.minMessages||t.minMessages<=e.maxMessages,r=!t.extraCurrencyRequired||e.extraCurrencySupported;return!(!n||!r)}(t,n))return!1}if(r){const t=Je(e,"SignData");if(!t)return!1;if(!function(e,t){return t.types.every(t=>e.types.includes(t))}(t,r))return!1}return!0}function Je(e,t){return e.find(e=>e&&"object"==typeof e&&e.name===t)}function Xe(){return{type:"request-version"}}function et(e){return{type:"response-version",version:e}}function tt(e){return{ton_connect_sdk_lib:e.ton_connect_sdk_lib,ton_connect_ui_lib:e.ton_connect_ui_lib}}function nt(e,t){var n,r,o,i,a,s,l,c;const u=(null===(n=null==t?void 0:t.connectItems)||void 0===n?void 0:n.tonProof)&&"proof"in t.connectItems.tonProof?"ton_proof":"ton_addr";return{wallet_address:null!==(o=null===(r=null==t?void 0:t.account)||void 0===r?void 0:r.address)&&void 0!==o?o:null,wallet_type:null!==(i=null==t?void 0:t.device.appName)&&void 0!==i?i:null,wallet_version:null!==(a=null==t?void 0:t.device.appVersion)&&void 0!==a?a:null,auth_type:u,custom_data:Object.assign({chain_id:null!==(l=null===(s=null==t?void 0:t.account)||void 0===s?void 0:s.chain)&&void 0!==l?l:null,provider:null!==(c=null==t?void 0:t.provider)&&void 0!==c?c:null},tt(e))}}function rt(e){return{type:"connection-started",custom_data:tt(e)}}function ot(e,t){return Object.assign({type:"connection-completed",is_success:!0},nt(e,t))}function it(e,t,n){return{type:"connection-error",is_success:!1,error_message:t,error_code:null!=n?n:null,custom_data:tt(e)}}function at(e){return{type:"connection-restoring-started",custom_data:tt(e)}}function st(e,t){return Object.assign({type:"connection-restoring-completed",is_success:!0},nt(e,t))}function lt(e,t){return{type:"connection-restoring-error",is_success:!1,error_message:t,custom_data:tt(e)}}function ct(e,t){var n,r,o,i;return{valid_until:null!==(n=String(t.validUntil))&&void 0!==n?n:null,from:null!==(i=null!==(r=t.from)&&void 0!==r?r:null===(o=null==e?void 0:e.account)||void 0===o?void 0:o.address)&&void 0!==i?i:null,messages:t.messages.map(e=>{var t,n;return{address:null!==(t=e.address)&&void 0!==t?t:null,amount:null!==(n=e.amount)&&void 0!==n?n:null}})}}function ut(e,t,n){return Object.assign(Object.assign({type:"transaction-sent-for-signature"},nt(e,t)),ct(t,n))}function dt(e,t,n,r){return Object.assign(Object.assign({type:"transaction-signed",is_success:!0,signed_transaction:r.boc},nt(e,t)),ct(t,n))}function ht(e,t,n,r,o){return Object.assign(Object.assign({type:"transaction-signing-failed",is_success:!1,error_message:r,error_code:null!=o?o:null},nt(e,t)),ct(t,n))}function ft(e,t,n){return Object.assign({type:"sign-data-request-initiated",data:n},nt(e,t))}function pt(e,t,n,r){return Object.assign({type:"sign-data-request-completed",is_success:!0,data:n,signed_data:r},nt(e,t))}function gt(e,t,n,r,o){return Object.assign({type:"sign-data-request-failed",is_success:!1,data:n,error_message:r,error_code:null!=o?o:null},nt(e,t))}function mt(e,t,n){return Object.assign({type:"disconnection",scope:n},nt(e,t))}class wt{constructor(){this.window=Ne()}dispatchEvent(e,t){return V(this,0,void 0,function*(){var n;const r=new CustomEvent(e,{detail:t});null===(n=this.window)||void 0===n||n.dispatchEvent(r)})}addEventListener(e,t,n){return V(this,0,void 0,function*(){var r;return null===(r=this.window)||void 0===r||r.addEventListener(e,t,n),()=>{var n;return null===(n=this.window)||void 0===n?void 0:n.removeEventListener(e,t)}})}}class yt{get version(){return tt({ton_connect_sdk_lib:this.tonConnectSdkVersion,ton_connect_ui_lib:this.tonConnectUiVersion})}constructor(e){var t;this.eventPrefix="ton-connect-",this.tonConnectUiVersion=null,this.eventDispatcher=null!==(t=null==e?void 0:e.eventDispatcher)&&void 0!==t?t:new wt,this.tonConnectSdkVersion=e.tonConnectSdkVersion,this.init().catch()}init(){return V(this,0,void 0,function*(){try{yield this.setRequestVersionHandler(),this.tonConnectUiVersion=yield this.requestTonConnectUiVersion()}catch(e){}})}setRequestVersionHandler(){return V(this,0,void 0,function*(){yield this.eventDispatcher.addEventListener("ton-connect-request-version",()=>V(this,0,void 0,function*(){yield this.eventDispatcher.dispatchEvent("ton-connect-response-version",et(this.tonConnectSdkVersion))}))})}requestTonConnectUiVersion(){return V(this,0,void 0,function*(){return new Promise((e,t)=>V(this,0,void 0,function*(){try{yield this.eventDispatcher.addEventListener("ton-connect-ui-response-version",t=>{e(t.detail.version)},{once:!0}),yield this.eventDispatcher.dispatchEvent("ton-connect-ui-request-version",{type:"request-version"})}catch(n){t(n)}}))})}dispatchUserActionEvent(e){try{this.eventDispatcher.dispatchEvent(`${this.eventPrefix}${e.type}`,e).catch()}catch(t){}}trackConnectionStarted(...e){try{const t=rt(this.version,...e);this.dispatchUserActionEvent(t)}catch(t){}}trackConnectionCompleted(...e){try{const t=ot(this.version,...e);this.dispatchUserActionEvent(t)}catch(t){}}trackConnectionError(...e){try{const t=it(this.version,...e);this.dispatchUserActionEvent(t)}catch(t){}}trackConnectionRestoringStarted(...e){try{const t=at(this.version,...e);this.dispatchUserActionEvent(t)}catch(t){}}trackConnectionRestoringCompleted(...e){try{const t=st(this.version,...e);this.dispatchUserActionEvent(t)}catch(t){}}trackConnectionRestoringError(...e){try{const t=lt(this.version,...e);this.dispatchUserActionEvent(t)}catch(t){}}trackDisconnection(...e){try{const t=mt(this.version,...e);this.dispatchUserActionEvent(t)}catch(t){}}trackTransactionSentForSignature(...e){try{const t=ut(this.version,...e);this.dispatchUserActionEvent(t)}catch(t){}}trackTransactionSigned(...e){try{const t=dt(this.version,...e);this.dispatchUserActionEvent(t)}catch(t){}}trackTransactionSigningFailed(...e){try{const t=ht(this.version,...e);this.dispatchUserActionEvent(t)}catch(t){}}trackDataSentForSignature(...e){try{const t=ft(this.version,...e);this.dispatchUserActionEvent(t)}catch(t){}}trackDataSigned(...e){try{const t=pt(this.version,...e);this.dispatchUserActionEvent(t)}catch(t){}}trackDataSigningFailed(...e){try{const t=gt(this.version,...e);this.dispatchUserActionEvent(t)}catch(t){}}}function vt(e,t=!1){const{wc:n,hex:r}=Ct(e);let o=81;t&&(o|=128);const i=new Int8Array(34);i[0]=o,i[1]=n,i.set(r,2);const a=new Uint8Array(36);return a.set(i),a.set(xt(i),34),$.encode(a).replace(/\+/g,"-").replace(/\//g,"_")}function bt(e){try{return function(e){const t=e.replace(/-/g,"+").replace(/_/g,"/");let n;try{n=$.decode(t).toUint8Array()}catch(d){throw new se(`Invalid base64 encoding in address: ${e}`)}if(36!==n.length)throw new se(`Invalid address length: ${e}`);const r=n.slice(0,34),o=n.slice(34),i=xt(r);if(!o.every((e,t)=>e===i[t]))throw new se(`Invalid checksum in address: ${e}`);const a=r[0],s=r[1],l=r.slice(2);if(0!==s&&-1!==s)throw new se(`Invalid workchain: ${s}`);const c=!!(128&a),u=!!(64&a);Array.from(l).map(e=>e.toString(16).padStart(2,"0")).join("")}(e),!0}catch(t){return!1}}function Ct(e){if(!e.includes(":"))throw new se(`Wrong address ${e}. Address must include ":".`);const t=e.split(":");if(2!==t.length)throw new se(`Wrong address ${e}. Address must include ":" only once.`);const n=parseInt(t[0]);if(0!==n&&-1!==n)throw new se(`Wrong address ${e}. WC must be eq 0 or -1, but ${n} received.`);const r=t[1];if(64!==(null==r?void 0:r.length))throw new se(`Wrong address ${e}. Hex part must be 64bytes length, but ${null==r?void 0:r.length} received.`);return{wc:n,hex:kt(r)}}function xt(e){let t=0;const n=new Uint8Array(e.length+2);n.set(e);for(let r of n){let e=128;for(;e>0;)t<<=1,r&e&&(t+=1),e>>=1,t>65535&&(t&=65535,t^=4129)}return new Uint8Array([Math.floor(t/256),t%256])}const St={};for(let of=0;of<=255;of++){let e=of.toString(16);e.length<2&&(e="0"+e),St[e]=of}function kt(e){const t=(e=e.toLowerCase()).length;if(t%2!=0)throw new le("Hex string must have length a multiple of 2: "+e);const n=t/2,r=new Uint8Array(n);for(let o=0;o<n;o++){const t=2*o,n=e.substring(t,t+2);if(!St.hasOwnProperty(n))throw new le("Invalid hex character: "+n);r[o]=St[n]}return r}const Rt=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/,Et=/^-?\d+$/,At=/^\d+$/;function Mt(e){return"string"==typeof e&&e.length>0}function Tt(e){return"string"==typeof e&&Rt.test(e)&&e.startsWith("te6cc")}function _t(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function Ot(e,t){return Object.keys(e).some(e=>!t.includes(e))}function Lt(e){if(console.log("[Validation Debug] validateSendTransactionRequest called"),console.log("[Validation Debug] isQaModeEnabled():",Fe()),!_t(e)){const e="Request must be an object";Ve(e);const t=Fe();return console.log("[Validation Debug] Should return null:",t),t?null:e}if(Ot(e,["validUntil","network","from","messages"])){const e="Request contains extra properties";return Ve(e),Fe()?null:e}if("number"!=typeof(t=e.validUntil)||isNaN(t)){const e="Incorrect 'validUntil'";return Ve(e),Fe()?null:e}var t;const n=Math.floor(Date.now()/1e3),r=n+300;if(e.validUntil>r&&console.warn(`validUntil (${e.validUntil}) is more than 5 minutes from now (${n})`),!(void 0===e.network||Mt(e.network)&&/^[\d-]+$/.test(e.network))){const e="Invalid 'network' format";return Ve(e),Fe()?null:e}if(!(void 0===e.from||Mt(e.from)&&function(e){try{return Ct(e),!0}catch(t){return!1}}(e.from))){const e="Invalid 'from' address format";return Ve(e),Fe()?null:e}if(!function(e){return Array.isArray(e)}(e.messages)||0===e.messages.length){const e="'messages' is required";return Ve(e),Fe()?null:e}for(let o=0;o<e.messages.length;o++){const t=Nt(e.messages[o],o);if(t)return t}return null}function Nt(e,t){if(!_t(e))return`Message at index ${t} must be an object`;if(Ot(e,["address","amount","stateInit","payload","extraCurrency"]))return`Message at index ${t} contains extra properties`;if(!Mt(e.address))return`'address' is required in message at index ${t}`;if(!bt(e.address))return`Wrong 'address' format in message at index ${t}`;if(!Mt(e.amount))return`'amount' is required in message at index ${t}`;if(!/^[0-9]+$/.test(e.amount))return`Incorrect 'amount' in message at index ${t}`;if(!(void 0===e.stateInit||Mt(e.stateInit)&&Tt(e.stateInit)))return`Invalid 'stateInit' in message at index ${t}`;if(!(void 0===e.payload||Mt(e.payload)&&Tt(e.payload)))return`Invalid 'payload' in message at index ${t}`;if(void 0!==e.extraCurrency){if(!_t(e.extraCurrency))return`Invalid 'extraCurrency' in message at index ${t}`;for(const[n,r]of Object.entries(e.extraCurrency))if(!Et.test(n)||"string"!=typeof r||!At.test(r))return`Invalid 'extraCurrency' format in message at index ${t}`}return null}function It(e){if(!_t(e))return"Payload must be an object";if(!Mt(e.type))return"'type' is required";switch(e.type){case"text":return function(e){if(Ot(e,["type","text","network","from"]))return"Text payload contains extra properties";if(!Mt(e.text))return"'text' is required";if(!(void 0===e.network||Mt(e.network)&&/^\d+$/.test(e.network)))return"Invalid 'network' format";if(void 0!==e.from&&!Mt(e.from))return"Invalid 'from'";return null}(e);case"binary":return function(e){if(Ot(e,["type","bytes","network","from"]))return"Binary payload contains extra properties";if(!Mt(e.bytes))return"'bytes' is required";if(!(void 0===e.network||Mt(e.network)&&/^\d+$/.test(e.network)))return"Invalid 'network' format";if(void 0!==e.from&&!Mt(e.from))return"Invalid 'from'";return null}(e);case"cell":return function(e){if(Ot(e,["type","schema","cell","network","from"]))return"Cell payload contains extra properties";if(!Mt(e.schema))return"'schema' is required";if(!Mt(e.cell))return"'cell' is required";if(!Tt(e.cell))return"Invalid 'cell' format (must be valid base64)";if(!(void 0===e.network||Mt(e.network)&&/^\d+$/.test(e.network)))return"Invalid 'network' format";if(void 0!==e.from&&!Mt(e.from))return"Invalid 'from'";return null}(e);default:return"Invalid 'type' value"}}class Wt{static getWallets(){return this.walletsList.getWallets()}get connected(){return null!==this._wallet}get account(){var e;return(null===(e=this._wallet)||void 0===e?void 0:e.account)||null}get wallet(){return this._wallet}set wallet(e){this._wallet=e,this.statusChangeSubscriptions.forEach(e=>e(this._wallet))}constructor(e){if(this.walletsList=new Ge,this._wallet=null,this.provider=null,this.statusChangeSubscriptions=[],this.statusChangeErrorSubscriptions=[],this.dappSettings={manifestUrl:(null==e?void 0:e.manifestUrl)||Ie(),storage:(null==e?void 0:e.storage)||new Ue},this.walletsRequiredFeatures=null==e?void 0:e.walletsRequiredFeatures,this.walletsList=new Ge({walletsListSource:null==e?void 0:e.walletsListSource,cacheTTLMs:null==e?void 0:e.walletsListCacheTTLMs}),this.tracker=new yt({eventDispatcher:null==e?void 0:e.eventDispatcher,tonConnectSdkVersion:"3.3.0-beta.2"}),!this.dappSettings.manifestUrl)throw new Z("Dapp tonconnect-manifest.json must be specified if window.location.origin is undefined. See more https://github.com/ton-connect/docs/blob/main/requests-responses.md#app-manifest");this.bridgeConnectionStorage=new Me(this.dappSettings.storage),(null==e?void 0:e.disableAutoPauseConnection)||this.addWindowFocusAndBlurSubscriptions()}getWallets(){return this.walletsList.getWallets()}onStatusChange(e,t){return this.statusChangeSubscriptions.push(e),t&&this.statusChangeErrorSubscriptions.push(t),()=>{this.statusChangeSubscriptions=this.statusChangeSubscriptions.filter(t=>t!==e),t&&(this.statusChangeErrorSubscriptions=this.statusChangeErrorSubscriptions.filter(e=>e!==t))}}connect(e,t){var n,r;const o={};if("object"==typeof t&&"tonProof"in t&&(o.request=t),"object"==typeof t&&("openingDeadlineMS"in t||"signal"in t||"request"in t)&&(o.request=null==t?void 0:t.request,o.openingDeadlineMS=null==t?void 0:t.openingDeadlineMS,o.signal=null==t?void 0:t.signal),o.request){const e=_t(i=o.request)?Ot(i,["tonProof"])?"Request contains extra properties":void 0===i.tonProof||Mt(i.tonProof)?null:"Invalid 'tonProof'":"Request must be an object";if(e){if(!Fe())throw new z("ConnectAdditionalRequest validation failed: "+e);console.error("ConnectAdditionalRequest validation failed: "+e)}}var i;if(this.connected)throw new Q;const a=xe(null==o?void 0:o.signal);if(null===(n=this.abortController)||void 0===n||n.abort(),this.abortController=a,a.signal.aborted)throw new z("Connection was aborted");return null===(r=this.provider)||void 0===r||r.closeConnection(),this.provider=this.createProvider(e),a.signal.addEventListener("abort",()=>{var e;null===(e=this.provider)||void 0===e||e.closeConnection(),this.provider=null}),this.tracker.trackConnectionStarted(),this.provider.connect(this.createConnectRequest(null==o?void 0:o.request),{openingDeadlineMS:null==o?void 0:o.openingDeadlineMS,signal:a.signal})}restoreConnection(e){return V(this,0,void 0,function*(){var t,n;this.tracker.trackConnectionRestoringStarted();const r=xe(null==e?void 0:e.signal);if(null===(t=this.abortController)||void 0===t||t.abort(),this.abortController=r,r.signal.aborted)return void this.tracker.trackConnectionRestoringError("Connection restoring was aborted");const[o,i]=yield Promise.all([this.bridgeConnectionStorage.storedConnectionType(),this.walletsList.getEmbeddedWallet()]);if(r.signal.aborted)return void this.tracker.trackConnectionRestoringError("Connection restoring was aborted");let a=null;try{switch(o){case"http":a=yield Te.fromStorage(this.dappSettings.storage);break;case"injected":a=yield Pe.fromStorage(this.dappSettings.storage);break;default:if(!i)return;a=this.createProvider(i)}}catch(u){return this.tracker.trackConnectionRestoringError("Provider is not restored"),yield this.bridgeConnectionStorage.removeConnection(),null==a||a.closeConnection(),void(a=null)}if(r.signal.aborted)return null==a||a.closeConnection(),void this.tracker.trackConnectionRestoringError("Connection restoring was aborted");if(!a)return Re("Provider is not restored"),void this.tracker.trackConnectionRestoringError("Provider is not restored");null===(n=this.provider)||void 0===n||n.closeConnection(),this.provider=a,a.listen(this.walletEventsListener.bind(this));const s=()=>{this.tracker.trackConnectionRestoringError("Connection restoring was aborted"),null==a||a.closeConnection(),a=null};r.signal.addEventListener("abort",s);const l=Se(t=>V(this,0,void 0,function*(){yield null==a?void 0:a.restoreConnection({openingDeadlineMS:null==e?void 0:e.openingDeadlineMS,signal:t.signal}),r.signal.removeEventListener("abort",s),this.connected?this.tracker.trackConnectionRestoringCompleted(this.wallet):this.tracker.trackConnectionRestoringError("Connection restoring failed")}),{attempts:Number.MAX_SAFE_INTEGER,delayMs:2e3,signal:null==e?void 0:e.signal}),c=new Promise(e=>setTimeout(()=>e(),12e3));return Promise.race([l,c])})}sendTransaction(e,t){return V(this,0,void 0,function*(){const n={};"function"==typeof t?n.onRequestSent=t:(n.onRequestSent=null==t?void 0:t.onRequestSent,n.signal=null==t?void 0:t.signal);const r=Lt(e);if(r){if(!Fe())throw new z("SendTransactionRequest validation failed: "+r);console.error("SendTransactionRequest validation failed: "+r)}const o=xe(null==n?void 0:n.signal);if(o.signal.aborted)throw new z("Transaction sending was aborted");this.checkConnection();const i=e.messages.length,a=e.messages.some(e=>e.extraCurrency&&Object.keys(e.extraCurrency).length>0);Ye(this.wallet.device.features,{requiredMessagesNumber:i,requireExtraCurrencies:a}),this.tracker.trackTransactionSentForSignature(this.wallet,e);const{validUntil:s,messages:l}=e,c=F(e,["validUntil","messages"]),u=e.from||this.account.address,d=e.network||this.account.chain,h=yield this.provider.sendRequest(pe.convertToRpcRequest(Object.assign(Object.assign({},c),{from:u,network:d,valid_until:s,messages:l.map(e=>{var{extraCurrency:t}=e,n=F(e,["extraCurrency"]);return Object.assign(Object.assign({},n),{extra_currency:t})})})),{onRequestSent:n.onRequestSent,signal:o.signal});if(pe.isError(h))return this.tracker.trackTransactionSigningFailed(this.wallet,e,h.error.message,h.error.code),pe.parseAndThrowError(h);const f=pe.convertFromRpcResponse(h);return this.tracker.trackTransactionSigned(this.wallet,e,f),f})}signData(e,t){return V(this,0,void 0,function*(){const n=xe(null==t?void 0:t.signal);if(n.signal.aborted)throw new z("data sending was aborted");const r=It(e);if(r){if(!Fe())throw new z("SignDataPayload validation failed: "+r);console.error("SignDataPayload validation failed: "+r)}this.checkConnection(),function(e,t){const n=e.find(e=>e&&"object"==typeof e&&"SignData"===e.name);if(!n)throw new ee("Wallet doesn't support SignData feature.",{cause:{requiredFeature:{featureName:"SignData",value:{types:t.requiredTypes}}}});const r=t.requiredTypes.filter(e=>!n.types.includes(e));if(r.length)throw new ee(`Wallet doesn't support required SignData types: ${r.join(", ")}.`,{cause:{requiredFeature:{featureName:"SignData",value:{types:r}}}})}(this.wallet.device.features,{requiredTypes:[e.type]}),this.tracker.trackDataSentForSignature(this.wallet,e);const o=e.from||this.account.address,i=e.network||this.account.chain,a=yield this.provider.sendRequest(me.convertToRpcRequest(Object.assign(Object.assign({},e),{from:o,network:i})),{onRequestSent:null==t?void 0:t.onRequestSent,signal:n.signal});if(me.isError(a))return this.tracker.trackDataSigningFailed(this.wallet,e,a.error.message,a.error.code),me.parseAndThrowError(a);const s=me.convertFromRpcResponse(a);return this.tracker.trackDataSigned(this.wallet,e,s),s})}disconnect(e){return V(this,0,void 0,function*(){var t;if(!this.connected)throw new J;const n=xe(null==e?void 0:e.signal),r=this.abortController;if(this.abortController=n,n.signal.aborted)throw new z("Disconnect was aborted");this.onWalletDisconnected("dapp"),yield null===(t=this.provider)||void 0===t?void 0:t.disconnect({signal:n.signal}),null==r||r.abort()})}pauseConnection(){var e;"http"===(null===(e=this.provider)||void 0===e?void 0:e.type)&&this.provider.pause()}unPauseConnection(){var e;return"http"!==(null===(e=this.provider)||void 0===e?void 0:e.type)?Promise.resolve():this.provider.unPause()}addWindowFocusAndBlurSubscriptions(){const e=function(){if("undefined"!=typeof document)return document}();if(e)try{e.addEventListener("visibilitychange",()=>{e.hidden?this.pauseConnection():this.unPauseConnection().catch(()=>{})})}catch(t){Re("Cannot subscribe to the document.visibilitychange: ",t)}}createProvider(e){let t;return t=!Array.isArray(e)&&"jsBridgeKey"in e?new Pe(this.dappSettings.storage,e.jsBridgeKey):new Te(this.dappSettings.storage,e),t.listen(this.walletEventsListener.bind(this)),t}walletEventsListener(e){switch(e.event){case"connect":this.onWalletConnected(e.payload);break;case"connect_error":this.tracker.trackConnectionError(e.payload.message,e.payload.code);const t=de.parseError(e.payload);this.onWalletConnectError(t);break;case"disconnect":this.onWalletDisconnected("wallet")}}onWalletConnected(t){var n;const r=t.items.find(e=>"ton_addr"===e.name),o=t.items.find(e=>"ton_proof"===e.name);if(!r)throw new z("ton_addr connection item was not found");if(!Qe(t.device.features,this.walletsRequiredFeatures))return null===(n=this.provider)||void 0===n||n.disconnect(),void this.onWalletConnectError(new te("Wallet does not support required features",{cause:{connectEvent:t}}));const i={device:t.device,provider:this.provider.type,account:{address:r.address,chain:r.network,walletStateInit:r.walletStateInit,publicKey:r.publicKey}};if(o){let t;try{if("proof"in o)t={name:"ton_proof",proof:{timestamp:o.proof.timestamp,domain:{lengthBytes:o.proof.domain.lengthBytes,value:o.proof.domain.value},payload:o.proof.payload,signature:o.proof.signature}};else{if(!("error"in o))throw new z("Invalid data format");t={name:"ton_proof",error:{code:o.error.code,message:o.error.message}}}}catch(a){t={name:"ton_proof",error:{code:e.CONNECT_ITEM_ERROR_CODES.UNKNOWN_ERROR,message:"Invalid data format"}}}i.connectItems={tonProof:t}}this.wallet=i,this.tracker.trackConnectionCompleted(i)}onWalletConnectError(e){if(this.statusChangeErrorSubscriptions.forEach(t=>t(e)),ke(e),e instanceof Y||e instanceof G)throw Re(e),e}onWalletDisconnected(e){this.tracker.trackDisconnection(this.wallet,e),this.wallet=null}checkConnection(){if(!this.connected)throw new J}createConnectRequest(e){const t=[{name:"ton_addr"}];return(null==e?void 0:e.tonProof)&&t.push({name:"ton_proof",payload:e.tonProof}),{manifestUrl:this.dappSettings.manifestUrl,items:t}}}Wt.walletsList=new Ge,Wt.isWalletInjected=e=>Pe.isWalletInjected(e),Wt.isInsideWalletBrowser=e=>Pe.isInsideWalletBrowser(e);const Pt=Symbol("solid-proxy"),Ut="function"==typeof Proxy,Dt=Symbol("solid-track"),jt={equals:(e,t)=>e===t};let Bt=Rn;const $t=1,qt=2,Kt={owned:null,cleanups:null,context:null,owner:null},Ht={};var Ft=null;let Vt=null,zt=null,Zt=null,Gt=null,Yt=0;function Qt(e,t){const n=zt,r=Ft,o=0===e.length,i=void 0===t?r:t,a=o?Kt:{owned:null,cleanups:null,context:i?i.context:null,owner:i},s=o?e:()=>e(()=>an(()=>Tn(a)));Ft=a,zt=null;try{return kn(s,!0)}finally{zt=n,Ft=r}}function Jt(e,t){const n={value:e,observers:null,observerSlots:null,comparator:(t=t?Object.assign({},jt,t):jt).equals||void 0};return[vn.bind(n),e=>("function"==typeof e&&(e=e(n.value)),bn(n,e))]}function Xt(e,t,n){Cn(xn(e,t,!0,$t))}function en(e,t,n){Cn(xn(e,t,!1,$t))}function tn(e,t,n){Bt=En;const r=xn(e,t,!1,$t);n&&n.render||(r.user=!0),Gt?Gt.push(r):Cn(r)}function nn(e,t,n){n=n?Object.assign({},jt,n):jt;const r=xn(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,Cn(r),vn.bind(r)}function rn(e,t,n){let r,o,i;r=!0,o=e,i={};let a=null,s=Ht,l=!1,c="initialValue"in i,u=!1;const d=new Set,[h,f]=(i.storage||Jt)(i.initialValue),[p,g]=Jt(void 0),[m,w]=Jt(void 0,{equals:!1}),[y,v]=Jt(c?"ready":"unresolved");function b(e,t,n,r){return a===e&&(a=null,void 0!==r&&(c=!0),e!==s&&t!==s||!i.onHydrated||queueMicrotask(()=>i.onHydrated(r,{value:t})),s=Ht,function(e,t){kn(()=>{void 0===t&&f(()=>e),v(void 0!==t?"errored":c?"ready":"unresolved"),g(t);for(const e of d.keys())e.decrement();d.clear()},!1)}(t,n)),t}function C(){const e=h(),t=p();if(void 0!==t&&!a)throw t;return zt&&zt.user,e}function x(e=!0){if(!1!==e&&l)return;l=!1;const t=u?u():r;if(null==t||!1===t)return void b(a,an(h));let n;const i=s!==Ht?s:an(()=>{try{return o(t,{value:h(),refetching:e})}catch(r){n=r}});var d;if(void 0===n)return(d=i)&&"object"==typeof d&&"then"in d?(a=i,"v"in i?(1===i.s?b(a,i.v,void 0,t):b(a,void 0,_n(i.v),t),i):(l=!0,queueMicrotask(()=>l=!1),kn(()=>{v(c?"refreshing":"pending"),w()},!1),i.then(e=>b(i,e,void 0,t),e=>b(i,void 0,_n(e),t)))):(b(a,i,void 0,t),i);b(a,void 0,_n(n),t)}Object.defineProperties(C,{state:{get:()=>y()},error:{get:()=>p()},loading:{get(){const e=y();return"pending"===e||"refreshing"===e}},latest:{get(){if(!c)return C();const e=p();if(e&&!a)throw e;return h()}}});let S=Ft;return u?Xt(()=>(S=Ft,x(!1))):x(!1),[C,{refetch:e=>dn(S,()=>x(e)),mutate:f}]}function on(e){return kn(e,!1)}function an(e){if(null===zt)return e();const t=zt;zt=null;try{return e()}finally{zt=t}}function sn(e){tn(()=>an(e))}function ln(e){return null===Ft||(null===Ft.cleanups?Ft.cleanups=[e]:Ft.cleanups.push(e)),e}function cn(){return zt}function un(){return Ft}function dn(e,t){const n=Ft,r=zt;Ft=e,zt=null;try{return kn(t,!0)}catch(o){On(o)}finally{Ft=n,zt=r}}function hn(e){const t=zt,n=Ft;return Promise.resolve().then(()=>{zt=t,Ft=n,kn(e,!1),zt=Ft=null})}const[fn,pn]=Jt(!1);function gn(){return[fn,hn]}function mn(e,t){const n=Symbol("context");return{id:n,Provider:Nn(n),defaultValue:e}}function wn(e){let t;return Ft&&Ft.context&&void 0!==(t=Ft.context[e.id])?t:e.defaultValue}function yn(e){const t=nn(e),n=nn(()=>Ln(t()));return n.toArray=()=>{const e=n();return Array.isArray(e)?e:null!=e?[e]:[]},n}function vn(){if(this.sources&&this.state)if(this.state===$t)Cn(this);else{const e=Zt;Zt=null,kn(()=>An(this),!1),Zt=e}if(zt){const e=this.observers?this.observers.length:0;zt.sources?(zt.sources.push(this),zt.sourceSlots.push(e)):(zt.sources=[this],zt.sourceSlots=[e]),this.observers?(this.observers.push(zt),this.observerSlots.push(zt.sources.length-1)):(this.observers=[zt],this.observerSlots=[zt.sources.length-1])}return this.value}function bn(e,t,n){let r=e.value;return e.comparator&&e.comparator(r,t)||(e.value=t,e.observers&&e.observers.length&&kn(()=>{for(let t=0;t<e.observers.length;t+=1){const n=e.observers[t],r=Vt&&Vt.running;r&&Vt.disposed.has(n),(r?n.tState:n.state)||(n.pure?Zt.push(n):Gt.push(n),n.observers&&Mn(n)),r||(n.state=$t)}if(Zt.length>1e6)throw Zt=[],new Error},!1)),t}function Cn(e){if(!e.fn)return;Tn(e);const t=Yt;!function(e,t,n){let r;const o=Ft,i=zt;zt=Ft=e;try{r=e.fn(t)}catch(a){return e.pure&&(e.state=$t,e.owned&&e.owned.forEach(Tn),e.owned=null),e.updatedAt=n+1,On(a)}finally{zt=i,Ft=o}(!e.updatedAt||e.updatedAt<=n)&&(null!=e.updatedAt&&"observers"in e?bn(e,r):e.value=r,e.updatedAt=n)}(e,e.value,t)}function xn(e,t,n,r=$t,o){const i={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:Ft,context:Ft?Ft.context:null,pure:n};return null===Ft||Ft!==Kt&&(Ft.owned?Ft.owned.push(i):Ft.owned=[i]),i}function Sn(e){if(0===e.state)return;if(e.state===qt)return An(e);if(e.suspense&&an(e.suspense.inFallback))return e.suspense.effects.push(e);const t=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<Yt);)e.state&&t.push(e);for(let n=t.length-1;n>=0;n--)if((e=t[n]).state===$t)Cn(e);else if(e.state===qt){const n=Zt;Zt=null,kn(()=>An(e,t[0]),!1),Zt=n}}function kn(e,t){if(Zt)return e();let n=!1;t||(Zt=[]),Gt?n=!0:Gt=[],Yt++;try{const t=e();return function(e){Zt&&(Rn(Zt),Zt=null);if(e)return;const t=Gt;Gt=null,t.length&&kn(()=>Bt(t),!1)}(n),t}catch(r){n||(Gt=null),Zt=null,On(r)}}function Rn(e){for(let t=0;t<e.length;t++)Sn(e[t])}function En(e){let t,n=0;for(t=0;t<e.length;t++){const r=e[t];r.user?e[n++]=r:Sn(r)}for(t=0;t<n;t++)Sn(e[t])}function An(e,t){e.state=0;for(let n=0;n<e.sources.length;n+=1){const r=e.sources[n];if(r.sources){const e=r.state;e===$t?r!==t&&(!r.updatedAt||r.updatedAt<Yt)&&Sn(r):e===qt&&An(r,t)}}}function Mn(e){for(let t=0;t<e.observers.length;t+=1){const n=e.observers[t];n.state||(n.state=qt,n.pure?Zt.push(n):Gt.push(n),n.observers&&Mn(n))}}function Tn(e){let t;if(e.sources)for(;e.sources.length;){const t=e.sources.pop(),n=e.sourceSlots.pop(),r=t.observers;if(r&&r.length){const e=r.pop(),o=t.observerSlots.pop();n<r.length&&(e.sourceSlots[o]=n,r[n]=e,t.observerSlots[n]=o)}}if(e.tOwned){for(t=e.tOwned.length-1;t>=0;t--)Tn(e.tOwned[t]);delete e.tOwned}if(e.owned){for(t=e.owned.length-1;t>=0;t--)Tn(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}e.state=0}function _n(e){return e instanceof Error?e:new Error("string"==typeof e?e:"Unknown error",{cause:e})}function On(e,t=Ft){throw _n(e)}function Ln(e){if("function"==typeof e&&!e.length)return Ln(e());if(Array.isArray(e)){const t=[];for(let n=0;n<e.length;n++){const r=Ln(e[n]);Array.isArray(r)?t.push.apply(t,r):t.push(r)}return t}return e}function Nn(e,t){return function(t){let n;return en(()=>n=an(()=>(Ft.context=w(m({},Ft.context),{[e]:t.value}),yn(()=>t.children))),void 0),n}}const In=Symbol("fallback");function Wn(e){for(let t=0;t<e.length;t++)e[t]()}function Pn(e,t){return an(()=>e(t||{}))}function Un(){return!0}const Dn={get:(e,t,n)=>t===Pt?n:e.get(t),has:(e,t)=>t===Pt||e.has(t),set:Un,deleteProperty:Un,getOwnPropertyDescriptor:(e,t)=>({configurable:!0,enumerable:!0,get:()=>e.get(t),set:Un,deleteProperty:Un}),ownKeys:e=>e.keys()};function jn(e){return(e="function"==typeof e?e():e)?e:{}}function Bn(){for(let e=0,t=this.length;e<t;++e){const t=this[e]();if(void 0!==t)return t}}function $n(...e){let t=!1;for(let a=0;a<e.length;a++){const n=e[a];t=t||!!n&&Pt in n,e[a]="function"==typeof n?(t=!0,nn(n)):n}if(Ut&&t)return new Proxy({get(t){for(let n=e.length-1;n>=0;n--){const r=jn(e[n])[t];if(void 0!==r)return r}},has(t){for(let n=e.length-1;n>=0;n--)if(t in jn(e[n]))return!0;return!1},keys(){const t=[];for(let n=0;n<e.length;n++)t.push(...Object.keys(jn(e[n])));return[...new Set(t)]}},Dn);const n={},r=Object.create(null);for(let a=e.length-1;a>=0;a--){const t=e[a];if(!t)continue;const o=Object.getOwnPropertyNames(t);for(let e=o.length-1;e>=0;e--){const i=o[e];if("__proto__"===i||"constructor"===i)continue;const a=Object.getOwnPropertyDescriptor(t,i);if(r[i]){const e=n[i];e&&(a.get?e.push(a.get.bind(t)):void 0!==a.value&&e.push(()=>a.value))}else r[i]=a.get?{enumerable:!0,configurable:!0,get:Bn.bind(n[i]=[a.get.bind(t)])}:void 0!==a.value?a:void 0}}const o={},i=Object.keys(r);for(let a=i.length-1;a>=0;a--){const e=i[a],t=r[e];t&&t.get?Object.defineProperty(o,e,t):o[e]=t?t.value:void 0}return o}function qn(e,...t){if(Ut&&Pt in e){const n=new Set(t.length>1?t.flat():t[0]),r=t.map(t=>new Proxy({get:n=>t.includes(n)?e[n]:void 0,has:n=>t.includes(n)&&n in e,keys:()=>t.filter(t=>t in e)},Dn));return r.push(new Proxy({get:t=>n.has(t)?void 0:e[t],has:t=>!n.has(t)&&t in e,keys:()=>Object.keys(e).filter(e=>!n.has(e))},Dn)),r}const n={},r=t.map(()=>({}));for(const o of Object.getOwnPropertyNames(e)){const i=Object.getOwnPropertyDescriptor(e,o),a=!i.get&&!i.set&&i.enumerable&&i.writable&&i.configurable;let s=!1,l=0;for(const e of t)e.includes(o)&&(s=!0,a?r[l][o]=i.value:Object.defineProperty(r[l],o,i)),++l;s||(a?n[o]=i.value:Object.defineProperty(n,o,i))}return[...r,n]}const Kn=e=>`Stale read from <${e}>.`;function Hn(e){const t="fallback"in e&&{fallback:()=>e.fallback};return nn(function(e,t,n={}){let r=[],o=[],i=[],a=0,s=t.length>1?[]:null;return ln(()=>Wn(i)),()=>{let l,c,u=e()||[],d=u.length;return u[Dt],an(()=>{let e,t,f,p,g,m,w,y,v;if(0===d)0!==a&&(Wn(i),i=[],r=[],o=[],a=0,s&&(s=[])),n.fallback&&(r=[In],o[0]=Qt(e=>(i[0]=e,n.fallback())),a=1);else if(0===a){for(o=new Array(d),c=0;c<d;c++)r[c]=u[c],o[c]=Qt(h);a=d}else{for(f=new Array(d),p=new Array(d),s&&(g=new Array(d)),m=0,w=Math.min(a,d);m<w&&r[m]===u[m];m++);for(w=a-1,y=d-1;w>=m&&y>=m&&r[w]===u[y];w--,y--)f[y]=o[w],p[y]=i[w],s&&(g[y]=s[w]);for(e=new Map,t=new Array(y+1),c=y;c>=m;c--)v=u[c],l=e.get(v),t[c]=void 0===l?-1:l,e.set(v,c);for(l=m;l<=w;l++)v=r[l],c=e.get(v),void 0!==c&&-1!==c?(f[c]=o[l],p[c]=i[l],s&&(g[c]=s[l]),c=t[c],e.set(v,c)):i[l]();for(c=m;c<d;c++)c in f?(o[c]=f[c],i[c]=p[c],s&&(s[c]=g[c],s[c](c))):o[c]=Qt(h);o=o.slice(0,a=d),r=u.slice(0)}return o});function h(e){if(i[c]=e,s){const[e,n]=Jt(c);return s[c]=n,t(u[c],e)}return t(u[c])}}}(()=>e.each,e.children,t||void 0))}function Fn(e){const t=e.keyed,n=nn(()=>e.when,void 0,void 0),r=t?n:nn(n,void 0,{equals:(e,t)=>!e==!t});return nn(()=>{const o=r();if(o){const i=e.children;return"function"==typeof i&&i.length>0?an(()=>i(t?o:()=>{if(!an(r))throw Kn("Show");return n()})):i}return e.fallback},void 0,void 0)}function Vn(e){const t=yn(()=>e.children),n=nn(()=>{const e=t(),n=Array.isArray(e)?e:[e];let r=()=>{};for(let t=0;t<n.length;t++){const e=t,o=n[t],i=r,a=nn(()=>i()?void 0:o.when,void 0,void 0),s=o.keyed?a:nn(a,void 0,{equals:(e,t)=>!e==!t});r=()=>i()||(s()?[e,a,o]:void 0)}return r});return nn(()=>{const t=n()();if(!t)return e.fallback;const[r,o,i]=t,a=i.children;return"function"==typeof a&&a.length>0?an(()=>a(i.keyed?o():()=>{var e;if((null==(e=an(n)())?void 0:e[0])!==r)throw Kn("Match");return o()})):a},void 0,void 0)}function zn(e){return e}const Zn=new Set(["className","value","readOnly","noValidate","formNoValidate","isMap","noModule","playsInline","allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected"]),Gn=new Set(["innerHTML","textContent","innerText","children"]),Yn=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),Qn=Object.assign(Object.create(null),{class:"className",novalidate:{$:"noValidate",FORM:1},formnovalidate:{$:"formNoValidate",BUTTON:1,INPUT:1},ismap:{$:"isMap",IMG:1},nomodule:{$:"noModule",SCRIPT:1},playsinline:{$:"playsInline",VIDEO:1},readonly:{$:"readOnly",INPUT:1,TEXTAREA:1}});const Jn=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),Xn=new Set(["altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","hkern","image","line","linearGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","stop","svg","switch","symbol","text","textPath","tref","tspan","use","view","vkern"]),er={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},tr=e=>nn(()=>e());const nr="_$DX_DELEGATE";function rr(e,t,n,r){let o;const i=()=>{const t=r?document.createElementNS("http://www.w3.org/1998/Math/MathML","template"):document.createElement("template");return t.innerHTML=e,n?t.content.firstChild.firstChild:r?t.firstChild:t.content.firstChild},a=t?()=>an(()=>document.importNode(o||(o=i()),!0)):()=>(o||(o=i())).cloneNode(!0);return a.cloneNode=a,a}function or(e,t,n){null==n?e.removeAttribute(t):e.setAttribute(t,n)}function ir(e,t){null==t?e.removeAttribute("class"):e.className=t}function ar(e,t={},n,r){const o={};return en(()=>o.children=hr(e,t.children,o.children)),en(()=>"function"==typeof t.ref&&sr(t.ref,e)),en(()=>function(e,t,n,r,o={},i=!1){t||(t={});for(const a in o)if(!(a in t)){if("children"===a)continue;o[a]=ur(e,a,null,o[a],n,i,t)}for(const a in t){if("children"===a)continue;const r=t[a];o[a]=ur(e,a,r,o[a],n,i,t)}}(e,t,n,0,o,!0)),o}function sr(e,t,n){return an(()=>e(t,n))}function lr(e,t,n,r){if(void 0===n||r||(r=[]),"function"!=typeof t)return hr(e,t,r,n);en(r=>hr(e,t(),r,n),r)}function cr(e,t,n){const r=t.trim().split(/\s+/);for(let o=0,i=r.length;o<i;o++)e.classList.toggle(r[o],n)}function ur(e,t,n,r,o,i,a){let s,l,c,u,d;if("style"===t)return function(e,t,n){if(!t)return n?or(e,"style"):t;const r=e.style;if("string"==typeof t)return r.cssText=t;let o,i;for(i in"string"==typeof n&&(r.cssText=n=void 0),n||(n={}),t||(t={}),n)null==t[i]&&r.removeProperty(i),delete n[i];for(i in t)o=t[i],o!==n[i]&&(r.setProperty(i,o),n[i]=o);return n}(e,n,r);if("classList"===t)return function(e,t,n={}){const r=Object.keys(t||{}),o=Object.keys(n);let i,a;for(i=0,a=o.length;i<a;i++){const r=o[i];r&&"undefined"!==r&&!t[r]&&(cr(e,r,!1),delete n[r])}for(i=0,a=r.length;i<a;i++){const o=r[i],a=!!t[o];o&&"undefined"!==o&&n[o]!==a&&a&&(cr(e,o,!0),n[o]=a)}return n}(e,n,r);if(n===r)return r;if("ref"===t)i||n(e);else if("on:"===t.slice(0,3)){const o=t.slice(3);r&&e.removeEventListener(o,r,"function"!=typeof r&&r),n&&e.addEventListener(o,n,"function"!=typeof n&&n)}else if("oncapture:"===t.slice(0,10)){const o=t.slice(10);r&&e.removeEventListener(o,r,!0),n&&e.addEventListener(o,n,!0)}else if("on"===t.slice(0,2)){const o=t.slice(2).toLowerCase(),i=Jn.has(o);if(!i&&r){const t=Array.isArray(r)?r[0]:r;e.removeEventListener(o,t)}(i||n)&&(function(e,t,n,r){if(r)Array.isArray(n)?(e[`$$${t}`]=n[0],e[`$$${t}Data`]=n[1]):e[`$$${t}`]=n;else if(Array.isArray(n)){const r=n[0];e.addEventListener(t,n[0]=t=>r.call(e,n[1],t))}else e.addEventListener(t,n,"function"!=typeof n&&n)}(e,o,n,i),i&&function(e,t=window.document){const n=t[nr]||(t[nr]=new Set);for(let r=0,o=e.length;r<o;r++){const o=e[r];n.has(o)||(n.add(o),t.addEventListener(o,dr))}}([o]))}else if("attr:"===t.slice(0,5))or(e,t.slice(5),n);else if("bool:"===t.slice(0,5))!function(e,t,n){n?e.setAttribute(t,""):e.removeAttribute(t)}(e,t.slice(5),n);else if((d="prop:"===t.slice(0,5))||(c=Gn.has(t))||!o&&((u=function(e,t){const n=Qn[e];return"object"==typeof n?n[t]?n.$:void 0:n}(t,e.tagName))||(l=Zn.has(t)))||(s=e.nodeName.includes("-")||"is"in a))d&&(t=t.slice(5),l=!0),"class"===t||"className"===t?ir(e,n):!s||l||c?e[u||t]=n:e[(h=t,h.toLowerCase().replace(/-([a-z])/g,(e,t)=>t.toUpperCase()))]=n;else{const r=o&&t.indexOf(":")>-1&&er[t.split(":")[0]];r?function(e,t,n,r){null==r?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,r)}(e,r,t,n):or(e,Yn[t]||t,n)}var h;return n}function dr(e){let t=e.target;const n=`$$${e.type}`,r=e.target,o=e.currentTarget,i=t=>Object.defineProperty(e,"target",{configurable:!0,value:t}),a=()=>{const r=t[n];if(r&&!t.disabled){const o=t[`${n}Data`];if(void 0!==o?r.call(t,o,e):r.call(t,e),e.cancelBubble)return}return t.host&&"string"!=typeof t.host&&!t.host._$host&&t.contains(e.target)&&i(t.host),!0},s=()=>{for(;a()&&(t=t._$host||t.parentNode||t.host););};if(Object.defineProperty(e,"currentTarget",{configurable:!0,get:()=>t||document}),e.composedPath){const n=e.composedPath();i(n[0]);for(let e=0;e<n.length-2&&(t=n[e],a());e++){if(t._$host){t=t._$host,s();break}if(t.parentNode===o)break}}else s();i(r)}function hr(e,t,n,r,o){for(;"function"==typeof n;)n=n();if(t===n)return n;const i=typeof t,a=void 0!==r;if(e=a&&n[0]&&n[0].parentNode||e,"string"===i||"number"===i){if("number"===i&&(t=t.toString())===n)return n;if(a){let o=n[0];o&&3===o.nodeType?o.data!==t&&(o.data=t):o=document.createTextNode(t),n=gr(e,n,r,o)}else n=""!==n&&"string"==typeof n?e.firstChild.data=t:e.textContent=t}else if(null==t||"boolean"===i)n=gr(e,n,r);else{if("function"===i)return en(()=>{let o=t();for(;"function"==typeof o;)o=o();n=hr(e,o,n,r)}),()=>n;if(Array.isArray(t)){const i=[],s=n&&Array.isArray(n);if(fr(i,t,n,o))return en(()=>n=hr(e,i,n,r,!0)),()=>n;if(0===i.length){if(n=gr(e,n,r),a)return n}else s?0===n.length?pr(e,i,r):function(e,t,n){let r=n.length,o=t.length,i=r,a=0,s=0,l=t[o-1].nextSibling,c=null;for(;a<o||s<i;)if(t[a]!==n[s]){for(;t[o-1]===n[i-1];)o--,i--;if(o===a){const t=i<r?s?n[s-1].nextSibling:n[i-s]:l;for(;s<i;)e.insertBefore(n[s++],t)}else if(i===s)for(;a<o;)c&&c.has(t[a])||t[a].remove(),a++;else if(t[a]===n[i-1]&&n[s]===t[o-1]){const r=t[--o].nextSibling;e.insertBefore(n[s++],t[a++].nextSibling),e.insertBefore(n[--i],r),t[o]=n[i]}else{if(!c){c=new Map;let e=s;for(;e<i;)c.set(n[e],e++)}const r=c.get(t[a]);if(null!=r)if(s<r&&r<i){let l,u=a,d=1;for(;++u<o&&u<i&&null!=(l=c.get(t[u]))&&l===r+d;)d++;if(d>r-s){const o=t[a];for(;s<r;)e.insertBefore(n[s++],o)}else e.replaceChild(n[s++],t[a++])}else a++;else t[a++].remove()}}else a++,s++}(e,n,i):(n&&gr(e),pr(e,i));n=i}else if(t.nodeType){if(Array.isArray(n)){if(a)return n=gr(e,n,r,t);gr(e,n,null,t)}else null!=n&&""!==n&&e.firstChild?e.replaceChild(t,e.firstChild):e.appendChild(t);n=t}}return n}function fr(e,t,n,r){let o=!1;for(let i=0,a=t.length;i<a;i++){let a,s=t[i],l=n&&n[e.length];if(null==s||!0===s||!1===s);else if("object"==(a=typeof s)&&s.nodeType)e.push(s);else if(Array.isArray(s))o=fr(e,s,l)||o;else if("function"===a)if(r){for(;"function"==typeof s;)s=s();o=fr(e,Array.isArray(s)?s:[s],Array.isArray(l)?l:[l])||o}else e.push(s),o=!0;else{const t=String(s);l&&3===l.nodeType&&l.data===t?e.push(l):e.push(document.createTextNode(t))}}return o}function pr(e,t,n=null){for(let r=0,o=t.length;r<o;r++)e.insertBefore(t[r],n)}function gr(e,t,n,r){if(void 0===n)return e.textContent="";const o=r||document.createTextNode("");if(t.length){let r=!1;for(let i=t.length-1;i>=0;i--){const a=t[i];if(o!==a){const t=a.parentNode===e;r||i?t&&a.remove():t?e.replaceChild(o,a):e.insertBefore(o,n)}else r=!0}}else e.insertBefore(o,n);return[o]}function mr(e,t=!1){return t?document.createElementNS("http://www.w3.org/2000/svg",e):document.createElement(e)}function wr(e){const{useShadow:t}=e,n=document.createTextNode(""),r=un();let o;return tn(()=>{o||(o=dn(r,()=>nn(()=>e.children)));const i=e.mount||document.body;if(i instanceof HTMLHeadElement){const[e,t]=Jt(!1),n=()=>t(!0);Qt(t=>lr(i,()=>e()?t():o(),null)),ln(n)}else{const r=mr(e.isSVG?"g":"div",e.isSVG),a=t&&r.attachShadow?r.attachShadow({mode:"open"}):r;Object.defineProperty(r,"_$host",{get:()=>n.parentNode,configurable:!0}),lr(a,o),i.appendChild(r),e.ref&&e.ref(r),ln(()=>i.removeChild(r))}},void 0,{render:!0}),n}function yr(e){const[,t]=qn(e,["component"]);return function(e,t){const n=nn(e);return nn(()=>{const e=n();switch(typeof e){case"function":return an(()=>e(t));case"string":const n=Xn.has(e),r=mr(e,n);return ar(r,t,n),r}})}(()=>e.component,t)}var vr=(e=>(e.DARK="DARK",e.LIGHT="LIGHT",e))(vr||{});let br={data:""},Cr=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,xr=/\/\*[^]*?\*\/| +/g,Sr=/\n+/g,kr=(e,t)=>{let n="",r="",o="";for(let i in e){let a=e[i];"@"==i[0]?"i"==i[1]?n=i+" "+a+";":r+="f"==i[1]?kr(a,i):i+"{"+kr(a,"k"==i[1]?"":t)+"}":"object"==typeof a?r+=kr(a,t?t.replace(/([^,])+/g,e=>i.replace(/(^:.*)|([^,])+/g,t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)):i):null!=a&&(i=/^--/.test(i)?i:i.replace(/[A-Z]/g,"-$&").toLowerCase(),o+=kr.p?kr.p(i,a):i+":"+a+";")}return n+(t&&o?t+"{"+o+"}":o)+r},Rr={},Er=e=>{if("object"==typeof e){let t="";for(let n in e)t+=n+Er(e[n]);return t}return e};function Ar(e){let t=this||{},n=e.call?e(t.p):e;return((e,t,n,r,o)=>{let i=Er(e),a=Rr[i]||(Rr[i]=(e=>{let t=0,n=11;for(;t<e.length;)n=101*n+e.charCodeAt(t++)>>>0;return"go"+n})(i));if(!Rr[a]){let t=i!==e?e:(e=>{let t,n,r=[{}];for(;t=Cr.exec(e.replace(xr,""));)t[4]?r.shift():t[3]?(n=t[3].replace(Sr," ").trim(),r.unshift(r[0][n]=r[0][n]||{})):r[0][t[1]]=t[2].replace(Sr," ").trim();return r[0]})(e);Rr[a]=kr(o?{["@keyframes "+a]:t}:t,n?"":"."+a)}let s=n&&Rr.g?Rr.g:null;return n&&(Rr.g=Rr[a]),l=Rr[a],c=t,u=r,(d=s)?c.data=c.data.replace(d,l):-1===c.data.indexOf(l)&&(c.data=u?l+c.data:c.data+l),a;var l,c,u,d})(n.unshift?n.raw?((e,t,n)=>e.reduce((e,r,o)=>{let i=t[o];if(i&&i.call){let e=i(n),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;i=t?"."+t:e&&"object"==typeof e?e.props?"":kr(e,""):!1===e?"":e}return e+r+(null==i?"":i)},""))(n,[].slice.call(arguments,1),t.p):n.reduce((e,n)=>Object.assign(e,n&&n.call?n(t.p):n),{}):n,(r=t.target,"object"==typeof window?((r?r.querySelector("#_goober"):window._goober)||Object.assign((r||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:r||br),t.g,t.o,t.k);var r}Ar.bind({g:1});let Mr=Ar.bind({k:1});const Tr=mn();function _r(e){return Pn(Tr.Provider,{value:e.theme,get children(){return e.children}})}function Or(){return wn(Tr)}function Lr(e){let t=this||{};return(...n)=>{const r=r=>{const o=$n(r,{theme:wn(Tr)}),i=$n(o,{get class(){const e=o.class,r="class"in o&&/^go[0-9]+/.test(e);return[e,Ar.apply({target:t.target,o:r,p:o,g:t.g},n)].filter(Boolean).join(" ")}}),[a,s]=qn(i,["as","theme"]),l=s,c=a.as||e;let u;return"function"==typeof c?u=c(l):1==t.g?(u=document.createElement(c),ar(u,l)):u=yr($n({component:c},l)),u};return r.class=e=>an(()=>Ar.apply({target:t.target,p:e,g:t.g},n)),r}}const Nr=new Proxy(Lr,{get:(e,t)=>e(t)});function Ir(){const e=Lr.call({g:1},"div").apply(null,arguments);return function(t){return e(t),null}}const Wr="tc-root",Pr="tc-disable-scroll",Ur="tc-using-mouse",Dr=()=>{document.body.addEventListener("mousedown",()=>document.body.classList.add(Ur)),document.body.addEventListener("keydown",e=>{"Tab"===e.key&&document.body.classList.remove(Ur)});return Pn(Ir`
2
- ${Wr} * {
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).TON_CONNECT_UI={})}(this,function(e){"use strict";var t,n,r,o,i,a,s,l,c=Object.defineProperty,u=Object.defineProperties,d=Object.getOwnPropertyDescriptors,h=Object.getOwnPropertySymbols,f=Object.prototype.hasOwnProperty,p=Object.prototype.propertyIsEnumerable,g=(e,t,n)=>t in e?c(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,m=(e,t)=>{for(var n in t||(t={}))f.call(t,n)&&g(e,n,t[n]);if(h)for(var n of h(t))p.call(t,n)&&g(e,n,t[n]);return e},w=(e,t)=>u(e,d(t)),y=(e,t)=>{var n={};for(var r in e)f.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&h)for(var r of h(e))t.indexOf(r)<0&&p.call(e,r)&&(n[r]=e[r]);return n},v=(e,t,n)=>new Promise((r,o)=>{var i=e=>{try{s(n.next(e))}catch(kr){o(kr)}},a=e=>{try{s(n.throw(e))}catch(kr){o(kr)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(i,a);s((n=n.apply(e,t)).next())});function b(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function C(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var n=function e(){var n=!1;try{n=this instanceof e}catch(r){}return n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),n}var x,S,k,R,E={exports:{}};const T=b((x||(x=1,k=E.exports,R=function(){var e={};function t(e){if(!/^(?:[A-Za-z0-9+\/]{2}[A-Za-z0-9+\/]{2})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.test(e))throw new TypeError("invalid encoding")}return e.decodeUTF8=function(e){if("string"!=typeof e)throw new TypeError("expected string");var t,n=unescape(encodeURIComponent(e)),r=new Uint8Array(n.length);for(t=0;t<n.length;t++)r[t]=n.charCodeAt(t);return r},e.encodeUTF8=function(e){var t,n=[];for(t=0;t<e.length;t++)n.push(String.fromCharCode(e[t]));return decodeURIComponent(escape(n.join("")))},"undefined"==typeof atob?void 0!==Buffer.from?(e.encodeBase64=function(e){return Buffer.from(e).toString("base64")},e.decodeBase64=function(e){return t(e),new Uint8Array(Array.prototype.slice.call(Buffer.from(e,"base64"),0))}):(e.encodeBase64=function(e){return new Buffer(e).toString("base64")},e.decodeBase64=function(e){return t(e),new Uint8Array(Array.prototype.slice.call(new Buffer(e,"base64"),0))}):(e.encodeBase64=function(e){var t,n=[],r=e.length;for(t=0;t<r;t++)n.push(String.fromCharCode(e[t]));return btoa(n.join(""))},e.decodeBase64=function(e){t(e);var n,r=atob(e),o=new Uint8Array(r.length);for(n=0;n<r.length;n++)o[n]=r.charCodeAt(n);return o}),e},(S=E).exports?S.exports=R():(k.nacl||(k.nacl={}),k.nacl.util=R())),E.exports));function A(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var M={exports:{}};const _=C(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var O;var L=(O||(O=1,function(e){!function(e){var t=function(e){var t,n=new Float64Array(16);if(e)for(t=0;t<e.length;t++)n[t]=e[t];return n},n=function(){throw new Error("no PRNG")},r=new Uint8Array(16),o=new Uint8Array(32);o[0]=9;var i=t(),a=t([1]),s=t([56129,1]),l=t([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),c=t([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),u=t([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),d=t([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),h=t([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function f(e,t,n,r){e[t]=n>>24&255,e[t+1]=n>>16&255,e[t+2]=n>>8&255,e[t+3]=255&n,e[t+4]=r>>24&255,e[t+5]=r>>16&255,e[t+6]=r>>8&255,e[t+7]=255&r}function p(e,t,n,r,o){var i,a=0;for(i=0;i<o;i++)a|=e[t+i]^n[r+i];return(1&a-1>>>8)-1}function g(e,t,n,r){return p(e,t,n,r,16)}function m(e,t,n,r){return p(e,t,n,r,32)}function w(e,t,n,r){!function(e,t,n,r){for(var o,i=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,a=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,s=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,l=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,c=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,u=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,d=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,h=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,f=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,p=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,g=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,m=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,w=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,y=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,v=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,b=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,C=i,x=a,S=s,k=l,R=c,E=u,T=d,A=h,M=f,_=p,O=g,L=m,I=w,N=y,W=v,P=b,U=0;U<20;U+=2)C^=(o=(I^=(o=(M^=(o=(R^=(o=C+I|0)<<7|o>>>25)+C|0)<<9|o>>>23)+R|0)<<13|o>>>19)+M|0)<<18|o>>>14,E^=(o=(x^=(o=(N^=(o=(_^=(o=E+x|0)<<7|o>>>25)+E|0)<<9|o>>>23)+_|0)<<13|o>>>19)+N|0)<<18|o>>>14,O^=(o=(T^=(o=(S^=(o=(W^=(o=O+T|0)<<7|o>>>25)+O|0)<<9|o>>>23)+W|0)<<13|o>>>19)+S|0)<<18|o>>>14,P^=(o=(L^=(o=(A^=(o=(k^=(o=P+L|0)<<7|o>>>25)+P|0)<<9|o>>>23)+k|0)<<13|o>>>19)+A|0)<<18|o>>>14,C^=(o=(k^=(o=(S^=(o=(x^=(o=C+k|0)<<7|o>>>25)+C|0)<<9|o>>>23)+x|0)<<13|o>>>19)+S|0)<<18|o>>>14,E^=(o=(R^=(o=(A^=(o=(T^=(o=E+R|0)<<7|o>>>25)+E|0)<<9|o>>>23)+T|0)<<13|o>>>19)+A|0)<<18|o>>>14,O^=(o=(_^=(o=(M^=(o=(L^=(o=O+_|0)<<7|o>>>25)+O|0)<<9|o>>>23)+L|0)<<13|o>>>19)+M|0)<<18|o>>>14,P^=(o=(W^=(o=(N^=(o=(I^=(o=P+W|0)<<7|o>>>25)+P|0)<<9|o>>>23)+I|0)<<13|o>>>19)+N|0)<<18|o>>>14;C=C+i|0,x=x+a|0,S=S+s|0,k=k+l|0,R=R+c|0,E=E+u|0,T=T+d|0,A=A+h|0,M=M+f|0,_=_+p|0,O=O+g|0,L=L+m|0,I=I+w|0,N=N+y|0,W=W+v|0,P=P+b|0,e[0]=C>>>0&255,e[1]=C>>>8&255,e[2]=C>>>16&255,e[3]=C>>>24&255,e[4]=x>>>0&255,e[5]=x>>>8&255,e[6]=x>>>16&255,e[7]=x>>>24&255,e[8]=S>>>0&255,e[9]=S>>>8&255,e[10]=S>>>16&255,e[11]=S>>>24&255,e[12]=k>>>0&255,e[13]=k>>>8&255,e[14]=k>>>16&255,e[15]=k>>>24&255,e[16]=R>>>0&255,e[17]=R>>>8&255,e[18]=R>>>16&255,e[19]=R>>>24&255,e[20]=E>>>0&255,e[21]=E>>>8&255,e[22]=E>>>16&255,e[23]=E>>>24&255,e[24]=T>>>0&255,e[25]=T>>>8&255,e[26]=T>>>16&255,e[27]=T>>>24&255,e[28]=A>>>0&255,e[29]=A>>>8&255,e[30]=A>>>16&255,e[31]=A>>>24&255,e[32]=M>>>0&255,e[33]=M>>>8&255,e[34]=M>>>16&255,e[35]=M>>>24&255,e[36]=_>>>0&255,e[37]=_>>>8&255,e[38]=_>>>16&255,e[39]=_>>>24&255,e[40]=O>>>0&255,e[41]=O>>>8&255,e[42]=O>>>16&255,e[43]=O>>>24&255,e[44]=L>>>0&255,e[45]=L>>>8&255,e[46]=L>>>16&255,e[47]=L>>>24&255,e[48]=I>>>0&255,e[49]=I>>>8&255,e[50]=I>>>16&255,e[51]=I>>>24&255,e[52]=N>>>0&255,e[53]=N>>>8&255,e[54]=N>>>16&255,e[55]=N>>>24&255,e[56]=W>>>0&255,e[57]=W>>>8&255,e[58]=W>>>16&255,e[59]=W>>>24&255,e[60]=P>>>0&255,e[61]=P>>>8&255,e[62]=P>>>16&255,e[63]=P>>>24&255}(e,t,n,r)}function y(e,t,n,r){!function(e,t,n,r){for(var o,i=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,a=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,s=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,l=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,c=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,u=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,d=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,h=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,f=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,p=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,g=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,m=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,w=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,y=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,v=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,b=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,C=0;C<20;C+=2)i^=(o=(w^=(o=(f^=(o=(c^=(o=i+w|0)<<7|o>>>25)+i|0)<<9|o>>>23)+c|0)<<13|o>>>19)+f|0)<<18|o>>>14,u^=(o=(a^=(o=(y^=(o=(p^=(o=u+a|0)<<7|o>>>25)+u|0)<<9|o>>>23)+p|0)<<13|o>>>19)+y|0)<<18|o>>>14,g^=(o=(d^=(o=(s^=(o=(v^=(o=g+d|0)<<7|o>>>25)+g|0)<<9|o>>>23)+v|0)<<13|o>>>19)+s|0)<<18|o>>>14,b^=(o=(m^=(o=(h^=(o=(l^=(o=b+m|0)<<7|o>>>25)+b|0)<<9|o>>>23)+l|0)<<13|o>>>19)+h|0)<<18|o>>>14,i^=(o=(l^=(o=(s^=(o=(a^=(o=i+l|0)<<7|o>>>25)+i|0)<<9|o>>>23)+a|0)<<13|o>>>19)+s|0)<<18|o>>>14,u^=(o=(c^=(o=(h^=(o=(d^=(o=u+c|0)<<7|o>>>25)+u|0)<<9|o>>>23)+d|0)<<13|o>>>19)+h|0)<<18|o>>>14,g^=(o=(p^=(o=(f^=(o=(m^=(o=g+p|0)<<7|o>>>25)+g|0)<<9|o>>>23)+m|0)<<13|o>>>19)+f|0)<<18|o>>>14,b^=(o=(v^=(o=(y^=(o=(w^=(o=b+v|0)<<7|o>>>25)+b|0)<<9|o>>>23)+w|0)<<13|o>>>19)+y|0)<<18|o>>>14;e[0]=i>>>0&255,e[1]=i>>>8&255,e[2]=i>>>16&255,e[3]=i>>>24&255,e[4]=u>>>0&255,e[5]=u>>>8&255,e[6]=u>>>16&255,e[7]=u>>>24&255,e[8]=g>>>0&255,e[9]=g>>>8&255,e[10]=g>>>16&255,e[11]=g>>>24&255,e[12]=b>>>0&255,e[13]=b>>>8&255,e[14]=b>>>16&255,e[15]=b>>>24&255,e[16]=d>>>0&255,e[17]=d>>>8&255,e[18]=d>>>16&255,e[19]=d>>>24&255,e[20]=h>>>0&255,e[21]=h>>>8&255,e[22]=h>>>16&255,e[23]=h>>>24&255,e[24]=f>>>0&255,e[25]=f>>>8&255,e[26]=f>>>16&255,e[27]=f>>>24&255,e[28]=p>>>0&255,e[29]=p>>>8&255,e[30]=p>>>16&255,e[31]=p>>>24&255}(e,t,n,r)}var v=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function b(e,t,n,r,o,i,a){var s,l,c=new Uint8Array(16),u=new Uint8Array(64);for(l=0;l<16;l++)c[l]=0;for(l=0;l<8;l++)c[l]=i[l];for(;o>=64;){for(w(u,c,a,v),l=0;l<64;l++)e[t+l]=n[r+l]^u[l];for(s=1,l=8;l<16;l++)s=s+(255&c[l])|0,c[l]=255&s,s>>>=8;o-=64,t+=64,r+=64}if(o>0)for(w(u,c,a,v),l=0;l<o;l++)e[t+l]=n[r+l]^u[l];return 0}function C(e,t,n,r,o){var i,a,s=new Uint8Array(16),l=new Uint8Array(64);for(a=0;a<16;a++)s[a]=0;for(a=0;a<8;a++)s[a]=r[a];for(;n>=64;){for(w(l,s,o,v),a=0;a<64;a++)e[t+a]=l[a];for(i=1,a=8;a<16;a++)i=i+(255&s[a])|0,s[a]=255&i,i>>>=8;n-=64,t+=64}if(n>0)for(w(l,s,o,v),a=0;a<n;a++)e[t+a]=l[a];return 0}function x(e,t,n,r,o){var i=new Uint8Array(32);y(i,r,o,v);for(var a=new Uint8Array(8),s=0;s<8;s++)a[s]=r[s+16];return C(e,t,n,a,i)}function S(e,t,n,r,o,i,a){var s=new Uint8Array(32);y(s,i,a,v);for(var l=new Uint8Array(8),c=0;c<8;c++)l[c]=i[c+16];return b(e,t,n,r,o,l,s)}var k=function(e){var t,n,r,o,i,a,s,l;this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.leftover=0,this.fin=0,t=255&e[0]|(255&e[1])<<8,this.r[0]=8191&t,n=255&e[2]|(255&e[3])<<8,this.r[1]=8191&(t>>>13|n<<3),r=255&e[4]|(255&e[5])<<8,this.r[2]=7939&(n>>>10|r<<6),o=255&e[6]|(255&e[7])<<8,this.r[3]=8191&(r>>>7|o<<9),i=255&e[8]|(255&e[9])<<8,this.r[4]=255&(o>>>4|i<<12),this.r[5]=i>>>1&8190,a=255&e[10]|(255&e[11])<<8,this.r[6]=8191&(i>>>14|a<<2),s=255&e[12]|(255&e[13])<<8,this.r[7]=8065&(a>>>11|s<<5),l=255&e[14]|(255&e[15])<<8,this.r[8]=8191&(s>>>8|l<<8),this.r[9]=l>>>5&127,this.pad[0]=255&e[16]|(255&e[17])<<8,this.pad[1]=255&e[18]|(255&e[19])<<8,this.pad[2]=255&e[20]|(255&e[21])<<8,this.pad[3]=255&e[22]|(255&e[23])<<8,this.pad[4]=255&e[24]|(255&e[25])<<8,this.pad[5]=255&e[26]|(255&e[27])<<8,this.pad[6]=255&e[28]|(255&e[29])<<8,this.pad[7]=255&e[30]|(255&e[31])<<8};function R(e,t,n,r,o,i){var a=new k(i);return a.update(n,r,o),a.finish(e,t),0}function E(e,t,n,r,o,i){var a=new Uint8Array(16);return R(a,0,n,r,o,i),g(e,t,a,0)}function T(e,t,n,r,o){var i;if(n<32)return-1;for(S(e,0,t,0,n,r,o),R(e,16,e,32,n-32,e),i=0;i<16;i++)e[i]=0;return 0}function M(e,t,n,r,o){var i,a=new Uint8Array(32);if(n<32)return-1;if(x(a,0,32,r,o),0!==E(t,16,t,32,n-32,a))return-1;for(S(e,0,t,0,n,r,o),i=0;i<32;i++)e[i]=0;return 0}function O(e,t){var n;for(n=0;n<16;n++)e[n]=0|t[n]}function L(e){var t,n,r=1;for(t=0;t<16;t++)n=e[t]+r+65535,r=Math.floor(n/65536),e[t]=n-65536*r;e[0]+=r-1+37*(r-1)}function I(e,t,n){for(var r,o=~(n-1),i=0;i<16;i++)r=o&(e[i]^t[i]),e[i]^=r,t[i]^=r}function N(e,n){var r,o,i,a=t(),s=t();for(r=0;r<16;r++)s[r]=n[r];for(L(s),L(s),L(s),o=0;o<2;o++){for(a[0]=s[0]-65517,r=1;r<15;r++)a[r]=s[r]-65535-(a[r-1]>>16&1),a[r-1]&=65535;a[15]=s[15]-32767-(a[14]>>16&1),i=a[15]>>16&1,a[14]&=65535,I(s,a,1-i)}for(r=0;r<16;r++)e[2*r]=255&s[r],e[2*r+1]=s[r]>>8}function W(e,t){var n=new Uint8Array(32),r=new Uint8Array(32);return N(n,e),N(r,t),m(n,0,r,0)}function P(e){var t=new Uint8Array(32);return N(t,e),1&t[0]}function U(e,t){var n;for(n=0;n<16;n++)e[n]=t[2*n]+(t[2*n+1]<<8);e[15]&=32767}function D(e,t,n){for(var r=0;r<16;r++)e[r]=t[r]+n[r]}function j(e,t,n){for(var r=0;r<16;r++)e[r]=t[r]-n[r]}function B(e,t,n){var r,o,i=0,a=0,s=0,l=0,c=0,u=0,d=0,h=0,f=0,p=0,g=0,m=0,w=0,y=0,v=0,b=0,C=0,x=0,S=0,k=0,R=0,E=0,T=0,A=0,M=0,_=0,O=0,L=0,I=0,N=0,W=0,P=n[0],U=n[1],D=n[2],j=n[3],B=n[4],$=n[5],q=n[6],K=n[7],H=n[8],F=n[9],V=n[10],z=n[11],Z=n[12],G=n[13],Y=n[14],Q=n[15];i+=(r=t[0])*P,a+=r*U,s+=r*D,l+=r*j,c+=r*B,u+=r*$,d+=r*q,h+=r*K,f+=r*H,p+=r*F,g+=r*V,m+=r*z,w+=r*Z,y+=r*G,v+=r*Y,b+=r*Q,a+=(r=t[1])*P,s+=r*U,l+=r*D,c+=r*j,u+=r*B,d+=r*$,h+=r*q,f+=r*K,p+=r*H,g+=r*F,m+=r*V,w+=r*z,y+=r*Z,v+=r*G,b+=r*Y,C+=r*Q,s+=(r=t[2])*P,l+=r*U,c+=r*D,u+=r*j,d+=r*B,h+=r*$,f+=r*q,p+=r*K,g+=r*H,m+=r*F,w+=r*V,y+=r*z,v+=r*Z,b+=r*G,C+=r*Y,x+=r*Q,l+=(r=t[3])*P,c+=r*U,u+=r*D,d+=r*j,h+=r*B,f+=r*$,p+=r*q,g+=r*K,m+=r*H,w+=r*F,y+=r*V,v+=r*z,b+=r*Z,C+=r*G,x+=r*Y,S+=r*Q,c+=(r=t[4])*P,u+=r*U,d+=r*D,h+=r*j,f+=r*B,p+=r*$,g+=r*q,m+=r*K,w+=r*H,y+=r*F,v+=r*V,b+=r*z,C+=r*Z,x+=r*G,S+=r*Y,k+=r*Q,u+=(r=t[5])*P,d+=r*U,h+=r*D,f+=r*j,p+=r*B,g+=r*$,m+=r*q,w+=r*K,y+=r*H,v+=r*F,b+=r*V,C+=r*z,x+=r*Z,S+=r*G,k+=r*Y,R+=r*Q,d+=(r=t[6])*P,h+=r*U,f+=r*D,p+=r*j,g+=r*B,m+=r*$,w+=r*q,y+=r*K,v+=r*H,b+=r*F,C+=r*V,x+=r*z,S+=r*Z,k+=r*G,R+=r*Y,E+=r*Q,h+=(r=t[7])*P,f+=r*U,p+=r*D,g+=r*j,m+=r*B,w+=r*$,y+=r*q,v+=r*K,b+=r*H,C+=r*F,x+=r*V,S+=r*z,k+=r*Z,R+=r*G,E+=r*Y,T+=r*Q,f+=(r=t[8])*P,p+=r*U,g+=r*D,m+=r*j,w+=r*B,y+=r*$,v+=r*q,b+=r*K,C+=r*H,x+=r*F,S+=r*V,k+=r*z,R+=r*Z,E+=r*G,T+=r*Y,A+=r*Q,p+=(r=t[9])*P,g+=r*U,m+=r*D,w+=r*j,y+=r*B,v+=r*$,b+=r*q,C+=r*K,x+=r*H,S+=r*F,k+=r*V,R+=r*z,E+=r*Z,T+=r*G,A+=r*Y,M+=r*Q,g+=(r=t[10])*P,m+=r*U,w+=r*D,y+=r*j,v+=r*B,b+=r*$,C+=r*q,x+=r*K,S+=r*H,k+=r*F,R+=r*V,E+=r*z,T+=r*Z,A+=r*G,M+=r*Y,_+=r*Q,m+=(r=t[11])*P,w+=r*U,y+=r*D,v+=r*j,b+=r*B,C+=r*$,x+=r*q,S+=r*K,k+=r*H,R+=r*F,E+=r*V,T+=r*z,A+=r*Z,M+=r*G,_+=r*Y,O+=r*Q,w+=(r=t[12])*P,y+=r*U,v+=r*D,b+=r*j,C+=r*B,x+=r*$,S+=r*q,k+=r*K,R+=r*H,E+=r*F,T+=r*V,A+=r*z,M+=r*Z,_+=r*G,O+=r*Y,L+=r*Q,y+=(r=t[13])*P,v+=r*U,b+=r*D,C+=r*j,x+=r*B,S+=r*$,k+=r*q,R+=r*K,E+=r*H,T+=r*F,A+=r*V,M+=r*z,_+=r*Z,O+=r*G,L+=r*Y,I+=r*Q,v+=(r=t[14])*P,b+=r*U,C+=r*D,x+=r*j,S+=r*B,k+=r*$,R+=r*q,E+=r*K,T+=r*H,A+=r*F,M+=r*V,_+=r*z,O+=r*Z,L+=r*G,I+=r*Y,N+=r*Q,b+=(r=t[15])*P,a+=38*(x+=r*D),s+=38*(S+=r*j),l+=38*(k+=r*B),c+=38*(R+=r*$),u+=38*(E+=r*q),d+=38*(T+=r*K),h+=38*(A+=r*H),f+=38*(M+=r*F),p+=38*(_+=r*V),g+=38*(O+=r*z),m+=38*(L+=r*Z),w+=38*(I+=r*G),y+=38*(N+=r*Y),v+=38*(W+=r*Q),i=(r=(i+=38*(C+=r*U))+(o=1)+65535)-65536*(o=Math.floor(r/65536)),a=(r=a+o+65535)-65536*(o=Math.floor(r/65536)),s=(r=s+o+65535)-65536*(o=Math.floor(r/65536)),l=(r=l+o+65535)-65536*(o=Math.floor(r/65536)),c=(r=c+o+65535)-65536*(o=Math.floor(r/65536)),u=(r=u+o+65535)-65536*(o=Math.floor(r/65536)),d=(r=d+o+65535)-65536*(o=Math.floor(r/65536)),h=(r=h+o+65535)-65536*(o=Math.floor(r/65536)),f=(r=f+o+65535)-65536*(o=Math.floor(r/65536)),p=(r=p+o+65535)-65536*(o=Math.floor(r/65536)),g=(r=g+o+65535)-65536*(o=Math.floor(r/65536)),m=(r=m+o+65535)-65536*(o=Math.floor(r/65536)),w=(r=w+o+65535)-65536*(o=Math.floor(r/65536)),y=(r=y+o+65535)-65536*(o=Math.floor(r/65536)),v=(r=v+o+65535)-65536*(o=Math.floor(r/65536)),b=(r=b+o+65535)-65536*(o=Math.floor(r/65536)),i=(r=(i+=o-1+37*(o-1))+(o=1)+65535)-65536*(o=Math.floor(r/65536)),a=(r=a+o+65535)-65536*(o=Math.floor(r/65536)),s=(r=s+o+65535)-65536*(o=Math.floor(r/65536)),l=(r=l+o+65535)-65536*(o=Math.floor(r/65536)),c=(r=c+o+65535)-65536*(o=Math.floor(r/65536)),u=(r=u+o+65535)-65536*(o=Math.floor(r/65536)),d=(r=d+o+65535)-65536*(o=Math.floor(r/65536)),h=(r=h+o+65535)-65536*(o=Math.floor(r/65536)),f=(r=f+o+65535)-65536*(o=Math.floor(r/65536)),p=(r=p+o+65535)-65536*(o=Math.floor(r/65536)),g=(r=g+o+65535)-65536*(o=Math.floor(r/65536)),m=(r=m+o+65535)-65536*(o=Math.floor(r/65536)),w=(r=w+o+65535)-65536*(o=Math.floor(r/65536)),y=(r=y+o+65535)-65536*(o=Math.floor(r/65536)),v=(r=v+o+65535)-65536*(o=Math.floor(r/65536)),b=(r=b+o+65535)-65536*(o=Math.floor(r/65536)),i+=o-1+37*(o-1),e[0]=i,e[1]=a,e[2]=s,e[3]=l,e[4]=c,e[5]=u,e[6]=d,e[7]=h,e[8]=f,e[9]=p,e[10]=g,e[11]=m,e[12]=w,e[13]=y,e[14]=v,e[15]=b}function $(e,t){B(e,t,t)}function q(e,n){var r,o=t();for(r=0;r<16;r++)o[r]=n[r];for(r=253;r>=0;r--)$(o,o),2!==r&&4!==r&&B(o,o,n);for(r=0;r<16;r++)e[r]=o[r]}function K(e,n){var r,o=t();for(r=0;r<16;r++)o[r]=n[r];for(r=250;r>=0;r--)$(o,o),1!==r&&B(o,o,n);for(r=0;r<16;r++)e[r]=o[r]}function H(e,n,r){var o,i,a=new Uint8Array(32),l=new Float64Array(80),c=t(),u=t(),d=t(),h=t(),f=t(),p=t();for(i=0;i<31;i++)a[i]=n[i];for(a[31]=127&n[31]|64,a[0]&=248,U(l,r),i=0;i<16;i++)u[i]=l[i],h[i]=c[i]=d[i]=0;for(c[0]=h[0]=1,i=254;i>=0;--i)I(c,u,o=a[i>>>3]>>>(7&i)&1),I(d,h,o),D(f,c,d),j(c,c,d),D(d,u,h),j(u,u,h),$(h,f),$(p,c),B(c,d,c),B(d,u,f),D(f,c,d),j(c,c,d),$(u,c),j(d,h,p),B(c,d,s),D(c,c,h),B(d,d,c),B(c,h,p),B(h,u,l),$(u,f),I(c,u,o),I(d,h,o);for(i=0;i<16;i++)l[i+16]=c[i],l[i+32]=d[i],l[i+48]=u[i],l[i+64]=h[i];var g=l.subarray(32),m=l.subarray(16);return q(g,g),B(m,m,g),N(e,m),0}function F(e,t){return H(e,t,o)}function V(e,t){return n(t,32),F(e,t)}function z(e,t,n){var o=new Uint8Array(32);return H(o,n,t),y(e,r,o,v)}k.prototype.blocks=function(e,t,n){for(var r,o,i,a,s,l,c,u,d,h,f,p,g,m,w,y,v,b,C,x=this.fin?0:2048,S=this.h[0],k=this.h[1],R=this.h[2],E=this.h[3],T=this.h[4],A=this.h[5],M=this.h[6],_=this.h[7],O=this.h[8],L=this.h[9],I=this.r[0],N=this.r[1],W=this.r[2],P=this.r[3],U=this.r[4],D=this.r[5],j=this.r[6],B=this.r[7],$=this.r[8],q=this.r[9];n>=16;)h=d=0,h+=(S+=8191&(r=255&e[t+0]|(255&e[t+1])<<8))*I,h+=(k+=8191&(r>>>13|(o=255&e[t+2]|(255&e[t+3])<<8)<<3))*(5*q),h+=(R+=8191&(o>>>10|(i=255&e[t+4]|(255&e[t+5])<<8)<<6))*(5*$),h+=(E+=8191&(i>>>7|(a=255&e[t+6]|(255&e[t+7])<<8)<<9))*(5*B),d=(h+=(T+=8191&(a>>>4|(s=255&e[t+8]|(255&e[t+9])<<8)<<12))*(5*j))>>>13,h&=8191,h+=(A+=s>>>1&8191)*(5*D),h+=(M+=8191&(s>>>14|(l=255&e[t+10]|(255&e[t+11])<<8)<<2))*(5*U),h+=(_+=8191&(l>>>11|(c=255&e[t+12]|(255&e[t+13])<<8)<<5))*(5*P),h+=(O+=8191&(c>>>8|(u=255&e[t+14]|(255&e[t+15])<<8)<<8))*(5*W),f=d+=(h+=(L+=u>>>5|x)*(5*N))>>>13,f+=S*N,f+=k*I,f+=R*(5*q),f+=E*(5*$),d=(f+=T*(5*B))>>>13,f&=8191,f+=A*(5*j),f+=M*(5*D),f+=_*(5*U),f+=O*(5*P),d+=(f+=L*(5*W))>>>13,f&=8191,p=d,p+=S*W,p+=k*N,p+=R*I,p+=E*(5*q),d=(p+=T*(5*$))>>>13,p&=8191,p+=A*(5*B),p+=M*(5*j),p+=_*(5*D),p+=O*(5*U),g=d+=(p+=L*(5*P))>>>13,g+=S*P,g+=k*W,g+=R*N,g+=E*I,d=(g+=T*(5*q))>>>13,g&=8191,g+=A*(5*$),g+=M*(5*B),g+=_*(5*j),g+=O*(5*D),m=d+=(g+=L*(5*U))>>>13,m+=S*U,m+=k*P,m+=R*W,m+=E*N,d=(m+=T*I)>>>13,m&=8191,m+=A*(5*q),m+=M*(5*$),m+=_*(5*B),m+=O*(5*j),w=d+=(m+=L*(5*D))>>>13,w+=S*D,w+=k*U,w+=R*P,w+=E*W,d=(w+=T*N)>>>13,w&=8191,w+=A*I,w+=M*(5*q),w+=_*(5*$),w+=O*(5*B),y=d+=(w+=L*(5*j))>>>13,y+=S*j,y+=k*D,y+=R*U,y+=E*P,d=(y+=T*W)>>>13,y&=8191,y+=A*N,y+=M*I,y+=_*(5*q),y+=O*(5*$),v=d+=(y+=L*(5*B))>>>13,v+=S*B,v+=k*j,v+=R*D,v+=E*U,d=(v+=T*P)>>>13,v&=8191,v+=A*W,v+=M*N,v+=_*I,v+=O*(5*q),b=d+=(v+=L*(5*$))>>>13,b+=S*$,b+=k*B,b+=R*j,b+=E*D,d=(b+=T*U)>>>13,b&=8191,b+=A*P,b+=M*W,b+=_*N,b+=O*I,C=d+=(b+=L*(5*q))>>>13,C+=S*q,C+=k*$,C+=R*B,C+=E*j,d=(C+=T*D)>>>13,C&=8191,C+=A*U,C+=M*P,C+=_*W,C+=O*N,S=h=8191&(d=(d=((d+=(C+=L*I)>>>13)<<2)+d|0)+(h&=8191)|0),k=f+=d>>>=13,R=p&=8191,E=g&=8191,T=m&=8191,A=w&=8191,M=y&=8191,_=v&=8191,O=b&=8191,L=C&=8191,t+=16,n-=16;this.h[0]=S,this.h[1]=k,this.h[2]=R,this.h[3]=E,this.h[4]=T,this.h[5]=A,this.h[6]=M,this.h[7]=_,this.h[8]=O,this.h[9]=L},k.prototype.finish=function(e,t){var n,r,o,i,a=new Uint16Array(10);if(this.leftover){for(i=this.leftover,this.buffer[i++]=1;i<16;i++)this.buffer[i]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(n=this.h[1]>>>13,this.h[1]&=8191,i=2;i<10;i++)this.h[i]+=n,n=this.h[i]>>>13,this.h[i]&=8191;for(this.h[0]+=5*n,n=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=n,n=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=n,a[0]=this.h[0]+5,n=a[0]>>>13,a[0]&=8191,i=1;i<10;i++)a[i]=this.h[i]+n,n=a[i]>>>13,a[i]&=8191;for(a[9]-=8192,r=(1^n)-1,i=0;i<10;i++)a[i]&=r;for(r=~r,i=0;i<10;i++)this.h[i]=this.h[i]&r|a[i];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),o=this.h[0]+this.pad[0],this.h[0]=65535&o,i=1;i<8;i++)o=(this.h[i]+this.pad[i]|0)+(o>>>16)|0,this.h[i]=65535&o;e[t+0]=this.h[0]>>>0&255,e[t+1]=this.h[0]>>>8&255,e[t+2]=this.h[1]>>>0&255,e[t+3]=this.h[1]>>>8&255,e[t+4]=this.h[2]>>>0&255,e[t+5]=this.h[2]>>>8&255,e[t+6]=this.h[3]>>>0&255,e[t+7]=this.h[3]>>>8&255,e[t+8]=this.h[4]>>>0&255,e[t+9]=this.h[4]>>>8&255,e[t+10]=this.h[5]>>>0&255,e[t+11]=this.h[5]>>>8&255,e[t+12]=this.h[6]>>>0&255,e[t+13]=this.h[6]>>>8&255,e[t+14]=this.h[7]>>>0&255,e[t+15]=this.h[7]>>>8&255},k.prototype.update=function(e,t,n){var r,o;if(this.leftover){for((o=16-this.leftover)>n&&(o=n),r=0;r<o;r++)this.buffer[this.leftover+r]=e[t+r];if(n-=o,t+=o,this.leftover+=o,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(n>=16&&(o=n-n%16,this.blocks(e,t,o),t+=o,n-=o),n){for(r=0;r<n;r++)this.buffer[this.leftover+r]=e[t+r];this.leftover+=n}};var Z=T,G=M,Y=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function Q(e,t,n,r){for(var o,i,a,s,l,c,u,d,h,f,p,g,m,w,y,v,b,C,x,S,k,R,E,T,A,M,_=new Int32Array(16),O=new Int32Array(16),L=e[0],I=e[1],N=e[2],W=e[3],P=e[4],U=e[5],D=e[6],j=e[7],B=t[0],$=t[1],q=t[2],K=t[3],H=t[4],F=t[5],V=t[6],z=t[7],Z=0;r>=128;){for(x=0;x<16;x++)S=8*x+Z,_[x]=n[S+0]<<24|n[S+1]<<16|n[S+2]<<8|n[S+3],O[x]=n[S+4]<<24|n[S+5]<<16|n[S+6]<<8|n[S+7];for(x=0;x<80;x++)if(o=L,i=I,a=N,s=W,l=P,c=U,u=D,h=B,f=$,p=q,g=K,m=H,w=F,y=V,E=65535&(R=z),T=R>>>16,A=65535&(k=j),M=k>>>16,E+=65535&(R=(H>>>14|P<<18)^(H>>>18|P<<14)^(P>>>9|H<<23)),T+=R>>>16,A+=65535&(k=(P>>>14|H<<18)^(P>>>18|H<<14)^(H>>>9|P<<23)),M+=k>>>16,E+=65535&(R=H&F^~H&V),T+=R>>>16,A+=65535&(k=P&U^~P&D),M+=k>>>16,E+=65535&(R=Y[2*x+1]),T+=R>>>16,A+=65535&(k=Y[2*x]),M+=k>>>16,k=_[x%16],T+=(R=O[x%16])>>>16,A+=65535&k,M+=k>>>16,A+=(T+=(E+=65535&R)>>>16)>>>16,E=65535&(R=C=65535&E|T<<16),T=R>>>16,A=65535&(k=b=65535&A|(M+=A>>>16)<<16),M=k>>>16,E+=65535&(R=(B>>>28|L<<4)^(L>>>2|B<<30)^(L>>>7|B<<25)),T+=R>>>16,A+=65535&(k=(L>>>28|B<<4)^(B>>>2|L<<30)^(B>>>7|L<<25)),M+=k>>>16,T+=(R=B&$^B&q^$&q)>>>16,A+=65535&(k=L&I^L&N^I&N),M+=k>>>16,d=65535&(A+=(T+=(E+=65535&R)>>>16)>>>16)|(M+=A>>>16)<<16,v=65535&E|T<<16,E=65535&(R=g),T=R>>>16,A=65535&(k=s),M=k>>>16,T+=(R=C)>>>16,A+=65535&(k=b),M+=k>>>16,I=o,N=i,W=a,P=s=65535&(A+=(T+=(E+=65535&R)>>>16)>>>16)|(M+=A>>>16)<<16,U=l,D=c,j=u,L=d,$=h,q=f,K=p,H=g=65535&E|T<<16,F=m,V=w,z=y,B=v,x%16==15)for(S=0;S<16;S++)k=_[S],E=65535&(R=O[S]),T=R>>>16,A=65535&k,M=k>>>16,k=_[(S+9)%16],E+=65535&(R=O[(S+9)%16]),T+=R>>>16,A+=65535&k,M+=k>>>16,b=_[(S+1)%16],E+=65535&(R=((C=O[(S+1)%16])>>>1|b<<31)^(C>>>8|b<<24)^(C>>>7|b<<25)),T+=R>>>16,A+=65535&(k=(b>>>1|C<<31)^(b>>>8|C<<24)^b>>>7),M+=k>>>16,b=_[(S+14)%16],T+=(R=((C=O[(S+14)%16])>>>19|b<<13)^(b>>>29|C<<3)^(C>>>6|b<<26))>>>16,A+=65535&(k=(b>>>19|C<<13)^(C>>>29|b<<3)^b>>>6),M+=k>>>16,M+=(A+=(T+=(E+=65535&R)>>>16)>>>16)>>>16,_[S]=65535&A|M<<16,O[S]=65535&E|T<<16;E=65535&(R=B),T=R>>>16,A=65535&(k=L),M=k>>>16,k=e[0],T+=(R=t[0])>>>16,A+=65535&k,M+=k>>>16,M+=(A+=(T+=(E+=65535&R)>>>16)>>>16)>>>16,e[0]=L=65535&A|M<<16,t[0]=B=65535&E|T<<16,E=65535&(R=$),T=R>>>16,A=65535&(k=I),M=k>>>16,k=e[1],T+=(R=t[1])>>>16,A+=65535&k,M+=k>>>16,M+=(A+=(T+=(E+=65535&R)>>>16)>>>16)>>>16,e[1]=I=65535&A|M<<16,t[1]=$=65535&E|T<<16,E=65535&(R=q),T=R>>>16,A=65535&(k=N),M=k>>>16,k=e[2],T+=(R=t[2])>>>16,A+=65535&k,M+=k>>>16,M+=(A+=(T+=(E+=65535&R)>>>16)>>>16)>>>16,e[2]=N=65535&A|M<<16,t[2]=q=65535&E|T<<16,E=65535&(R=K),T=R>>>16,A=65535&(k=W),M=k>>>16,k=e[3],T+=(R=t[3])>>>16,A+=65535&k,M+=k>>>16,M+=(A+=(T+=(E+=65535&R)>>>16)>>>16)>>>16,e[3]=W=65535&A|M<<16,t[3]=K=65535&E|T<<16,E=65535&(R=H),T=R>>>16,A=65535&(k=P),M=k>>>16,k=e[4],T+=(R=t[4])>>>16,A+=65535&k,M+=k>>>16,M+=(A+=(T+=(E+=65535&R)>>>16)>>>16)>>>16,e[4]=P=65535&A|M<<16,t[4]=H=65535&E|T<<16,E=65535&(R=F),T=R>>>16,A=65535&(k=U),M=k>>>16,k=e[5],T+=(R=t[5])>>>16,A+=65535&k,M+=k>>>16,M+=(A+=(T+=(E+=65535&R)>>>16)>>>16)>>>16,e[5]=U=65535&A|M<<16,t[5]=F=65535&E|T<<16,E=65535&(R=V),T=R>>>16,A=65535&(k=D),M=k>>>16,k=e[6],T+=(R=t[6])>>>16,A+=65535&k,M+=k>>>16,M+=(A+=(T+=(E+=65535&R)>>>16)>>>16)>>>16,e[6]=D=65535&A|M<<16,t[6]=V=65535&E|T<<16,E=65535&(R=z),T=R>>>16,A=65535&(k=j),M=k>>>16,k=e[7],T+=(R=t[7])>>>16,A+=65535&k,M+=k>>>16,M+=(A+=(T+=(E+=65535&R)>>>16)>>>16)>>>16,e[7]=j=65535&A|M<<16,t[7]=z=65535&E|T<<16,Z+=128,r-=128}return r}function J(e,t,n){var r,o=new Int32Array(8),i=new Int32Array(8),a=new Uint8Array(256),s=n;for(o[0]=1779033703,o[1]=3144134277,o[2]=1013904242,o[3]=2773480762,o[4]=1359893119,o[5]=2600822924,o[6]=528734635,o[7]=1541459225,i[0]=4089235720,i[1]=2227873595,i[2]=4271175723,i[3]=1595750129,i[4]=2917565137,i[5]=725511199,i[6]=4215389547,i[7]=327033209,Q(o,i,t,n),n%=128,r=0;r<n;r++)a[r]=t[s-n+r];for(a[n]=128,a[(n=256-128*(n<112?1:0))-9]=0,f(a,n-8,s/536870912|0,s<<3),Q(o,i,a,n),r=0;r<8;r++)f(e,8*r,o[r],i[r]);return 0}function X(e,n){var r=t(),o=t(),i=t(),a=t(),s=t(),l=t(),u=t(),d=t(),h=t();j(r,e[1],e[0]),j(h,n[1],n[0]),B(r,r,h),D(o,e[0],e[1]),D(h,n[0],n[1]),B(o,o,h),B(i,e[3],n[3]),B(i,i,c),B(a,e[2],n[2]),D(a,a,a),j(s,o,r),j(l,a,i),D(u,a,i),D(d,o,r),B(e[0],s,l),B(e[1],d,u),B(e[2],u,l),B(e[3],s,d)}function ee(e,t,n){var r;for(r=0;r<4;r++)I(e[r],t[r],n)}function te(e,n){var r=t(),o=t(),i=t();q(i,n[2]),B(r,n[0],i),B(o,n[1],i),N(e,o),e[31]^=P(r)<<7}function ne(e,t,n){var r,o;for(O(e[0],i),O(e[1],a),O(e[2],a),O(e[3],i),o=255;o>=0;--o)ee(e,t,r=n[o/8|0]>>(7&o)&1),X(t,e),X(e,e),ee(e,t,r)}function re(e,n){var r=[t(),t(),t(),t()];O(r[0],u),O(r[1],d),O(r[2],a),B(r[3],u,d),ne(e,r,n)}function oe(e,r,o){var i,a=new Uint8Array(64),s=[t(),t(),t(),t()];for(o||n(r,32),J(a,r,32),a[0]&=248,a[31]&=127,a[31]|=64,re(s,a),te(e,s),i=0;i<32;i++)r[i+32]=e[i];return 0}var ie=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function ae(e,t){var n,r,o,i;for(r=63;r>=32;--r){for(n=0,o=r-32,i=r-12;o<i;++o)t[o]+=n-16*t[r]*ie[o-(r-32)],n=Math.floor((t[o]+128)/256),t[o]-=256*n;t[o]+=n,t[r]=0}for(n=0,o=0;o<32;o++)t[o]+=n-(t[31]>>4)*ie[o],n=t[o]>>8,t[o]&=255;for(o=0;o<32;o++)t[o]-=n*ie[o];for(r=0;r<32;r++)t[r+1]+=t[r]>>8,e[r]=255&t[r]}function se(e){var t,n=new Float64Array(64);for(t=0;t<64;t++)n[t]=e[t];for(t=0;t<64;t++)e[t]=0;ae(e,n)}function le(e,n,r,o){var i,a,s=new Uint8Array(64),l=new Uint8Array(64),c=new Uint8Array(64),u=new Float64Array(64),d=[t(),t(),t(),t()];J(s,o,32),s[0]&=248,s[31]&=127,s[31]|=64;var h=r+64;for(i=0;i<r;i++)e[64+i]=n[i];for(i=0;i<32;i++)e[32+i]=s[32+i];for(J(c,e.subarray(32),r+32),se(c),re(d,c),te(e,d),i=32;i<64;i++)e[i]=o[i];for(J(l,e,r+64),se(l),i=0;i<64;i++)u[i]=0;for(i=0;i<32;i++)u[i]=c[i];for(i=0;i<32;i++)for(a=0;a<32;a++)u[i+a]+=l[i]*s[a];return ae(e.subarray(32),u),h}function ce(e,n,r,o){var s,c=new Uint8Array(32),u=new Uint8Array(64),d=[t(),t(),t(),t()],f=[t(),t(),t(),t()];if(r<64)return-1;if(function(e,n){var r=t(),o=t(),s=t(),c=t(),u=t(),d=t(),f=t();return O(e[2],a),U(e[1],n),$(s,e[1]),B(c,s,l),j(s,s,e[2]),D(c,e[2],c),$(u,c),$(d,u),B(f,d,u),B(r,f,s),B(r,r,c),K(r,r),B(r,r,s),B(r,r,c),B(r,r,c),B(e[0],r,c),$(o,e[0]),B(o,o,c),W(o,s)&&B(e[0],e[0],h),$(o,e[0]),B(o,o,c),W(o,s)?-1:(P(e[0])===n[31]>>7&&j(e[0],i,e[0]),B(e[3],e[0],e[1]),0)}(f,o))return-1;for(s=0;s<r;s++)e[s]=n[s];for(s=0;s<32;s++)e[s+32]=o[s];if(J(u,e,r),se(u),ne(d,f,u),re(f,n.subarray(32)),X(d,f),te(c,d),r-=64,m(n,0,c,0)){for(s=0;s<r;s++)e[s]=0;return-1}for(s=0;s<r;s++)e[s]=n[s+64];return r}var ue,de=16,he=64,fe=32,pe=64;function ge(e,t){if(32!==e.length)throw new Error("bad key size");if(24!==t.length)throw new Error("bad nonce size")}function me(){for(var e=0;e<arguments.length;e++)if(!(arguments[e]instanceof Uint8Array))throw new TypeError("unexpected type, use Uint8Array")}function we(e){for(var t=0;t<e.length;t++)e[t]=0}e.lowlevel={crypto_core_hsalsa20:y,crypto_stream_xor:S,crypto_stream:x,crypto_stream_salsa20_xor:b,crypto_stream_salsa20:C,crypto_onetimeauth:R,crypto_onetimeauth_verify:E,crypto_verify_16:g,crypto_verify_32:m,crypto_secretbox:T,crypto_secretbox_open:M,crypto_scalarmult:H,crypto_scalarmult_base:F,crypto_box_beforenm:z,crypto_box_afternm:Z,crypto_box:function(e,t,n,r,o,i){var a=new Uint8Array(32);return z(a,o,i),Z(e,t,n,r,a)},crypto_box_open:function(e,t,n,r,o,i){var a=new Uint8Array(32);return z(a,o,i),G(e,t,n,r,a)},crypto_box_keypair:V,crypto_hash:J,crypto_sign:le,crypto_sign_keypair:oe,crypto_sign_open:ce,crypto_secretbox_KEYBYTES:32,crypto_secretbox_NONCEBYTES:24,crypto_secretbox_ZEROBYTES:32,crypto_secretbox_BOXZEROBYTES:de,crypto_scalarmult_BYTES:32,crypto_scalarmult_SCALARBYTES:32,crypto_box_PUBLICKEYBYTES:32,crypto_box_SECRETKEYBYTES:32,crypto_box_BEFORENMBYTES:32,crypto_box_NONCEBYTES:24,crypto_box_ZEROBYTES:32,crypto_box_BOXZEROBYTES:16,crypto_sign_BYTES:he,crypto_sign_PUBLICKEYBYTES:fe,crypto_sign_SECRETKEYBYTES:pe,crypto_sign_SEEDBYTES:32,crypto_hash_BYTES:64,gf:t,D:l,L:ie,pack25519:N,unpack25519:U,M:B,A:D,S:$,Z:j,pow2523:K,add:X,set25519:O,modL:ae,scalarmult:ne,scalarbase:re},e.randomBytes=function(e){var t=new Uint8Array(e);return n(t,e),t},e.secretbox=function(e,t,n){me(e,t,n),ge(n,t);for(var r=new Uint8Array(32+e.length),o=new Uint8Array(r.length),i=0;i<e.length;i++)r[i+32]=e[i];return T(o,r,r.length,t,n),o.subarray(de)},e.secretbox.open=function(e,t,n){me(e,t,n),ge(n,t);for(var r=new Uint8Array(de+e.length),o=new Uint8Array(r.length),i=0;i<e.length;i++)r[i+de]=e[i];return r.length<32||0!==M(o,r,r.length,t,n)?null:o.subarray(32)},e.secretbox.keyLength=32,e.secretbox.nonceLength=24,e.secretbox.overheadLength=de,e.scalarMult=function(e,t){if(me(e,t),32!==e.length)throw new Error("bad n size");if(32!==t.length)throw new Error("bad p size");var n=new Uint8Array(32);return H(n,e,t),n},e.scalarMult.base=function(e){if(me(e),32!==e.length)throw new Error("bad n size");var t=new Uint8Array(32);return F(t,e),t},e.scalarMult.scalarLength=32,e.scalarMult.groupElementLength=32,e.box=function(t,n,r,o){var i=e.box.before(r,o);return e.secretbox(t,n,i)},e.box.before=function(e,t){me(e,t),function(e,t){if(32!==e.length)throw new Error("bad public key size");if(32!==t.length)throw new Error("bad secret key size")}(e,t);var n=new Uint8Array(32);return z(n,e,t),n},e.box.after=e.secretbox,e.box.open=function(t,n,r,o){var i=e.box.before(r,o);return e.secretbox.open(t,n,i)},e.box.open.after=e.secretbox.open,e.box.keyPair=function(){var e=new Uint8Array(32),t=new Uint8Array(32);return V(e,t),{publicKey:e,secretKey:t}},e.box.keyPair.fromSecretKey=function(e){if(me(e),32!==e.length)throw new Error("bad secret key size");var t=new Uint8Array(32);return F(t,e),{publicKey:t,secretKey:new Uint8Array(e)}},e.box.publicKeyLength=32,e.box.secretKeyLength=32,e.box.sharedKeyLength=32,e.box.nonceLength=24,e.box.overheadLength=e.secretbox.overheadLength,e.sign=function(e,t){if(me(e,t),t.length!==pe)throw new Error("bad secret key size");var n=new Uint8Array(he+e.length);return le(n,e,e.length,t),n},e.sign.open=function(e,t){if(me(e,t),t.length!==fe)throw new Error("bad public key size");var n=new Uint8Array(e.length),r=ce(n,e,e.length,t);if(r<0)return null;for(var o=new Uint8Array(r),i=0;i<o.length;i++)o[i]=n[i];return o},e.sign.detached=function(t,n){for(var r=e.sign(t,n),o=new Uint8Array(he),i=0;i<o.length;i++)o[i]=r[i];return o},e.sign.detached.verify=function(e,t,n){if(me(e,t,n),t.length!==he)throw new Error("bad signature size");if(n.length!==fe)throw new Error("bad public key size");var r,o=new Uint8Array(he+e.length),i=new Uint8Array(he+e.length);for(r=0;r<he;r++)o[r]=t[r];for(r=0;r<e.length;r++)o[r+he]=e[r];return ce(i,o,o.length,n)>=0},e.sign.keyPair=function(){var e=new Uint8Array(fe),t=new Uint8Array(pe);return oe(e,t),{publicKey:e,secretKey:t}},e.sign.keyPair.fromSecretKey=function(e){if(me(e),e.length!==pe)throw new Error("bad secret key size");for(var t=new Uint8Array(fe),n=0;n<t.length;n++)t[n]=e[32+n];return{publicKey:t,secretKey:new Uint8Array(e)}},e.sign.keyPair.fromSeed=function(e){if(me(e),32!==e.length)throw new Error("bad seed size");for(var t=new Uint8Array(fe),n=new Uint8Array(pe),r=0;r<32;r++)n[r]=e[r];return oe(t,n,!0),{publicKey:t,secretKey:n}},e.sign.publicKeyLength=fe,e.sign.secretKeyLength=pe,e.sign.seedLength=32,e.sign.signatureLength=he,e.hash=function(e){me(e);var t=new Uint8Array(64);return J(t,e,e.length),t},e.hash.hashLength=64,e.verify=function(e,t){return me(e,t),0!==e.length&&0!==t.length&&e.length===t.length&&0===p(e,0,t,0,e.length)},e.setPRNG=function(e){n=e},(ue="undefined"!=typeof self?self.crypto||self.msCrypto:null)&&ue.getRandomValues?e.setPRNG(function(e,t){var n,r=new Uint8Array(t);for(n=0;n<t;n+=65536)ue.getRandomValues(r.subarray(n,n+Math.min(t-n,65536)));for(n=0;n<t;n++)e[n]=r[n];we(r)}):void 0!==A&&(ue=_)&&ue.randomBytes&&e.setPRNG(function(e,t){var n,r=ue.randomBytes(t);for(n=0;n<t;n++)e[n]=r[n];we(r)})}(e.exports?e.exports:self.nacl=self.nacl||{})}(M)),M.exports);const I=b(L);var N,W,P,U,D,j,B;e.CONNECT_EVENT_ERROR_CODES=void 0,(N=e.CONNECT_EVENT_ERROR_CODES||(e.CONNECT_EVENT_ERROR_CODES={}))[N.UNKNOWN_ERROR=0]="UNKNOWN_ERROR",N[N.BAD_REQUEST_ERROR=1]="BAD_REQUEST_ERROR",N[N.MANIFEST_NOT_FOUND_ERROR=2]="MANIFEST_NOT_FOUND_ERROR",N[N.MANIFEST_CONTENT_ERROR=3]="MANIFEST_CONTENT_ERROR",N[N.UNKNOWN_APP_ERROR=100]="UNKNOWN_APP_ERROR",N[N.USER_REJECTS_ERROR=300]="USER_REJECTS_ERROR",N[N.METHOD_NOT_SUPPORTED=400]="METHOD_NOT_SUPPORTED",e.CONNECT_ITEM_ERROR_CODES=void 0,(W=e.CONNECT_ITEM_ERROR_CODES||(e.CONNECT_ITEM_ERROR_CODES={}))[W.UNKNOWN_ERROR=0]="UNKNOWN_ERROR",W[W.METHOD_NOT_SUPPORTED=400]="METHOD_NOT_SUPPORTED",e.SEND_TRANSACTION_ERROR_CODES=void 0,(P=e.SEND_TRANSACTION_ERROR_CODES||(e.SEND_TRANSACTION_ERROR_CODES={}))[P.UNKNOWN_ERROR=0]="UNKNOWN_ERROR",P[P.BAD_REQUEST_ERROR=1]="BAD_REQUEST_ERROR",P[P.UNKNOWN_APP_ERROR=100]="UNKNOWN_APP_ERROR",P[P.USER_REJECTS_ERROR=300]="USER_REJECTS_ERROR",P[P.METHOD_NOT_SUPPORTED=400]="METHOD_NOT_SUPPORTED",e.SIGN_DATA_ERROR_CODES=void 0,(U=e.SIGN_DATA_ERROR_CODES||(e.SIGN_DATA_ERROR_CODES={}))[U.UNKNOWN_ERROR=0]="UNKNOWN_ERROR",U[U.BAD_REQUEST_ERROR=1]="BAD_REQUEST_ERROR",U[U.UNKNOWN_APP_ERROR=100]="UNKNOWN_APP_ERROR",U[U.USER_REJECTS_ERROR=300]="USER_REJECTS_ERROR",U[U.METHOD_NOT_SUPPORTED=400]="METHOD_NOT_SUPPORTED",(j=D||(D={}))[j.UNKNOWN_ERROR=0]="UNKNOWN_ERROR",j[j.BAD_REQUEST_ERROR=1]="BAD_REQUEST_ERROR",j[j.UNKNOWN_APP_ERROR=100]="UNKNOWN_APP_ERROR",j[j.METHOD_NOT_SUPPORTED=400]="METHOD_NOT_SUPPORTED",e.CHAIN=void 0,(B=e.CHAIN||(e.CHAIN={})).MAINNET="-239",B.TESTNET="-3";const $={encode:function(e,t=!1){let n;return e instanceof Uint8Array?n=e:("string"!=typeof e&&(e=JSON.stringify(e)),n=T.decodeUTF8(e)),function(e,t){const n=T.encodeBase64(e);return t?encodeURIComponent(n):n}(n,t)},decode:function(e,t=!1){const n=function(e,t){return t&&(e=decodeURIComponent(e)),T.decodeBase64(e)}(e,t);return{toString:()=>T.encodeUTF8(n),toObject(){try{return JSON.parse(T.encodeUTF8(n))}catch(e){return null}},toUint8Array:()=>n}}};function q(e){let t="";return e.forEach(e=>{t+=("0"+(255&e).toString(16)).slice(-2)}),t}function K(e){if(e.length%2!=0)throw new Error(`Cannot convert ${e} to bytesArray`);const t=new Uint8Array(e.length/2);for(let n=0;n<e.length;n+=2)t[n/2]=parseInt(e.slice(n,n+2),16);return t}class H{constructor(e){this.nonceLength=24,this.keyPair=e?this.createKeypairFromString(e):this.createKeypair(),this.sessionId=q(this.keyPair.publicKey)}createKeypair(){return I.box.keyPair()}createKeypairFromString(e){return{publicKey:K(e.publicKey),secretKey:K(e.secretKey)}}createNonce(){return I.randomBytes(this.nonceLength)}encrypt(e,t){const n=(new TextEncoder).encode(e),r=this.createNonce();return function(e,t){const n=new Uint8Array(e.length+t.length);return n.set(e),n.set(t,e.length),n}(r,I.box(n,r,t,this.keyPair.secretKey))}decrypt(e,t){const[n,r]=function(e,t){if(t>=e.length)throw new Error("Index is out of buffer");return[e.slice(0,t),e.slice(t)]}(e,this.nonceLength),o=I.box.open(r,n,t,this.keyPair.secretKey);if(!o)throw new Error(`Decryption error: \n message: ${e.toString()} \n sender pubkey: ${t.toString()} \n keypair pubkey: ${this.keyPair.publicKey.toString()} \n keypair secretkey: ${this.keyPair.secretKey.toString()}`);return(new TextDecoder).decode(o)}stringifyKeypair(){return{publicKey:q(this.keyPair.publicKey),secretKey:q(this.keyPair.secretKey)}}}function F(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function V(e,t,n,r){return new(n||(n=Promise))(function(t,o){function i(e){try{s(r.next(e))}catch(t){o(t)}}function a(e){try{s(r.throw(e))}catch(t){o(t)}}function s(e){var r;e.done?t(e.value):(r=e.value,r instanceof n?r:new n(function(e){e(r)})).then(i,a)}s((r=r.apply(e,[])).next())})}"function"==typeof SuppressedError&&SuppressedError;class z extends Error{get info(){return""}constructor(e,t){super(e,t),this.message=`${z.prefix} ${this.constructor.name}${this.info?": "+this.info:""}${e?"\n"+e:""}`,Object.setPrototypeOf(this,z.prototype)}}z.prefix="[TON_CONNECT_SDK_ERROR]";class Z extends z{get info(){return"Passed DappMetadata is in incorrect format."}constructor(...e){super(...e),Object.setPrototypeOf(this,Z.prototype)}}class G extends z{get info(){return"Passed `tonconnect-manifest.json` contains errors. Check format of your manifest. See more https://github.com/ton-connect/docs/blob/main/requests-responses.md#app-manifest"}constructor(...e){super(...e),Object.setPrototypeOf(this,G.prototype)}}class Y extends z{get info(){return"Manifest not found. Make sure you added `tonconnect-manifest.json` to the root of your app or passed correct manifestUrl. See more https://github.com/ton-connect/docs/blob/main/requests-responses.md#app-manifest"}constructor(...e){super(...e),Object.setPrototypeOf(this,Y.prototype)}}class Q extends z{get info(){return"Wallet connection called but wallet already connected. To avoid the error, disconnect the wallet before doing a new connection."}constructor(...e){super(...e),Object.setPrototypeOf(this,Q.prototype)}}class J extends z{get info(){return"Send transaction or other protocol methods called while wallet is not connected."}constructor(...e){super(...e),Object.setPrototypeOf(this,J.prototype)}}class X extends z{get info(){return"There is an attempt to connect to the injected wallet while it is not exists in the webpage."}constructor(...e){super(...e),Object.setPrototypeOf(this,X.prototype)}}class ee extends z{get info(){return"Wallet doesn't support requested feature method."}constructor(e,t){super(e,t),Object.setPrototypeOf(this,ee.prototype)}}class te extends z{get info(){return"Missing required features. You need to update your wallet."}constructor(e,t){super(e,t),Object.setPrototypeOf(this,te.prototype)}}class ne extends z{get info(){return"User rejects the action in the wallet."}constructor(...e){super(...e),Object.setPrototypeOf(this,ne.prototype)}}class re extends z{get info(){return"Request to the wallet contains errors."}constructor(...e){super(...e),Object.setPrototypeOf(this,re.prototype)}}class oe extends z{get info(){return"App tries to send rpc request to the injected wallet while not connected."}constructor(...e){super(...e),Object.setPrototypeOf(this,oe.prototype)}}class ie extends z{get info(){return"Storage was not specified in the `DappMetadata` and default `localStorage` was not detected in the environment."}constructor(...e){super(...e),Object.setPrototypeOf(this,ie.prototype)}}class ae extends z{get info(){return"An error occurred while fetching the wallets list."}constructor(...e){super(...e),Object.setPrototypeOf(this,ae.prototype)}}class se extends z{get info(){return"Passed address is in incorrect format."}constructor(...e){super(...e),Object.setPrototypeOf(this,se.prototype)}}class le extends z{get info(){return"Passed hex is in incorrect format."}constructor(...e){super(...e),Object.setPrototypeOf(this,le.prototype)}}class ce extends z{constructor(...e){super(...e),Object.setPrototypeOf(this,ce.prototype)}}const ue={[e.CONNECT_EVENT_ERROR_CODES.UNKNOWN_ERROR]:ce,[e.CONNECT_EVENT_ERROR_CODES.USER_REJECTS_ERROR]:ne,[e.CONNECT_EVENT_ERROR_CODES.BAD_REQUEST_ERROR]:re,[e.CONNECT_EVENT_ERROR_CODES.UNKNOWN_APP_ERROR]:oe,[e.CONNECT_EVENT_ERROR_CODES.MANIFEST_NOT_FOUND_ERROR]:Y,[e.CONNECT_EVENT_ERROR_CODES.MANIFEST_CONTENT_ERROR]:G};const de=new class{parseError(e){let t=ce;return e.code in ue&&(t=ue[e.code]||ce),new t(e.message)}};class he{isError(e){return"error"in e}}const fe={[e.SEND_TRANSACTION_ERROR_CODES.UNKNOWN_ERROR]:ce,[e.SEND_TRANSACTION_ERROR_CODES.USER_REJECTS_ERROR]:ne,[e.SEND_TRANSACTION_ERROR_CODES.BAD_REQUEST_ERROR]:re,[e.SEND_TRANSACTION_ERROR_CODES.UNKNOWN_APP_ERROR]:oe};const pe=new class extends he{convertToRpcRequest(e){return{method:"sendTransaction",params:[JSON.stringify(e)]}}parseAndThrowError(e){let t=ce;throw e.error.code in fe&&(t=fe[e.error.code]||ce),new t(e.error.message)}convertFromRpcResponse(e){return{boc:e.result}}},ge={[e.SIGN_DATA_ERROR_CODES.UNKNOWN_ERROR]:ce,[e.SIGN_DATA_ERROR_CODES.USER_REJECTS_ERROR]:ne,[e.SIGN_DATA_ERROR_CODES.BAD_REQUEST_ERROR]:re,[e.SIGN_DATA_ERROR_CODES.UNKNOWN_APP_ERROR]:oe};const me=new class extends he{convertToRpcRequest(e){return{method:"signData",params:[JSON.stringify(e)]}}parseAndThrowError(e){let t=ce;throw e.error.code in ge&&(t=ge[e.error.code]||ce),new t(e.error.message)}convertFromRpcResponse(e){return e.result}};class we{constructor(e,t){this.storage=e,this.storeKey="ton-connect-storage_http-bridge-gateway::"+t}storeLastEventId(e){return V(this,0,void 0,function*(){return this.storage.setItem(this.storeKey,e)})}removeLastEventId(){return V(this,0,void 0,function*(){return this.storage.removeItem(this.storeKey)})}getLastEventId(){return V(this,0,void 0,function*(){const e=yield this.storage.getItem(this.storeKey);return e||null})}}function ye(e,t){return function(e){return"/"===e.slice(-1)?e.slice(0,-1):e}(e)+"/"+t}function ve(e){if(!e)return!1;const t=new URL(e);return"tg:"===t.protocol||"t.me"===t.hostname}function be(e){return e.replaceAll(".","%2E").replaceAll("-","%2D").replaceAll("_","%5F").replaceAll("&","-").replaceAll("=","__").replaceAll("%","--")}function Ce(e,t){return V(this,0,void 0,function*(){return new Promise((t,n)=>{setTimeout(()=>t(),e)})})}function xe(e){const t=new AbortController;return(null==e?void 0:e.aborted)?t.abort():null==e||e.addEventListener("abort",()=>t.abort(),{once:!0}),t}function Se(e,t){return V(this,0,void 0,function*(){var n,r;const o=null!==(n=null==t?void 0:t.attempts)&&void 0!==n?n:10,i=null!==(r=null==t?void 0:t.delayMs)&&void 0!==r?r:200,a=xe(null==t?void 0:t.signal);if("function"!=typeof e)throw new z("Expected a function, got "+typeof e);let s,l=0;for(;l<o;){if(a.signal.aborted)throw new z(`Aborted after attempts ${l}`);try{return yield e({signal:a.signal})}catch(c){s=c,l++,l<o&&(yield Ce(i))}}throw s})}function ke(...e){try{console.debug("[TON_CONNECT_SDK]",...e)}catch(t){}}function Re(...e){try{console.error("[TON_CONNECT_SDK]",...e)}catch(t){}}class Ee{get isReady(){const e=this.eventSource.current();return(null==e?void 0:e.readyState)===EventSource.OPEN}get isClosed(){const e=this.eventSource.current();return(null==e?void 0:e.readyState)!==EventSource.OPEN}get isConnecting(){const e=this.eventSource.current();return(null==e?void 0:e.readyState)===EventSource.CONNECTING}constructor(e,t,n,r,o){this.bridgeUrl=t,this.sessionId=n,this.listener=r,this.errorsListener=o,this.ssePath="events",this.postPath="message",this.heartbeatMessage="heartbeat",this.defaultTtl=300,this.defaultReconnectDelay=2e3,this.defaultResendDelay=5e3,this.eventSource=function(e,t){let n=null,r=null,o=null,i=null,a=null;const s=(s,...l)=>V(this,0,void 0,function*(){if(i=null!=s?s:null,null==a||a.abort(),a=xe(s),a.signal.aborted)throw new z("Resource creation was aborted");r=null!=l?l:null;const c=e(a.signal,...l);o=c;const u=yield c;if(o!==c&&u!==n)throw yield t(u),new z("Resource creation was aborted by a new resource creation");return n=u,n});return{create:s,current:()=>null!=n?n:null,dispose:()=>V(this,0,void 0,function*(){try{const r=n;n=null;const i=o;o=null;try{null==a||a.abort()}catch(e){}yield Promise.allSettled([r?t(r):Promise.resolve(),i?t(yield i):Promise.resolve()])}catch(e){}}),recreate:e=>V(this,0,void 0,function*(){const t=n,a=o,l=r,c=i;if(yield Ce(e),t===n&&a===o&&l===r&&c===i)return yield s(i,...null!=l?l:[]);throw new z("Resource recreation was aborted by a new resource creation")})}}((e,t)=>V(this,0,void 0,function*(){const n={bridgeUrl:this.bridgeUrl,ssePath:this.ssePath,sessionId:this.sessionId,bridgeGatewayStorage:this.bridgeGatewayStorage,errorHandler:this.errorsHandler.bind(this),messageHandler:this.messagesHandler.bind(this),signal:e,openingDeadlineMS:t};return yield function(e){return V(this,0,void 0,function*(){return yield function(e,t){const n=null==t?void 0:t.timeout,r=xe(null==t?void 0:t.signal);return new Promise((t,o)=>V(this,0,void 0,function*(){if(r.signal.aborted)return void o(new z("Operation aborted"));let i;void 0!==n&&(i=setTimeout(()=>{r.abort(),o(new z(`Timeout after ${n}ms`))},n)),r.signal.addEventListener("abort",()=>{clearTimeout(i),o(new z("Operation aborted"))},{once:!0});const a={timeout:n,abort:r.signal};yield e((...e)=>{clearTimeout(i),t(...e)},()=>{clearTimeout(i),o()},a)}))}((t,n,r)=>V(this,0,void 0,function*(){var o;const i=xe(r.signal).signal;if(i.aborted)return void n(new z("Bridge connection aborted"));const a=new URL(ye(e.bridgeUrl,e.ssePath));a.searchParams.append("client_id",e.sessionId);const s=yield e.bridgeGatewayStorage.getLastEventId();if(s&&a.searchParams.append("last_event_id",s),i.aborted)return void n(new z("Bridge connection aborted"));const l=new EventSource(a.toString());l.onerror=r=>V(this,0,void 0,function*(){if(i.aborted)return l.close(),void n(new z("Bridge connection aborted"));try{const n=yield e.errorHandler(l,r);n!==l&&l.close(),n&&n!==l&&t(n)}catch(o){l.close(),n(o)}}),l.onopen=()=>{if(i.aborted)return l.close(),void n(new z("Bridge connection aborted"));t(l)},l.onmessage=t=>{if(i.aborted)return l.close(),void n(new z("Bridge connection aborted"));e.messageHandler(t)},null===(o=e.signal)||void 0===o||o.addEventListener("abort",()=>{l.close(),n(new z("Bridge connection aborted"))})}),{timeout:e.openingDeadlineMS,signal:e.signal})})}(n)}),e=>V(this,0,void 0,function*(){e.close()})),this.bridgeGatewayStorage=new we(e,t)}registerSession(e){return V(this,0,void 0,function*(){yield this.eventSource.create(null==e?void 0:e.signal,null==e?void 0:e.openingDeadlineMS)})}send(e,t,n,r){return V(this,0,void 0,function*(){var o;const i={};"number"==typeof r?i.ttl=r:(i.ttl=null==r?void 0:r.ttl,i.signal=null==r?void 0:r.signal,i.attempts=null==r?void 0:r.attempts);const a=new URL(ye(this.bridgeUrl,this.postPath));a.searchParams.append("client_id",this.sessionId),a.searchParams.append("to",t),a.searchParams.append("ttl",((null==i?void 0:i.ttl)||this.defaultTtl).toString()),a.searchParams.append("topic",n);const s=$.encode(e);yield Se(e=>V(this,0,void 0,function*(){const t=yield this.post(a,s,e.signal);if(!t.ok)throw new z(`Bridge send failed, status ${t.status}`)}),{attempts:null!==(o=null==i?void 0:i.attempts)&&void 0!==o?o:Number.MAX_SAFE_INTEGER,delayMs:this.defaultResendDelay,signal:null==i?void 0:i.signal})})}pause(){this.eventSource.dispose().catch(e=>Re(`Bridge pause failed, ${e}`))}unPause(){return V(this,0,void 0,function*(){yield this.eventSource.recreate(0)})}close(){return V(this,0,void 0,function*(){yield this.eventSource.dispose().catch(e=>Re(`Bridge close failed, ${e}`))})}setListener(e){this.listener=e}setErrorsListener(e){this.errorsListener=e}post(e,t,n){return V(this,0,void 0,function*(){const r=yield fetch(e,{method:"post",body:t,signal:n});if(!r.ok)throw new z(`Bridge send failed, status ${r.status}`);return r})}errorsHandler(e,t){return V(this,0,void 0,function*(){if(this.isConnecting)throw e.close(),new z("Bridge error, failed to connect");if(!this.isReady){if(this.isClosed)return e.close(),ke(`Bridge reconnecting, ${this.defaultReconnectDelay}ms delay`),yield this.eventSource.recreate(this.defaultReconnectDelay);throw new z("Bridge error, unknown state")}try{this.errorsListener(t)}catch(n){}})}messagesHandler(e){return V(this,0,void 0,function*(){if(e.data===this.heartbeatMessage)return;if(yield this.bridgeGatewayStorage.storeLastEventId(e.lastEventId),this.isClosed)return;let t;try{t=JSON.parse(e.data)}catch(n){throw new z(`Bridge message parse failed, message ${e.data}`)}this.listener(t)})}}function Te(e){return!("connectEvent"in e)}class Ae{constructor(e){this.storage=e,this.storeKey="ton-connect-storage_bridge-connection"}storeConnection(e){return V(this,0,void 0,function*(){if("injected"===e.type)return this.storage.setItem(this.storeKey,JSON.stringify(e));if(!Te(e)){const t={sessionKeyPair:e.session.sessionCrypto.stringifyKeypair(),walletPublicKey:e.session.walletPublicKey,bridgeUrl:e.session.bridgeUrl},n={type:"http",connectEvent:e.connectEvent,session:t,lastWalletEventId:e.lastWalletEventId,nextRpcRequestId:e.nextRpcRequestId};return this.storage.setItem(this.storeKey,JSON.stringify(n))}const t={type:"http",connectionSource:e.connectionSource,sessionCrypto:e.sessionCrypto.stringifyKeypair(),createdAt:Date.now()};return this.storage.setItem(this.storeKey,JSON.stringify(t))})}removeConnection(){return V(this,0,void 0,function*(){return this.storage.removeItem(this.storeKey)})}getConnection(){return V(this,0,void 0,function*(){const e=yield this.storage.getItem(this.storeKey);if(!e)return null;const t=JSON.parse(e);if("injected"===t.type)return t;if(!function(e){return!("connectEvent"in e)}(t)){const e=new H(t.session.sessionKeyPair);return{type:"http",connectEvent:t.connectEvent,lastWalletEventId:t.lastWalletEventId,nextRpcRequestId:t.nextRpcRequestId,session:{sessionCrypto:e,bridgeUrl:t.session.bridgeUrl,walletPublicKey:t.session.walletPublicKey}}}return function(e){var t;return Date.now()-(null!==(t=e.createdAt)&&void 0!==t?t:0)>3e5}(t)?(yield this.removeConnection(),null):{type:"http",sessionCrypto:new H(t.sessionCrypto),connectionSource:t.connectionSource}})}getHttpConnection(){return V(this,0,void 0,function*(){const e=yield this.getConnection();if(!e)throw new z("Trying to read HTTP connection source while nothing is stored");if("injected"===e.type)throw new z("Trying to read HTTP connection source while injected connection is stored");return e})}getHttpPendingConnection(){return V(this,0,void 0,function*(){const e=yield this.getConnection();if(!e)throw new z("Trying to read HTTP connection source while nothing is stored");if("injected"===e.type)throw new z("Trying to read HTTP connection source while injected connection is stored");if(!Te(e))throw new z("Trying to read HTTP-pending connection while http connection is stored");return e})}getInjectedConnection(){return V(this,0,void 0,function*(){const e=yield this.getConnection();if(!e)throw new z("Trying to read Injected bridge connection source while nothing is stored");if("http"===(null==e?void 0:e.type))throw new z("Trying to read Injected bridge connection source while HTTP connection is stored");return e})}storedConnectionType(){return V(this,0,void 0,function*(){const e=yield this.storage.getItem(this.storeKey);if(!e)return null;return JSON.parse(e).type})}storeLastWalletEventId(e){return V(this,0,void 0,function*(){const t=yield this.getConnection();if(t&&"http"===t.type&&!Te(t))return t.lastWalletEventId=e,this.storeConnection(t)})}getLastWalletEventId(){return V(this,0,void 0,function*(){const e=yield this.getConnection();if(e&&"lastWalletEventId"in e)return e.lastWalletEventId})}increaseNextRpcRequestId(){return V(this,0,void 0,function*(){const e=yield this.getConnection();if(e&&"nextRpcRequestId"in e){const t=e.nextRpcRequestId||0;return e.nextRpcRequestId=t+1,this.storeConnection(e)}})}getNextRpcRequestId(){return V(this,0,void 0,function*(){const e=yield this.getConnection();return e&&"nextRpcRequestId"in e&&e.nextRpcRequestId||0})}}class Me{static fromStorage(e){return V(this,0,void 0,function*(){const t=new Ae(e),n=yield t.getHttpConnection();return Te(n)?new Me(e,n.connectionSource):new Me(e,{bridgeUrl:n.session.bridgeUrl})})}constructor(e,t){this.storage=e,this.walletConnectionSource=t,this.type="http",this.standardUniversalLink="tc://",this.pendingRequests=new Map,this.session=null,this.gateway=null,this.pendingGateways=[],this.listeners=[],this.defaultOpeningDeadlineMS=12e3,this.defaultRetryTimeoutMS=2e3,this.connectionStorage=new Ae(e)}connect(e,t){var n;const r=xe(null==t?void 0:t.signal);null===(n=this.abortController)||void 0===n||n.abort(),this.abortController=r,this.closeGateways();const o=new H;this.session={sessionCrypto:o,bridgeUrl:"bridgeUrl"in this.walletConnectionSource?this.walletConnectionSource.bridgeUrl:""},this.connectionStorage.storeConnection({type:"http",connectionSource:this.walletConnectionSource,sessionCrypto:o}).then(()=>V(this,0,void 0,function*(){r.signal.aborted||(yield Se(e=>{var n;return this.openGateways(o,{openingDeadlineMS:null!==(n=null==t?void 0:t.openingDeadlineMS)&&void 0!==n?n:this.defaultOpeningDeadlineMS,signal:null==e?void 0:e.signal})},{attempts:Number.MAX_SAFE_INTEGER,delayMs:this.defaultRetryTimeoutMS,signal:r.signal}))}));const i="universalLink"in this.walletConnectionSource&&this.walletConnectionSource.universalLink?this.walletConnectionSource.universalLink:this.standardUniversalLink;return this.generateUniversalLink(i,e)}restoreConnection(e){return V(this,0,void 0,function*(){var t,n;const r=xe(null==e?void 0:e.signal);if(null===(t=this.abortController)||void 0===t||t.abort(),this.abortController=r,r.signal.aborted)return;this.closeGateways();const o=yield this.connectionStorage.getHttpConnection();if(!o)return;if(r.signal.aborted)return;const i=null!==(n=null==e?void 0:e.openingDeadlineMS)&&void 0!==n?n:this.defaultOpeningDeadlineMS;if(Te(o))return this.session={sessionCrypto:o.sessionCrypto,bridgeUrl:"bridgeUrl"in this.walletConnectionSource?this.walletConnectionSource.bridgeUrl:""},yield this.openGateways(o.sessionCrypto,{openingDeadlineMS:i,signal:null==r?void 0:r.signal});if(Array.isArray(this.walletConnectionSource))throw new z("Internal error. Connection source is array while WalletConnectionSourceHTTP was expected.");if(this.session=o.session,this.gateway&&(ke("Gateway is already opened, closing previous gateway"),yield this.gateway.close()),this.gateway=new Ee(this.storage,this.walletConnectionSource.bridgeUrl,o.session.sessionCrypto.sessionId,this.gatewayListener.bind(this),this.gatewayErrorsListener.bind(this)),!r.signal.aborted){this.listeners.forEach(e=>e(o.connectEvent));try{yield Se(e=>this.gateway.registerSession({openingDeadlineMS:i,signal:e.signal}),{attempts:Number.MAX_SAFE_INTEGER,delayMs:this.defaultRetryTimeoutMS,signal:r.signal})}catch(a){return void(yield this.disconnect({signal:r.signal}))}}})}sendRequest(e,t){const n={};return"function"==typeof t?n.onRequestSent=t:(n.onRequestSent=null==t?void 0:t.onRequestSent,n.signal=null==t?void 0:t.signal,n.attempts=null==t?void 0:t.attempts),new Promise((t,r)=>V(this,0,void 0,function*(){var o;if(!this.gateway||!this.session||!("walletPublicKey"in this.session))throw new z("Trying to send bridge request without session");const i=(yield this.connectionStorage.getNextRpcRequestId()).toString();yield this.connectionStorage.increaseNextRpcRequestId(),ke("Send http-bridge request:",Object.assign(Object.assign({},e),{id:i}));const a=this.session.sessionCrypto.encrypt(JSON.stringify(Object.assign(Object.assign({},e),{id:i})),K(this.session.walletPublicKey));try{yield this.gateway.send(a,this.session.walletPublicKey,e.method,{attempts:null==n?void 0:n.attempts,signal:null==n?void 0:n.signal}),null===(o=null==n?void 0:n.onRequestSent)||void 0===o||o.call(n),this.pendingRequests.set(i.toString(),t)}catch(s){r(s)}}))}closeConnection(){this.closeGateways(),this.listeners=[],this.session=null,this.gateway=null}disconnect(e){return V(this,0,void 0,function*(){return new Promise(t=>V(this,0,void 0,function*(){let n=!1,r=null;const o=()=>{n||(n=!0,this.removeBridgeAndSession().then(t))};try{this.closeGateways();const t=xe(null==e?void 0:e.signal);r=setTimeout(()=>{t.abort()},this.defaultOpeningDeadlineMS),yield this.sendRequest({method:"disconnect",params:[]},{onRequestSent:o,signal:t.signal,attempts:1})}catch(i){ke("Disconnect error:",i),n||this.removeBridgeAndSession().then(t)}finally{r&&clearTimeout(r),o()}}))})}listen(e){return this.listeners.push(e),()=>this.listeners=this.listeners.filter(t=>t!==e)}pause(){var e;null===(e=this.gateway)||void 0===e||e.pause(),this.pendingGateways.forEach(e=>e.pause())}unPause(){return V(this,0,void 0,function*(){const e=this.pendingGateways.map(e=>e.unPause());this.gateway&&e.push(this.gateway.unPause()),yield Promise.all(e)})}pendingGatewaysListener(e,t,n){return V(this,0,void 0,function*(){if(this.pendingGateways.includes(e))return this.closeGateways({except:e}),this.gateway&&(ke("Gateway is already opened, closing previous gateway"),yield this.gateway.close()),this.session.bridgeUrl=t,this.gateway=e,this.gateway.setErrorsListener(this.gatewayErrorsListener.bind(this)),this.gateway.setListener(this.gatewayListener.bind(this)),this.gatewayListener(n);yield e.close()})}gatewayListener(e){return V(this,0,void 0,function*(){const t=JSON.parse(this.session.sessionCrypto.decrypt($.decode(e.message).toUint8Array(),K(e.from)));if(ke("Wallet message received:",t),!("event"in t)){const e=t.id.toString(),n=this.pendingRequests.get(e);return n?(n(t),void this.pendingRequests.delete(e)):void ke(`Response id ${e} doesn't match any request's id`)}if(void 0!==t.id){const e=yield this.connectionStorage.getLastWalletEventId();if(void 0!==e&&t.id<=e)return void Re(`Received event id (=${t.id}) must be greater than stored last wallet event id (=${e}) `);"connect"!==t.event&&(yield this.connectionStorage.storeLastWalletEventId(t.id))}const n=this.listeners;"connect"===t.event&&(yield this.updateSession(t,e.from)),"disconnect"===t.event&&(ke("Removing bridge and session: received disconnect event"),yield this.removeBridgeAndSession()),n.forEach(e=>e(t))})}gatewayErrorsListener(e){return V(this,0,void 0,function*(){throw new z(`Bridge error ${JSON.stringify(e)}`)})}updateSession(e,t){return V(this,0,void 0,function*(){this.session=Object.assign(Object.assign({},this.session),{walletPublicKey:t});const n=e.payload.items.find(e=>"ton_addr"===e.name),r=Object.assign(Object.assign({},e),{payload:Object.assign(Object.assign({},e.payload),{items:[n]})});yield this.connectionStorage.storeConnection({type:"http",session:this.session,lastWalletEventId:e.id,connectEvent:r,nextRpcRequestId:0})})}removeBridgeAndSession(){return V(this,0,void 0,function*(){this.closeConnection(),yield this.connectionStorage.removeConnection()})}generateUniversalLink(e,t){return ve(e)?this.generateTGUniversalLink(e,t):this.generateRegularUniversalLink(e,t)}generateRegularUniversalLink(e,t){const n=new URL(e);return n.searchParams.append("v",2..toString()),n.searchParams.append("id",this.session.sessionCrypto.sessionId),n.searchParams.append("r",JSON.stringify(t)),n.toString()}generateTGUniversalLink(e,t){const n="tonconnect-"+be(this.generateRegularUniversalLink("about:blank",t).split("?")[1]),r=this.convertToDirectLink(e),o=new URL(r);return o.searchParams.append("startapp",n),o.toString()}convertToDirectLink(e){const t=new URL(e);return t.searchParams.has("attach")&&(t.searchParams.delete("attach"),t.pathname+="/start"),t.toString()}openGateways(e,t){return V(this,0,void 0,function*(){return Array.isArray(this.walletConnectionSource)?(this.pendingGateways.map(e=>e.close().catch()),this.pendingGateways=this.walletConnectionSource.map(t=>{const n=new Ee(this.storage,t.bridgeUrl,e.sessionId,()=>{},()=>{});return n.setListener(e=>this.pendingGatewaysListener(n,t.bridgeUrl,e)),n}),void(yield Promise.allSettled(this.pendingGateways.map(e=>Se(n=>{var r;return this.pendingGateways.some(t=>t===e)?e.registerSession({openingDeadlineMS:null!==(r=null==t?void 0:t.openingDeadlineMS)&&void 0!==r?r:this.defaultOpeningDeadlineMS,signal:n.signal}):e.close()},{attempts:Number.MAX_SAFE_INTEGER,delayMs:this.defaultRetryTimeoutMS,signal:null==t?void 0:t.signal}))))):(this.gateway&&(ke("Gateway is already opened, closing previous gateway"),yield this.gateway.close()),this.gateway=new Ee(this.storage,this.walletConnectionSource.bridgeUrl,e.sessionId,this.gatewayListener.bind(this),this.gatewayErrorsListener.bind(this)),yield this.gateway.registerSession({openingDeadlineMS:null==t?void 0:t.openingDeadlineMS,signal:null==t?void 0:t.signal}))})}closeGateways(e){var t;null===(t=this.gateway)||void 0===t||t.close(),this.pendingGateways.filter(t=>t!==(null==e?void 0:e.except)).forEach(e=>e.close()),this.pendingGateways=[]}}function _e(e,t){return Oe(e,[t])}function Oe(e,t){return!(!e||"object"!=typeof e)&&t.every(t=>t in e)}let Le=class e{static getInstance(){return e.instance||(e.instance=new e),e.instance}constructor(){this.storage={}}get length(){return Object.keys(this.storage).length}clear(){this.storage={}}getItem(e){var t;return null!==(t=this.storage[e])&&void 0!==t?t:null}key(e){var t;const n=Object.keys(this.storage);return e<0||e>=n.length?null:null!==(t=n[e])&&void 0!==t?t:null}removeItem(e){delete this.storage[e]}setItem(e,t){this.storage[e]=t}};function Ie(){if("undefined"!=typeof window)return window}function Ne(){var e;const t=null===(e=Ie())||void 0===e?void 0:e.location.origin;return t?t+"/tonconnect-manifest.json":""}function We(){if(function(){try{return"undefined"!=typeof localStorage}catch(e){return!1}}())return localStorage;if("undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node)throw new z("`localStorage` is unavailable, but it is required for TonConnect. For more details, see https://github.com/ton-connect/sdk/tree/main/packages/sdk#init-connector");return Le.getInstance()}class Pe{static fromStorage(e){return V(this,0,void 0,function*(){const t=new Ae(e),n=yield t.getInjectedConnection();return new Pe(e,n.jsBridgeKey)})}static isWalletInjected(e){return Pe.isWindowContainsWallet(this.window,e)}static isInsideWalletBrowser(e){return!!Pe.isWindowContainsWallet(this.window,e)&&this.window[e].tonconnect.isWalletBrowser}static getCurrentlyInjectedWallets(){if(!this.window)return[];return function(){const e=Ie();if(!e)return[];try{return Object.entries(e)}catch(t){return[]}}().filter(([e,t])=>function(e){try{return!(!_e(e,"tonconnect")||!_e(e.tonconnect,"walletInfo"))&&Oe(e.tonconnect.walletInfo,["name","app_name","image","about_url","platforms"])}catch(t){return!1}}(t)).map(([e,t])=>({name:t.tonconnect.walletInfo.name,appName:t.tonconnect.walletInfo.app_name,aboutUrl:t.tonconnect.walletInfo.about_url,imageUrl:t.tonconnect.walletInfo.image,tondns:t.tonconnect.walletInfo.tondns,jsBridgeKey:e,injected:!0,embedded:t.tonconnect.isWalletBrowser,platforms:t.tonconnect.walletInfo.platforms,features:t.tonconnect.walletInfo.features}))}static isWindowContainsWallet(e,t){return!!e&&t in e&&"object"==typeof e[t]&&"tonconnect"in e[t]}constructor(e,t){this.injectedWalletKey=t,this.type="injected",this.unsubscribeCallback=null,this.listenSubscriptions=!1,this.listeners=[];const n=Pe.window;if(!Pe.isWindowContainsWallet(n,t))throw new X;this.connectionStorage=new Ae(e),this.injectedWallet=n[t].tonconnect}connect(e){this._connect(2,e)}restoreConnection(){return V(this,0,void 0,function*(){try{ke("Injected Provider restoring connection...");const e=yield this.injectedWallet.restoreConnection();ke("Injected Provider restoring connection response",e),"connect"===e.event?(this.makeSubscriptions(),this.listeners.forEach(t=>t(e))):yield this.connectionStorage.removeConnection()}catch(e){yield this.connectionStorage.removeConnection(),console.error(e)}})}closeConnection(){this.listenSubscriptions&&this.injectedWallet.disconnect(),this.closeAllListeners()}disconnect(){return V(this,0,void 0,function*(){return new Promise(e=>{const t=()=>{this.closeAllListeners(),this.connectionStorage.removeConnection().then(e)};try{this.injectedWallet.disconnect(),t()}catch(n){ke(n),this.sendRequest({method:"disconnect",params:[]},t)}})})}closeAllListeners(){var e;this.listenSubscriptions=!1,this.listeners=[],null===(e=this.unsubscribeCallback)||void 0===e||e.call(this)}listen(e){return this.listeners.push(e),()=>this.listeners=this.listeners.filter(t=>t!==e)}sendRequest(e,t){return V(this,0,void 0,function*(){var n;const r={};"function"==typeof t?r.onRequestSent=t:(r.onRequestSent=null==t?void 0:t.onRequestSent,r.signal=null==t?void 0:t.signal);const o=(yield this.connectionStorage.getNextRpcRequestId()).toString();yield this.connectionStorage.increaseNextRpcRequestId(),ke("Send injected-bridge request:",Object.assign(Object.assign({},e),{id:o}));const i=this.injectedWallet.send(Object.assign(Object.assign({},e),{id:o}));return i.then(e=>ke("Wallet message received:",e)),null===(n=null==r?void 0:r.onRequestSent)||void 0===n||n.call(r),i})}_connect(e,t){return V(this,0,void 0,function*(){try{ke(`Injected Provider connect request: protocolVersion: ${e}, message:`,t);const n=yield this.injectedWallet.connect(e,t);ke("Injected Provider connect response:",n),"connect"===n.event&&(yield this.updateSession(),this.makeSubscriptions()),this.listeners.forEach(e=>e(n))}catch(n){ke("Injected Provider connect error:",n);const e={event:"connect_error",payload:{code:0,message:null==n?void 0:n.toString()}};this.listeners.forEach(t=>t(e))}})}makeSubscriptions(){this.listenSubscriptions=!0,this.unsubscribeCallback=this.injectedWallet.listen(e=>{ke("Wallet message received:",e),this.listenSubscriptions&&this.listeners.forEach(t=>t(e)),"disconnect"===e.event&&this.disconnect()})}updateSession(){return this.connectionStorage.storeConnection({type:"injected",jsBridgeKey:this.injectedWalletKey,nextRpcRequestId:0})}}Pe.window=Ie();class Ue{constructor(){this.localStorage=We()}getItem(e){return V(this,0,void 0,function*(){return this.localStorage.getItem(e)})}removeItem(e){return V(this,0,void 0,function*(){this.localStorage.removeItem(e)})}setItem(e,t){return V(this,0,void 0,function*(){this.localStorage.setItem(e,t)})}}function De(e){return Be(e)&&e.injected}function je(e){return De(e)&&e.embedded}function Be(e){return"jsBridgeKey"in e}function $e(e){return"bridgeUrl"in e}const qe=[{app_name:"telegram-wallet",name:"Wallet",image:"https://wallet.tg/images/logo-288.png",about_url:"https://wallet.tg/",universal_url:"https://t.me/wallet?attach=wallet",bridge:[{type:"sse",url:"https://walletbot.me/tonconnect-bridge/bridge"}],platforms:["ios","android","macos","windows","linux"]},{app_name:"tonkeeper",name:"Tonkeeper",image:"https://tonkeeper.com/assets/tonconnect-icon.png",tondns:"tonkeeper.ton",about_url:"https://tonkeeper.com",universal_url:"https://app.tonkeeper.com/ton-connect",deepLink:"tonkeeper-tc://",bridge:[{type:"sse",url:"https://bridge.tonapi.io/bridge"},{type:"js",key:"tonkeeper"}],platforms:["ios","android","chrome","firefox","macos"]},{app_name:"mytonwallet",name:"MyTonWallet",image:"https://static.mytonwallet.io/icon-256.png",about_url:"https://mytonwallet.io",universal_url:"https://connect.mytonwallet.org",bridge:[{type:"js",key:"mytonwallet"},{type:"sse",url:"https://tonconnectbridge.mytonwallet.org/bridge/"}],platforms:["chrome","windows","macos","linux","ios","android","firefox"]},{app_name:"tonhub",name:"Tonhub",image:"https://tonhub.com/tonconnect_logo.png",about_url:"https://tonhub.com",universal_url:"https://tonhub.com/ton-connect",bridge:[{type:"js",key:"tonhub"},{type:"sse",url:"https://connect.tonhubapi.com/tonconnect"}],platforms:["ios","android"]},{app_name:"bitgetTonWallet",name:"Bitget Wallet",image:"https://raw.githubusercontent.com/bitgetwallet/download/refs/heads/main/logo/png/bitget_wallet_logo_288_mini.png",about_url:"https://web3.bitget.com",deepLink:"bitkeep://",bridge:[{type:"js",key:"bitgetTonWallet"},{type:"sse",url:"https://ton-connect-bridge.bgwapi.io/bridge"}],platforms:["ios","android","chrome"],universal_url:"https://bkcode.vip/ton-connect"},{app_name:"okxMiniWallet",name:"OKX Mini Wallet",image:"https://static.okx.com/cdn/assets/imgs/2411/8BE1A4A434D8F58A.png",about_url:"https://www.okx.com/web3",universal_url:"https://t.me/OKX_WALLET_BOT?attach=wallet",bridge:[{type:"sse",url:"https://www.okx.com/tonbridge/discover/rpc/bridge"}],platforms:["ios","android","macos","windows","linux"]},{app_name:"binanceWeb3TonWallet",name:"Binance Web3 Wallet",image:"https://public.bnbstatic.com/static/binance-w3w/ton-provider/binancew3w.png",about_url:"https://www.binance.com/en/web3wallet",deepLink:"bnc://app.binance.com/cedefi/ton-connect",bridge:[{type:"js",key:"binancew3w"},{type:"sse",url:"https://wallet.binance.com/tonbridge/bridge"}],platforms:["ios","android","macos","windows","linux"],universal_url:"https://app.binance.com/cedefi/ton-connect"},{app_name:"fintopio-tg",name:"Fintopio",image:"https://fintopio.com/tonconnect-icon.png",about_url:"https://fintopio.com",universal_url:"https://t.me/fintopio?attach=wallet",bridge:[{type:"sse",url:"https://wallet-bridge.fintopio.com/bridge"}],platforms:["ios","android","macos","windows","linux"]},{app_name:"okxTonWallet",name:"OKX Wallet",image:"https://static.okx.com/cdn/assets/imgs/247/58E63FEA47A2B7D7.png",about_url:"https://www.okx.com/web3",universal_url:"https://www.okx.com/download?appendQuery=true&deeplink=okx://web3/wallet/tonconnect",bridge:[{type:"js",key:"okxTonWallet"},{type:"sse",url:"https://www.okx.com/tonbridge/discover/rpc/bridge"}],platforms:["chrome","safari","firefox","ios","android"]},{app_name:"hot",name:"HOT",image:"https://raw.githubusercontent.com/hot-dao/media/main/logo.png",about_url:"https://hot-labs.org/",universal_url:"https://t.me/herewalletbot?attach=wallet",bridge:[{type:"sse",url:"https://sse-bridge.hot-labs.org"},{type:"js",key:"hotWallet"}],platforms:["ios","android","macos","windows","linux"]},{app_name:"bybitTonWallet",name:"Bybit Wallet",image:"https://raw.githubusercontent.com/bybit-web3/bybit-web3.github.io/main/docs/images/bybit-logo.png",about_url:"https://www.bybit.com/web3",universal_url:"https://app.bybit.com/ton-connect",deepLink:"bybitapp://",bridge:[{type:"js",key:"bybitTonWallet"},{type:"sse",url:"https://api-node.bybit.com/spot/api/web3/bridge/ton/bridge"}],platforms:["ios","android","chrome"]},{app_name:"dewallet",name:"DeWallet",image:"https://raw.githubusercontent.com/delab-team/manifests-images/main/WalletAvatar.png",about_url:"https://delabwallet.com",universal_url:"https://t.me/dewallet?attach=wallet",bridge:[{type:"sse",url:"https://bridge.dewallet.pro/bridge"}],platforms:["ios","android","macos","windows","linux"]},{app_name:"safepalwallet",name:"SafePal",image:"https://s.pvcliping.com/web/public_image/SafePal_x288.png",tondns:"",about_url:"https://www.safepal.com",universal_url:"https://link.safepal.io/ton-connect",deepLink:"safepal-tc://",bridge:[{type:"sse",url:"https://ton-bridge.safepal.com/tonbridge/v1/bridge"},{type:"js",key:"safepalwallet"}],platforms:["ios","android","chrome","firefox"]},{app_name:"GateWallet",name:"GateWallet",image:"https://img.gatedataimg.com/prd-ordinal-imgs/036f07bb8730716e/gateio-0925.png",about_url:"https://www.gate.io/",bridge:[{type:"js",key:"gatetonwallet"},{type:"sse",url:"https://dapp.gateio.services/tonbridge_api/bridge/v1"}],platforms:["ios","android"],universal_url:"https://gateio.go.link/gateio/web3?adj_t=1ff8khdw_1fu4ccc7"},{app_name:"openmask",name:"OpenMask",image:"https://raw.githubusercontent.com/OpenProduct/openmask-extension/main/public/openmask-logo-288.png",about_url:"https://www.openmask.app/",bridge:[{type:"js",key:"openmask"}],platforms:["chrome"]},{app_name:"BitgetWeb3",name:"BitgetWeb3",image:"https://img.bitgetimg.com/image/third/1731638059795.png",about_url:"​https://www.bitget.com",universal_url:"https://t.me/BitgetOfficialBot?attach=wallet",bridge:[{type:"sse",url:"https://ton-connect-bridge.bgwapi.io/bridge"}],platforms:["ios","android","windows","macos","linux"]},{app_name:"tobi",name:"Tobi",image:"https://app.tobiwallet.app/icons/logo-288.png",about_url:"https://tobi.fun",universal_url:"https://t.me/TobiCopilotBot?attach=wallet",bridge:[{type:"sse",url:"https://ton-bridge.tobiwallet.app/bridge"}],platforms:["ios","android","macos","windows","linux"]},{app_name:"xtonwallet",name:"XTONWallet",image:"https://xtonwallet.com/assets/img/icon-256-back.png",about_url:"https://xtonwallet.com",bridge:[{type:"js",key:"xtonwallet"}],platforms:["chrome","firefox"]},{app_name:"tonwallet",name:"TON Wallet",image:"https://wallet.ton.org/assets/ui/qr-logo.png",about_url:"https://chrome.google.com/webstore/detail/ton-wallet/nphplpgoakhhjchkkhmiggakijnkhfnd",bridge:[{type:"js",key:"tonwallet"}],platforms:["chrome"]}];let Ke=!1,He=null;function Fe(){return Ke}function Ve(){if("undefined"==typeof window)return;if(document.getElementById("ton-connect-qa-banner"))return;const e=document.createElement("div");e.id="ton-connect-qa-banner",e.style.cssText="\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n background: linear-gradient(90deg, #ff6b6b, #ff8e8e);\n color: white;\n padding: 12px 20px;\n text-align: center;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;\n font-weight: 600;\n font-size: 14px;\n z-index: 999999;\n box-shadow: 0 2px 8px rgba(0,0,0,0.2);\n animation: slideDown 0.3s ease-out;\n user-select: none;\n pointer-events: none;\n ",e.innerHTML="\n 🚨 QA Mode Active - Validation Disabled (Unsafe for Production)\n ";const t=document.createElement("style");t.textContent="\n @keyframes slideDown {\n from { transform: translateY(-100%); }\n to { transform: translateY(0); }\n }\n ",document.head.appendChild(t),document.body.appendChild(e),ze()}function ze(){if("undefined"==typeof window)return;if(document.getElementById("ton-connect-qa-mode-styles"))return;const e=document.createElement("style");e.id="ton-connect-qa-mode-styles",e.textContent="\n body.qa-mode-active {\n padding-top: 48px !important;\n }\n \n body.qa-mode-active header {\n margin-top: 48px !important;\n }\n \n body.qa-mode-active .qa-mode-control {\n top: 128px !important;\n }\n ",document.head.appendChild(e),document.body.classList.add("qa-mode-active")}class Ze{constructor(e){var t;this.walletsListDTOCache=null,this.walletsListDTOCacheCreationTimestamp=null,Fe()?this.walletsListSource="https://raw.githubusercontent.com/ton-connect/wallets-list-staging/refs/heads/main/wallets-v2.json":this.walletsListSource=null!==(t=null==e?void 0:e.walletsListSource)&&void 0!==t?t:"https://raw.githubusercontent.com/ton-blockchain/wallets-list/main/wallets-v2.json",this.cacheTTLMs=null==e?void 0:e.cacheTTLMs}getWallets(){return V(this,0,void 0,function*(){const[e,t]=yield Promise.all([this.fetchWalletsListDTO(),this.getCurrentlyInjectedWallets()]);return this.mergeWalletsLists(this.walletConfigDTOListToWalletConfigList(e),t)})}getEmbeddedWallet(){return V(this,0,void 0,function*(){const e=(yield this.getWallets()).filter(je);return 1===e.length?e[0]:null})}fetchWalletsListDTO(){return V(this,0,void 0,function*(){return this.cacheTTLMs&&this.walletsListDTOCacheCreationTimestamp&&Date.now()>this.walletsListDTOCacheCreationTimestamp+this.cacheTTLMs&&(this.walletsListDTOCache=null),this.walletsListDTOCache||(this.walletsListDTOCache=this.fetchWalletsListFromSource(),this.walletsListDTOCache.then(()=>{this.walletsListDTOCacheCreationTimestamp=Date.now()}).catch(()=>{this.walletsListDTOCache=null,this.walletsListDTOCacheCreationTimestamp=null})),this.walletsListDTOCache})}fetchWalletsListFromSource(){return V(this,0,void 0,function*(){let e=[];try{const t=yield fetch(this.walletsListSource);if(e=yield t.json(),!Array.isArray(e))throw new ae("Wrong wallets list format, wallets list must be an array.");const n=e.filter(e=>!this.isCorrectWalletConfigDTO(e));n.length&&(Re(`Wallet(s) ${n.map(e=>(null==e?void 0:e.name)||"unknown").join(", ")} config format is wrong. They were removed from the wallets list.`),e=e.filter(e=>this.isCorrectWalletConfigDTO(e)))}catch(t){Re(t),e=qe}return e})}getCurrentlyInjectedWallets(){if(!Fe())return[];try{return Pe.getCurrentlyInjectedWallets()}catch(e){return Re(e),[]}}walletConfigDTOListToWalletConfigList(e){return e.map(e=>{const t={name:e.name,appName:e.app_name,imageUrl:e.image,aboutUrl:e.about_url,tondns:e.tondns,platforms:e.platforms,features:e.features};return e.bridge.forEach(n=>{if("sse"===n.type&&(t.bridgeUrl=n.url,t.universalLink=e.universal_url,t.deepLink=e.deepLink),"js"===n.type){const e=n.key;t.jsBridgeKey=e,t.injected=Pe.isWalletInjected(e),t.embedded=Pe.isInsideWalletBrowser(e)}}),t})}mergeWalletsLists(e,t){return[...new Set(e.concat(t).map(e=>e.name)).values()].map(n=>{const r=e.find(e=>e.name===n),o=t.find(e=>e.name===n);return Object.assign(Object.assign({},r&&Object.assign({},r)),o&&Object.assign({},o))})}isCorrectWalletConfigDTO(e){if(!e||"object"!=typeof e)return!1;if(!("name"in e&&"image"in e&&"about_url"in e&&"platforms"in e&&"app_name"in e))return!1;if(!e.platforms||!Array.isArray(e.platforms)||!e.platforms.length)return!1;if(!("bridge"in e)||!Array.isArray(e.bridge)||!e.bridge.length)return!1;const t=e.bridge;if(t.some(e=>!e||"object"!=typeof e||!("type"in e)))return!1;const n=t.find(e=>"sse"===e.type);if(n&&("object"!=typeof n||!("url"in n)||!n.url||!e.universal_url))return!1;const r=t.find(e=>"js"===e.type);return!!(!r||"object"==typeof r&&"key"in r&&r.key)}}function Ge(e,t){const n=e.includes("SendTransaction"),r=Qe(e,"SendTransaction"),o={minMessages:t.requiredMessagesNumber,extraCurrencyRequired:t.requireExtraCurrencies};if(!n&&!r)throw new ee("Wallet doesn't support SendTransaction feature.",{cause:{requiredFeature:{featureName:"SendTransaction",value:o}}});if(t.requireExtraCurrencies&&(!r||!r.extraCurrencySupported))throw new ee("Wallet is not able to handle such SendTransaction request. Extra currencies support is required.",{cause:{requiredFeature:{featureName:"SendTransaction",value:o}}});if(r&&void 0!==r.maxMessages){if(r.maxMessages<t.requiredMessagesNumber)throw new ee(`Wallet is not able to handle such SendTransaction request. Max support messages number is ${r.maxMessages}, but ${t.requiredMessagesNumber} is required.`,{cause:{requiredFeature:{featureName:"SendTransaction",value:o}}})}else!function(...e){try{console.warn("[TON_CONNECT_SDK]",...e)}catch(t){}}("Connected wallet didn't provide information about max allowed messages in the SendTransaction request. Request may be rejected by the wallet.")}function Ye(e,t){if("object"!=typeof t)return!0;const{sendTransaction:n,signData:r}=t;if(n){const t=Qe(e,"SendTransaction");if(!t)return!1;if(!function(e,t){const n=void 0===t.minMessages||t.minMessages<=e.maxMessages,r=!t.extraCurrencyRequired||e.extraCurrencySupported;return!(!n||!r)}(t,n))return!1}if(r){const t=Qe(e,"SignData");if(!t)return!1;if(!function(e,t){return t.types.every(t=>e.types.includes(t))}(t,r))return!1}return!0}function Qe(e,t){return e.find(e=>e&&"object"==typeof e&&e.name===t)}function Je(){return{type:"request-version"}}function Xe(e){return{type:"response-version",version:e}}function et(e){return{ton_connect_sdk_lib:e.ton_connect_sdk_lib,ton_connect_ui_lib:e.ton_connect_ui_lib}}function tt(e,t){var n,r,o,i,a,s,l,c;const u=(null===(n=null==t?void 0:t.connectItems)||void 0===n?void 0:n.tonProof)&&"proof"in t.connectItems.tonProof?"ton_proof":"ton_addr";return{wallet_address:null!==(o=null===(r=null==t?void 0:t.account)||void 0===r?void 0:r.address)&&void 0!==o?o:null,wallet_type:null!==(i=null==t?void 0:t.device.appName)&&void 0!==i?i:null,wallet_version:null!==(a=null==t?void 0:t.device.appVersion)&&void 0!==a?a:null,auth_type:u,custom_data:Object.assign({chain_id:null!==(l=null===(s=null==t?void 0:t.account)||void 0===s?void 0:s.chain)&&void 0!==l?l:null,provider:null!==(c=null==t?void 0:t.provider)&&void 0!==c?c:null},et(e))}}function nt(e){return{type:"connection-started",custom_data:et(e)}}function rt(e,t){return Object.assign({type:"connection-completed",is_success:!0},tt(e,t))}function ot(e,t,n){return{type:"connection-error",is_success:!1,error_message:t,error_code:null!=n?n:null,custom_data:et(e)}}function it(e){return{type:"connection-restoring-started",custom_data:et(e)}}function at(e,t){return Object.assign({type:"connection-restoring-completed",is_success:!0},tt(e,t))}function st(e,t){return{type:"connection-restoring-error",is_success:!1,error_message:t,custom_data:et(e)}}function lt(e,t){var n,r,o,i;return{valid_until:null!==(n=String(t.validUntil))&&void 0!==n?n:null,from:null!==(i=null!==(r=t.from)&&void 0!==r?r:null===(o=null==e?void 0:e.account)||void 0===o?void 0:o.address)&&void 0!==i?i:null,messages:t.messages.map(e=>{var t,n;return{address:null!==(t=e.address)&&void 0!==t?t:null,amount:null!==(n=e.amount)&&void 0!==n?n:null}})}}function ct(e,t,n){return Object.assign(Object.assign({type:"transaction-sent-for-signature"},tt(e,t)),lt(t,n))}function ut(e,t,n,r){return Object.assign(Object.assign({type:"transaction-signed",is_success:!0,signed_transaction:r.boc},tt(e,t)),lt(t,n))}function dt(e,t,n,r,o){return Object.assign(Object.assign({type:"transaction-signing-failed",is_success:!1,error_message:r,error_code:null!=o?o:null},tt(e,t)),lt(t,n))}function ht(e,t,n){return Object.assign({type:"sign-data-request-initiated",data:n},tt(e,t))}function ft(e,t,n,r){return Object.assign({type:"sign-data-request-completed",is_success:!0,data:n,signed_data:r},tt(e,t))}function pt(e,t,n,r,o){return Object.assign({type:"sign-data-request-failed",is_success:!1,data:n,error_message:r,error_code:null!=o?o:null},tt(e,t))}function gt(e,t,n){return Object.assign({type:"disconnection",scope:n},tt(e,t))}class mt{constructor(){this.window=Ie()}dispatchEvent(e,t){return V(this,0,void 0,function*(){var n;const r=new CustomEvent(e,{detail:t});null===(n=this.window)||void 0===n||n.dispatchEvent(r)})}addEventListener(e,t,n){return V(this,0,void 0,function*(){var r;return null===(r=this.window)||void 0===r||r.addEventListener(e,t,n),()=>{var n;return null===(n=this.window)||void 0===n?void 0:n.removeEventListener(e,t)}})}}class wt{get version(){return et({ton_connect_sdk_lib:this.tonConnectSdkVersion,ton_connect_ui_lib:this.tonConnectUiVersion})}constructor(e){var t;this.eventPrefix="ton-connect-",this.tonConnectUiVersion=null,this.eventDispatcher=null!==(t=null==e?void 0:e.eventDispatcher)&&void 0!==t?t:new mt,this.tonConnectSdkVersion=e.tonConnectSdkVersion,this.init().catch()}init(){return V(this,0,void 0,function*(){try{yield this.setRequestVersionHandler(),this.tonConnectUiVersion=yield this.requestTonConnectUiVersion()}catch(e){}})}setRequestVersionHandler(){return V(this,0,void 0,function*(){yield this.eventDispatcher.addEventListener("ton-connect-request-version",()=>V(this,0,void 0,function*(){yield this.eventDispatcher.dispatchEvent("ton-connect-response-version",Xe(this.tonConnectSdkVersion))}))})}requestTonConnectUiVersion(){return V(this,0,void 0,function*(){return new Promise((e,t)=>V(this,0,void 0,function*(){try{yield this.eventDispatcher.addEventListener("ton-connect-ui-response-version",t=>{e(t.detail.version)},{once:!0}),yield this.eventDispatcher.dispatchEvent("ton-connect-ui-request-version",{type:"request-version"})}catch(n){t(n)}}))})}dispatchUserActionEvent(e){try{this.eventDispatcher.dispatchEvent(`${this.eventPrefix}${e.type}`,e).catch()}catch(t){}}trackConnectionStarted(...e){try{const t=nt(this.version,...e);this.dispatchUserActionEvent(t)}catch(t){}}trackConnectionCompleted(...e){try{const t=rt(this.version,...e);this.dispatchUserActionEvent(t)}catch(t){}}trackConnectionError(...e){try{const t=ot(this.version,...e);this.dispatchUserActionEvent(t)}catch(t){}}trackConnectionRestoringStarted(...e){try{const t=it(this.version,...e);this.dispatchUserActionEvent(t)}catch(t){}}trackConnectionRestoringCompleted(...e){try{const t=at(this.version,...e);this.dispatchUserActionEvent(t)}catch(t){}}trackConnectionRestoringError(...e){try{const t=st(this.version,...e);this.dispatchUserActionEvent(t)}catch(t){}}trackDisconnection(...e){try{const t=gt(this.version,...e);this.dispatchUserActionEvent(t)}catch(t){}}trackTransactionSentForSignature(...e){try{const t=ct(this.version,...e);this.dispatchUserActionEvent(t)}catch(t){}}trackTransactionSigned(...e){try{const t=ut(this.version,...e);this.dispatchUserActionEvent(t)}catch(t){}}trackTransactionSigningFailed(...e){try{const t=dt(this.version,...e);this.dispatchUserActionEvent(t)}catch(t){}}trackDataSentForSignature(...e){try{const t=ht(this.version,...e);this.dispatchUserActionEvent(t)}catch(t){}}trackDataSigned(...e){try{const t=ft(this.version,...e);this.dispatchUserActionEvent(t)}catch(t){}}trackDataSigningFailed(...e){try{const t=pt(this.version,...e);this.dispatchUserActionEvent(t)}catch(t){}}}const yt=128;function vt(e,t=!1){const{wc:n,hex:r}=Ct(e);let o=81;t&&(o|=128);const i=new Int8Array(34);i[0]=o,i[1]=n,i.set(r,2);const a=new Uint8Array(36);return a.set(i),a.set(xt(i),34),$.encode(a).replace(/\+/g,"-").replace(/\//g,"_")}function bt(e){try{return function(e){const t=e.replace(/-/g,"+").replace(/_/g,"/");let n;try{n=$.decode(t).toUint8Array()}catch(d){throw new se(`Invalid base64 encoding in address: ${e}`)}if(36!==n.length)throw new se(`Invalid address length: ${e}`);const r=n.slice(0,34),o=n.slice(34,36),i=xt(r);if(!o.every((e,t)=>e===i[t]))throw new se(`Invalid checksum in address: ${e}`);let a=r[0],s=!1,l=!1;a&yt&&(s=!0,a^=yt);if(17!==a&&81!==a)throw new se(`Unknown address tag: ${a}`);l=17===a;let c=null;c=255===r[1]?-1:r[1];const u=r.slice(2);if(0!==c&&-1!==c)throw new se(`Invalid workchain: ${c}`);Array.from(u).map(e=>e.toString(16).padStart(2,"0")).join("")}(e),!0}catch(t){return!1}}function Ct(e){if(!e.includes(":"))throw new se(`Wrong address ${e}. Address must include ":".`);const t=e.split(":");if(2!==t.length)throw new se(`Wrong address ${e}. Address must include ":" only once.`);const n=parseInt(t[0]);if(0!==n&&-1!==n)throw new se(`Wrong address ${e}. WC must be eq 0 or -1, but ${n} received.`);const r=t[1];if(64!==(null==r?void 0:r.length))throw new se(`Wrong address ${e}. Hex part must be 64bytes length, but ${null==r?void 0:r.length} received.`);return{wc:n,hex:kt(r)}}function xt(e){let t=0;const n=new Uint8Array(e.length+2);n.set(e);for(let r of n){let e=128;for(;e>0;)t<<=1,r&e&&(t+=1),e>>=1,t>65535&&(t&=65535,t^=4129)}return new Uint8Array([Math.floor(t/256),t%256])}const St={};for(let hf=0;hf<=255;hf++){let e=hf.toString(16);e.length<2&&(e="0"+e),St[e]=hf}function kt(e){const t=(e=e.toLowerCase()).length;if(t%2!=0)throw new le("Hex string must have length a multiple of 2: "+e);const n=t/2,r=new Uint8Array(n);for(let o=0;o<n;o++){const t=2*o,n=e.substring(t,t+2);if(!St.hasOwnProperty(n))throw new le("Invalid hex character: "+n);r[o]=St[n]}return r}const Rt=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/,Et=/^-?\d+$/,Tt=/^\d+$/;function At(e){return"number"==typeof e&&!isNaN(e)}function Mt(e){return"string"==typeof e&&e.length>0}function _t(e){return Mt(e)&&(function(e){try{return Ct(e),!0}catch(t){return!1}}(e)||bt(e))}function Ot(e){return Mt(e)&&/^-?\d+$/.test(e)}function Lt(e){return"string"==typeof e&&Rt.test(e)&&e.startsWith("te6cc")}function It(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function Nt(e,t){return Object.keys(e).some(e=>!t.includes(e))}function Wt(e){if(!It(e))return"Request must be an object";if(Nt(e,["validUntil","network","from","messages"]))return"Request contains extra properties";if(e.validUntil){if(!At(e.validUntil))return"Incorrect 'validUntil'";const t=Math.floor(Date.now()/1e3),n=t+300;e.validUntil>n&&console.warn(`validUntil (${e.validUntil}) is more than 5 minutes from now (${t})`)}if(void 0!==e.network&&!Ot(e.network))return"Invalid 'network' format";if(void 0!==e.from&&!_t(e.from))return"Invalid 'from' address format";if(t=e.messages,!Array.isArray(t)||0===e.messages.length)return"'messages' is required";var t;for(let n=0;n<e.messages.length;n++){const t=Pt(e.messages[n],n);if(t)return t}return null}function Pt(e,t){if(!It(e))return`Message at index ${t} must be an object`;if(Nt(e,["address","amount","stateInit","payload","extraCurrency"]))return`Message at index ${t} contains extra properties`;if(!Mt(e.address))return`'address' is required in message at index ${t}`;if(!bt(e.address))return`Wrong 'address' format in message at index ${t}`;if(!Mt(e.amount))return`'amount' is required in message at index ${t}`;if(!/^[0-9]+$/.test(e.amount))return`Incorrect 'amount' in message at index ${t}`;if(!(void 0===e.stateInit||Mt(e.stateInit)&&Lt(e.stateInit)))return`Invalid 'stateInit' in message at index ${t}`;if(!(void 0===e.payload||Mt(e.payload)&&Lt(e.payload)))return`Invalid 'payload' in message at index ${t}`;if(void 0!==e.extraCurrency){if(!It(e.extraCurrency))return`Invalid 'extraCurrency' in message at index ${t}`;for(const[n,r]of Object.entries(e.extraCurrency))if(!Et.test(n)||"string"!=typeof r||!Tt.test(r))return`Invalid 'extraCurrency' format in message at index ${t}`}return null}function Ut(e){if(!It(e))return"Request must be an object";if(Nt(e,["tonProof"]))return"Request contains extra properties";if(void 0!==e.tonProof){if("string"!=typeof e.tonProof)return"Invalid 'tonProof'";const t=e.tonProof;if(0===t.length)return"Empty 'tonProof' payload";const n=function(){try{return"undefined"!=typeof window&&window.location?window.location.hostname:null}catch(e){return null}}();if(!n)return null;const r=(new TextEncoder).encode(n).length;if(r>128)return"Current domain exceeds 128 bytes limit";const o=(new TextEncoder).encode(t).length;if(o>128)return"'tonProof' payload exceeds 128 bytes limit";if(r+o>222)return"'tonProof' domain + payload exceeds 222 bytes limit"}return null}function Dt(e){if(!It(e))return"Payload must be an object";if(!Mt(e.type))return"'type' is required";switch(e.type){case"text":return function(e){if(Nt(e,["type","text","network","from"]))return"Text payload contains extra properties";if(!Mt(e.text))return"'text' is required";if(void 0!==e.network&&!Ot(e.network))return"Invalid 'network' format";if(void 0!==e.from&&!_t(e.from))return"Invalid 'from'";return null}(e);case"binary":return function(e){if(Nt(e,["type","bytes","network","from"]))return"Binary payload contains extra properties";if(!Mt(e.bytes))return"'bytes' is required";if(void 0!==e.network&&!Ot(e.network))return"Invalid 'network' format";if(void 0!==e.from&&!_t(e.from))return"Invalid 'from'";return null}(e);case"cell":return function(e){if(Nt(e,["type","schema","cell","network","from"]))return"Cell payload contains extra properties";if(!Mt(e.schema))return"'schema' is required";if(!Mt(e.cell))return"'cell' is required";if(!Lt(e.cell))return"Invalid 'cell' format (must be valid base64)";if(void 0!==e.network&&!Ot(e.network))return"Invalid 'network' format";if(void 0!==e.from&&!_t(e.from))return"Invalid 'from'";return null}(e);default:return"Invalid 'type' value"}}class jt{static getWallets(){return this.walletsList.getWallets()}get connected(){return null!==this._wallet}get account(){var e;return(null===(e=this._wallet)||void 0===e?void 0:e.account)||null}get wallet(){return this._wallet}set wallet(e){this._wallet=e,this.statusChangeSubscriptions.forEach(e=>e(this._wallet))}constructor(e){if(this.walletsList=new Ze,this._wallet=null,this.provider=null,this.statusChangeSubscriptions=[],this.statusChangeErrorSubscriptions=[],this.dappSettings={manifestUrl:(null==e?void 0:e.manifestUrl)||Ne(),storage:(null==e?void 0:e.storage)||new Ue},this.walletsRequiredFeatures=null==e?void 0:e.walletsRequiredFeatures,this.walletsList=new Ze({walletsListSource:null==e?void 0:e.walletsListSource,cacheTTLMs:null==e?void 0:e.walletsListCacheTTLMs}),this.tracker=new wt({eventDispatcher:null==e?void 0:e.eventDispatcher,tonConnectSdkVersion:"3.3.0-beta.3"}),!this.dappSettings.manifestUrl)throw new Z("Dapp tonconnect-manifest.json must be specified if window.location.origin is undefined. See more https://github.com/ton-connect/docs/blob/main/requests-responses.md#app-manifest");this.bridgeConnectionStorage=new Ae(this.dappSettings.storage),(null==e?void 0:e.disableAutoPauseConnection)||this.addWindowFocusAndBlurSubscriptions()}getWallets(){return this.walletsList.getWallets()}onStatusChange(e,t){return this.statusChangeSubscriptions.push(e),t&&this.statusChangeErrorSubscriptions.push(t),()=>{this.statusChangeSubscriptions=this.statusChangeSubscriptions.filter(t=>t!==e),t&&(this.statusChangeErrorSubscriptions=this.statusChangeErrorSubscriptions.filter(e=>e!==t))}}connect(e,t){var n,r;const o={};if("object"==typeof t&&"tonProof"in t&&(o.request=t),"object"==typeof t&&("openingDeadlineMS"in t||"signal"in t||"request"in t)&&(o.request=null==t?void 0:t.request,o.openingDeadlineMS=null==t?void 0:t.openingDeadlineMS,o.signal=null==t?void 0:t.signal),o.request){const e=Ut(o.request);if(e){if(!Fe())throw new z("ConnectAdditionalRequest validation failed: "+e);console.error("ConnectAdditionalRequest validation failed: "+e)}}if(this.connected)throw new Q;const i=xe(null==o?void 0:o.signal);if(null===(n=this.abortController)||void 0===n||n.abort(),this.abortController=i,i.signal.aborted)throw new z("Connection was aborted");return null===(r=this.provider)||void 0===r||r.closeConnection(),this.provider=this.createProvider(e),i.signal.addEventListener("abort",()=>{var e;null===(e=this.provider)||void 0===e||e.closeConnection(),this.provider=null}),this.tracker.trackConnectionStarted(),this.provider.connect(this.createConnectRequest(null==o?void 0:o.request),{openingDeadlineMS:null==o?void 0:o.openingDeadlineMS,signal:i.signal})}restoreConnection(e){return V(this,0,void 0,function*(){var t,n;this.tracker.trackConnectionRestoringStarted();const r=xe(null==e?void 0:e.signal);if(null===(t=this.abortController)||void 0===t||t.abort(),this.abortController=r,r.signal.aborted)return void this.tracker.trackConnectionRestoringError("Connection restoring was aborted");const[o,i]=yield Promise.all([this.bridgeConnectionStorage.storedConnectionType(),this.walletsList.getEmbeddedWallet()]);if(r.signal.aborted)return void this.tracker.trackConnectionRestoringError("Connection restoring was aborted");let a=null;try{switch(o){case"http":a=yield Me.fromStorage(this.dappSettings.storage);break;case"injected":a=yield Pe.fromStorage(this.dappSettings.storage);break;default:if(!i)return;a=this.createProvider(i)}}catch(u){return this.tracker.trackConnectionRestoringError("Provider is not restored"),yield this.bridgeConnectionStorage.removeConnection(),null==a||a.closeConnection(),void(a=null)}if(r.signal.aborted)return null==a||a.closeConnection(),void this.tracker.trackConnectionRestoringError("Connection restoring was aborted");if(!a)return Re("Provider is not restored"),void this.tracker.trackConnectionRestoringError("Provider is not restored");null===(n=this.provider)||void 0===n||n.closeConnection(),this.provider=a,a.listen(this.walletEventsListener.bind(this));const s=()=>{this.tracker.trackConnectionRestoringError("Connection restoring was aborted"),null==a||a.closeConnection(),a=null};r.signal.addEventListener("abort",s);const l=Se(t=>V(this,0,void 0,function*(){yield null==a?void 0:a.restoreConnection({openingDeadlineMS:null==e?void 0:e.openingDeadlineMS,signal:t.signal}),r.signal.removeEventListener("abort",s),this.connected?this.tracker.trackConnectionRestoringCompleted(this.wallet):this.tracker.trackConnectionRestoringError("Connection restoring failed")}),{attempts:Number.MAX_SAFE_INTEGER,delayMs:2e3,signal:null==e?void 0:e.signal}),c=new Promise(e=>setTimeout(()=>e(),12e3));return Promise.race([l,c])})}sendTransaction(e,t){return V(this,0,void 0,function*(){const n={};"function"==typeof t?n.onRequestSent=t:(n.onRequestSent=null==t?void 0:t.onRequestSent,n.signal=null==t?void 0:t.signal);const r=Wt(e);if(r){if(!Fe())throw new z("SendTransactionRequest validation failed: "+r);console.error("SendTransactionRequest validation failed: "+r)}const o=xe(null==n?void 0:n.signal);if(o.signal.aborted)throw new z("Transaction sending was aborted");this.checkConnection();const i=e.messages.length,a=e.messages.some(e=>e.extraCurrency&&Object.keys(e.extraCurrency).length>0);Ge(this.wallet.device.features,{requiredMessagesNumber:i,requireExtraCurrencies:a}),this.tracker.trackTransactionSentForSignature(this.wallet,e);const{validUntil:s,messages:l}=e,c=F(e,["validUntil","messages"]),u=e.from||this.account.address,d=e.network||this.account.chain,h=yield this.provider.sendRequest(pe.convertToRpcRequest(Object.assign(Object.assign({},c),{from:u,network:d,valid_until:s,messages:l.map(e=>{var{extraCurrency:t}=e,n=F(e,["extraCurrency"]);return Object.assign(Object.assign({},n),{extra_currency:t})})})),{onRequestSent:n.onRequestSent,signal:o.signal});if(pe.isError(h))return this.tracker.trackTransactionSigningFailed(this.wallet,e,h.error.message,h.error.code),pe.parseAndThrowError(h);const f=pe.convertFromRpcResponse(h);return this.tracker.trackTransactionSigned(this.wallet,e,f),f})}signData(e,t){return V(this,0,void 0,function*(){const n=xe(null==t?void 0:t.signal);if(n.signal.aborted)throw new z("data sending was aborted");const r=Dt(e);if(r){if(!Fe())throw new z("SignDataPayload validation failed: "+r);console.error("SignDataPayload validation failed: "+r)}this.checkConnection(),function(e,t){const n=e.find(e=>e&&"object"==typeof e&&"SignData"===e.name);if(!n)throw new ee("Wallet doesn't support SignData feature.",{cause:{requiredFeature:{featureName:"SignData",value:{types:t.requiredTypes}}}});const r=t.requiredTypes.filter(e=>!n.types.includes(e));if(r.length)throw new ee(`Wallet doesn't support required SignData types: ${r.join(", ")}.`,{cause:{requiredFeature:{featureName:"SignData",value:{types:r}}}})}(this.wallet.device.features,{requiredTypes:[e.type]}),this.tracker.trackDataSentForSignature(this.wallet,e);const o=e.from||this.account.address,i=e.network||this.account.chain,a=yield this.provider.sendRequest(me.convertToRpcRequest(Object.assign(Object.assign({},e),{from:o,network:i})),{onRequestSent:null==t?void 0:t.onRequestSent,signal:n.signal});if(me.isError(a))return this.tracker.trackDataSigningFailed(this.wallet,e,a.error.message,a.error.code),me.parseAndThrowError(a);const s=me.convertFromRpcResponse(a);return this.tracker.trackDataSigned(this.wallet,e,s),s})}disconnect(e){return V(this,0,void 0,function*(){var t;if(!this.connected)throw new J;const n=xe(null==e?void 0:e.signal),r=this.abortController;if(this.abortController=n,n.signal.aborted)throw new z("Disconnect was aborted");this.onWalletDisconnected("dapp"),yield null===(t=this.provider)||void 0===t?void 0:t.disconnect({signal:n.signal}),null==r||r.abort()})}getSessionId(){return V(this,0,void 0,function*(){if(!this.provider||!this.connected)return null;try{const e=yield this.bridgeConnectionStorage.getConnection();return e&&"injected"!==e.type?"sessionCrypto"in e?e.sessionCrypto.sessionId:e.session.sessionCrypto.sessionId:null}catch(e){return null}})}pauseConnection(){var e;"http"===(null===(e=this.provider)||void 0===e?void 0:e.type)&&this.provider.pause()}unPauseConnection(){var e;return"http"!==(null===(e=this.provider)||void 0===e?void 0:e.type)?Promise.resolve():this.provider.unPause()}addWindowFocusAndBlurSubscriptions(){const e=function(){if("undefined"!=typeof document)return document}();if(e)try{e.addEventListener("visibilitychange",()=>{e.hidden?this.pauseConnection():this.unPauseConnection().catch(()=>{})})}catch(t){Re("Cannot subscribe to the document.visibilitychange: ",t)}}createProvider(e){let t;return t=!Array.isArray(e)&&"jsBridgeKey"in e?new Pe(this.dappSettings.storage,e.jsBridgeKey):new Me(this.dappSettings.storage,e),t.listen(this.walletEventsListener.bind(this)),t}walletEventsListener(e){switch(e.event){case"connect":this.onWalletConnected(e.payload);break;case"connect_error":this.tracker.trackConnectionError(e.payload.message,e.payload.code);const t=de.parseError(e.payload);this.onWalletConnectError(t);break;case"disconnect":this.onWalletDisconnected("wallet")}}onWalletConnected(t){var n;const r=t.items.find(e=>"ton_addr"===e.name),o=t.items.find(e=>"ton_proof"===e.name);if(!r)throw new z("ton_addr connection item was not found");if(!Ye(t.device.features,this.walletsRequiredFeatures))return null===(n=this.provider)||void 0===n||n.disconnect(),void this.onWalletConnectError(new te("Wallet does not support required features",{cause:{connectEvent:t}}));const i={device:t.device,provider:this.provider.type,account:{address:r.address,chain:r.network,walletStateInit:r.walletStateInit,publicKey:r.publicKey}};if(o){const t=function(e){if(!It(e))return"ton_proof item must be an object";if(Nt(e,["error","proof","name"]))return"ton_proof item contains extra properties";const t=Object.prototype.hasOwnProperty.call(e,"proof"),r=Object.prototype.hasOwnProperty.call(e,"error");if(!t&&!r)return"'ton_proof' item must contain either 'proof' or 'error'";if(t&&r)return"'ton_proof' item must contain either 'proof' or 'error', not both";if(t){const t=e.proof;if(!It(t))return"Invalid 'proof' object";if(Nt(t,["timestamp","domain","payload","signature"]))return"ton_proof item contains extra properties";if(!At(t.timestamp))return"Invalid 'proof.timestamp'";const r=t.domain;if(!It(r))return"Invalid 'proof.domain'";if(!At(r.lengthBytes))return"Invalid 'proof.domain.lengthBytes'";if(!Mt(r.value))return"Invalid 'proof.domain.value'";try{if(("undefined"!=typeof TextEncoder?(new TextEncoder).encode(r.value).length:r.value.length)!==r.lengthBytes)return"'proof.domain.lengthBytes' does not match 'proof.domain.value'"}catch(n){}if(!Mt(t.payload))return"Invalid 'proof.payload'";if(!Mt(t.signature)||!Rt.test(t.signature))return"Invalid 'proof.signature' format"}if(r){const t=e.error;if(!It(t))return"Invalid 'error' object";if(Nt(t,["code","message"]))return"ton_proof error contains extra properties";if(!At(t.code))return"Invalid 'error.code'";if(!Mt(t.message))return"Invalid 'error.message'"}return null}(o);let r;if(t)Fe()&&console.error("TonProofItem validation failed: "+t),r={name:"ton_proof",error:{code:e.CONNECT_ITEM_ERROR_CODES.UNKNOWN_ERROR,message:t}};else try{if("proof"in o)r={name:"ton_proof",proof:{timestamp:o.proof.timestamp,domain:{lengthBytes:o.proof.domain.lengthBytes,value:o.proof.domain.value},payload:o.proof.payload,signature:o.proof.signature}};else{if(!("error"in o))throw new z("Invalid data format");r={name:"ton_proof",error:{code:o.error.code,message:o.error.message}}}}catch(a){r={name:"ton_proof",error:{code:e.CONNECT_ITEM_ERROR_CODES.UNKNOWN_ERROR,message:"Invalid data format"}}}i.connectItems={tonProof:r}}this.wallet=i,this.tracker.trackConnectionCompleted(i)}onWalletConnectError(e){if(this.statusChangeErrorSubscriptions.forEach(t=>t(e)),ke(e),e instanceof Y||e instanceof G)throw Re(e),e}onWalletDisconnected(e){this.tracker.trackDisconnection(this.wallet,e),this.wallet=null}checkConnection(){if(!this.connected)throw new J}createConnectRequest(e){const t=[{name:"ton_addr"}];return(null==e?void 0:e.tonProof)&&t.push({name:"ton_proof",payload:e.tonProof}),{manifestUrl:this.dappSettings.manifestUrl,items:t}}}jt.walletsList=new Ze,jt.isWalletInjected=e=>Pe.isWalletInjected(e),jt.isInsideWalletBrowser=e=>Pe.isInsideWalletBrowser(e);const Bt=Symbol("solid-proxy"),$t="function"==typeof Proxy,qt=Symbol("solid-track"),Kt={equals:(e,t)=>e===t};let Ht=Mn;const Ft=1,Vt=2,zt={owned:null,cleanups:null,context:null,owner:null},Zt={};var Gt=null;let Yt=null,Qt=null,Jt=null,Xt=null,en=0;function tn(e,t){const n=Qt,r=Gt,o=0===e.length,i=void 0===t?r:t,a=o?zt:{owned:null,cleanups:null,context:i?i.context:null,owner:i},s=o?e:()=>e(()=>un(()=>In(a)));Gt=a,Qt=null;try{return An(s,!0)}finally{Qt=n,Gt=r}}function nn(e,t){const n={value:e,observers:null,observerSlots:null,comparator:(t=t?Object.assign({},Kt,t):Kt).equals||void 0};return[Sn.bind(n),e=>("function"==typeof e&&(e=e(n.value)),kn(n,e))]}function rn(e,t,n){Rn(En(e,t,!0,Ft))}function on(e,t,n){Rn(En(e,t,!1,Ft))}function an(e,t,n){Ht=_n;const r=En(e,t,!1,Ft);n&&n.render||(r.user=!0),Xt?Xt.push(r):Rn(r)}function sn(e,t,n){n=n?Object.assign({},Kt,n):Kt;const r=En(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,Rn(r),Sn.bind(r)}function ln(e,t,n){let r,o,i;r=!0,o=e,i={};let a=null,s=Zt,l=!1,c="initialValue"in i,u=!1;const d=new Set,[h,f]=(i.storage||nn)(i.initialValue),[p,g]=nn(void 0),[m,w]=nn(void 0,{equals:!1}),[y,v]=nn(c?"ready":"unresolved");function b(e,t,n,r){return a===e&&(a=null,void 0!==r&&(c=!0),e!==s&&t!==s||!i.onHydrated||queueMicrotask(()=>i.onHydrated(r,{value:t})),s=Zt,function(e,t){An(()=>{void 0===t&&f(()=>e),v(void 0!==t?"errored":c?"ready":"unresolved"),g(t);for(const e of d.keys())e.decrement();d.clear()},!1)}(t,n)),t}function C(){const e=h(),t=p();if(void 0!==t&&!a)throw t;return Qt&&Qt.user,e}function x(e=!0){if(!1!==e&&l)return;l=!1;const t=u?u():r;if(null==t||!1===t)return void b(a,un(h));let n;const i=s!==Zt?s:un(()=>{try{return o(t,{value:h(),refetching:e})}catch(r){n=r}});var d;if(void 0===n)return(d=i)&&"object"==typeof d&&"then"in d?(a=i,"v"in i?(1===i.s?b(a,i.v,void 0,t):b(a,void 0,Nn(i.v),t),i):(l=!0,queueMicrotask(()=>l=!1),An(()=>{v(c?"refreshing":"pending"),w()},!1),i.then(e=>b(i,e,void 0,t),e=>b(i,void 0,Nn(e),t)))):(b(a,i,void 0,t),i);b(a,void 0,Nn(n),t)}Object.defineProperties(C,{state:{get:()=>y()},error:{get:()=>p()},loading:{get(){const e=y();return"pending"===e||"refreshing"===e}},latest:{get(){if(!c)return C();const e=p();if(e&&!a)throw e;return h()}}});let S=Gt;return u?rn(()=>(S=Gt,x(!1))):x(!1),[C,{refetch:e=>gn(S,()=>x(e)),mutate:f}]}function cn(e){return An(e,!1)}function un(e){if(null===Qt)return e();const t=Qt;Qt=null;try{return e()}finally{Qt=t}}function dn(e){an(()=>un(e))}function hn(e){return null===Gt||(null===Gt.cleanups?Gt.cleanups=[e]:Gt.cleanups.push(e)),e}function fn(){return Qt}function pn(){return Gt}function gn(e,t){const n=Gt,r=Qt;Gt=e,Qt=null;try{return An(t,!0)}catch(o){Wn(o)}finally{Gt=n,Qt=r}}function mn(e){const t=Qt,n=Gt;return Promise.resolve().then(()=>{Qt=t,Gt=n,An(e,!1),Qt=Gt=null})}const[wn,yn]=nn(!1);function vn(){return[wn,mn]}function bn(e,t){const n=Symbol("context");return{id:n,Provider:Un(n),defaultValue:e}}function Cn(e){let t;return Gt&&Gt.context&&void 0!==(t=Gt.context[e.id])?t:e.defaultValue}function xn(e){const t=sn(e),n=sn(()=>Pn(t()));return n.toArray=()=>{const e=n();return Array.isArray(e)?e:null!=e?[e]:[]},n}function Sn(){if(this.sources&&this.state)if(this.state===Ft)Rn(this);else{const e=Jt;Jt=null,An(()=>On(this),!1),Jt=e}if(Qt){const e=this.observers?this.observers.length:0;Qt.sources?(Qt.sources.push(this),Qt.sourceSlots.push(e)):(Qt.sources=[this],Qt.sourceSlots=[e]),this.observers?(this.observers.push(Qt),this.observerSlots.push(Qt.sources.length-1)):(this.observers=[Qt],this.observerSlots=[Qt.sources.length-1])}return this.value}function kn(e,t,n){let r=e.value;return e.comparator&&e.comparator(r,t)||(e.value=t,e.observers&&e.observers.length&&An(()=>{for(let t=0;t<e.observers.length;t+=1){const n=e.observers[t],r=Yt&&Yt.running;r&&Yt.disposed.has(n),(r?n.tState:n.state)||(n.pure?Jt.push(n):Xt.push(n),n.observers&&Ln(n)),r||(n.state=Ft)}if(Jt.length>1e6)throw Jt=[],new Error},!1)),t}function Rn(e){if(!e.fn)return;In(e);const t=en;!function(e,t,n){let r;const o=Gt,i=Qt;Qt=Gt=e;try{r=e.fn(t)}catch(a){return e.pure&&(e.state=Ft,e.owned&&e.owned.forEach(In),e.owned=null),e.updatedAt=n+1,Wn(a)}finally{Qt=i,Gt=o}(!e.updatedAt||e.updatedAt<=n)&&(null!=e.updatedAt&&"observers"in e?kn(e,r):e.value=r,e.updatedAt=n)}(e,e.value,t)}function En(e,t,n,r=Ft,o){const i={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:Gt,context:Gt?Gt.context:null,pure:n};return null===Gt||Gt!==zt&&(Gt.owned?Gt.owned.push(i):Gt.owned=[i]),i}function Tn(e){if(0===e.state)return;if(e.state===Vt)return On(e);if(e.suspense&&un(e.suspense.inFallback))return e.suspense.effects.push(e);const t=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<en);)e.state&&t.push(e);for(let n=t.length-1;n>=0;n--)if((e=t[n]).state===Ft)Rn(e);else if(e.state===Vt){const n=Jt;Jt=null,An(()=>On(e,t[0]),!1),Jt=n}}function An(e,t){if(Jt)return e();let n=!1;t||(Jt=[]),Xt?n=!0:Xt=[],en++;try{const t=e();return function(e){Jt&&(Mn(Jt),Jt=null);if(e)return;const t=Xt;Xt=null,t.length&&An(()=>Ht(t),!1)}(n),t}catch(r){n||(Xt=null),Jt=null,Wn(r)}}function Mn(e){for(let t=0;t<e.length;t++)Tn(e[t])}function _n(e){let t,n=0;for(t=0;t<e.length;t++){const r=e[t];r.user?e[n++]=r:Tn(r)}for(t=0;t<n;t++)Tn(e[t])}function On(e,t){e.state=0;for(let n=0;n<e.sources.length;n+=1){const r=e.sources[n];if(r.sources){const e=r.state;e===Ft?r!==t&&(!r.updatedAt||r.updatedAt<en)&&Tn(r):e===Vt&&On(r,t)}}}function Ln(e){for(let t=0;t<e.observers.length;t+=1){const n=e.observers[t];n.state||(n.state=Vt,n.pure?Jt.push(n):Xt.push(n),n.observers&&Ln(n))}}function In(e){let t;if(e.sources)for(;e.sources.length;){const t=e.sources.pop(),n=e.sourceSlots.pop(),r=t.observers;if(r&&r.length){const e=r.pop(),o=t.observerSlots.pop();n<r.length&&(e.sourceSlots[o]=n,r[n]=e,t.observerSlots[n]=o)}}if(e.tOwned){for(t=e.tOwned.length-1;t>=0;t--)In(e.tOwned[t]);delete e.tOwned}if(e.owned){for(t=e.owned.length-1;t>=0;t--)In(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}e.state=0}function Nn(e){return e instanceof Error?e:new Error("string"==typeof e?e:"Unknown error",{cause:e})}function Wn(e,t=Gt){throw Nn(e)}function Pn(e){if("function"==typeof e&&!e.length)return Pn(e());if(Array.isArray(e)){const t=[];for(let n=0;n<e.length;n++){const r=Pn(e[n]);Array.isArray(r)?t.push.apply(t,r):t.push(r)}return t}return e}function Un(e,t){return function(t){let n;return on(()=>n=un(()=>(Gt.context=w(m({},Gt.context),{[e]:t.value}),xn(()=>t.children))),void 0),n}}const Dn=Symbol("fallback");function jn(e){for(let t=0;t<e.length;t++)e[t]()}function Bn(e,t){return un(()=>e(t||{}))}function $n(){return!0}const qn={get:(e,t,n)=>t===Bt?n:e.get(t),has:(e,t)=>t===Bt||e.has(t),set:$n,deleteProperty:$n,getOwnPropertyDescriptor:(e,t)=>({configurable:!0,enumerable:!0,get:()=>e.get(t),set:$n,deleteProperty:$n}),ownKeys:e=>e.keys()};function Kn(e){return(e="function"==typeof e?e():e)?e:{}}function Hn(){for(let e=0,t=this.length;e<t;++e){const t=this[e]();if(void 0!==t)return t}}function Fn(...e){let t=!1;for(let a=0;a<e.length;a++){const n=e[a];t=t||!!n&&Bt in n,e[a]="function"==typeof n?(t=!0,sn(n)):n}if($t&&t)return new Proxy({get(t){for(let n=e.length-1;n>=0;n--){const r=Kn(e[n])[t];if(void 0!==r)return r}},has(t){for(let n=e.length-1;n>=0;n--)if(t in Kn(e[n]))return!0;return!1},keys(){const t=[];for(let n=0;n<e.length;n++)t.push(...Object.keys(Kn(e[n])));return[...new Set(t)]}},qn);const n={},r=Object.create(null);for(let a=e.length-1;a>=0;a--){const t=e[a];if(!t)continue;const o=Object.getOwnPropertyNames(t);for(let e=o.length-1;e>=0;e--){const i=o[e];if("__proto__"===i||"constructor"===i)continue;const a=Object.getOwnPropertyDescriptor(t,i);if(r[i]){const e=n[i];e&&(a.get?e.push(a.get.bind(t)):void 0!==a.value&&e.push(()=>a.value))}else r[i]=a.get?{enumerable:!0,configurable:!0,get:Hn.bind(n[i]=[a.get.bind(t)])}:void 0!==a.value?a:void 0}}const o={},i=Object.keys(r);for(let a=i.length-1;a>=0;a--){const e=i[a],t=r[e];t&&t.get?Object.defineProperty(o,e,t):o[e]=t?t.value:void 0}return o}function Vn(e,...t){if($t&&Bt in e){const n=new Set(t.length>1?t.flat():t[0]),r=t.map(t=>new Proxy({get:n=>t.includes(n)?e[n]:void 0,has:n=>t.includes(n)&&n in e,keys:()=>t.filter(t=>t in e)},qn));return r.push(new Proxy({get:t=>n.has(t)?void 0:e[t],has:t=>!n.has(t)&&t in e,keys:()=>Object.keys(e).filter(e=>!n.has(e))},qn)),r}const n={},r=t.map(()=>({}));for(const o of Object.getOwnPropertyNames(e)){const i=Object.getOwnPropertyDescriptor(e,o),a=!i.get&&!i.set&&i.enumerable&&i.writable&&i.configurable;let s=!1,l=0;for(const e of t)e.includes(o)&&(s=!0,a?r[l][o]=i.value:Object.defineProperty(r[l],o,i)),++l;s||(a?n[o]=i.value:Object.defineProperty(n,o,i))}return[...r,n]}const zn=e=>`Stale read from <${e}>.`;function Zn(e){const t="fallback"in e&&{fallback:()=>e.fallback};return sn(function(e,t,n={}){let r=[],o=[],i=[],a=0,s=t.length>1?[]:null;return hn(()=>jn(i)),()=>{let l,c,u=e()||[],d=u.length;return u[qt],un(()=>{let e,t,f,p,g,m,w,y,v;if(0===d)0!==a&&(jn(i),i=[],r=[],o=[],a=0,s&&(s=[])),n.fallback&&(r=[Dn],o[0]=tn(e=>(i[0]=e,n.fallback())),a=1);else if(0===a){for(o=new Array(d),c=0;c<d;c++)r[c]=u[c],o[c]=tn(h);a=d}else{for(f=new Array(d),p=new Array(d),s&&(g=new Array(d)),m=0,w=Math.min(a,d);m<w&&r[m]===u[m];m++);for(w=a-1,y=d-1;w>=m&&y>=m&&r[w]===u[y];w--,y--)f[y]=o[w],p[y]=i[w],s&&(g[y]=s[w]);for(e=new Map,t=new Array(y+1),c=y;c>=m;c--)v=u[c],l=e.get(v),t[c]=void 0===l?-1:l,e.set(v,c);for(l=m;l<=w;l++)v=r[l],c=e.get(v),void 0!==c&&-1!==c?(f[c]=o[l],p[c]=i[l],s&&(g[c]=s[l]),c=t[c],e.set(v,c)):i[l]();for(c=m;c<d;c++)c in f?(o[c]=f[c],i[c]=p[c],s&&(s[c]=g[c],s[c](c))):o[c]=tn(h);o=o.slice(0,a=d),r=u.slice(0)}return o});function h(e){if(i[c]=e,s){const[e,n]=nn(c);return s[c]=n,t(u[c],e)}return t(u[c])}}}(()=>e.each,e.children,t||void 0))}function Gn(e){const t=e.keyed,n=sn(()=>e.when,void 0,void 0),r=t?n:sn(n,void 0,{equals:(e,t)=>!e==!t});return sn(()=>{const o=r();if(o){const i=e.children;return"function"==typeof i&&i.length>0?un(()=>i(t?o:()=>{if(!un(r))throw zn("Show");return n()})):i}return e.fallback},void 0,void 0)}function Yn(e){const t=xn(()=>e.children),n=sn(()=>{const e=t(),n=Array.isArray(e)?e:[e];let r=()=>{};for(let t=0;t<n.length;t++){const e=t,o=n[t],i=r,a=sn(()=>i()?void 0:o.when,void 0,void 0),s=o.keyed?a:sn(a,void 0,{equals:(e,t)=>!e==!t});r=()=>i()||(s()?[e,a,o]:void 0)}return r});return sn(()=>{const t=n()();if(!t)return e.fallback;const[r,o,i]=t,a=i.children;return"function"==typeof a&&a.length>0?un(()=>a(i.keyed?o():()=>{var e;if((null==(e=un(n)())?void 0:e[0])!==r)throw zn("Match");return o()})):a},void 0,void 0)}function Qn(e){return e}const Jn=new Set(["className","value","readOnly","noValidate","formNoValidate","isMap","noModule","playsInline","allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected"]),Xn=new Set(["innerHTML","textContent","innerText","children"]),er=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),tr=Object.assign(Object.create(null),{class:"className",novalidate:{$:"noValidate",FORM:1},formnovalidate:{$:"formNoValidate",BUTTON:1,INPUT:1},ismap:{$:"isMap",IMG:1},nomodule:{$:"noModule",SCRIPT:1},playsinline:{$:"playsInline",VIDEO:1},readonly:{$:"readOnly",INPUT:1,TEXTAREA:1}});const nr=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),rr=new Set(["altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","hkern","image","line","linearGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","stop","svg","switch","symbol","text","textPath","tref","tspan","use","view","vkern"]),or={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},ir=e=>sn(()=>e());const ar="_$DX_DELEGATE";function sr(e,t,n,r){let o;const i=()=>{const t=r?document.createElementNS("http://www.w3.org/1998/Math/MathML","template"):document.createElement("template");return t.innerHTML=e,n?t.content.firstChild.firstChild:r?t.firstChild:t.content.firstChild},a=t?()=>un(()=>document.importNode(o||(o=i()),!0)):()=>(o||(o=i())).cloneNode(!0);return a.cloneNode=a,a}function lr(e,t,n){null==n?e.removeAttribute(t):e.setAttribute(t,n)}function cr(e,t){null==t?e.removeAttribute("class"):e.className=t}function ur(e,t={},n,r){const o={};return on(()=>o.children=mr(e,t.children,o.children)),on(()=>"function"==typeof t.ref&&dr(t.ref,e)),on(()=>function(e,t,n,r,o={},i=!1){t||(t={});for(const a in o)if(!(a in t)){if("children"===a)continue;o[a]=pr(e,a,null,o[a],n,i,t)}for(const a in t){if("children"===a)continue;const r=t[a];o[a]=pr(e,a,r,o[a],n,i,t)}}(e,t,n,0,o,!0)),o}function dr(e,t,n){return un(()=>e(t,n))}function hr(e,t,n,r){if(void 0===n||r||(r=[]),"function"!=typeof t)return mr(e,t,r,n);on(r=>mr(e,t(),r,n),r)}function fr(e,t,n){const r=t.trim().split(/\s+/);for(let o=0,i=r.length;o<i;o++)e.classList.toggle(r[o],n)}function pr(e,t,n,r,o,i,a){let s,l,c,u,d;if("style"===t)return function(e,t,n){if(!t)return n?lr(e,"style"):t;const r=e.style;if("string"==typeof t)return r.cssText=t;let o,i;for(i in"string"==typeof n&&(r.cssText=n=void 0),n||(n={}),t||(t={}),n)null==t[i]&&r.removeProperty(i),delete n[i];for(i in t)o=t[i],o!==n[i]&&(r.setProperty(i,o),n[i]=o);return n}(e,n,r);if("classList"===t)return function(e,t,n={}){const r=Object.keys(t||{}),o=Object.keys(n);let i,a;for(i=0,a=o.length;i<a;i++){const r=o[i];r&&"undefined"!==r&&!t[r]&&(fr(e,r,!1),delete n[r])}for(i=0,a=r.length;i<a;i++){const o=r[i],a=!!t[o];o&&"undefined"!==o&&n[o]!==a&&a&&(fr(e,o,!0),n[o]=a)}return n}(e,n,r);if(n===r)return r;if("ref"===t)i||n(e);else if("on:"===t.slice(0,3)){const o=t.slice(3);r&&e.removeEventListener(o,r,"function"!=typeof r&&r),n&&e.addEventListener(o,n,"function"!=typeof n&&n)}else if("oncapture:"===t.slice(0,10)){const o=t.slice(10);r&&e.removeEventListener(o,r,!0),n&&e.addEventListener(o,n,!0)}else if("on"===t.slice(0,2)){const o=t.slice(2).toLowerCase(),i=nr.has(o);if(!i&&r){const t=Array.isArray(r)?r[0]:r;e.removeEventListener(o,t)}(i||n)&&(function(e,t,n,r){if(r)Array.isArray(n)?(e[`$$${t}`]=n[0],e[`$$${t}Data`]=n[1]):e[`$$${t}`]=n;else if(Array.isArray(n)){const r=n[0];e.addEventListener(t,n[0]=t=>r.call(e,n[1],t))}else e.addEventListener(t,n,"function"!=typeof n&&n)}(e,o,n,i),i&&function(e,t=window.document){const n=t[ar]||(t[ar]=new Set);for(let r=0,o=e.length;r<o;r++){const o=e[r];n.has(o)||(n.add(o),t.addEventListener(o,gr))}}([o]))}else if("attr:"===t.slice(0,5))lr(e,t.slice(5),n);else if("bool:"===t.slice(0,5))!function(e,t,n){n?e.setAttribute(t,""):e.removeAttribute(t)}(e,t.slice(5),n);else if((d="prop:"===t.slice(0,5))||(c=Xn.has(t))||!o&&((u=function(e,t){const n=tr[e];return"object"==typeof n?n[t]?n.$:void 0:n}(t,e.tagName))||(l=Jn.has(t)))||(s=e.nodeName.includes("-")||"is"in a))d&&(t=t.slice(5),l=!0),"class"===t||"className"===t?cr(e,n):!s||l||c?e[u||t]=n:e[(h=t,h.toLowerCase().replace(/-([a-z])/g,(e,t)=>t.toUpperCase()))]=n;else{const r=o&&t.indexOf(":")>-1&&or[t.split(":")[0]];r?function(e,t,n,r){null==r?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,r)}(e,r,t,n):lr(e,er[t]||t,n)}var h;return n}function gr(e){let t=e.target;const n=`$$${e.type}`,r=e.target,o=e.currentTarget,i=t=>Object.defineProperty(e,"target",{configurable:!0,value:t}),a=()=>{const r=t[n];if(r&&!t.disabled){const o=t[`${n}Data`];if(void 0!==o?r.call(t,o,e):r.call(t,e),e.cancelBubble)return}return t.host&&"string"!=typeof t.host&&!t.host._$host&&t.contains(e.target)&&i(t.host),!0},s=()=>{for(;a()&&(t=t._$host||t.parentNode||t.host););};if(Object.defineProperty(e,"currentTarget",{configurable:!0,get:()=>t||document}),e.composedPath){const n=e.composedPath();i(n[0]);for(let e=0;e<n.length-2&&(t=n[e],a());e++){if(t._$host){t=t._$host,s();break}if(t.parentNode===o)break}}else s();i(r)}function mr(e,t,n,r,o){for(;"function"==typeof n;)n=n();if(t===n)return n;const i=typeof t,a=void 0!==r;if(e=a&&n[0]&&n[0].parentNode||e,"string"===i||"number"===i){if("number"===i&&(t=t.toString())===n)return n;if(a){let o=n[0];o&&3===o.nodeType?o.data!==t&&(o.data=t):o=document.createTextNode(t),n=vr(e,n,r,o)}else n=""!==n&&"string"==typeof n?e.firstChild.data=t:e.textContent=t}else if(null==t||"boolean"===i)n=vr(e,n,r);else{if("function"===i)return on(()=>{let o=t();for(;"function"==typeof o;)o=o();n=mr(e,o,n,r)}),()=>n;if(Array.isArray(t)){const i=[],s=n&&Array.isArray(n);if(wr(i,t,n,o))return on(()=>n=mr(e,i,n,r,!0)),()=>n;if(0===i.length){if(n=vr(e,n,r),a)return n}else s?0===n.length?yr(e,i,r):function(e,t,n){let r=n.length,o=t.length,i=r,a=0,s=0,l=t[o-1].nextSibling,c=null;for(;a<o||s<i;)if(t[a]!==n[s]){for(;t[o-1]===n[i-1];)o--,i--;if(o===a){const t=i<r?s?n[s-1].nextSibling:n[i-s]:l;for(;s<i;)e.insertBefore(n[s++],t)}else if(i===s)for(;a<o;)c&&c.has(t[a])||t[a].remove(),a++;else if(t[a]===n[i-1]&&n[s]===t[o-1]){const r=t[--o].nextSibling;e.insertBefore(n[s++],t[a++].nextSibling),e.insertBefore(n[--i],r),t[o]=n[i]}else{if(!c){c=new Map;let e=s;for(;e<i;)c.set(n[e],e++)}const r=c.get(t[a]);if(null!=r)if(s<r&&r<i){let l,u=a,d=1;for(;++u<o&&u<i&&null!=(l=c.get(t[u]))&&l===r+d;)d++;if(d>r-s){const o=t[a];for(;s<r;)e.insertBefore(n[s++],o)}else e.replaceChild(n[s++],t[a++])}else a++;else t[a++].remove()}}else a++,s++}(e,n,i):(n&&vr(e),yr(e,i));n=i}else if(t.nodeType){if(Array.isArray(n)){if(a)return n=vr(e,n,r,t);vr(e,n,null,t)}else null!=n&&""!==n&&e.firstChild?e.replaceChild(t,e.firstChild):e.appendChild(t);n=t}}return n}function wr(e,t,n,r){let o=!1;for(let i=0,a=t.length;i<a;i++){let a,s=t[i],l=n&&n[e.length];if(null==s||!0===s||!1===s);else if("object"==(a=typeof s)&&s.nodeType)e.push(s);else if(Array.isArray(s))o=wr(e,s,l)||o;else if("function"===a)if(r){for(;"function"==typeof s;)s=s();o=wr(e,Array.isArray(s)?s:[s],Array.isArray(l)?l:[l])||o}else e.push(s),o=!0;else{const t=String(s);l&&3===l.nodeType&&l.data===t?e.push(l):e.push(document.createTextNode(t))}}return o}function yr(e,t,n=null){for(let r=0,o=t.length;r<o;r++)e.insertBefore(t[r],n)}function vr(e,t,n,r){if(void 0===n)return e.textContent="";const o=r||document.createTextNode("");if(t.length){let r=!1;for(let i=t.length-1;i>=0;i--){const a=t[i];if(o!==a){const t=a.parentNode===e;r||i?t&&a.remove():t?e.replaceChild(o,a):e.insertBefore(o,n)}else r=!0}}else e.insertBefore(o,n);return[o]}function br(e,t=!1){return t?document.createElementNS("http://www.w3.org/2000/svg",e):document.createElement(e)}function Cr(e){const{useShadow:t}=e,n=document.createTextNode(""),r=pn();let o;return an(()=>{o||(o=gn(r,()=>sn(()=>e.children)));const i=e.mount||document.body;if(i instanceof HTMLHeadElement){const[e,t]=nn(!1),n=()=>t(!0);tn(t=>hr(i,()=>e()?t():o(),null)),hn(n)}else{const r=br(e.isSVG?"g":"div",e.isSVG),a=t&&r.attachShadow?r.attachShadow({mode:"open"}):r;Object.defineProperty(r,"_$host",{get:()=>n.parentNode,configurable:!0}),hr(a,o),i.appendChild(r),e.ref&&e.ref(r),hn(()=>i.removeChild(r))}},void 0,{render:!0}),n}function xr(e){const[,t]=Vn(e,["component"]);return function(e,t){const n=sn(e);return sn(()=>{const e=n();switch(typeof e){case"function":return un(()=>e(t));case"string":const n=rr.has(e),r=br(e,n);return ur(r,t,n),r}})}(()=>e.component,t)}var Sr=(e=>(e.DARK="DARK",e.LIGHT="LIGHT",e))(Sr||{});let kr={data:""},Rr=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,Er=/\/\*[^]*?\*\/| +/g,Tr=/\n+/g,Ar=(e,t)=>{let n="",r="",o="";for(let i in e){let a=e[i];"@"==i[0]?"i"==i[1]?n=i+" "+a+";":r+="f"==i[1]?Ar(a,i):i+"{"+Ar(a,"k"==i[1]?"":t)+"}":"object"==typeof a?r+=Ar(a,t?t.replace(/([^,])+/g,e=>i.replace(/(^:.*)|([^,])+/g,t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)):i):null!=a&&(i=/^--/.test(i)?i:i.replace(/[A-Z]/g,"-$&").toLowerCase(),o+=Ar.p?Ar.p(i,a):i+":"+a+";")}return n+(t&&o?t+"{"+o+"}":o)+r},Mr={},_r=e=>{if("object"==typeof e){let t="";for(let n in e)t+=n+_r(e[n]);return t}return e};function Or(e){let t=this||{},n=e.call?e(t.p):e;return((e,t,n,r,o)=>{let i=_r(e),a=Mr[i]||(Mr[i]=(e=>{let t=0,n=11;for(;t<e.length;)n=101*n+e.charCodeAt(t++)>>>0;return"go"+n})(i));if(!Mr[a]){let t=i!==e?e:(e=>{let t,n,r=[{}];for(;t=Rr.exec(e.replace(Er,""));)t[4]?r.shift():t[3]?(n=t[3].replace(Tr," ").trim(),r.unshift(r[0][n]=r[0][n]||{})):r[0][t[1]]=t[2].replace(Tr," ").trim();return r[0]})(e);Mr[a]=Ar(o?{["@keyframes "+a]:t}:t,n?"":"."+a)}let s=n&&Mr.g?Mr.g:null;return n&&(Mr.g=Mr[a]),l=Mr[a],c=t,u=r,(d=s)?c.data=c.data.replace(d,l):-1===c.data.indexOf(l)&&(c.data=u?l+c.data:c.data+l),a;var l,c,u,d})(n.unshift?n.raw?((e,t,n)=>e.reduce((e,r,o)=>{let i=t[o];if(i&&i.call){let e=i(n),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;i=t?"."+t:e&&"object"==typeof e?e.props?"":Ar(e,""):!1===e?"":e}return e+r+(null==i?"":i)},""))(n,[].slice.call(arguments,1),t.p):n.reduce((e,n)=>Object.assign(e,n&&n.call?n(t.p):n),{}):n,(r=t.target,"object"==typeof window?((r?r.querySelector("#_goober"):window._goober)||Object.assign((r||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:r||kr),t.g,t.o,t.k);var r}Or.bind({g:1});let Lr=Or.bind({k:1});const Ir=bn();function Nr(e){return Bn(Ir.Provider,{value:e.theme,get children(){return e.children}})}function Wr(){return Cn(Ir)}function Pr(e){let t=this||{};return(...n)=>{const r=r=>{const o=Fn(r,{theme:Cn(Ir)}),i=Fn(o,{get class(){const e=o.class,r="class"in o&&/^go[0-9]+/.test(e);return[e,Or.apply({target:t.target,o:r,p:o,g:t.g},n)].filter(Boolean).join(" ")}}),[a,s]=Vn(i,["as","theme"]),l=s,c=a.as||e;let u;return"function"==typeof c?u=c(l):1==t.g?(u=document.createElement(c),ur(u,l)):u=xr(Fn({component:c},l)),u};return r.class=e=>un(()=>Or.apply({target:t.target,p:e,g:t.g},n)),r}}const Ur=new Proxy(Pr,{get:(e,t)=>e(t)});function Dr(){const e=Pr.call({g:1},"div").apply(null,arguments);return function(t){return e(t),null}}const jr="tc-root",Br="tc-disable-scroll",$r="tc-using-mouse",qr=()=>{document.body.addEventListener("mousedown",()=>document.body.classList.add($r)),document.body.addEventListener("keydown",e=>{"Tab"===e.key&&document.body.classList.remove($r)});return Bn(Dr`
2
+ ${jr} * {
3
3
  margin: 0;
4
4
  padding: 0;
5
5
  box-sizing: border-box;
@@ -10,48 +10,48 @@
10
10
  -webkit-tap-highlight-color: transparent;
11
11
  }
12
12
 
13
- ${Wr} img {
13
+ ${jr} img {
14
14
  -webkit-user-select: none;
15
15
  -webkit-touch-callout: none;
16
16
  }
17
17
 
18
- ${Wr} *:focus {
18
+ ${jr} *:focus {
19
19
  outline: #08f auto 2px;
20
20
  }
21
21
 
22
- ${Wr} li {
22
+ ${jr} li {
23
23
  list-style: none;
24
24
  }
25
25
 
26
- ${Wr} button {
26
+ ${jr} button {
27
27
  outline: none;
28
28
  }
29
29
 
30
- body.${Pr} {
30
+ body.${Br} {
31
31
  position: fixed;
32
32
  overflow-y: scroll;
33
33
  right: 0;
34
34
  left: 0;
35
35
  }
36
36
 
37
- body.${Ur} ${Wr} *:focus {
37
+ body.${$r} ${jr} *:focus {
38
38
  outline: none;
39
39
  }
40
- `,{})};function jr(e,t){return"#"===e[0]&&(e=function(e){"#"===e[0]&&(e=e.slice(1));const t=parseInt(e,16);return[t>>16&255,t>>8&255,255&t].join(",")}(e)),`rgba(${e}, ${t})`}function Br(e){return e.toString()+"px"}var $r,qr={exports:{}},Kr=qr.exports;var Hr=($r||($r=1,function(e,t){!function(n,r){var o="function",i="undefined",a="object",s="string",l="major",c="model",u="name",d="type",h="vendor",f="version",p="architecture",g="console",m="mobile",w="tablet",y="smarttv",v="wearable",b="embedded",C="Amazon",x="Apple",S="ASUS",k="BlackBerry",R="Browser",E="Chrome",A="Firefox",M="Google",T="Huawei",_="LG",O="Microsoft",L="Motorola",N="Opera",I="Samsung",W="Sharp",P="Sony",U="Xiaomi",D="Zebra",j="Facebook",B="Chromium OS",$="Mac OS",q=" Browser",K=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},H=function(e,t){return typeof e===s&&-1!==F(t).indexOf(F(e))},F=function(e){return e.toLowerCase()},V=function(e,t){if(typeof e===s)return e=e.replace(/^\s\s*/,""),typeof t===i?e:e.substring(0,500)},z=function(e,t){for(var n,i,s,l,c,u,d=0;d<t.length&&!c;){var h=t[d],f=t[d+1];for(n=i=0;n<h.length&&!c&&h[n];)if(c=h[n++].exec(e))for(s=0;s<f.length;s++)u=c[++i],typeof(l=f[s])===a&&l.length>0?2===l.length?typeof l[1]==o?this[l[0]]=l[1].call(this,u):this[l[0]]=l[1]:3===l.length?typeof l[1]!==o||l[1].exec&&l[1].test?this[l[0]]=u?u.replace(l[1],l[2]):r:this[l[0]]=u?l[1].call(this,u,l[2]):r:4===l.length&&(this[l[0]]=u?l[3].call(this,u.replace(l[1],l[2])):r):this[l]=u||r;d+=2}},Z=function(e,t){for(var n in t)if(typeof t[n]===a&&t[n].length>0){for(var o=0;o<t[n].length;o++)if(H(t[n][o],e))return"?"===n?r:n}else if(H(t[n],e))return"?"===n?r:n;return t.hasOwnProperty("*")?t["*"]:e},G={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},Y={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[f,[u,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[f,[u,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[u,f],[/opios[\/ ]+([\w\.]+)/i],[f,[u,N+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[f,[u,N+" GX"]],[/\bopr\/([\w\.]+)/i],[f,[u,N]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[f,[u,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[f,[u,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i,/(heytap|ovi|115)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[u,f],[/quark(?:pc)?\/([-\w\.]+)/i],[f,[u,"Quark"]],[/\bddg\/([\w\.]+)/i],[f,[u,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[f,[u,"UC"+R]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[f,[u,"WeChat"]],[/konqueror\/([\w\.]+)/i],[f,[u,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[f,[u,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[f,[u,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[f,[u,"Smart Lenovo "+R]],[/(avast|avg)\/([\w\.]+)/i],[[u,/(.+)/,"$1 Secure "+R],f],[/\bfocus\/([\w\.]+)/i],[f,[u,A+" Focus"]],[/\bopt\/([\w\.]+)/i],[f,[u,N+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[f,[u,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[f,[u,"Dolphin"]],[/coast\/([\w\.]+)/i],[f,[u,N+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[f,[u,"MIUI"+q]],[/fxios\/([\w\.-]+)/i],[f,[u,A]],[/\bqihoobrowser\/?([\w\.]*)/i],[f,[u,"360"]],[/\b(qq)\/([\w\.]+)/i],[[u,/(.+)/,"$1Browser"],f],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[u,/(.+)/,"$1"+q],f],[/samsungbrowser\/([\w\.]+)/i],[f,[u,I+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[f,[u,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[u,"Sogou Mobile"],f],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[u,f],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[u],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[f,u],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[u,j],f],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[u,f],[/\bgsa\/([\w\.]+) .*safari\//i],[f,[u,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[f,[u,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[f,[u,E+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[u,E+" WebView"],f],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[f,[u,"Android "+R]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[u,f],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[f,[u,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[f,u],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[u,[f,Z,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[u,f],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[u,"Netscape"],f],[/(wolvic|librewolf)\/([\w\.]+)/i],[u,f],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[f,[u,A+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[u,[f,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[u,[f,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[p,"amd64"]],[/(ia32(?=;))/i],[[p,F]],[/((?:i[346]|x)86)[;\)]/i],[[p,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[p,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[p,"armhf"]],[/windows (ce|mobile); ppc;/i],[[p,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[p,/ower/,"",F]],[/(sun4\w)[;\)]/i],[[p,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[p,F]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[c,[h,I],[d,w]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[c,[h,I],[d,m]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[c,[h,x],[d,m]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[c,[h,x],[d,w]],[/(macintosh);/i],[c,[h,x]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[c,[h,W],[d,m]],[/(?:honor)([-\w ]+)[;\)]/i],[c,[h,"Honor"],[d,m]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[c,[h,T],[d,w]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[c,[h,T],[d,m]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i],[[c,/_/g," "],[h,U],[d,m]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[c,/_/g," "],[h,U],[d,w]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[c,[h,"OPPO"],[d,m]],[/\b(opd2\d{3}a?) bui/i],[c,[h,"OPPO"],[d,w]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[c,[h,"Vivo"],[d,m]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[c,[h,"Realme"],[d,m]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[c,[h,L],[d,m]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[c,[h,L],[d,w]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[c,[h,_],[d,w]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[c,[h,_],[d,m]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[c,[h,"Lenovo"],[d,w]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[c,/_/g," "],[h,"Nokia"],[d,m]],[/(pixel c)\b/i],[c,[h,M],[d,w]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[c,[h,M],[d,m]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[c,[h,P],[d,m]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[c,"Xperia Tablet"],[h,P],[d,w]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[c,[h,"OnePlus"],[d,m]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[c,[h,C],[d,w]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[c,/(.+)/g,"Fire Phone $1"],[h,C],[d,m]],[/(playbook);[-\w\),; ]+(rim)/i],[c,h,[d,w]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[c,[h,k],[d,m]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[c,[h,S],[d,w]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[c,[h,S],[d,m]],[/(nexus 9)/i],[c,[h,"HTC"],[d,w]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[h,[c,/_/g," "],[d,m]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[c,[h,"TCL"],[d,w]],[/(itel) ((\w+))/i],[[h,F],c,[d,Z,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[c,[h,"Acer"],[d,w]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[c,[h,"Meizu"],[d,m]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[c,[h,"Ulefone"],[d,m]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[c,[h,"Energizer"],[d,m]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[c,[h,"Cat"],[d,m]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[c,[h,"Smartfren"],[d,m]],[/droid.+; (a(?:015|06[35]|142p?))/i],[c,[h,"Nothing"],[d,m]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (imo) ((?!tab)[\w ]+?)(?: bui|\))/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[h,c,[d,m]],[/(imo) (tab \w+)/i,/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[h,c,[d,w]],[/(surface duo)/i],[c,[h,O],[d,w]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[c,[h,"Fairphone"],[d,m]],[/(u304aa)/i],[c,[h,"AT&T"],[d,m]],[/\bsie-(\w*)/i],[c,[h,"Siemens"],[d,m]],[/\b(rct\w+) b/i],[c,[h,"RCA"],[d,w]],[/\b(venue[\d ]{2,7}) b/i],[c,[h,"Dell"],[d,w]],[/\b(q(?:mv|ta)\w+) b/i],[c,[h,"Verizon"],[d,w]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[c,[h,"Barnes & Noble"],[d,w]],[/\b(tm\d{3}\w+) b/i],[c,[h,"NuVision"],[d,w]],[/\b(k88) b/i],[c,[h,"ZTE"],[d,w]],[/\b(nx\d{3}j) b/i],[c,[h,"ZTE"],[d,m]],[/\b(gen\d{3}) b.+49h/i],[c,[h,"Swiss"],[d,m]],[/\b(zur\d{3}) b/i],[c,[h,"Swiss"],[d,w]],[/\b((zeki)?tb.*\b) b/i],[c,[h,"Zeki"],[d,w]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[h,"Dragon Touch"],c,[d,w]],[/\b(ns-?\w{0,9}) b/i],[c,[h,"Insignia"],[d,w]],[/\b((nxa|next)-?\w{0,9}) b/i],[c,[h,"NextBook"],[d,w]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[h,"Voice"],c,[d,m]],[/\b(lvtel\-)?(v1[12]) b/i],[[h,"LvTel"],c,[d,m]],[/\b(ph-1) /i],[c,[h,"Essential"],[d,m]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[c,[h,"Envizen"],[d,w]],[/\b(trio[-\w\. ]+) b/i],[c,[h,"MachSpeed"],[d,w]],[/\btu_(1491) b/i],[c,[h,"Rotor"],[d,w]],[/(shield[\w ]+) b/i],[c,[h,"Nvidia"],[d,w]],[/(sprint) (\w+)/i],[h,c,[d,m]],[/(kin\.[onetw]{3})/i],[[c,/\./g," "],[h,O],[d,m]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[c,[h,D],[d,w]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[c,[h,D],[d,m]],[/smart-tv.+(samsung)/i],[h,[d,y]],[/hbbtv.+maple;(\d+)/i],[[c,/^/,"SmartTV"],[h,I],[d,y]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[h,_],[d,y]],[/(apple) ?tv/i],[h,[c,x+" TV"],[d,y]],[/crkey/i],[[c,E+"cast"],[h,M],[d,y]],[/droid.+aft(\w+)( bui|\))/i],[c,[h,C],[d,y]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[c,[h,W],[d,y]],[/(bravia[\w ]+)( bui|\))/i],[c,[h,P],[d,y]],[/(mitv-\w{5}) bui/i],[c,[h,U],[d,y]],[/Hbbtv.*(technisat) (.*);/i],[h,c,[d,y]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[h,V],[c,V],[d,y]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[d,y]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[h,c,[d,g]],[/droid.+; (shield) bui/i],[c,[h,"Nvidia"],[d,g]],[/(playstation [345portablevi]+)/i],[c,[h,P],[d,g]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[c,[h,O],[d,g]],[/\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i],[c,[h,I],[d,v]],[/((pebble))app/i],[h,c,[d,v]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[c,[h,x],[d,v]],[/droid.+; (glass) \d/i],[c,[h,M],[d,v]],[/droid.+; (wt63?0{2,3})\)/i],[c,[h,D],[d,v]],[/droid.+; (glass) \d/i],[c,[h,M],[d,v]],[/(pico) (4|neo3(?: link|pro)?)/i],[h,c,[d,v]],[/; (quest( \d| pro)?)/i],[c,[h,j],[d,v]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[h,[d,b]],[/(aeobc)\b/i],[c,[h,C],[d,b]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[c,[d,m]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[c,[d,w]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[d,w]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[d,m]],[/(android[-\w\. ]{0,9});.+buil/i],[c,[h,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[f,[u,"EdgeHTML"]],[/(arkweb)\/([\w\.]+)/i],[u,f],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[f,[u,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[u,f],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[f,u]],os:[[/microsoft (windows) (vista|xp)/i],[u,f],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[u,[f,Z,G]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[f,Z,G],[u,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[f,/_/g,"."],[u,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[u,$],[f,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[f,u],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish|openharmony)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[u,f],[/\(bb(10);/i],[f,[u,k]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[f,[u,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[f,[u,A+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[f,[u,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[f,[u,"watchOS"]],[/crkey\/([\d\.]+)/i],[f,[u,E+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[u,B],f],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[u,f],[/(sunos) ?([\w\.\d]*)/i],[[u,"Solaris"],f],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[u,f]]},Q=function(e,t){if(typeof e===a&&(t=e,e=r),!(this instanceof Q))return new Q(e,t).getResult();var g=typeof n!==i&&n.navigator?n.navigator:r,y=e||(g&&g.userAgent?g.userAgent:""),v=g&&g.userAgentData?g.userAgentData:r,b=t?function(e,t){var n={};for(var r in e)t[r]&&t[r].length%2==0?n[r]=t[r].concat(e[r]):n[r]=e[r];return n}(Y,t):Y,C=g&&g.userAgent==y;return this.getBrowser=function(){var e,t={};return t[u]=r,t[f]=r,z.call(t,y,b.browser),t[l]=typeof(e=t[f])===s?e.replace(/[^\d\.]/g,"").split(".")[0]:r,C&&g&&g.brave&&typeof g.brave.isBrave==o&&(t[u]="Brave"),t},this.getCPU=function(){var e={};return e[p]=r,z.call(e,y,b.cpu),e},this.getDevice=function(){var e={};return e[h]=r,e[c]=r,e[d]=r,z.call(e,y,b.device),C&&!e[d]&&v&&v.mobile&&(e[d]=m),C&&"Macintosh"==e[c]&&g&&typeof g.standalone!==i&&g.maxTouchPoints&&g.maxTouchPoints>2&&(e[c]="iPad",e[d]=w),e},this.getEngine=function(){var e={};return e[u]=r,e[f]=r,z.call(e,y,b.engine),e},this.getOS=function(){var e={};return e[u]=r,e[f]=r,z.call(e,y,b.os),C&&!e[u]&&v&&v.platform&&"Unknown"!=v.platform&&(e[u]=v.platform.replace(/chrome os/i,B).replace(/macos/i,$)),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return y},this.setUA=function(e){return y=typeof e===s&&e.length>500?V(e,500):e,this},this.setUA(y),this};Q.VERSION="1.0.40",Q.BROWSER=K([u,f,l]),Q.CPU=K([p]),Q.DEVICE=K([c,h,d,g,m,y,w,v,b]),Q.ENGINE=Q.OS=K([u,f]),e.exports&&(t=e.exports=Q),t.UAParser=Q;var J=typeof n!==i&&(n.jQuery||n.Zepto);if(J&&!J.ua){var X=new Q;J.ua=X.getResult(),J.ua.get=function(){return X.getUA()},J.ua.set=function(e){X.setUA(e);var t=X.getResult();for(var n in t)J.ua[n]=t[n]}}}("object"==typeof window?window:Kr)}(qr,qr.exports)),qr.exports);const Fr=b(Hr);class Vr{constructor(){this.storage={}}static getInstance(){return Vr.instance||(Vr.instance=new Vr),Vr.instance}get length(){return Object.keys(this.storage).length}clear(){this.storage={}}getItem(e){var t;return null!=(t=this.storage[e])?t:null}key(e){var t;const n=Object.keys(this.storage);return e<0||e>=n.length?null:null!=(t=n[e])?t:null}removeItem(e){delete this.storage[e]}setItem(e,t){this.storage[e]=t}}class zr extends z{constructor(...e){super(...e),Object.setPrototypeOf(this,zr.prototype)}}function Zr(...e){try{console.debug("[TON_CONNECT_UI]",...e)}catch(t){}}function Gr(e,t="_self"){Zr("openLink",e,t),window.open(e,t,"noopener noreferrer")}function Yr(e){Gr(e,"_blank")}function Qr(e,t){const n=setTimeout(()=>{oo("safari")||ro("android")&&oo("firefox")||t()},200);window.addEventListener("blur",()=>clearTimeout(n),{once:!0}),Gr(e,"_self")}function Jr(e){return v(this,null,function*(){yield new Promise(e=>requestAnimationFrame(e)),e()})}function Xr(e){"complete"!==document.readyState?window.addEventListener("load",()=>Jr(()=>Xr(e)),{once:!0}):e.forEach(e=>{(new window.Image).src=e})}function eo(){if("undefined"!=typeof window)return window}function to(){if(function(){try{return"undefined"!=typeof localStorage}catch(e){return!1}}())return localStorage;if("undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node)throw new zr("`localStorage` is unavailable, but it is required for TonConnect. For more details, see https://github.com/ton-connect/sdk/tree/main/packages/sdk#init-connector");return Vr.getInstance()}function no(){var e,t,n;const r=(new Fr).getResult(),o=null==(e=r.os.name)?void 0:e.toLowerCase();let i;switch(!0){case"ipad"===(null==(t=r.device.model)?void 0:t.toLowerCase()):i="ipad";break;case"ios"===o:i="ios";break;case"android"===o:i="android";break;case"mac os"===o:i="macos";break;case"linux"===o:i="linux";break;case null==o?void 0:o.includes("windows"):i="windows"}const a=null==(n=r.browser.name)?void 0:n.toLowerCase();let s;switch(!0){case"chrome"===a:s="chrome";break;case"firefox"===a:s="firefox";break;case null==a?void 0:a.includes("safari"):s="safari";break;case null==a?void 0:a.includes("opera"):s="opera"}return{os:i,browser:s}}function ro(...e){return e.includes(no().os)}function oo(...e){return e.includes(no().browser)}function io(e,t){return t+new URL(e).search}class ao{constructor(){this.storageKey="ton-connect-ui_wallet-info",this.localStorage=to()}setWalletInfo(e){this.localStorage.setItem(this.storageKey,JSON.stringify(e))}getWalletInfo(){const e=this.localStorage.getItem(this.storageKey);return e?JSON.parse(e):null}removeWalletInfo(){this.localStorage.removeItem(this.storageKey)}}class so{constructor(){this.storageKey="ton-connect-ui_preferred-wallet",this.localStorage=to()}setPreferredWalletAppName(e){this.localStorage.setItem(this.storageKey,e)}getPreferredWalletAppName(){return this.localStorage.getItem(this.storageKey)||void 0}}class lo{constructor(){this.storageKey="ton-connect-ui_last-selected-wallet-info",this.localStorage=to()}setLastSelectedWalletInfo(e){this.localStorage.setItem(this.storageKey,JSON.stringify(e))}getLastSelectedWalletInfo(){const e=this.localStorage.getItem(this.storageKey);return e?JSON.parse(e):null}removeLastSelectedWalletInfo(){this.localStorage.removeItem(this.storageKey)}}const[co,uo]=Jt({status:"closed",closeReason:null}),ho=nn(()=>"opened"===co().status),[fo,po]=Jt({status:"closed",closeReason:null}),go=nn(()=>"opened"===fo().status),mo=nn(()=>{const e=fo();return"opened"===e.status?e.walletInfo:null});let wo="undefined"!=typeof window?new lo:void 0;const[yo,vo]=Jt((null==wo?void 0:wo.getLastSelectedWalletInfo())||null),bo=e=>{wo||(wo=new lo),e?wo.setLastSelectedWalletInfo(e):wo.removeLastSelectedWalletInfo(),vo(e)},[Co,xo]=Jt(null),So={common:{close:"Закрыть",openWallet:"Открыть кошелёк",copyLink:"Скопировать",linkCopied:"Ссылка скопирована",copied:"Скопировано",yourWallet:"Ваш кошелёк",retry:"Повторить",get:"Скачать",mobile:"Мобильный",browserExtension:"Расширение",desktop:"Десктоп"},button:{connectWallet:"Подключить кошелёк",dropdown:{copy:"Скопировать адрес",copied:"Адрес скопирован!",disconnect:"Отключить кошелёк"}},notifications:{confirm:{header:"Откройте {{ name }}, чтобы подтвердить транзакцию."},transactionSent:{header:"Транзакция отправлена",text:"Ваша транзакция будет обработана через несколько секунд."},transactionCanceled:{header:"Транзакция отменена",text:"Состояние вашего счёта не изменится."},dataSigned:{header:"Данные подписаны"},signDataCanceled:{header:"Подпись данных отменена"}},walletItem:{walletOn:"Wallet в",recent:"Недавний",installed:"Установлен",popular:"Популярен"},walletModal:{loading:"Кошельки загружаются",wallets:"Кошельки",mobileUniversalModal:{connectYourWallet:"Подключите TON кошелёк",openWalletOnTelegramOrSelect:"Подключите Wallet в Telegram или выберете другое приложение",openWalletOnTelegram:"Открыть Wallet в Telegram",chooseOtherApplication:"Выберите другое приложение",openLink:"Открыть",scan:"Отсканируйте камерой вашего телефона"},desktopUniversalModal:{connectYourWallet:"Подключите TON кошелёк",scan:"Отсканируйте QR-код камерой вашего телефона",availableWallets:"Доступные кошельки"},mobileConnectionModal:{showQR:"Показать QR-код",scanQR:"Отсканируйте QR-код ниже камерой в приложении {{ name }}, или камерой телефона",missingFeatures:"Обновите {{ name }}, ваша версия не поддерживает необходимые функции для этого dApp",notSupportedWallet:"{{ name }} не поддерживает запрошенное действие. Пожалуйста, подключите другой кошелёк, который поддерживает это",continueIn:"Продолжите в {{ name }}…",updateWallet:"Обновить {{ name }}",chooseAnotherWallet:"Выбрать другой кошелёк",connectionDeclined:"Подключение отклонено"},desktopConnectionModal:{scanQR:"Отсканируйте QR-код ниже камерой в приложении {{ name }}, или камерой телефона",continueInExtension:"Откройте браузерное расширение {{ name }}",dontHaveExtension:"Похоже, у вас не установлено браузерное расширение {{ name }}",missingFeatures:"Обновите {{ name }}, ваша версия не поддерживает необходимые функции для этого dApp",notSupportedWallet:"{{ name }} не поддерживает запрошенное действие. Пожалуйста, подключите другой кошелёк, который поддерживает это",getWallet:"Скачать {{ name }}",updateWallet:"Обновить {{ name }}",chooseAnotherWallet:"Выбрать другой кошелёк",continueOnDesktop:"Откройте {{ name }} на компьютере…",openWalletOnTelegram:"Открыть Wallet в Telegram",connectionDeclined:"Подключение отклонено"},infoModal:{whatIsAWallet:"Что такое кошелёк?",secureDigitalAssets:"Надежное хранилище цифровых активов",walletProtects:"Кошелёк защищает ваши цифровые активы, включая TON, токены и предметы коллекционирования, и управляет ими.",controlIdentity:"Контроль своей личности Web3",manageIdentity:"Управляйте своей цифровой идентификацией и с легкостью получайте доступ к децентрализованным приложениям. Сохраняйте контроль над своими данными и безопасно участвуйте в экосистеме блокчейна.",effortlessCryptoTransactions:"Простые криптотранзакции",easilySend:"Легко отправляйте, получайте и отслеживайте свои криптовалюты. Оптимизируйте свои операции с помощью децентрализованных приложений.",getAWallet:"Скачать кошелёк"},restoreModal:{title:"Восстановление",step1:{title:"Найдите вашу текущую фразу восстановления",text:"Откройте настройки кошелька и найдите фразу восстановления"},step2:{title:"Скопируйте вашу фразу восстановления",text:"Запишите её или сохраните в безопасном месте"},step3:{title:"Восстановите в поддерживаемом кошельке",text:"Введите фразу восстановления для доступа к вашему кошельку"}},allWallets:{walletsBelowNotSupported:"Кошельки ниже не поддерживают все функции подключённого сервиса. Вы можете использовать свою фразу восстановления в одном из поддерживаемых выше кошельков.",walletNotSupportService:"{{ name }} не поддерживает подключённый сервис"},featureNotSupported:{wallet:{title:"{{ name }} не поддерживает запрошенное действие",description:"Установите поддерживаемый кошелёк из списка ниже, восстановите его с помощью фразы восстановления, затем подключитесь и попробуйте снова.",info:"Узнать, как восстановить кошелёк"},version:{description:"Текущая версия {{ name }} или тип контракта кошелька не поддерживает необходимые функции. Обновите кошелёк, чтобы продолжить.",updateButton:"Обновить {{ name }}",aboutW5:"Про W5"},disconnect:{title:"Подтвердите отключение",description:"Вы будете отключены от текущего кошелька и перенаправлены на подключение {{ name }}.",button:"Отключиться"}}},actionModal:{confirmTransaction:{header:"Подтвердите действие в {{ name }}",text:"Это займет пару секунд."},signData:{header:"Подпишите данные в {{ name }}",text:"Это займет пару секунд."},transactionSent:"$notifications.transactionSent",transactionCanceled:"$notifications.transactionCanceled",dataSigned:"$notifications.dataSigned",signDataCanceled:"$notifications.signDataCanceled"}},ko={en:Ro({common:{close:"Close",openWallet:"Open wallet",copyLink:"Copy Link",linkCopied:"Link Copied",copied:"Copied",yourWallet:"Your Wallet",retry:"Retry",get:"GET",mobile:"Mobile",browserExtension:"Browser Extension",desktop:"Desktop"},button:{connectWallet:"Connect Wallet",dropdown:{copy:"Copy address",copied:"Address copied!",disconnect:"Disconnect"}},notifications:{confirm:{header:"Open {{ name }} to confirm the transaction."},transactionSent:{header:"Transaction sent",text:"Your transaction will be processed in a few seconds."},transactionCanceled:{header:"Transaction canceled",text:"There will be no changes to your account."},dataSigned:{header:"Data signed"},signDataCanceled:{header:"Sign data canceled"}},walletItem:{walletOn:"Wallet in",recent:"Recent",installed:"Installed",popular:"Popular"},walletModal:{loading:"Loading wallets",wallets:"Wallets",mobileUniversalModal:{connectYourWallet:"Connect your TON wallet",openWalletOnTelegramOrSelect:"Use Wallet in Telegram or choose other application",openWalletOnTelegram:"Connect Wallet in Telegram",chooseOtherApplication:"Choose other application",openLink:"Open Link",scan:"Scan with your mobile wallet"},desktopUniversalModal:{connectYourWallet:"Connect your TON wallet",scan:"Scan with your mobile wallet",availableWallets:"Available wallets"},mobileConnectionModal:{showQR:"Show QR Code",scanQR:"Scan the QR code below with your phone’s or {{ name }}’s camera",missingFeatures:"Please update {{ name }}, your version does not support required features for this dApp",notSupportedWallet:"{{ name }} doesn’t support the requested action. Please connect another wallet that supports it",continueIn:"Continue in {{ name }}…",updateWallet:"Update {{ name }}",chooseAnotherWallet:"Choose Another Wallet",connectionDeclined:"Connection declined"},desktopConnectionModal:{scanQR:"Scan the QR code below with your phone’s or {{ name }}’s camera",continueInExtension:"Continue in {{ name }} browser extension…",dontHaveExtension:"Seems you don't have installed {{ name }} browser extension",missingFeatures:"Please update {{ name }}, your version does not support required features for this dApp",notSupportedWallet:"{{ name }} doesn’t support the requested action. Please connect another wallet that supports it",getWallet:"Get {{ name }}",updateWallet:"Update {{ name }}",chooseAnotherWallet:"Choose Another Wallet",continueOnDesktop:"Continue in {{ name }} on desktop…",openWalletOnTelegram:"Connect Wallet in Telegram on desktop",connectionDeclined:"Connection declined"},infoModal:{whatIsAWallet:"What is a wallet",secureDigitalAssets:"Secure digital assets storage",walletProtects:"A wallet protects and manages your digital assets including TON, tokens and collectables.",controlIdentity:"Control your Web3 identity",manageIdentity:"Manage your digital identity and access decentralized applications with ease. Maintain control over your data and engage securely in the blockchain ecosystem.",effortlessCryptoTransactions:"Effortless crypto transactions",easilySend:"Easily send, receive, monitor your cryptocurrencies. Streamline your operations with decentralized applications.",getAWallet:"Get a Wallet"},restoreModal:{title:"Restore",step1:{title:"Find your current recovery phrase",text:"Open your wallet settings and locate the recovery phrase"},step2:{title:"Copy your recovery phrase",text:"Write it down or copy it to a safe place"},step3:{title:"Restore in a supported wallet",text:"Enter the recovery phrase to access your wallet"}},allWallets:{walletsBelowNotSupported:"The wallets below don’t support all features of the connected service. You can use your recovery phrase in one of the supported wallets above.",walletNotSupportService:"{{ name }} doesn’t support connected service"},featureNotSupported:{wallet:{title:"{{ name }} doesn’t support the requested action",description:"Install a supported wallet from the list below, restore it with your recovery phrase, then connect it and try again.",info:"Learn how to restore your wallet"},version:{description:"Your current version of {{ name }} or wallet contract type doesn't support the required features. Please update it to continue.",updateButton:"Update {{ name }}",aboutW5:"About W5"},disconnect:{title:"Confirm Disconnect",description:"You will be disconnected from your current wallet and redirected to connect {{ name }}.",button:"Disconnect"}}},actionModal:{confirmTransaction:{header:"Confirm the transaction in {{ name }}",text:"It will only take a moment."},signData:{header:"Sign the data in {{ name }}",text:"It will only take a moment."},transactionSent:"$notifications.transactionSent",transactionCanceled:"$notifications.transactionCanceled",dataSigned:"$notifications.dataSigned",signDataCanceled:"$notifications.signDataCanceled"}}),ru:Ro(So)};function Ro(e){const t=n=>{Object.entries(n).forEach(([r,o])=>{if("object"==typeof o&&o)return t(o);if("string"==typeof o){if("$"===o[0]){const t=o.slice(1).split(".");let i=e;t.forEach(e=>{if(!(e in i))throw new Error(`Cannot parse translations: there is no property ${e} in translation`);i=i[e]}),n[r]=i}"\\$"===o.slice(0,2)&&(n[r]=o.slice(1))}})};return t(e),e}const Eo=mn(),Ao=Symbol("store-raw"),Mo=Symbol("store-node"),To=Symbol("store-has"),_o=Symbol("store-self");function Oo(e){let t=e[Pt];if(!t&&(Object.defineProperty(e,Pt,{value:t=new Proxy(e,Uo)}),!Array.isArray(e))){const n=Object.keys(e),r=Object.getOwnPropertyDescriptors(e);for(let o=0,i=n.length;o<i;o++){const i=n[o];r[i].get&&Object.defineProperty(e,i,{enumerable:r[i].enumerable,get:r[i].get.bind(t)})}}return t}function Lo(e){let t;return null!=e&&"object"==typeof e&&(e[Pt]||!(t=Object.getPrototypeOf(e))||t===Object.prototype||Array.isArray(e))}function No(e,t=new Set){let n,r,o,i;if(n=null!=e&&e[Ao])return n;if(!Lo(e)||t.has(e))return e;if(Array.isArray(e)){Object.isFrozen(e)?e=e.slice(0):t.add(e);for(let n=0,i=e.length;n<i;n++)o=e[n],(r=No(o,t))!==o&&(e[n]=r)}else{Object.isFrozen(e)?e=Object.assign({},e):t.add(e);const n=Object.keys(e),a=Object.getOwnPropertyDescriptors(e);for(let s=0,l=n.length;s<l;s++)i=n[s],a[i].get||(o=e[i],(r=No(o,t))!==o&&(e[i]=r))}return e}function Io(e,t){let n=e[t];return n||Object.defineProperty(e,t,{value:n=Object.create(null)}),n}function Wo(e,t,n){if(e[t])return e[t];const[r,o]=Jt(n,{equals:!1,internal:!0});return r.$=o,e[t]=r}function Po(e){cn()&&Wo(Io(e,Mo),_o)()}const Uo={get(e,t,n){if(t===Ao)return e;if(t===Pt)return n;if(t===Dt)return Po(e),n;const r=Io(e,Mo),o=r[t];let i=o?o():e[t];if(t===Mo||t===To||"__proto__"===t)return i;if(!o){const n=Object.getOwnPropertyDescriptor(e,t);!cn()||"function"==typeof i&&!e.hasOwnProperty(t)||n&&n.get||(i=Wo(r,t,i)())}return Lo(i)?Oo(i):i},has:(e,t)=>t===Ao||t===Pt||t===Dt||t===Mo||t===To||"__proto__"===t||(cn()&&Wo(Io(e,To),t)(),t in e),set:()=>!0,deleteProperty:()=>!0,ownKeys:function(e){return Po(e),Reflect.ownKeys(e)},getOwnPropertyDescriptor:function(e,t){const n=Reflect.getOwnPropertyDescriptor(e,t);return n&&!n.get&&n.configurable&&t!==Pt&&t!==Mo?(delete n.value,delete n.writable,n.get=()=>e[Pt][t],n):n}};function Do(e,t,n,r=!1){if(!r&&e[t]===n)return;const o=e[t],i=e.length;void 0===n?(delete e[t],e[To]&&e[To][t]&&void 0!==o&&e[To][t].$()):(e[t]=n,e[To]&&e[To][t]&&void 0===o&&e[To][t].$());let a,s=Io(e,Mo);if((a=Wo(s,t,o))&&a.$(()=>n),Array.isArray(e)&&e.length!==i){for(let t=e.length;t<i;t++)(a=s[t])&&a.$();(a=Wo(s,"length",i))&&a.$(e.length)}(a=s[_o])&&a.$()}function jo(e,t){const n=Object.keys(t);for(let r=0;r<n.length;r+=1){const o=n[r];Do(e,o,t[o])}}function Bo(e,t,n=[]){let r,o=e;if(t.length>1){r=t.shift();const i=typeof r,a=Array.isArray(e);if(Array.isArray(r)){for(let o=0;o<r.length;o++)Bo(e,[r[o]].concat(t),n);return}if(a&&"function"===i){for(let o=0;o<e.length;o++)r(e[o],o)&&Bo(e,[o].concat(t),n);return}if(a&&"object"===i){const{from:o=0,to:i=e.length-1,by:a=1}=r;for(let r=o;r<=i;r+=a)Bo(e,[r].concat(t),n);return}if(t.length>1)return void Bo(e[r],t,[r].concat(n));o=e[r],n=[r].concat(n)}let i=t[0];"function"==typeof i&&(i=i(o,n),i===o)||void 0===r&&null==i||(i=No(i),void 0===r||Lo(o)&&Lo(i)&&!Array.isArray(i)?jo(o,i):Do(e,r,i))}function $o(...[e,t]){const n=No(e||{}),r=Array.isArray(n);return[Oo(n),function(...e){on(()=>{r&&1===e.length?function(e,t){if("function"==typeof t&&(t=t(e)),t=No(t),Array.isArray(t)){if(e===t)return;let n=0,r=t.length;for(;n<r;n++){const r=t[n];e[n]!==r&&Do(e,n,r)}Do(e,"length",r)}else jo(e,t)}(n,e[0]):Bo(n,e)})}]}const qo={constant:{black:"#000000",white:"#FFFFFF"},connectButton:{background:"#0098EA",foreground:"#FFFFFF"},accent:"#0098EA",telegramButton:"#0098EA",icon:{primary:"#0F0F0F",secondary:"#7A8999",tertiary:"#C1CAD2",success:"#29CC6A",error:"#F5A73B"},background:{primary:"#FFFFFF",secondary:"#F1F3F5",segment:"#FFFFFF",tint:"#F1F3F5",qr:"#F1F3F5"},text:{primary:"#0F0F0F",secondary:"#6A7785"}};var Ko,Ho;const Fo=b(function(){if(Ho)return Ko;Ho=1;var e=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var n=Object.prototype.toString.call(e);return"[object RegExp]"===n||"[object Date]"===n||function(e){return e.$$typeof===t}(e)}(e)},t="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function n(e,t){return!1!==t.clone&&t.isMergeableObject(e)?s((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function r(e,t,r){return e.concat(t).map(function(e){return n(e,r)})}function o(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}(e))}function i(e,t){try{return t in e}catch(n){return!1}}function a(e,t,r){var a={};return r.isMergeableObject(e)&&o(e).forEach(function(t){a[t]=n(e[t],r)}),o(t).forEach(function(o){(function(e,t){return i(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,o)||(i(e,o)&&r.isMergeableObject(t[o])?a[o]=function(e,t){if(!t.customMerge)return s;var n=t.customMerge(e);return"function"==typeof n?n:s}(o,r)(e[o],t[o],r):a[o]=n(t[o],r))}),a}function s(t,o,i){(i=i||{}).arrayMerge=i.arrayMerge||r,i.isMergeableObject=i.isMergeableObject||e,i.cloneUnlessOtherwiseSpecified=n;var s=Array.isArray(o);return s===Array.isArray(t)?s?i.arrayMerge(t,o,i):a(t,o,i):n(o,i)}return s.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(e,n){return s(e,n,t)},{})},Ko=s}());function Vo(e){return"[object Object]"===Object.prototype.toString.call(e)}function zo(e){var t,n;return!1!==Vo(e)&&(void 0===(t=e.constructor)||!1!==Vo(n=t.prototype)&&!1!==n.hasOwnProperty("isPrototypeOf"))}function Zo(e,t){if(!e)return t;return Fo(t,e,{arrayMerge:(e,t,n)=>t,isMergeableObject:zo})}const[Go,Yo]=$o({theme:vr.LIGHT,colors:qo,borderRadius:"m"}),Qo={[vr.LIGHT]:qo,[vr.DARK]:{constant:{black:"#000000",white:"#FFFFFF"},connectButton:{background:"#0098EA",foreground:"#FFFFFF"},accent:"#E5E5EA",telegramButton:"#31A6F5",icon:{primary:"#E5E5EA",secondary:"#909099",tertiary:"#434347",success:"#29CC6A",error:"#F5A73B"},background:{primary:"#121214",secondary:"#18181A",segment:"#262629",tint:"#222224",qr:"#FFFFFF"},text:{primary:"#E5E5EA",secondary:"#7D7D85"}}},Jo={[vr.LIGHT]:void 0,[vr.DARK]:void 0};function Xo(e,t){t&&(Jo[vr.DARK]=Zo(t[vr.DARK],Jo[vr.DARK]),Jo[vr.LIGHT]=Zo(t[vr.LIGHT],Jo[vr.LIGHT])),Yo({theme:e,colors:Zo(Jo[e],Qo[e])})}const ei=Nr.div`
40
+ `,{})};function Kr(e,t){return"#"===e[0]&&(e=function(e){"#"===e[0]&&(e=e.slice(1));const t=parseInt(e,16);return[t>>16&255,t>>8&255,255&t].join(",")}(e)),`rgba(${e}, ${t})`}function Hr(e){return e.toString()+"px"}var Fr,Vr={exports:{}},zr=Vr.exports;var Zr=(Fr||(Fr=1,function(e,t){!function(n,r){var o="function",i="undefined",a="object",s="string",l="major",c="model",u="name",d="type",h="vendor",f="version",p="architecture",g="console",m="mobile",w="tablet",y="smarttv",v="wearable",b="embedded",C="Amazon",x="Apple",S="ASUS",k="BlackBerry",R="Browser",E="Chrome",T="Firefox",A="Google",M="Huawei",_="LG",O="Microsoft",L="Motorola",I="Opera",N="Samsung",W="Sharp",P="Sony",U="Xiaomi",D="Zebra",j="Facebook",B="Chromium OS",$="Mac OS",q=" Browser",K=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},H=function(e,t){return typeof e===s&&-1!==F(t).indexOf(F(e))},F=function(e){return e.toLowerCase()},V=function(e,t){if(typeof e===s)return e=e.replace(/^\s\s*/,""),typeof t===i?e:e.substring(0,500)},z=function(e,t){for(var n,i,s,l,c,u,d=0;d<t.length&&!c;){var h=t[d],f=t[d+1];for(n=i=0;n<h.length&&!c&&h[n];)if(c=h[n++].exec(e))for(s=0;s<f.length;s++)u=c[++i],typeof(l=f[s])===a&&l.length>0?2===l.length?typeof l[1]==o?this[l[0]]=l[1].call(this,u):this[l[0]]=l[1]:3===l.length?typeof l[1]!==o||l[1].exec&&l[1].test?this[l[0]]=u?u.replace(l[1],l[2]):r:this[l[0]]=u?l[1].call(this,u,l[2]):r:4===l.length&&(this[l[0]]=u?l[3].call(this,u.replace(l[1],l[2])):r):this[l]=u||r;d+=2}},Z=function(e,t){for(var n in t)if(typeof t[n]===a&&t[n].length>0){for(var o=0;o<t[n].length;o++)if(H(t[n][o],e))return"?"===n?r:n}else if(H(t[n],e))return"?"===n?r:n;return t.hasOwnProperty("*")?t["*"]:e},G={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},Y={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[f,[u,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[f,[u,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[u,f],[/opios[\/ ]+([\w\.]+)/i],[f,[u,I+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[f,[u,I+" GX"]],[/\bopr\/([\w\.]+)/i],[f,[u,I]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[f,[u,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[f,[u,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i,/(heytap|ovi|115)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[u,f],[/quark(?:pc)?\/([-\w\.]+)/i],[f,[u,"Quark"]],[/\bddg\/([\w\.]+)/i],[f,[u,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[f,[u,"UC"+R]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[f,[u,"WeChat"]],[/konqueror\/([\w\.]+)/i],[f,[u,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[f,[u,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[f,[u,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[f,[u,"Smart Lenovo "+R]],[/(avast|avg)\/([\w\.]+)/i],[[u,/(.+)/,"$1 Secure "+R],f],[/\bfocus\/([\w\.]+)/i],[f,[u,T+" Focus"]],[/\bopt\/([\w\.]+)/i],[f,[u,I+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[f,[u,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[f,[u,"Dolphin"]],[/coast\/([\w\.]+)/i],[f,[u,I+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[f,[u,"MIUI"+q]],[/fxios\/([\w\.-]+)/i],[f,[u,T]],[/\bqihoobrowser\/?([\w\.]*)/i],[f,[u,"360"]],[/\b(qq)\/([\w\.]+)/i],[[u,/(.+)/,"$1Browser"],f],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[u,/(.+)/,"$1"+q],f],[/samsungbrowser\/([\w\.]+)/i],[f,[u,N+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[f,[u,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[u,"Sogou Mobile"],f],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[u,f],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[u],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[f,u],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[u,j],f],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[u,f],[/\bgsa\/([\w\.]+) .*safari\//i],[f,[u,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[f,[u,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[f,[u,E+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[u,E+" WebView"],f],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[f,[u,"Android "+R]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[u,f],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[f,[u,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[f,u],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[u,[f,Z,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[u,f],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[u,"Netscape"],f],[/(wolvic|librewolf)\/([\w\.]+)/i],[u,f],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[f,[u,T+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[u,[f,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[u,[f,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[p,"amd64"]],[/(ia32(?=;))/i],[[p,F]],[/((?:i[346]|x)86)[;\)]/i],[[p,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[p,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[p,"armhf"]],[/windows (ce|mobile); ppc;/i],[[p,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[p,/ower/,"",F]],[/(sun4\w)[;\)]/i],[[p,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[p,F]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[c,[h,N],[d,w]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[c,[h,N],[d,m]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[c,[h,x],[d,m]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[c,[h,x],[d,w]],[/(macintosh);/i],[c,[h,x]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[c,[h,W],[d,m]],[/(?:honor)([-\w ]+)[;\)]/i],[c,[h,"Honor"],[d,m]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[c,[h,M],[d,w]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[c,[h,M],[d,m]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i],[[c,/_/g," "],[h,U],[d,m]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[c,/_/g," "],[h,U],[d,w]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[c,[h,"OPPO"],[d,m]],[/\b(opd2\d{3}a?) bui/i],[c,[h,"OPPO"],[d,w]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[c,[h,"Vivo"],[d,m]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[c,[h,"Realme"],[d,m]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[c,[h,L],[d,m]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[c,[h,L],[d,w]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[c,[h,_],[d,w]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[c,[h,_],[d,m]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[c,[h,"Lenovo"],[d,w]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[c,/_/g," "],[h,"Nokia"],[d,m]],[/(pixel c)\b/i],[c,[h,A],[d,w]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[c,[h,A],[d,m]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[c,[h,P],[d,m]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[c,"Xperia Tablet"],[h,P],[d,w]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[c,[h,"OnePlus"],[d,m]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[c,[h,C],[d,w]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[c,/(.+)/g,"Fire Phone $1"],[h,C],[d,m]],[/(playbook);[-\w\),; ]+(rim)/i],[c,h,[d,w]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[c,[h,k],[d,m]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[c,[h,S],[d,w]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[c,[h,S],[d,m]],[/(nexus 9)/i],[c,[h,"HTC"],[d,w]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[h,[c,/_/g," "],[d,m]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[c,[h,"TCL"],[d,w]],[/(itel) ((\w+))/i],[[h,F],c,[d,Z,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[c,[h,"Acer"],[d,w]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[c,[h,"Meizu"],[d,m]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[c,[h,"Ulefone"],[d,m]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[c,[h,"Energizer"],[d,m]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[c,[h,"Cat"],[d,m]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[c,[h,"Smartfren"],[d,m]],[/droid.+; (a(?:015|06[35]|142p?))/i],[c,[h,"Nothing"],[d,m]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (imo) ((?!tab)[\w ]+?)(?: bui|\))/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[h,c,[d,m]],[/(imo) (tab \w+)/i,/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[h,c,[d,w]],[/(surface duo)/i],[c,[h,O],[d,w]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[c,[h,"Fairphone"],[d,m]],[/(u304aa)/i],[c,[h,"AT&T"],[d,m]],[/\bsie-(\w*)/i],[c,[h,"Siemens"],[d,m]],[/\b(rct\w+) b/i],[c,[h,"RCA"],[d,w]],[/\b(venue[\d ]{2,7}) b/i],[c,[h,"Dell"],[d,w]],[/\b(q(?:mv|ta)\w+) b/i],[c,[h,"Verizon"],[d,w]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[c,[h,"Barnes & Noble"],[d,w]],[/\b(tm\d{3}\w+) b/i],[c,[h,"NuVision"],[d,w]],[/\b(k88) b/i],[c,[h,"ZTE"],[d,w]],[/\b(nx\d{3}j) b/i],[c,[h,"ZTE"],[d,m]],[/\b(gen\d{3}) b.+49h/i],[c,[h,"Swiss"],[d,m]],[/\b(zur\d{3}) b/i],[c,[h,"Swiss"],[d,w]],[/\b((zeki)?tb.*\b) b/i],[c,[h,"Zeki"],[d,w]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[h,"Dragon Touch"],c,[d,w]],[/\b(ns-?\w{0,9}) b/i],[c,[h,"Insignia"],[d,w]],[/\b((nxa|next)-?\w{0,9}) b/i],[c,[h,"NextBook"],[d,w]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[h,"Voice"],c,[d,m]],[/\b(lvtel\-)?(v1[12]) b/i],[[h,"LvTel"],c,[d,m]],[/\b(ph-1) /i],[c,[h,"Essential"],[d,m]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[c,[h,"Envizen"],[d,w]],[/\b(trio[-\w\. ]+) b/i],[c,[h,"MachSpeed"],[d,w]],[/\btu_(1491) b/i],[c,[h,"Rotor"],[d,w]],[/(shield[\w ]+) b/i],[c,[h,"Nvidia"],[d,w]],[/(sprint) (\w+)/i],[h,c,[d,m]],[/(kin\.[onetw]{3})/i],[[c,/\./g," "],[h,O],[d,m]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[c,[h,D],[d,w]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[c,[h,D],[d,m]],[/smart-tv.+(samsung)/i],[h,[d,y]],[/hbbtv.+maple;(\d+)/i],[[c,/^/,"SmartTV"],[h,N],[d,y]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[h,_],[d,y]],[/(apple) ?tv/i],[h,[c,x+" TV"],[d,y]],[/crkey/i],[[c,E+"cast"],[h,A],[d,y]],[/droid.+aft(\w+)( bui|\))/i],[c,[h,C],[d,y]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[c,[h,W],[d,y]],[/(bravia[\w ]+)( bui|\))/i],[c,[h,P],[d,y]],[/(mitv-\w{5}) bui/i],[c,[h,U],[d,y]],[/Hbbtv.*(technisat) (.*);/i],[h,c,[d,y]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[h,V],[c,V],[d,y]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[d,y]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[h,c,[d,g]],[/droid.+; (shield) bui/i],[c,[h,"Nvidia"],[d,g]],[/(playstation [345portablevi]+)/i],[c,[h,P],[d,g]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[c,[h,O],[d,g]],[/\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i],[c,[h,N],[d,v]],[/((pebble))app/i],[h,c,[d,v]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[c,[h,x],[d,v]],[/droid.+; (glass) \d/i],[c,[h,A],[d,v]],[/droid.+; (wt63?0{2,3})\)/i],[c,[h,D],[d,v]],[/droid.+; (glass) \d/i],[c,[h,A],[d,v]],[/(pico) (4|neo3(?: link|pro)?)/i],[h,c,[d,v]],[/; (quest( \d| pro)?)/i],[c,[h,j],[d,v]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[h,[d,b]],[/(aeobc)\b/i],[c,[h,C],[d,b]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[c,[d,m]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[c,[d,w]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[d,w]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[d,m]],[/(android[-\w\. ]{0,9});.+buil/i],[c,[h,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[f,[u,"EdgeHTML"]],[/(arkweb)\/([\w\.]+)/i],[u,f],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[f,[u,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[u,f],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[f,u]],os:[[/microsoft (windows) (vista|xp)/i],[u,f],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[u,[f,Z,G]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[f,Z,G],[u,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[f,/_/g,"."],[u,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[u,$],[f,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[f,u],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish|openharmony)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[u,f],[/\(bb(10);/i],[f,[u,k]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[f,[u,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[f,[u,T+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[f,[u,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[f,[u,"watchOS"]],[/crkey\/([\d\.]+)/i],[f,[u,E+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[u,B],f],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[u,f],[/(sunos) ?([\w\.\d]*)/i],[[u,"Solaris"],f],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[u,f]]},Q=function(e,t){if(typeof e===a&&(t=e,e=r),!(this instanceof Q))return new Q(e,t).getResult();var g=typeof n!==i&&n.navigator?n.navigator:r,y=e||(g&&g.userAgent?g.userAgent:""),v=g&&g.userAgentData?g.userAgentData:r,b=t?function(e,t){var n={};for(var r in e)t[r]&&t[r].length%2==0?n[r]=t[r].concat(e[r]):n[r]=e[r];return n}(Y,t):Y,C=g&&g.userAgent==y;return this.getBrowser=function(){var e,t={};return t[u]=r,t[f]=r,z.call(t,y,b.browser),t[l]=typeof(e=t[f])===s?e.replace(/[^\d\.]/g,"").split(".")[0]:r,C&&g&&g.brave&&typeof g.brave.isBrave==o&&(t[u]="Brave"),t},this.getCPU=function(){var e={};return e[p]=r,z.call(e,y,b.cpu),e},this.getDevice=function(){var e={};return e[h]=r,e[c]=r,e[d]=r,z.call(e,y,b.device),C&&!e[d]&&v&&v.mobile&&(e[d]=m),C&&"Macintosh"==e[c]&&g&&typeof g.standalone!==i&&g.maxTouchPoints&&g.maxTouchPoints>2&&(e[c]="iPad",e[d]=w),e},this.getEngine=function(){var e={};return e[u]=r,e[f]=r,z.call(e,y,b.engine),e},this.getOS=function(){var e={};return e[u]=r,e[f]=r,z.call(e,y,b.os),C&&!e[u]&&v&&v.platform&&"Unknown"!=v.platform&&(e[u]=v.platform.replace(/chrome os/i,B).replace(/macos/i,$)),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return y},this.setUA=function(e){return y=typeof e===s&&e.length>500?V(e,500):e,this},this.setUA(y),this};Q.VERSION="1.0.40",Q.BROWSER=K([u,f,l]),Q.CPU=K([p]),Q.DEVICE=K([c,h,d,g,m,y,w,v,b]),Q.ENGINE=Q.OS=K([u,f]),e.exports&&(t=e.exports=Q),t.UAParser=Q;var J=typeof n!==i&&(n.jQuery||n.Zepto);if(J&&!J.ua){var X=new Q;J.ua=X.getResult(),J.ua.get=function(){return X.getUA()},J.ua.set=function(e){X.setUA(e);var t=X.getResult();for(var n in t)J.ua[n]=t[n]}}}("object"==typeof window?window:zr)}(Vr,Vr.exports)),Vr.exports);const Gr=b(Zr);class Yr{constructor(){this.storage={}}static getInstance(){return Yr.instance||(Yr.instance=new Yr),Yr.instance}get length(){return Object.keys(this.storage).length}clear(){this.storage={}}getItem(e){var t;return null!=(t=this.storage[e])?t:null}key(e){var t;const n=Object.keys(this.storage);return e<0||e>=n.length?null:null!=(t=n[e])?t:null}removeItem(e){delete this.storage[e]}setItem(e,t){this.storage[e]=t}}class Qr extends z{constructor(...e){super(...e),Object.setPrototypeOf(this,Qr.prototype)}}function Jr(...e){try{console.debug("[TON_CONNECT_UI]",...e)}catch(t){}}function Xr(e,t="_self"){Jr("openLink",e,t),window.open(e,t,"noopener noreferrer")}function eo(e){Xr(e,"_blank")}function to(e,t){const n=setTimeout(()=>{lo("safari")||so("android")&&lo("firefox")||t()},200);window.addEventListener("blur",()=>clearTimeout(n),{once:!0}),Xr(e,"_self")}function no(e){return v(this,null,function*(){yield new Promise(e=>requestAnimationFrame(e)),e()})}function ro(e){"complete"!==document.readyState?window.addEventListener("load",()=>no(()=>ro(e)),{once:!0}):e.forEach(e=>{(new window.Image).src=e})}function oo(){if("undefined"!=typeof window)return window}function io(){if(function(){try{return"undefined"!=typeof localStorage}catch(e){return!1}}())return localStorage;if("undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node)throw new Qr("`localStorage` is unavailable, but it is required for TonConnect. For more details, see https://github.com/ton-connect/sdk/tree/main/packages/sdk#init-connector");return Yr.getInstance()}function ao(){var e,t,n;const r=(new Gr).getResult(),o=null==(e=r.os.name)?void 0:e.toLowerCase();let i;switch(!0){case"ipad"===(null==(t=r.device.model)?void 0:t.toLowerCase()):i="ipad";break;case"ios"===o:i="ios";break;case"android"===o:i="android";break;case"mac os"===o:i="macos";break;case"linux"===o:i="linux";break;case null==o?void 0:o.includes("windows"):i="windows"}const a=null==(n=r.browser.name)?void 0:n.toLowerCase();let s;switch(!0){case"chrome"===a:s="chrome";break;case"firefox"===a:s="firefox";break;case null==a?void 0:a.includes("safari"):s="safari";break;case null==a?void 0:a.includes("opera"):s="opera"}return{os:i,browser:s}}function so(...e){return e.includes(ao().os)}function lo(...e){return e.includes(ao().browser)}function co(e,t){return t+new URL(e).search}class uo{constructor(){this.storageKey="ton-connect-ui_wallet-info",this.localStorage=io()}setWalletInfo(e){this.localStorage.setItem(this.storageKey,JSON.stringify(e))}getWalletInfo(){const e=this.localStorage.getItem(this.storageKey);return e?JSON.parse(e):null}removeWalletInfo(){this.localStorage.removeItem(this.storageKey)}}class ho{constructor(){this.storageKey="ton-connect-ui_preferred-wallet",this.localStorage=io()}setPreferredWalletAppName(e){this.localStorage.setItem(this.storageKey,e)}getPreferredWalletAppName(){return this.localStorage.getItem(this.storageKey)||void 0}}class fo{constructor(){this.storageKey="ton-connect-ui_last-selected-wallet-info",this.localStorage=io()}setLastSelectedWalletInfo(e){this.localStorage.setItem(this.storageKey,JSON.stringify(e))}getLastSelectedWalletInfo(){const e=this.localStorage.getItem(this.storageKey);return e?JSON.parse(e):null}removeLastSelectedWalletInfo(){this.localStorage.removeItem(this.storageKey)}}const[po,go]=nn({status:"closed",closeReason:null}),mo=sn(()=>"opened"===po().status),[wo,yo]=nn({status:"closed",closeReason:null}),vo=sn(()=>"opened"===wo().status),bo=sn(()=>{const e=wo();return"opened"===e.status?e.walletInfo:null});let Co="undefined"!=typeof window?new fo:void 0;const[xo,So]=nn((null==Co?void 0:Co.getLastSelectedWalletInfo())||null),ko=e=>{Co||(Co=new fo),e?Co.setLastSelectedWalletInfo(e):Co.removeLastSelectedWalletInfo(),So(e)},[Ro,Eo]=nn(null),To={common:{close:"Закрыть",openWallet:"Открыть кошелёк",copyLink:"Скопировать",linkCopied:"Ссылка скопирована",copied:"Скопировано",yourWallet:"Ваш кошелёк",retry:"Повторить",get:"Скачать",mobile:"Мобильный",browserExtension:"Расширение",desktop:"Десктоп"},button:{connectWallet:"Подключить кошелёк",dropdown:{copy:"Скопировать адрес",copied:"Адрес скопирован!",disconnect:"Отключить кошелёк"}},notifications:{confirm:{header:"Откройте {{ name }}, чтобы подтвердить транзакцию."},transactionSent:{header:"Транзакция отправлена",text:"Ваша транзакция будет обработана через несколько секунд."},transactionCanceled:{header:"Транзакция отменена",text:"Состояние вашего счёта не изменится."},dataSigned:{header:"Данные подписаны"},signDataCanceled:{header:"Подпись данных отменена"}},walletItem:{walletOn:"Wallet в",recent:"Недавний",installed:"Установлен",popular:"Популярен"},walletModal:{loading:"Кошельки загружаются",wallets:"Кошельки",mobileUniversalModal:{connectYourWallet:"Подключите TON кошелёк",openWalletOnTelegramOrSelect:"Подключите Wallet в Telegram или выберете другое приложение",openWalletOnTelegram:"Открыть Wallet в Telegram",chooseOtherApplication:"Выберите другое приложение",openLink:"Открыть",scan:"Отсканируйте камерой вашего телефона"},desktopUniversalModal:{connectYourWallet:"Подключите TON кошелёк",scan:"Отсканируйте QR-код камерой вашего телефона",availableWallets:"Доступные кошельки"},mobileConnectionModal:{showQR:"Показать QR-код",scanQR:"Отсканируйте QR-код ниже камерой в приложении {{ name }}, или камерой телефона",missingFeatures:"Обновите {{ name }}, ваша версия не поддерживает необходимые функции для этого dApp",notSupportedWallet:"{{ name }} не поддерживает запрошенное действие. Пожалуйста, подключите другой кошелёк, который поддерживает это",continueIn:"Продолжите в {{ name }}…",updateWallet:"Обновить {{ name }}",chooseAnotherWallet:"Выбрать другой кошелёк",connectionDeclined:"Подключение отклонено"},desktopConnectionModal:{scanQR:"Отсканируйте QR-код ниже камерой в приложении {{ name }}, или камерой телефона",continueInExtension:"Откройте браузерное расширение {{ name }}",dontHaveExtension:"Похоже, у вас не установлено браузерное расширение {{ name }}",missingFeatures:"Обновите {{ name }}, ваша версия не поддерживает необходимые функции для этого dApp",notSupportedWallet:"{{ name }} не поддерживает запрошенное действие. Пожалуйста, подключите другой кошелёк, который поддерживает это",getWallet:"Скачать {{ name }}",updateWallet:"Обновить {{ name }}",chooseAnotherWallet:"Выбрать другой кошелёк",continueOnDesktop:"Откройте {{ name }} на компьютере…",openWalletOnTelegram:"Открыть Wallet в Telegram",connectionDeclined:"Подключение отклонено"},infoModal:{whatIsAWallet:"Что такое кошелёк?",secureDigitalAssets:"Надежное хранилище цифровых активов",walletProtects:"Кошелёк защищает ваши цифровые активы, включая TON, токены и предметы коллекционирования, и управляет ими.",controlIdentity:"Контроль своей личности Web3",manageIdentity:"Управляйте своей цифровой идентификацией и с легкостью получайте доступ к децентрализованным приложениям. Сохраняйте контроль над своими данными и безопасно участвуйте в экосистеме блокчейна.",effortlessCryptoTransactions:"Простые криптотранзакции",easilySend:"Легко отправляйте, получайте и отслеживайте свои криптовалюты. Оптимизируйте свои операции с помощью децентрализованных приложений.",getAWallet:"Скачать кошелёк"},restoreModal:{title:"Восстановление",step1:{title:"Найдите вашу текущую фразу восстановления",text:"Откройте настройки кошелька и найдите фразу восстановления"},step2:{title:"Скопируйте вашу фразу восстановления",text:"Запишите её или сохраните в безопасном месте"},step3:{title:"Восстановите в поддерживаемом кошельке",text:"Введите фразу восстановления для доступа к вашему кошельку"}},allWallets:{walletsBelowNotSupported:"Кошельки ниже не поддерживают все функции подключённого сервиса. Вы можете использовать свою фразу восстановления в одном из поддерживаемых выше кошельков.",walletNotSupportService:"{{ name }} не поддерживает подключённый сервис"},featureNotSupported:{wallet:{title:"{{ name }} не поддерживает запрошенное действие",description:"Установите поддерживаемый кошелёк из списка ниже, восстановите его с помощью фразы восстановления, затем подключитесь и попробуйте снова.",info:"Узнать, как восстановить кошелёк"},version:{description:"Текущая версия {{ name }} или тип контракта кошелька не поддерживает необходимые функции. Обновите кошелёк, чтобы продолжить.",updateButton:"Обновить {{ name }}",aboutW5:"Про W5"},disconnect:{title:"Подтвердите отключение",description:"Вы будете отключены от текущего кошелька и перенаправлены на подключение {{ name }}.",button:"Отключиться"}}},actionModal:{confirmTransaction:{header:"Подтвердите действие в {{ name }}",text:"Это займет пару секунд."},signData:{header:"Подпишите данные в {{ name }}",text:"Это займет пару секунд."},transactionSent:"$notifications.transactionSent",transactionCanceled:"$notifications.transactionCanceled",dataSigned:"$notifications.dataSigned",signDataCanceled:"$notifications.signDataCanceled"}},Ao={en:Mo({common:{close:"Close",openWallet:"Open wallet",copyLink:"Copy Link",linkCopied:"Link Copied",copied:"Copied",yourWallet:"Your Wallet",retry:"Retry",get:"GET",mobile:"Mobile",browserExtension:"Browser Extension",desktop:"Desktop"},button:{connectWallet:"Connect Wallet",dropdown:{copy:"Copy address",copied:"Address copied!",disconnect:"Disconnect"}},notifications:{confirm:{header:"Open {{ name }} to confirm the transaction."},transactionSent:{header:"Transaction sent",text:"Your transaction will be processed in a few seconds."},transactionCanceled:{header:"Transaction canceled",text:"There will be no changes to your account."},dataSigned:{header:"Data signed"},signDataCanceled:{header:"Sign data canceled"}},walletItem:{walletOn:"Wallet in",recent:"Recent",installed:"Installed",popular:"Popular"},walletModal:{loading:"Loading wallets",wallets:"Wallets",mobileUniversalModal:{connectYourWallet:"Connect your TON wallet",openWalletOnTelegramOrSelect:"Use Wallet in Telegram or choose other application",openWalletOnTelegram:"Connect Wallet in Telegram",chooseOtherApplication:"Choose other application",openLink:"Open Link",scan:"Scan with your mobile wallet"},desktopUniversalModal:{connectYourWallet:"Connect your TON wallet",scan:"Scan with your mobile wallet",availableWallets:"Available wallets"},mobileConnectionModal:{showQR:"Show QR Code",scanQR:"Scan the QR code below with your phone’s or {{ name }}’s camera",missingFeatures:"Please update {{ name }}, your version does not support required features for this dApp",notSupportedWallet:"{{ name }} doesn’t support the requested action. Please connect another wallet that supports it",continueIn:"Continue in {{ name }}…",updateWallet:"Update {{ name }}",chooseAnotherWallet:"Choose Another Wallet",connectionDeclined:"Connection declined"},desktopConnectionModal:{scanQR:"Scan the QR code below with your phone’s or {{ name }}’s camera",continueInExtension:"Continue in {{ name }} browser extension…",dontHaveExtension:"Seems you don't have installed {{ name }} browser extension",missingFeatures:"Please update {{ name }}, your version does not support required features for this dApp",notSupportedWallet:"{{ name }} doesn’t support the requested action. Please connect another wallet that supports it",getWallet:"Get {{ name }}",updateWallet:"Update {{ name }}",chooseAnotherWallet:"Choose Another Wallet",continueOnDesktop:"Continue in {{ name }} on desktop…",openWalletOnTelegram:"Connect Wallet in Telegram on desktop",connectionDeclined:"Connection declined"},infoModal:{whatIsAWallet:"What is a wallet",secureDigitalAssets:"Secure digital assets storage",walletProtects:"A wallet protects and manages your digital assets including TON, tokens and collectables.",controlIdentity:"Control your Web3 identity",manageIdentity:"Manage your digital identity and access decentralized applications with ease. Maintain control over your data and engage securely in the blockchain ecosystem.",effortlessCryptoTransactions:"Effortless crypto transactions",easilySend:"Easily send, receive, monitor your cryptocurrencies. Streamline your operations with decentralized applications.",getAWallet:"Get a Wallet"},restoreModal:{title:"Restore",step1:{title:"Find your current recovery phrase",text:"Open your wallet settings and locate the recovery phrase"},step2:{title:"Copy your recovery phrase",text:"Write it down or copy it to a safe place"},step3:{title:"Restore in a supported wallet",text:"Enter the recovery phrase to access your wallet"}},allWallets:{walletsBelowNotSupported:"The wallets below don’t support all features of the connected service. You can use your recovery phrase in one of the supported wallets above.",walletNotSupportService:"{{ name }} doesn’t support connected service"},featureNotSupported:{wallet:{title:"{{ name }} doesn’t support the requested action",description:"Install a supported wallet from the list below, restore it with your recovery phrase, then connect it and try again.",info:"Learn how to restore your wallet"},version:{description:"Your current version of {{ name }} or wallet contract type doesn't support the required features. Please update it to continue.",updateButton:"Update {{ name }}",aboutW5:"About W5"},disconnect:{title:"Confirm Disconnect",description:"You will be disconnected from your current wallet and redirected to connect {{ name }}.",button:"Disconnect"}}},actionModal:{confirmTransaction:{header:"Confirm the transaction in {{ name }}",text:"It will only take a moment."},signData:{header:"Sign the data in {{ name }}",text:"It will only take a moment."},transactionSent:"$notifications.transactionSent",transactionCanceled:"$notifications.transactionCanceled",dataSigned:"$notifications.dataSigned",signDataCanceled:"$notifications.signDataCanceled"}}),ru:Mo(To)};function Mo(e){const t=n=>{Object.entries(n).forEach(([r,o])=>{if("object"==typeof o&&o)return t(o);if("string"==typeof o){if("$"===o[0]){const t=o.slice(1).split(".");let i=e;t.forEach(e=>{if(!(e in i))throw new Error(`Cannot parse translations: there is no property ${e} in translation`);i=i[e]}),n[r]=i}"\\$"===o.slice(0,2)&&(n[r]=o.slice(1))}})};return t(e),e}const _o=bn(),Oo=Symbol("store-raw"),Lo=Symbol("store-node"),Io=Symbol("store-has"),No=Symbol("store-self");function Wo(e){let t=e[Bt];if(!t&&(Object.defineProperty(e,Bt,{value:t=new Proxy(e,$o)}),!Array.isArray(e))){const n=Object.keys(e),r=Object.getOwnPropertyDescriptors(e);for(let o=0,i=n.length;o<i;o++){const i=n[o];r[i].get&&Object.defineProperty(e,i,{enumerable:r[i].enumerable,get:r[i].get.bind(t)})}}return t}function Po(e){let t;return null!=e&&"object"==typeof e&&(e[Bt]||!(t=Object.getPrototypeOf(e))||t===Object.prototype||Array.isArray(e))}function Uo(e,t=new Set){let n,r,o,i;if(n=null!=e&&e[Oo])return n;if(!Po(e)||t.has(e))return e;if(Array.isArray(e)){Object.isFrozen(e)?e=e.slice(0):t.add(e);for(let n=0,i=e.length;n<i;n++)o=e[n],(r=Uo(o,t))!==o&&(e[n]=r)}else{Object.isFrozen(e)?e=Object.assign({},e):t.add(e);const n=Object.keys(e),a=Object.getOwnPropertyDescriptors(e);for(let s=0,l=n.length;s<l;s++)i=n[s],a[i].get||(o=e[i],(r=Uo(o,t))!==o&&(e[i]=r))}return e}function Do(e,t){let n=e[t];return n||Object.defineProperty(e,t,{value:n=Object.create(null)}),n}function jo(e,t,n){if(e[t])return e[t];const[r,o]=nn(n,{equals:!1,internal:!0});return r.$=o,e[t]=r}function Bo(e){fn()&&jo(Do(e,Lo),No)()}const $o={get(e,t,n){if(t===Oo)return e;if(t===Bt)return n;if(t===qt)return Bo(e),n;const r=Do(e,Lo),o=r[t];let i=o?o():e[t];if(t===Lo||t===Io||"__proto__"===t)return i;if(!o){const n=Object.getOwnPropertyDescriptor(e,t);!fn()||"function"==typeof i&&!e.hasOwnProperty(t)||n&&n.get||(i=jo(r,t,i)())}return Po(i)?Wo(i):i},has:(e,t)=>t===Oo||t===Bt||t===qt||t===Lo||t===Io||"__proto__"===t||(fn()&&jo(Do(e,Io),t)(),t in e),set:()=>!0,deleteProperty:()=>!0,ownKeys:function(e){return Bo(e),Reflect.ownKeys(e)},getOwnPropertyDescriptor:function(e,t){const n=Reflect.getOwnPropertyDescriptor(e,t);return n&&!n.get&&n.configurable&&t!==Bt&&t!==Lo?(delete n.value,delete n.writable,n.get=()=>e[Bt][t],n):n}};function qo(e,t,n,r=!1){if(!r&&e[t]===n)return;const o=e[t],i=e.length;void 0===n?(delete e[t],e[Io]&&e[Io][t]&&void 0!==o&&e[Io][t].$()):(e[t]=n,e[Io]&&e[Io][t]&&void 0===o&&e[Io][t].$());let a,s=Do(e,Lo);if((a=jo(s,t,o))&&a.$(()=>n),Array.isArray(e)&&e.length!==i){for(let t=e.length;t<i;t++)(a=s[t])&&a.$();(a=jo(s,"length",i))&&a.$(e.length)}(a=s[No])&&a.$()}function Ko(e,t){const n=Object.keys(t);for(let r=0;r<n.length;r+=1){const o=n[r];qo(e,o,t[o])}}function Ho(e,t,n=[]){let r,o=e;if(t.length>1){r=t.shift();const i=typeof r,a=Array.isArray(e);if(Array.isArray(r)){for(let o=0;o<r.length;o++)Ho(e,[r[o]].concat(t),n);return}if(a&&"function"===i){for(let o=0;o<e.length;o++)r(e[o],o)&&Ho(e,[o].concat(t),n);return}if(a&&"object"===i){const{from:o=0,to:i=e.length-1,by:a=1}=r;for(let r=o;r<=i;r+=a)Ho(e,[r].concat(t),n);return}if(t.length>1)return void Ho(e[r],t,[r].concat(n));o=e[r],n=[r].concat(n)}let i=t[0];"function"==typeof i&&(i=i(o,n),i===o)||void 0===r&&null==i||(i=Uo(i),void 0===r||Po(o)&&Po(i)&&!Array.isArray(i)?Ko(o,i):qo(e,r,i))}function Fo(...[e,t]){const n=Uo(e||{}),r=Array.isArray(n);return[Wo(n),function(...e){cn(()=>{r&&1===e.length?function(e,t){if("function"==typeof t&&(t=t(e)),t=Uo(t),Array.isArray(t)){if(e===t)return;let n=0,r=t.length;for(;n<r;n++){const r=t[n];e[n]!==r&&qo(e,n,r)}qo(e,"length",r)}else Ko(e,t)}(n,e[0]):Ho(n,e)})}]}const Vo={constant:{black:"#000000",white:"#FFFFFF"},connectButton:{background:"#0098EA",foreground:"#FFFFFF"},accent:"#0098EA",telegramButton:"#0098EA",icon:{primary:"#0F0F0F",secondary:"#7A8999",tertiary:"#C1CAD2",success:"#29CC6A",error:"#F5A73B"},background:{primary:"#FFFFFF",secondary:"#F1F3F5",segment:"#FFFFFF",tint:"#F1F3F5",qr:"#F1F3F5"},text:{primary:"#0F0F0F",secondary:"#6A7785"}};var zo,Zo;const Go=b(function(){if(Zo)return zo;Zo=1;var e=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var n=Object.prototype.toString.call(e);return"[object RegExp]"===n||"[object Date]"===n||function(e){return e.$$typeof===t}(e)}(e)},t="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function n(e,t){return!1!==t.clone&&t.isMergeableObject(e)?s((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function r(e,t,r){return e.concat(t).map(function(e){return n(e,r)})}function o(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}(e))}function i(e,t){try{return t in e}catch(n){return!1}}function a(e,t,r){var a={};return r.isMergeableObject(e)&&o(e).forEach(function(t){a[t]=n(e[t],r)}),o(t).forEach(function(o){(function(e,t){return i(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,o)||(i(e,o)&&r.isMergeableObject(t[o])?a[o]=function(e,t){if(!t.customMerge)return s;var n=t.customMerge(e);return"function"==typeof n?n:s}(o,r)(e[o],t[o],r):a[o]=n(t[o],r))}),a}function s(t,o,i){(i=i||{}).arrayMerge=i.arrayMerge||r,i.isMergeableObject=i.isMergeableObject||e,i.cloneUnlessOtherwiseSpecified=n;var s=Array.isArray(o);return s===Array.isArray(t)?s?i.arrayMerge(t,o,i):a(t,o,i):n(o,i)}return s.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(e,n){return s(e,n,t)},{})},zo=s}());function Yo(e){return"[object Object]"===Object.prototype.toString.call(e)}function Qo(e){var t,n;return!1!==Yo(e)&&(void 0===(t=e.constructor)||!1!==Yo(n=t.prototype)&&!1!==n.hasOwnProperty("isPrototypeOf"))}function Jo(e,t){if(!e)return t;return Go(t,e,{arrayMerge:(e,t,n)=>t,isMergeableObject:Qo})}const[Xo,ei]=Fo({theme:Sr.LIGHT,colors:Vo,borderRadius:"m"}),ti={[Sr.LIGHT]:Vo,[Sr.DARK]:{constant:{black:"#000000",white:"#FFFFFF"},connectButton:{background:"#0098EA",foreground:"#FFFFFF"},accent:"#E5E5EA",telegramButton:"#31A6F5",icon:{primary:"#E5E5EA",secondary:"#909099",tertiary:"#434347",success:"#29CC6A",error:"#F5A73B"},background:{primary:"#121214",secondary:"#18181A",segment:"#262629",tint:"#222224",qr:"#FFFFFF"},text:{primary:"#E5E5EA",secondary:"#7D7D85"}}},ni={[Sr.LIGHT]:void 0,[Sr.DARK]:void 0};function ri(e,t){t&&(ni[Sr.DARK]=Jo(t[Sr.DARK],ni[Sr.DARK]),ni[Sr.LIGHT]=Jo(t[Sr.LIGHT],ni[Sr.LIGHT])),ei({theme:e,colors:Jo(ni[e],ti[e])})}const oi=Ur.div`
41
41
  background-color: ${e=>e.theme.colors.background.secondary};
42
- `,ti=e=>{let t;const[n,r]=Jt(null);return tn(()=>{const t=new window.Image;return t.src=e.src,t.alt=e.alt||"",t.setAttribute("draggable","false"),e.class&&t.classList.add(e.class),t.complete?r(t):(t.addEventListener("load",()=>r(t)),()=>t.removeEventListener("load",()=>r(t)))}),[Pn(Fn,{get when(){return n()},get children(){return n()}}),Pn(Fn,{get when(){return!n()},get children(){return Pn(ei,{get class(){return e.class},ref(e){"function"==typeof t?t(e):t=e}})}})]};let ni={};try{ni=function(e){e=e.replace(/^#/,"");let t={};if(!e.length)return t;if(e.indexOf("=")<0&&e.indexOf("?")<0)return t._path=hi(e),t;let n=e.indexOf("?");if(n>=0){let r=e.substr(0,n);t._path=hi(r),e=e.substr(n+1)}let r=function(e){let t={};if(!e.length)return t;let n,r,o,i,a=e.split("&");for(n=0;n<a.length;n++)r=a[n].split("="),o=hi(r[0]),i=null==r[1]?null:hi(r[1]),t[o]=i;return t}(e);for(let o in r)t[o]=r[o];return t}(location.hash.toString())}catch(rf){}let ri="unknown";if((null==ni?void 0:ni.tgWebAppPlatform)&&(ri=null!=(t=ni.tgWebAppPlatform)?t:"unknown"),"unknown"===ri){const e=eo();ri=null!=(o=null==(r=null==(n=null==e?void 0:e.Telegram)?void 0:n.WebApp)?void 0:r.platform)?o:"unknown"}let oi="6.0";if((null==ni?void 0:ni.tgWebAppVersion)&&(oi=ni.tgWebAppVersion),!oi){const e=eo();oi=null!=(s=null==(a=null==(i=null==e?void 0:e.Telegram)?void 0:i.WebApp)?void 0:a.version)?s:"6.0"}function ii(...e){return e.includes(ri)}function ai(){var e;return"unknown"!==ri||!!(null==(e=eo())?void 0:e.TelegramWebviewProxy)}function si(){var e;const t=!!(null==(e=eo())?void 0:e.TelegramWebview);return(ai()||t)&&"unknown"===ri}function li(){di("web_app_expand",{})}function ci(e,t){const n=new URL(e);if("http:"!==n.protocol&&"https:"!==n.protocol){if(t)return t();throw new zr(`Url protocol is not supported: ${n}`)}if("t.me"!==n.hostname){if(t)return t();throw new zr(`Url host is not supported: ${n}`)}const r=n.pathname+n.search;ui()||function(e,t){"string"!=typeof e&&(e="");let n,r,o,i,a=e.replace(/^\s+|\s+$/g,"").split("."),s=t.replace(/^\s+|\s+$/g,"").split(".");for(n=Math.max(a.length,s.length),r=0;r<n;r++)if(o=parseInt(a[r])||0,i=parseInt(s[r])||0,o!==i)return o>i?1:-1;return 0}(oi,"6.1")>=0?di("web_app_open_tg_link",{path_full:r}):Yr("https://t.me"+r)}function ui(){try{const e=eo();return!!e&&(null!=e.parent&&e!==e.parent)}catch(rf){return!1}}function di(e,t){try{const n=eo();if(!n)throw new zr("Can't post event to parent window: window is not defined");if(void 0!==n.TelegramWebviewProxy)Zr("postEvent",e,t),n.TelegramWebviewProxy.postEvent(e,JSON.stringify(t));else if(n.external&&"notify"in n.external)Zr("postEvent",e,t),n.external.notify(JSON.stringify({eventType:e,eventData:t}));else{if(!ui())throw new zr("Can't post event to TMA");{const r="*",o=JSON.stringify({eventType:e,eventData:t});Zr("postEvent",e,t),n.parent.postMessage(o,r)}}}catch(rf){!function(...t){try{console.error("[TON_CONNECT_UI]",...t)}catch(e){}}(`Can't post event to parent window: ${rf}`)}}function hi(e){try{return e=e.replace(/\+/g,"%20"),decodeURIComponent(e)}catch(rf){return e}}const fi=440,pi=1020;function gi(e){const t=eo();if(!t)return"desktop"===e;if(ii("weba"))return!0;const n=t.innerWidth;switch(e){case"desktop":return n>pi;case"tablet":return n>fi;default:return n<=fi||ro("ios","android","ipad")}}function mi(e){switch(e){case"mobile":return`@media (max-width: ${fi}px)`;case"tablet":return`@media (max-width: ${pi}px) (min-width: ${fi}px)`;default:return`@media (min-width: ${pi}px)`}}const wi="@media (hover: none)",yi="@media not all and (hover: none)",vi={m:"100vh",s:"8px",none:"0"},bi={s:.02,m:.04},Ci=Nr.button`
42
+ `,ii=e=>{let t;const[n,r]=nn(null);return an(()=>{const t=new window.Image;return t.src=e.src,t.alt=e.alt||"",t.setAttribute("draggable","false"),e.class&&t.classList.add(e.class),t.complete?r(t):(t.addEventListener("load",()=>r(t)),()=>t.removeEventListener("load",()=>r(t)))}),[Bn(Gn,{get when(){return n()},get children(){return n()}}),Bn(Gn,{get when(){return!n()},get children(){return Bn(oi,{get class(){return e.class},ref(e){"function"==typeof t?t(e):t=e}})}})]};let ai={};try{ai=function(e){e=e.replace(/^#/,"");let t={};if(!e.length)return t;if(e.indexOf("=")<0&&e.indexOf("?")<0)return t._path=mi(e),t;let n=e.indexOf("?");if(n>=0){let r=e.substr(0,n);t._path=mi(r),e=e.substr(n+1)}let r=function(e){let t={};if(!e.length)return t;let n,r,o,i,a=e.split("&");for(n=0;n<a.length;n++)r=a[n].split("="),o=mi(r[0]),i=null==r[1]?null:mi(r[1]),t[o]=i;return t}(e);for(let o in r)t[o]=r[o];return t}(location.hash.toString())}catch(df){}let si="unknown";if((null==ai?void 0:ai.tgWebAppPlatform)&&(si=null!=(t=ai.tgWebAppPlatform)?t:"unknown"),"unknown"===si){const e=oo();si=null!=(o=null==(r=null==(n=null==e?void 0:e.Telegram)?void 0:n.WebApp)?void 0:r.platform)?o:"unknown"}let li="6.0";if((null==ai?void 0:ai.tgWebAppVersion)&&(li=ai.tgWebAppVersion),!li){const e=oo();li=null!=(s=null==(a=null==(i=null==e?void 0:e.Telegram)?void 0:i.WebApp)?void 0:a.version)?s:"6.0"}function ci(...e){return e.includes(si)}function ui(){var e;return"unknown"!==si||!!(null==(e=oo())?void 0:e.TelegramWebviewProxy)}function di(){var e;const t=!!(null==(e=oo())?void 0:e.TelegramWebview);return(ui()||t)&&"unknown"===si}function hi(){gi("web_app_expand",{})}function fi(e,t){const n=new URL(e);if("http:"!==n.protocol&&"https:"!==n.protocol){if(t)return t();throw new Qr(`Url protocol is not supported: ${n}`)}if("t.me"!==n.hostname){if(t)return t();throw new Qr(`Url host is not supported: ${n}`)}const r=n.pathname+n.search;pi()||function(e,t){"string"!=typeof e&&(e="");let n,r,o,i,a=e.replace(/^\s+|\s+$/g,"").split("."),s=t.replace(/^\s+|\s+$/g,"").split(".");for(n=Math.max(a.length,s.length),r=0;r<n;r++)if(o=parseInt(a[r])||0,i=parseInt(s[r])||0,o!==i)return o>i?1:-1;return 0}(li,"6.1")>=0?gi("web_app_open_tg_link",{path_full:r}):eo("https://t.me"+r)}function pi(){try{const e=oo();return!!e&&(null!=e.parent&&e!==e.parent)}catch(df){return!1}}function gi(e,t){try{const n=oo();if(!n)throw new Qr("Can't post event to parent window: window is not defined");if(void 0!==n.TelegramWebviewProxy)Jr("postEvent",e,t),n.TelegramWebviewProxy.postEvent(e,JSON.stringify(t));else if(n.external&&"notify"in n.external)Jr("postEvent",e,t),n.external.notify(JSON.stringify({eventType:e,eventData:t}));else{if(!pi())throw new Qr("Can't post event to TMA");{const r="*",o=JSON.stringify({eventType:e,eventData:t});Jr("postEvent",e,t),n.parent.postMessage(o,r)}}}catch(df){!function(...t){try{console.error("[TON_CONNECT_UI]",...t)}catch(e){}}(`Can't post event to parent window: ${df}`)}}function mi(e){try{return e=e.replace(/\+/g,"%20"),decodeURIComponent(e)}catch(df){return e}}const wi=440,yi=1020;function vi(e){const t=oo();if(!t)return"desktop"===e;if(ci("weba"))return!0;const n=t.innerWidth;switch(e){case"desktop":return n>yi;case"tablet":return n>wi;default:return n<=wi||so("ios","android","ipad")}}function bi(e){switch(e){case"mobile":return`@media (max-width: ${wi}px)`;case"tablet":return`@media (max-width: ${yi}px) (min-width: ${wi}px)`;default:return`@media (min-width: ${yi}px)`}}const Ci="@media (hover: none)",xi="@media not all and (hover: none)",Si={m:"100vh",s:"8px",none:"0"},ki={s:.02,m:.04},Ri=Ur.button`
43
43
  display: ${e=>e.leftIcon||e.rightIcon?"flex":"inline-block"};
44
44
  gap: ${e=>e.leftIcon||e.rightIcon?"6px":"unset"};
45
45
  align-items: ${e=>e.leftIcon||e.rightIcon?"center":"unset"};
46
46
  justify-content: ${e=>e.leftIcon||e.rightIcon?"space-between":"unset"};
47
- background-color: ${e=>"flat"===e.appearance?"transparent":"secondary"===e.appearance?e.theme.colors.background.tint:jr(e.theme.colors.accent,.12)};
47
+ background-color: ${e=>"flat"===e.appearance?"transparent":"secondary"===e.appearance?e.theme.colors.background.tint:Kr(e.theme.colors.accent,.12)};
48
48
  color: ${e=>"secondary"===e.appearance?e.theme.colors.text.primary:e.theme.colors.accent};
49
49
 
50
50
  padding: ${e=>"flat"===e.appearance?"0":"9px 16px"};
51
51
  padding-left: ${e=>e.leftIcon&&"flat"!==e.appearance?"12px":"16px"};
52
52
  padding-right: ${e=>e.rightIcon&&"flat"!==e.appearance?"12px":"16px"};
53
53
  border: none;
54
- border-radius: ${e=>vi[e.theme.borderRadius]};
54
+ border-radius: ${e=>Si[e.theme.borderRadius]};
55
55
  cursor: ${e=>e.disabled?"not-allowed":"pointer"};
56
56
 
57
57
  font-size: 14px;
@@ -60,25 +60,25 @@
60
60
 
61
61
  transition: transform 0.125s ease-in-out;
62
62
 
63
- ${yi} {
63
+ ${xi} {
64
64
  &:hover {
65
- transform: ${e=>e.disabled?"unset":`scale(${1+bi[e.scale]})`};
65
+ transform: ${e=>e.disabled?"unset":`scale(${1+ki[e.scale]})`};
66
66
  }
67
67
  }
68
68
 
69
69
  &:active {
70
- transform: ${e=>e.disabled?"unset":`scale(${1-bi[e.scale]})`};
70
+ transform: ${e=>e.disabled?"unset":`scale(${1-ki[e.scale]})`};
71
71
  }
72
72
 
73
- ${wi} {
73
+ ${Ci} {
74
74
  &:active {
75
- transform: ${e=>e.disabled?"unset":`scale(${1-2*bi[e.scale]})`};
75
+ transform: ${e=>e.disabled?"unset":`scale(${1-2*ki[e.scale]})`};
76
76
  }
77
77
  }
78
- `;function xi(e){const t=an(()=>Object.keys(e).filter(e=>e.startsWith("data-"))),[n]=qn(e,t);return n}const Si=e=>{const t=xi(e);return Pn(Ci,$n({type:"button",get appearance(){return e.appearance||"primary"},get class(){return e.class},onClick:t=>{var n;return null==(n=e.onClick)?void 0:n.call(e,t)},onMouseEnter:t=>{var n;return null==(n=e.onMouseEnter)?void 0:n.call(e,t)},onMouseLeave:t=>{var n;return null==(n=e.onMouseLeave)?void 0:n.call(e,t)},ref(t){var n=e.ref;"function"==typeof n?n(t):e.ref=t},get disabled(){return e.disabled},get scale(){return e.scale||"m"},get leftIcon(){return!!e.leftIcon},get rightIcon(){return!!e.rightIcon},"data-tc-button":"true"},t,{get children(){return[tr(()=>e.leftIcon),tr(()=>e.children),tr(()=>e.rightIcon)]}}))};var ki,Ri={exports:{}};var Ei=(ki||(ki=1,function(e){!function(){var t={}.hasOwnProperty;function n(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=o(e,r(n)))}return e}function r(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return n.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var r="";for(var i in e)t.call(e,i)&&e[i]&&(r=o(r,i));return r}function o(e,t){return t?e?e+" "+t:e+t:e}e.exports?(n.default=n,e.exports=n):window.classNames=n}()}(Ri)),Ri.exports);const Ai=b(Ei),Mi=()=>{},Ti=(e,t)=>t();const _i=e=>e instanceof Element;function Oi(e,t){if(t(e))return e;if("function"==typeof e&&!e.length)return Oi(e(),t);if(Array.isArray(e)){const n=[];for(const r of e){const e=Oi(r,t);e&&(Array.isArray(e)?n.push.apply(n,e):n.push(e))}return n.length?n:null}return null}function Li(e,t=_i,n=_i){const r=nn(e),o=nn(()=>Oi(r(),t));return o.toArray=()=>{const e=o();return Array.isArray(e)?e:e?[e]:[]},o}function Ni(e,t){if(t(e))return e;if("function"==typeof e&&!e.length)return Ni(e(),t);if(Array.isArray(e))for(const n of e){const e=Ni(n,t);if(e)return e}return null}function Ii(e,t=_i,n=_i){const r=nn(e);return nn(()=>Ni(r(),t))}function Wi(e){return nn(()=>{const t=e.name||"s";return{enterActive:(e.enterActiveClass||t+"-enter-active").split(" "),enter:(e.enterClass||t+"-enter").split(" "),enterTo:(e.enterToClass||t+"-enter-to").split(" "),exitActive:(e.exitActiveClass||t+"-exit-active").split(" "),exit:(e.exitClass||t+"-exit").split(" "),exitTo:(e.exitToClass||t+"-exit-to").split(" "),move:(e.moveClass||t+"-move").split(" ")}})}function Pi(e){requestAnimationFrame(()=>requestAnimationFrame(e))}function Ui(e,t,n,r){const{onBeforeEnter:o,onEnter:i,onAfterEnter:a}=t;function s(t){t&&t.target!==n||(null==r||r(),n.removeEventListener("transitionend",s),n.removeEventListener("animationend",s),n.classList.remove(...e.enterActive),n.classList.remove(...e.enterTo),null==a||a(n))}null==o||o(n),n.classList.add(...e.enter),n.classList.add(...e.enterActive),queueMicrotask(()=>{if(!n.parentNode)return null==r?void 0:r();null==i||i(n,()=>s())}),Pi(()=>{n.classList.remove(...e.enter),n.classList.add(...e.enterTo),(!i||i.length<2)&&(n.addEventListener("transitionend",s),n.addEventListener("animationend",s))})}function Di(e,t,n,r){const{onBeforeExit:o,onExit:i,onAfterExit:a}=t;if(!n.parentNode)return null==r?void 0:r();function s(t){t&&t.target!==n||(null==r||r(),n.removeEventListener("transitionend",s),n.removeEventListener("animationend",s),n.classList.remove(...e.exitActive),n.classList.remove(...e.exitTo),null==a||a(n))}null==o||o(n),n.classList.add(...e.exit),n.classList.add(...e.exitActive),null==i||i(n,()=>s()),Pi(()=>{n.classList.remove(...e.exit),n.classList.add(...e.exitTo),(!i||i.length<2)&&(n.addEventListener("transitionend",s),n.addEventListener("animationend",s))})}const ji={inout:"in-out",outin:"out-in"},Bi=e=>{const t=Wi(e);return function(e,t){const n=an(e),r=n?[n]:[],{onEnter:o=Ti,onExit:i=Ti}=t,[a,s]=Jt(t.appear?[]:r),[l]=gn();let c,u=!1;function d(e,t){if(!e)return t&&t();u=!0,i(e,()=>{on(()=>{u=!1,s(t=>t.filter(t=>t!==e)),t&&t()})})}function h(e){const t=c;if(!t)return e&&e();c=void 0,s(e=>[t,...e]),o(t,null!=e?e:Mi)}const f="out-in"===t.mode?e=>u||d(e,h):"in-out"===t.mode?e=>h(()=>d(e)):e=>{d(e),h()};return Xt(t=>{const n=e();return an(l)?(l(),t):(n!==t&&(c=n,on(()=>an(()=>f(t)))),n)},t.appear?void 0:n),a}(Ii(()=>e.children),{mode:ji[e.mode],appear:e.appear,onEnter(n,r){Ui(t(),e,n,r)},onExit(n,r){Di(t(),e,n,r)}})},$i=e=>{const t=Wi(e);return function(e,t){const n=an(e),{onChange:r}=t;let o=new Set(t.appear?void 0:n);const i=new WeakSet,[a,s]=Jt([],{equals:!1}),[l]=gn(),c=e=>{s(t=>(t.push.apply(t,e),t));for(const t of e)i.delete(t)},u=(e,t,n)=>e.splice(n,0,t);return nn(t=>{const n=a(),s=e();if(s[Dt],an(l))return l(),t;if(n.length){const e=t.filter(e=>!n.includes(e));return n.length=0,r({list:e,added:[],removed:[],unchanged:e,finishRemoved:c}),e}return an(()=>{const e=new Set(s),n=s.slice(),a=[],l=[],d=[];for(const t of s)(o.has(t)?d:a).push(t);let h=!a.length;for(let r=0;r<t.length;r++){const o=t[r];e.has(o)||(i.has(o)||(l.push(o),i.add(o)),u(n,o,r)),h&&o!==n[r]&&(h=!1)}return!l.length&&h?t:(r({list:n,added:a,removed:l,unchanged:d,finishRemoved:c}),o=e,n)})},t.appear?[]:n.slice())}(Li(()=>e.children).toArray,{appear:e.appear,onChange({added:n,removed:r,finishRemoved:o,list:i}){const a=t();for(const t of n)Ui(a,e,t);const s=[];for(const e of i)e.isConnected&&(e instanceof HTMLElement||e instanceof SVGElement)&&s.push({el:e,rect:e.getBoundingClientRect()});queueMicrotask(()=>{const e=[];for(const{el:t,rect:n}of s)if(t.isConnected){const r=t.getBoundingClientRect(),o=n.left-r.left,i=n.top-r.top;(o||i)&&(t.style.transform=`translate(${o}px, ${i}px)`,t.style.transitionDuration="0s",e.push(t))}document.body.offsetHeight;for(const t of e){let e=function(n){(n.target===t||/transform$/.test(n.propertyName))&&(t.removeEventListener("transitionend",e),t.classList.remove(...a.move))};t.classList.add(...a.move),t.style.transform=t.style.transitionDuration="",t.addEventListener("transitionend",e)}});for(const t of r)Di(a,e,t,()=>o([t]))}})};const qi="androidBackHandler",Ki={[qi]:!0};var Hi=rr('<svg><path fill-rule=evenodd clip-rule=evenodd d="M10.2122 14.3407C10.5384 14.0854 10.5959 13.614 10.3406 13.2878L6.20237 8.00003L10.3406 2.71227C10.5959 2.38607 10.5384 1.91469 10.2122 1.6594C9.88604 1.40412 9.41465 1.46161 9.15937 1.7878L4.65937 7.5378C4.44688 7.80932 4.44688 8.19074 4.65937 8.46226L9.15937 14.2123C9.41465 14.5385 9.88604 14.5959 10.2122 14.3407Z"></svg>',!1,!0,!1);const Fi={left:0,top:90,right:180,bottom:270},Vi=e=>{const t=Or();return Pn(Nr("svg")`
79
- transform: rotate(${e=>Fi[e.svgDirection]}deg);
78
+ `;function Ei(e){const t=un(()=>Object.keys(e).filter(e=>e.startsWith("data-"))),[n]=Vn(e,t);return n}const Ti=e=>{const t=Ei(e);return Bn(Ri,Fn({type:"button",get appearance(){return e.appearance||"primary"},get class(){return e.class},onClick:t=>{var n;return null==(n=e.onClick)?void 0:n.call(e,t)},onMouseEnter:t=>{var n;return null==(n=e.onMouseEnter)?void 0:n.call(e,t)},onMouseLeave:t=>{var n;return null==(n=e.onMouseLeave)?void 0:n.call(e,t)},ref(t){var n=e.ref;"function"==typeof n?n(t):e.ref=t},get disabled(){return e.disabled},get scale(){return e.scale||"m"},get leftIcon(){return!!e.leftIcon},get rightIcon(){return!!e.rightIcon},"data-tc-button":"true"},t,{get children(){return[ir(()=>e.leftIcon),ir(()=>e.children),ir(()=>e.rightIcon)]}}))};var Ai,Mi={exports:{}};var _i=(Ai||(Ai=1,function(e){!function(){var t={}.hasOwnProperty;function n(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=o(e,r(n)))}return e}function r(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return n.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var r="";for(var i in e)t.call(e,i)&&e[i]&&(r=o(r,i));return r}function o(e,t){return t?e?e+" "+t:e+t:e}e.exports?(n.default=n,e.exports=n):window.classNames=n}()}(Mi)),Mi.exports);const Oi=b(_i),Li=()=>{},Ii=(e,t)=>t();const Ni=e=>e instanceof Element;function Wi(e,t){if(t(e))return e;if("function"==typeof e&&!e.length)return Wi(e(),t);if(Array.isArray(e)){const n=[];for(const r of e){const e=Wi(r,t);e&&(Array.isArray(e)?n.push.apply(n,e):n.push(e))}return n.length?n:null}return null}function Pi(e,t=Ni,n=Ni){const r=sn(e),o=sn(()=>Wi(r(),t));return o.toArray=()=>{const e=o();return Array.isArray(e)?e:e?[e]:[]},o}function Ui(e,t){if(t(e))return e;if("function"==typeof e&&!e.length)return Ui(e(),t);if(Array.isArray(e))for(const n of e){const e=Ui(n,t);if(e)return e}return null}function Di(e,t=Ni,n=Ni){const r=sn(e);return sn(()=>Ui(r(),t))}function ji(e){return sn(()=>{const t=e.name||"s";return{enterActive:(e.enterActiveClass||t+"-enter-active").split(" "),enter:(e.enterClass||t+"-enter").split(" "),enterTo:(e.enterToClass||t+"-enter-to").split(" "),exitActive:(e.exitActiveClass||t+"-exit-active").split(" "),exit:(e.exitClass||t+"-exit").split(" "),exitTo:(e.exitToClass||t+"-exit-to").split(" "),move:(e.moveClass||t+"-move").split(" ")}})}function Bi(e){requestAnimationFrame(()=>requestAnimationFrame(e))}function $i(e,t,n,r){const{onBeforeEnter:o,onEnter:i,onAfterEnter:a}=t;function s(t){t&&t.target!==n||(null==r||r(),n.removeEventListener("transitionend",s),n.removeEventListener("animationend",s),n.classList.remove(...e.enterActive),n.classList.remove(...e.enterTo),null==a||a(n))}null==o||o(n),n.classList.add(...e.enter),n.classList.add(...e.enterActive),queueMicrotask(()=>{if(!n.parentNode)return null==r?void 0:r();null==i||i(n,()=>s())}),Bi(()=>{n.classList.remove(...e.enter),n.classList.add(...e.enterTo),(!i||i.length<2)&&(n.addEventListener("transitionend",s),n.addEventListener("animationend",s))})}function qi(e,t,n,r){const{onBeforeExit:o,onExit:i,onAfterExit:a}=t;if(!n.parentNode)return null==r?void 0:r();function s(t){t&&t.target!==n||(null==r||r(),n.removeEventListener("transitionend",s),n.removeEventListener("animationend",s),n.classList.remove(...e.exitActive),n.classList.remove(...e.exitTo),null==a||a(n))}null==o||o(n),n.classList.add(...e.exit),n.classList.add(...e.exitActive),null==i||i(n,()=>s()),Bi(()=>{n.classList.remove(...e.exit),n.classList.add(...e.exitTo),(!i||i.length<2)&&(n.addEventListener("transitionend",s),n.addEventListener("animationend",s))})}const Ki={inout:"in-out",outin:"out-in"},Hi=e=>{const t=ji(e);return function(e,t){const n=un(e),r=n?[n]:[],{onEnter:o=Ii,onExit:i=Ii}=t,[a,s]=nn(t.appear?[]:r),[l]=vn();let c,u=!1;function d(e,t){if(!e)return t&&t();u=!0,i(e,()=>{cn(()=>{u=!1,s(t=>t.filter(t=>t!==e)),t&&t()})})}function h(e){const t=c;if(!t)return e&&e();c=void 0,s(e=>[t,...e]),o(t,null!=e?e:Li)}const f="out-in"===t.mode?e=>u||d(e,h):"in-out"===t.mode?e=>h(()=>d(e)):e=>{d(e),h()};return rn(t=>{const n=e();return un(l)?(l(),t):(n!==t&&(c=n,cn(()=>un(()=>f(t)))),n)},t.appear?void 0:n),a}(Di(()=>e.children),{mode:Ki[e.mode],appear:e.appear,onEnter(n,r){$i(t(),e,n,r)},onExit(n,r){qi(t(),e,n,r)}})},Fi=e=>{const t=ji(e);return function(e,t){const n=un(e),{onChange:r}=t;let o=new Set(t.appear?void 0:n);const i=new WeakSet,[a,s]=nn([],{equals:!1}),[l]=vn(),c=e=>{s(t=>(t.push.apply(t,e),t));for(const t of e)i.delete(t)},u=(e,t,n)=>e.splice(n,0,t);return sn(t=>{const n=a(),s=e();if(s[qt],un(l))return l(),t;if(n.length){const e=t.filter(e=>!n.includes(e));return n.length=0,r({list:e,added:[],removed:[],unchanged:e,finishRemoved:c}),e}return un(()=>{const e=new Set(s),n=s.slice(),a=[],l=[],d=[];for(const t of s)(o.has(t)?d:a).push(t);let h=!a.length;for(let r=0;r<t.length;r++){const o=t[r];e.has(o)||(i.has(o)||(l.push(o),i.add(o)),u(n,o,r)),h&&o!==n[r]&&(h=!1)}return!l.length&&h?t:(r({list:n,added:a,removed:l,unchanged:d,finishRemoved:c}),o=e,n)})},t.appear?[]:n.slice())}(Pi(()=>e.children).toArray,{appear:e.appear,onChange({added:n,removed:r,finishRemoved:o,list:i}){const a=t();for(const t of n)$i(a,e,t);const s=[];for(const e of i)e.isConnected&&(e instanceof HTMLElement||e instanceof SVGElement)&&s.push({el:e,rect:e.getBoundingClientRect()});queueMicrotask(()=>{const e=[];for(const{el:t,rect:n}of s)if(t.isConnected){const r=t.getBoundingClientRect(),o=n.left-r.left,i=n.top-r.top;(o||i)&&(t.style.transform=`translate(${o}px, ${i}px)`,t.style.transitionDuration="0s",e.push(t))}document.body.offsetHeight;for(const t of e){let e=function(n){(n.target===t||/transform$/.test(n.propertyName))&&(t.removeEventListener("transitionend",e),t.classList.remove(...a.move))};t.classList.add(...a.move),t.style.transform=t.style.transitionDuration="",t.addEventListener("transitionend",e)}});for(const t of r)qi(a,e,t,()=>o([t]))}})};const Vi="androidBackHandler",zi={[Vi]:!0};var Zi=sr('<svg><path fill-rule=evenodd clip-rule=evenodd d="M10.2122 14.3407C10.5384 14.0854 10.5959 13.614 10.3406 13.2878L6.20237 8.00003L10.3406 2.71227C10.5959 2.38607 10.5384 1.91469 10.2122 1.6594C9.88604 1.40412 9.41465 1.46161 9.15937 1.7878L4.65937 7.5378C4.44688 7.80932 4.44688 8.19074 4.65937 8.46226L9.15937 14.2123C9.41465 14.5385 9.88604 14.5959 10.2122 14.3407Z"></svg>',!1,!0,!1);const Gi={left:0,top:90,right:180,bottom:270},Yi=e=>{const t=Wr();return Bn(Ur("svg")`
79
+ transform: rotate(${e=>Gi[e.svgDirection]}deg);
80
80
  transition: transform 0.1s ease-in-out;
81
- `,{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",get svgDirection(){return e.direction||"left"},get children(){var n=Hi();return en(()=>or(n,"fill",e.fill||t.colors.icon.secondary)),n}})};var zi=rr('<svg xmlns=http://www.w3.org/2000/svg width=16 height=16 viewBox="0 0 16 16"fill=none><path fill-rule=evenodd clip-rule=evenodd d="M2.71966 2.71968C3.01255 2.42678 3.48743 2.42677 3.78032 2.71966L8.00002 6.93925L12.2197 2.71967C12.5126 2.42677 12.9874 2.42678 13.2803 2.71967C13.5732 3.01257 13.5732 3.48744 13.2803 3.78033L9.06068 7.99991L13.2803 12.2197C13.5732 12.5126 13.5732 12.9874 13.2803 13.2803C12.9874 13.5732 12.5126 13.5732 12.2197 13.2803L8.00002 9.06057L3.78033 13.2803C3.48744 13.5732 3.01257 13.5732 2.71967 13.2803C2.42678 12.9874 2.42677 12.5126 2.71967 12.2197L6.93936 7.99991L2.71968 3.78034C2.42678 3.48745 2.42677 3.01257 2.71966 2.71968Z">');const Zi=e=>{const t=Or();return n=zi(),r=n.firstChild,en(()=>or(r,"fill",e.fill||t.colors.icon.secondary)),n;var n,r},Gi=Nr.button`
81
+ `,{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",get svgDirection(){return e.direction||"left"},get children(){var n=Zi();return on(()=>lr(n,"fill",e.fill||t.colors.icon.secondary)),n}})};var Qi=sr('<svg xmlns=http://www.w3.org/2000/svg width=16 height=16 viewBox="0 0 16 16"fill=none><path fill-rule=evenodd clip-rule=evenodd d="M2.71966 2.71968C3.01255 2.42678 3.48743 2.42677 3.78032 2.71966L8.00002 6.93925L12.2197 2.71967C12.5126 2.42677 12.9874 2.42678 13.2803 2.71967C13.5732 3.01257 13.5732 3.48744 13.2803 3.78033L9.06068 7.99991L13.2803 12.2197C13.5732 12.5126 13.5732 12.9874 13.2803 13.2803C12.9874 13.5732 12.5126 13.5732 12.2197 13.2803L8.00002 9.06057L3.78033 13.2803C3.48744 13.5732 3.01257 13.5732 2.71967 13.2803C2.42678 12.9874 2.42677 12.5126 2.71967 12.2197L6.93936 7.99991L2.71968 3.78034C2.42678 3.48745 2.42677 3.01257 2.71966 2.71968Z">');const Ji=e=>{const t=Wr();return n=Qi(),r=n.firstChild,on(()=>lr(r,"fill",e.fill||t.colors.icon.secondary)),n;var n,r},Xi=Ur.button`
82
82
  padding: 0;
83
83
  display: flex;
84
84
  justify-content: center;
@@ -92,7 +92,7 @@
92
92
 
93
93
  transition: transform 0.125s ease-in-out;
94
94
 
95
- ${yi} {
95
+ ${xi} {
96
96
  &:hover {
97
97
  transform: scale(1.04);
98
98
  }
@@ -102,12 +102,12 @@
102
102
  transform: scale(0.96);
103
103
  }
104
104
 
105
- ${wi} {
105
+ ${Ci} {
106
106
  &:active {
107
107
  transform: scale(0.92);
108
108
  }
109
109
  }
110
- `,Yi=e=>{const t=xi(e),n=()=>e.icon||"close";return Pn(Gi,$n({get class(){return e.class},onClick:()=>e.onClick(),"data-tc-icon-button":"true"},t,{get children(){return[Pn(Fn,{get when(){return!!e.children},get children(){return e.children}}),Pn(Fn,{get when(){return!e.children},get children(){return Pn(Vn,{get children(){return[Pn(zn,{get when(){return"close"===n()},get children(){return Pn(Zi,{get fill(){return e.fill}})}}),Pn(zn,{get when(){return"arrow"===n()},get children(){return Pn(Vi,{get fill(){return e.fill}})}}),Pn(zn,{get when(){return"question"===n()},get children(){return Pn(xs,{get fill(){return e.fill}})}}),Pn(zn,{get when(){return"string"!=typeof n()},get children(){return n()}})]}})}})]}}))},Qi={m:"24px",s:"16px",none:"0"},Ji=Nr.div`
110
+ `,ea=e=>{const t=Ei(e),n=()=>e.icon||"close";return Bn(Xi,Fn({get class(){return e.class},onClick:()=>e.onClick(),"data-tc-icon-button":"true"},t,{get children(){return[Bn(Gn,{get when(){return!!e.children},get children(){return e.children}}),Bn(Gn,{get when(){return!e.children},get children(){return Bn(Yn,{get children(){return[Bn(Qn,{get when(){return"close"===n()},get children(){return Bn(Ji,{get fill(){return e.fill}})}}),Bn(Qn,{get when(){return"arrow"===n()},get children(){return Bn(Yi,{get fill(){return e.fill}})}}),Bn(Qn,{get when(){return"question"===n()},get children(){return Bn(Es,{get fill(){return e.fill}})}}),Bn(Qn,{get when(){return"string"!=typeof n()},get children(){return n()}})]}})}})]}}))},ta={m:"24px",s:"16px",none:"0"},na=Ur.div`
111
111
  display: flex;
112
112
  position: fixed;
113
113
  z-index: 1000;
@@ -119,22 +119,22 @@
119
119
  padding: 20px 0;
120
120
  overflow-y: auto;
121
121
 
122
- ${mi("mobile")} {
122
+ ${bi("mobile")} {
123
123
  padding-bottom: 0;
124
124
  }
125
- `,Xi=Ar`
125
+ `,ra=Or`
126
126
  box-shadow:
127
127
  0 4px 16px rgba(0, 0, 0, 0.08),
128
128
  0 16px 64px rgba(0, 0, 0, 0.16);
129
129
  width: fit-content;
130
130
  margin: auto;
131
131
 
132
- ${mi("mobile")} {
132
+ ${bi("mobile")} {
133
133
  width: 100%;
134
134
  height: fit-content;
135
135
  margin: auto 0 0 0;
136
136
  }
137
- `,ea=Nr.div`
137
+ `,oa=Ur.div`
138
138
  position: relative;
139
139
  min-height: 100px;
140
140
  width: 416px;
@@ -143,33 +143,33 @@
143
143
  box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.04);
144
144
 
145
145
  background-color: ${e=>e.theme.colors.background.primary};
146
- border-radius: ${e=>Qi[e.theme.borderRadius]};
146
+ border-radius: ${e=>ta[e.theme.borderRadius]};
147
147
 
148
- ${mi("mobile")} {
148
+ ${bi("mobile")} {
149
149
  width: 100%;
150
150
  }
151
- `,ta=Nr(Yi)`
151
+ `,ia=Ur(ea)`
152
152
  position: absolute;
153
153
  right: 16px;
154
154
  top: 16px;
155
- `,na=Nr.div`
155
+ `,aa=Ur.div`
156
156
  display: flex;
157
157
  justify-content: space-between;
158
158
  align-items: center;
159
159
  padding: 16px 16px 16px 18px;
160
- border-radius: 0 0 ${e=>Qi[e.theme.borderRadius]}
161
- ${e=>Qi[e.theme.borderRadius]};
162
- `,ra=Nr(Yi)`
163
- background-color: ${e=>jr(e.theme.colors.icon.secondary,.12)};
164
- `;class oa{constructor(){this.currentTime=0}}const ia=class e{constructor(){this.currentTime=0,this.playbackRate=1,this.startTime=null,this.timeline=new oa,this.finished=Promise.resolve(this),this.effect=null,this.id="",this.pending=!1,this.playState="finished",this.replaceState="active",this.ready=Promise.resolve(this),this.oncancel=null,this.onfinish=null,this.onremove=null}static create(){return e._instance||(!function(...e){try{console.warn("[TON_CONNECT_UI]",...e)}catch(rf){}}("Animation is not supported in this environment: please consider using the `web-animations-js` polyfill to provide a fallback implementation of the Web Animations API."),e._instance=new e),e._instance}cancel(){}finish(){}pause(){}play(){}reverse(){}addEventListener(e,t,n){}dispatchEvent(e){return!1}removeEventListener(e,t,n){}updatePlaybackRate(e){}commitStyles(){}persist(){}};ia._instance=null;let aa=ia;function sa(e,t,n){return"animate"in e?e.animate(t,n):aa.create()}var la=rr("<div>");const ca=function(e,t){const n=n=>{var r;return!e.contains(n.target)&&(null==(r=t())?void 0:r())};document.body.addEventListener("click",n),ln(()=>document.body.removeEventListener("click",n))},ua=function(e,t){const n=e=>{var n,r;"Escape"===e.key&&(null==(n=document.activeElement)||n.blur(),null==(r=t())||r())};document.body.addEventListener("keydown",n),ln(()=>document.body.removeEventListener("keydown",n))},da=function(e,t){const{isEnabled:n,onClose:r}=t();if(!n)return;if(!("android"===no().os))return;window.history.pushState(Ki,"");const o=e=>{e.preventDefault(),r()};window.addEventListener("popstate",o,{once:!0}),ln(()=>{window.removeEventListener("popstate",o),Jr(()=>{var e;!0===(null==(e=window.history.state)?void 0:e[qi])&&window.history.back()})})},ha=e=>{const t=Or(),n=xi(e);return tn(()=>{e.opened?document.documentElement.scrollHeight!==document.documentElement.clientHeight&&(document.body.style.top=Br(-document.documentElement.scrollTop),document.body.classList.add(Pr)):(document.body.classList.remove(Pr),document.documentElement.scrollTo({top:-parseFloat(getComputedStyle(document.body).top)}),document.body.style.top="auto")}),Pn(Bi,{onBeforeEnter:e=>{const t=gi("mobile")?200:100;sa(e,[{opacity:0},{opacity:1}],{duration:t}),gi("mobile")&&sa(e.firstElementChild,[{transform:"translateY(390px)"},{transform:"translateY(0)"}],{duration:t})},onExit:(e,t)=>{const n=gi("mobile")?200:100,r=sa(e,[{opacity:1},{opacity:0}],{duration:n});if(gi("mobile")){const o=sa(e.firstElementChild,[{transform:"translateY(0)"},{transform:"translateY(390px)"}],{duration:n});Promise.all([r.finished,o.finished]).then(t)}else r.finished.then(t)},get children(){return Pn(Fn,{get when(){return e.opened},get children(){return Pn(Ji,$n({"data-tc-modal":"true"},n,{get children(){var n=la();return sr(da,n,()=>({isEnabled:e.enableAndroidBackHandler,onClose:()=>e.onClose()})),sr(ua,n,()=>()=>e.onClose()),sr(ca,n,()=>()=>e.onClose()),lr(n,Pn(ea,{get class(){return e.class},get children(){return[Pn(ta,{icon:"close",onClick:()=>e.onClose()}),tr(()=>e.children)]}}),null),lr(n,Pn(Fn,{get when(){return e.onClickQuestion&&e.showFooter},get children(){return Pn(na,{get children(){return[Pn(bs,{}),Pn(ra,{get onClick(){return e.onClickQuestion},icon:"question"})]}})}}),null),en(()=>ir(n,Ai(Xi,Ar`
165
- border-radius: ${Qi[t.borderRadius]};
160
+ border-radius: 0 0 ${e=>ta[e.theme.borderRadius]}
161
+ ${e=>ta[e.theme.borderRadius]};
162
+ `,sa=Ur(ea)`
163
+ background-color: ${e=>Kr(e.theme.colors.icon.secondary,.12)};
164
+ `;class la{constructor(){this.currentTime=0}}const ca=class e{constructor(){this.currentTime=0,this.playbackRate=1,this.startTime=null,this.timeline=new la,this.finished=Promise.resolve(this),this.effect=null,this.id="",this.pending=!1,this.playState="finished",this.replaceState="active",this.ready=Promise.resolve(this),this.oncancel=null,this.onfinish=null,this.onremove=null}static create(){return e._instance||(!function(...e){try{console.warn("[TON_CONNECT_UI]",...e)}catch(df){}}("Animation is not supported in this environment: please consider using the `web-animations-js` polyfill to provide a fallback implementation of the Web Animations API."),e._instance=new e),e._instance}cancel(){}finish(){}pause(){}play(){}reverse(){}addEventListener(e,t,n){}dispatchEvent(e){return!1}removeEventListener(e,t,n){}updatePlaybackRate(e){}commitStyles(){}persist(){}};ca._instance=null;let ua=ca;function da(e,t,n){return"animate"in e?e.animate(t,n):ua.create()}var ha=sr("<div>");const fa=function(e,t){const n=n=>{var r;return!e.contains(n.target)&&(null==(r=t())?void 0:r())};document.body.addEventListener("click",n),hn(()=>document.body.removeEventListener("click",n))},pa=function(e,t){const n=e=>{var n,r;"Escape"===e.key&&(null==(n=document.activeElement)||n.blur(),null==(r=t())||r())};document.body.addEventListener("keydown",n),hn(()=>document.body.removeEventListener("keydown",n))},ga=function(e,t){const{isEnabled:n,onClose:r}=t();if(!n)return;if(!("android"===ao().os))return;window.history.pushState(zi,"");const o=e=>{e.preventDefault(),r()};window.addEventListener("popstate",o,{once:!0}),hn(()=>{window.removeEventListener("popstate",o),no(()=>{var e;!0===(null==(e=window.history.state)?void 0:e[Vi])&&window.history.back()})})},ma=e=>{const t=Wr(),n=Ei(e);return an(()=>{e.opened?document.documentElement.scrollHeight!==document.documentElement.clientHeight&&(document.body.style.top=Hr(-document.documentElement.scrollTop),document.body.classList.add(Br)):document.body.classList.contains(Br)&&(document.body.classList.remove(Br),document.documentElement.scrollTo({top:-parseFloat(getComputedStyle(document.body).top)}),document.body.style.top="auto")}),Bn(Hi,{onBeforeEnter:e=>{const t=vi("mobile")?200:100;da(e,[{opacity:0},{opacity:1}],{duration:t}),vi("mobile")&&da(e.firstElementChild,[{transform:"translateY(390px)"},{transform:"translateY(0)"}],{duration:t})},onExit:(e,t)=>{const n=vi("mobile")?200:100,r=da(e,[{opacity:1},{opacity:0}],{duration:n});if(vi("mobile")){const o=da(e.firstElementChild,[{transform:"translateY(0)"},{transform:"translateY(390px)"}],{duration:n});Promise.all([r.finished,o.finished]).then(t)}else r.finished.then(t)},get children(){return Bn(Gn,{get when(){return e.opened},get children(){return Bn(na,Fn({"data-tc-modal":"true"},n,{get children(){var n=ha();return dr(ga,n,()=>({isEnabled:e.enableAndroidBackHandler,onClose:()=>e.onClose()})),dr(pa,n,()=>()=>e.onClose()),dr(fa,n,()=>()=>e.onClose()),hr(n,Bn(oa,{get class(){return e.class},get children(){return[Bn(ia,{icon:"close",onClick:()=>e.onClose()}),ir(()=>e.children)]}}),null),hr(n,Bn(Gn,{get when(){return e.onClickQuestion&&e.showFooter},get children(){return Bn(aa,{get children(){return[Bn(ks,{}),Bn(sa,{get onClick(){return e.onClickQuestion},icon:"question"})]}})}}),null),on(()=>cr(n,Oi(ra,Or`
165
+ border-radius: ${ta[t.borderRadius]};
166
166
  background-color: ${t.colors.background.tint};
167
167
 
168
- ${mi("mobile")} {
169
- border-radius: ${Qi[t.borderRadius]}
170
- ${Qi[t.borderRadius]} 0 0;
168
+ ${bi("mobile")} {
169
+ border-radius: ${ta[t.borderRadius]}
170
+ ${ta[t.borderRadius]} 0 0;
171
171
  }
172
- `))),n}}))}})}})},fa={m:"22px",s:"12px",none:"0"},pa={m:"18px",s:"8px",none:"0"},ga=Nr.div`
172
+ `))),n}}))}})}})},wa={m:"22px",s:"12px",none:"0"},ya={m:"18px",s:"8px",none:"0"},va=Ur.div`
173
173
  display: grid;
174
174
  grid-template: 1fr / 1fr 1fr;
175
175
  width: fit-content;
@@ -178,10 +178,10 @@
178
178
 
179
179
  position: relative;
180
180
  padding: 4px;
181
- border-radius: ${e=>fa[e.theme.borderRadius]};
181
+ border-radius: ${e=>wa[e.theme.borderRadius]};
182
182
 
183
183
  background-color: ${e=>e.theme.colors.background.secondary};
184
- `,ma=Nr.div`
184
+ `,ba=Ur.div`
185
185
  position: absolute;
186
186
  top: 4px;
187
187
  left: 4px;
@@ -189,15 +189,15 @@
189
189
  height: calc(100% - 8px);
190
190
  width: calc(50% - 4px);
191
191
 
192
- border-radius: ${e=>pa[e.theme.borderRadius]};
192
+ border-radius: ${e=>ya[e.theme.borderRadius]};
193
193
  background-color: ${e=>e.theme.colors.background.segment};
194
194
 
195
195
  transform: ${e=>e.right?"translateX(100%)":"translateX(0)"};
196
196
 
197
197
  transition: transform 0.13s ease-in-out;
198
- `,wa=Nr.input`
198
+ `,Ca=Ur.input`
199
199
  display: none;
200
- `,ya=Nr.label`
200
+ `,xa=Ur.label`
201
201
  padding: 9px 12px;
202
202
  z-index: 1;
203
203
 
@@ -212,7 +212,7 @@
212
212
  > * {
213
213
  ${e=>e.isActive?"":`color: ${e.theme.colors.text.secondary};`}
214
214
  }
215
- `,va={m:"16px",s:"12px",none:"0"},ba={m:"12px",s:"8px",none:"0"},Ca=Nr.div`
215
+ `,Sa={m:"16px",s:"12px",none:"0"},ka={m:"12px",s:"8px",none:"0"},Ra=Ur.div`
216
216
  width: 52px;
217
217
  height: 52px;
218
218
  background: transparent;
@@ -224,43 +224,43 @@
224
224
  align-items: center;
225
225
  justify-content: center;
226
226
  transition: transform 0.125s ease-in-out;
227
- `,xa=Nr.button`
227
+ `,Ea=Ur.button`
228
228
  display: flex;
229
229
  align-items: center;
230
230
  justify-content: center;
231
231
  position: relative;
232
232
  background-color: ${e=>e.theme.colors.background.qr};
233
- border-radius: ${e=>va[e.theme.borderRadius]};
234
- padding: ${Br(24)} 0;
235
- height: ${Br(304)};
233
+ border-radius: ${e=>Sa[e.theme.borderRadius]};
234
+ padding: ${Hr(24)} 0;
235
+ height: ${Hr(304)};
236
236
  width: 100%;
237
237
 
238
238
  overflow: hidden;
239
239
  cursor: pointer;
240
240
  border: none;
241
241
 
242
- ${yi} {
242
+ ${xi} {
243
243
  &:hover {
244
- ${Ca.class} {
244
+ ${Ra.class} {
245
245
  transform: scale(1.04);
246
246
  }
247
247
  }
248
248
  }
249
249
 
250
250
  &:active {
251
- ${Ca.class} {
251
+ ${Ra.class} {
252
252
  transform: scale(0.96);
253
253
  }
254
254
  }
255
255
 
256
- ${wi} {
256
+ ${Ci} {
257
257
  &:active {
258
- ${Ca.class} {
258
+ ${Ra.class} {
259
259
  transform: scale(0.92);
260
260
  }
261
261
  }
262
262
  }
263
- `,Sa=Nr.div`
263
+ `,Ta=Ur.div`
264
264
  position: relative;
265
265
  display: flex;
266
266
  justify-content: center;
@@ -280,21 +280,21 @@
280
280
  path {
281
281
  fill: ${e=>e.theme.colors.constant.black};
282
282
  }
283
- `,ka=Nr.div`
283
+ `,Aa=Ur.div`
284
284
  position: absolute;
285
- width: ${Br(60)};
286
- height: ${Br(60)};
285
+ width: ${Hr(60)};
286
+ height: ${Hr(60)};
287
287
  background: ${e=>e.theme.colors.background.qr};
288
288
 
289
289
  display: flex;
290
290
  align-items: center;
291
291
  justify-content: center;
292
- `,Ra=Nr(ti)`
293
- width: ${e=>Br(e.size)};
294
- height: ${e=>Br(e.size)};
295
- border-radius: ${e=>ba[e.theme.borderRadius]};
292
+ `,Ma=Ur(ii)`
293
+ width: ${e=>Hr(e.size)};
294
+ height: ${e=>Hr(e.size)};
295
+ border-radius: ${e=>ka[e.theme.borderRadius]};
296
296
  background-color: ${e=>e.theme.colors.background.qr};
297
- `,Ea=Nr.div`
297
+ `,_a=Ur.div`
298
298
  position: absolute;
299
299
  bottom: 14px;
300
300
  left: 50%;
@@ -309,14 +309,14 @@
309
309
 
310
310
  filter: drop-shadow(0px 2px 8px rgba(0, 0, 0, 0.08));
311
311
  background-color: ${e=>e.theme.colors.background.segment};
312
- `;var Aa,Ma={exports:{}};var Ta=(Aa||(Aa=1,function(e){var t=function(){var e=function(e,t){var n=e,r=u[t],o=null,i=0,a=null,s=[],l={},c=function(e,t){o=function(e){for(var t=new Array(e),n=0;n<e;n+=1){t[n]=new Array(e);for(var r=0;r<e;r+=1)t[n][r]=null}return t}(i=4*n+17),d(0,0),d(i-7,0),d(0,i-7),f(),h(),g(e,t),n>=7&&p(e),null==a&&(a=w(n,r,s)),m(a,t)},d=function(e,t){for(var n=-1;n<=7;n+=1)if(!(e+n<=-1||i<=e+n))for(var r=-1;r<=7;r+=1)t+r<=-1||i<=t+r||(o[e+n][t+r]=0<=n&&n<=6&&(0==r||6==r)||0<=r&&r<=6&&(0==n||6==n)||2<=n&&n<=4&&2<=r&&r<=4)},h=function(){for(var e=8;e<i-8;e+=1)null==o[e][6]&&(o[e][6]=e%2==0);for(var t=8;t<i-8;t+=1)null==o[6][t]&&(o[6][t]=t%2==0)},f=function(){for(var e=v.getPatternPosition(n),t=0;t<e.length;t+=1)for(var r=0;r<e.length;r+=1){var i=e[t],a=e[r];if(null==o[i][a])for(var s=-2;s<=2;s+=1)for(var l=-2;l<=2;l+=1)o[i+s][a+l]=-2==s||2==s||-2==l||2==l||0==s&&0==l}},p=function(e){for(var t=v.getBCHTypeNumber(n),r=0;r<18;r+=1){var a=!e&&1==(t>>r&1);o[Math.floor(r/3)][r%3+i-8-3]=a}for(r=0;r<18;r+=1)a=!e&&1==(t>>r&1),o[r%3+i-8-3][Math.floor(r/3)]=a},g=function(e,t){for(var n=r<<3|t,a=v.getBCHTypeInfo(n),s=0;s<15;s+=1){var l=!e&&1==(a>>s&1);s<6?o[s][8]=l:s<8?o[s+1][8]=l:o[i-15+s][8]=l}for(s=0;s<15;s+=1)l=!e&&1==(a>>s&1),s<8?o[8][i-s-1]=l:s<9?o[8][15-s-1+1]=l:o[8][15-s-1]=l;o[i-8][8]=!e},m=function(e,t){for(var n=-1,r=i-1,a=7,s=0,l=v.getMaskFunction(t),c=i-1;c>0;c-=2)for(6==c&&(c-=1);;){for(var u=0;u<2;u+=1)if(null==o[r][c-u]){var d=!1;s<e.length&&(d=1==(e[s]>>>a&1)),l(r,c-u)&&(d=!d),o[r][c-u]=d,-1==(a-=1)&&(s+=1,a=7)}if((r+=n)<0||i<=r){r-=n,n=-n;break}}},w=function(e,t,n){for(var r=x.getRSBlocks(e,t),o=S(),i=0;i<n.length;i+=1){var a=n[i];o.put(a.getMode(),4),o.put(a.getLength(),v.getLengthInBits(a.getMode(),e)),a.write(o)}var s=0;for(i=0;i<r.length;i+=1)s+=r[i].dataCount;if(o.getLengthInBits()>8*s)throw"code length overflow. ("+o.getLengthInBits()+">"+8*s+")";for(o.getLengthInBits()+4<=8*s&&o.put(0,4);o.getLengthInBits()%8!=0;)o.putBit(!1);for(;!(o.getLengthInBits()>=8*s||(o.put(236,8),o.getLengthInBits()>=8*s));)o.put(17,8);return function(e,t){for(var n=0,r=0,o=0,i=new Array(t.length),a=new Array(t.length),s=0;s<t.length;s+=1){var l=t[s].dataCount,c=t[s].totalCount-l;r=Math.max(r,l),o=Math.max(o,c),i[s]=new Array(l);for(var u=0;u<i[s].length;u+=1)i[s][u]=255&e.getBuffer()[u+n];n+=l;var d=v.getErrorCorrectPolynomial(c),h=C(i[s],d.getLength()-1).mod(d);for(a[s]=new Array(d.getLength()-1),u=0;u<a[s].length;u+=1){var f=u+h.getLength()-a[s].length;a[s][u]=f>=0?h.getAt(f):0}}var p=0;for(u=0;u<t.length;u+=1)p+=t[u].totalCount;var g=new Array(p),m=0;for(u=0;u<r;u+=1)for(s=0;s<t.length;s+=1)u<i[s].length&&(g[m]=i[s][u],m+=1);for(u=0;u<o;u+=1)for(s=0;s<t.length;s+=1)u<a[s].length&&(g[m]=a[s][u],m+=1);return g}(o,r)};l.addData=function(e,t){var n=null;switch(t=t||"Byte"){case"Numeric":n=k(e);break;case"Alphanumeric":n=R(e);break;case"Byte":n=E(e);break;case"Kanji":n=A(e);break;default:throw"mode:"+t}s.push(n),a=null},l.isDark=function(e,t){if(e<0||i<=e||t<0||i<=t)throw e+","+t;return o[e][t]},l.getModuleCount=function(){return i},l.make=function(){if(n<1){for(var e=1;e<40;e++){for(var t=x.getRSBlocks(e,r),o=S(),i=0;i<s.length;i++){var a=s[i];o.put(a.getMode(),4),o.put(a.getLength(),v.getLengthInBits(a.getMode(),e)),a.write(o)}var u=0;for(i=0;i<t.length;i++)u+=t[i].dataCount;if(o.getLengthInBits()<=8*u)break}n=e}c(!1,function(){for(var e=0,t=0,n=0;n<8;n+=1){c(!0,n);var r=v.getLostPoint(l);(0==n||e>r)&&(e=r,t=n)}return t}())},l.createTableTag=function(e,t){e=e||2;var n="";n+='<table style="',n+=" border-width: 0px; border-style: none;",n+=" border-collapse: collapse;",n+=" padding: 0px; margin: "+(t=void 0===t?4*e:t)+"px;",n+='">',n+="<tbody>";for(var r=0;r<l.getModuleCount();r+=1){n+="<tr>";for(var o=0;o<l.getModuleCount();o+=1)n+='<td style="',n+=" border-width: 0px; border-style: none;",n+=" border-collapse: collapse;",n+=" padding: 0px; margin: 0px;",n+=" width: "+e+"px;",n+=" height: "+e+"px;",n+=" background-color: ",n+=l.isDark(r,o)?"#000000":"#ffffff",n+=";",n+='"/>';n+="</tr>"}return n+="</tbody>",n+="</table>"},l.createSvgTag=function(e,t,n,r){var o={};"object"==typeof arguments[0]&&(e=(o=arguments[0]).cellSize,t=o.margin,n=o.alt,r=o.title),e=e||2,t=void 0===t?4*e:t,(n="string"==typeof n?{text:n}:n||{}).text=n.text||null,n.id=n.text?n.id||"qrcode-description":null,(r="string"==typeof r?{text:r}:r||{}).text=r.text||null,r.id=r.text?r.id||"qrcode-title":null;var i,a,s,c,u=l.getModuleCount()*e+2*t,d="";for(c="l"+e+",0 0,"+e+" -"+e+",0 0,-"+e+"z ",d+='<svg version="1.1" xmlns="http://www.w3.org/2000/svg"',d+=o.scalable?"":' width="'+u+'px" height="'+u+'px"',d+=' viewBox="0 0 '+u+" "+u+'" ',d+=' preserveAspectRatio="xMinYMin meet"',d+=r.text||n.text?' role="img" aria-labelledby="'+y([r.id,n.id].join(" ").trim())+'"':"",d+=">",d+=r.text?'<title id="'+y(r.id)+'">'+y(r.text)+"</title>":"",d+=n.text?'<description id="'+y(n.id)+'">'+y(n.text)+"</description>":"",d+='<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>',d+='<path d="',a=0;a<l.getModuleCount();a+=1)for(s=a*e+t,i=0;i<l.getModuleCount();i+=1)l.isDark(a,i)&&(d+="M"+(i*e+t)+","+s+c);return d+='" stroke="transparent" fill="black"/>',d+="</svg>"},l.createDataURL=function(e,t){e=e||2,t=void 0===t?4*e:t;var n=l.getModuleCount()*e+2*t,r=t,o=n-t;return _(n,n,function(t,n){if(r<=t&&t<o&&r<=n&&n<o){var i=Math.floor((t-r)/e),a=Math.floor((n-r)/e);return l.isDark(a,i)?0:1}return 1})},l.createImgTag=function(e,t,n){e=e||2,t=void 0===t?4*e:t;var r=l.getModuleCount()*e+2*t,o="";return o+="<img",o+=' src="',o+=l.createDataURL(e,t),o+='"',o+=' width="',o+=r,o+='"',o+=' height="',o+=r,o+='"',n&&(o+=' alt="',o+=y(n),o+='"'),o+="/>"};var y=function(e){for(var t="",n=0;n<e.length;n+=1){var r=e.charAt(n);switch(r){case"<":t+="&lt;";break;case">":t+="&gt;";break;case"&":t+="&amp;";break;case'"':t+="&quot;";break;default:t+=r}}return t};return l.createASCII=function(e,t){if((e=e||1)<2)return function(e){e=void 0===e?2:e;var t,n,r,o,i,a=1*l.getModuleCount()+2*e,s=e,c=a-e,u={"██":"█","█ ":"▀"," █":"▄"," ":" "},d={"██":"▀","█ ":"▀"," █":" "," ":" "},h="";for(t=0;t<a;t+=2){for(r=Math.floor((t-s)/1),o=Math.floor((t+1-s)/1),n=0;n<a;n+=1)i="█",s<=n&&n<c&&s<=t&&t<c&&l.isDark(r,Math.floor((n-s)/1))&&(i=" "),s<=n&&n<c&&s<=t+1&&t+1<c&&l.isDark(o,Math.floor((n-s)/1))?i+=" ":i+="█",h+=e<1&&t+1>=c?d[i]:u[i];h+="\n"}return a%2&&e>0?h.substring(0,h.length-a-1)+Array(a+1).join("▀"):h.substring(0,h.length-1)}(t);e-=1,t=void 0===t?2*e:t;var n,r,o,i,a=l.getModuleCount()*e+2*t,s=t,c=a-t,u=Array(e+1).join("██"),d=Array(e+1).join(" "),h="",f="";for(n=0;n<a;n+=1){for(o=Math.floor((n-s)/e),f="",r=0;r<a;r+=1)i=1,s<=r&&r<c&&s<=n&&n<c&&l.isDark(o,Math.floor((r-s)/e))&&(i=0),f+=i?u:d;for(o=0;o<e;o+=1)h+=f+"\n"}return h.substring(0,h.length-1)},l.renderTo2dContext=function(e,t){t=t||2;for(var n=l.getModuleCount(),r=0;r<n;r++)for(var o=0;o<n;o++)e.fillStyle=l.isDark(r,o)?"black":"white",e.fillRect(r*t,o*t,t,t)},l};e.stringToBytes=(e.stringToBytesFuncs={default:function(e){for(var t=[],n=0;n<e.length;n+=1){var r=e.charCodeAt(n);t.push(255&r)}return t}}).default,e.createStringToBytes=function(e,t){var n=function(){for(var n=T(e),r=function(){var e=n.read();if(-1==e)throw"eof";return e},o=0,i={};;){var a=n.read();if(-1==a)break;var s=r(),l=r()<<8|r();i[String.fromCharCode(a<<8|s)]=l,o+=1}if(o!=t)throw o+" != "+t;return i}(),r="?".charCodeAt(0);return function(e){for(var t=[],o=0;o<e.length;o+=1){var i=e.charCodeAt(o);if(i<128)t.push(i);else{var a=n[e.charAt(o)];"number"==typeof a?(255&a)==a?t.push(a):(t.push(a>>>8),t.push(255&a)):t.push(r)}}return t}};var t,n,r,o,i,a=1,s=2,l=4,c=8,u={L:1,M:0,Q:3,H:2},d=0,h=1,f=2,p=3,g=4,m=5,w=6,y=7,v=(t=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],n=1335,r=7973,i=function(e){for(var t=0;0!=e;)t+=1,e>>>=1;return t},(o={}).getBCHTypeInfo=function(e){for(var t=e<<10;i(t)-i(n)>=0;)t^=n<<i(t)-i(n);return 21522^(e<<10|t)},o.getBCHTypeNumber=function(e){for(var t=e<<12;i(t)-i(r)>=0;)t^=r<<i(t)-i(r);return e<<12|t},o.getPatternPosition=function(e){return t[e-1]},o.getMaskFunction=function(e){switch(e){case d:return function(e,t){return(e+t)%2==0};case h:return function(e,t){return e%2==0};case f:return function(e,t){return t%3==0};case p:return function(e,t){return(e+t)%3==0};case g:return function(e,t){return(Math.floor(e/2)+Math.floor(t/3))%2==0};case m:return function(e,t){return e*t%2+e*t%3==0};case w:return function(e,t){return(e*t%2+e*t%3)%2==0};case y:return function(e,t){return(e*t%3+(e+t)%2)%2==0};default:throw"bad maskPattern:"+e}},o.getErrorCorrectPolynomial=function(e){for(var t=C([1],0),n=0;n<e;n+=1)t=t.multiply(C([1,b.gexp(n)],0));return t},o.getLengthInBits=function(e,t){if(1<=t&&t<10)switch(e){case a:return 10;case s:return 9;case l:case c:return 8;default:throw"mode:"+e}else if(t<27)switch(e){case a:return 12;case s:return 11;case l:return 16;case c:return 10;default:throw"mode:"+e}else{if(!(t<41))throw"type:"+t;switch(e){case a:return 14;case s:return 13;case l:return 16;case c:return 12;default:throw"mode:"+e}}},o.getLostPoint=function(e){for(var t=e.getModuleCount(),n=0,r=0;r<t;r+=1)for(var o=0;o<t;o+=1){for(var i=0,a=e.isDark(r,o),s=-1;s<=1;s+=1)if(!(r+s<0||t<=r+s))for(var l=-1;l<=1;l+=1)o+l<0||t<=o+l||0==s&&0==l||a==e.isDark(r+s,o+l)&&(i+=1);i>5&&(n+=3+i-5)}for(r=0;r<t-1;r+=1)for(o=0;o<t-1;o+=1){var c=0;e.isDark(r,o)&&(c+=1),e.isDark(r+1,o)&&(c+=1),e.isDark(r,o+1)&&(c+=1),e.isDark(r+1,o+1)&&(c+=1),0!=c&&4!=c||(n+=3)}for(r=0;r<t;r+=1)for(o=0;o<t-6;o+=1)e.isDark(r,o)&&!e.isDark(r,o+1)&&e.isDark(r,o+2)&&e.isDark(r,o+3)&&e.isDark(r,o+4)&&!e.isDark(r,o+5)&&e.isDark(r,o+6)&&(n+=40);for(o=0;o<t;o+=1)for(r=0;r<t-6;r+=1)e.isDark(r,o)&&!e.isDark(r+1,o)&&e.isDark(r+2,o)&&e.isDark(r+3,o)&&e.isDark(r+4,o)&&!e.isDark(r+5,o)&&e.isDark(r+6,o)&&(n+=40);var u=0;for(o=0;o<t;o+=1)for(r=0;r<t;r+=1)e.isDark(r,o)&&(u+=1);return n+=Math.abs(100*u/t/t-50)/5*10},o),b=function(){for(var e=new Array(256),t=new Array(256),n=0;n<8;n+=1)e[n]=1<<n;for(n=8;n<256;n+=1)e[n]=e[n-4]^e[n-5]^e[n-6]^e[n-8];for(n=0;n<255;n+=1)t[e[n]]=n;var r={glog:function(e){if(e<1)throw"glog("+e+")";return t[e]},gexp:function(t){for(;t<0;)t+=255;for(;t>=256;)t-=255;return e[t]}};return r}();function C(e,t){if(void 0===e.length)throw e.length+"/"+t;var n=function(){for(var n=0;n<e.length&&0==e[n];)n+=1;for(var r=new Array(e.length-n+t),o=0;o<e.length-n;o+=1)r[o]=e[o+n];return r}(),r={getAt:function(e){return n[e]},getLength:function(){return n.length},multiply:function(e){for(var t=new Array(r.getLength()+e.getLength()-1),n=0;n<r.getLength();n+=1)for(var o=0;o<e.getLength();o+=1)t[n+o]^=b.gexp(b.glog(r.getAt(n))+b.glog(e.getAt(o)));return C(t,0)},mod:function(e){if(r.getLength()-e.getLength()<0)return r;for(var t=b.glog(r.getAt(0))-b.glog(e.getAt(0)),n=new Array(r.getLength()),o=0;o<r.getLength();o+=1)n[o]=r.getAt(o);for(o=0;o<e.getLength();o+=1)n[o]^=b.gexp(b.glog(e.getAt(o))+t);return C(n,0).mod(e)}};return r}var x=function(){var e=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12,7,37,13],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],t=function(e,t){var n={};return n.totalCount=e,n.dataCount=t,n},n={getRSBlocks:function(n,r){var o=function(t,n){switch(n){case u.L:return e[4*(t-1)+0];case u.M:return e[4*(t-1)+1];case u.Q:return e[4*(t-1)+2];case u.H:return e[4*(t-1)+3];default:return}}(n,r);if(void 0===o)throw"bad rs block @ typeNumber:"+n+"/errorCorrectionLevel:"+r;for(var i=o.length/3,a=[],s=0;s<i;s+=1)for(var l=o[3*s+0],c=o[3*s+1],d=o[3*s+2],h=0;h<l;h+=1)a.push(t(c,d));return a}};return n}(),S=function(){var e=[],t=0,n={getBuffer:function(){return e},getAt:function(t){var n=Math.floor(t/8);return 1==(e[n]>>>7-t%8&1)},put:function(e,t){for(var r=0;r<t;r+=1)n.putBit(1==(e>>>t-r-1&1))},getLengthInBits:function(){return t},putBit:function(n){var r=Math.floor(t/8);e.length<=r&&e.push(0),n&&(e[r]|=128>>>t%8),t+=1}};return n},k=function(e){var t=a,n=e,r={getMode:function(){return t},getLength:function(e){return n.length},write:function(e){for(var t=n,r=0;r+2<t.length;)e.put(o(t.substring(r,r+3)),10),r+=3;r<t.length&&(t.length-r==1?e.put(o(t.substring(r,r+1)),4):t.length-r==2&&e.put(o(t.substring(r,r+2)),7))}},o=function(e){for(var t=0,n=0;n<e.length;n+=1)t=10*t+i(e.charAt(n));return t},i=function(e){if("0"<=e&&e<="9")return e.charCodeAt(0)-"0".charCodeAt(0);throw"illegal char :"+e};return r},R=function(e){var t=s,n=e,r={getMode:function(){return t},getLength:function(e){return n.length},write:function(e){for(var t=n,r=0;r+1<t.length;)e.put(45*o(t.charAt(r))+o(t.charAt(r+1)),11),r+=2;r<t.length&&e.put(o(t.charAt(r)),6)}},o=function(e){if("0"<=e&&e<="9")return e.charCodeAt(0)-"0".charCodeAt(0);if("A"<=e&&e<="Z")return e.charCodeAt(0)-"A".charCodeAt(0)+10;switch(e){case" ":return 36;case"$":return 37;case"%":return 38;case"*":return 39;case"+":return 40;case"-":return 41;case".":return 42;case"/":return 43;case":":return 44;default:throw"illegal char :"+e}};return r},E=function(t){var n=l,r=e.stringToBytes(t),o={getMode:function(){return n},getLength:function(e){return r.length},write:function(e){for(var t=0;t<r.length;t+=1)e.put(r[t],8)}};return o},A=function(t){var n=c,r=e.stringToBytesFuncs.SJIS;if(!r)throw"sjis not supported.";!function(){var e=r("友");if(2!=e.length||38726!=(e[0]<<8|e[1]))throw"sjis not supported."}();var o=r(t),i={getMode:function(){return n},getLength:function(e){return~~(o.length/2)},write:function(e){for(var t=o,n=0;n+1<t.length;){var r=(255&t[n])<<8|255&t[n+1];if(33088<=r&&r<=40956)r-=33088;else{if(!(57408<=r&&r<=60351))throw"illegal char at "+(n+1)+"/"+r;r-=49472}r=192*(r>>>8&255)+(255&r),e.put(r,13),n+=2}if(n<t.length)throw"illegal char at "+(n+1)}};return i},M=function(){var e=[],t={writeByte:function(t){e.push(255&t)},writeShort:function(e){t.writeByte(e),t.writeByte(e>>>8)},writeBytes:function(e,n,r){n=n||0,r=r||e.length;for(var o=0;o<r;o+=1)t.writeByte(e[o+n])},writeString:function(e){for(var n=0;n<e.length;n+=1)t.writeByte(e.charCodeAt(n))},toByteArray:function(){return e},toString:function(){var t="";t+="[";for(var n=0;n<e.length;n+=1)n>0&&(t+=","),t+=e[n];return t+="]"}};return t},T=function(e){var t=e,n=0,r=0,o=0,i={read:function(){for(;o<8;){if(n>=t.length){if(0==o)return-1;throw"unexpected end of file./"+o}var e=t.charAt(n);if(n+=1,"="==e)return o=0,-1;e.match(/^\s$/)||(r=r<<6|a(e.charCodeAt(0)),o+=6)}var i=r>>>o-8&255;return o-=8,i}},a=function(e){if(65<=e&&e<=90)return e-65;if(97<=e&&e<=122)return e-97+26;if(48<=e&&e<=57)return e-48+52;if(43==e)return 62;if(47==e)return 63;throw"c:"+e};return i},_=function(e,t,n){for(var r=function(e,t){var n=e,r=t,o=new Array(e*t),i={setPixel:function(e,t,r){o[t*n+e]=r},write:function(e){e.writeString("GIF87a"),e.writeShort(n),e.writeShort(r),e.writeByte(128),e.writeByte(0),e.writeByte(0),e.writeByte(0),e.writeByte(0),e.writeByte(0),e.writeByte(255),e.writeByte(255),e.writeByte(255),e.writeString(","),e.writeShort(0),e.writeShort(0),e.writeShort(n),e.writeShort(r),e.writeByte(0);var t=a(2);e.writeByte(2);for(var o=0;t.length-o>255;)e.writeByte(255),e.writeBytes(t,o,255),o+=255;e.writeByte(t.length-o),e.writeBytes(t,o,t.length-o),e.writeByte(0),e.writeString(";")}},a=function(e){for(var t=1<<e,n=1+(1<<e),r=e+1,i=s(),a=0;a<t;a+=1)i.add(String.fromCharCode(a));i.add(String.fromCharCode(t)),i.add(String.fromCharCode(n));var l,c,u,d=M(),h=(l=d,c=0,u=0,{write:function(e,t){if(e>>>t!=0)throw"length over";for(;c+t>=8;)l.writeByte(255&(e<<c|u)),t-=8-c,e>>>=8-c,u=0,c=0;u|=e<<c,c+=t},flush:function(){c>0&&l.writeByte(u)}});h.write(t,r);var f=0,p=String.fromCharCode(o[f]);for(f+=1;f<o.length;){var g=String.fromCharCode(o[f]);f+=1,i.contains(p+g)?p+=g:(h.write(i.indexOf(p),r),i.size()<4095&&(i.size()==1<<r&&(r+=1),i.add(p+g)),p=g)}return h.write(i.indexOf(p),r),h.write(n,r),h.flush(),d.toByteArray()},s=function(){var e={},t=0,n={add:function(r){if(n.contains(r))throw"dup key:"+r;e[r]=t,t+=1},size:function(){return t},indexOf:function(t){return e[t]},contains:function(t){return void 0!==e[t]}};return n};return i}(e,t),o=0;o<t;o+=1)for(var i=0;i<e;i+=1)r.setPixel(i,o,n(i,o));var a=M();r.write(a);for(var s=function(){var e=0,t=0,n=0,r="",o={},i=function(e){r+=String.fromCharCode(a(63&e))},a=function(e){if(e<0);else{if(e<26)return 65+e;if(e<52)return e-26+97;if(e<62)return e-52+48;if(62==e)return 43;if(63==e)return 47}throw"n:"+e};return o.writeByte=function(r){for(e=e<<8|255&r,t+=8,n+=1;t>=6;)i(e>>>t-6),t-=6},o.flush=function(){if(t>0&&(i(e<<6-t),e=0,t=0),n%3!=0)for(var o=3-n%3,a=0;a<o;a+=1)r+="="},o.toString=function(){return r},o}(),l=a.toByteArray(),c=0;c<l.length;c+=1)s.writeByte(l[c]);return s.flush(),"data:image/gif;base64,"+s};return e}();t.stringToBytesFuncs["UTF-8"]=function(e){return function(e){for(var t=[],n=0;n<e.length;n++){var r=e.charCodeAt(n);r<128?t.push(r):r<2048?t.push(192|r>>6,128|63&r):r<55296||r>=57344?t.push(224|r>>12,128|r>>6&63,128|63&r):(n++,r=65536+((1023&r)<<10|1023&e.charCodeAt(n)),t.push(240|r>>18,128|r>>12&63,128|r>>6&63,128|63&r))}return t}(e)},e.exports=t}(Ma)),Ma.exports);const _a=b(Ta);function Oa(e){return v(this,null,function*(){try{if(!(null==navigator?void 0:navigator.clipboard))throw new zr("Clipboard API not available");return yield navigator.clipboard.writeText(e)}catch(rf){}!function(e){const t=document.createElement("textarea");t.value=e,t.style.top="0",t.style.left="0",t.style.position="fixed",document.body.appendChild(t),t.focus(),t.select();try{document.execCommand("copy")}finally{document.body.removeChild(t)}}(e)})}var La=rr("<div>");const Na=e=>{let t,n,r;const[o,i]=Jt(!1),[a,s]=Jt(48);tn(()=>{const o=_a(0,"L");o.addData(e.sourceUrl),o.make(),t.innerHTML=o.createSvgTag(4,0);const i=t.firstElementChild.clientWidth,a=Math.round(256/i*1e5)/1e5;if(r){const e=4*Math.ceil(60/(4*a)),t=Br(4*Math.ceil((i-e)/8));r.style.top=t,r.style.left=t,r.style.height=Br(e),r.style.width=Br(e),s(Math.round(48/a))}n.style.transform=`scale(${a})`});let l=null;return Pn(xa,{get class(){return e.class},onClick:()=>{i(!0),Oa(e.sourceUrl),null!=l&&clearTimeout(l),l=setTimeout(()=>i(!1),1500)},get children(){return[Pn(Sa,{ref(e){"function"==typeof n?n(e):n=e},get children(){return[(n=La(),"function"==typeof t?sr(t,n):t=n,n),Pn(Fn,{get when(){return e.imageUrl},get children(){return Pn(ka,{ref(e){"function"==typeof r?r(e):r=e},get children(){return Pn(Ra,{get src(){return e.imageUrl},alt:"",get size(){return a()}})}})}})];var n}}),Pn(Bi,{onBeforeEnter:e=>{sa(e,[{opacity:0,transform:"translate(-50%, 44px)"},{opacity:1,transform:"translate(-50%, 0)"}],{duration:150,easing:"ease-out"})},onExit:(e,t)=>{sa(e,[{opacity:1,transform:"translate(-50%, 0)"},{opacity:0,transform:"translate(-50%, 44px)"}],{duration:150,easing:"ease-out"}).finished.then(()=>{t()})},get children(){return Pn(Fn,{get when(){return o()&&!e.disableCopy},get children(){return Pn(Ea,{get children(){return[Pn(us,{size:"xs"}),Pn(ja,{translationKey:"common.linkCopied",children:"Link Copied"})]}})}})}}),Pn(Fn,{get when(){return!e.disableCopy},get children(){return Pn(Ca,{get children(){return Pn(Hs,{})}})}})]}})};var Ia=(e,t,n)=>{const r=t.trim().split(".").reduce((e,t)=>e?e[t]:void 0,e);return void 0!==r?r:n},Wa=(e={},t=(navigator.language in e?navigator.language:Object.keys(e)[0]))=>{const[n,r]=Jt(t),[o,i]=$o(e);return[(e,t,r)=>{const i=Ia(o[n()],e,r||"");return"function"==typeof i?i(t):"string"==typeof i?((e,t,n=/{{(.*?)}}/g)=>e.replace(n,(e,n)=>Ia(t,n,"")))(i,t||{}):i},{add(e,t){i(e,e=>Object.assign(e||{},t))},locale:e=>e?r(e):n(),dict:e=>Ia(o,e)}]},Pa=mn({}),Ua=()=>wn(Pa);const Da=Nr.div`
312
+ `;var Oa,La={exports:{}};var Ia=(Oa||(Oa=1,function(e){var t=function(){var e=function(e,t){var n=e,r=u[t],o=null,i=0,a=null,s=[],l={},c=function(e,t){o=function(e){for(var t=new Array(e),n=0;n<e;n+=1){t[n]=new Array(e);for(var r=0;r<e;r+=1)t[n][r]=null}return t}(i=4*n+17),d(0,0),d(i-7,0),d(0,i-7),f(),h(),g(e,t),n>=7&&p(e),null==a&&(a=w(n,r,s)),m(a,t)},d=function(e,t){for(var n=-1;n<=7;n+=1)if(!(e+n<=-1||i<=e+n))for(var r=-1;r<=7;r+=1)t+r<=-1||i<=t+r||(o[e+n][t+r]=0<=n&&n<=6&&(0==r||6==r)||0<=r&&r<=6&&(0==n||6==n)||2<=n&&n<=4&&2<=r&&r<=4)},h=function(){for(var e=8;e<i-8;e+=1)null==o[e][6]&&(o[e][6]=e%2==0);for(var t=8;t<i-8;t+=1)null==o[6][t]&&(o[6][t]=t%2==0)},f=function(){for(var e=v.getPatternPosition(n),t=0;t<e.length;t+=1)for(var r=0;r<e.length;r+=1){var i=e[t],a=e[r];if(null==o[i][a])for(var s=-2;s<=2;s+=1)for(var l=-2;l<=2;l+=1)o[i+s][a+l]=-2==s||2==s||-2==l||2==l||0==s&&0==l}},p=function(e){for(var t=v.getBCHTypeNumber(n),r=0;r<18;r+=1){var a=!e&&1==(t>>r&1);o[Math.floor(r/3)][r%3+i-8-3]=a}for(r=0;r<18;r+=1)a=!e&&1==(t>>r&1),o[r%3+i-8-3][Math.floor(r/3)]=a},g=function(e,t){for(var n=r<<3|t,a=v.getBCHTypeInfo(n),s=0;s<15;s+=1){var l=!e&&1==(a>>s&1);s<6?o[s][8]=l:s<8?o[s+1][8]=l:o[i-15+s][8]=l}for(s=0;s<15;s+=1)l=!e&&1==(a>>s&1),s<8?o[8][i-s-1]=l:s<9?o[8][15-s-1+1]=l:o[8][15-s-1]=l;o[i-8][8]=!e},m=function(e,t){for(var n=-1,r=i-1,a=7,s=0,l=v.getMaskFunction(t),c=i-1;c>0;c-=2)for(6==c&&(c-=1);;){for(var u=0;u<2;u+=1)if(null==o[r][c-u]){var d=!1;s<e.length&&(d=1==(e[s]>>>a&1)),l(r,c-u)&&(d=!d),o[r][c-u]=d,-1==(a-=1)&&(s+=1,a=7)}if((r+=n)<0||i<=r){r-=n,n=-n;break}}},w=function(e,t,n){for(var r=x.getRSBlocks(e,t),o=S(),i=0;i<n.length;i+=1){var a=n[i];o.put(a.getMode(),4),o.put(a.getLength(),v.getLengthInBits(a.getMode(),e)),a.write(o)}var s=0;for(i=0;i<r.length;i+=1)s+=r[i].dataCount;if(o.getLengthInBits()>8*s)throw"code length overflow. ("+o.getLengthInBits()+">"+8*s+")";for(o.getLengthInBits()+4<=8*s&&o.put(0,4);o.getLengthInBits()%8!=0;)o.putBit(!1);for(;!(o.getLengthInBits()>=8*s||(o.put(236,8),o.getLengthInBits()>=8*s));)o.put(17,8);return function(e,t){for(var n=0,r=0,o=0,i=new Array(t.length),a=new Array(t.length),s=0;s<t.length;s+=1){var l=t[s].dataCount,c=t[s].totalCount-l;r=Math.max(r,l),o=Math.max(o,c),i[s]=new Array(l);for(var u=0;u<i[s].length;u+=1)i[s][u]=255&e.getBuffer()[u+n];n+=l;var d=v.getErrorCorrectPolynomial(c),h=C(i[s],d.getLength()-1).mod(d);for(a[s]=new Array(d.getLength()-1),u=0;u<a[s].length;u+=1){var f=u+h.getLength()-a[s].length;a[s][u]=f>=0?h.getAt(f):0}}var p=0;for(u=0;u<t.length;u+=1)p+=t[u].totalCount;var g=new Array(p),m=0;for(u=0;u<r;u+=1)for(s=0;s<t.length;s+=1)u<i[s].length&&(g[m]=i[s][u],m+=1);for(u=0;u<o;u+=1)for(s=0;s<t.length;s+=1)u<a[s].length&&(g[m]=a[s][u],m+=1);return g}(o,r)};l.addData=function(e,t){var n=null;switch(t=t||"Byte"){case"Numeric":n=k(e);break;case"Alphanumeric":n=R(e);break;case"Byte":n=E(e);break;case"Kanji":n=T(e);break;default:throw"mode:"+t}s.push(n),a=null},l.isDark=function(e,t){if(e<0||i<=e||t<0||i<=t)throw e+","+t;return o[e][t]},l.getModuleCount=function(){return i},l.make=function(){if(n<1){for(var e=1;e<40;e++){for(var t=x.getRSBlocks(e,r),o=S(),i=0;i<s.length;i++){var a=s[i];o.put(a.getMode(),4),o.put(a.getLength(),v.getLengthInBits(a.getMode(),e)),a.write(o)}var u=0;for(i=0;i<t.length;i++)u+=t[i].dataCount;if(o.getLengthInBits()<=8*u)break}n=e}c(!1,function(){for(var e=0,t=0,n=0;n<8;n+=1){c(!0,n);var r=v.getLostPoint(l);(0==n||e>r)&&(e=r,t=n)}return t}())},l.createTableTag=function(e,t){e=e||2;var n="";n+='<table style="',n+=" border-width: 0px; border-style: none;",n+=" border-collapse: collapse;",n+=" padding: 0px; margin: "+(t=void 0===t?4*e:t)+"px;",n+='">',n+="<tbody>";for(var r=0;r<l.getModuleCount();r+=1){n+="<tr>";for(var o=0;o<l.getModuleCount();o+=1)n+='<td style="',n+=" border-width: 0px; border-style: none;",n+=" border-collapse: collapse;",n+=" padding: 0px; margin: 0px;",n+=" width: "+e+"px;",n+=" height: "+e+"px;",n+=" background-color: ",n+=l.isDark(r,o)?"#000000":"#ffffff",n+=";",n+='"/>';n+="</tr>"}return n+="</tbody>",n+="</table>"},l.createSvgTag=function(e,t,n,r){var o={};"object"==typeof arguments[0]&&(e=(o=arguments[0]).cellSize,t=o.margin,n=o.alt,r=o.title),e=e||2,t=void 0===t?4*e:t,(n="string"==typeof n?{text:n}:n||{}).text=n.text||null,n.id=n.text?n.id||"qrcode-description":null,(r="string"==typeof r?{text:r}:r||{}).text=r.text||null,r.id=r.text?r.id||"qrcode-title":null;var i,a,s,c,u=l.getModuleCount()*e+2*t,d="";for(c="l"+e+",0 0,"+e+" -"+e+",0 0,-"+e+"z ",d+='<svg version="1.1" xmlns="http://www.w3.org/2000/svg"',d+=o.scalable?"":' width="'+u+'px" height="'+u+'px"',d+=' viewBox="0 0 '+u+" "+u+'" ',d+=' preserveAspectRatio="xMinYMin meet"',d+=r.text||n.text?' role="img" aria-labelledby="'+y([r.id,n.id].join(" ").trim())+'"':"",d+=">",d+=r.text?'<title id="'+y(r.id)+'">'+y(r.text)+"</title>":"",d+=n.text?'<description id="'+y(n.id)+'">'+y(n.text)+"</description>":"",d+='<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>',d+='<path d="',a=0;a<l.getModuleCount();a+=1)for(s=a*e+t,i=0;i<l.getModuleCount();i+=1)l.isDark(a,i)&&(d+="M"+(i*e+t)+","+s+c);return d+='" stroke="transparent" fill="black"/>',d+="</svg>"},l.createDataURL=function(e,t){e=e||2,t=void 0===t?4*e:t;var n=l.getModuleCount()*e+2*t,r=t,o=n-t;return _(n,n,function(t,n){if(r<=t&&t<o&&r<=n&&n<o){var i=Math.floor((t-r)/e),a=Math.floor((n-r)/e);return l.isDark(a,i)?0:1}return 1})},l.createImgTag=function(e,t,n){e=e||2,t=void 0===t?4*e:t;var r=l.getModuleCount()*e+2*t,o="";return o+="<img",o+=' src="',o+=l.createDataURL(e,t),o+='"',o+=' width="',o+=r,o+='"',o+=' height="',o+=r,o+='"',n&&(o+=' alt="',o+=y(n),o+='"'),o+="/>"};var y=function(e){for(var t="",n=0;n<e.length;n+=1){var r=e.charAt(n);switch(r){case"<":t+="&lt;";break;case">":t+="&gt;";break;case"&":t+="&amp;";break;case'"':t+="&quot;";break;default:t+=r}}return t};return l.createASCII=function(e,t){if((e=e||1)<2)return function(e){e=void 0===e?2:e;var t,n,r,o,i,a=1*l.getModuleCount()+2*e,s=e,c=a-e,u={"██":"█","█ ":"▀"," █":"▄"," ":" "},d={"██":"▀","█ ":"▀"," █":" "," ":" "},h="";for(t=0;t<a;t+=2){for(r=Math.floor((t-s)/1),o=Math.floor((t+1-s)/1),n=0;n<a;n+=1)i="█",s<=n&&n<c&&s<=t&&t<c&&l.isDark(r,Math.floor((n-s)/1))&&(i=" "),s<=n&&n<c&&s<=t+1&&t+1<c&&l.isDark(o,Math.floor((n-s)/1))?i+=" ":i+="█",h+=e<1&&t+1>=c?d[i]:u[i];h+="\n"}return a%2&&e>0?h.substring(0,h.length-a-1)+Array(a+1).join("▀"):h.substring(0,h.length-1)}(t);e-=1,t=void 0===t?2*e:t;var n,r,o,i,a=l.getModuleCount()*e+2*t,s=t,c=a-t,u=Array(e+1).join("██"),d=Array(e+1).join(" "),h="",f="";for(n=0;n<a;n+=1){for(o=Math.floor((n-s)/e),f="",r=0;r<a;r+=1)i=1,s<=r&&r<c&&s<=n&&n<c&&l.isDark(o,Math.floor((r-s)/e))&&(i=0),f+=i?u:d;for(o=0;o<e;o+=1)h+=f+"\n"}return h.substring(0,h.length-1)},l.renderTo2dContext=function(e,t){t=t||2;for(var n=l.getModuleCount(),r=0;r<n;r++)for(var o=0;o<n;o++)e.fillStyle=l.isDark(r,o)?"black":"white",e.fillRect(r*t,o*t,t,t)},l};e.stringToBytes=(e.stringToBytesFuncs={default:function(e){for(var t=[],n=0;n<e.length;n+=1){var r=e.charCodeAt(n);t.push(255&r)}return t}}).default,e.createStringToBytes=function(e,t){var n=function(){for(var n=M(e),r=function(){var e=n.read();if(-1==e)throw"eof";return e},o=0,i={};;){var a=n.read();if(-1==a)break;var s=r(),l=r()<<8|r();i[String.fromCharCode(a<<8|s)]=l,o+=1}if(o!=t)throw o+" != "+t;return i}(),r="?".charCodeAt(0);return function(e){for(var t=[],o=0;o<e.length;o+=1){var i=e.charCodeAt(o);if(i<128)t.push(i);else{var a=n[e.charAt(o)];"number"==typeof a?(255&a)==a?t.push(a):(t.push(a>>>8),t.push(255&a)):t.push(r)}}return t}};var t,n,r,o,i,a=1,s=2,l=4,c=8,u={L:1,M:0,Q:3,H:2},d=0,h=1,f=2,p=3,g=4,m=5,w=6,y=7,v=(t=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],n=1335,r=7973,i=function(e){for(var t=0;0!=e;)t+=1,e>>>=1;return t},(o={}).getBCHTypeInfo=function(e){for(var t=e<<10;i(t)-i(n)>=0;)t^=n<<i(t)-i(n);return 21522^(e<<10|t)},o.getBCHTypeNumber=function(e){for(var t=e<<12;i(t)-i(r)>=0;)t^=r<<i(t)-i(r);return e<<12|t},o.getPatternPosition=function(e){return t[e-1]},o.getMaskFunction=function(e){switch(e){case d:return function(e,t){return(e+t)%2==0};case h:return function(e,t){return e%2==0};case f:return function(e,t){return t%3==0};case p:return function(e,t){return(e+t)%3==0};case g:return function(e,t){return(Math.floor(e/2)+Math.floor(t/3))%2==0};case m:return function(e,t){return e*t%2+e*t%3==0};case w:return function(e,t){return(e*t%2+e*t%3)%2==0};case y:return function(e,t){return(e*t%3+(e+t)%2)%2==0};default:throw"bad maskPattern:"+e}},o.getErrorCorrectPolynomial=function(e){for(var t=C([1],0),n=0;n<e;n+=1)t=t.multiply(C([1,b.gexp(n)],0));return t},o.getLengthInBits=function(e,t){if(1<=t&&t<10)switch(e){case a:return 10;case s:return 9;case l:case c:return 8;default:throw"mode:"+e}else if(t<27)switch(e){case a:return 12;case s:return 11;case l:return 16;case c:return 10;default:throw"mode:"+e}else{if(!(t<41))throw"type:"+t;switch(e){case a:return 14;case s:return 13;case l:return 16;case c:return 12;default:throw"mode:"+e}}},o.getLostPoint=function(e){for(var t=e.getModuleCount(),n=0,r=0;r<t;r+=1)for(var o=0;o<t;o+=1){for(var i=0,a=e.isDark(r,o),s=-1;s<=1;s+=1)if(!(r+s<0||t<=r+s))for(var l=-1;l<=1;l+=1)o+l<0||t<=o+l||0==s&&0==l||a==e.isDark(r+s,o+l)&&(i+=1);i>5&&(n+=3+i-5)}for(r=0;r<t-1;r+=1)for(o=0;o<t-1;o+=1){var c=0;e.isDark(r,o)&&(c+=1),e.isDark(r+1,o)&&(c+=1),e.isDark(r,o+1)&&(c+=1),e.isDark(r+1,o+1)&&(c+=1),0!=c&&4!=c||(n+=3)}for(r=0;r<t;r+=1)for(o=0;o<t-6;o+=1)e.isDark(r,o)&&!e.isDark(r,o+1)&&e.isDark(r,o+2)&&e.isDark(r,o+3)&&e.isDark(r,o+4)&&!e.isDark(r,o+5)&&e.isDark(r,o+6)&&(n+=40);for(o=0;o<t;o+=1)for(r=0;r<t-6;r+=1)e.isDark(r,o)&&!e.isDark(r+1,o)&&e.isDark(r+2,o)&&e.isDark(r+3,o)&&e.isDark(r+4,o)&&!e.isDark(r+5,o)&&e.isDark(r+6,o)&&(n+=40);var u=0;for(o=0;o<t;o+=1)for(r=0;r<t;r+=1)e.isDark(r,o)&&(u+=1);return n+=Math.abs(100*u/t/t-50)/5*10},o),b=function(){for(var e=new Array(256),t=new Array(256),n=0;n<8;n+=1)e[n]=1<<n;for(n=8;n<256;n+=1)e[n]=e[n-4]^e[n-5]^e[n-6]^e[n-8];for(n=0;n<255;n+=1)t[e[n]]=n;var r={glog:function(e){if(e<1)throw"glog("+e+")";return t[e]},gexp:function(t){for(;t<0;)t+=255;for(;t>=256;)t-=255;return e[t]}};return r}();function C(e,t){if(void 0===e.length)throw e.length+"/"+t;var n=function(){for(var n=0;n<e.length&&0==e[n];)n+=1;for(var r=new Array(e.length-n+t),o=0;o<e.length-n;o+=1)r[o]=e[o+n];return r}(),r={getAt:function(e){return n[e]},getLength:function(){return n.length},multiply:function(e){for(var t=new Array(r.getLength()+e.getLength()-1),n=0;n<r.getLength();n+=1)for(var o=0;o<e.getLength();o+=1)t[n+o]^=b.gexp(b.glog(r.getAt(n))+b.glog(e.getAt(o)));return C(t,0)},mod:function(e){if(r.getLength()-e.getLength()<0)return r;for(var t=b.glog(r.getAt(0))-b.glog(e.getAt(0)),n=new Array(r.getLength()),o=0;o<r.getLength();o+=1)n[o]=r.getAt(o);for(o=0;o<e.getLength();o+=1)n[o]^=b.gexp(b.glog(e.getAt(o))+t);return C(n,0).mod(e)}};return r}var x=function(){var e=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12,7,37,13],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],t=function(e,t){var n={};return n.totalCount=e,n.dataCount=t,n},n={getRSBlocks:function(n,r){var o=function(t,n){switch(n){case u.L:return e[4*(t-1)+0];case u.M:return e[4*(t-1)+1];case u.Q:return e[4*(t-1)+2];case u.H:return e[4*(t-1)+3];default:return}}(n,r);if(void 0===o)throw"bad rs block @ typeNumber:"+n+"/errorCorrectionLevel:"+r;for(var i=o.length/3,a=[],s=0;s<i;s+=1)for(var l=o[3*s+0],c=o[3*s+1],d=o[3*s+2],h=0;h<l;h+=1)a.push(t(c,d));return a}};return n}(),S=function(){var e=[],t=0,n={getBuffer:function(){return e},getAt:function(t){var n=Math.floor(t/8);return 1==(e[n]>>>7-t%8&1)},put:function(e,t){for(var r=0;r<t;r+=1)n.putBit(1==(e>>>t-r-1&1))},getLengthInBits:function(){return t},putBit:function(n){var r=Math.floor(t/8);e.length<=r&&e.push(0),n&&(e[r]|=128>>>t%8),t+=1}};return n},k=function(e){var t=a,n=e,r={getMode:function(){return t},getLength:function(e){return n.length},write:function(e){for(var t=n,r=0;r+2<t.length;)e.put(o(t.substring(r,r+3)),10),r+=3;r<t.length&&(t.length-r==1?e.put(o(t.substring(r,r+1)),4):t.length-r==2&&e.put(o(t.substring(r,r+2)),7))}},o=function(e){for(var t=0,n=0;n<e.length;n+=1)t=10*t+i(e.charAt(n));return t},i=function(e){if("0"<=e&&e<="9")return e.charCodeAt(0)-"0".charCodeAt(0);throw"illegal char :"+e};return r},R=function(e){var t=s,n=e,r={getMode:function(){return t},getLength:function(e){return n.length},write:function(e){for(var t=n,r=0;r+1<t.length;)e.put(45*o(t.charAt(r))+o(t.charAt(r+1)),11),r+=2;r<t.length&&e.put(o(t.charAt(r)),6)}},o=function(e){if("0"<=e&&e<="9")return e.charCodeAt(0)-"0".charCodeAt(0);if("A"<=e&&e<="Z")return e.charCodeAt(0)-"A".charCodeAt(0)+10;switch(e){case" ":return 36;case"$":return 37;case"%":return 38;case"*":return 39;case"+":return 40;case"-":return 41;case".":return 42;case"/":return 43;case":":return 44;default:throw"illegal char :"+e}};return r},E=function(t){var n=l,r=e.stringToBytes(t),o={getMode:function(){return n},getLength:function(e){return r.length},write:function(e){for(var t=0;t<r.length;t+=1)e.put(r[t],8)}};return o},T=function(t){var n=c,r=e.stringToBytesFuncs.SJIS;if(!r)throw"sjis not supported.";!function(){var e=r("友");if(2!=e.length||38726!=(e[0]<<8|e[1]))throw"sjis not supported."}();var o=r(t),i={getMode:function(){return n},getLength:function(e){return~~(o.length/2)},write:function(e){for(var t=o,n=0;n+1<t.length;){var r=(255&t[n])<<8|255&t[n+1];if(33088<=r&&r<=40956)r-=33088;else{if(!(57408<=r&&r<=60351))throw"illegal char at "+(n+1)+"/"+r;r-=49472}r=192*(r>>>8&255)+(255&r),e.put(r,13),n+=2}if(n<t.length)throw"illegal char at "+(n+1)}};return i},A=function(){var e=[],t={writeByte:function(t){e.push(255&t)},writeShort:function(e){t.writeByte(e),t.writeByte(e>>>8)},writeBytes:function(e,n,r){n=n||0,r=r||e.length;for(var o=0;o<r;o+=1)t.writeByte(e[o+n])},writeString:function(e){for(var n=0;n<e.length;n+=1)t.writeByte(e.charCodeAt(n))},toByteArray:function(){return e},toString:function(){var t="";t+="[";for(var n=0;n<e.length;n+=1)n>0&&(t+=","),t+=e[n];return t+="]"}};return t},M=function(e){var t=e,n=0,r=0,o=0,i={read:function(){for(;o<8;){if(n>=t.length){if(0==o)return-1;throw"unexpected end of file./"+o}var e=t.charAt(n);if(n+=1,"="==e)return o=0,-1;e.match(/^\s$/)||(r=r<<6|a(e.charCodeAt(0)),o+=6)}var i=r>>>o-8&255;return o-=8,i}},a=function(e){if(65<=e&&e<=90)return e-65;if(97<=e&&e<=122)return e-97+26;if(48<=e&&e<=57)return e-48+52;if(43==e)return 62;if(47==e)return 63;throw"c:"+e};return i},_=function(e,t,n){for(var r=function(e,t){var n=e,r=t,o=new Array(e*t),i={setPixel:function(e,t,r){o[t*n+e]=r},write:function(e){e.writeString("GIF87a"),e.writeShort(n),e.writeShort(r),e.writeByte(128),e.writeByte(0),e.writeByte(0),e.writeByte(0),e.writeByte(0),e.writeByte(0),e.writeByte(255),e.writeByte(255),e.writeByte(255),e.writeString(","),e.writeShort(0),e.writeShort(0),e.writeShort(n),e.writeShort(r),e.writeByte(0);var t=a(2);e.writeByte(2);for(var o=0;t.length-o>255;)e.writeByte(255),e.writeBytes(t,o,255),o+=255;e.writeByte(t.length-o),e.writeBytes(t,o,t.length-o),e.writeByte(0),e.writeString(";")}},a=function(e){for(var t=1<<e,n=1+(1<<e),r=e+1,i=s(),a=0;a<t;a+=1)i.add(String.fromCharCode(a));i.add(String.fromCharCode(t)),i.add(String.fromCharCode(n));var l,c,u,d=A(),h=(l=d,c=0,u=0,{write:function(e,t){if(e>>>t!=0)throw"length over";for(;c+t>=8;)l.writeByte(255&(e<<c|u)),t-=8-c,e>>>=8-c,u=0,c=0;u|=e<<c,c+=t},flush:function(){c>0&&l.writeByte(u)}});h.write(t,r);var f=0,p=String.fromCharCode(o[f]);for(f+=1;f<o.length;){var g=String.fromCharCode(o[f]);f+=1,i.contains(p+g)?p+=g:(h.write(i.indexOf(p),r),i.size()<4095&&(i.size()==1<<r&&(r+=1),i.add(p+g)),p=g)}return h.write(i.indexOf(p),r),h.write(n,r),h.flush(),d.toByteArray()},s=function(){var e={},t=0,n={add:function(r){if(n.contains(r))throw"dup key:"+r;e[r]=t,t+=1},size:function(){return t},indexOf:function(t){return e[t]},contains:function(t){return void 0!==e[t]}};return n};return i}(e,t),o=0;o<t;o+=1)for(var i=0;i<e;i+=1)r.setPixel(i,o,n(i,o));var a=A();r.write(a);for(var s=function(){var e=0,t=0,n=0,r="",o={},i=function(e){r+=String.fromCharCode(a(63&e))},a=function(e){if(e<0);else{if(e<26)return 65+e;if(e<52)return e-26+97;if(e<62)return e-52+48;if(62==e)return 43;if(63==e)return 47}throw"n:"+e};return o.writeByte=function(r){for(e=e<<8|255&r,t+=8,n+=1;t>=6;)i(e>>>t-6),t-=6},o.flush=function(){if(t>0&&(i(e<<6-t),e=0,t=0),n%3!=0)for(var o=3-n%3,a=0;a<o;a+=1)r+="="},o.toString=function(){return r},o}(),l=a.toByteArray(),c=0;c<l.length;c+=1)s.writeByte(l[c]);return s.flush(),"data:image/gif;base64,"+s};return e}();t.stringToBytesFuncs["UTF-8"]=function(e){return function(e){for(var t=[],n=0;n<e.length;n++){var r=e.charCodeAt(n);r<128?t.push(r):r<2048?t.push(192|r>>6,128|63&r):r<55296||r>=57344?t.push(224|r>>12,128|r>>6&63,128|63&r):(n++,r=65536+((1023&r)<<10|1023&e.charCodeAt(n)),t.push(240|r>>18,128|r>>12&63,128|r>>6&63,128|63&r))}return t}(e)},e.exports=t}(La)),La.exports);const Na=b(Ia);function Wa(e){return v(this,null,function*(){try{if(!(null==navigator?void 0:navigator.clipboard))throw new Qr("Clipboard API not available");return yield navigator.clipboard.writeText(e)}catch(df){}!function(e){const t=document.createElement("textarea");t.value=e,t.style.top="0",t.style.left="0",t.style.position="fixed",document.body.appendChild(t),t.focus(),t.select();try{document.execCommand("copy")}finally{document.body.removeChild(t)}}(e)})}var Pa=sr("<div>");const Ua=e=>{let t,n,r;const[o,i]=nn(!1),[a,s]=nn(48);an(()=>{const o=Na(0,"L");o.addData(e.sourceUrl),o.make(),t.innerHTML=o.createSvgTag(4,0);const i=t.firstElementChild.clientWidth,a=Math.round(256/i*1e5)/1e5;if(r){const e=4*Math.ceil(60/(4*a)),t=Hr(4*Math.ceil((i-e)/8));r.style.top=t,r.style.left=t,r.style.height=Hr(e),r.style.width=Hr(e),s(Math.round(48/a))}n.style.transform=`scale(${a})`});let l=null;return Bn(Ea,{get class(){return e.class},onClick:()=>{i(!0),Wa(e.sourceUrl),null!=l&&clearTimeout(l),l=setTimeout(()=>i(!1),1500)},get children(){return[Bn(Ta,{ref(e){"function"==typeof n?n(e):n=e},get children(){return[(n=Pa(),"function"==typeof t?dr(t,n):t=n,n),Bn(Gn,{get when(){return e.imageUrl},get children(){return Bn(Aa,{ref(e){"function"==typeof r?r(e):r=e},get children(){return Bn(Ma,{get src(){return e.imageUrl},alt:"",get size(){return a()}})}})}})];var n}}),Bn(Hi,{onBeforeEnter:e=>{da(e,[{opacity:0,transform:"translate(-50%, 44px)"},{opacity:1,transform:"translate(-50%, 0)"}],{duration:150,easing:"ease-out"})},onExit:(e,t)=>{da(e,[{opacity:1,transform:"translate(-50%, 0)"},{opacity:0,transform:"translate(-50%, 44px)"}],{duration:150,easing:"ease-out"}).finished.then(()=>{t()})},get children(){return Bn(Gn,{get when(){return o()&&!e.disableCopy},get children(){return Bn(_a,{get children(){return[Bn(ps,{size:"xs"}),Bn(Ka,{translationKey:"common.linkCopied",children:"Link Copied"})]}})}})}}),Bn(Gn,{get when(){return!e.disableCopy},get children(){return Bn(Ra,{get children(){return Bn(Zs,{})}})}})]}})};var Da=(e,t,n)=>{const r=t.trim().split(".").reduce((e,t)=>e?e[t]:void 0,e);return void 0!==r?r:n},ja=(e={},t=(navigator.language in e?navigator.language:Object.keys(e)[0]))=>{const[n,r]=nn(t),[o,i]=Fo(e);return[(e,t,r)=>{const i=Da(o[n()],e,r||"");return"function"==typeof i?i(t):"string"==typeof i?((e,t,n=/{{(.*?)}}/g)=>e.replace(n,(e,n)=>Da(t,n,"")))(i,t||{}):i},{add(e,t){i(e,e=>Object.assign(e||{},t))},locale:e=>e?r(e):n(),dict:e=>Da(o,e)}]},Ba=bn({}),$a=()=>Cn(Ba);const qa=Ur.div`
313
313
  font-style: normal;
314
314
  font-weight: ${e=>e.fontWeight};
315
315
  font-size: ${e=>e.fontSize};
316
316
  line-height: ${e=>e.lineHeight};
317
317
 
318
318
  color: ${e=>e.color};
319
- `,ja=e=>{const t=Or(),[n]=Ua();let r;const o=$n({fontSize:"14px",fontWeight:"510",lineHeight:"130%"},e);return tn(()=>{r&&"unset"!==o.cursor&&"pointer"!==getComputedStyle(r).cursor&&(r.style.cursor="default")}),Pn(Da,{get fontSize(){return o.fontSize},get fontWeight(){return o.fontWeight},get lineHeight(){return o.lineHeight},get color(){return e.color||t.colors.text.primary},get class(){return o.class},ref(e){"function"==typeof r?r(e):r=e},"data-tc-text":"true",get children(){var e;return tr(()=>!!o.translationKey)()?n(o.translationKey,o.translationValues,null==(e=o.children)?void 0:e.toString()):o.children}})},Ba=Nr.div`
319
+ `,Ka=e=>{const t=Wr(),[n]=$a();let r;const o=Fn({fontSize:"14px",fontWeight:"510",lineHeight:"130%"},e);return an(()=>{r&&"unset"!==o.cursor&&"pointer"!==getComputedStyle(r).cursor&&(r.style.cursor="default")}),Bn(qa,{get fontSize(){return o.fontSize},get fontWeight(){return o.fontWeight},get lineHeight(){return o.lineHeight},get color(){return e.color||t.colors.text.primary},get class(){return o.class},ref(e){"function"==typeof r?r(e):r=e},"data-tc-text":"true",get children(){var e;return ir(()=>!!o.translationKey)()?n(o.translationKey,o.translationValues,null==(e=o.children)?void 0:e.toString()):o.children}})},Ha=Ur.div`
320
320
  position: relative;
321
321
 
322
322
  &::after {
@@ -330,11 +330,11 @@
330
330
  border: 0.5px solid rgba(0, 0, 0, 0.08);
331
331
  border-radius: inherit;
332
332
  }
333
- `,$a=Nr(ti)`
333
+ `,Fa=Ur(ii)`
334
334
  width: 100%;
335
335
  height: 100%;
336
336
  border-radius: inherit;
337
- `,qa=e=>Pn(Ba,{get class(){return e.class},get children(){return[Pn($a,{get src(){return e.src}}),tr(()=>e.badge)]}}),Ka={m:"16px",s:"12px",none:"0"},Ha={m:"6px",s:"6px",none:"0"},Fa=Nr.ul`
337
+ `,Va=e=>Bn(Ha,{get class(){return e.class},get children(){return[Bn(Fa,{get src(){return e.src}}),ir(()=>e.badge)]}}),za={m:"16px",s:"12px",none:"0"},Za={m:"6px",s:"6px",none:"0"},Ga=Ur.ul`
338
338
  display: flex;
339
339
  gap: 0;
340
340
  width: 100%;
@@ -360,13 +360,12 @@
360
360
  > li > button {
361
361
  width: 100%;
362
362
  }
363
- `,Va=Nr.button`
363
+ `,Ya=Ur.button`
364
364
  position: relative;
365
365
  cursor: pointer;
366
366
  border: none;
367
367
  background-color: unset;
368
368
  padding: 8px 4px;
369
- width: 100%;
370
369
  min-width: 78px;
371
370
  display: flex;
372
371
  flex-direction: column;
@@ -374,7 +373,7 @@
374
373
 
375
374
  transition: transform 0.125s ease-in-out;
376
375
 
377
- ${yi} {
376
+ ${xi} {
378
377
  &:hover {
379
378
  transform: scale(1.04);
380
379
  }
@@ -384,36 +383,36 @@
384
383
  transform: scale(0.96);
385
384
  }
386
385
 
387
- ${wi} {
386
+ ${Ci} {
388
387
  &:active {
389
388
  transform: scale(0.92);
390
389
  }
391
390
  }
392
- `,za=Nr(qa)`
391
+ `,Qa=Ur(Va)`
393
392
  width: 60px;
394
393
  height: 60px;
395
- border-radius: ${e=>Ka[e.theme.borderRadius]};
394
+ border-radius: ${e=>za[e.theme.borderRadius]};
396
395
  margin-bottom: 8px;
397
396
  position: relative;
398
- `,Za=Nr(ti)`
397
+ `,Ja=Ur(ii)`
399
398
  position: absolute;
400
399
  right: -6px;
401
400
  bottom: -6px;
402
401
  width: 24px;
403
402
  height: 24px;
404
- border-radius: ${e=>Ha[e.theme.borderRadius]};
403
+ border-radius: ${e=>Za[e.theme.borderRadius]};
405
404
  box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.08);
406
- `,Ga=Nr(ja)`
405
+ `,Xa=Ur(Ka)`
407
406
  max-width: 90px;
408
407
  font-weight: 510;
409
408
  white-space: nowrap;
410
409
  text-overflow: ellipsis;
411
410
  overflow: hidden;
412
411
 
413
- ${mi("mobile")} {
412
+ ${bi("mobile")} {
414
413
  max-width: 80px;
415
414
  }
416
- `,Ya=Nr(ja)`
415
+ `,es=Ur(Ka)`
417
416
  font-weight: ${e=>e.colorPrimary?"510":"400"};
418
417
  max-width: 90px;
419
418
  white-space: nowrap;
@@ -421,10 +420,10 @@
421
420
  overflow: hidden;
422
421
  color: ${e=>e.colorPrimary?e.theme.colors.text.primary:e.theme.colors.text.secondary};
423
422
 
424
- ${mi("mobile")} {
423
+ ${bi("mobile")} {
425
424
  max-width: 80px;
426
425
  }
427
- `;var Qa=rr("<div>");const Ja=e=>{let t=null;const n=()=>{const e=null==t?void 0:t.querySelector("div");if(e&&e.scrollWidth>e.clientWidth){let t=0;const n=-.4,r=.05;for(;e.scrollWidth>e.clientWidth&&t>=n;)t-=r,e.style.letterSpacing=`${t}px`;0!==t&&(t-=r,e.style.letterSpacing=`${t}px`)}};return sn(()=>n()),tn(()=>{n()}),Pn(Va,{get class(){return e.class},onClick:()=>e.onClick(),"data-tc-wallet-item":"true",get children(){return[tr(()=>tr(()=>"string"==typeof e.icon)()?Pn(za,{get src(){return e.icon},get badge(){return tr(()=>!!e.badgeUrl)()&&Pn(Za,{get src(){return e.badgeUrl}})}}):e.icon),(n=Qa(),sr(e=>t=e,n),lr(n,Pn(Ga,{get children(){return e.name}})),n),tr(()=>tr(()=>!!e.secondLine)()&&Pn(Ya,{get colorPrimary(){var t;return null==(t=e.secondLineColorPrimary)||t},get children(){return e.secondLine}}))];var n}})},Xa=Nr.h1`
426
+ `;var ts=sr("<div>");const ns=e=>{let t=null;const n=()=>{const e=null==t?void 0:t.querySelector("div");if(e&&e.scrollWidth>e.clientWidth){let t=0;const n=-.4,r=.05;for(;e.scrollWidth>e.clientWidth&&t>=n;)t-=r,e.style.letterSpacing=`${t}px`;0!==t&&(t-=r,e.style.letterSpacing=`${t}px`)}};return dn(()=>n()),an(()=>{n()}),Bn(Ya,{get class(){return e.class},onClick:()=>e.onClick(),"data-tc-wallet-item":"true",get children(){return[ir(()=>ir(()=>"string"==typeof e.icon)()?Bn(Qa,{get src(){return e.icon},get badge(){return ir(()=>!!e.badgeUrl)()&&Bn(Ja,{get src(){return e.badgeUrl}})}}):e.icon),(n=ts(),dr(e=>t=e,n),hr(n,Bn(Xa,{get children(){return e.name}})),n),ir(()=>ir(()=>!!e.secondLine)()&&Bn(es,{get colorPrimary(){var t;return null==(t=e.secondLineColorPrimary)||t},get children(){return e.secondLine}}))];var n}})},rs=Ur.h1`
428
427
  font-style: normal;
429
428
  font-weight: 590;
430
429
  font-size: 20px;
@@ -438,7 +437,7 @@
438
437
  margin-bottom: 0;
439
438
 
440
439
  cursor: default;
441
- `,es=e=>{const[t]=Ua();return Pn(Xa,{get class(){return e.class},"data-tc-h1":"true",get children(){var n;return tr(()=>!!e.translationKey)()?t(e.translationKey,e.translationValues,null==(n=e.children)?void 0:n.toString()):e.children}})},ts=Nr.h2`
440
+ `,os=e=>{const[t]=$a();return Bn(rs,{get class(){return e.class},"data-tc-h1":"true",get children(){var n;return ir(()=>!!e.translationKey)()?t(e.translationKey,e.translationValues,null==(n=e.children)?void 0:n.toString()):e.children}})},is=Ur.h2`
442
441
  font-style: normal;
443
442
  font-weight: 400;
444
443
  font-size: 16px;
@@ -452,7 +451,7 @@
452
451
  margin-bottom: 32px;
453
452
 
454
453
  cursor: default;
455
- `,ns=e=>{const[t]=Ua();return Pn(ts,{get class(){return e.class},"data-tc-h2":"true",get children(){var n;return tr(()=>!!e.translationKey)()?t(e.translationKey,e.translationValues,null==(n=e.children)?void 0:n.toString()):e.children}})},rs=Nr.h3`
454
+ `,as=e=>{const[t]=$a();return Bn(is,{get class(){return e.class},"data-tc-h2":"true",get children(){var n;return ir(()=>!!e.translationKey)()?t(e.translationKey,e.translationValues,null==(n=e.children)?void 0:n.toString()):e.children}})},ss=Ur.h3`
456
455
  font-style: normal;
457
456
  font-weight: 510;
458
457
  font-size: 16px;
@@ -464,8 +463,8 @@
464
463
  margin-bottom: 0;
465
464
 
466
465
  cursor: default;
467
- `,os=e=>{const[t]=Ua();return Pn(rs,{"data-tc-h3":"true",get class(){return e.class},get children(){var n;return tr(()=>!!e.translationKey)()?t(e.translationKey,e.translationValues,null==(n=e.children)?void 0:n.toString()):e.children}})};var is=rr('<svg width=24 height=24 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path fill-rule=evenodd clip-rule=evenodd d="M14.1839 17.7069C13.6405 18.6507 13.3688 19.1226 13.0591 19.348C12.4278 19.8074 11.5723 19.8074 10.941 19.348C10.6312 19.1226 10.3595 18.6507 9.81613 17.7069L5.52066 10.2464C4.76864 8.94024 4.39263 8.28717 4.33762 7.75894C4.2255 6.68236 4.81894 5.65591 5.80788 5.21589C6.29309 5 7.04667 5 8.55383 5H15.4462C16.9534 5 17.7069 5 18.1922 5.21589C19.1811 5.65591 19.7745 6.68236 19.6624 7.75894C19.6074 8.28717 19.2314 8.94024 18.4794 10.2464L14.1839 17.7069ZM11.1 16.3412L6.56139 8.48002C6.31995 8.06185 6.19924 7.85276 6.18146 7.68365C6.14523 7.33896 6.33507 7.01015 6.65169 6.86919C6.80703 6.80002 7.04847 6.80002 7.53133 6.80002H7.53134L11.1 6.80002V16.3412ZM12.9 16.3412L17.4387 8.48002C17.6801 8.06185 17.8008 7.85276 17.8186 7.68365C17.8548 7.33896 17.665 7.01015 17.3484 6.86919C17.193 6.80002 16.9516 6.80002 16.4687 6.80002L12.9 6.80002V16.3412Z">');const as=e=>{const t=Or();return n=is(),r=n.firstChild,en(()=>or(r,"fill",e.fill||t.colors.icon.primary)),n;var n,r};var ss=rr('<svg xmlns=http://www.w3.org/2000/svg width=16 height=16 viewBox="0 0 16 16"fill=none><g clip-path=url(#clip0_3783_2045)><circle cx=8 cy=8.00098 r=8></circle><path d="M4.75 8.50098L7 10.751L11.75 6.00098"stroke-width=1.5 stroke-linecap=round stroke-linejoin=round></path></g><defs><clipPath id=clip0_3783_2045><rect width=16 height=16 fill=white transform="translate(0 0.000976562)">'),ls=rr('<svg width=24 height=24 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><circle cx=12 cy=12 r=11></circle><path d="M17.1364 9.6364C17.4879 9.28493 17.4879 8.71508 17.1364 8.36361C16.7849 8.01214 16.2151 8.01214 15.8636 8.36361L10 14.2272L8.1364 12.3636C7.78493 12.0121 7.21508 12.0121 6.86361 12.3636C6.51214 12.7151 6.51214 13.2849 6.86361 13.6364L9.36361 16.1364C9.71508 16.4879 10.2849 16.4879 10.6364 16.1364L17.1364 9.6364Z">'),cs=rr('<svg width=72 height=72 viewBox="0 0 72 72"fill=none xmlns=http://www.w3.org/2000/svg><circle cx=36 cy=36 r=33></circle><path d="M50.9142 28.4142C51.6953 27.6332 51.6953 26.3668 50.9142 25.5858C50.1332 24.8047 48.8668 24.8047 48.0858 25.5858L30 43.6716L23.9142 37.5858C23.1332 36.8047 21.8668 36.8047 21.0858 37.5858C20.3047 38.3668 20.3047 39.6332 21.0858 40.4142L28.5858 47.9142C29.3668 48.6953 30.6332 48.6953 31.4142 47.9142L50.9142 28.4142Z">');const us=e=>{const t=Or(),n=()=>e.size||"s",r=()=>e.fill||t.colors.icon.success;return tr(()=>{return tr(()=>"xs"===n())()?(u=ss(),d=u.firstChild.firstChild,h=d.nextSibling,en(n=>{var o=e.class,i=r(),a=t.colors.constant.white;return o!==n.e&&or(u,"class",n.e=o),i!==n.t&&or(d,"fill",n.t=i),a!==n.a&&or(h,"stroke",n.a=a),n},{e:void 0,t:void 0,a:void 0}),u):tr(()=>"s"===n())()?(s=ls(),l=s.firstChild,c=l.nextSibling,en(n=>{var o=e.class,i=r(),a=t.colors.constant.white;return o!==n.e&&or(s,"class",n.e=o),i!==n.t&&or(l,"fill",n.t=i),a!==n.a&&or(c,"fill",n.a=a),n},{e:void 0,t:void 0,a:void 0}),s):(o=cs(),i=o.firstChild,a=i.nextSibling,en(n=>{var s=e.class,l=r(),c=t.colors.constant.white;return s!==n.e&&or(o,"class",n.e=s),l!==n.t&&or(i,"fill",n.t=l),c!==n.a&&or(a,"fill",n.a=c),n},{e:void 0,t:void 0,a:void 0}),o);var o,i,a,s,l,c,u,d,h})};var ds=rr('<svg width=72 height=72 viewBox="0 0 72 72"fill=none xmlns=http://www.w3.org/2000/svg><circle cx=36 cy=36 r=33></circle><path d="M24.0858 26.9142C23.3047 26.1332 23.3047 24.8668 24.0858 24.0858C24.8668 23.3047 26.1332 23.3047 26.9142 24.0858L36 33.1716L45.0858 24.0858C45.8668 23.3047 47.1332 23.3047 47.9142 24.0858C48.6953 24.8668 48.6953 26.1332 47.9142 26.9142L38.8284 36L47.9142 45.0858C48.6953 45.8668 48.6953 47.1332 47.9142 47.9142C47.1332 48.6953 45.8668 48.6953 45.0858 47.9142L36 38.8284L26.9142 47.9142C26.1332 48.6953 24.8668 48.6953 24.0858 47.9142C23.3047 47.1332 23.3047 45.8668 24.0858 45.0858L33.1716 36L24.0858 26.9142Z">'),hs=rr('<svg xmlns=http://www.w3.org/2000/svg width=48 height=48 viewBox="0 0 48 48"fill=none><circle cx=24 cy=24.001 r=22></circle><path d="M24 24.001L31.5 16.501M24 24.001L16.5 16.501M24 24.001L16.5 31.501M24 24.001L31.5 31.501"stroke-width=3 stroke-linecap=round stroke-linejoin=round>'),fs=rr('<svg width=24 height=24 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><circle cx=12 cy=12 r=11></circle><path d="M7.86361 9.1364C7.51214 8.78493 7.51214 8.21508 7.86361 7.86361C8.21508 7.51214 8.78493 7.51214 9.1364 7.86361L12 10.7272L14.8636 7.86361C15.2151 7.51214 15.7849 7.51214 16.1364 7.86361C16.4879 8.21508 16.4879 8.78493 16.1364 9.1364L13.2728 12L16.1364 14.8636C16.4879 15.2151 16.4879 15.7849 16.1364 16.1364C15.7849 16.4879 15.2151 16.4879 14.8636 16.1364L12 13.2728L9.1364 16.1364C8.78493 16.4879 8.21508 16.4879 7.86361 16.1364C7.51214 15.7849 7.51214 15.2151 7.86361 14.8636L10.7272 12L7.86361 9.1364Z">');const ps=e=>{const t=Or(),n=()=>e.size||"m",r=()=>e.fill||t.colors.icon.error;return tr(()=>{return tr(()=>"m"===n())()?(u=ds(),d=u.firstChild,h=d.nextSibling,en(n=>{var o=e.class,i=r(),a=t.colors.constant.white;return o!==n.e&&or(u,"class",n.e=o),i!==n.t&&or(d,"fill",n.t=i),a!==n.a&&or(h,"fill",n.a=a),n},{e:void 0,t:void 0,a:void 0}),u):tr(()=>"s"===n())()?(s=hs(),l=s.firstChild,c=l.nextSibling,en(n=>{var o=e.class,i=r(),a=t.colors.constant.white;return o!==n.e&&or(s,"class",n.e=o),i!==n.t&&or(l,"fill",n.t=i),a!==n.a&&or(c,"stroke",n.a=a),n},{e:void 0,t:void 0,a:void 0}),s):(o=fs(),i=o.firstChild,a=i.nextSibling,en(n=>{var s=e.class,l=r(),c=t.colors.constant.white;return s!==n.e&&or(o,"class",n.e=s),l!==n.t&&or(i,"fill",n.t=l),c!==n.a&&or(a,"fill",n.a=c),n},{e:void 0,t:void 0,a:void 0}),o);var o,i,a,s,l,c,u,d,h})};var gs=rr('<svg width=24 height=24 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M15.55 5.85123C18.9459 7.81184 20.1094 12.1541 18.1488 15.55C16.1882 18.9459 11.8459 20.1094 8.44998 18.1488C8.01952 17.9003 7.46909 18.0478 7.22056 18.4782C6.97203 18.9087 7.11952 19.4591 7.54998 19.7076C11.8068 22.1653 17.2499 20.7068 19.7076 16.45C22.1653 12.1932 20.7068 6.75005 16.45 4.29239C12.1932 1.83472 6.75003 3.29321 4.29236 7.55001C4.04383 7.98047 4.19132 8.53091 4.62178 8.77943C5.05224 9.02796 5.60268 8.88048 5.8512 8.45001C7.81181 5.05413 12.1541 3.89062 15.55 5.85123Z">'),ms=rr('<svg xmlns=http://www.w3.org/2000/svg width=44 height=44 viewBox="0 0 44 44"fill=none><path fill-rule=evenodd clip-rule=evenodd d="M22 2.99951C11.5066 2.99951 3 11.5061 3 21.9995C3 32.4929 11.5066 40.9995 22 40.9995C22.8284 40.9995 23.5 41.6711 23.5 42.4995C23.5 43.3279 22.8284 43.9995 22 43.9995C9.84974 43.9995 0 34.1498 0 21.9995C0 9.84925 9.84974 -0.000488281 22 -0.000488281C34.1503 -0.000488281 44 9.84925 44 21.9995C44 22.8279 43.3284 23.4995 42.5 23.4995C41.6716 23.4995 41 22.8279 41 21.9995C41 11.5061 32.4934 2.99951 22 2.99951Z">'),ws=rr('<svg width=72 height=72 viewBox="0 0 72 72"fill=none xmlns=http://www.w3.org/2000/svg><path d="M24 56.7846C35.479 63.412 50.1572 59.479 56.7846 47.9999C63.412 36.5209 59.479 21.8427 48 15.2153C36.521 8.58791 21.8428 12.5209 15.2154 23.9999"stroke-width=4 stroke-linecap=round stroke-linejoin=round>');const ys=e=>{const t=Or(),n=()=>e.size||"xs",r=()=>e.fill||t.colors.icon.tertiary,o=Ar`
468
- animation: ${Mr`
466
+ `,ls=e=>{const[t]=$a();return Bn(ss,{"data-tc-h3":"true",get class(){return e.class},get children(){var n;return ir(()=>!!e.translationKey)()?t(e.translationKey,e.translationValues,null==(n=e.children)?void 0:n.toString()):e.children}})};var cs=sr('<svg width=24 height=24 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path fill-rule=evenodd clip-rule=evenodd d="M14.1839 17.7069C13.6405 18.6507 13.3688 19.1226 13.0591 19.348C12.4278 19.8074 11.5723 19.8074 10.941 19.348C10.6312 19.1226 10.3595 18.6507 9.81613 17.7069L5.52066 10.2464C4.76864 8.94024 4.39263 8.28717 4.33762 7.75894C4.2255 6.68236 4.81894 5.65591 5.80788 5.21589C6.29309 5 7.04667 5 8.55383 5H15.4462C16.9534 5 17.7069 5 18.1922 5.21589C19.1811 5.65591 19.7745 6.68236 19.6624 7.75894C19.6074 8.28717 19.2314 8.94024 18.4794 10.2464L14.1839 17.7069ZM11.1 16.3412L6.56139 8.48002C6.31995 8.06185 6.19924 7.85276 6.18146 7.68365C6.14523 7.33896 6.33507 7.01015 6.65169 6.86919C6.80703 6.80002 7.04847 6.80002 7.53133 6.80002H7.53134L11.1 6.80002V16.3412ZM12.9 16.3412L17.4387 8.48002C17.6801 8.06185 17.8008 7.85276 17.8186 7.68365C17.8548 7.33896 17.665 7.01015 17.3484 6.86919C17.193 6.80002 16.9516 6.80002 16.4687 6.80002L12.9 6.80002V16.3412Z">');const us=e=>{const t=Wr();return n=cs(),r=n.firstChild,on(()=>lr(r,"fill",e.fill||t.colors.icon.primary)),n;var n,r};var ds=sr('<svg xmlns=http://www.w3.org/2000/svg width=16 height=16 viewBox="0 0 16 16"fill=none><g clip-path=url(#clip0_3783_2045)><circle cx=8 cy=8.00098 r=8></circle><path d="M4.75 8.50098L7 10.751L11.75 6.00098"stroke-width=1.5 stroke-linecap=round stroke-linejoin=round></path></g><defs><clipPath id=clip0_3783_2045><rect width=16 height=16 fill=white transform="translate(0 0.000976562)">'),hs=sr('<svg width=24 height=24 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><circle cx=12 cy=12 r=11></circle><path d="M17.1364 9.6364C17.4879 9.28493 17.4879 8.71508 17.1364 8.36361C16.7849 8.01214 16.2151 8.01214 15.8636 8.36361L10 14.2272L8.1364 12.3636C7.78493 12.0121 7.21508 12.0121 6.86361 12.3636C6.51214 12.7151 6.51214 13.2849 6.86361 13.6364L9.36361 16.1364C9.71508 16.4879 10.2849 16.4879 10.6364 16.1364L17.1364 9.6364Z">'),fs=sr('<svg width=72 height=72 viewBox="0 0 72 72"fill=none xmlns=http://www.w3.org/2000/svg><circle cx=36 cy=36 r=33></circle><path d="M50.9142 28.4142C51.6953 27.6332 51.6953 26.3668 50.9142 25.5858C50.1332 24.8047 48.8668 24.8047 48.0858 25.5858L30 43.6716L23.9142 37.5858C23.1332 36.8047 21.8668 36.8047 21.0858 37.5858C20.3047 38.3668 20.3047 39.6332 21.0858 40.4142L28.5858 47.9142C29.3668 48.6953 30.6332 48.6953 31.4142 47.9142L50.9142 28.4142Z">');const ps=e=>{const t=Wr(),n=()=>e.size||"s",r=()=>e.fill||t.colors.icon.success;return ir(()=>{return ir(()=>"xs"===n())()?(u=ds(),d=u.firstChild.firstChild,h=d.nextSibling,on(n=>{var o=e.class,i=r(),a=t.colors.constant.white;return o!==n.e&&lr(u,"class",n.e=o),i!==n.t&&lr(d,"fill",n.t=i),a!==n.a&&lr(h,"stroke",n.a=a),n},{e:void 0,t:void 0,a:void 0}),u):ir(()=>"s"===n())()?(s=hs(),l=s.firstChild,c=l.nextSibling,on(n=>{var o=e.class,i=r(),a=t.colors.constant.white;return o!==n.e&&lr(s,"class",n.e=o),i!==n.t&&lr(l,"fill",n.t=i),a!==n.a&&lr(c,"fill",n.a=a),n},{e:void 0,t:void 0,a:void 0}),s):(o=fs(),i=o.firstChild,a=i.nextSibling,on(n=>{var s=e.class,l=r(),c=t.colors.constant.white;return s!==n.e&&lr(o,"class",n.e=s),l!==n.t&&lr(i,"fill",n.t=l),c!==n.a&&lr(a,"fill",n.a=c),n},{e:void 0,t:void 0,a:void 0}),o);var o,i,a,s,l,c,u,d,h})};var gs=sr('<svg width=72 height=72 viewBox="0 0 72 72"fill=none xmlns=http://www.w3.org/2000/svg><circle cx=36 cy=36 r=33></circle><path d="M24.0858 26.9142C23.3047 26.1332 23.3047 24.8668 24.0858 24.0858C24.8668 23.3047 26.1332 23.3047 26.9142 24.0858L36 33.1716L45.0858 24.0858C45.8668 23.3047 47.1332 23.3047 47.9142 24.0858C48.6953 24.8668 48.6953 26.1332 47.9142 26.9142L38.8284 36L47.9142 45.0858C48.6953 45.8668 48.6953 47.1332 47.9142 47.9142C47.1332 48.6953 45.8668 48.6953 45.0858 47.9142L36 38.8284L26.9142 47.9142C26.1332 48.6953 24.8668 48.6953 24.0858 47.9142C23.3047 47.1332 23.3047 45.8668 24.0858 45.0858L33.1716 36L24.0858 26.9142Z">'),ms=sr('<svg xmlns=http://www.w3.org/2000/svg width=48 height=48 viewBox="0 0 48 48"fill=none><circle cx=24 cy=24.001 r=22></circle><path d="M24 24.001L31.5 16.501M24 24.001L16.5 16.501M24 24.001L16.5 31.501M24 24.001L31.5 31.501"stroke-width=3 stroke-linecap=round stroke-linejoin=round>'),ws=sr('<svg width=24 height=24 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><circle cx=12 cy=12 r=11></circle><path d="M7.86361 9.1364C7.51214 8.78493 7.51214 8.21508 7.86361 7.86361C8.21508 7.51214 8.78493 7.51214 9.1364 7.86361L12 10.7272L14.8636 7.86361C15.2151 7.51214 15.7849 7.51214 16.1364 7.86361C16.4879 8.21508 16.4879 8.78493 16.1364 9.1364L13.2728 12L16.1364 14.8636C16.4879 15.2151 16.4879 15.7849 16.1364 16.1364C15.7849 16.4879 15.2151 16.4879 14.8636 16.1364L12 13.2728L9.1364 16.1364C8.78493 16.4879 8.21508 16.4879 7.86361 16.1364C7.51214 15.7849 7.51214 15.2151 7.86361 14.8636L10.7272 12L7.86361 9.1364Z">');const ys=e=>{const t=Wr(),n=()=>e.size||"m",r=()=>e.fill||t.colors.icon.error;return ir(()=>{return ir(()=>"m"===n())()?(u=gs(),d=u.firstChild,h=d.nextSibling,on(n=>{var o=e.class,i=r(),a=t.colors.constant.white;return o!==n.e&&lr(u,"class",n.e=o),i!==n.t&&lr(d,"fill",n.t=i),a!==n.a&&lr(h,"fill",n.a=a),n},{e:void 0,t:void 0,a:void 0}),u):ir(()=>"s"===n())()?(s=ms(),l=s.firstChild,c=l.nextSibling,on(n=>{var o=e.class,i=r(),a=t.colors.constant.white;return o!==n.e&&lr(s,"class",n.e=o),i!==n.t&&lr(l,"fill",n.t=i),a!==n.a&&lr(c,"stroke",n.a=a),n},{e:void 0,t:void 0,a:void 0}),s):(o=ws(),i=o.firstChild,a=i.nextSibling,on(n=>{var s=e.class,l=r(),c=t.colors.constant.white;return s!==n.e&&lr(o,"class",n.e=s),l!==n.t&&lr(i,"fill",n.t=l),c!==n.a&&lr(a,"fill",n.a=c),n},{e:void 0,t:void 0,a:void 0}),o);var o,i,a,s,l,c,u,d,h})};var vs=sr('<svg width=24 height=24 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M15.55 5.85123C18.9459 7.81184 20.1094 12.1541 18.1488 15.55C16.1882 18.9459 11.8459 20.1094 8.44998 18.1488C8.01952 17.9003 7.46909 18.0478 7.22056 18.4782C6.97203 18.9087 7.11952 19.4591 7.54998 19.7076C11.8068 22.1653 17.2499 20.7068 19.7076 16.45C22.1653 12.1932 20.7068 6.75005 16.45 4.29239C12.1932 1.83472 6.75003 3.29321 4.29236 7.55001C4.04383 7.98047 4.19132 8.53091 4.62178 8.77943C5.05224 9.02796 5.60268 8.88048 5.8512 8.45001C7.81181 5.05413 12.1541 3.89062 15.55 5.85123Z">'),bs=sr('<svg xmlns=http://www.w3.org/2000/svg width=44 height=44 viewBox="0 0 44 44"fill=none><path fill-rule=evenodd clip-rule=evenodd d="M22 2.99951C11.5066 2.99951 3 11.5061 3 21.9995C3 32.4929 11.5066 40.9995 22 40.9995C22.8284 40.9995 23.5 41.6711 23.5 42.4995C23.5 43.3279 22.8284 43.9995 22 43.9995C9.84974 43.9995 0 34.1498 0 21.9995C0 9.84925 9.84974 -0.000488281 22 -0.000488281C34.1503 -0.000488281 44 9.84925 44 21.9995C44 22.8279 43.3284 23.4995 42.5 23.4995C41.6716 23.4995 41 22.8279 41 21.9995C41 11.5061 32.4934 2.99951 22 2.99951Z">'),Cs=sr('<svg width=72 height=72 viewBox="0 0 72 72"fill=none xmlns=http://www.w3.org/2000/svg><path d="M24 56.7846C35.479 63.412 50.1572 59.479 56.7846 47.9999C63.412 36.5209 59.479 21.8427 48 15.2153C36.521 8.58791 21.8428 12.5209 15.2154 23.9999"stroke-width=4 stroke-linecap=round stroke-linejoin=round>');const xs=e=>{const t=Wr(),n=()=>e.size||"xs",r=()=>e.fill||t.colors.icon.tertiary,o=Or`
467
+ animation: ${Lr`
469
468
  0% {
470
469
  transform: rotate(0deg);
471
470
  }
@@ -473,21 +472,21 @@
473
472
  transform: rotate(360deg);
474
473
  }
475
474
  `} 1s linear infinite;
476
- `;return tr(()=>{return tr(()=>"xs"===n())()?(l=gs(),c=l.firstChild,en(t=>{var n=Ai(o,e.class),i=r();return n!==t.e&&or(l,"class",t.e=n),i!==t.t&&or(c,"fill",t.t=i),t},{e:void 0,t:void 0}),l):tr(()=>"s"===n())()?(a=ms(),s=a.firstChild,en(t=>{var n=Ai(o,e.class),i=r();return n!==t.e&&or(a,"class",t.e=n),i!==t.t&&or(s,"fill",t.t=i),t},{e:void 0,t:void 0}),a):(t=ws(),i=t.firstChild,en(n=>{var a=Ai(o,e.class),s=r();return a!==n.e&&or(t,"class",n.e=a),s!==n.t&&or(i,"stroke",n.t=s),n},{e:void 0,t:void 0}),t);var t,i,a,s,l,c})};var vs=rr('<svg width=158 height=28 viewBox="0 0 158 28"fill=none xmlns=http://www.w3.org/2000/svg><path fill-rule=evenodd clip-rule=evenodd d="M28 14.001C28 21.733 21.732 28.001 14 28.001C6.26801 28.001 0 21.733 0 14.001C0 6.26899 6.26801 0.000976562 14 0.000976562C21.732 0.000976562 28 6.26899 28 14.001ZM9.21931 8.00098H18.7801H18.7813C20.538 8.00098 21.6522 9.89966 20.7691 11.4302L14.8672 21.6576C14.4822 22.3254 13.5172 22.3254 13.1322 21.6576L7.23158 11.4302C6.34721 9.89726 7.4614 8.00098 9.21931 8.00098ZM13.1262 18.5882V9.74806H9.21811C8.78976 9.74806 8.53708 10.2029 8.74163 10.5578L11.8423 16.1035L13.1262 18.5882ZM16.1559 16.1047L19.2554 10.5566C19.4599 10.2017 19.2073 9.74685 18.7789 9.74685H14.8709V18.5906L16.1559 16.1047Z"fill=#0098EA></path><path d="M18.7802 8.00098H9.21936C7.46145 8.00098 6.34727 9.89726 7.23164 11.4302L13.1322 21.6576C13.5173 22.3254 14.4823 22.3254 14.8673 21.6576L20.7691 11.4302C21.6523 9.89966 20.5381 8.00098 18.7814 8.00098H18.7802ZM13.1274 18.5906L11.8424 16.1035L8.74168 10.5578C8.53714 10.2029 8.78981 9.74806 9.21816 9.74806H13.1262V18.5918L13.1274 18.5906ZM19.2555 10.5566L16.156 16.1047L14.8709 18.5906V9.74685H18.779C19.2073 9.74685 19.46 10.2017 19.2555 10.5566Z"fill=white></path><path fill-rule=evenodd clip-rule=evenodd d="M51.7483 22.1967C55.7182 22.1967 58.9609 18.954 58.9609 14.9841C58.9609 11.0142 55.7182 7.77148 51.7483 7.77148C47.7588 7.77148 44.5357 11.0142 44.5357 14.9841C44.5357 18.954 47.7588 22.1967 51.7483 22.1967ZM51.7483 19.1702C49.4686 19.1702 47.6802 17.2442 47.6802 14.9841C47.6802 12.724 49.4686 10.798 51.7483 10.798C54.0084 10.798 55.7968 12.724 55.7968 14.9841C55.7968 17.2442 54.0084 19.1702 51.7483 19.1702ZM37.0698 21.9609H40.2142V10.9946H44.2843V8.00732H33V10.9946H37.0698V21.9609ZM69.9379 8.00732H73.0823V21.9609H70.3899L63.59 13.3333V21.9609H60.4652V8.00732H63.1576L69.9379 16.6153V8.00732ZM79.2259 14.9887C79.2259 10.9202 82.351 7.77539 86.4982 7.77539C89.8592 7.77539 92.5519 9.95709 93.2202 12.6891H90.7437C90.154 11.0971 88.4637 9.9964 86.4982 9.9964C83.5893 9.9964 81.5452 12.1781 81.5452 14.9887C81.5452 17.7994 83.5893 19.9811 86.4982 19.9811C88.4637 19.9811 90.154 18.8804 90.7437 17.2884H93.2202C92.5519 20.0204 89.8592 22.2021 86.4982 22.2021C82.351 22.2021 79.2259 19.0573 79.2259 14.9887ZM104.584 17.0525C104.584 19.9025 102.343 22.1628 99.4342 22.1628C96.5253 22.1628 94.2846 19.9025 94.2846 17.0525C94.2846 14.2025 96.5253 11.9422 99.4342 11.9422C102.343 11.9422 104.584 14.2025 104.584 17.0525ZM96.4663 17.0525C96.4663 18.8018 97.6849 20.158 99.4342 20.158C101.164 20.158 102.382 18.8018 102.382 17.0525C102.382 15.3032 101.164 13.947 99.4342 13.947C97.6849 13.947 96.4663 15.3032 96.4663 17.0525ZM108.626 12.1388H106.463V21.9662H108.626V17.1311C108.626 15.0281 109.726 13.9077 111.161 13.9077C112.419 13.9077 113.205 14.8512 113.205 16.4039V21.9662H115.367V16.0501C115.367 13.5539 113.893 11.9422 111.613 11.9422C110.335 11.9422 109.215 12.4926 108.626 13.4753V12.1388ZM117.839 12.1388H120.001V13.4753C120.59 12.4926 121.711 11.9422 122.988 11.9422C125.268 11.9422 126.742 13.5539 126.742 16.0501V21.9662H124.58V16.4039C124.58 14.8512 123.794 13.9077 122.536 13.9077C121.101 13.9077 120.001 15.0281 120.001 17.1311V21.9662H117.839V12.1388ZM133.558 22.1628C136.054 22.1628 137.823 20.728 138.373 18.8804H136.113C135.661 19.8238 134.717 20.2563 133.636 20.2563C131.887 20.2563 130.747 19.077 130.668 17.5832H138.491C138.688 14.2419 136.585 11.9422 133.577 11.9422C130.551 11.9422 128.526 14.1436 128.526 17.0525C128.526 20.0007 130.629 22.1628 133.558 22.1628ZM130.747 16.0501C131.042 14.5367 132.162 13.7505 133.518 13.7505C134.717 13.7505 135.838 14.4581 136.172 16.0501H130.747ZM149.851 18.3694C149.32 20.5511 147.453 22.1628 144.859 22.1628C141.871 22.1628 139.709 19.8828 139.709 17.0525C139.709 14.2222 141.871 11.9422 144.859 11.9422C147.453 11.9422 149.32 13.5539 149.851 15.7356H147.571C147.178 14.6743 146.215 13.9077 144.859 13.9077C143.109 13.9077 141.91 15.2246 141.91 17.0525C141.91 18.8804 143.109 20.1973 144.859 20.1973C146.215 20.1973 147.178 19.4307 147.571 18.3694H149.851ZM155.75 22.0645C156.418 22.0645 156.929 21.9859 157.362 21.8483V19.9221C157.047 20.0401 156.615 20.1187 156.202 20.1187C155.082 20.1187 154.551 19.6666 154.551 18.448V14.065H157.362V12.1388H154.551V9.40675H152.389V12.1388H150.345V14.065H152.389V18.8018C152.389 21.0228 153.863 22.0645 155.75 22.0645Z">');const bs=()=>{const e=Or();return t=vs(),n=t.firstChild.nextSibling.nextSibling,en(()=>or(n,"fill",e.theme===vr.DARK?e.colors.constant.white:e.colors.constant.black)),t;var t,n};var Cs=rr('<svg xmlns=http://www.w3.org/2000/svg width=16 height=16 viewBox="0 0 16 16"fill=none><path fill-rule=evenodd clip-rule=evenodd d="M5.56608 4.42584C5.82527 3.32158 6.8176 2.5 8.00001 2.5C9.38072 2.5 10.5 3.61929 10.5 5C10.5 5.63026 10.3391 6.0386 10.1264 6.34455C9.90018 6.66993 9.58561 6.92478 9.18864 7.20877C9.12579 7.25372 9.05873 7.30025 8.9887 7.34883C8.27392 7.84472 7.25001 8.55507 7.25001 10V10.25C7.25001 10.6642 7.5858 11 8.00001 11C8.41422 11 8.75001 10.6642 8.75001 10.25V10C8.75001 9.36502 9.10777 9.1096 9.94554 8.51149L10.0614 8.42873C10.4769 8.13147 10.9748 7.75194 11.358 7.20076C11.7547 6.63015 12 5.91973 12 5C12 2.79086 10.2091 1 8.00001 1C6.10564 1 4.5205 2.31615 4.10577 4.08308C4.01112 4.48634 4.26129 4.88997 4.66454 4.98462C5.0678 5.07927 5.47143 4.8291 5.56608 4.42584ZM8.00001 15C8.60752 15 9.10001 14.5075 9.10001 13.9C9.10001 13.2925 8.60752 12.8 8.00001 12.8C7.39249 12.8 6.90001 13.2925 6.90001 13.9C6.90001 14.5075 7.39249 15 8.00001 15Z">');const xs=e=>{const t=Or();return n=Cs(),r=n.firstChild,en(()=>or(r,"fill",e.fill||t.colors.icon.secondary)),n;var n,r};var Ss=rr('<svg xmlns=http://www.w3.org/2000/svg width=16 height=16 viewBox="0 0 16 16"fill=none><path fill-rule=evenodd clip-rule=evenodd d="M9.98156 8.75C9.84854 11.4328 9.01206 13.5 8 13.5C6.98794 13.5 6.15146 11.4328 6.01844 8.75H9.98156ZM11.4832 8.75C11.4217 10.1155 11.1929 11.3869 10.8239 12.4017C10.7734 12.5405 10.7188 12.6789 10.6595 12.8154C12.1454 11.993 13.2103 10.5029 13.4493 8.75H11.4832ZM13.4493 7.25H11.4832C11.4217 5.88453 11.1929 4.61314 10.8239 3.5983C10.7734 3.4595 10.7188 3.32111 10.6595 3.18459C12.1454 4.00697 13.2103 5.49709 13.4493 7.25ZM9.98156 7.25H6.01844C6.15144 4.56764 6.98769 2.50062 7.99955 2.5H8C9.01206 2.5 9.84854 4.56724 9.98156 7.25ZM4.51678 7.25C4.57826 5.88453 4.80706 4.61314 5.1761 3.5983C5.22657 3.4595 5.28124 3.32111 5.3405 3.18459C3.85463 4.00697 2.78972 5.49709 2.55071 7.25H4.51678ZM2.55071 8.75C2.78972 10.5029 3.85463 11.993 5.3405 12.8154C5.28124 12.6789 5.22657 12.5405 5.1761 12.4017C4.80706 11.3869 4.57826 10.1155 4.51678 8.75H2.55071ZM15 8C15 11.866 11.866 15 8 15C4.13401 15 1 11.866 1 8C1 4.13401 4.13401 1 8 1C11.866 1 15 4.13401 15 8Z">');const ks=e=>{const t=Or();return n=Ss(),r=n.firstChild,en(()=>or(r,"fill",e.fill||t.colors.icon.primary)),n;var n,r};var Rs=rr('<svg xmlns=http://www.w3.org/2000/svg width=16 height=16 viewBox="0 0 16 16"fill=none><path fill-rule=evenodd clip-rule=evenodd d="M2.5 4.8C2.5 3.11984 2.5 2.27976 2.82698 1.63803C3.1146 1.07354 3.57354 0.614601 4.13803 0.32698C4.77976 0 5.61984 0 7.3 0H8.7C10.3802 0 11.2202 0 11.862 0.32698C12.4265 0.614601 12.8854 1.07354 13.173 1.63803C13.5 2.27976 13.5 3.11984 13.5 4.8V11.2C13.5 12.8802 13.5 13.7202 13.173 14.362C12.8854 14.9265 12.4265 15.3854 11.862 15.673C11.2202 16 10.3802 16 8.7 16H7.3C5.61984 16 4.77976 16 4.13803 15.673C3.57354 15.3854 3.1146 14.9265 2.82698 14.362C2.5 13.7202 2.5 12.8802 2.5 11.2V4.8ZM4 3.9C4 3.05992 4 2.63988 4.16349 2.31901C4.3073 2.03677 4.53677 1.8073 4.81901 1.66349C5.13988 1.5 5.55992 1.5 6.4 1.5H9.6C10.4401 1.5 10.8601 1.5 11.181 1.66349C11.4632 1.8073 11.6927 2.03677 11.8365 2.31901C12 2.63988 12 3.05992 12 3.9V12.1C12 12.9401 12 13.3601 11.8365 13.681C11.6927 13.9632 11.4632 14.1927 11.181 14.3365C10.8601 14.5 10.4401 14.5 9.6 14.5H6.4C5.55992 14.5 5.13988 14.5 4.81901 14.3365C4.53677 14.1927 4.3073 13.9632 4.16349 13.681C4 13.3601 4 12.9401 4 12.1V3.9ZM7 2.5C6.58579 2.5 6.25 2.83579 6.25 3.25C6.25 3.66421 6.58579 4 7 4H9C9.41421 4 9.75 3.66421 9.75 3.25C9.75 2.83579 9.41421 2.5 9 2.5H7Z">');const Es=e=>{const t=Or();return n=Rs(),r=n.firstChild,en(()=>or(r,"fill",e.fill||t.colors.icon.primary)),n;var n,r};var As=rr('<svg xmlns=http://www.w3.org/2000/svg width=16 height=16 viewBox="0 0 16 16"fill=none><path fill-rule=evenodd clip-rule=evenodd d="M1.5 6.8C1.5 5.11984 1.5 4.27976 1.82698 3.63803C2.1146 3.07354 2.57354 2.6146 3.13803 2.32698C3.77976 2 4.61984 2 6.3 2H9.7C11.3802 2 12.2202 2 12.862 2.32698C13.4265 2.6146 13.8854 3.07354 14.173 3.63803C14.5 4.27976 14.5 5.11984 14.5 6.8V11.5H15.25C15.6642 11.5 16 11.8358 16 12.25C16 12.6642 15.6642 13 15.25 13H0.75C0.335786 13 0 12.6642 0 12.25C0 11.8358 0.335786 11.5 0.75 11.5H1.5V6.8ZM3 11.5H13V5.9C13 5.05992 13 4.63988 12.8365 4.31901C12.6927 4.03677 12.4632 3.8073 12.181 3.66349C11.8601 3.5 11.4401 3.5 10.6 3.5H5.4C4.55992 3.5 4.13988 3.5 3.81901 3.66349C3.53677 3.8073 3.3073 4.03677 3.16349 4.31901C3 4.63988 3 5.05992 3 5.9V11.5Z">');const Ms=e=>{const t=Or();return n=As(),r=n.firstChild,en(()=>or(r,"fill",e.fill||t.colors.icon.primary)),n;var n,r};var Ts=rr('<svg xmlns=http://www.w3.org/2000/svg width=17 height=16 viewBox="0 0 17 16"fill=none><g clip-path=url(#clip0_3676_1603)><path fill-rule=evenodd clip-rule=evenodd d="M15.5 1.25049C15.5 0.836275 15.1642 0.500488 14.75 0.500488C14.3358 0.500488 14 0.836275 14 1.25049V3.67012C12.7187 2.04487 10.7318 1.00049 8.5 1.00049C4.63401 1.00049 1.5 4.1345 1.5 8.00049C1.5 11.8665 4.63401 15.0005 8.5 15.0005C11.6844 15.0005 14.3703 12.8748 15.2199 9.96661C15.3361 9.56902 15.1079 9.15254 14.7103 9.03638C14.3127 8.92023 13.8962 9.14838 13.7801 9.54597C13.1123 11.8319 11 13.5005 8.5 13.5005C5.46243 13.5005 3 11.0381 3 8.00049C3 4.96292 5.46243 2.50049 8.5 2.50049C10.321 2.50049 11.9363 3.3855 12.9377 4.75049H10.5C10.0858 4.75049 9.75 5.08627 9.75 5.50049C9.75 5.9147 10.0858 6.25049 10.5 6.25049H14.75C15.1642 6.25049 15.5 5.9147 15.5 5.50049V1.25049Z"></path></g><defs><clipPath id=clip0_3676_1603><rect width=16 height=16 fill=white transform="translate(0.5 0.000488281)">');const _s=e=>{const t=Or();return n=Ts(),r=n.firstChild.firstChild,en(()=>or(r,"fill",e.fill||t.colors.accent)),n;var n,r};var Os=rr('<svg xmlns=http://www.w3.org/2000/svg width=16 height=16 viewBox="0 0 16 16"fill=none><path fill-rule=evenodd clip-rule=evenodd d="M13 4.06119V6.75053C13 7.16474 13.3358 7.50053 13.75 7.50053C14.1642 7.50053 14.5 7.16474 14.5 6.75053V2.75053L14.5 2.72807C14.5001 2.63191 14.5003 2.49627 14.4842 2.37627C14.4638 2.22503 14.4063 1.99261 14.2071 1.79342C14.0079 1.59423 13.7755 1.5367 13.6243 1.51637C13.5043 1.50023 13.3686 1.50039 13.2725 1.50051L13.25 1.50053H9.25C8.83579 1.50053 8.5 1.83631 8.5 2.25053C8.5 2.66474 8.83579 3.00053 9.25 3.00053H11.9393L7.21967 7.7202C6.92678 8.01309 6.92678 8.48796 7.21967 8.78086C7.51256 9.07375 7.98744 9.07375 8.28033 8.78086L13 4.06119ZM5.85 1.50053H5.81903H5.81899C5.21528 1.50052 4.71702 1.50051 4.31113 1.53367C3.88956 1.56812 3.50203 1.64204 3.13803 1.82751C2.57354 2.11513 2.1146 2.57407 1.82698 3.13856C1.64151 3.50256 1.56759 3.89009 1.53315 4.31166C1.49998 4.71755 1.49999 5.21581 1.5 5.81953V5.81955V5.85053V10.1505V10.1815V10.1815C1.49999 10.7852 1.49998 11.2835 1.53315 11.6894C1.56759 12.111 1.64151 12.4985 1.82698 12.8625C2.1146 13.427 2.57354 13.8859 3.13803 14.1735C3.50203 14.359 3.88956 14.4329 4.31113 14.4674C4.71702 14.5005 5.21527 14.5005 5.81897 14.5005H5.81901H5.85H10.15H10.181H10.181C10.7847 14.5005 11.283 14.5005 11.6889 14.4674C12.1104 14.4329 12.498 14.359 12.862 14.1735C13.4265 13.8859 13.8854 13.427 14.173 12.8625C14.3585 12.4985 14.4324 12.111 14.4669 11.6894C14.5 11.2835 14.5 10.7853 14.5 10.1816V10.1815V10.1505V9.75053C14.5 9.33631 14.1642 9.00053 13.75 9.00053C13.3358 9.00053 13 9.33631 13 9.75053V10.1505C13 10.793 12.9994 11.2297 12.9718 11.5672C12.945 11.8961 12.8963 12.0642 12.8365 12.1815C12.6927 12.4638 12.4632 12.6932 12.181 12.837C12.0637 12.8968 11.8955 12.9455 11.5667 12.9724C11.2292 12.9999 10.7924 13.0005 10.15 13.0005H5.85C5.20757 13.0005 4.77085 12.9999 4.43328 12.9724C4.10447 12.9455 3.93632 12.8968 3.81902 12.837C3.53677 12.6932 3.3073 12.4638 3.16349 12.1815C3.10372 12.0642 3.05503 11.8961 3.02816 11.5672C3.00058 11.2297 3 10.793 3 10.1505V5.85053C3 5.20809 3.00058 4.77137 3.02816 4.43381C3.05503 4.10499 3.10372 3.93684 3.16349 3.81954C3.3073 3.5373 3.53677 3.30783 3.81902 3.16402C3.93632 3.10425 4.10447 3.05556 4.43328 3.02869C4.77085 3.00111 5.20757 3.00053 5.85 3.00053H6.25C6.66422 3.00053 7 2.66474 7 2.25053C7 1.83631 6.66422 1.50053 6.25 1.50053H5.85Z">');const Ls=e=>{const t=Or();return n=Os(),r=n.firstChild,en(()=>or(r,"fill",e.fill||t.colors.accent)),n;var n,r};var Ns=rr('<svg xmlns=http://www.w3.org/2000/svg width=17 height=16 viewBox="0 0 17 16"fill=none><g clip-path=url(#clip0_3676_1274)><path fill-rule=evenodd clip-rule=evenodd d="M1.82698 2.63901C1.5 3.28074 1.5 4.12082 1.5 5.80098V8.80098V9.00098V10.201C1.5 11.8811 1.5 12.7212 1.82698 13.3629C2.1146 13.9274 2.57354 14.3864 3.13803 14.674C3.77976 15.001 4.61984 15.001 6.3 15.001H11.7C13.3802 15.001 14.2202 15.001 14.862 14.674C15.4265 14.3864 15.8854 13.9274 16.173 13.3629C16.5 12.7212 16.5 11.8811 16.5 10.201V8.80098C16.5 7.12082 16.5 6.28074 16.173 5.63901C15.8854 5.07452 15.4265 4.61558 14.862 4.32796C14.743 4.26733 14.6172 4.21795 14.4805 4.17772C14.4501 3.49449 14.3722 3.02994 14.173 2.63901C13.8854 2.07452 13.4265 1.61558 12.862 1.32796C12.2202 1.00098 11.3802 1.00098 9.7 1.00098H6.3C4.61984 1.00098 3.77976 1.00098 3.13803 1.32796C2.57354 1.61558 2.1146 2.07452 1.82698 2.63901ZM12.9861 4.00942C12.9684 3.7108 12.9281 3.49982 12.8365 3.31999C12.6927 3.03775 12.4632 2.80828 12.181 2.66447C11.8601 2.50098 11.4401 2.50098 10.6 2.50098H5.4C4.55992 2.50098 4.13988 2.50098 3.81901 2.66447C3.53677 2.80828 3.3073 3.03775 3.16349 3.31999C3.03615 3.56991 3.00799 3.88 3.00177 4.40188C3.04646 4.37612 3.09189 4.35146 3.13803 4.32796C3.77976 4.00098 4.61984 4.00098 6.3 4.00098H11.7C12.1966 4.00098 12.6197 4.00098 12.9861 4.00942ZM3 7.90098V8.10098C3 8.47468 3 8.76527 3.01439 9.00098H3V11.101C3 11.9411 3 12.3611 3.16349 12.682C3.3073 12.9642 3.53677 13.1937 3.81901 13.3375C4.13988 13.501 4.55992 13.501 5.4 13.501H12.6C13.4401 13.501 13.8601 13.501 14.181 13.3375C14.4632 13.1937 14.6927 12.9642 14.8365 12.682C15 12.3611 15 11.9411 15 11.101V7.90098C15 7.0609 15 6.64086 14.8365 6.31999C14.6927 6.03775 14.4632 5.80828 14.181 5.66447C13.8601 5.50098 13.4401 5.50098 12.6 5.50098H5.4C4.55992 5.50098 4.13988 5.50098 3.81901 5.66447C3.53677 5.80828 3.3073 6.03775 3.16349 6.31999C3 6.64086 3 7.0609 3 7.90098ZM10.5 9.75098C10.5 9.33676 10.8358 9.00098 11.25 9.00098H12.75C13.1642 9.00098 13.5 9.33676 13.5 9.75098C13.5 10.1652 13.1642 10.501 12.75 10.501H11.25C10.8358 10.501 10.5 10.1652 10.5 9.75098Z"></path></g><defs><clipPath id=clip0_3676_1274><rect width=16 height=16 fill=white transform="translate(0.5 0.000976562)">');const Is=e=>{const t=Or();return n=Ns(),r=n.firstChild.firstChild,en(()=>or(r,"fill",e.fill||t.colors.accent)),n;var n,r};var Ws=rr('<svg xmlns=http://www.w3.org/2000/svg width=48 height=48 viewBox="0 0 48 48"fill=none><path fill-rule=evenodd clip-rule=evenodd d="M39.6319 16.8719C38.3212 16.2041 36.7002 16.0478 34 16.0112V11C34 5.47715 29.5228 1 24 1C18.4772 1 14 5.47715 14 11V16.0112C11.2998 16.0478 9.6788 16.2041 8.36808 16.8719C6.86278 17.6389 5.63893 18.8628 4.87195 20.3681C4 22.0794 4 24.3196 4 28.8V32.2C4 36.6804 4 38.9206 4.87195 40.6319C5.63893 42.1372 6.86278 43.3611 8.36808 44.1281C10.0794 45 12.3196 45 16.8 45H31.2C35.6804 45 37.9206 45 39.6319 44.1281C41.1372 43.3611 42.3611 42.1372 43.1281 40.6319C44 38.9206 44 36.6804 44 32.2V28.8C44 24.3196 44 22.0794 43.1281 20.3681C42.3611 18.8628 41.1372 17.6389 39.6319 16.8719ZM31 11V16H17V11C17 7.13401 20.134 4 24 4C27.866 4 31 7.13401 31 11ZM7.54497 21.73C7 22.7996 7 24.1997 7 27V34C7 36.8003 7 38.2004 7.54497 39.27C8.02433 40.2108 8.78924 40.9757 9.73005 41.455C10.7996 42 12.1997 42 15 42H33C35.8003 42 37.2004 42 38.27 41.455C39.2108 40.9757 39.9757 40.2108 40.455 39.27C41 38.2004 41 36.8003 41 34V27C41 24.1997 41 22.7996 40.455 21.73C39.9757 20.7892 39.2108 20.0243 38.27 19.545C37.2004 19 35.8003 19 33 19H15C12.1997 19 10.7996 19 9.73005 19.545C8.78924 20.0243 8.02433 20.7892 7.54497 21.73ZM24 24C23.1716 24 22.5 24.6716 22.5 25.5V29.5C22.5 30.3284 23.1716 31 24 31C24.8284 31 25.5 30.3284 25.5 29.5V25.5C25.5 24.6716 24.8284 24 24 24Z">');const Ps=e=>{const t=Or();return n=Ws(),r=n.firstChild,en(o=>{var i=e.class,a=e.fill||t.colors.icon.secondary;return i!==o.e&&or(n,"class",o.e=i),a!==o.t&&or(r,"fill",o.t=a),o},{e:void 0,t:void 0}),n;var n,r};var Us=rr('<svg xmlns=http://www.w3.org/2000/svg width=48 height=48 viewBox="0 0 48 48"fill=none><path fill-rule=evenodd clip-rule=evenodd d="M37.485 37.3849C40.894 33.9506 43 29.2212 43 24C43 13.5066 34.4934 5 24 5C13.5066 5 5 13.5066 5 24C5 29.2213 7.1061 33.9507 10.5151 37.385C13.3583 32.9438 18.3354 30 24.0001 30C29.6647 30 34.6418 32.9437 37.485 37.3849ZM35.1809 39.3635C32.9143 35.5532 28.7554 33 24.0001 33C19.2448 33 15.0858 35.5533 12.8193 39.3636C15.9564 41.6506 19.8206 43 24 43C28.1795 43 32.0437 41.6505 35.1809 39.3635ZM24 46C36.1503 46 46 36.1503 46 24C46 11.8497 36.1503 2 24 2C11.8497 2 2 11.8497 2 24C2 36.1503 11.8497 46 24 46ZM24 24C26.7614 24 29 21.7614 29 19C29 16.2386 26.7614 14 24 14C21.2386 14 19 16.2386 19 19C19 21.7614 21.2386 24 24 24ZM24 27C28.4183 27 32 23.4183 32 19C32 14.5817 28.4183 11 24 11C19.5817 11 16 14.5817 16 19C16 23.4183 19.5817 27 24 27Z">');const Ds=e=>{const t=Or();return n=Us(),r=n.firstChild,en(o=>{var i=e.class,a=e.fill||t.colors.icon.secondary;return i!==o.e&&or(n,"class",o.e=i),a!==o.t&&or(r,"fill",o.t=a),o},{e:void 0,t:void 0}),n;var n,r};var js=rr('<svg xmlns=http://www.w3.org/2000/svg width=48 height=48 viewBox="0 0 48 48"fill=none><path fill-rule=evenodd clip-rule=evenodd d="M34.5607 4.43934C33.9749 3.85355 33.0251 3.85355 32.4393 4.43934C31.8536 5.02513 31.8536 5.97487 32.4393 6.56066L37.8787 12H10.5C9.67157 12 9 12.6716 9 13.5C9 14.3284 9.67157 15 10.5 15H37.8787L32.4393 20.4393C31.8536 21.0251 31.8536 21.9749 32.4393 22.5607C33.0251 23.1464 33.9749 23.1464 34.5607 22.5607L42.5607 14.5607C43.1464 13.9749 43.1464 13.0251 42.5607 12.4393L34.5607 4.43934ZM13.4393 25.4393C14.0251 24.8536 14.9749 24.8536 15.5607 25.4393C16.1464 26.0251 16.1464 26.9749 15.5607 27.5607L10.1213 33H37.5C38.3284 33 39 33.6716 39 34.5C39 35.3284 38.3284 36 37.5 36H10.1213L15.5607 41.4393C16.1464 42.0251 16.1464 42.9749 15.5607 43.5607C14.9749 44.1464 14.0251 44.1464 13.4393 43.5607L5.43934 35.5607C4.85355 34.9749 4.85355 34.0251 5.43934 33.4393L13.4393 25.4393Z">');const Bs=e=>{const t=Or();return n=js(),r=n.firstChild,en(o=>{var i=e.class,a=e.fill||t.colors.icon.secondary;return i!==o.e&&or(n,"class",o.e=i),a!==o.t&&or(r,"fill",o.t=a),o},{e:void 0,t:void 0}),n;var n,r};var $s=rr('<svg xmlns=http://www.w3.org/2000/svg width=28 height=28 viewBox="0 0 28 28"fill=none><path fill-rule=evenodd clip-rule=evenodd d="M1.75 12.002C1.75 9.20169 1.75 7.80156 2.29497 6.732C2.77433 5.79119 3.53924 5.02629 4.48005 4.54692C5.54961 4.00195 6.94974 4.00195 9.75 4.00195H17.25C20.0503 4.00195 21.4504 4.00195 22.52 4.54692C23.4608 5.02629 24.2257 5.79119 24.705 6.732C24.8256 6.96861 24.9195 7.2214 24.9926 7.50195H21.5C19.6377 7.50195 18.7065 7.50195 17.9609 7.77334C16.711 8.22828 15.7263 9.21291 15.2714 10.4629C15 11.2085 15 12.1396 15 14.002C15 15.8643 15 16.7954 15.2714 17.541C15.7263 18.791 16.711 19.7756 17.9609 20.2306C18.7065 20.502 19.6377 20.502 21.5 20.502H24.9926C24.9195 20.7825 24.8256 21.0353 24.705 21.2719C24.2257 22.2127 23.4608 22.9776 22.52 23.457C21.4504 24.002 20.0503 24.002 17.25 24.002H9.75C6.94974 24.002 5.54961 24.002 4.48005 23.457C3.53924 22.9776 2.77433 22.2127 2.29497 21.2719C1.75 20.2023 1.75 18.8022 1.75 16.002V12.002ZM16.4999 13.802C16.4999 12.1218 16.4999 11.2817 16.8269 10.64C17.1145 10.0755 17.5735 9.61656 18.138 9.32894C18.7797 9.00196 19.6198 9.00196 21.2999 9.00196H23.1999C24.8801 9.00196 25.7202 9.00196 26.3619 9.32894C26.9264 9.61656 27.3853 10.0755 27.673 10.64C27.9999 11.2817 27.9999 12.1218 27.9999 13.802V14.202C27.9999 15.8821 27.9999 16.7222 27.673 17.3639C27.3853 17.9284 26.9264 18.3874 26.3619 18.675C25.7202 19.002 24.8801 19.002 23.1999 19.002H21.2999C19.6198 19.002 18.7797 19.002 18.138 18.675C17.5735 18.3874 17.1145 17.9284 16.8269 17.3639C16.4999 16.7222 16.4999 15.8821 16.4999 14.202V13.802ZM22.4999 14.002C22.4999 14.9685 21.7164 15.752 20.7499 15.752C19.7834 15.752 18.9999 14.9685 18.9999 14.002C18.9999 13.0355 19.7834 12.252 20.7499 12.252C21.7164 12.252 22.4999 13.0355 22.4999 14.002Z">');const qs=e=>{const t=Or();return n=$s(),r=n.firstChild,en(o=>{var i=e.class,a=e.fill||t.colors.constant.white;return i!==o.e&&or(n,"class",o.e=i),a!==o.t&&or(r,"fill",o.t=a),o},{e:void 0,t:void 0}),n;var n,r};var Ks=rr('<svg xmlns=http://www.w3.org/2000/svg width=28 height=28 viewBox="0 0 28 28"><path fill-rule=evenodd clip-rule=evenodd d="M10.0001 10.0001C10.0016 8.02333 10.0267 6.98719 10.436 6.18404C10.8195 5.43139 11.4314 4.81947 12.184 4.43597C13.0397 4 14.1598 4 16.4 4H17.6C19.8402 4 20.9603 4 21.816 4.43597C22.5686 4.81947 23.1805 5.43139 23.564 6.18404C24 7.03969 24 8.15979 24 10.4V11.6C24 13.8402 24 14.9603 23.564 15.816C23.1805 16.5686 22.5686 17.1805 21.816 17.564C21.0128 17.9733 19.9767 17.9984 17.9999 17.9999C17.9984 19.9767 17.9733 21.0128 17.564 21.816C17.1805 22.5686 16.5686 23.1805 15.816 23.564C14.9603 24 13.8402 24 11.6 24H10.4C8.15979 24 7.03969 24 6.18404 23.564C5.43139 23.1805 4.81947 22.5686 4.43597 21.816C4 20.9603 4 19.8402 4 17.6V16.4C4 14.1598 4 13.0397 4.43597 12.184C4.81947 11.4314 5.43139 10.8195 6.18404 10.436C6.98719 10.0267 8.02333 10.0016 10.0001 10.0001ZM10 11.5H9.5C8.09987 11.5 7.3998 11.5 6.86502 11.7725C6.39462 12.0122 6.01217 12.3946 5.77248 12.865C5.5 13.3998 5.5 14.0999 5.5 15.5V18.5C5.5 19.9001 5.5 20.6002 5.77248 21.135C6.01217 21.6054 6.39462 21.9878 6.86502 22.2275C7.3998 22.5 8.09987 22.5 9.5 22.5H12.5C13.9001 22.5 14.6002 22.5 15.135 22.2275C15.6054 21.9878 15.9878 21.6054 16.2275 21.135C16.5 20.6002 16.5 19.9001 16.5 18.5V18H16.4C14.1598 18 13.0397 18 12.184 17.564C11.4314 17.1805 10.8195 16.5686 10.436 15.816C10 14.9603 10 13.8402 10 11.6V11.5ZM11.5 9.5C11.5 8.09987 11.5 7.3998 11.7725 6.86502C12.0122 6.39462 12.3946 6.01217 12.865 5.77248C13.3998 5.5 14.0999 5.5 15.5 5.5H18.5C19.9001 5.5 20.6002 5.5 21.135 5.77248C21.6054 6.01217 21.9878 6.39462 22.2275 6.86502C22.5 7.3998 22.5 8.09987 22.5 9.5V12.5C22.5 13.9001 22.5 14.6002 22.2275 15.135C21.9878 15.6054 21.6054 15.9878 21.135 16.2275C20.6002 16.5 19.9001 16.5 18.5 16.5H15.5C14.0999 16.5 13.3998 16.5 12.865 16.2275C12.3946 15.9878 12.0122 15.6054 11.7725 15.135C11.5 14.6002 11.5 13.9001 11.5 12.5V9.5Z">');const Hs=e=>{const t=Or(),n=()=>e.fill||t.colors.icon.secondary;return r=Ks(),o=r.firstChild,en(e=>{var t=n(),i=n();return t!==e.e&&or(r,"fill",e.e=t),i!==e.t&&or(o,"fill",e.t=i),e},{e:void 0,t:void 0}),r;var r,o};var Fs=rr('<svg xmlns=http://www.w3.org/2000/svg width=16 height=17 viewBox="0 0 16 17"fill=none><path fill-rule=evenodd clip-rule=evenodd d="M1 4.12695C1 3.07754 1 2.55284 1.19202 2.14684C1.38986 1.72856 1.7266 1.39181 2.14489 1.19397C2.55088 1.00195 3.07559 1.00195 4.125 1.00195C5.17441 1.00195 5.69912 1.00195 6.10511 1.19397C6.5234 1.39181 6.86014 1.72856 7.05798 2.14684C7.25 2.55284 7.25 3.07754 7.25 4.12695C7.25 5.17636 7.25 5.70107 7.05798 6.10706C6.86014 6.52535 6.5234 6.8621 6.10511 7.05993C5.69912 7.25195 5.17441 7.25195 4.125 7.25195C3.07559 7.25195 2.55088 7.25195 2.14489 7.05993C1.7266 6.8621 1.38986 6.52535 1.19202 6.10706C1 5.70107 1 5.17636 1 4.12695ZM2.5 3.30195C2.5 3.02193 2.5 2.88191 2.5545 2.77496C2.60243 2.68088 2.67892 2.60439 2.773 2.55645C2.87996 2.50195 3.01997 2.50195 3.3 2.50195H4.95C5.23003 2.50195 5.37004 2.50195 5.477 2.55645C5.57108 2.60439 5.64757 2.68088 5.6955 2.77496C5.75 2.88191 5.75 3.02193 5.75 3.30195V4.95195C5.75 5.23198 5.75 5.37199 5.6955 5.47895C5.64757 5.57303 5.57108 5.64952 5.477 5.69746C5.37004 5.75195 5.23003 5.75195 4.95 5.75195H3.3C3.01997 5.75195 2.87996 5.75195 2.773 5.69746C2.67892 5.64952 2.60243 5.57303 2.5545 5.47895C2.5 5.37199 2.5 5.23198 2.5 4.95195V3.30195ZM1 11.877C1 10.8275 1 10.3028 1.19202 9.89684C1.38986 9.47856 1.7266 9.14181 2.14489 8.94397C2.55088 8.75195 3.07559 8.75195 4.125 8.75195C5.17441 8.75195 5.69912 8.75195 6.10511 8.94397C6.5234 9.14181 6.86014 9.47856 7.05798 9.89684C7.25 10.3028 7.25 10.8275 7.25 11.877C7.25 12.9264 7.25 13.4511 7.05798 13.8571C6.86014 14.2753 6.5234 14.6121 6.10511 14.8099C5.69912 15.002 5.17441 15.002 4.125 15.002C3.07559 15.002 2.55088 15.002 2.14489 14.8099C1.7266 14.6121 1.38986 14.2753 1.19202 13.8571C1 13.4511 1 12.9264 1 11.877ZM2.5 11.052C2.5 10.7719 2.5 10.6319 2.5545 10.525C2.60243 10.4309 2.67892 10.3544 2.773 10.3064C2.87996 10.252 3.01997 10.252 3.3 10.252H4.95C5.23003 10.252 5.37004 10.252 5.477 10.3064C5.57108 10.3544 5.64757 10.4309 5.6955 10.525C5.75 10.6319 5.75 10.7719 5.75 11.052V12.702C5.75 12.982 5.75 13.122 5.6955 13.2289C5.64757 13.323 5.57108 13.3995 5.477 13.4475C5.37004 13.502 5.23003 13.502 4.95 13.502H3.3C3.01997 13.502 2.87996 13.502 2.773 13.4475C2.67892 13.3995 2.60243 13.323 2.5545 13.2289C2.5 13.122 2.5 12.982 2.5 12.702V11.052ZM8.94202 2.14684C8.75 2.55284 8.75 3.07754 8.75 4.12695C8.75 5.17636 8.75 5.70107 8.94202 6.10706C9.13986 6.52535 9.4766 6.8621 9.89489 7.05993C10.3009 7.25195 10.8256 7.25195 11.875 7.25195C12.9244 7.25195 13.4491 7.25195 13.8551 7.05993C14.2734 6.8621 14.6101 6.52535 14.808 6.10706C15 5.70107 15 5.17636 15 4.12695C15 3.07754 15 2.55284 14.808 2.14684C14.6101 1.72856 14.2734 1.39181 13.8551 1.19397C13.4491 1.00195 12.9244 1.00195 11.875 1.00195C10.8256 1.00195 10.3009 1.00195 9.89489 1.19397C9.4766 1.39181 9.13986 1.72856 8.94202 2.14684ZM10.3045 2.77496C10.25 2.88191 10.25 3.02193 10.25 3.30195V4.95195C10.25 5.23198 10.25 5.37199 10.3045 5.47895C10.3524 5.57303 10.4289 5.64952 10.523 5.69746C10.63 5.75195 10.77 5.75195 11.05 5.75195H12.7C12.98 5.75195 13.12 5.75195 13.227 5.69746C13.3211 5.64952 13.3976 5.57303 13.4455 5.47895C13.5 5.37199 13.5 5.23198 13.5 4.95195V3.30195C13.5 3.02193 13.5 2.88191 13.4455 2.77496C13.3976 2.68088 13.3211 2.60439 13.227 2.55645C13.12 2.50195 12.98 2.50195 12.7 2.50195H11.05C10.77 2.50195 10.63 2.50195 10.523 2.55645C10.4289 2.60439 10.3524 2.68088 10.3045 2.77496ZM8.80727 9.13518C8.75 9.26242 8.75 9.4256 8.75 9.75195C8.75 10.0783 8.75 10.2415 8.80727 10.3687C8.87245 10.5136 8.9884 10.6295 9.13323 10.6947C9.26047 10.752 9.42365 10.752 9.75 10.752C10.0764 10.752 10.2395 10.752 10.3668 10.6947C10.5116 10.6295 10.6276 10.5136 10.6927 10.3687C10.75 10.2415 10.75 10.0783 10.75 9.75195C10.75 9.4256 10.75 9.26242 10.6927 9.13518C10.6276 8.99035 10.5116 8.8744 10.3668 8.80922C10.2395 8.75195 10.0764 8.75195 9.75 8.75195C9.42365 8.75195 9.26047 8.75195 9.13323 8.80922C8.9884 8.8744 8.87245 8.99035 8.80727 9.13518ZM10.87 11.8771C10.87 11.546 10.87 11.3805 10.9289 11.2517C10.9938 11.1098 11.1077 10.9959 11.2497 10.931C11.3784 10.8721 11.5439 10.8721 11.875 10.8721C12.2061 10.8721 12.3716 10.8721 12.5003 10.931C12.6423 10.9959 12.7562 11.1098 12.8211 11.2517C12.88 11.3805 12.88 11.546 12.88 11.8771C12.88 12.2081 12.88 12.3737 12.8211 12.5024C12.7562 12.6444 12.6423 12.7583 12.5003 12.8232C12.3716 12.8821 12.2061 12.8821 11.875 12.8821C11.5439 12.8821 11.3784 12.8821 11.2497 12.8232C11.1077 12.7583 10.9938 12.6444 10.9289 12.5024C10.87 12.3737 10.87 12.2081 10.87 11.8771ZM8.80727 13.3852C8.75 13.5124 8.75 13.6756 8.75 14.002C8.75 14.3283 8.75 14.4915 8.80727 14.6187C8.87245 14.7636 8.9884 14.8795 9.13323 14.9447C9.26047 15.002 9.42365 15.002 9.75 15.002C10.0764 15.002 10.2395 15.002 10.3668 14.9447C10.5116 14.8795 10.6276 14.7636 10.6927 14.6187C10.75 14.4915 10.75 14.3283 10.75 14.002C10.75 13.6756 10.75 13.5124 10.6927 13.3852C10.6276 13.2404 10.5116 13.1244 10.3668 13.0592C10.2395 13.002 10.0764 13.002 9.75 13.002C9.42365 13.002 9.26047 13.002 9.13323 13.0592C8.9884 13.1244 8.87245 13.2404 8.80727 13.3852ZM13 9.75195C13 9.4256 13 9.26242 13.0573 9.13518C13.1224 8.99035 13.2384 8.8744 13.3832 8.80922C13.5105 8.75195 13.6736 8.75195 14 8.75195C14.3264 8.75195 14.4895 8.75195 14.6168 8.80922C14.7616 8.8744 14.8776 8.99035 14.9427 9.13518C15 9.26242 15 9.4256 15 9.75195C15 10.0783 15 10.2415 14.9427 10.3687C14.8776 10.5136 14.7616 10.6295 14.6168 10.6947C14.4895 10.752 14.3264 10.752 14 10.752C13.6736 10.752 13.5105 10.752 13.3832 10.6947C13.2384 10.6295 13.1224 10.5136 13.0573 10.3687C13 10.2415 13 10.0783 13 9.75195ZM13.0573 13.3852C13 13.5124 13 13.6756 13 14.002C13 14.3283 13 14.4915 13.0573 14.6187C13.1224 14.7636 13.2384 14.8795 13.3832 14.9447C13.5105 15.002 13.6736 15.002 14 15.002C14.3264 15.002 14.4895 15.002 14.6168 14.9447C14.7616 14.8795 14.8776 14.7636 14.9427 14.6187C15 14.4915 15 14.3283 15 14.002C15 13.6756 15 13.5124 14.9427 13.3852C14.8776 13.2404 14.7616 13.1244 14.6168 13.0592C14.4895 13.002 14.3264 13.002 14 13.002C13.6736 13.002 13.5105 13.002 13.3832 13.0592C13.2384 13.1244 13.1224 13.2404 13.0573 13.3852Z">');const Vs=e=>{const t=Or();return n=Fs(),r=n.firstChild,en(()=>or(r,"fill",e.fill||t.colors.icon.secondary)),n;var n,r},zs={m:"16px",s:"12px",none:"0"},Zs={m:"6px",s:"6px",none:"0"},Gs=Nr.div`
475
+ `;return ir(()=>{return ir(()=>"xs"===n())()?(l=vs(),c=l.firstChild,on(t=>{var n=Oi(o,e.class),i=r();return n!==t.e&&lr(l,"class",t.e=n),i!==t.t&&lr(c,"fill",t.t=i),t},{e:void 0,t:void 0}),l):ir(()=>"s"===n())()?(a=bs(),s=a.firstChild,on(t=>{var n=Oi(o,e.class),i=r();return n!==t.e&&lr(a,"class",t.e=n),i!==t.t&&lr(s,"fill",t.t=i),t},{e:void 0,t:void 0}),a):(t=Cs(),i=t.firstChild,on(n=>{var a=Oi(o,e.class),s=r();return a!==n.e&&lr(t,"class",n.e=a),s!==n.t&&lr(i,"stroke",n.t=s),n},{e:void 0,t:void 0}),t);var t,i,a,s,l,c})};var Ss=sr('<svg width=158 height=28 viewBox="0 0 158 28"fill=none xmlns=http://www.w3.org/2000/svg><path fill-rule=evenodd clip-rule=evenodd d="M28 14.001C28 21.733 21.732 28.001 14 28.001C6.26801 28.001 0 21.733 0 14.001C0 6.26899 6.26801 0.000976562 14 0.000976562C21.732 0.000976562 28 6.26899 28 14.001ZM9.21931 8.00098H18.7801H18.7813C20.538 8.00098 21.6522 9.89966 20.7691 11.4302L14.8672 21.6576C14.4822 22.3254 13.5172 22.3254 13.1322 21.6576L7.23158 11.4302C6.34721 9.89726 7.4614 8.00098 9.21931 8.00098ZM13.1262 18.5882V9.74806H9.21811C8.78976 9.74806 8.53708 10.2029 8.74163 10.5578L11.8423 16.1035L13.1262 18.5882ZM16.1559 16.1047L19.2554 10.5566C19.4599 10.2017 19.2073 9.74685 18.7789 9.74685H14.8709V18.5906L16.1559 16.1047Z"fill=#0098EA></path><path d="M18.7802 8.00098H9.21936C7.46145 8.00098 6.34727 9.89726 7.23164 11.4302L13.1322 21.6576C13.5173 22.3254 14.4823 22.3254 14.8673 21.6576L20.7691 11.4302C21.6523 9.89966 20.5381 8.00098 18.7814 8.00098H18.7802ZM13.1274 18.5906L11.8424 16.1035L8.74168 10.5578C8.53714 10.2029 8.78981 9.74806 9.21816 9.74806H13.1262V18.5918L13.1274 18.5906ZM19.2555 10.5566L16.156 16.1047L14.8709 18.5906V9.74685H18.779C19.2073 9.74685 19.46 10.2017 19.2555 10.5566Z"fill=white></path><path fill-rule=evenodd clip-rule=evenodd d="M51.7483 22.1967C55.7182 22.1967 58.9609 18.954 58.9609 14.9841C58.9609 11.0142 55.7182 7.77148 51.7483 7.77148C47.7588 7.77148 44.5357 11.0142 44.5357 14.9841C44.5357 18.954 47.7588 22.1967 51.7483 22.1967ZM51.7483 19.1702C49.4686 19.1702 47.6802 17.2442 47.6802 14.9841C47.6802 12.724 49.4686 10.798 51.7483 10.798C54.0084 10.798 55.7968 12.724 55.7968 14.9841C55.7968 17.2442 54.0084 19.1702 51.7483 19.1702ZM37.0698 21.9609H40.2142V10.9946H44.2843V8.00732H33V10.9946H37.0698V21.9609ZM69.9379 8.00732H73.0823V21.9609H70.3899L63.59 13.3333V21.9609H60.4652V8.00732H63.1576L69.9379 16.6153V8.00732ZM79.2259 14.9887C79.2259 10.9202 82.351 7.77539 86.4982 7.77539C89.8592 7.77539 92.5519 9.95709 93.2202 12.6891H90.7437C90.154 11.0971 88.4637 9.9964 86.4982 9.9964C83.5893 9.9964 81.5452 12.1781 81.5452 14.9887C81.5452 17.7994 83.5893 19.9811 86.4982 19.9811C88.4637 19.9811 90.154 18.8804 90.7437 17.2884H93.2202C92.5519 20.0204 89.8592 22.2021 86.4982 22.2021C82.351 22.2021 79.2259 19.0573 79.2259 14.9887ZM104.584 17.0525C104.584 19.9025 102.343 22.1628 99.4342 22.1628C96.5253 22.1628 94.2846 19.9025 94.2846 17.0525C94.2846 14.2025 96.5253 11.9422 99.4342 11.9422C102.343 11.9422 104.584 14.2025 104.584 17.0525ZM96.4663 17.0525C96.4663 18.8018 97.6849 20.158 99.4342 20.158C101.164 20.158 102.382 18.8018 102.382 17.0525C102.382 15.3032 101.164 13.947 99.4342 13.947C97.6849 13.947 96.4663 15.3032 96.4663 17.0525ZM108.626 12.1388H106.463V21.9662H108.626V17.1311C108.626 15.0281 109.726 13.9077 111.161 13.9077C112.419 13.9077 113.205 14.8512 113.205 16.4039V21.9662H115.367V16.0501C115.367 13.5539 113.893 11.9422 111.613 11.9422C110.335 11.9422 109.215 12.4926 108.626 13.4753V12.1388ZM117.839 12.1388H120.001V13.4753C120.59 12.4926 121.711 11.9422 122.988 11.9422C125.268 11.9422 126.742 13.5539 126.742 16.0501V21.9662H124.58V16.4039C124.58 14.8512 123.794 13.9077 122.536 13.9077C121.101 13.9077 120.001 15.0281 120.001 17.1311V21.9662H117.839V12.1388ZM133.558 22.1628C136.054 22.1628 137.823 20.728 138.373 18.8804H136.113C135.661 19.8238 134.717 20.2563 133.636 20.2563C131.887 20.2563 130.747 19.077 130.668 17.5832H138.491C138.688 14.2419 136.585 11.9422 133.577 11.9422C130.551 11.9422 128.526 14.1436 128.526 17.0525C128.526 20.0007 130.629 22.1628 133.558 22.1628ZM130.747 16.0501C131.042 14.5367 132.162 13.7505 133.518 13.7505C134.717 13.7505 135.838 14.4581 136.172 16.0501H130.747ZM149.851 18.3694C149.32 20.5511 147.453 22.1628 144.859 22.1628C141.871 22.1628 139.709 19.8828 139.709 17.0525C139.709 14.2222 141.871 11.9422 144.859 11.9422C147.453 11.9422 149.32 13.5539 149.851 15.7356H147.571C147.178 14.6743 146.215 13.9077 144.859 13.9077C143.109 13.9077 141.91 15.2246 141.91 17.0525C141.91 18.8804 143.109 20.1973 144.859 20.1973C146.215 20.1973 147.178 19.4307 147.571 18.3694H149.851ZM155.75 22.0645C156.418 22.0645 156.929 21.9859 157.362 21.8483V19.9221C157.047 20.0401 156.615 20.1187 156.202 20.1187C155.082 20.1187 154.551 19.6666 154.551 18.448V14.065H157.362V12.1388H154.551V9.40675H152.389V12.1388H150.345V14.065H152.389V18.8018C152.389 21.0228 153.863 22.0645 155.75 22.0645Z">');const ks=()=>{const e=Wr();return t=Ss(),n=t.firstChild.nextSibling.nextSibling,on(()=>lr(n,"fill",e.theme===Sr.DARK?e.colors.constant.white:e.colors.constant.black)),t;var t,n};var Rs=sr('<svg xmlns=http://www.w3.org/2000/svg width=16 height=16 viewBox="0 0 16 16"fill=none><path fill-rule=evenodd clip-rule=evenodd d="M5.56608 4.42584C5.82527 3.32158 6.8176 2.5 8.00001 2.5C9.38072 2.5 10.5 3.61929 10.5 5C10.5 5.63026 10.3391 6.0386 10.1264 6.34455C9.90018 6.66993 9.58561 6.92478 9.18864 7.20877C9.12579 7.25372 9.05873 7.30025 8.9887 7.34883C8.27392 7.84472 7.25001 8.55507 7.25001 10V10.25C7.25001 10.6642 7.5858 11 8.00001 11C8.41422 11 8.75001 10.6642 8.75001 10.25V10C8.75001 9.36502 9.10777 9.1096 9.94554 8.51149L10.0614 8.42873C10.4769 8.13147 10.9748 7.75194 11.358 7.20076C11.7547 6.63015 12 5.91973 12 5C12 2.79086 10.2091 1 8.00001 1C6.10564 1 4.5205 2.31615 4.10577 4.08308C4.01112 4.48634 4.26129 4.88997 4.66454 4.98462C5.0678 5.07927 5.47143 4.8291 5.56608 4.42584ZM8.00001 15C8.60752 15 9.10001 14.5075 9.10001 13.9C9.10001 13.2925 8.60752 12.8 8.00001 12.8C7.39249 12.8 6.90001 13.2925 6.90001 13.9C6.90001 14.5075 7.39249 15 8.00001 15Z">');const Es=e=>{const t=Wr();return n=Rs(),r=n.firstChild,on(()=>lr(r,"fill",e.fill||t.colors.icon.secondary)),n;var n,r};var Ts=sr('<svg xmlns=http://www.w3.org/2000/svg width=16 height=16 viewBox="0 0 16 16"fill=none><path fill-rule=evenodd clip-rule=evenodd d="M9.98156 8.75C9.84854 11.4328 9.01206 13.5 8 13.5C6.98794 13.5 6.15146 11.4328 6.01844 8.75H9.98156ZM11.4832 8.75C11.4217 10.1155 11.1929 11.3869 10.8239 12.4017C10.7734 12.5405 10.7188 12.6789 10.6595 12.8154C12.1454 11.993 13.2103 10.5029 13.4493 8.75H11.4832ZM13.4493 7.25H11.4832C11.4217 5.88453 11.1929 4.61314 10.8239 3.5983C10.7734 3.4595 10.7188 3.32111 10.6595 3.18459C12.1454 4.00697 13.2103 5.49709 13.4493 7.25ZM9.98156 7.25H6.01844C6.15144 4.56764 6.98769 2.50062 7.99955 2.5H8C9.01206 2.5 9.84854 4.56724 9.98156 7.25ZM4.51678 7.25C4.57826 5.88453 4.80706 4.61314 5.1761 3.5983C5.22657 3.4595 5.28124 3.32111 5.3405 3.18459C3.85463 4.00697 2.78972 5.49709 2.55071 7.25H4.51678ZM2.55071 8.75C2.78972 10.5029 3.85463 11.993 5.3405 12.8154C5.28124 12.6789 5.22657 12.5405 5.1761 12.4017C4.80706 11.3869 4.57826 10.1155 4.51678 8.75H2.55071ZM15 8C15 11.866 11.866 15 8 15C4.13401 15 1 11.866 1 8C1 4.13401 4.13401 1 8 1C11.866 1 15 4.13401 15 8Z">');const As=e=>{const t=Wr();return n=Ts(),r=n.firstChild,on(()=>lr(r,"fill",e.fill||t.colors.icon.primary)),n;var n,r};var Ms=sr('<svg xmlns=http://www.w3.org/2000/svg width=16 height=16 viewBox="0 0 16 16"fill=none><path fill-rule=evenodd clip-rule=evenodd d="M2.5 4.8C2.5 3.11984 2.5 2.27976 2.82698 1.63803C3.1146 1.07354 3.57354 0.614601 4.13803 0.32698C4.77976 0 5.61984 0 7.3 0H8.7C10.3802 0 11.2202 0 11.862 0.32698C12.4265 0.614601 12.8854 1.07354 13.173 1.63803C13.5 2.27976 13.5 3.11984 13.5 4.8V11.2C13.5 12.8802 13.5 13.7202 13.173 14.362C12.8854 14.9265 12.4265 15.3854 11.862 15.673C11.2202 16 10.3802 16 8.7 16H7.3C5.61984 16 4.77976 16 4.13803 15.673C3.57354 15.3854 3.1146 14.9265 2.82698 14.362C2.5 13.7202 2.5 12.8802 2.5 11.2V4.8ZM4 3.9C4 3.05992 4 2.63988 4.16349 2.31901C4.3073 2.03677 4.53677 1.8073 4.81901 1.66349C5.13988 1.5 5.55992 1.5 6.4 1.5H9.6C10.4401 1.5 10.8601 1.5 11.181 1.66349C11.4632 1.8073 11.6927 2.03677 11.8365 2.31901C12 2.63988 12 3.05992 12 3.9V12.1C12 12.9401 12 13.3601 11.8365 13.681C11.6927 13.9632 11.4632 14.1927 11.181 14.3365C10.8601 14.5 10.4401 14.5 9.6 14.5H6.4C5.55992 14.5 5.13988 14.5 4.81901 14.3365C4.53677 14.1927 4.3073 13.9632 4.16349 13.681C4 13.3601 4 12.9401 4 12.1V3.9ZM7 2.5C6.58579 2.5 6.25 2.83579 6.25 3.25C6.25 3.66421 6.58579 4 7 4H9C9.41421 4 9.75 3.66421 9.75 3.25C9.75 2.83579 9.41421 2.5 9 2.5H7Z">');const _s=e=>{const t=Wr();return n=Ms(),r=n.firstChild,on(()=>lr(r,"fill",e.fill||t.colors.icon.primary)),n;var n,r};var Os=sr('<svg xmlns=http://www.w3.org/2000/svg width=16 height=16 viewBox="0 0 16 16"fill=none><path fill-rule=evenodd clip-rule=evenodd d="M1.5 6.8C1.5 5.11984 1.5 4.27976 1.82698 3.63803C2.1146 3.07354 2.57354 2.6146 3.13803 2.32698C3.77976 2 4.61984 2 6.3 2H9.7C11.3802 2 12.2202 2 12.862 2.32698C13.4265 2.6146 13.8854 3.07354 14.173 3.63803C14.5 4.27976 14.5 5.11984 14.5 6.8V11.5H15.25C15.6642 11.5 16 11.8358 16 12.25C16 12.6642 15.6642 13 15.25 13H0.75C0.335786 13 0 12.6642 0 12.25C0 11.8358 0.335786 11.5 0.75 11.5H1.5V6.8ZM3 11.5H13V5.9C13 5.05992 13 4.63988 12.8365 4.31901C12.6927 4.03677 12.4632 3.8073 12.181 3.66349C11.8601 3.5 11.4401 3.5 10.6 3.5H5.4C4.55992 3.5 4.13988 3.5 3.81901 3.66349C3.53677 3.8073 3.3073 4.03677 3.16349 4.31901C3 4.63988 3 5.05992 3 5.9V11.5Z">');const Ls=e=>{const t=Wr();return n=Os(),r=n.firstChild,on(()=>lr(r,"fill",e.fill||t.colors.icon.primary)),n;var n,r};var Is=sr('<svg xmlns=http://www.w3.org/2000/svg width=17 height=16 viewBox="0 0 17 16"fill=none><g clip-path=url(#clip0_3676_1603)><path fill-rule=evenodd clip-rule=evenodd d="M15.5 1.25049C15.5 0.836275 15.1642 0.500488 14.75 0.500488C14.3358 0.500488 14 0.836275 14 1.25049V3.67012C12.7187 2.04487 10.7318 1.00049 8.5 1.00049C4.63401 1.00049 1.5 4.1345 1.5 8.00049C1.5 11.8665 4.63401 15.0005 8.5 15.0005C11.6844 15.0005 14.3703 12.8748 15.2199 9.96661C15.3361 9.56902 15.1079 9.15254 14.7103 9.03638C14.3127 8.92023 13.8962 9.14838 13.7801 9.54597C13.1123 11.8319 11 13.5005 8.5 13.5005C5.46243 13.5005 3 11.0381 3 8.00049C3 4.96292 5.46243 2.50049 8.5 2.50049C10.321 2.50049 11.9363 3.3855 12.9377 4.75049H10.5C10.0858 4.75049 9.75 5.08627 9.75 5.50049C9.75 5.9147 10.0858 6.25049 10.5 6.25049H14.75C15.1642 6.25049 15.5 5.9147 15.5 5.50049V1.25049Z"></path></g><defs><clipPath id=clip0_3676_1603><rect width=16 height=16 fill=white transform="translate(0.5 0.000488281)">');const Ns=e=>{const t=Wr();return n=Is(),r=n.firstChild.firstChild,on(()=>lr(r,"fill",e.fill||t.colors.accent)),n;var n,r};var Ws=sr('<svg xmlns=http://www.w3.org/2000/svg width=16 height=16 viewBox="0 0 16 16"fill=none><path fill-rule=evenodd clip-rule=evenodd d="M13 4.06119V6.75053C13 7.16474 13.3358 7.50053 13.75 7.50053C14.1642 7.50053 14.5 7.16474 14.5 6.75053V2.75053L14.5 2.72807C14.5001 2.63191 14.5003 2.49627 14.4842 2.37627C14.4638 2.22503 14.4063 1.99261 14.2071 1.79342C14.0079 1.59423 13.7755 1.5367 13.6243 1.51637C13.5043 1.50023 13.3686 1.50039 13.2725 1.50051L13.25 1.50053H9.25C8.83579 1.50053 8.5 1.83631 8.5 2.25053C8.5 2.66474 8.83579 3.00053 9.25 3.00053H11.9393L7.21967 7.7202C6.92678 8.01309 6.92678 8.48796 7.21967 8.78086C7.51256 9.07375 7.98744 9.07375 8.28033 8.78086L13 4.06119ZM5.85 1.50053H5.81903H5.81899C5.21528 1.50052 4.71702 1.50051 4.31113 1.53367C3.88956 1.56812 3.50203 1.64204 3.13803 1.82751C2.57354 2.11513 2.1146 2.57407 1.82698 3.13856C1.64151 3.50256 1.56759 3.89009 1.53315 4.31166C1.49998 4.71755 1.49999 5.21581 1.5 5.81953V5.81955V5.85053V10.1505V10.1815V10.1815C1.49999 10.7852 1.49998 11.2835 1.53315 11.6894C1.56759 12.111 1.64151 12.4985 1.82698 12.8625C2.1146 13.427 2.57354 13.8859 3.13803 14.1735C3.50203 14.359 3.88956 14.4329 4.31113 14.4674C4.71702 14.5005 5.21527 14.5005 5.81897 14.5005H5.81901H5.85H10.15H10.181H10.181C10.7847 14.5005 11.283 14.5005 11.6889 14.4674C12.1104 14.4329 12.498 14.359 12.862 14.1735C13.4265 13.8859 13.8854 13.427 14.173 12.8625C14.3585 12.4985 14.4324 12.111 14.4669 11.6894C14.5 11.2835 14.5 10.7853 14.5 10.1816V10.1815V10.1505V9.75053C14.5 9.33631 14.1642 9.00053 13.75 9.00053C13.3358 9.00053 13 9.33631 13 9.75053V10.1505C13 10.793 12.9994 11.2297 12.9718 11.5672C12.945 11.8961 12.8963 12.0642 12.8365 12.1815C12.6927 12.4638 12.4632 12.6932 12.181 12.837C12.0637 12.8968 11.8955 12.9455 11.5667 12.9724C11.2292 12.9999 10.7924 13.0005 10.15 13.0005H5.85C5.20757 13.0005 4.77085 12.9999 4.43328 12.9724C4.10447 12.9455 3.93632 12.8968 3.81902 12.837C3.53677 12.6932 3.3073 12.4638 3.16349 12.1815C3.10372 12.0642 3.05503 11.8961 3.02816 11.5672C3.00058 11.2297 3 10.793 3 10.1505V5.85053C3 5.20809 3.00058 4.77137 3.02816 4.43381C3.05503 4.10499 3.10372 3.93684 3.16349 3.81954C3.3073 3.5373 3.53677 3.30783 3.81902 3.16402C3.93632 3.10425 4.10447 3.05556 4.43328 3.02869C4.77085 3.00111 5.20757 3.00053 5.85 3.00053H6.25C6.66422 3.00053 7 2.66474 7 2.25053C7 1.83631 6.66422 1.50053 6.25 1.50053H5.85Z">');const Ps=e=>{const t=Wr();return n=Ws(),r=n.firstChild,on(()=>lr(r,"fill",e.fill||t.colors.accent)),n;var n,r};var Us=sr('<svg xmlns=http://www.w3.org/2000/svg width=17 height=16 viewBox="0 0 17 16"fill=none><g clip-path=url(#clip0_3676_1274)><path fill-rule=evenodd clip-rule=evenodd d="M1.82698 2.63901C1.5 3.28074 1.5 4.12082 1.5 5.80098V8.80098V9.00098V10.201C1.5 11.8811 1.5 12.7212 1.82698 13.3629C2.1146 13.9274 2.57354 14.3864 3.13803 14.674C3.77976 15.001 4.61984 15.001 6.3 15.001H11.7C13.3802 15.001 14.2202 15.001 14.862 14.674C15.4265 14.3864 15.8854 13.9274 16.173 13.3629C16.5 12.7212 16.5 11.8811 16.5 10.201V8.80098C16.5 7.12082 16.5 6.28074 16.173 5.63901C15.8854 5.07452 15.4265 4.61558 14.862 4.32796C14.743 4.26733 14.6172 4.21795 14.4805 4.17772C14.4501 3.49449 14.3722 3.02994 14.173 2.63901C13.8854 2.07452 13.4265 1.61558 12.862 1.32796C12.2202 1.00098 11.3802 1.00098 9.7 1.00098H6.3C4.61984 1.00098 3.77976 1.00098 3.13803 1.32796C2.57354 1.61558 2.1146 2.07452 1.82698 2.63901ZM12.9861 4.00942C12.9684 3.7108 12.9281 3.49982 12.8365 3.31999C12.6927 3.03775 12.4632 2.80828 12.181 2.66447C11.8601 2.50098 11.4401 2.50098 10.6 2.50098H5.4C4.55992 2.50098 4.13988 2.50098 3.81901 2.66447C3.53677 2.80828 3.3073 3.03775 3.16349 3.31999C3.03615 3.56991 3.00799 3.88 3.00177 4.40188C3.04646 4.37612 3.09189 4.35146 3.13803 4.32796C3.77976 4.00098 4.61984 4.00098 6.3 4.00098H11.7C12.1966 4.00098 12.6197 4.00098 12.9861 4.00942ZM3 7.90098V8.10098C3 8.47468 3 8.76527 3.01439 9.00098H3V11.101C3 11.9411 3 12.3611 3.16349 12.682C3.3073 12.9642 3.53677 13.1937 3.81901 13.3375C4.13988 13.501 4.55992 13.501 5.4 13.501H12.6C13.4401 13.501 13.8601 13.501 14.181 13.3375C14.4632 13.1937 14.6927 12.9642 14.8365 12.682C15 12.3611 15 11.9411 15 11.101V7.90098C15 7.0609 15 6.64086 14.8365 6.31999C14.6927 6.03775 14.4632 5.80828 14.181 5.66447C13.8601 5.50098 13.4401 5.50098 12.6 5.50098H5.4C4.55992 5.50098 4.13988 5.50098 3.81901 5.66447C3.53677 5.80828 3.3073 6.03775 3.16349 6.31999C3 6.64086 3 7.0609 3 7.90098ZM10.5 9.75098C10.5 9.33676 10.8358 9.00098 11.25 9.00098H12.75C13.1642 9.00098 13.5 9.33676 13.5 9.75098C13.5 10.1652 13.1642 10.501 12.75 10.501H11.25C10.8358 10.501 10.5 10.1652 10.5 9.75098Z"></path></g><defs><clipPath id=clip0_3676_1274><rect width=16 height=16 fill=white transform="translate(0.5 0.000976562)">');const Ds=e=>{const t=Wr();return n=Us(),r=n.firstChild.firstChild,on(()=>lr(r,"fill",e.fill||t.colors.accent)),n;var n,r};var js=sr('<svg xmlns=http://www.w3.org/2000/svg width=48 height=48 viewBox="0 0 48 48"fill=none><path fill-rule=evenodd clip-rule=evenodd d="M39.6319 16.8719C38.3212 16.2041 36.7002 16.0478 34 16.0112V11C34 5.47715 29.5228 1 24 1C18.4772 1 14 5.47715 14 11V16.0112C11.2998 16.0478 9.6788 16.2041 8.36808 16.8719C6.86278 17.6389 5.63893 18.8628 4.87195 20.3681C4 22.0794 4 24.3196 4 28.8V32.2C4 36.6804 4 38.9206 4.87195 40.6319C5.63893 42.1372 6.86278 43.3611 8.36808 44.1281C10.0794 45 12.3196 45 16.8 45H31.2C35.6804 45 37.9206 45 39.6319 44.1281C41.1372 43.3611 42.3611 42.1372 43.1281 40.6319C44 38.9206 44 36.6804 44 32.2V28.8C44 24.3196 44 22.0794 43.1281 20.3681C42.3611 18.8628 41.1372 17.6389 39.6319 16.8719ZM31 11V16H17V11C17 7.13401 20.134 4 24 4C27.866 4 31 7.13401 31 11ZM7.54497 21.73C7 22.7996 7 24.1997 7 27V34C7 36.8003 7 38.2004 7.54497 39.27C8.02433 40.2108 8.78924 40.9757 9.73005 41.455C10.7996 42 12.1997 42 15 42H33C35.8003 42 37.2004 42 38.27 41.455C39.2108 40.9757 39.9757 40.2108 40.455 39.27C41 38.2004 41 36.8003 41 34V27C41 24.1997 41 22.7996 40.455 21.73C39.9757 20.7892 39.2108 20.0243 38.27 19.545C37.2004 19 35.8003 19 33 19H15C12.1997 19 10.7996 19 9.73005 19.545C8.78924 20.0243 8.02433 20.7892 7.54497 21.73ZM24 24C23.1716 24 22.5 24.6716 22.5 25.5V29.5C22.5 30.3284 23.1716 31 24 31C24.8284 31 25.5 30.3284 25.5 29.5V25.5C25.5 24.6716 24.8284 24 24 24Z">');const Bs=e=>{const t=Wr();return n=js(),r=n.firstChild,on(o=>{var i=e.class,a=e.fill||t.colors.icon.secondary;return i!==o.e&&lr(n,"class",o.e=i),a!==o.t&&lr(r,"fill",o.t=a),o},{e:void 0,t:void 0}),n;var n,r};var $s=sr('<svg xmlns=http://www.w3.org/2000/svg width=48 height=48 viewBox="0 0 48 48"fill=none><path fill-rule=evenodd clip-rule=evenodd d="M37.485 37.3849C40.894 33.9506 43 29.2212 43 24C43 13.5066 34.4934 5 24 5C13.5066 5 5 13.5066 5 24C5 29.2213 7.1061 33.9507 10.5151 37.385C13.3583 32.9438 18.3354 30 24.0001 30C29.6647 30 34.6418 32.9437 37.485 37.3849ZM35.1809 39.3635C32.9143 35.5532 28.7554 33 24.0001 33C19.2448 33 15.0858 35.5533 12.8193 39.3636C15.9564 41.6506 19.8206 43 24 43C28.1795 43 32.0437 41.6505 35.1809 39.3635ZM24 46C36.1503 46 46 36.1503 46 24C46 11.8497 36.1503 2 24 2C11.8497 2 2 11.8497 2 24C2 36.1503 11.8497 46 24 46ZM24 24C26.7614 24 29 21.7614 29 19C29 16.2386 26.7614 14 24 14C21.2386 14 19 16.2386 19 19C19 21.7614 21.2386 24 24 24ZM24 27C28.4183 27 32 23.4183 32 19C32 14.5817 28.4183 11 24 11C19.5817 11 16 14.5817 16 19C16 23.4183 19.5817 27 24 27Z">');const qs=e=>{const t=Wr();return n=$s(),r=n.firstChild,on(o=>{var i=e.class,a=e.fill||t.colors.icon.secondary;return i!==o.e&&lr(n,"class",o.e=i),a!==o.t&&lr(r,"fill",o.t=a),o},{e:void 0,t:void 0}),n;var n,r};var Ks=sr('<svg xmlns=http://www.w3.org/2000/svg width=48 height=48 viewBox="0 0 48 48"fill=none><path fill-rule=evenodd clip-rule=evenodd d="M34.5607 4.43934C33.9749 3.85355 33.0251 3.85355 32.4393 4.43934C31.8536 5.02513 31.8536 5.97487 32.4393 6.56066L37.8787 12H10.5C9.67157 12 9 12.6716 9 13.5C9 14.3284 9.67157 15 10.5 15H37.8787L32.4393 20.4393C31.8536 21.0251 31.8536 21.9749 32.4393 22.5607C33.0251 23.1464 33.9749 23.1464 34.5607 22.5607L42.5607 14.5607C43.1464 13.9749 43.1464 13.0251 42.5607 12.4393L34.5607 4.43934ZM13.4393 25.4393C14.0251 24.8536 14.9749 24.8536 15.5607 25.4393C16.1464 26.0251 16.1464 26.9749 15.5607 27.5607L10.1213 33H37.5C38.3284 33 39 33.6716 39 34.5C39 35.3284 38.3284 36 37.5 36H10.1213L15.5607 41.4393C16.1464 42.0251 16.1464 42.9749 15.5607 43.5607C14.9749 44.1464 14.0251 44.1464 13.4393 43.5607L5.43934 35.5607C4.85355 34.9749 4.85355 34.0251 5.43934 33.4393L13.4393 25.4393Z">');const Hs=e=>{const t=Wr();return n=Ks(),r=n.firstChild,on(o=>{var i=e.class,a=e.fill||t.colors.icon.secondary;return i!==o.e&&lr(n,"class",o.e=i),a!==o.t&&lr(r,"fill",o.t=a),o},{e:void 0,t:void 0}),n;var n,r};var Fs=sr('<svg xmlns=http://www.w3.org/2000/svg width=28 height=28 viewBox="0 0 28 28"fill=none><path fill-rule=evenodd clip-rule=evenodd d="M1.75 12.002C1.75 9.20169 1.75 7.80156 2.29497 6.732C2.77433 5.79119 3.53924 5.02629 4.48005 4.54692C5.54961 4.00195 6.94974 4.00195 9.75 4.00195H17.25C20.0503 4.00195 21.4504 4.00195 22.52 4.54692C23.4608 5.02629 24.2257 5.79119 24.705 6.732C24.8256 6.96861 24.9195 7.2214 24.9926 7.50195H21.5C19.6377 7.50195 18.7065 7.50195 17.9609 7.77334C16.711 8.22828 15.7263 9.21291 15.2714 10.4629C15 11.2085 15 12.1396 15 14.002C15 15.8643 15 16.7954 15.2714 17.541C15.7263 18.791 16.711 19.7756 17.9609 20.2306C18.7065 20.502 19.6377 20.502 21.5 20.502H24.9926C24.9195 20.7825 24.8256 21.0353 24.705 21.2719C24.2257 22.2127 23.4608 22.9776 22.52 23.457C21.4504 24.002 20.0503 24.002 17.25 24.002H9.75C6.94974 24.002 5.54961 24.002 4.48005 23.457C3.53924 22.9776 2.77433 22.2127 2.29497 21.2719C1.75 20.2023 1.75 18.8022 1.75 16.002V12.002ZM16.4999 13.802C16.4999 12.1218 16.4999 11.2817 16.8269 10.64C17.1145 10.0755 17.5735 9.61656 18.138 9.32894C18.7797 9.00196 19.6198 9.00196 21.2999 9.00196H23.1999C24.8801 9.00196 25.7202 9.00196 26.3619 9.32894C26.9264 9.61656 27.3853 10.0755 27.673 10.64C27.9999 11.2817 27.9999 12.1218 27.9999 13.802V14.202C27.9999 15.8821 27.9999 16.7222 27.673 17.3639C27.3853 17.9284 26.9264 18.3874 26.3619 18.675C25.7202 19.002 24.8801 19.002 23.1999 19.002H21.2999C19.6198 19.002 18.7797 19.002 18.138 18.675C17.5735 18.3874 17.1145 17.9284 16.8269 17.3639C16.4999 16.7222 16.4999 15.8821 16.4999 14.202V13.802ZM22.4999 14.002C22.4999 14.9685 21.7164 15.752 20.7499 15.752C19.7834 15.752 18.9999 14.9685 18.9999 14.002C18.9999 13.0355 19.7834 12.252 20.7499 12.252C21.7164 12.252 22.4999 13.0355 22.4999 14.002Z">');const Vs=e=>{const t=Wr();return n=Fs(),r=n.firstChild,on(o=>{var i=e.class,a=e.fill||t.colors.constant.white;return i!==o.e&&lr(n,"class",o.e=i),a!==o.t&&lr(r,"fill",o.t=a),o},{e:void 0,t:void 0}),n;var n,r};var zs=sr('<svg xmlns=http://www.w3.org/2000/svg width=28 height=28 viewBox="0 0 28 28"><path fill-rule=evenodd clip-rule=evenodd d="M10.0001 10.0001C10.0016 8.02333 10.0267 6.98719 10.436 6.18404C10.8195 5.43139 11.4314 4.81947 12.184 4.43597C13.0397 4 14.1598 4 16.4 4H17.6C19.8402 4 20.9603 4 21.816 4.43597C22.5686 4.81947 23.1805 5.43139 23.564 6.18404C24 7.03969 24 8.15979 24 10.4V11.6C24 13.8402 24 14.9603 23.564 15.816C23.1805 16.5686 22.5686 17.1805 21.816 17.564C21.0128 17.9733 19.9767 17.9984 17.9999 17.9999C17.9984 19.9767 17.9733 21.0128 17.564 21.816C17.1805 22.5686 16.5686 23.1805 15.816 23.564C14.9603 24 13.8402 24 11.6 24H10.4C8.15979 24 7.03969 24 6.18404 23.564C5.43139 23.1805 4.81947 22.5686 4.43597 21.816C4 20.9603 4 19.8402 4 17.6V16.4C4 14.1598 4 13.0397 4.43597 12.184C4.81947 11.4314 5.43139 10.8195 6.18404 10.436C6.98719 10.0267 8.02333 10.0016 10.0001 10.0001ZM10 11.5H9.5C8.09987 11.5 7.3998 11.5 6.86502 11.7725C6.39462 12.0122 6.01217 12.3946 5.77248 12.865C5.5 13.3998 5.5 14.0999 5.5 15.5V18.5C5.5 19.9001 5.5 20.6002 5.77248 21.135C6.01217 21.6054 6.39462 21.9878 6.86502 22.2275C7.3998 22.5 8.09987 22.5 9.5 22.5H12.5C13.9001 22.5 14.6002 22.5 15.135 22.2275C15.6054 21.9878 15.9878 21.6054 16.2275 21.135C16.5 20.6002 16.5 19.9001 16.5 18.5V18H16.4C14.1598 18 13.0397 18 12.184 17.564C11.4314 17.1805 10.8195 16.5686 10.436 15.816C10 14.9603 10 13.8402 10 11.6V11.5ZM11.5 9.5C11.5 8.09987 11.5 7.3998 11.7725 6.86502C12.0122 6.39462 12.3946 6.01217 12.865 5.77248C13.3998 5.5 14.0999 5.5 15.5 5.5H18.5C19.9001 5.5 20.6002 5.5 21.135 5.77248C21.6054 6.01217 21.9878 6.39462 22.2275 6.86502C22.5 7.3998 22.5 8.09987 22.5 9.5V12.5C22.5 13.9001 22.5 14.6002 22.2275 15.135C21.9878 15.6054 21.6054 15.9878 21.135 16.2275C20.6002 16.5 19.9001 16.5 18.5 16.5H15.5C14.0999 16.5 13.3998 16.5 12.865 16.2275C12.3946 15.9878 12.0122 15.6054 11.7725 15.135C11.5 14.6002 11.5 13.9001 11.5 12.5V9.5Z">');const Zs=e=>{const t=Wr(),n=()=>e.fill||t.colors.icon.secondary;return r=zs(),o=r.firstChild,on(e=>{var t=n(),i=n();return t!==e.e&&lr(r,"fill",e.e=t),i!==e.t&&lr(o,"fill",e.t=i),e},{e:void 0,t:void 0}),r;var r,o};var Gs=sr('<svg xmlns=http://www.w3.org/2000/svg width=16 height=17 viewBox="0 0 16 17"fill=none><path fill-rule=evenodd clip-rule=evenodd d="M1 4.12695C1 3.07754 1 2.55284 1.19202 2.14684C1.38986 1.72856 1.7266 1.39181 2.14489 1.19397C2.55088 1.00195 3.07559 1.00195 4.125 1.00195C5.17441 1.00195 5.69912 1.00195 6.10511 1.19397C6.5234 1.39181 6.86014 1.72856 7.05798 2.14684C7.25 2.55284 7.25 3.07754 7.25 4.12695C7.25 5.17636 7.25 5.70107 7.05798 6.10706C6.86014 6.52535 6.5234 6.8621 6.10511 7.05993C5.69912 7.25195 5.17441 7.25195 4.125 7.25195C3.07559 7.25195 2.55088 7.25195 2.14489 7.05993C1.7266 6.8621 1.38986 6.52535 1.19202 6.10706C1 5.70107 1 5.17636 1 4.12695ZM2.5 3.30195C2.5 3.02193 2.5 2.88191 2.5545 2.77496C2.60243 2.68088 2.67892 2.60439 2.773 2.55645C2.87996 2.50195 3.01997 2.50195 3.3 2.50195H4.95C5.23003 2.50195 5.37004 2.50195 5.477 2.55645C5.57108 2.60439 5.64757 2.68088 5.6955 2.77496C5.75 2.88191 5.75 3.02193 5.75 3.30195V4.95195C5.75 5.23198 5.75 5.37199 5.6955 5.47895C5.64757 5.57303 5.57108 5.64952 5.477 5.69746C5.37004 5.75195 5.23003 5.75195 4.95 5.75195H3.3C3.01997 5.75195 2.87996 5.75195 2.773 5.69746C2.67892 5.64952 2.60243 5.57303 2.5545 5.47895C2.5 5.37199 2.5 5.23198 2.5 4.95195V3.30195ZM1 11.877C1 10.8275 1 10.3028 1.19202 9.89684C1.38986 9.47856 1.7266 9.14181 2.14489 8.94397C2.55088 8.75195 3.07559 8.75195 4.125 8.75195C5.17441 8.75195 5.69912 8.75195 6.10511 8.94397C6.5234 9.14181 6.86014 9.47856 7.05798 9.89684C7.25 10.3028 7.25 10.8275 7.25 11.877C7.25 12.9264 7.25 13.4511 7.05798 13.8571C6.86014 14.2753 6.5234 14.6121 6.10511 14.8099C5.69912 15.002 5.17441 15.002 4.125 15.002C3.07559 15.002 2.55088 15.002 2.14489 14.8099C1.7266 14.6121 1.38986 14.2753 1.19202 13.8571C1 13.4511 1 12.9264 1 11.877ZM2.5 11.052C2.5 10.7719 2.5 10.6319 2.5545 10.525C2.60243 10.4309 2.67892 10.3544 2.773 10.3064C2.87996 10.252 3.01997 10.252 3.3 10.252H4.95C5.23003 10.252 5.37004 10.252 5.477 10.3064C5.57108 10.3544 5.64757 10.4309 5.6955 10.525C5.75 10.6319 5.75 10.7719 5.75 11.052V12.702C5.75 12.982 5.75 13.122 5.6955 13.2289C5.64757 13.323 5.57108 13.3995 5.477 13.4475C5.37004 13.502 5.23003 13.502 4.95 13.502H3.3C3.01997 13.502 2.87996 13.502 2.773 13.4475C2.67892 13.3995 2.60243 13.323 2.5545 13.2289C2.5 13.122 2.5 12.982 2.5 12.702V11.052ZM8.94202 2.14684C8.75 2.55284 8.75 3.07754 8.75 4.12695C8.75 5.17636 8.75 5.70107 8.94202 6.10706C9.13986 6.52535 9.4766 6.8621 9.89489 7.05993C10.3009 7.25195 10.8256 7.25195 11.875 7.25195C12.9244 7.25195 13.4491 7.25195 13.8551 7.05993C14.2734 6.8621 14.6101 6.52535 14.808 6.10706C15 5.70107 15 5.17636 15 4.12695C15 3.07754 15 2.55284 14.808 2.14684C14.6101 1.72856 14.2734 1.39181 13.8551 1.19397C13.4491 1.00195 12.9244 1.00195 11.875 1.00195C10.8256 1.00195 10.3009 1.00195 9.89489 1.19397C9.4766 1.39181 9.13986 1.72856 8.94202 2.14684ZM10.3045 2.77496C10.25 2.88191 10.25 3.02193 10.25 3.30195V4.95195C10.25 5.23198 10.25 5.37199 10.3045 5.47895C10.3524 5.57303 10.4289 5.64952 10.523 5.69746C10.63 5.75195 10.77 5.75195 11.05 5.75195H12.7C12.98 5.75195 13.12 5.75195 13.227 5.69746C13.3211 5.64952 13.3976 5.57303 13.4455 5.47895C13.5 5.37199 13.5 5.23198 13.5 4.95195V3.30195C13.5 3.02193 13.5 2.88191 13.4455 2.77496C13.3976 2.68088 13.3211 2.60439 13.227 2.55645C13.12 2.50195 12.98 2.50195 12.7 2.50195H11.05C10.77 2.50195 10.63 2.50195 10.523 2.55645C10.4289 2.60439 10.3524 2.68088 10.3045 2.77496ZM8.80727 9.13518C8.75 9.26242 8.75 9.4256 8.75 9.75195C8.75 10.0783 8.75 10.2415 8.80727 10.3687C8.87245 10.5136 8.9884 10.6295 9.13323 10.6947C9.26047 10.752 9.42365 10.752 9.75 10.752C10.0764 10.752 10.2395 10.752 10.3668 10.6947C10.5116 10.6295 10.6276 10.5136 10.6927 10.3687C10.75 10.2415 10.75 10.0783 10.75 9.75195C10.75 9.4256 10.75 9.26242 10.6927 9.13518C10.6276 8.99035 10.5116 8.8744 10.3668 8.80922C10.2395 8.75195 10.0764 8.75195 9.75 8.75195C9.42365 8.75195 9.26047 8.75195 9.13323 8.80922C8.9884 8.8744 8.87245 8.99035 8.80727 9.13518ZM10.87 11.8771C10.87 11.546 10.87 11.3805 10.9289 11.2517C10.9938 11.1098 11.1077 10.9959 11.2497 10.931C11.3784 10.8721 11.5439 10.8721 11.875 10.8721C12.2061 10.8721 12.3716 10.8721 12.5003 10.931C12.6423 10.9959 12.7562 11.1098 12.8211 11.2517C12.88 11.3805 12.88 11.546 12.88 11.8771C12.88 12.2081 12.88 12.3737 12.8211 12.5024C12.7562 12.6444 12.6423 12.7583 12.5003 12.8232C12.3716 12.8821 12.2061 12.8821 11.875 12.8821C11.5439 12.8821 11.3784 12.8821 11.2497 12.8232C11.1077 12.7583 10.9938 12.6444 10.9289 12.5024C10.87 12.3737 10.87 12.2081 10.87 11.8771ZM8.80727 13.3852C8.75 13.5124 8.75 13.6756 8.75 14.002C8.75 14.3283 8.75 14.4915 8.80727 14.6187C8.87245 14.7636 8.9884 14.8795 9.13323 14.9447C9.26047 15.002 9.42365 15.002 9.75 15.002C10.0764 15.002 10.2395 15.002 10.3668 14.9447C10.5116 14.8795 10.6276 14.7636 10.6927 14.6187C10.75 14.4915 10.75 14.3283 10.75 14.002C10.75 13.6756 10.75 13.5124 10.6927 13.3852C10.6276 13.2404 10.5116 13.1244 10.3668 13.0592C10.2395 13.002 10.0764 13.002 9.75 13.002C9.42365 13.002 9.26047 13.002 9.13323 13.0592C8.9884 13.1244 8.87245 13.2404 8.80727 13.3852ZM13 9.75195C13 9.4256 13 9.26242 13.0573 9.13518C13.1224 8.99035 13.2384 8.8744 13.3832 8.80922C13.5105 8.75195 13.6736 8.75195 14 8.75195C14.3264 8.75195 14.4895 8.75195 14.6168 8.80922C14.7616 8.8744 14.8776 8.99035 14.9427 9.13518C15 9.26242 15 9.4256 15 9.75195C15 10.0783 15 10.2415 14.9427 10.3687C14.8776 10.5136 14.7616 10.6295 14.6168 10.6947C14.4895 10.752 14.3264 10.752 14 10.752C13.6736 10.752 13.5105 10.752 13.3832 10.6947C13.2384 10.6295 13.1224 10.5136 13.0573 10.3687C13 10.2415 13 10.0783 13 9.75195ZM13.0573 13.3852C13 13.5124 13 13.6756 13 14.002C13 14.3283 13 14.4915 13.0573 14.6187C13.1224 14.7636 13.2384 14.8795 13.3832 14.9447C13.5105 15.002 13.6736 15.002 14 15.002C14.3264 15.002 14.4895 15.002 14.6168 14.9447C14.7616 14.8795 14.8776 14.7636 14.9427 14.6187C15 14.4915 15 14.3283 15 14.002C15 13.6756 15 13.5124 14.9427 13.3852C14.8776 13.2404 14.7616 13.1244 14.6168 13.0592C14.4895 13.002 14.3264 13.002 14 13.002C13.6736 13.002 13.5105 13.002 13.3832 13.0592C13.2384 13.1244 13.1224 13.2404 13.0573 13.3852Z">');const Ys=e=>{const t=Wr();return n=Gs(),r=n.firstChild,on(()=>lr(r,"fill",e.fill||t.colors.icon.secondary)),n;var n,r},Qs={m:"16px",s:"12px",none:"0"},Js={m:"6px",s:"6px",none:"0"},Xs=Ur.div`
477
476
  width: 60px;
478
477
  height: 60px;
479
478
  padding: 8px;
480
479
  margin-bottom: 8px;
481
- border-radius: ${e=>zs[e.theme.borderRadius]};
480
+ border-radius: ${e=>Qs[e.theme.borderRadius]};
482
481
  background-color: ${e=>e.theme.colors.background.tint};
483
482
  display: grid;
484
483
  grid-template: 1fr 1fr / 1fr 1fr;
485
484
  gap: 4px;
486
- `,Ys=Nr(qa)`
485
+ `,el=Ur(Va)`
487
486
  width: 20px;
488
487
  height: 20px;
489
- border-radius: ${e=>Zs[e.theme.borderRadius]};
490
- `,Qs=e=>Pn(Ja,{get name(){return e.labelLine1},get secondLine(){return e.labelLine2},get icon(){return Pn(Gs,{get children(){return Pn(Hn,{each:[0,1,2,3],children:t=>Pn(Ys,{get src(){return e.images[t]}})})}})},onClick:()=>e.onClick()}),Js="telegram-wallet",Xs="https://raw.githubusercontent.com/ton-connect/sdk/main/assets/ton-icon-48.png",el="https://raw.githubusercontent.com/ton-connect/sdk/main/assets/tg.png",tl=e=>{const[t]=Ua();return tr(()=>tr(()=>e.wallet.appName===Js)()?Pn(Ja,{get icon(){return e.wallet.imageUrl},get name(){return t("walletItem.walletOn",{},"Wallet in")},secondLine:"Telegram",get badgeUrl(){return el},onClick:()=>e.onClick(),get class(){return e.class}}):Pn(Ja,{get icon(){return e.wallet.imageUrl},get name(){return e.wallet.name},get secondLine(){return(()=>{if(e.wallet.appName!==Js)return"isPreferred"in e.wallet&&e.wallet.isPreferred?t("walletItem.recent",{},"Recent"):De(e.wallet)?t("walletItem.installed",{},"Installed"):"Tonkeeper"===e.wallet.name?t("walletItem.popular",{},"Popular"):void 0})()},secondLineColorPrimary:!1,onClick:()=>e.onClick(),get class(){return e.class}}))},nl=Nr.div`
488
+ border-radius: ${e=>Js[e.theme.borderRadius]};
489
+ `,tl=e=>Bn(ns,{get name(){return e.labelLine1},get secondLine(){return e.labelLine2},get icon(){return Bn(Xs,{get children(){return Bn(Zn,{each:[0,1,2,3],children:t=>Bn(el,{get src(){return e.images[t]}})})}})},onClick:()=>e.onClick()}),nl="telegram-wallet",rl="https://raw.githubusercontent.com/ton-connect/sdk/main/assets/ton-icon-48.png",ol="https://raw.githubusercontent.com/ton-connect/sdk/main/assets/tg.png",il=e=>{const[t]=$a();return ir(()=>ir(()=>e.wallet.appName===nl)()?Bn(ns,{get icon(){return e.wallet.imageUrl},get name(){return t("walletItem.walletOn",{},"Wallet in")},secondLine:"Telegram",get badgeUrl(){return ol},onClick:()=>e.onClick(),get class(){return e.class}}):Bn(ns,{get icon(){return e.wallet.imageUrl},get name(){return e.wallet.name},get secondLine(){return(()=>{if(e.wallet.appName!==nl)return"isPreferred"in e.wallet&&e.wallet.isPreferred?t("walletItem.recent",{},"Recent"):De(e.wallet)?t("walletItem.installed",{},"Installed"):"Tonkeeper"===e.wallet.name?t("walletItem.popular",{},"Popular"):void 0})()},secondLineColorPrimary:!1,onClick:()=>e.onClick(),get class(){return e.class}}))},al=Ur.div`
491
490
  width: 100%;
492
491
  overflow-y: auto;
493
492
  max-height: ${e=>e.maxHeight};
@@ -504,7 +503,7 @@
504
503
  &&::-webkit-scrollbar-thumb {
505
504
  display: none;
506
505
  }
507
- `,rl=Nr.div`
506
+ `,sl=Ur.div`
508
507
  height: 1px;
509
508
  margin: 0 -24px;
510
509
  width: calc(100% + 48px);
@@ -512,25 +511,25 @@
512
511
  background: ${e=>e.isShown?e.theme.colors.icon.secondary:"transparent"};
513
512
  transition: background 0.15s ease-in-out;
514
513
 
515
- ${mi("mobile")} {
514
+ ${bi("mobile")} {
516
515
  width: 100%;
517
516
  margin: 0;
518
517
  }
519
- `,[ol,il]=Jt((null==(l=eo())?void 0:l.innerHeight)||0);eo()&&window.addEventListener("resize",()=>il(window.innerHeight));const[al,sl]=Jt(gi("mobile")),ll=()=>sl(gi("mobile"));eo()&&(window.addEventListener("resize",()=>ll()),window.addEventListener("load",()=>ll(),{once:!0}));const cl=e=>{const[t,n]=Jt(!1),r=()=>void 0!==e.maxHeight?`${e.maxHeight}px`:ol()-(al()?150:200)+"px";return[Pn(rl,{get isShown(){return t()}}),Pn(nl,{get maxHeight(){return r()},onScroll:e=>{n(e.target.scrollTop>0)},get class(){return e.class},get children(){return e.children}})]},ul=Nr.a`
518
+ `,[ll,cl]=nn((null==(l=oo())?void 0:l.innerHeight)||0);oo()&&window.addEventListener("resize",()=>cl(window.innerHeight));const[ul,dl]=nn(vi("mobile")),hl=()=>dl(vi("mobile"));oo()&&(window.addEventListener("resize",()=>hl()),window.addEventListener("load",()=>hl(),{once:!0}));const fl=e=>{const[t,n]=nn(!1),r=()=>void 0!==e.maxHeight?`${e.maxHeight}px`:ll()-(ul()?150:200)+"px";return[Bn(sl,{get isShown(){return t()}}),Bn(al,{get maxHeight(){return r()},onScroll:e=>{n(e.target.scrollTop>0)},get class(){return e.class},get children(){return e.children}})]},pl=Ur.a`
520
519
  display: block;
521
520
  text-decoration: unset;
522
- `,dl=e=>Pn(ul,$n({get href(){return e.href},get target(){return e.blank?"_blank":"_self"},get class(){return e.class}},()=>e.blank?{rel:"noreferrer noopener"}:{},{get children(){return e.children}})),hl=mn();var fl=rr('<svg width=24 height=24 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path fill-rule=evenodd clip-rule=evenodd d="M7.76228 2.09998H10.2378C11.0458 2.09997 11.7067 2.09996 12.2438 2.14384C12.7997 2.18926 13.3017 2.28614 13.7706 2.52505C14.5045 2.89896 15.1011 3.49558 15.475 4.22941C15.7139 4.6983 15.8108 5.20038 15.8562 5.75629C15.9001 6.29337 15.9001 6.95422 15.9001 7.76227V8.1H16.2377C17.0457 8.09999 17.7066 8.09998 18.2437 8.14386C18.7996 8.18928 19.3017 8.28616 19.7705 8.52507C20.5044 8.89898 21.101 9.4956 21.4749 10.2294C21.7138 10.6983 21.8107 11.2004 21.8561 11.7563C21.9 12.2934 21.9 12.9542 21.9 13.7623V16.2377C21.9 17.0458 21.9 17.7066 21.8561 18.2437C21.8107 18.7996 21.7138 19.3017 21.4749 19.7706C21.101 20.5044 20.5044 21.101 19.7705 21.4749C19.3017 21.7138 18.7996 21.8107 18.2437 21.8561C17.7066 21.9 17.0458 21.9 16.2378 21.9H13.7623C12.9543 21.9 12.2934 21.9 11.7563 21.8561C11.2004 21.8107 10.6983 21.7138 10.2294 21.4749C9.49561 21.101 8.89898 20.5044 8.52508 19.7706C8.28616 19.3017 8.18928 18.7996 8.14386 18.2437C8.09998 17.7066 8.09999 17.0458 8.1 16.2377V15.9H7.76227C6.95426 15.9 6.29335 15.9 5.75629 15.8561C5.20038 15.8107 4.6983 15.7138 4.22941 15.4749C3.49558 15.101 2.89896 14.5044 2.52505 13.7705C2.28614 13.3017 2.18926 12.7996 2.14384 12.2437C2.09996 11.7066 2.09997 11.0458 2.09998 10.2377V7.76228C2.09997 6.95424 2.09996 6.29336 2.14384 5.75629C2.18926 5.20038 2.28614 4.6983 2.52505 4.22941C2.89896 3.49558 3.49558 2.89896 4.22941 2.52505C4.6983 2.28614 5.20038 2.18926 5.75629 2.14384C6.29336 2.09996 6.95425 2.09997 7.76228 2.09998ZM8.1 14.1V13.7623C8.09999 12.9542 8.09998 12.2934 8.14386 11.7563C8.18928 11.2004 8.28616 10.6983 8.52508 10.2294C8.89898 9.4956 9.49561 8.89898 10.2294 8.52507C10.6983 8.28616 11.2004 8.18928 11.7563 8.14386C12.2934 8.09998 12.9542 8.09999 13.7623 8.1H14.1001V7.79998C14.1001 6.94505 14.0994 6.35798 14.0622 5.90287C14.0259 5.45827 13.9593 5.21944 13.8712 5.0466C13.6699 4.65146 13.3486 4.3302 12.9535 4.12886C12.7806 4.04079 12.5418 3.97419 12.0972 3.93786C11.6421 3.90068 11.055 3.89998 10.2001 3.89998H7.79998C6.94505 3.89998 6.35798 3.90068 5.90287 3.93786C5.45827 3.97419 5.21944 4.04079 5.0466 4.12886C4.65146 4.3302 4.3302 4.65146 4.12886 5.0466C4.04079 5.21944 3.97419 5.45827 3.93786 5.90287C3.90068 6.35798 3.89998 6.94505 3.89998 7.79998V10.2C3.89998 11.0549 3.90068 11.642 3.93786 12.0971C3.97419 12.5417 4.04079 12.7805 4.12886 12.9534C4.3302 13.3485 4.65146 13.6698 5.0466 13.8711C5.21944 13.9592 5.45827 14.0258 5.90287 14.0621C6.35798 14.0993 6.94505 14.1 7.79998 14.1H8.1ZM11.0466 10.1289C11.2195 10.0408 11.4583 9.97421 11.9029 9.93788C12.358 9.9007 12.9451 9.9 13.8 9.9H16.2C17.0549 9.9 17.642 9.9007 18.0971 9.93788C18.5417 9.97421 18.7805 10.0408 18.9534 10.1289C19.3485 10.3302 19.6698 10.6515 19.8711 11.0466C19.9592 11.2195 20.0258 11.4583 20.0621 11.9029C20.0993 12.358 20.1 12.9451 20.1 13.8V16.2C20.1 17.0549 20.0993 17.642 20.0621 18.0971C20.0258 18.5417 19.9592 18.7805 19.8711 18.9534C19.6698 19.3485 19.3485 19.6698 18.9534 19.8711C18.7805 19.9592 18.5417 20.0258 18.0971 20.0621C17.642 20.0993 17.0549 20.1 16.2 20.1H13.8C12.9451 20.1 12.358 20.0993 11.9029 20.0621C11.4583 20.0258 11.2195 19.9592 11.0466 19.8711C10.6515 19.6698 10.3302 19.3485 10.1289 18.9534C10.0408 18.7805 9.97421 18.5417 9.93788 18.0971C9.9007 17.642 9.9 17.0549 9.9 16.2V13.8C9.9 12.9451 9.9007 12.358 9.93788 11.9029C9.97421 11.4583 10.0408 11.2195 10.1289 11.0466C10.3302 10.6515 10.6515 10.3302 11.0466 10.1289Z">');const pl=e=>{const t=Or();return n=fl(),r=n.firstChild,en(o=>{var i=e.class,a=e.fill||t.colors.icon.primary;return i!==o.e&&or(n,"class",o.e=i),a!==o.t&&or(r,"fill",o.t=a),o},{e:void 0,t:void 0}),n;var n,r};var gl=rr('<svg width=24 height=24 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M8.7624 3.10001C7.95435 3.1 7.29349 3.09999 6.75642 3.14387C6.2005 3.18929 5.69842 3.28617 5.22954 3.52508C4.4957 3.89899 3.89908 4.49561 3.52517 5.22944C3.28626 5.69833 3.18938 6.20041 3.14396 6.75632C3.10008 7.2934 3.10009 7.95424 3.1001 8.76229V15.2377C3.10009 16.0458 3.10008 16.7066 3.14396 17.2437C3.18938 17.7996 3.28626 18.3017 3.52517 18.7706C3.89908 19.5044 4.4957 20.101 5.22954 20.4749C5.69842 20.7138 6.2005 20.8107 6.75642 20.8561C7.29349 20.9 7.95434 20.9 8.76239 20.9H12.0001C12.4972 20.9 12.9001 20.4971 12.9001 20C12.9001 19.503 12.4972 19.1 12.0001 19.1H8.8001C7.94517 19.1 7.3581 19.0993 6.90299 19.0621C6.45839 19.0258 6.21956 18.9592 6.04672 18.8711C5.65158 18.6698 5.33032 18.3485 5.12898 17.9534C5.04092 17.7805 4.97431 17.5417 4.93798 17.0971C4.9008 16.642 4.9001 16.0549 4.9001 15.2V8.80001C4.9001 7.94508 4.9008 7.35801 4.93798 6.9029C4.97431 6.4583 5.04092 6.21947 5.12898 6.04663C5.33032 5.65149 5.65158 5.33023 6.04672 5.12889C6.21956 5.04082 6.45839 4.97422 6.90299 4.93789C7.3581 4.90071 7.94517 4.90001 8.8001 4.90001H12.0001C12.4972 4.90001 12.9001 4.49706 12.9001 4.00001C12.9001 3.50295 12.4972 3.10001 12.0001 3.10001H8.7624Z"></path><path d="M17.6364 7.3636C17.2849 7.01212 16.7151 7.01212 16.3636 7.3636C16.0121 7.71507 16.0121 8.28492 16.3636 8.63639L18.8272 11.1H9.00001C8.50295 11.1 8.10001 11.5029 8.10001 12C8.10001 12.497 8.50295 12.9 9.00001 12.9H18.8272L16.3636 15.3636C16.0121 15.7151 16.0121 16.2849 16.3636 16.6364C16.7151 16.9879 17.2849 16.9879 17.6364 16.6364L21.6364 12.6364C21.9879 12.2849 21.9879 11.7151 21.6364 11.3636L17.6364 7.3636Z">');const ml=e=>{const t=Or(),n=()=>e.fill||t.colors.icon.primary;return r=gl(),o=r.firstChild,i=o.nextSibling,en(e=>{var t=n(),r=n();return t!==e.e&&or(o,"fill",e.e=t),r!==e.t&&or(i,"fill",e.t=r),e},{e:void 0,t:void 0}),r;var r,o,i},wl={m:"8px",s:"4px",none:"0"},yl={m:"16px",s:"8px",none:"0"},vl=Nr.div`
521
+ `,gl=e=>Bn(pl,Fn({get href(){return e.href},get target(){return e.blank?"_blank":"_self"},get class(){return e.class}},()=>e.blank?{rel:"noreferrer noopener"}:{},{get children(){return e.children}})),ml=bn();var wl=sr('<svg width=24 height=24 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path fill-rule=evenodd clip-rule=evenodd d="M7.76228 2.09998H10.2378C11.0458 2.09997 11.7067 2.09996 12.2438 2.14384C12.7997 2.18926 13.3017 2.28614 13.7706 2.52505C14.5045 2.89896 15.1011 3.49558 15.475 4.22941C15.7139 4.6983 15.8108 5.20038 15.8562 5.75629C15.9001 6.29337 15.9001 6.95422 15.9001 7.76227V8.1H16.2377C17.0457 8.09999 17.7066 8.09998 18.2437 8.14386C18.7996 8.18928 19.3017 8.28616 19.7705 8.52507C20.5044 8.89898 21.101 9.4956 21.4749 10.2294C21.7138 10.6983 21.8107 11.2004 21.8561 11.7563C21.9 12.2934 21.9 12.9542 21.9 13.7623V16.2377C21.9 17.0458 21.9 17.7066 21.8561 18.2437C21.8107 18.7996 21.7138 19.3017 21.4749 19.7706C21.101 20.5044 20.5044 21.101 19.7705 21.4749C19.3017 21.7138 18.7996 21.8107 18.2437 21.8561C17.7066 21.9 17.0458 21.9 16.2378 21.9H13.7623C12.9543 21.9 12.2934 21.9 11.7563 21.8561C11.2004 21.8107 10.6983 21.7138 10.2294 21.4749C9.49561 21.101 8.89898 20.5044 8.52508 19.7706C8.28616 19.3017 8.18928 18.7996 8.14386 18.2437C8.09998 17.7066 8.09999 17.0458 8.1 16.2377V15.9H7.76227C6.95426 15.9 6.29335 15.9 5.75629 15.8561C5.20038 15.8107 4.6983 15.7138 4.22941 15.4749C3.49558 15.101 2.89896 14.5044 2.52505 13.7705C2.28614 13.3017 2.18926 12.7996 2.14384 12.2437C2.09996 11.7066 2.09997 11.0458 2.09998 10.2377V7.76228C2.09997 6.95424 2.09996 6.29336 2.14384 5.75629C2.18926 5.20038 2.28614 4.6983 2.52505 4.22941C2.89896 3.49558 3.49558 2.89896 4.22941 2.52505C4.6983 2.28614 5.20038 2.18926 5.75629 2.14384C6.29336 2.09996 6.95425 2.09997 7.76228 2.09998ZM8.1 14.1V13.7623C8.09999 12.9542 8.09998 12.2934 8.14386 11.7563C8.18928 11.2004 8.28616 10.6983 8.52508 10.2294C8.89898 9.4956 9.49561 8.89898 10.2294 8.52507C10.6983 8.28616 11.2004 8.18928 11.7563 8.14386C12.2934 8.09998 12.9542 8.09999 13.7623 8.1H14.1001V7.79998C14.1001 6.94505 14.0994 6.35798 14.0622 5.90287C14.0259 5.45827 13.9593 5.21944 13.8712 5.0466C13.6699 4.65146 13.3486 4.3302 12.9535 4.12886C12.7806 4.04079 12.5418 3.97419 12.0972 3.93786C11.6421 3.90068 11.055 3.89998 10.2001 3.89998H7.79998C6.94505 3.89998 6.35798 3.90068 5.90287 3.93786C5.45827 3.97419 5.21944 4.04079 5.0466 4.12886C4.65146 4.3302 4.3302 4.65146 4.12886 5.0466C4.04079 5.21944 3.97419 5.45827 3.93786 5.90287C3.90068 6.35798 3.89998 6.94505 3.89998 7.79998V10.2C3.89998 11.0549 3.90068 11.642 3.93786 12.0971C3.97419 12.5417 4.04079 12.7805 4.12886 12.9534C4.3302 13.3485 4.65146 13.6698 5.0466 13.8711C5.21944 13.9592 5.45827 14.0258 5.90287 14.0621C6.35798 14.0993 6.94505 14.1 7.79998 14.1H8.1ZM11.0466 10.1289C11.2195 10.0408 11.4583 9.97421 11.9029 9.93788C12.358 9.9007 12.9451 9.9 13.8 9.9H16.2C17.0549 9.9 17.642 9.9007 18.0971 9.93788C18.5417 9.97421 18.7805 10.0408 18.9534 10.1289C19.3485 10.3302 19.6698 10.6515 19.8711 11.0466C19.9592 11.2195 20.0258 11.4583 20.0621 11.9029C20.0993 12.358 20.1 12.9451 20.1 13.8V16.2C20.1 17.0549 20.0993 17.642 20.0621 18.0971C20.0258 18.5417 19.9592 18.7805 19.8711 18.9534C19.6698 19.3485 19.3485 19.6698 18.9534 19.8711C18.7805 19.9592 18.5417 20.0258 18.0971 20.0621C17.642 20.0993 17.0549 20.1 16.2 20.1H13.8C12.9451 20.1 12.358 20.0993 11.9029 20.0621C11.4583 20.0258 11.2195 19.9592 11.0466 19.8711C10.6515 19.6698 10.3302 19.3485 10.1289 18.9534C10.0408 18.7805 9.97421 18.5417 9.93788 18.0971C9.9007 17.642 9.9 17.0549 9.9 16.2V13.8C9.9 12.9451 9.9007 12.358 9.93788 11.9029C9.97421 11.4583 10.0408 11.2195 10.1289 11.0466C10.3302 10.6515 10.6515 10.3302 11.0466 10.1289Z">');const yl=e=>{const t=Wr();return n=wl(),r=n.firstChild,on(o=>{var i=e.class,a=e.fill||t.colors.icon.primary;return i!==o.e&&lr(n,"class",o.e=i),a!==o.t&&lr(r,"fill",o.t=a),o},{e:void 0,t:void 0}),n;var n,r};var vl=sr('<svg width=24 height=24 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M8.7624 3.10001C7.95435 3.1 7.29349 3.09999 6.75642 3.14387C6.2005 3.18929 5.69842 3.28617 5.22954 3.52508C4.4957 3.89899 3.89908 4.49561 3.52517 5.22944C3.28626 5.69833 3.18938 6.20041 3.14396 6.75632C3.10008 7.2934 3.10009 7.95424 3.1001 8.76229V15.2377C3.10009 16.0458 3.10008 16.7066 3.14396 17.2437C3.18938 17.7996 3.28626 18.3017 3.52517 18.7706C3.89908 19.5044 4.4957 20.101 5.22954 20.4749C5.69842 20.7138 6.2005 20.8107 6.75642 20.8561C7.29349 20.9 7.95434 20.9 8.76239 20.9H12.0001C12.4972 20.9 12.9001 20.4971 12.9001 20C12.9001 19.503 12.4972 19.1 12.0001 19.1H8.8001C7.94517 19.1 7.3581 19.0993 6.90299 19.0621C6.45839 19.0258 6.21956 18.9592 6.04672 18.8711C5.65158 18.6698 5.33032 18.3485 5.12898 17.9534C5.04092 17.7805 4.97431 17.5417 4.93798 17.0971C4.9008 16.642 4.9001 16.0549 4.9001 15.2V8.80001C4.9001 7.94508 4.9008 7.35801 4.93798 6.9029C4.97431 6.4583 5.04092 6.21947 5.12898 6.04663C5.33032 5.65149 5.65158 5.33023 6.04672 5.12889C6.21956 5.04082 6.45839 4.97422 6.90299 4.93789C7.3581 4.90071 7.94517 4.90001 8.8001 4.90001H12.0001C12.4972 4.90001 12.9001 4.49706 12.9001 4.00001C12.9001 3.50295 12.4972 3.10001 12.0001 3.10001H8.7624Z"></path><path d="M17.6364 7.3636C17.2849 7.01212 16.7151 7.01212 16.3636 7.3636C16.0121 7.71507 16.0121 8.28492 16.3636 8.63639L18.8272 11.1H9.00001C8.50295 11.1 8.10001 11.5029 8.10001 12C8.10001 12.497 8.50295 12.9 9.00001 12.9H18.8272L16.3636 15.3636C16.0121 15.7151 16.0121 16.2849 16.3636 16.6364C16.7151 16.9879 17.2849 16.9879 17.6364 16.6364L21.6364 12.6364C21.9879 12.2849 21.9879 11.7151 21.6364 11.3636L17.6364 7.3636Z">');const bl=e=>{const t=Wr(),n=()=>e.fill||t.colors.icon.primary;return r=vl(),o=r.firstChild,i=o.nextSibling,on(e=>{var t=n(),r=n();return t!==e.e&&lr(o,"fill",e.e=t),r!==e.t&&lr(i,"fill",e.t=r),e},{e:void 0,t:void 0}),r;var r,o,i},Cl={m:"8px",s:"4px",none:"0"},xl={m:"16px",s:"8px",none:"0"},Sl=Ur.div`
523
522
  width: 256px;
524
523
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.16);
525
- border-radius: ${e=>yl[e.theme.borderRadius]};
524
+ border-radius: ${e=>xl[e.theme.borderRadius]};
526
525
 
527
526
  background-color: ${e=>e.theme.colors.background.primary}
528
527
 
529
528
  color: ${e=>e.theme.colors.text.primary}
530
- `,bl=Nr.ul`
529
+ `,kl=Ur.ul`
531
530
  background-color: ${e=>e.theme.colors.background.primary};
532
531
  padding: 8px;
533
- `,Cl=Nr.button`
532
+ `,Rl=Ur.button`
534
533
  display: flex;
535
534
  align-items: center;
536
535
  gap: 8px;
@@ -540,7 +539,7 @@
540
539
 
541
540
  background-color: ${e=>e.theme.colors.background.primary};
542
541
  border: none;
543
- border-radius: ${e=>wl[e.theme.borderRadius]};
542
+ border-radius: ${e=>Cl[e.theme.borderRadius]};
544
543
  cursor: pointer;
545
544
 
546
545
  transition:
@@ -554,7 +553,7 @@
554
553
  &:active {
555
554
  transform: scale(0.96);
556
555
  }
557
- `;var xl=rr("<li>");const Sl=e=>Pn(ja,{get translationKey(){return e.translationKey},fontSize:"15px",fontWeight:"590",get children(){return e.children}}),kl={m:"16px",s:"8px",none:"0"},Rl=Nr.div`
556
+ `;var El=sr("<li>");const Tl=e=>Bn(Ka,{get translationKey(){return e.translationKey},fontSize:"15px",fontWeight:"590",get children(){return e.children}}),Al={m:"16px",s:"8px",none:"0"},Ml=Ur.div`
558
557
  width: 256px;
559
558
  padding: 12px 16px;
560
559
  display: flex;
@@ -562,108 +561,108 @@
562
561
 
563
562
  background-color: ${e=>e.theme.colors.background.primary};
564
563
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.16);
565
- border-radius: ${e=>kl[e.theme.borderRadius]};
566
- `,El=Nr.div`
564
+ border-radius: ${e=>Al[e.theme.borderRadius]};
565
+ `,_l=Ur.div`
567
566
  width: 192px;
568
567
 
569
568
  > h3 {
570
569
  font-size: 15px;
571
570
  }
572
- `,Al=Nr(ja)`
571
+ `,Ol=Ur(Ka)`
573
572
  margin-top: 4px;
574
573
  color: ${e=>e.theme.colors.text.secondary};
575
- `,Ml=e=>{const t=xi(e);return Pn(Rl,$n({get class(){return e.class},"data-tc-notification":"true"},t,{get children(){return[Pn(El,{get children(){return[Pn(os,{get translationKey(){return e.header.translationKey},get translationValues(){return e.header.translationValues},get children(){return e.children}}),Pn(Fn,{get when(){return e.text},get children(){return Pn(Al,{get translationKey(){return e.text.translationKey},get translationValues(){return e.text.translationValues}})}})]}}),tr(()=>e.icon)]}}))},Tl=Nr(ys)`
574
+ `,Ll=e=>{const t=Ei(e);return Bn(Ml,Fn({get class(){return e.class},"data-tc-notification":"true"},t,{get children(){return[Bn(_l,{get children(){return[Bn(ls,{get translationKey(){return e.header.translationKey},get translationValues(){return e.header.translationValues},get children(){return e.children}}),Bn(Gn,{get when(){return e.text},get children(){return Bn(Ol,{get translationKey(){return e.text.translationKey},get translationValues(){return e.text.translationValues}})}})]}}),ir(()=>e.icon)]}}))},Il=Ur(xs)`
576
575
  align-self: center;
577
- `,_l=e=>{const t=wn(hl),[n]=Ua();return Pn(Ml,{get header(){return{translationKey:"notifications.confirm.header",translationValues:{name:t.wallet&&"name"in t.wallet?t.wallet.name:n("common.yourWallet",{},"Your wallet")}}},get class(){return e.class},get icon(){return Pn(Tl,{})},"data-tc-notification-confirm":"true",children:"Confirm operation in your wallet"})},Ol=Nr(ps)`
576
+ `,Nl=e=>{const t=Cn(ml),[n]=$a();return Bn(Ll,{get header(){return{translationKey:"notifications.confirm.header",translationValues:{name:t.wallet&&"name"in t.wallet?t.wallet.name:n("common.yourWallet",{},"Your wallet")}}},get class(){return e.class},get icon(){return Bn(Il,{})},"data-tc-notification-confirm":"true",children:"Confirm operation in your wallet"})},Wl=Ur(ys)`
578
577
  margin-top: 2px;
579
- `,Ll=e=>Pn(Ml,{header:{translationKey:"notifications.transactionCanceled.header"},text:{translationKey:"notifications.transactionCanceled.text"},get icon(){return Pn(Ol,{size:"xs"})},get class(){return e.class},"data-tc-notification-tx-cancelled":"true",children:"Transaction cancelled"}),Nl=Nr(us)`
578
+ `,Pl=e=>Bn(Ll,{header:{translationKey:"notifications.transactionCanceled.header"},text:{translationKey:"notifications.transactionCanceled.text"},get icon(){return Bn(Wl,{size:"xs"})},get class(){return e.class},"data-tc-notification-tx-cancelled":"true",children:"Transaction cancelled"}),Ul=Ur(ps)`
580
579
  margin-top: 2px;
581
- `,Il=e=>Pn(Ml,{header:{translationKey:"notifications.transactionSent.header"},text:{translationKey:"notifications.transactionSent.text"},get icon(){return Pn(Nl,{})},get class(){return e.class},"data-tc-notification-tx-sent":"true",children:"Transaction sent"}),Wl=Ar`
580
+ `,Dl=e=>Bn(Ll,{header:{translationKey:"notifications.transactionSent.header"},text:{translationKey:"notifications.transactionSent.text"},get icon(){return Bn(Ul,{})},get class(){return e.class},"data-tc-notification-tx-sent":"true",children:"Transaction sent"}),jl=Or`
582
581
  transform: translateY(-8px);
583
582
  margin-bottom: 12px;
584
- `,Pl={timeout:4500},[Ul,Dl]=Jt(null);function jl(e){const{timeout:t}=m(m({},Pl),e),[n,r]=Jt([]),[o,i]=Jt([]);return tn(function(e,t){const n=Array.isArray(e);let r;return o=>{let i;if(n){i=Array(e.length);for(let t=0;t<e.length;t++)i[t]=e[t]()}else i=e();const a=an(()=>t(i,r,o));return r=i,a}}(Co,e=>{var n,o;if(!e||!e.showNotification)return void r(e=>e.filter(e=>"confirm-transaction"!==e.action));if(Ul()===e)return;const a="confirm-transaction"===(null==(n=Ul())?void 0:n.name)&&"confirm-transaction"===e.name,s="confirm-sign-data"===(null==(o=Ul())?void 0:o.name)&&"confirm-sign-data"===e.name;if(a||s)return;Dl(e),r(e=>e.filter(e=>"confirm-transaction"!==e.action&&"confirm-sign-data"!==e.action));const l={action:e.name};r(e=>[...e,l]);const c=setTimeout(()=>{r(e=>e.filter(e=>e!==l)),i(e=>e.filter(e=>e!==c))},t);i(e=>[...e,c])})),ln(()=>{o().forEach(e=>clearTimeout(e))}),n}const Bl=Nr(ps)`
583
+ `,Bl={timeout:4500},[$l,ql]=nn(null);function Kl(e){const{timeout:t}=m(m({},Bl),e),[n,r]=nn([]),[o,i]=nn([]);return an(function(e,t){const n=Array.isArray(e);let r;return o=>{let i;if(n){i=Array(e.length);for(let t=0;t<e.length;t++)i[t]=e[t]()}else i=e();const a=un(()=>t(i,r,o));return r=i,a}}(Ro,e=>{var n,o;if(!e||!e.showNotification)return void r(e=>e.filter(e=>"confirm-transaction"!==e.action));if($l()===e)return;const a="confirm-transaction"===(null==(n=$l())?void 0:n.name)&&"confirm-transaction"===e.name,s="confirm-sign-data"===(null==(o=$l())?void 0:o.name)&&"confirm-sign-data"===e.name;if(a||s)return;ql(e),r(e=>e.filter(e=>"confirm-transaction"!==e.action&&"confirm-sign-data"!==e.action));const l={action:e.name};r(e=>[...e,l]);const c=setTimeout(()=>{r(e=>e.filter(e=>e!==l)),i(e=>e.filter(e=>e!==c))},t);i(e=>[...e,c])})),hn(()=>{o().forEach(e=>clearTimeout(e))}),n}const Hl=Ur(ys)`
585
584
  margin-top: 2px;
586
- `,$l=e=>Pn(Ml,{header:{translationKey:"notifications.signDataCanceled.header"},get icon(){return Pn(Bl,{size:"xs"})},get class(){return e.class},"data-tc-notification-sign-data-cancelled":"true",children:"Sign data canceled"}),ql=e=>Pn(Ml,{header:{translationKey:"notifications.dataSigned.header"},get icon(){return Pn(Nl,{})},get class(){return e.class},"data-tc-notification-data-signed":"true",children:"Data signed"});var Kl=rr("<div data-tc-list-notifications=true>");const Hl=Nr(Si)`
585
+ `,Fl=e=>Bn(Ll,{header:{translationKey:"notifications.signDataCanceled.header"},get icon(){return Bn(Hl,{size:"xs"})},get class(){return e.class},"data-tc-notification-sign-data-cancelled":"true",children:"Sign data canceled"}),Vl=e=>Bn(Ll,{header:{translationKey:"notifications.dataSigned.header"},get icon(){return Bn(Ul,{})},get class(){return e.class},"data-tc-notification-data-signed":"true",children:"Data signed"});var zl=sr("<div data-tc-list-notifications=true>");const Zl=Ur(Ti)`
587
586
  background-color: ${e=>e.theme.colors.connectButton.background};
588
587
  color: ${e=>e.theme.colors.connectButton.foreground};
589
- box-shadow: ${e=>`0 4px 24px ${jr(e.theme.colors.constant.black,.16)}`};
588
+ box-shadow: ${e=>`0 4px 24px ${Kr(e.theme.colors.constant.black,.16)}`};
590
589
  padding: 8px 16px 8px 12px;
591
590
 
592
591
  display: flex;
593
592
  align-items: center;
594
593
  gap: 4px;
595
594
  height: 40px;
596
- `,Fl=Nr(Hl)`
595
+ `,Gl=Ur(Zl)`
597
596
  padding: 12px 16px;
598
597
  min-width: 148px;
599
598
  justify-content: center;
600
599
  background-color: ${e=>e.theme.colors.background.primary};
601
- `,Vl=Nr(Si)`
600
+ `,Yl=Ur(Ti)`
602
601
  min-width: 148px;
603
602
  height: 40px;
604
603
 
605
604
  background-color: ${e=>e.theme.colors.background.primary};
606
605
  color: ${e=>e.theme.colors.connectButton.foreground};
607
- box-shadow: ${e=>`0 4px 24px ${jr(e.theme.colors.constant.black,.16)}`};
606
+ box-shadow: ${e=>`0 4px 24px ${Kr(e.theme.colors.constant.black,.16)}`};
608
607
 
609
608
  display: flex;
610
609
  align-items: center;
611
610
  justify-content: center;
612
- `,zl=Nr(ys)`
611
+ `,Ql=Ur(xs)`
613
612
  height: 18px;
614
613
  width: 18px;
615
- `,Zl=Nr.div`
614
+ `,Jl=Ur.div`
616
615
  width: fit-content;
617
616
  display: flex;
618
617
  flex-direction: column;
619
618
  align-items: flex-end;
620
- `,Gl=Nr(t=>{const n=wn(hl),[r,o]=Jt(!1);return Pn(vl,{ref(e){var n=t.ref;"function"==typeof n?n(e):t.ref=e},get class(){return t.class},"data-tc-dropdown":"true",get children(){return Pn(bl,{get children(){return[(a=xl(),lr(a,Pn(Cl,{onClick:()=>v(null,null,function*(){const t=vt(n.account.address,n.account.chain===e.CHAIN.TESTNET);yield Oa(t),o(!0),setTimeout(()=>o(!1),1e3)}),get children(){return[Pn(pl,{}),Pn(Fn,{get when(){return!r()},get children(){return Pn(Sl,{translationKey:"button.dropdown.copy",children:"Copy address"})}}),Pn(Fn,{get when(){return r()},get children(){return Pn(Sl,{translationKey:"button.dropdown.copied",children:"Address copied!"})}})]}})),a),(i=xl(),lr(i,Pn(Cl,{onClick:()=>(n.disconnect(),void t.onClose()),get children(){return[Pn(ml,{}),Pn(Sl,{translationKey:"button.dropdown.disconnect",children:"Disconnect"})]}})),i)];var i,a}})}})})`
619
+ `,Xl=Ur(t=>{const n=Cn(ml),[r,o]=nn(!1);return Bn(Sl,{ref(e){var n=t.ref;"function"==typeof n?n(e):t.ref=e},get class(){return t.class},"data-tc-dropdown":"true",get children(){return Bn(kl,{get children(){return[(a=El(),hr(a,Bn(Rl,{onClick:()=>v(null,null,function*(){const t=vt(n.account.address,n.account.chain===e.CHAIN.TESTNET);yield Wa(t),o(!0),setTimeout(()=>o(!1),1e3)}),get children(){return[Bn(yl,{}),Bn(Gn,{get when(){return!r()},get children(){return Bn(Tl,{translationKey:"button.dropdown.copy",children:"Copy address"})}}),Bn(Gn,{get when(){return r()},get children(){return Bn(Tl,{translationKey:"button.dropdown.copied",children:"Address copied!"})}})]}})),a),(i=El(),hr(i,Bn(Rl,{onClick:()=>(n.disconnect(),void t.onClose()),get children(){return[Bn(bl,{}),Bn(Tl,{translationKey:"button.dropdown.disconnect",children:"Disconnect"})]}})),i)];var i,a}})}})})`
621
620
  box-sizing: border-box;
622
621
  overflow: hidden;
623
622
  margin-top: 12px;
624
- `,Yl=Nr(e=>{const t=jl();return lr(n=Kl(),Pn($i,{onBeforeEnter:e=>{sa(e,[{opacity:0,transform:"translateY(0)"},{opacity:1,transform:"translateY(-8px)"}],{duration:200})},onExit:(e,t)=>{sa(e,[{opacity:1,transform:"translateY(-8px)"},{opacity:0,transform:"translateY(-30px)"}],{duration:200}).finished.then(t)},get children(){return Pn(Hn,{get each(){return t()},children:e=>Pn(Vn,{get children(){return[Pn(zn,{get when(){return"transaction-sent"===e.action},get children(){return Pn(Il,{class:Wl})}}),Pn(zn,{get when(){return"transaction-canceled"===e.action},get children(){return Pn(Ll,{class:Wl})}}),Pn(zn,{get when(){return"data-signed"===e.action},get children(){return Pn(ql,{class:Wl})}}),Pn(zn,{get when(){return"sign-data-canceled"===e.action},get children(){return Pn($l,{class:Wl})}}),Pn(zn,{get when(){return"confirm-transaction"===e.action||"confirm-sign-data"===e.action},get children(){return Pn(_l,{class:Wl})}})]}})})}})),en(()=>ir(n,e.class)),n;var n})`
623
+ `,ec=Ur(e=>{const t=Kl();return hr(n=zl(),Bn(Fi,{onBeforeEnter:e=>{da(e,[{opacity:0,transform:"translateY(0)"},{opacity:1,transform:"translateY(-8px)"}],{duration:200})},onExit:(e,t)=>{da(e,[{opacity:1,transform:"translateY(-8px)"},{opacity:0,transform:"translateY(-30px)"}],{duration:200}).finished.then(t)},get children(){return Bn(Zn,{get each(){return t()},children:e=>Bn(Yn,{get children(){return[Bn(Qn,{get when(){return"transaction-sent"===e.action},get children(){return Bn(Dl,{class:jl})}}),Bn(Qn,{get when(){return"transaction-canceled"===e.action},get children(){return Bn(Pl,{class:jl})}}),Bn(Qn,{get when(){return"data-signed"===e.action},get children(){return Bn(Vl,{class:jl})}}),Bn(Qn,{get when(){return"sign-data-canceled"===e.action},get children(){return Bn(Fl,{class:jl})}}),Bn(Qn,{get when(){return"confirm-transaction"===e.action||"confirm-sign-data"===e.action},get children(){return Bn(Nl,{class:jl})}})]}})})}})),on(()=>cr(n,e.class)),n;var n})`
625
624
  > div:first-child {
626
625
  margin-top: 20px;
627
626
  }
628
- `,Ql=Math.min,Jl=Math.max,Xl=Math.round,ec=Math.floor,tc=e=>({x:e,y:e}),nc={left:"right",right:"left",bottom:"top",top:"bottom"},rc={start:"end",end:"start"};function oc(e,t,n){return Jl(e,Ql(t,n))}function ic(e,t){return"function"==typeof e?e(t):e}function ac(e){return e.split("-")[0]}function sc(e){return e.split("-")[1]}function lc(e){return"x"===e?"y":"x"}function cc(e){return"y"===e?"height":"width"}const uc=new Set(["top","bottom"]);function dc(e){return uc.has(ac(e))?"y":"x"}function hc(e){return lc(dc(e))}function fc(e){return e.replace(/start|end/g,e=>rc[e])}const pc=["left","right"],gc=["right","left"],mc=["top","bottom"],wc=["bottom","top"];function yc(e,t,n,r){const o=sc(e);let i=function(e,t,n){switch(e){case"top":case"bottom":return n?t?gc:pc:t?pc:gc;case"left":case"right":return t?mc:wc;default:return[]}}(ac(e),"start"===n,r);return o&&(i=i.map(e=>e+"-"+o),t&&(i=i.concat(i.map(fc)))),i}function vc(e){return e.replace(/left|right|bottom|top/g,e=>nc[e])}function bc(e){return"number"!=typeof e?function(e){return m({top:0,right:0,bottom:0,left:0},e)}(e):{top:e,right:e,bottom:e,left:e}}function Cc(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function xc(e,t,n){let{reference:r,floating:o}=e;const i=dc(t),a=hc(t),s=cc(a),l=ac(t),c="y"===i,u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,h=r[s]/2-o[s]/2;let f;switch(l){case"top":f={x:u,y:r.y-o.height};break;case"bottom":f={x:u,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:d};break;case"left":f={x:r.x-o.width,y:d};break;default:f={x:r.x,y:r.y}}switch(sc(t)){case"start":f[a]-=h*(n&&c?-1:1);break;case"end":f[a]+=h*(n&&c?-1:1)}return f}function Sc(e,t){return v(this,null,function*(){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:h=!1,padding:f=0}=ic(t,e),p=bc(f),g=s[h?"floating"===d?"reference":"floating":d],m=Cc(yield i.getClippingRect({element:null==(n=yield null==i.isElement?void 0:i.isElement(g))||n?g:g.contextElement||(yield null==i.getDocumentElement?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),w="floating"===d?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,y=yield null==i.getOffsetParent?void 0:i.getOffsetParent(s.floating),v=(yield null==i.isElement?void 0:i.isElement(y))&&(yield null==i.getScale?void 0:i.getScale(y))||{x:1,y:1},b=Cc(i.convertOffsetParentRelativeRectToViewportRelativeRect?yield i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:w,offsetParent:y,strategy:l}):w);return{top:(m.top-b.top+p.top)/v.y,bottom:(b.bottom-m.bottom+p.bottom)/v.y,left:(m.left-b.left+p.left)/v.x,right:(b.right-m.right+p.right)/v.x}})}function kc(){return"undefined"!=typeof window}function Rc(e){return Mc(e)?(e.nodeName||"").toLowerCase():"#document"}function Ec(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Ac(e){var t;return null==(t=(Mc(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Mc(e){return!!kc()&&(e instanceof Node||e instanceof Ec(e).Node)}function Tc(e){return!!kc()&&(e instanceof Element||e instanceof Ec(e).Element)}function _c(e){return!!kc()&&(e instanceof HTMLElement||e instanceof Ec(e).HTMLElement)}function Oc(e){return!(!kc()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Ec(e).ShadowRoot)}const Lc=new Set(["inline","contents"]);function Nc(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Fc(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Lc.has(o)}const Ic=new Set(["table","td","th"]);function Wc(e){return Ic.has(Rc(e))}const Pc=[":popover-open",":modal"];function Uc(e){return Pc.some(t=>{try{return e.matches(t)}catch(n){return!1}})}const Dc=["transform","translate","scale","rotate","perspective"],jc=["transform","translate","scale","rotate","perspective","filter"],Bc=["paint","layout","strict","content"];function $c(e){const t=qc(),n=Tc(e)?Fc(e):e;return Dc.some(e=>!!n[e]&&"none"!==n[e])||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||jc.some(e=>(n.willChange||"").includes(e))||Bc.some(e=>(n.contain||"").includes(e))}function qc(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const Kc=new Set(["html","body","#document"]);function Hc(e){return Kc.has(Rc(e))}function Fc(e){return Ec(e).getComputedStyle(e)}function Vc(e){return Tc(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function zc(e){if("html"===Rc(e))return e;const t=e.assignedSlot||e.parentNode||Oc(e)&&e.host||Ac(e);return Oc(t)?t.host:t}function Zc(e){const t=zc(e);return Hc(t)?e.ownerDocument?e.ownerDocument.body:e.body:_c(t)&&Nc(t)?t:Zc(t)}function Gc(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=Zc(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=Ec(o);if(i){const e=Yc(a);return t.concat(a,a.visualViewport||[],Nc(o)?o:[],e&&n?Gc(e):[])}return t.concat(o,Gc(o,[],n))}function Yc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Qc(e){const t=Fc(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=_c(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=Xl(n)!==i||Xl(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function Jc(e){return Tc(e)?e:e.contextElement}function Xc(e){const t=Jc(e);if(!_c(t))return tc(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Qc(t);let a=(i?Xl(n.width):n.width)/r,s=(i?Xl(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const eu=tc(0);function tu(e){const t=Ec(e);return qc()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:eu}function nu(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=Jc(e);let a=tc(1);t&&(r?Tc(r)&&(a=Xc(r)):a=Xc(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==Ec(e))&&t}(i,n,r)?tu(i):tc(0);let l=(o.left+s.x)/a.x,c=(o.top+s.y)/a.y,u=o.width/a.x,d=o.height/a.y;if(i){const e=Ec(i),t=r&&Tc(r)?Ec(r):r;let n=e,o=Yc(n);for(;o&&r&&t!==n;){const e=Xc(o),t=o.getBoundingClientRect(),r=Fc(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=i,c+=a,n=Ec(o),o=Yc(n)}}return Cc({width:u,height:d,x:l,y:c})}function ru(e,t){const n=Vc(e).scrollLeft;return t?t.left+n:nu(Ac(e)).left+n}function ou(e,t,n){void 0===n&&(n=!1);const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-(n?0:ru(e,r)),y:r.top+t.scrollTop}}const iu=new Set(["absolute","fixed"]);function au(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=Ec(e),r=Ac(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const e=qc();(!e||e&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s,y:l}}(e,n);else if("document"===t)r=function(e){const t=Ac(e),n=Vc(e),r=e.ownerDocument.body,o=Jl(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Jl(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+ru(e);const s=-n.scrollTop;return"rtl"===Fc(r).direction&&(a+=Jl(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}(Ac(e));else if(Tc(t))r=function(e,t){const n=nu(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=_c(e)?Xc(e):tc(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=tu(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Cc(r)}function su(e,t){const n=zc(e);return!(n===t||!Tc(n)||Hc(n))&&("fixed"===Fc(n).position||su(n,t))}function lu(e,t,n){const r=_c(t),o=Ac(t),i="fixed"===n,a=nu(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=tc(0);function c(){l.x=ru(o)}if(r||!r&&!i)if(("body"!==Rc(t)||Nc(o))&&(s=Vc(t)),r){const e=nu(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&c();i&&!r&&o&&c();const u=!o||r||i?tc(0):ou(o,s);return{x:a.left+s.scrollLeft-l.x-u.x,y:a.top+s.scrollTop-l.y-u.y,width:a.width,height:a.height}}function cu(e){return"static"===Fc(e).position}function uu(e,t){if(!_c(e)||"fixed"===Fc(e).position)return null;if(t)return t(e);let n=e.offsetParent;return Ac(e)===n&&(n=n.ownerDocument.body),n}function du(e,t){const n=Ec(e);if(Uc(e))return n;if(!_c(e)){let t=zc(e);for(;t&&!Hc(t);){if(Tc(t)&&!cu(t))return t;t=zc(t)}return n}let r=uu(e,t);for(;r&&Wc(r)&&cu(r);)r=uu(r,t);return r&&Hc(r)&&cu(r)&&!$c(r)?n:r||function(e){let t=zc(e);for(;_c(t)&&!Hc(t);){if($c(t))return t;if(Uc(t))return null;t=zc(t)}return null}(e)||n}const hu={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,a=Ac(r),s=!!t&&Uc(t.floating);if(r===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},c=tc(1);const u=tc(0),d=_c(r);if((d||!d&&!i)&&(("body"!==Rc(r)||Nc(a))&&(l=Vc(r)),_c(r))){const e=nu(r);c=Xc(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}const h=!a||d||i?tc(0):ou(a,l,!0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+h.x,y:n.y*c.y-l.scrollTop*c.y+u.y+h.y}},getDocumentElement:Ac,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?Uc(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=Gc(e,[],!1).filter(e=>Tc(e)&&"body"!==Rc(e)),o=null;const i="fixed"===Fc(e).position;let a=i?zc(e):e;for(;Tc(a)&&!Hc(a);){const t=Fc(a),n=$c(a);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&iu.has(o.position)||Nc(a)&&!n&&su(e,a))?r=r.filter(e=>e!==a):o=t,a=zc(a)}return t.set(e,r),r}(t,this._c):[].concat(n),r],a=i[0],s=i.reduce((e,n)=>{const r=au(t,n,o);return e.top=Jl(r.top,e.top),e.right=Ql(r.right,e.right),e.bottom=Ql(r.bottom,e.bottom),e.left=Jl(r.left,e.left),e},au(t,a,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:du,getElementRects:function(e){return v(this,null,function*(){const t=this.getOffsetParent||du,n=this.getDimensions,r=yield n(e.floating);return{reference:lu(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=Qc(e);return{width:t,height:n}},getScale:Xc,isElement:Tc,isRTL:function(e){return"rtl"===Fc(e).direction}};function fu(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function pu(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,c=Jc(e),u=o||i?[...c?Gc(c):[],...Gc(t)]:[];u.forEach(e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)});const d=c&&s?function(e,t){let n,r=null;const o=Ac(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function a(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),i();const c=e.getBoundingClientRect(),{left:u,top:d,width:h,height:f}=c;if(s||t(),!h||!f)return;const p={rootMargin:-ec(d)+"px "+-ec(o.clientWidth-(u+h))+"px "+-ec(o.clientHeight-(d+f))+"px "+-ec(u)+"px",threshold:Jl(0,Ql(1,l))||1};let g=!0;function y(t){const r=t[0].intersectionRatio;if(r!==l){if(!g)return a();r?a(!1,r):n=setTimeout(()=>{a(!1,1e-7)},1e3)}1!==r||fu(c,e.getBoundingClientRect())||a(),g=!1}try{r=new IntersectionObserver(y,w(m({},p),{root:o.ownerDocument}))}catch(v){r=new IntersectionObserver(y,p)}r.observe(e)}(!0),i}(c,n):null;let h,f=-1,p=null;a&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;null==(e=p)||e.observe(t)})),n()}),c&&!l&&p.observe(c),p.observe(t));let g=l?nu(e):null;return l&&function t(){const r=nu(e);g&&!fu(g,r)&&n();g=r,h=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach(e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)}),null==d||d(),null==(e=p)||e.disconnect(),p=null,l&&cancelAnimationFrame(h)}}const gu=function(e){return void 0===e&&(e={}),{name:"shift",options:e,fn(t){return v(this,null,function*(){const{x:n,y:r,placement:o}=t,i=ic(e,t),{mainAxis:a=!0,crossAxis:s=!1,limiter:l={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}}}=i,c=y(i,["mainAxis","crossAxis","limiter"]),u={x:n,y:r},d=yield Sc(t,c),h=dc(ac(o)),f=lc(h);let p=u[f],g=u[h];if(a){const e="y"===f?"bottom":"right";p=oc(p+d["y"===f?"top":"left"],p,p-d[e])}if(s){const e="y"===h?"bottom":"right";g=oc(g+d["y"===h?"top":"left"],g,g-d[e])}const v=l.fn(w(m({},t),{[f]:p,[h]:g}));return w(m({},v),{data:{x:v.x-n,y:v.y-r,enabled:{[f]:a,[h]:s}}})})}}},mu=function(e){return void 0===e&&(e={}),{name:"flip",options:e,fn(t){return v(this,null,function*(){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:l,elements:c}=t,u=ic(e,t),{mainAxis:d=!0,crossAxis:h=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:m=!0}=u,w=y(u,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const v=ac(o),b=dc(s),C=ac(s)===s,x=yield null==l.isRTL?void 0:l.isRTL(c.floating),S=f||(C||!m?[vc(s)]:function(e){const t=vc(e);return[fc(e),t,fc(t)]}(s)),k="none"!==g;!f&&k&&S.push(...yc(s,m,g,x));const R=[s,...S],E=yield Sc(t,w),A=[];let M=(null==(r=i.flip)?void 0:r.overflows)||[];if(d&&A.push(E[v]),h){const e=function(e,t,n){void 0===n&&(n=!1);const r=sc(e),o=hc(e),i=cc(o);let a="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=vc(a)),[a,vc(a)]}(o,a,x);A.push(E[e[0]],E[e[1]])}if(M=[...M,{placement:o,overflows:A}],!A.every(e=>e<=0)){var T,_;const e=((null==(T=i.flip)?void 0:T.index)||0)+1,t=R[e];if(t){if(!("alignment"===h&&b!==dc(t))||M.every(e=>dc(e.placement)!==b||e.overflows[0]>0))return{data:{index:e,overflows:M},reset:{placement:t}}}let n=null==(_=M.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:_.placement;if(!n)switch(p){case"bestFit":{var O;const e=null==(O=M.filter(e=>{if(k){const t=dc(e.placement);return t===b||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:O[0];e&&(n=e);break}case"initialPlacement":n=s}if(o!==n)return{reset:{placement:n}}}return{}})}}},wu=(e,t,n)=>{const r=new Map,o=m({platform:hu},n),i=w(m({},o.platform),{_c:r});return((e,t,n)=>v(null,null,function*(){const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),l=yield null==a.isRTL?void 0:a.isRTL(t);let c=yield a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=xc(c,r,l),h=r,f={},p=0;for(let n=0;n<s.length;n++){const{name:i,fn:g}=s[n],{x:y,y:v,data:b,reset:C}=yield g({x:u,y:d,initialPlacement:r,placement:h,strategy:o,middlewareData:f,rects:c,platform:a,elements:{reference:e,floating:t}});u=null!=y?y:u,d=null!=v?v:d,f=w(m({},f),{[i]:m(m({},f[i]),b)}),C&&p<=50&&(p++,"object"==typeof C&&(C.placement&&(h=C.placement),C.rects&&(c=!0===C.rects?yield a.getElementRects({reference:e,floating:t,strategy:o}):C.rects),({x:u,y:d}=xc(c,h,l))),n=-1)}return{x:u,y:d,placement:h,strategy:o,middlewareData:f}}))(e,t,w(m({},o),{platform:i}))};var yu=rr("<tc-root data-tc-dropdown-container=true>",!0,!1,!1);const vu=()=>{const t=Or(),n=wn(Eo),r=wn(hl),[o,i]=Jt(!1),[a,s]=Jt(n.account),[l,c]=Jt(!n.account);let u;const[d,h]=Jt(),[f,p]=Jt(),g=function(e,t,n){let r=()=>{var e;return null!=(e=null==n?void 0:n.placement)?e:"bottom"},o=()=>{var e;return null!=(e=null==n?void 0:n.strategy)?e:"absolute"},[i,a]=Jt({x:null,y:null,placement:r(),strategy:o(),middlewareData:{}}),[s,l]=Jt();tn(()=>{let e=s();if(e)throw e.value});let c=nn(()=>(e(),t(),{}));function u(){let i=e(),s=t();if(i&&s){let e=c();wu(i,s,{middleware:null==n?void 0:n.middleware,placement:r(),strategy:o()}).then(t=>{e===c()&&a(t)},e=>{l(e)})}}return tn(()=>{let i=e(),a=t();if(r(),o(),i&&a)if(null!=n&&n.whileElementsMounted){let e=n.whileElementsMounted(i,a,u);e&&ln(e)}else u()}),{get x(){return i().x},get y(){return i().y},get placement(){return i().placement},get strategy(){return i().strategy},get middlewareData(){return i().middlewareData},update:u}}(f,d,{whileElementsMounted:pu,placement:"bottom-end",middleware:[mu(),gu()]});r.connectionRestored.then(()=>c(!1));const m=n.onStatusChange(e=>{if(!e)return i(!1),s(null),void c(!1);s(e.account),c(!1)}),w=e=>{if(!a()||!o())return;const t=f().contains(e.target),n=u.contains(e.target);t||n||i(!1)};return sn(()=>{document.body.addEventListener("click",w)}),ln(()=>{document.body.removeEventListener("click",w),m()}),Pn(yr,{component:Wr,get children(){return[Pn(Fn,{get when(){return l()},get children(){return Pn(Vl,{disabled:!0,"data-tc-connect-button-loading":"true",get children(){return Pn(zl,{})}})}}),Pn(Fn,{get when(){return!l()},get children(){return[Pn(Fn,{get when(){return!a()},get children(){return Pn(Hl,{onClick:()=>r.openModal(),"data-tc-connect-button":"true",scale:"s",get children(){return[Pn(as,{get fill(){return t.colors.connectButton.foreground}}),Pn(ja,{translationKey:"button.connectWallet",fontSize:"15px",lineHeight:"18px",fontWeight:"590",get color(){return t.colors.connectButton.foreground},children:"Connect wallet"})]}})}}),Pn(Fn,{get when(){return a()},get children(){return Pn(Zl,{get children(){return[Pn(Fl,{onClick:()=>i(e=>!e),ref:p,"data-tc-dropdown-button":"true",scale:"s",get children(){return[Pn(ja,{fontSize:"15px",fontWeight:"590",lineHeight:"18px",get children(){return(()=>{const t=a();if(t){const n=vt(t.address,t.chain===e.CHAIN.TESTNET);return n.slice(0,4)+"…"+n.slice(-4)}return""})()}}),Pn(Vi,{direction:"bottom"})]}}),Pn(wr,{get children(){var e=yu();return sr(h,e),e.style.setProperty("z-index","999"),e._$owner=un(),lr(e,Pn(Bi,{onBeforeEnter:e=>{sa(e,[{opacity:0,transform:"translateY(-8px)"},{opacity:1,transform:"translateY(0)"}],{duration:150})},onExit:(e,t)=>{sa(e,[{opacity:1,transform:"translateY(0)"},{opacity:0,transform:"translateY(-8px)"}],{duration:150}).finished.then(t)},get children(){return Pn(Fn,{get when(){return o()},get children(){return Pn(Gl,{get hidden(){return!o()},onClose:()=>i(!1),ref(e){"function"==typeof u?u(e):u=e}})}})}}),null),lr(e,Pn(Yl,{}),null),en(t=>{var n,r,o=g.strategy,i=`${null!=(n=g.y)?n:0}px`,a=`${null!=(r=g.x)?r:0}px`;return o!==t.e&&(null!=(t.e=o)?e.style.setProperty("position",o):e.style.removeProperty("position")),i!==t.t&&(null!=(t.t=i)?e.style.setProperty("top",i):e.style.removeProperty("top")),a!==t.a&&(null!=(t.a=a)?e.style.setProperty("left",a):e.style.removeProperty("left")),t},{e:void 0,t:void 0,a:void 0}),e}})]}})}})]}})]}})},bu=Nr(ha)`
627
+ `,tc=Math.min,nc=Math.max,rc=Math.round,oc=Math.floor,ic=e=>({x:e,y:e}),ac={left:"right",right:"left",bottom:"top",top:"bottom"},sc={start:"end",end:"start"};function lc(e,t,n){return nc(e,tc(t,n))}function cc(e,t){return"function"==typeof e?e(t):e}function uc(e){return e.split("-")[0]}function dc(e){return e.split("-")[1]}function hc(e){return"x"===e?"y":"x"}function fc(e){return"y"===e?"height":"width"}const pc=new Set(["top","bottom"]);function gc(e){return pc.has(uc(e))?"y":"x"}function mc(e){return hc(gc(e))}function wc(e){return e.replace(/start|end/g,e=>sc[e])}const yc=["left","right"],vc=["right","left"],bc=["top","bottom"],Cc=["bottom","top"];function xc(e,t,n,r){const o=dc(e);let i=function(e,t,n){switch(e){case"top":case"bottom":return n?t?vc:yc:t?yc:vc;case"left":case"right":return t?bc:Cc;default:return[]}}(uc(e),"start"===n,r);return o&&(i=i.map(e=>e+"-"+o),t&&(i=i.concat(i.map(wc)))),i}function Sc(e){return e.replace(/left|right|bottom|top/g,e=>ac[e])}function kc(e){return"number"!=typeof e?function(e){return m({top:0,right:0,bottom:0,left:0},e)}(e):{top:e,right:e,bottom:e,left:e}}function Rc(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Ec(e,t,n){let{reference:r,floating:o}=e;const i=gc(t),a=mc(t),s=fc(a),l=uc(t),c="y"===i,u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,h=r[s]/2-o[s]/2;let f;switch(l){case"top":f={x:u,y:r.y-o.height};break;case"bottom":f={x:u,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:d};break;case"left":f={x:r.x-o.width,y:d};break;default:f={x:r.x,y:r.y}}switch(dc(t)){case"start":f[a]-=h*(n&&c?-1:1);break;case"end":f[a]+=h*(n&&c?-1:1)}return f}function Tc(e,t){return v(this,null,function*(){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:h=!1,padding:f=0}=cc(t,e),p=kc(f),g=s[h?"floating"===d?"reference":"floating":d],m=Rc(yield i.getClippingRect({element:null==(n=yield null==i.isElement?void 0:i.isElement(g))||n?g:g.contextElement||(yield null==i.getDocumentElement?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),w="floating"===d?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,y=yield null==i.getOffsetParent?void 0:i.getOffsetParent(s.floating),v=(yield null==i.isElement?void 0:i.isElement(y))&&(yield null==i.getScale?void 0:i.getScale(y))||{x:1,y:1},b=Rc(i.convertOffsetParentRelativeRectToViewportRelativeRect?yield i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:w,offsetParent:y,strategy:l}):w);return{top:(m.top-b.top+p.top)/v.y,bottom:(b.bottom-m.bottom+p.bottom)/v.y,left:(m.left-b.left+p.left)/v.x,right:(b.right-m.right+p.right)/v.x}})}function Ac(){return"undefined"!=typeof window}function Mc(e){return Lc(e)?(e.nodeName||"").toLowerCase():"#document"}function _c(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Oc(e){var t;return null==(t=(Lc(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Lc(e){return!!Ac()&&(e instanceof Node||e instanceof _c(e).Node)}function Ic(e){return!!Ac()&&(e instanceof Element||e instanceof _c(e).Element)}function Nc(e){return!!Ac()&&(e instanceof HTMLElement||e instanceof _c(e).HTMLElement)}function Wc(e){return!(!Ac()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof _c(e).ShadowRoot)}const Pc=new Set(["inline","contents"]);function Uc(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Gc(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Pc.has(o)}const Dc=new Set(["table","td","th"]);function jc(e){return Dc.has(Mc(e))}const Bc=[":popover-open",":modal"];function $c(e){return Bc.some(t=>{try{return e.matches(t)}catch(n){return!1}})}const qc=["transform","translate","scale","rotate","perspective"],Kc=["transform","translate","scale","rotate","perspective","filter"],Hc=["paint","layout","strict","content"];function Fc(e){const t=Vc(),n=Ic(e)?Gc(e):e;return qc.some(e=>!!n[e]&&"none"!==n[e])||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||Kc.some(e=>(n.willChange||"").includes(e))||Hc.some(e=>(n.contain||"").includes(e))}function Vc(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const zc=new Set(["html","body","#document"]);function Zc(e){return zc.has(Mc(e))}function Gc(e){return _c(e).getComputedStyle(e)}function Yc(e){return Ic(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Qc(e){if("html"===Mc(e))return e;const t=e.assignedSlot||e.parentNode||Wc(e)&&e.host||Oc(e);return Wc(t)?t.host:t}function Jc(e){const t=Qc(e);return Zc(t)?e.ownerDocument?e.ownerDocument.body:e.body:Nc(t)&&Uc(t)?t:Jc(t)}function Xc(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=Jc(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=_c(o);if(i){const e=eu(a);return t.concat(a,a.visualViewport||[],Uc(o)?o:[],e&&n?Xc(e):[])}return t.concat(o,Xc(o,[],n))}function eu(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function tu(e){const t=Gc(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Nc(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=rc(n)!==i||rc(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function nu(e){return Ic(e)?e:e.contextElement}function ru(e){const t=nu(e);if(!Nc(t))return ic(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=tu(t);let a=(i?rc(n.width):n.width)/r,s=(i?rc(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const ou=ic(0);function iu(e){const t=_c(e);return Vc()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:ou}function au(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=nu(e);let a=ic(1);t&&(r?Ic(r)&&(a=ru(r)):a=ru(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==_c(e))&&t}(i,n,r)?iu(i):ic(0);let l=(o.left+s.x)/a.x,c=(o.top+s.y)/a.y,u=o.width/a.x,d=o.height/a.y;if(i){const e=_c(i),t=r&&Ic(r)?_c(r):r;let n=e,o=eu(n);for(;o&&r&&t!==n;){const e=ru(o),t=o.getBoundingClientRect(),r=Gc(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=i,c+=a,n=_c(o),o=eu(n)}}return Rc({width:u,height:d,x:l,y:c})}function su(e,t){const n=Yc(e).scrollLeft;return t?t.left+n:au(Oc(e)).left+n}function lu(e,t,n){void 0===n&&(n=!1);const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-(n?0:su(e,r)),y:r.top+t.scrollTop}}const cu=new Set(["absolute","fixed"]);function uu(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=_c(e),r=Oc(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const e=Vc();(!e||e&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s,y:l}}(e,n);else if("document"===t)r=function(e){const t=Oc(e),n=Yc(e),r=e.ownerDocument.body,o=nc(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=nc(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+su(e);const s=-n.scrollTop;return"rtl"===Gc(r).direction&&(a+=nc(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}(Oc(e));else if(Ic(t))r=function(e,t){const n=au(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Nc(e)?ru(e):ic(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=iu(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Rc(r)}function du(e,t){const n=Qc(e);return!(n===t||!Ic(n)||Zc(n))&&("fixed"===Gc(n).position||du(n,t))}function hu(e,t,n){const r=Nc(t),o=Oc(t),i="fixed"===n,a=au(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=ic(0);function c(){l.x=su(o)}if(r||!r&&!i)if(("body"!==Mc(t)||Uc(o))&&(s=Yc(t)),r){const e=au(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&c();i&&!r&&o&&c();const u=!o||r||i?ic(0):lu(o,s);return{x:a.left+s.scrollLeft-l.x-u.x,y:a.top+s.scrollTop-l.y-u.y,width:a.width,height:a.height}}function fu(e){return"static"===Gc(e).position}function pu(e,t){if(!Nc(e)||"fixed"===Gc(e).position)return null;if(t)return t(e);let n=e.offsetParent;return Oc(e)===n&&(n=n.ownerDocument.body),n}function gu(e,t){const n=_c(e);if($c(e))return n;if(!Nc(e)){let t=Qc(e);for(;t&&!Zc(t);){if(Ic(t)&&!fu(t))return t;t=Qc(t)}return n}let r=pu(e,t);for(;r&&jc(r)&&fu(r);)r=pu(r,t);return r&&Zc(r)&&fu(r)&&!Fc(r)?n:r||function(e){let t=Qc(e);for(;Nc(t)&&!Zc(t);){if(Fc(t))return t;if($c(t))return null;t=Qc(t)}return null}(e)||n}const mu={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,a=Oc(r),s=!!t&&$c(t.floating);if(r===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},c=ic(1);const u=ic(0),d=Nc(r);if((d||!d&&!i)&&(("body"!==Mc(r)||Uc(a))&&(l=Yc(r)),Nc(r))){const e=au(r);c=ru(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}const h=!a||d||i?ic(0):lu(a,l,!0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+h.x,y:n.y*c.y-l.scrollTop*c.y+u.y+h.y}},getDocumentElement:Oc,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?$c(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=Xc(e,[],!1).filter(e=>Ic(e)&&"body"!==Mc(e)),o=null;const i="fixed"===Gc(e).position;let a=i?Qc(e):e;for(;Ic(a)&&!Zc(a);){const t=Gc(a),n=Fc(a);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&cu.has(o.position)||Uc(a)&&!n&&du(e,a))?r=r.filter(e=>e!==a):o=t,a=Qc(a)}return t.set(e,r),r}(t,this._c):[].concat(n),r],a=i[0],s=i.reduce((e,n)=>{const r=uu(t,n,o);return e.top=nc(r.top,e.top),e.right=tc(r.right,e.right),e.bottom=tc(r.bottom,e.bottom),e.left=nc(r.left,e.left),e},uu(t,a,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:gu,getElementRects:function(e){return v(this,null,function*(){const t=this.getOffsetParent||gu,n=this.getDimensions,r=yield n(e.floating);return{reference:hu(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=tu(e);return{width:t,height:n}},getScale:ru,isElement:Ic,isRTL:function(e){return"rtl"===Gc(e).direction}};function wu(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function yu(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,c=nu(e),u=o||i?[...c?Xc(c):[],...Xc(t)]:[];u.forEach(e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)});const d=c&&s?function(e,t){let n,r=null;const o=Oc(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function a(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),i();const c=e.getBoundingClientRect(),{left:u,top:d,width:h,height:f}=c;if(s||t(),!h||!f)return;const p={rootMargin:-oc(d)+"px "+-oc(o.clientWidth-(u+h))+"px "+-oc(o.clientHeight-(d+f))+"px "+-oc(u)+"px",threshold:nc(0,tc(1,l))||1};let g=!0;function y(t){const r=t[0].intersectionRatio;if(r!==l){if(!g)return a();r?a(!1,r):n=setTimeout(()=>{a(!1,1e-7)},1e3)}1!==r||wu(c,e.getBoundingClientRect())||a(),g=!1}try{r=new IntersectionObserver(y,w(m({},p),{root:o.ownerDocument}))}catch(v){r=new IntersectionObserver(y,p)}r.observe(e)}(!0),i}(c,n):null;let h,f=-1,p=null;a&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;null==(e=p)||e.observe(t)})),n()}),c&&!l&&p.observe(c),p.observe(t));let g=l?au(e):null;return l&&function t(){const r=au(e);g&&!wu(g,r)&&n();g=r,h=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach(e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)}),null==d||d(),null==(e=p)||e.disconnect(),p=null,l&&cancelAnimationFrame(h)}}const vu=function(e){return void 0===e&&(e={}),{name:"shift",options:e,fn(t){return v(this,null,function*(){const{x:n,y:r,placement:o}=t,i=cc(e,t),{mainAxis:a=!0,crossAxis:s=!1,limiter:l={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}}}=i,c=y(i,["mainAxis","crossAxis","limiter"]),u={x:n,y:r},d=yield Tc(t,c),h=gc(uc(o)),f=hc(h);let p=u[f],g=u[h];if(a){const e="y"===f?"bottom":"right";p=lc(p+d["y"===f?"top":"left"],p,p-d[e])}if(s){const e="y"===h?"bottom":"right";g=lc(g+d["y"===h?"top":"left"],g,g-d[e])}const v=l.fn(w(m({},t),{[f]:p,[h]:g}));return w(m({},v),{data:{x:v.x-n,y:v.y-r,enabled:{[f]:a,[h]:s}}})})}}},bu=function(e){return void 0===e&&(e={}),{name:"flip",options:e,fn(t){return v(this,null,function*(){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:l,elements:c}=t,u=cc(e,t),{mainAxis:d=!0,crossAxis:h=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:m=!0}=u,w=y(u,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const v=uc(o),b=gc(s),C=uc(s)===s,x=yield null==l.isRTL?void 0:l.isRTL(c.floating),S=f||(C||!m?[Sc(s)]:function(e){const t=Sc(e);return[wc(e),t,wc(t)]}(s)),k="none"!==g;!f&&k&&S.push(...xc(s,m,g,x));const R=[s,...S],E=yield Tc(t,w),T=[];let A=(null==(r=i.flip)?void 0:r.overflows)||[];if(d&&T.push(E[v]),h){const e=function(e,t,n){void 0===n&&(n=!1);const r=dc(e),o=mc(e),i=fc(o);let a="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Sc(a)),[a,Sc(a)]}(o,a,x);T.push(E[e[0]],E[e[1]])}if(A=[...A,{placement:o,overflows:T}],!T.every(e=>e<=0)){var M,_;const e=((null==(M=i.flip)?void 0:M.index)||0)+1,t=R[e];if(t){if(!("alignment"===h&&b!==gc(t))||A.every(e=>gc(e.placement)!==b||e.overflows[0]>0))return{data:{index:e,overflows:A},reset:{placement:t}}}let n=null==(_=A.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:_.placement;if(!n)switch(p){case"bestFit":{var O;const e=null==(O=A.filter(e=>{if(k){const t=gc(e.placement);return t===b||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:O[0];e&&(n=e);break}case"initialPlacement":n=s}if(o!==n)return{reset:{placement:n}}}return{}})}}},Cu=(e,t,n)=>{const r=new Map,o=m({platform:mu},n),i=w(m({},o.platform),{_c:r});return((e,t,n)=>v(null,null,function*(){const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),l=yield null==a.isRTL?void 0:a.isRTL(t);let c=yield a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=Ec(c,r,l),h=r,f={},p=0;for(let n=0;n<s.length;n++){const{name:i,fn:g}=s[n],{x:y,y:v,data:b,reset:C}=yield g({x:u,y:d,initialPlacement:r,placement:h,strategy:o,middlewareData:f,rects:c,platform:a,elements:{reference:e,floating:t}});u=null!=y?y:u,d=null!=v?v:d,f=w(m({},f),{[i]:m(m({},f[i]),b)}),C&&p<=50&&(p++,"object"==typeof C&&(C.placement&&(h=C.placement),C.rects&&(c=!0===C.rects?yield a.getElementRects({reference:e,floating:t,strategy:o}):C.rects),({x:u,y:d}=Ec(c,h,l))),n=-1)}return{x:u,y:d,placement:h,strategy:o,middlewareData:f}}))(e,t,w(m({},o),{platform:i}))};var xu=sr("<tc-root data-tc-dropdown-container=true>",!0,!1,!1);const Su=()=>{const t=Wr(),n=Cn(_o),r=Cn(ml),[o,i]=nn(!1),[a,s]=nn(n.account),[l,c]=nn(!n.account);let u;const[d,h]=nn(),[f,p]=nn(),g=function(e,t,n){let r=()=>{var e;return null!=(e=null==n?void 0:n.placement)?e:"bottom"},o=()=>{var e;return null!=(e=null==n?void 0:n.strategy)?e:"absolute"},[i,a]=nn({x:null,y:null,placement:r(),strategy:o(),middlewareData:{}}),[s,l]=nn();an(()=>{let e=s();if(e)throw e.value});let c=sn(()=>(e(),t(),{}));function u(){let i=e(),s=t();if(i&&s){let e=c();Cu(i,s,{middleware:null==n?void 0:n.middleware,placement:r(),strategy:o()}).then(t=>{e===c()&&a(t)},e=>{l(e)})}}return an(()=>{let i=e(),a=t();if(r(),o(),i&&a)if(null!=n&&n.whileElementsMounted){let e=n.whileElementsMounted(i,a,u);e&&hn(e)}else u()}),{get x(){return i().x},get y(){return i().y},get placement(){return i().placement},get strategy(){return i().strategy},get middlewareData(){return i().middlewareData},update:u}}(f,d,{whileElementsMounted:yu,placement:"bottom-end",middleware:[bu(),vu()]});r.connectionRestored.then(()=>c(!1));const m=n.onStatusChange(e=>{if(!e)return i(!1),s(null),void c(!1);s(e.account),c(!1)}),w=e=>{if(!a()||!o())return;const t=f().contains(e.target),n=u.contains(e.target);t||n||i(!1)};return dn(()=>{document.body.addEventListener("click",w)}),hn(()=>{document.body.removeEventListener("click",w),m()}),Bn(xr,{component:jr,get children(){return[Bn(Gn,{get when(){return l()},get children(){return Bn(Yl,{disabled:!0,"data-tc-connect-button-loading":"true",get children(){return Bn(Ql,{})}})}}),Bn(Gn,{get when(){return!l()},get children(){return[Bn(Gn,{get when(){return!a()},get children(){return Bn(Zl,{onClick:()=>r.openModal(),"data-tc-connect-button":"true",scale:"s",get children(){return[Bn(us,{get fill(){return t.colors.connectButton.foreground}}),Bn(Ka,{translationKey:"button.connectWallet",fontSize:"15px",lineHeight:"18px",fontWeight:"590",get color(){return t.colors.connectButton.foreground},children:"Connect wallet"})]}})}}),Bn(Gn,{get when(){return a()},get children(){return Bn(Jl,{get children(){return[Bn(Gl,{onClick:()=>i(e=>!e),ref:p,"data-tc-dropdown-button":"true",scale:"s",get children(){return[Bn(Ka,{fontSize:"15px",fontWeight:"590",lineHeight:"18px",get children(){return(()=>{const t=a();if(t){const n=vt(t.address,t.chain===e.CHAIN.TESTNET);return n.slice(0,4)+"…"+n.slice(-4)}return""})()}}),Bn(Yi,{direction:"bottom"})]}}),Bn(Cr,{get children(){var e=xu();return dr(h,e),e.style.setProperty("z-index","999"),e._$owner=pn(),hr(e,Bn(Hi,{onBeforeEnter:e=>{da(e,[{opacity:0,transform:"translateY(-8px)"},{opacity:1,transform:"translateY(0)"}],{duration:150})},onExit:(e,t)=>{da(e,[{opacity:1,transform:"translateY(0)"},{opacity:0,transform:"translateY(-8px)"}],{duration:150}).finished.then(t)},get children(){return Bn(Gn,{get when(){return o()},get children(){return Bn(Xl,{get hidden(){return!o()},onClose:()=>i(!1),ref(e){"function"==typeof u?u(e):u=e}})}})}}),null),hr(e,Bn(ec,{}),null),on(t=>{var n,r,o=g.strategy,i=`${null!=(n=g.y)?n:0}px`,a=`${null!=(r=g.x)?r:0}px`;return o!==t.e&&(null!=(t.e=o)?e.style.setProperty("position",o):e.style.removeProperty("position")),i!==t.t&&(null!=(t.t=i)?e.style.setProperty("top",i):e.style.removeProperty("top")),a!==t.a&&(null!=(t.a=a)?e.style.setProperty("left",a):e.style.removeProperty("left")),t},{e:void 0,t:void 0,a:void 0}),e}})]}})}})]}})]}})},ku=Ur(ma)`
629
628
  padding-left: 24px;
630
629
  padding-right: 24px;
631
630
  padding-top: 18px;
632
631
  padding-bottom: 0;
633
632
 
634
- ${mi("mobile")} {
633
+ ${bi("mobile")} {
635
634
  padding-left: 0;
636
635
  padding-right: 0;
637
636
  }
638
- `,Cu=Nr(es)`
637
+ `,Ru=Ur(os)`
639
638
  margin-top: 12px;
640
639
 
641
- ${mi("mobile")} {
640
+ ${bi("mobile")} {
642
641
  padding: 0 10px;
643
642
  }
644
- `,xu=Nr.div`
643
+ `,Eu=Ur.div`
645
644
  margin: 30px 0;
646
645
  width: 100%;
647
646
  display: flex;
648
647
  justify-content: center;
649
648
 
650
- ${mi("mobile")} {
649
+ ${bi("mobile")} {
651
650
  height: 160px;
652
651
  align-items: center;
653
652
  }
654
- `;Nr(ja)`
653
+ `;Ur(Ka)`
655
654
  min-width: 84px;
656
655
  text-align: center;
657
656
  font-weight: 590;
658
- `,Nr(e=>{const t="tabBar"+Math.floor(1e4*Math.random());return Pn(ga,{get class(){return e.class},"data-tc-tab-bar":"true",get children(){return[Pn(ma,{get right(){return 1===e.selectedTabIndex}}),Pn(ya,{get isActive(){return 0===e.selectedTabIndex},get children(){return[Pn(wa,{type:"radio",name:t,get checked(){return 0===e.selectedTabIndex},onInput:()=>{var t;return null==(t=e.onSelectedTabIndexChange)?void 0:t.call(e,0)}}),tr(()=>e.tab1)]}}),Pn(ya,{get isActive(){return 1===e.selectedTabIndex},get children(){return[Pn(wa,{type:"radio",get checked(){return 1===e.selectedTabIndex},name:t,onInput:()=>{var t;return null==(t=e.onSelectedTabIndexChange)?void 0:t.call(e,1)}}),tr(()=>e.tab2)]}})]}})})`
657
+ `,Ur(e=>{const t="tabBar"+Math.floor(1e4*Math.random());return Bn(va,{get class(){return e.class},"data-tc-tab-bar":"true",get children(){return[Bn(ba,{get right(){return 1===e.selectedTabIndex}}),Bn(xa,{get isActive(){return 0===e.selectedTabIndex},get children(){return[Bn(Ca,{type:"radio",name:t,get checked(){return 0===e.selectedTabIndex},onInput:()=>{var t;return null==(t=e.onSelectedTabIndexChange)?void 0:t.call(e,0)}}),ir(()=>e.tab1)]}}),Bn(xa,{get isActive(){return 1===e.selectedTabIndex},get children(){return[Bn(Ca,{type:"radio",get checked(){return 1===e.selectedTabIndex},name:t,onInput:()=>{var t;return null==(t=e.onSelectedTabIndexChange)?void 0:t.call(e,1)}}),ir(()=>e.tab2)]}})]}})})`
659
658
  margin: 0 auto 22px;
660
- `;const[Su,ku]=$o({buttonRootId:null,language:"en",returnStrategy:"back",twaReturnUrl:void 0,walletsListConfiguration:{},enableAndroidBackHandler:!0});function Ru(e){return"jsBridgeKey"in e?w(m({},e),{injected:Wt.isWalletInjected(e.jsBridgeKey),embedded:Wt.isInsideWalletBrowser(e.jsBridgeKey)}):e}function Eu(e,t){var n,r,o,i;return t?((null==(n=t.includeWallets)?void 0:n.length)&&(r="name",o=e,i=t.includeWallets.map(Ru),e=o.map(e=>{const t=i.find(t=>t[r]===e[r]);return i=i.filter(t=>t[r]!==e[r]),void 0===t?e:t}).concat(i)),e):e}function Au(e){return e.platforms.some(e=>["macos","linux","windows"].includes(e))}function Mu(e){return e.platforms.some(e=>["ios","android"].includes(e))}function Tu(e){return e.platforms.some(e=>["chrome","firefox","safari"].includes(e))}function _u(e,t){return!!t&&(e.name.toLowerCase()===t.toLowerCase()||e.appName.toLowerCase()===t.toLowerCase())}const Ou=Nr.div`
659
+ `;const[Tu,Au]=Fo({buttonRootId:null,language:"en",returnStrategy:"back",twaReturnUrl:void 0,walletsListConfiguration:{},enableAndroidBackHandler:!0});function Mu(e){return"jsBridgeKey"in e?w(m({},e),{injected:jt.isWalletInjected(e.jsBridgeKey),embedded:jt.isInsideWalletBrowser(e.jsBridgeKey)}):e}function _u(e,t){var n,r,o,i;return t?((null==(n=t.includeWallets)?void 0:n.length)&&(r="name",o=e,i=t.includeWallets.map(Mu),e=o.map(e=>{const t=i.find(t=>t[r]===e[r]);return i=i.filter(t=>t[r]!==e[r]),void 0===t?e:t}).concat(i)),e):e}function Ou(e){return e.platforms.some(e=>["macos","linux","windows"].includes(e))}function Lu(e){return e.platforms.some(e=>["ios","android"].includes(e))}function Iu(e){return e.platforms.some(e=>["chrome","firefox","safari"].includes(e))}function Nu(e,t){return!!t&&(e.name.toLowerCase()===t.toLowerCase()||e.appName.toLowerCase()===t.toLowerCase())}const Wu=Ur.div`
661
660
  display: flex;
662
661
  flex-direction: column;
663
662
  align-items: center;
664
- `,Lu=Nr(es)`
663
+ `,Pu=Ur(os)`
665
664
  margin-bottom: 18px;
666
- `;Nr.div`
665
+ `;Ur.div`
667
666
  height: 1px;
668
667
  margin: 0 -24px;
669
668
  width: calc(100% + 48px);
@@ -671,10 +670,10 @@
671
670
  background: ${e=>e.isShown?e.theme.colors.icon.secondary:"transparent"};
672
671
  transition: background 0.15s ease-in-out;
673
672
 
674
- ${mi("mobile")} {
673
+ ${bi("mobile")} {
675
674
  width: 100%;
676
675
  }
677
- `;const Nu=Nr.ul`
676
+ `;const Uu=Ur.ul`
678
677
  display: grid;
679
678
  grid-template-columns: repeat(auto-fit, 92px);
680
679
  grid-template-rows: auto;
@@ -692,7 +691,7 @@
692
691
  height: fit-content;
693
692
  }
694
693
 
695
- ${mi("mobile")} {
694
+ ${bi("mobile")} {
696
695
  display: grid;
697
696
  grid-template-columns: repeat(4, 1fr);
698
697
  gap: 0;
@@ -708,17 +707,17 @@
708
707
  width: 100%;
709
708
  }
710
709
  }
711
- `;Nr(Si)`
710
+ `;Ur(Ti)`
712
711
  display: block;
713
712
  margin: 0 auto 1px;
714
713
  font-size: 15px;
715
- `;const Iu=Nr(Yi)`
714
+ `;const Du=Ur(ea)`
716
715
  position: absolute;
717
716
  top: 16px;
718
717
  left: 16px;
719
- `,Wu=Nr(tl)`
718
+ `,ju=Ur(il)`
720
719
  opacity: ${e=>e.withOpacity?"0.4":"1"};
721
- `,Pu=Nr.div`
720
+ `,Bu=Ur.div`
722
721
  display: grid;
723
722
  grid-template-columns: auto 28px;
724
723
  gap: 16px;
@@ -728,15 +727,15 @@
728
727
  color: ${e=>e.theme.colors.text.secondary};
729
728
  background: ${e=>e.theme.colors.background.tint};
730
729
 
731
- ${mi("mobile")} {
730
+ ${bi("mobile")} {
732
731
  margin-left: 16px;
733
732
  margin-right: 16px;
734
733
  }
735
- `,Uu=Nr(ns)`
734
+ `,$u=Ur(as)`
736
735
  color: ${e=>e.theme.colors.text.secondary};
737
736
  text-align: left;
738
737
  margin: 0;
739
- `,Du=Nr.div`
738
+ `,qu=Ur.div`
740
739
  position: absolute;
741
740
  bottom: 14px;
742
741
  left: 50%;
@@ -752,10 +751,10 @@
752
751
 
753
752
  filter: drop-shadow(0px 2px 8px rgba(0, 0, 0, 0.08));
754
753
  background-color: ${e=>e.theme.colors.background.segment};
755
- `;var ju=rr('<svg width=16 height=16 viewBox="0 0 16 16"fill=none xmlns=http://www.w3.org/2000/svg><g clip-path=url(#clip0_5122_10355)><circle cx=8 cy=8 r=8></circle><circle cx=8 cy=11 r=1></circle><path d="M7.04994 4.99875C7.02277 4.45542 7.45598 4 8 4C8.54402 4 8.97723 4.45541 8.95006 4.99875L8.78745 8.25094C8.76647 8.67055 8.42014 9 8 9C7.57986 9 7.23353 8.67055 7.21255 8.25094L7.04994 4.99875Z"></path></g><defs><clipPath id=clip0_5122_10355><rect width=16 height=16>'),Bu=rr('<svg xmlns=http://www.w3.org/2000/svg width=28 height=28 viewBox="0 0 28 28"fill=none><circle cx=14 cy=14 r=12></circle><circle cx=14 cy=18.9 r=1.4></circle><path d="M12.6658 8.89845C12.63 8.13698 13.2377 7.5 14 7.5C14.7623 7.5 15.37 8.13698 15.3342 8.89845L15.047 15.0013C15.0207 15.5604 14.5597 16.0002 14 16.0002C13.4403 16.0002 12.9793 15.5604 12.953 15.0013L12.6658 8.89845Z">');const $u=e=>{const t=Or(),n=()=>e.size,r=()=>e.fill||t.colors.icon.error;return tr(()=>{return tr(()=>"16"===n())()?(l=ju(),c=l.firstChild,u=c.firstChild,d=u.nextSibling,h=d.nextSibling,f=c.nextSibling.firstChild.firstChild,en(e=>{var n=r(),o=t.colors.constant.white,i=t.colors.constant.white,a=t.colors.constant.white;return n!==e.e&&or(u,"fill",e.e=n),o!==e.t&&or(d,"fill",e.t=o),i!==e.a&&or(h,"fill",e.a=i),a!==e.o&&or(f,"fill",e.o=a),e},{e:void 0,t:void 0,a:void 0,o:void 0}),l):tr(()=>"28"===n())()?(o=Bu(),i=o.firstChild,a=i.nextSibling,s=a.nextSibling,en(n=>{var l=e.class,c=r(),u=t.colors.constant.white,d=t.colors.constant.white;return l!==n.e&&or(o,"class",n.e=l),c!==n.t&&or(i,"fill",n.t=c),u!==n.a&&or(a,"fill",n.a=u),d!==n.o&&or(s,"fill",n.o=d),n},{e:void 0,t:void 0,a:void 0,o:void 0}),o):null;var o,i,a,s,l,c,u,d,h,f})};var qu=rr("<li>");const Ku=e=>{const[t,n]=Jt(null);let r=null;const o=t=>{t.isSupportRequiredFeatures||"strict"!==e.featureCheckMode?e.onSelect(t):(e=>{n(e),null!=r&&clearTimeout(r),r=setTimeout(()=>n(null),1500)})(t)},i=()=>al()?e.walletsList.filter(Mu):e.walletsList,a=()=>i().filter(e=>!e.isSupportRequiredFeatures);return Pn(Ou,{"data-tc-wallets-modal-list":"true",get children(){return[Pn(Iu,{icon:"arrow",onClick:()=>e.onBack()}),Pn(Lu,{translationKey:"walletModal.wallets",children:"Wallets"}),Pn(cl,{get maxHeight(){return al()?void 0:510},get children(){return[Pn(Nu,{get children(){return Pn(Hn,{get each(){return i().filter(e=>e.isSupportRequiredFeatures)},children:t=>{return lr(n=qu(),Pn(Wu,{wallet:t,onClick:()=>e.onSelect(t)})),n;var n}})}}),Pn(Fn,{get when(){return a().length>0&&"hide"!==e.featureCheckMode},get children(){return[Pn(Pu,{get children(){return[Pn(Uu,{translationKey:"walletModal.allWallets.walletsBelowNotSupported",children:"The wallets below don’t support all features of the connected service. You can use your recovery phrase in one of the supported wallets above."}),Pn($u,{size:"28"})]}}),Pn(Nu,{get children(){return Pn(Hn,{get each(){return a()},children:t=>{return lr(n=qu(),Pn(Wu,{wallet:t,onClick:()=>o(t),get withOpacity(){return"strict"===e.featureCheckMode}})),n;var n}})}}),Pn(Bi,{onBeforeEnter:e=>{sa(e,[{opacity:0,transform:"translate(-50%, 44px)"},{opacity:1,transform:"translate(-50%, 0)"}],{duration:150,easing:"ease-out"})},onExit:(e,t)=>{sa(e,[{opacity:1,transform:"translate(-50%, 0)"},{opacity:0,transform:"translate(-50%, 44px)"}],{duration:150,easing:"ease-out"}).finished.then(()=>{t()})},get children(){return Pn(Fn,{get when(){return t()},get children(){return Pn(Du,{get children(){return[Pn(ps,{size:"xs"}),Pn(ja,{translationKey:"walletModal.allWallets.walletNotSupportService",get translationValues(){return{name:t().name}},get children(){return[tr(()=>t().name)," doesn’t support connected service"]}})]}})}})}})]}})]}})]}})},Hu={m:"16px",s:"12px",none:"0"},Fu={m:"6px",s:"6px",none:"0"},Vu=Nr.div`
754
+ `;var Ku=sr('<svg width=16 height=16 viewBox="0 0 16 16"fill=none xmlns=http://www.w3.org/2000/svg><g clip-path=url(#clip0_5122_10355)><circle cx=8 cy=8 r=8></circle><circle cx=8 cy=11 r=1></circle><path d="M7.04994 4.99875C7.02277 4.45542 7.45598 4 8 4C8.54402 4 8.97723 4.45541 8.95006 4.99875L8.78745 8.25094C8.76647 8.67055 8.42014 9 8 9C7.57986 9 7.23353 8.67055 7.21255 8.25094L7.04994 4.99875Z"></path></g><defs><clipPath id=clip0_5122_10355><rect width=16 height=16>'),Hu=sr('<svg xmlns=http://www.w3.org/2000/svg width=28 height=28 viewBox="0 0 28 28"fill=none><circle cx=14 cy=14 r=12></circle><circle cx=14 cy=18.9 r=1.4></circle><path d="M12.6658 8.89845C12.63 8.13698 13.2377 7.5 14 7.5C14.7623 7.5 15.37 8.13698 15.3342 8.89845L15.047 15.0013C15.0207 15.5604 14.5597 16.0002 14 16.0002C13.4403 16.0002 12.9793 15.5604 12.953 15.0013L12.6658 8.89845Z">');const Fu=e=>{const t=Wr(),n=()=>e.size,r=()=>e.fill||t.colors.icon.error;return ir(()=>{return ir(()=>"16"===n())()?(l=Ku(),c=l.firstChild,u=c.firstChild,d=u.nextSibling,h=d.nextSibling,f=c.nextSibling.firstChild.firstChild,on(e=>{var n=r(),o=t.colors.constant.white,i=t.colors.constant.white,a=t.colors.constant.white;return n!==e.e&&lr(u,"fill",e.e=n),o!==e.t&&lr(d,"fill",e.t=o),i!==e.a&&lr(h,"fill",e.a=i),a!==e.o&&lr(f,"fill",e.o=a),e},{e:void 0,t:void 0,a:void 0,o:void 0}),l):ir(()=>"28"===n())()?(o=Hu(),i=o.firstChild,a=i.nextSibling,s=a.nextSibling,on(n=>{var l=e.class,c=r(),u=t.colors.constant.white,d=t.colors.constant.white;return l!==n.e&&lr(o,"class",n.e=l),c!==n.t&&lr(i,"fill",n.t=c),u!==n.a&&lr(a,"fill",n.a=u),d!==n.o&&lr(s,"fill",n.o=d),n},{e:void 0,t:void 0,a:void 0,o:void 0}),o):null;var o,i,a,s,l,c,u,d,h,f})};var Vu=sr("<li>");const zu=e=>{const[t,n]=nn(null);let r=null;const o=t=>{t.isSupportRequiredFeatures||"strict"!==e.featureCheckMode?e.onSelect(t):(e=>{n(e),null!=r&&clearTimeout(r),r=setTimeout(()=>n(null),1500)})(t)},i=()=>ul()?e.walletsList.filter(Lu):e.walletsList,a=()=>i().filter(e=>!e.isSupportRequiredFeatures);return Bn(Wu,{"data-tc-wallets-modal-list":"true",get children(){return[Bn(Du,{icon:"arrow",onClick:()=>e.onBack()}),Bn(Pu,{translationKey:"walletModal.wallets",children:"Wallets"}),Bn(fl,{get maxHeight(){return ul()?void 0:510},get children(){return[Bn(Uu,{get children(){return Bn(Zn,{get each(){return i().filter(e=>e.isSupportRequiredFeatures)},children:t=>{return hr(n=Vu(),Bn(ju,{wallet:t,onClick:()=>e.onSelect(t)})),n;var n}})}}),Bn(Gn,{get when(){return a().length>0&&"hide"!==e.featureCheckMode},get children(){return[Bn(Bu,{get children(){return[Bn($u,{translationKey:"walletModal.allWallets.walletsBelowNotSupported",children:"The wallets below don’t support all features of the connected service. You can use your recovery phrase in one of the supported wallets above."}),Bn(Fu,{size:"28"})]}}),Bn(Uu,{get children(){return Bn(Zn,{get each(){return a()},children:t=>{return hr(n=Vu(),Bn(ju,{wallet:t,onClick:()=>o(t),get withOpacity(){return"strict"===e.featureCheckMode}})),n;var n}})}}),Bn(Hi,{onBeforeEnter:e=>{da(e,[{opacity:0,transform:"translate(-50%, 44px)"},{opacity:1,transform:"translate(-50%, 0)"}],{duration:150,easing:"ease-out"})},onExit:(e,t)=>{da(e,[{opacity:1,transform:"translate(-50%, 0)"},{opacity:0,transform:"translate(-50%, 44px)"}],{duration:150,easing:"ease-out"}).finished.then(()=>{t()})},get children(){return Bn(Gn,{get when(){return t()},get children(){return Bn(qu,{get children(){return[Bn(ys,{size:"xs"}),Bn(Ka,{translationKey:"walletModal.allWallets.walletNotSupportService",get translationValues(){return{name:t().name}},get children(){return[ir(()=>t().name)," doesn’t support connected service"]}})]}})}})}})]}})]}})]}})},Zu={m:"16px",s:"12px",none:"0"},Gu={m:"6px",s:"6px",none:"0"},Yu=Ur.div`
756
755
  display: flex;
757
756
  flex-direction: column;
758
- `,zu=Nr.div`
757
+ `,Qu=Ur.div`
759
758
  flex: 1;
760
759
  margin-top: ${e=>e.qr?"0":"18px"};
761
760
  display: flex;
@@ -763,76 +762,76 @@
763
762
  align-items: center;
764
763
  justify-content: center;
765
764
  min-height: 232px;
766
- `,Zu=Nr(Na)`
765
+ `,Ju=Ur(Ua)`
767
766
  margin-bottom: 24px;
768
- `,Gu=Nr(es)`
767
+ `,Xu=Ur(os)`
769
768
  max-width: 288px;
770
769
  margin: 0 auto 2px;
771
- `,Yu=Nr(ns)`
770
+ `,ed=Ur(as)`
772
771
  max-width: 288px;
773
772
  text-align: center;
774
773
  margin: 0 auto 20px;
775
- `,Qu=Nr(Yi)`
774
+ `,td=Ur(ea)`
776
775
  position: absolute;
777
776
  top: 16px;
778
777
  left: 16px;
779
- `,Ju=Nr.div`
778
+ `,nd=Ur.div`
780
779
  display: flex;
781
780
  justify-content: center;
782
781
  gap: 8px;
783
782
  padding-bottom: 16px;
784
- `,Xu=Nr(Ju)`
783
+ `,rd=Ur(nd)`
785
784
  padding-bottom: 0;
786
- `,ed=Nr(Si)`
785
+ `,od=Ur(Ti)`
787
786
  margin-bottom: 24px;
788
- `,td=Nr(ys)`
787
+ `,id=Ur(xs)`
789
788
  margin-bottom: 18px;
790
789
  margin-top: 2px;
791
- `,nd=Nr(ps)`
790
+ `,ad=Ur(ys)`
792
791
  margin-bottom: 16px;
793
- `,rd=Nr(ns)`
792
+ `,sd=Ur(as)`
794
793
  color: ${e=>e.theme.colors.text.secondary};
795
794
  text-align: center;
796
795
  margin-bottom: 20px;
797
- `,od=Nr(Si)`
796
+ `,ld=Ur(Ti)`
798
797
  margin-top: -8px;
799
798
  margin-bottom: 24px;
800
799
  width: 100%;
801
800
  padding: 12px 12px 12px 20px;
802
- border-radius: ${e=>Hu[e.theme.borderRadius]};
801
+ border-radius: ${e=>Zu[e.theme.borderRadius]};
803
802
  font-size: 16px;
804
803
  line-height: 20px;
805
- `,id=Nr(ti)`
804
+ `,cd=Ur(ii)`
806
805
  width: 32px;
807
806
  height: 32px;
808
- border-radius: ${e=>Fu[e.theme.borderRadius]};
809
- `,ad=e=>{const[t]=Ua();return tr(()=>{var n;return t(e.translationKey,e.translationValues,null==(n=e.children)?void 0:n.toString())})};function sd(e,t){let n;n="string"==typeof t?t:ai()?t.twaReturnUrl||t.returnStrategy:"none";const r=function(e,t,n){const r=new URL(e);return r.searchParams.append(t,n),r.toString()}(e,"ret",n);if(!ve(e))return r;const o=r.slice(r.lastIndexOf("&")+1);return r.slice(0,r.lastIndexOf("&"))+"-"+be(o)}function ld(e,t){t=m({},t);const n=function(e){const t=new URL(e);t.searchParams.has("attach")&&(t.searchParams.delete("attach"),t.pathname+="/start");return t.toString()}(e),r=new URL(n);if(r.searchParams.has("startapp")||r.searchParams.append("startapp","tonconnect"),si()){t.returnStrategy="back";Yr(sd(r.toString(),t.returnStrategy))}else if(ai())if(ii("ios","android","macos","tdesktop","web")){t.returnStrategy="back";ci(sd(r.toString(),t.returnStrategy))}else ii("weba")?ci(sd(r.toString(),t)):Yr(sd(r.toString(),t));else if(ro("ios")){"back"===t.returnStrategy&&(oo("safari")?t.returnStrategy="back":oo("chrome")?t.returnStrategy="googlechrome://":oo("firefox")?t.returnStrategy="firefox://":oo("opera")?t.returnStrategy="opera-http://":t.returnStrategy=location.href);const e=oo("chrome"),n=oo("firefox");if((e||n)&&!t.forceRedirect){const e=sd(r.toString(),t.returnStrategy);Qr(ud(e),()=>Yr(e))}else{Yr(sd(r.toString(),t.returnStrategy))}}else if(ro("android")){t.returnStrategy="back";const e=oo("chrome"),n=oo("firefox");if((e||n)&&!t.forceRedirect){const e=sd(r.toString(),t.returnStrategy);Qr(ud(e),()=>Yr(e))}else{Yr(sd(r.toString(),t.returnStrategy))}}else if(ro("ipad")){"back"===t.returnStrategy&&(oo("safari")?t.returnStrategy="back":oo("chrome")?t.returnStrategy="googlechrome://":oo("firefox")?t.returnStrategy="firefox://":oo("opera")?t.returnStrategy="opera-http://":t.returnStrategy=location.href);const e=oo("chrome"),n=oo("firefox"),o=(e||n)&&!t.forceRedirect,i=sd(r.toString(),t.returnStrategy);if(o){Qr(ud(i),()=>Yr(i))}else Yr(i)}else if(ro("macos","windows","linux")){t.returnStrategy="back",t.twaReturnUrl=void 0;const e=sd(r.toString(),t.returnStrategy);if(t.forceRedirect)Yr(e);else{Qr(ud(e),()=>Yr(e))}}else Yr(sd(r.toString(),t))}function cd(e,t,n,r){if(n=m({},n),si())if(ro("ios","android"))"back"===n.returnStrategy&&(n.returnStrategy="tg://resolve"),r("universal-link"),Gr(sd(e,n.returnStrategy),"_self");else{r("universal-link");Yr(sd(e,n.returnStrategy))}else if(ai())if(ii("ios","android")){"back"===n.returnStrategy&&(n.returnStrategy="tg://resolve"),r("universal-link");const t=sd(e,n.returnStrategy);ci(t,()=>{r("universal-link"),Yr(t)})}else if(ii("macos","tdesktop")){"back"===n.returnStrategy&&(n.returnStrategy="tg://resolve");const o=sd(e,n.returnStrategy);!!t&&!n.forceRedirect?(r("custom-deeplink"),Qr(io(o,t),()=>{r("universal-link"),Yr(o)})):(r("universal-link"),Yr(o))}else if(ii("weba")){"back"===n.returnStrategy&&(oo("safari")?n.returnStrategy=location.href:oo("chrome")?n.returnStrategy="googlechrome://":oo("firefox")?n.returnStrategy="firefox://":oo("opera")?n.returnStrategy="opera-http://":n.returnStrategy=location.href);const o=sd(e,n.returnStrategy);!!t&&!n.forceRedirect?(r("custom-deeplink"),Qr(io(o,t),()=>{r("universal-link"),Yr(o)})):(r("universal-link"),Yr(o))}else if(ii("web")){"back"===n.returnStrategy&&(oo("safari")?n.returnStrategy=location.href:oo("chrome")?n.returnStrategy="googlechrome://":oo("firefox")?n.returnStrategy="firefox://":oo("opera")?n.returnStrategy="opera-http://":n.returnStrategy=location.href);const o=sd(e,n.returnStrategy);!!t&&!n.forceRedirect?(r("custom-deeplink"),Qr(io(o,t),()=>{r("universal-link"),Yr(o)})):(r("universal-link"),Yr(o))}else{r("universal-link");Yr(sd(e,n.returnStrategy))}else if(ro("ios"))"back"===n.returnStrategy&&(oo("safari")?n.returnStrategy="none":oo("chrome")?n.returnStrategy="googlechrome://":oo("firefox")?n.returnStrategy="firefox://":oo("opera")?n.returnStrategy="opera-http://":n.returnStrategy=location.href),oo("chrome")?(r("universal-link"),Gr(sd(e,n.returnStrategy),"_self")):(r("universal-link"),Yr(sd(e,n.returnStrategy)));else if(ro("android"))"back"===n.returnStrategy&&(oo("chrome")?n.returnStrategy="googlechrome://":oo("firefox")?n.returnStrategy="firefox://":oo("opera")?n.returnStrategy="opera-http://":n.returnStrategy=location.href),r("universal-link"),Yr(sd(e,n.returnStrategy));else if(ro("ipad"))"back"===n.returnStrategy&&(oo("safari")?n.returnStrategy="none":oo("chrome")?n.returnStrategy="googlechrome://":oo("firefox")?n.returnStrategy="firefox://":oo("opera")?n.returnStrategy="opera-http://":n.returnStrategy=location.href),oo("chrome")?(r("universal-link"),Gr(sd(e,n.returnStrategy),"_self")):(r("universal-link"),Yr(sd(e,n.returnStrategy)));else if(ro("macos","windows","linux")){"back"===n.returnStrategy&&(oo("safari")?n.returnStrategy="none":oo("chrome")?n.returnStrategy="googlechrome://":oo("firefox")?n.returnStrategy="firefox://":oo("opera")?n.returnStrategy="opera-http://":n.returnStrategy="none");const o=sd(e,n.returnStrategy);!!t&&!n.forceRedirect?(r("custom-deeplink"),Qr(io(o,t),()=>{r("universal-link"),Yr(o)})):(r("universal-link"),Yr(o))}else r("universal-link"),Yr(sd(e,n.returnStrategy))}function ud(e){const t=new URL(e),[,n,r]=t.pathname.split("/");return`tg://resolve?domain=${n}&appname=${r}&startapp=${t.searchParams.get("startapp")}`}const dd=e=>{const[t,n]=Jt("mobile"),[r,o]=Jt(null);tn(()=>{var t;o(null!=(t=e.defaultError)?t:null)});const[i,a]=Jt(),[s,l]=Jt(!0),c=wn(Eo);ln(c.onStatusChange(()=>{},t=>{t instanceof te?o("missing-features"):e.wallet.appName!==Js&&o("connection-declined")}));const u=()=>{try{const t=c.connect({universalLink:e.wallet.universalLink,bridgeUrl:e.wallet.bridgeUrl},e.additionalRequest);a(t)}catch(rf){}};tn(()=>{"extension"!==an(t)&&(Mu(e.wallet)||Au(e.wallet))&&u()});const d=()=>{o(null),"extension"===t()&&u(),n("mobile"),bo(w(m({},e.wallet),{openMethod:"qrcode"}))},h=()=>{if(o(null),"extension"===t()&&u(),n("desktop"),ve(i()))f();else{const t=!s();l(!1),cd(i(),e.wallet.deepLink,{returnStrategy:Su.returnStrategy,forceRedirect:t},t=>{bo(w(m({},e.wallet),{openMethod:t}))})}},f=()=>{const t=!s();l(!1),bo(w(m({},e.wallet),{openMethod:"universal-link"})),ld(i(),{returnStrategy:Su.returnStrategy,twaReturnUrl:Su.twaReturnUrl,forceRedirect:t})},p=()=>{o(null),n("extension"),De(e.wallet)&&(bo(e.wallet),c.connect({jsBridgeKey:e.wallet.jsBridgeKey},e.additionalRequest))};return Mu(e.wallet)?d():Tu(e.wallet)?p():h(),Pn(Vu,{"data-tc-wallets-modal-connection-desktop":"true",get children(){return[Pn(Fn,{get when(){return!e.backDisabled},get children(){return Pn(Qu,{icon:"arrow",onClick:()=>e.onBackClick()})}}),Pn(Gu,{get children(){return e.wallet.name}}),Pn(Fn,{get when(){return tr(()=>"mobile"===t())()&&!r()},get children(){return Pn(Yu,{translationKey:"walletModal.desktopConnectionModal.scanQR",get translationValues(){return{name:e.wallet.name}},get children(){return["Scan the QR code below with your phone’s or ",tr(()=>e.wallet.name),"’s camera"]}})}}),Pn(zu,{get qr(){return"mobile"===t()},get children(){return Pn(Vn,{get children(){return[Pn(zn,{get when(){return r()},get children(){return[Pn(nd,{size:"s"}),Pn(Vn,{get children(){return[Pn(zn,{get when(){return"missing-features"===r()},get children(){return Pn(rd,{translationKey:"walletModal.desktopConnectionModal.missingFeatures",get translationValues(){return{name:e.wallet.name}},children:"Please update Wallet, your version does not support required features for this dApp"})}}),Pn(zn,{get when(){return"connection-declined"===r()},get children(){return Pn(rd,{translationKey:"walletModal.desktopConnectionModal.connectionDeclined",children:"Connection declined"})}}),Pn(zn,{get when(){return"not-supported"===r()},get children(){return Pn(rd,{translationKey:"walletModal.desktopConnectionModal.notSupportedWallet",get translationValues(){return{name:e.wallet.name}},get children(){return[tr(()=>e.wallet.name)," doesn’t support the requested action. Please connect another wallet that supports it."]}})}})]}}),Pn(Ju,{get children(){return[Pn(Fn,{get when(){return"not-supported"!==r()},get children(){return Pn(Si,{get leftIcon(){return Pn(_s,{})},get onClick(){return"extension"===t()?p:h},get children(){return Pn(ad,{translationKey:"common.retry",children:"Retry"})}})}}),Pn(Fn,{get when(){return"missing-features"===r()},get children(){return Pn(dl,{get href(){return e.wallet.aboutUrl},blank:!0,get children(){return Pn(Si,{get leftIcon(){return Pn(Ls,{})},get children(){return Pn(ad,{translationKey:"walletModal.desktopConnectionModal.updateWallet",get translationValues(){return{name:e.wallet.name}},get children(){return["Update ",tr(()=>e.wallet.name)]}})}})}})}}),Pn(Fn,{get when(){return"not-supported"===r()},get children(){return Pn(Si,{onClick:()=>e.onBackClick(),get children(){return Pn(ad,{translationKey:"walletModal.desktopConnectionModal.chooseAnotherWallet",children:"Choose Another Wallet"})}})}})]}})]}}),Pn(zn,{get when(){return"mobile"===t()},get children(){return Pn(Zu,{disableCopy:!1,get sourceUrl(){return sd(i(),"none")},get imageUrl(){return e.wallet.imageUrl}})}}),Pn(zn,{get when(){return"extension"===t()},get children(){return[Pn(Fn,{get when(){return De(e.wallet)},get children(){return[Pn(td,{size:"s"}),Pn(rd,{translationKey:"walletModal.desktopConnectionModal.continueInExtension",get translationValues(){return{name:e.wallet.name}},get children(){return["Continue in ",tr(()=>e.wallet.name)," browser extension…"]}}),Pn(Ju,{get children(){return Pn(Si,{get leftIcon(){return Pn(_s,{})},onClick:p,get children(){return Pn(ad,{translationKey:"common.retry",children:"Retry"})}})}})]}}),Pn(Fn,{get when(){return!De(e.wallet)},get children(){return[Pn(rd,{translationKey:"walletModal.desktopConnectionModal.dontHaveExtension",get translationValues(){return{name:e.wallet.name}},get children(){return["Seems you don't have installed ",tr(()=>e.wallet.name)," browser extension"]}}),Pn(Ju,{get children(){return Pn(dl,{get href(){return e.wallet.aboutUrl},blank:!0,get children(){return Pn(Si,{get rightIcon(){return Pn(Ls,{})},onClick:p,get children(){return Pn(ad,{translationKey:"walletModal.desktopConnectionModal.getWallet",get translationValues(){return{name:e.wallet.name}},get children(){return["Get ",tr(()=>e.wallet.name)]}})}})}})}})]}})]}}),Pn(zn,{get when(){return"desktop"===t()},get children(){return[Pn(ys,{size:"m"}),Pn(rd,{translationKey:"walletModal.desktopConnectionModal.continueOnDesktop",get translationValues(){return{name:e.wallet.name}},get children(){return["Continue in ",tr(()=>e.wallet.name)," on desktop…"]}}),Pn(Ju,{get children(){return[Pn(Si,{get leftIcon(){return Pn(_s,{})},onClick:h,get children(){return Pn(ad,{translationKey:"common.retry",children:"Retry"})}}),Pn(dl,{get href(){return e.wallet.aboutUrl},blank:!0,get children(){return Pn(Si,{get rightIcon(){return Pn(Ls,{})},get children(){return Pn(ad,{translationKey:"walletModal.desktopConnectionModal.getWallet",get translationValues(){return{name:e.wallet.name}},get children(){return["Get ",tr(()=>e.wallet.name)]}})}})}})]}})]}})]}})}}),Pn(Fn,{get when(){return e.wallet.appName===Js},get children(){return Pn(od,{get rightIcon(){return Pn(id,{get src(){return el}})},scale:"s",onClick:f,get children(){return Pn(ad,{translationKey:"walletModal.desktopConnectionModal.openWalletOnTelegram",children:"Open Wallet in Telegram on desktop"})}})}}),Pn(Fn,{get when(){return e.wallet.appName!==Js},get children(){return Pn(Xu,{get children(){return[Pn(Fn,{get when(){return tr(()=>"mobile"!==t())()&&Mu(e.wallet)},get children(){return Pn(ed,{appearance:"secondary",get leftIcon(){return Pn(Es,{})},onClick:d,get children(){return Pn(ad,{translationKey:"common.mobile",children:"Mobile"})}})}}),Pn(Fn,{get when(){return tr(()=>"extension"!==t())()&&Tu(e.wallet)},get children(){return Pn(ed,{appearance:"secondary",get leftIcon(){return Pn(ks,{})},onClick:p,get children(){return Pn(ad,{translationKey:"common.browserExtension",children:"Browser Extension"})}})}}),Pn(Fn,{get when(){return tr(()=>"desktop"!==t())()&&Au(e.wallet)},get children(){return Pn(ed,{appearance:"secondary",get leftIcon(){return Pn(Ms,{})},onClick:h,get children(){return Pn(ad,{translationKey:"common.desktop",children:"Desktop"})}})}})]}})}})]}})},hd=Nr.div``,fd=Nr(Yi)`
807
+ border-radius: ${e=>Gu[e.theme.borderRadius]};
808
+ `,ud=e=>{const[t]=$a();return ir(()=>{var n;return t(e.translationKey,e.translationValues,null==(n=e.children)?void 0:n.toString())})};function dd(e,t){let n;n="string"==typeof t?t:ui()?t.twaReturnUrl||t.returnStrategy:"none";const r=gd(e,"ret",n);if(!ve(e))return r;const o=r.slice(r.lastIndexOf("&")+1);return r.slice(0,r.lastIndexOf("&"))+"-"+be(o)}function hd(e,t){t=m({},t);const n=md(e),r=new URL(n);if(r.searchParams.has("startapp")||r.searchParams.append("startapp","tonconnect"),di()){t.returnStrategy="back";eo(dd(r.toString(),t.returnStrategy))}else if(ui())if(ci("ios","android","macos","tdesktop","web")){t.returnStrategy="back";fi(dd(r.toString(),t.returnStrategy))}else ci("weba")?fi(dd(r.toString(),t)):eo(dd(r.toString(),t));else if(so("ios")){"back"===t.returnStrategy&&(lo("safari")?t.returnStrategy="back":lo("chrome")?t.returnStrategy="googlechrome://":lo("firefox")?t.returnStrategy="firefox://":lo("opera")?t.returnStrategy="opera-http://":t.returnStrategy=location.href);const e=lo("chrome"),n=lo("firefox");if((e||n)&&!t.forceRedirect){const e=dd(r.toString(),t.returnStrategy);to(wd(e),()=>eo(e))}else{eo(dd(r.toString(),t.returnStrategy))}}else if(so("android")){t.returnStrategy="back";const e=lo("chrome"),n=lo("firefox");if((e||n)&&!t.forceRedirect){const e=dd(r.toString(),t.returnStrategy);to(wd(e),()=>eo(e))}else{eo(dd(r.toString(),t.returnStrategy))}}else if(so("ipad")){"back"===t.returnStrategy&&(lo("safari")?t.returnStrategy="back":lo("chrome")?t.returnStrategy="googlechrome://":lo("firefox")?t.returnStrategy="firefox://":lo("opera")?t.returnStrategy="opera-http://":t.returnStrategy=location.href);const e=lo("chrome"),n=lo("firefox"),o=(e||n)&&!t.forceRedirect,i=dd(r.toString(),t.returnStrategy);if(o){to(wd(i),()=>eo(i))}else eo(i)}else if(so("macos","windows","linux")){t.returnStrategy="back",t.twaReturnUrl=void 0;const e=dd(r.toString(),t.returnStrategy);if(t.forceRedirect)eo(e);else{to(wd(e),()=>eo(e))}}else eo(dd(r.toString(),t))}function fd(e,t,n,r){if(n=m({},n),di())if(so("ios","android"))"back"===n.returnStrategy&&(n.returnStrategy="tg://resolve"),r("universal-link"),Xr(dd(e,n.returnStrategy),"_self");else{r("universal-link");eo(dd(e,n.returnStrategy))}else if(ui())if(ci("ios","android")){"back"===n.returnStrategy&&(n.returnStrategy="tg://resolve"),r("universal-link");const t=dd(e,n.returnStrategy);fi(t,()=>{r("universal-link"),eo(t)})}else if(ci("macos","tdesktop")){"back"===n.returnStrategy&&(n.returnStrategy="tg://resolve");const o=dd(e,n.returnStrategy);!!t&&!n.forceRedirect?(r("custom-deeplink"),to(co(o,t),()=>{r("universal-link"),eo(o)})):(r("universal-link"),eo(o))}else if(ci("weba")){"back"===n.returnStrategy&&(lo("safari")?n.returnStrategy=location.href:lo("chrome")?n.returnStrategy="googlechrome://":lo("firefox")?n.returnStrategy="firefox://":lo("opera")?n.returnStrategy="opera-http://":n.returnStrategy=location.href);const o=dd(e,n.returnStrategy);!!t&&!n.forceRedirect?(r("custom-deeplink"),to(co(o,t),()=>{r("universal-link"),eo(o)})):(r("universal-link"),eo(o))}else if(ci("web")){"back"===n.returnStrategy&&(lo("safari")?n.returnStrategy=location.href:lo("chrome")?n.returnStrategy="googlechrome://":lo("firefox")?n.returnStrategy="firefox://":lo("opera")?n.returnStrategy="opera-http://":n.returnStrategy=location.href);const o=dd(e,n.returnStrategy);!!t&&!n.forceRedirect?(r("custom-deeplink"),to(co(o,t),()=>{r("universal-link"),eo(o)})):(r("universal-link"),eo(o))}else{r("universal-link");eo(dd(e,n.returnStrategy))}else if(so("ios"))"back"===n.returnStrategy&&(lo("safari")?n.returnStrategy="none":lo("chrome")?n.returnStrategy="googlechrome://":lo("firefox")?n.returnStrategy="firefox://":lo("opera")?n.returnStrategy="opera-http://":n.returnStrategy=location.href),lo("chrome")?(r("universal-link"),Xr(dd(e,n.returnStrategy),"_self")):(r("universal-link"),eo(dd(e,n.returnStrategy)));else if(so("android"))"back"===n.returnStrategy&&(lo("chrome")?n.returnStrategy="googlechrome://":lo("firefox")?n.returnStrategy="firefox://":lo("opera")?n.returnStrategy="opera-http://":n.returnStrategy=location.href),r("universal-link"),eo(dd(e,n.returnStrategy));else if(so("ipad"))"back"===n.returnStrategy&&(lo("safari")?n.returnStrategy="none":lo("chrome")?n.returnStrategy="googlechrome://":lo("firefox")?n.returnStrategy="firefox://":lo("opera")?n.returnStrategy="opera-http://":n.returnStrategy=location.href),lo("chrome")?(r("universal-link"),Xr(dd(e,n.returnStrategy),"_self")):(r("universal-link"),eo(dd(e,n.returnStrategy)));else if(so("macos","windows","linux")){"back"===n.returnStrategy&&(lo("safari")?n.returnStrategy="none":lo("chrome")?n.returnStrategy="googlechrome://":lo("firefox")?n.returnStrategy="firefox://":lo("opera")?n.returnStrategy="opera-http://":n.returnStrategy="none");const o=dd(e,n.returnStrategy);!!t&&!n.forceRedirect?(r("custom-deeplink"),to(co(o,t),()=>{r("universal-link"),eo(o)})):(r("universal-link"),eo(o))}else r("universal-link"),eo(dd(e,n.returnStrategy))}function pd(e,t){if(!t)return e;if(!ve(e)){return gd(e,"id",t)}const n=md(e),r=new URL(n);r.searchParams.has("startapp")||r.searchParams.append("startapp","tonconnect");const o=gd(r.toString(),"id",t),i=o.slice(o.lastIndexOf("&")+1);return o.slice(0,o.lastIndexOf("&"))+"-v__2-"+be(i)}function gd(e,t,n){const r=new URL(e);return r.searchParams.append(t,n),r.toString()}function md(e){const t=new URL(e);return t.searchParams.has("attach")&&(t.searchParams.delete("attach"),t.pathname+="/start"),t.toString()}function wd(e){const t=new URL(e),[,n,r]=t.pathname.split("/");return`tg://resolve?domain=${n}&appname=${r}&startapp=${t.searchParams.get("startapp")}`}const yd=e=>{const[t,n]=nn("mobile"),[r,o]=nn(null);an(()=>{var t;o(null!=(t=e.defaultError)?t:null)});const[i,a]=nn(),[s,l]=nn(!0),c=Cn(_o);hn(c.onStatusChange(()=>{},t=>{t instanceof te?o("missing-features"):e.wallet.appName!==nl&&o("connection-declined")}));const u=()=>{try{const t=c.connect({universalLink:e.wallet.universalLink,bridgeUrl:e.wallet.bridgeUrl},e.additionalRequest);a(t)}catch(df){}};an(()=>{"extension"!==un(t)&&(Lu(e.wallet)||Ou(e.wallet))&&u()});const d=()=>{o(null),"extension"===t()&&u(),n("mobile"),ko(w(m({},e.wallet),{openMethod:"qrcode"}))},h=()=>{if(o(null),"extension"===t()&&u(),n("desktop"),ve(i()))f();else{const t=!s();l(!1),fd(i(),e.wallet.deepLink,{returnStrategy:Tu.returnStrategy,forceRedirect:t},t=>{ko(w(m({},e.wallet),{openMethod:t}))})}},f=()=>{const t=!s();l(!1),ko(w(m({},e.wallet),{openMethod:"universal-link"})),hd(i(),{returnStrategy:Tu.returnStrategy,twaReturnUrl:Tu.twaReturnUrl,forceRedirect:t})},p=()=>{o(null),n("extension"),De(e.wallet)&&(ko(e.wallet),c.connect({jsBridgeKey:e.wallet.jsBridgeKey},e.additionalRequest))};return Lu(e.wallet)?d():Iu(e.wallet)?p():h(),Bn(Yu,{"data-tc-wallets-modal-connection-desktop":"true",get children(){return[Bn(Gn,{get when(){return!e.backDisabled},get children(){return Bn(td,{icon:"arrow",onClick:()=>e.onBackClick()})}}),Bn(Xu,{get children(){return e.wallet.name}}),Bn(Gn,{get when(){return ir(()=>"mobile"===t())()&&!r()},get children(){return Bn(ed,{translationKey:"walletModal.desktopConnectionModal.scanQR",get translationValues(){return{name:e.wallet.name}},get children(){return["Scan the QR code below with your phone’s or ",ir(()=>e.wallet.name),"’s camera"]}})}}),Bn(Qu,{get qr(){return"mobile"===t()},get children(){return Bn(Yn,{get children(){return[Bn(Qn,{get when(){return r()},get children(){return[Bn(ad,{size:"s"}),Bn(Yn,{get children(){return[Bn(Qn,{get when(){return"missing-features"===r()},get children(){return Bn(sd,{translationKey:"walletModal.desktopConnectionModal.missingFeatures",get translationValues(){return{name:e.wallet.name}},children:"Please update Wallet, your version does not support required features for this dApp"})}}),Bn(Qn,{get when(){return"connection-declined"===r()},get children(){return Bn(sd,{translationKey:"walletModal.desktopConnectionModal.connectionDeclined",children:"Connection declined"})}}),Bn(Qn,{get when(){return"not-supported"===r()},get children(){return Bn(sd,{translationKey:"walletModal.desktopConnectionModal.notSupportedWallet",get translationValues(){return{name:e.wallet.name}},get children(){return[ir(()=>e.wallet.name)," doesn’t support the requested action. Please connect another wallet that supports it."]}})}})]}}),Bn(nd,{get children(){return[Bn(Gn,{get when(){return"not-supported"!==r()},get children(){return Bn(Ti,{get leftIcon(){return Bn(Ns,{})},get onClick(){return"extension"===t()?p:h},get children(){return Bn(ud,{translationKey:"common.retry",children:"Retry"})}})}}),Bn(Gn,{get when(){return"missing-features"===r()},get children(){return Bn(gl,{get href(){return e.wallet.aboutUrl},blank:!0,get children(){return Bn(Ti,{get leftIcon(){return Bn(Ps,{})},get children(){return Bn(ud,{translationKey:"walletModal.desktopConnectionModal.updateWallet",get translationValues(){return{name:e.wallet.name}},get children(){return["Update ",ir(()=>e.wallet.name)]}})}})}})}}),Bn(Gn,{get when(){return"not-supported"===r()},get children(){return Bn(Ti,{onClick:()=>e.onBackClick(),get children(){return Bn(ud,{translationKey:"walletModal.desktopConnectionModal.chooseAnotherWallet",children:"Choose Another Wallet"})}})}})]}})]}}),Bn(Qn,{get when(){return"mobile"===t()},get children(){return Bn(Ju,{disableCopy:!1,get sourceUrl(){return dd(i(),"none")},get imageUrl(){return e.wallet.imageUrl}})}}),Bn(Qn,{get when(){return"extension"===t()},get children(){return[Bn(Gn,{get when(){return De(e.wallet)},get children(){return[Bn(id,{size:"s"}),Bn(sd,{translationKey:"walletModal.desktopConnectionModal.continueInExtension",get translationValues(){return{name:e.wallet.name}},get children(){return["Continue in ",ir(()=>e.wallet.name)," browser extension…"]}}),Bn(nd,{get children(){return Bn(Ti,{get leftIcon(){return Bn(Ns,{})},onClick:p,get children(){return Bn(ud,{translationKey:"common.retry",children:"Retry"})}})}})]}}),Bn(Gn,{get when(){return!De(e.wallet)},get children(){return[Bn(sd,{translationKey:"walletModal.desktopConnectionModal.dontHaveExtension",get translationValues(){return{name:e.wallet.name}},get children(){return["Seems you don't have installed ",ir(()=>e.wallet.name)," browser extension"]}}),Bn(nd,{get children(){return Bn(gl,{get href(){return e.wallet.aboutUrl},blank:!0,get children(){return Bn(Ti,{get rightIcon(){return Bn(Ps,{})},onClick:p,get children(){return Bn(ud,{translationKey:"walletModal.desktopConnectionModal.getWallet",get translationValues(){return{name:e.wallet.name}},get children(){return["Get ",ir(()=>e.wallet.name)]}})}})}})}})]}})]}}),Bn(Qn,{get when(){return"desktop"===t()},get children(){return[Bn(xs,{size:"m"}),Bn(sd,{translationKey:"walletModal.desktopConnectionModal.continueOnDesktop",get translationValues(){return{name:e.wallet.name}},get children(){return["Continue in ",ir(()=>e.wallet.name)," on desktop…"]}}),Bn(nd,{get children(){return[Bn(Ti,{get leftIcon(){return Bn(Ns,{})},onClick:h,get children(){return Bn(ud,{translationKey:"common.retry",children:"Retry"})}}),Bn(gl,{get href(){return e.wallet.aboutUrl},blank:!0,get children(){return Bn(Ti,{get rightIcon(){return Bn(Ps,{})},get children(){return Bn(ud,{translationKey:"walletModal.desktopConnectionModal.getWallet",get translationValues(){return{name:e.wallet.name}},get children(){return["Get ",ir(()=>e.wallet.name)]}})}})}})]}})]}})]}})}}),Bn(Gn,{get when(){return e.wallet.appName===nl},get children(){return Bn(ld,{get rightIcon(){return Bn(cd,{get src(){return ol}})},scale:"s",onClick:f,get children(){return Bn(ud,{translationKey:"walletModal.desktopConnectionModal.openWalletOnTelegram",children:"Open Wallet in Telegram on desktop"})}})}}),Bn(Gn,{get when(){return e.wallet.appName!==nl},get children(){return Bn(rd,{get children(){return[Bn(Gn,{get when(){return ir(()=>"mobile"!==t())()&&Lu(e.wallet)},get children(){return Bn(od,{appearance:"secondary",get leftIcon(){return Bn(_s,{})},onClick:d,get children(){return Bn(ud,{translationKey:"common.mobile",children:"Mobile"})}})}}),Bn(Gn,{get when(){return ir(()=>"extension"!==t())()&&Iu(e.wallet)},get children(){return Bn(od,{appearance:"secondary",get leftIcon(){return Bn(As,{})},onClick:p,get children(){return Bn(ud,{translationKey:"common.browserExtension",children:"Browser Extension"})}})}}),Bn(Gn,{get when(){return ir(()=>"desktop"!==t())()&&Ou(e.wallet)},get children(){return Bn(od,{appearance:"secondary",get leftIcon(){return Bn(Ls,{})},onClick:h,get children(){return Bn(ud,{translationKey:"common.desktop",children:"Desktop"})}})}})]}})}})]}})},vd=Ur.div``,bd=Ur(ea)`
810
809
  position: absolute;
811
810
  top: 16px;
812
811
  left: 16px;
813
- `,pd=Nr(es)`
812
+ `,Cd=Ur(os)`
814
813
  margin-bottom: 18px;
815
- `,gd=Nr.div`
814
+ `,xd=Ur.div`
816
815
  padding: 16px 0;
817
816
  display: flex;
818
817
  flex-direction: column;
819
818
  align-items: center;
820
- `,md=Ar`
819
+ `,Sd=Or`
821
820
  margin-bottom: 12px;
822
- `,wd=Nr(os)`
821
+ `,kd=Ur(ls)`
823
822
  text-align: center;
824
823
  margin-bottom: 4px;
825
- `,yd=Nr(ja)`
824
+ `,Rd=Ur(Ka)`
826
825
  text-align: center;
827
826
  max-width: 352px;
828
827
  color: ${e=>e.theme.colors.text.secondary};
829
- `,vd=Nr.div`
828
+ `,Ed=Ur.div`
830
829
  padding: 16px 24px 24px;
831
830
  display: flex;
832
831
  align-items: center;
833
832
  justify-content: center;
834
833
  gap: 8px;
835
- `,bd="https://ton.org/wallets?filters[wallet_features][slug][$in]=dapp-auth&pagination[limit]=-1",Cd=e=>Pn(hd,{"data-tc-wallets-modal-info":"true",get children(){return[Pn(fd,{icon:"arrow",onClick:()=>e.onBackClick()}),Pn(pd,{translationKey:"walletModal.infoModal.whatIsAWallet",children:"What is a wallet"}),Pn(cl,{get children(){return[Pn(gd,{get children(){return[Pn(Ps,{class:md}),Pn(wd,{translationKey:"walletModal.infoModal.secureDigitalAssets",children:"Secure digital assets storage"}),Pn(yd,{translationKey:"walletModal.infoModal.walletProtects",children:"A wallet protects and manages your digital assets including TON, tokens and collectables."})]}}),Pn(gd,{get children(){return[Pn(Ds,{class:md}),Pn(wd,{translationKey:"walletModal.infoModal.controlIdentity",children:"Control your Web3 identity"}),Pn(yd,{translationKey:"walletModal.infoModal.manageIdentity",children:"Manage your digital identity and access decentralized applications with ease. Maintain control over your data and engage securely in the blockchain ecosystem."})]}}),Pn(gd,{get children(){return[Pn(Bs,{class:md}),Pn(wd,{translationKey:"walletModal.infoModal.effortlessCryptoTransactions",children:"Effortless crypto transactions"}),Pn(yd,{translationKey:"walletModal.infoModal.easilySend",children:"Easily send, receive, monitor your cryptocurrencies. Streamline your operations with decentralized applications."})]}}),Pn(vd,{get children(){return Pn(dl,{get href(){return bd},blank:!0,get children(){return Pn(Si,{get rightIcon(){return Pn(Is,{})},get children(){return Pn(ad,{translationKey:"walletModal.infoModal.getAWallet",children:"Get a Wallet"})}})}})}})]}})]}}),xd=Nr.div``,Sd=Nr.div`
834
+ `,Td="https://ton.org/wallets?filters[wallet_features][slug][$in]=dapp-auth&pagination[limit]=-1",Ad=e=>Bn(vd,{"data-tc-wallets-modal-info":"true",get children(){return[Bn(bd,{icon:"arrow",onClick:()=>e.onBackClick()}),Bn(Cd,{translationKey:"walletModal.infoModal.whatIsAWallet",children:"What is a wallet"}),Bn(fl,{get children(){return[Bn(xd,{get children(){return[Bn(Bs,{class:Sd}),Bn(kd,{translationKey:"walletModal.infoModal.secureDigitalAssets",children:"Secure digital assets storage"}),Bn(Rd,{translationKey:"walletModal.infoModal.walletProtects",children:"A wallet protects and manages your digital assets including TON, tokens and collectables."})]}}),Bn(xd,{get children(){return[Bn(qs,{class:Sd}),Bn(kd,{translationKey:"walletModal.infoModal.controlIdentity",children:"Control your Web3 identity"}),Bn(Rd,{translationKey:"walletModal.infoModal.manageIdentity",children:"Manage your digital identity and access decentralized applications with ease. Maintain control over your data and engage securely in the blockchain ecosystem."})]}}),Bn(xd,{get children(){return[Bn(Hs,{class:Sd}),Bn(kd,{translationKey:"walletModal.infoModal.effortlessCryptoTransactions",children:"Effortless crypto transactions"}),Bn(Rd,{translationKey:"walletModal.infoModal.easilySend",children:"Easily send, receive, monitor your cryptocurrencies. Streamline your operations with decentralized applications."})]}}),Bn(Ed,{get children(){return Bn(gl,{get href(){return Td},blank:!0,get children(){return Bn(Ti,{get rightIcon(){return Bn(Ds,{})},get children(){return Bn(ud,{translationKey:"walletModal.infoModal.getAWallet",children:"Get a Wallet"})}})}})}})]}})]}}),Md=Ur.div``,_d=Ur.div`
836
835
  flex: 1;
837
836
  margin-top: 18px;
838
837
  display: flex;
@@ -840,64 +839,64 @@
840
839
  align-items: center;
841
840
  justify-content: center;
842
841
  min-height: 232px;
843
- `,kd=Nr(es)`
842
+ `,Od=Ur(os)`
844
843
  max-width: 262px;
845
844
  margin: 0 auto 8px;
846
- `,Rd=Nr(Yi)`
845
+ `,Ld=Ur(ea)`
847
846
  position: absolute;
848
847
  top: 16px;
849
848
  left: 16px;
850
- `,Ed=Nr.div`
849
+ `,Id=Ur.div`
851
850
  padding: 16px;
852
851
  display: flex;
853
852
  align-items: center;
854
853
  gap: 12px;
855
- border-top: 0.5px solid ${e=>jr(e.theme.colors.icon.secondary,.2)};
856
- `,Ad=Nr(ti)`
854
+ border-top: 0.5px solid ${e=>Kr(e.theme.colors.icon.secondary,.2)};
855
+ `,Nd=Ur(ii)`
857
856
  width: 36px;
858
857
  height: 36px;
859
858
  border-radius: 10px;
860
- `,Md=Nr(dl)`
859
+ `,Wd=Ur(gl)`
861
860
  margin-left: auto;
862
- `,Td=Nr(ys)`
861
+ `,Pd=Ur(xs)`
863
862
  margin-bottom: 18px;
864
863
  margin-top: 2px;
865
- `,_d=Nr(ps)`
864
+ `,Ud=Ur(ys)`
866
865
  margin-bottom: 16px;
867
- `,Od=Nr(ns)`
866
+ `,Dd=Ur(as)`
868
867
  color: ${e=>e.theme.colors.text.secondary};
869
868
  text-align: center;
870
869
  margin-bottom: 20px;
871
- `,Ld=Nr.div`
870
+ `,jd=Ur.div`
872
871
  display: flex;
873
872
  justify-content: center;
874
873
  gap: 8px;
875
874
  padding-bottom: 16px;
876
- `,Nd={m:"16px",s:"8px",none:"0"},Id=Nr(es)`
875
+ `,Bd={m:"16px",s:"8px",none:"0"},$d=Ur(os)`
877
876
  margin-bottom: 2px;
878
877
  padding: 0 52px;
879
- `,Wd=Nr(ns)`
878
+ `,qd=Ur(as)`
880
879
  margin-bottom: 20px;
881
880
  padding: 0 64px;
882
- `,Pd=Nr.div`
881
+ `,Kd=Ur.div`
883
882
  padding: 0 24px 16px;
884
- `,Ud=Nr.div`
883
+ `,Hd=Ur.div`
885
884
  display: flex;
886
885
  flex-direction: row;
887
886
  gap: 16px;
888
887
  padding: 0 24px 24px;
889
888
  margin-top: 0;
890
- `,Dd=Nr(Si)`
889
+ `,Fd=Ur(Ti)`
891
890
  width: 100%;
892
891
  height: 56px;
893
- border-radius: ${e=>Nd[e.theme.borderRadius]};
894
- background-color: ${e=>jr(e.theme.colors.accent,.12)};
892
+ border-radius: ${e=>Bd[e.theme.borderRadius]};
893
+ background-color: ${e=>Kr(e.theme.colors.accent,.12)};
895
894
  color: ${e=>e.theme.colors.accent};
896
895
  font-size: 16px;
897
896
  line-height: 20px;
898
897
  font-weight: 500;
899
898
  padding: 17px 20px 19px 20px;
900
- `,jd=e=>[Pn(Id,{get children(){return e.walletInfo.name}}),Pn(Wd,{translationKey:"walletModal.mobileConnectionModal.scanQR",get translationValues(){return{name:e.walletInfo.name}},get children(){return["Scan the QR code below with your phone’s or ",tr(()=>e.walletInfo.name),"’s camera"]}}),Pn(Pd,{get children(){return Pn(Na,{get imageUrl(){return e.walletInfo.imageUrl},get sourceUrl(){return sd(e.universalLink,"none")},disableCopy:!0})}}),Pn(Ud,{get children(){return[Pn(Dd,{appearance:"secondary",onClick:()=>{var t;return null==(t=e.onOpenLink)?void 0:t.call(e)},get children(){return Pn(ad,{translationKey:"walletModal.mobileUniversalModal.openLink",children:"Open Link"})}}),Pn(Dd,{appearance:"secondary",onClick:()=>{var t;return null==(t=e.onCopy)?void 0:t.call(e)},get children(){return Pn(ad,{get translationKey(){return void 0!==e.isCopiedShown?"common.copied":"common.copyLink"},get children(){return void 0!==e.isCopiedShown?"Copied":"Copy Link"}})}})]}})],Bd=e=>{const t=Or(),[n,r]=Jt(!0),[o,i]=Jt(!1),[a,s]=Jt(null);tn(()=>{var t;s(null!=(t=e.defaultError)?t:null)});const l=wn(Eo),c=l.onStatusChange(()=>{},()=>{s(null)}),u=nn(()=>l.connect({universalLink:e.wallet.universalLink,bridgeUrl:e.wallet.bridgeUrl},e.additionalRequest)),d=()=>{if(ve(u()))return bo(w(m({},e.wallet),{openMethod:"universal-link"})),void ld(u(),{returnStrategy:Su.returnStrategy,twaReturnUrl:Su.twaReturnUrl,forceRedirect:!0});s(null);const t=!n();r(!1),cd(u(),e.wallet.deepLink,{returnStrategy:Su.returnStrategy,forceRedirect:t},t=>{bo(w(m({},e.wallet),{openMethod:t}))})},[h,f]=Jt(void 0),p=()=>v(null,null,function*(){void 0!==h()&&clearTimeout(h()),yield Oa(u());const e=setTimeout(()=>f(void 0),1500);f(e)}),g=()=>{s(null),i(!0),bo(w(m({},e.wallet),{openMethod:"qrcode"}))},y=()=>{o()?(i(!1),bo(w(m({},e.wallet),{openMethod:"universal-link"}))):e.onBackClick()};return ln(c),d(),Pn(xd,{"data-tc-wallets-modal-connection-mobile":"true",get children(){return[Pn(Fn,{get when(){return!e.backDisabled||o()},get children(){return Pn(Rd,{icon:"arrow",onClick:y})}}),Pn(Fn,{get when(){return o()},get children(){return Pn(jd,{get universalLink(){return u()},get walletInfo(){return e.wallet},onOpenLink:d,onCopy:p,get isCopiedShown(){return h()}})}}),Pn(Fn,{get when(){return!o()},get children(){return[Pn(kd,{get children(){return e.wallet.name}}),Pn(Sd,{get children(){return[Pn(Fn,{get when(){return a()},get children(){return[Pn(_d,{size:"s"}),Pn(Vn,{get children(){return[Pn(zn,{get when(){return"missing-features"===a()},get children(){return Pn(Od,{translationKey:"walletModal.mobileConnectionModal.missingFeatures",get translationValues(){return{name:e.wallet.name}},children:"Please update Wallet, your version does not support required features for this dApp"})}}),Pn(zn,{get when(){return"connection-declined"===a()},get children(){return Pn(Od,{translationKey:"walletModal.mobileConnectionModal.connectionDeclined",children:"Connection declined"})}}),Pn(zn,{get when(){return"not-supported"===a()},get children(){return Pn(Od,{translationKey:"walletModal.mobileConnectionModal.notSupportedWallet",get translationValues(){return{name:e.wallet.name}},get children(){return[tr(()=>e.wallet.name)," doesn’t support the requested action. Please connect another wallet that supports it."]}})}})]}}),Pn(Ld,{get children(){return Pn(Vn,{get children(){return[Pn(zn,{get when(){return"missing-features"===a()},get children(){return[Pn(Si,{get leftIcon(){return Pn(_s,{})},onClick:d,get children(){return Pn(ad,{translationKey:"common.retry",children:"Retry"})}}),Pn(dl,{get href(){return e.wallet.aboutUrl},blank:!0,get children(){return Pn(Si,{get leftIcon(){return Pn(Ls,{})},get children(){return Pn(ad,{translationKey:"walletModal.mobileConnectionModal.updateWallet",get translationValues(){return{name:e.wallet.name}},get children(){return["Update ",tr(()=>e.wallet.name)]}})}})}})]}}),Pn(zn,{get when(){return"not-supported"===a()},get children(){return Pn(Si,{onClick:()=>e.onBackClick(),get children(){return Pn(ad,{translationKey:"walletModal.mobileConnectionModal.chooseAnotherWallet",children:"Choose Another Wallet"})}})}}),Pn(zn,{get when(){return"connection-declined"===a()},get children(){return[Pn(Si,{get leftIcon(){return Pn(_s,{})},onClick:d,get children(){return Pn(ad,{translationKey:"common.retry",children:"Retry"})}}),Pn(Si,{get leftIcon(){return Pn(Vs,{get fill(){return t.colors.accent}})},onClick:g,get children(){return Pn(ad,{translationKey:"walletModal.mobileConnectionModal.showQR",children:"Show QR Code"})}})]}})]}})}})]}}),Pn(Fn,{get when(){return!a()},get children(){return[Pn(Td,{size:"s"}),Pn(Od,{translationKey:"walletModal.mobileConnectionModal.continueIn",get translationValues(){return{name:e.wallet.name}},get children(){return["Continue in ",tr(()=>e.wallet.name),"…"]}}),Pn(Ld,{get children(){return[Pn(Si,{get leftIcon(){return Pn(_s,{})},onClick:d,get children(){return Pn(ad,{translationKey:"common.retry",children:"Retry"})}}),Pn(Si,{get leftIcon(){return Pn(Vs,{get fill(){return t.colors.accent}})},onClick:g,get children(){return Pn(ad,{translationKey:"walletModal.mobileConnectionModal.showQR",children:"Show QR Code"})}})]}})]}})]}}),Pn(Ed,{get children(){return[Pn(Ad,{get src(){return e.wallet.imageUrl}}),Pn(os,{get children(){return e.wallet.name}}),Pn(Md,{get href(){return e.wallet.aboutUrl},blank:!0,get children(){return Pn(Si,{get children(){return Pn(ad,{translationKey:"common.get",children:"GET"})}})}})]}})]}})]}})},$d={m:"16px",s:"12px",none:"0"},qd={m:"6px",s:"6px",none:"0"};Nr.li`
899
+ `,Vd=e=>[Bn($d,{get children(){return e.walletInfo.name}}),Bn(qd,{translationKey:"walletModal.mobileConnectionModal.scanQR",get translationValues(){return{name:e.walletInfo.name}},get children(){return["Scan the QR code below with your phone’s or ",ir(()=>e.walletInfo.name),"’s camera"]}}),Bn(Kd,{get children(){return Bn(Ua,{get imageUrl(){return e.walletInfo.imageUrl},get sourceUrl(){return dd(e.universalLink,"none")},disableCopy:!0})}}),Bn(Hd,{get children(){return[Bn(Fd,{appearance:"secondary",onClick:()=>{var t;return null==(t=e.onOpenLink)?void 0:t.call(e)},get children(){return Bn(ud,{translationKey:"walletModal.mobileUniversalModal.openLink",children:"Open Link"})}}),Bn(Fd,{appearance:"secondary",onClick:()=>{var t;return null==(t=e.onCopy)?void 0:t.call(e)},get children(){return Bn(ud,{get translationKey(){return void 0!==e.isCopiedShown?"common.copied":"common.copyLink"},get children(){return void 0!==e.isCopiedShown?"Copied":"Copy Link"}})}})]}})],zd=e=>{const t=Wr(),[n,r]=nn(!0),[o,i]=nn(!1),[a,s]=nn(null);an(()=>{var t;s(null!=(t=e.defaultError)?t:null)});const l=Cn(_o),c=l.onStatusChange(()=>{},()=>{s(null)}),u=sn(()=>l.connect({universalLink:e.wallet.universalLink,bridgeUrl:e.wallet.bridgeUrl},e.additionalRequest)),d=()=>{if(ve(u()))return ko(w(m({},e.wallet),{openMethod:"universal-link"})),void hd(u(),{returnStrategy:Tu.returnStrategy,twaReturnUrl:Tu.twaReturnUrl,forceRedirect:!0});s(null);const t=!n();r(!1),fd(u(),e.wallet.deepLink,{returnStrategy:Tu.returnStrategy,forceRedirect:t},t=>{ko(w(m({},e.wallet),{openMethod:t}))})},[h,f]=nn(void 0),p=()=>v(null,null,function*(){void 0!==h()&&clearTimeout(h()),yield Wa(u());const e=setTimeout(()=>f(void 0),1500);f(e)}),g=()=>{s(null),i(!0),ko(w(m({},e.wallet),{openMethod:"qrcode"}))},y=()=>{o()?(i(!1),ko(w(m({},e.wallet),{openMethod:"universal-link"}))):e.onBackClick()};return hn(c),d(),Bn(Md,{"data-tc-wallets-modal-connection-mobile":"true",get children(){return[Bn(Gn,{get when(){return!e.backDisabled||o()},get children(){return Bn(Ld,{icon:"arrow",onClick:y})}}),Bn(Gn,{get when(){return o()},get children(){return Bn(Vd,{get universalLink(){return u()},get walletInfo(){return e.wallet},onOpenLink:d,onCopy:p,get isCopiedShown(){return h()}})}}),Bn(Gn,{get when(){return!o()},get children(){return[Bn(Od,{get children(){return e.wallet.name}}),Bn(_d,{get children(){return[Bn(Gn,{get when(){return a()},get children(){return[Bn(Ud,{size:"s"}),Bn(Yn,{get children(){return[Bn(Qn,{get when(){return"missing-features"===a()},get children(){return Bn(Dd,{translationKey:"walletModal.mobileConnectionModal.missingFeatures",get translationValues(){return{name:e.wallet.name}},children:"Please update Wallet, your version does not support required features for this dApp"})}}),Bn(Qn,{get when(){return"connection-declined"===a()},get children(){return Bn(Dd,{translationKey:"walletModal.mobileConnectionModal.connectionDeclined",children:"Connection declined"})}}),Bn(Qn,{get when(){return"not-supported"===a()},get children(){return Bn(Dd,{translationKey:"walletModal.mobileConnectionModal.notSupportedWallet",get translationValues(){return{name:e.wallet.name}},get children(){return[ir(()=>e.wallet.name)," doesn’t support the requested action. Please connect another wallet that supports it."]}})}})]}}),Bn(jd,{get children(){return Bn(Yn,{get children(){return[Bn(Qn,{get when(){return"missing-features"===a()},get children(){return[Bn(Ti,{get leftIcon(){return Bn(Ns,{})},onClick:d,get children(){return Bn(ud,{translationKey:"common.retry",children:"Retry"})}}),Bn(gl,{get href(){return e.wallet.aboutUrl},blank:!0,get children(){return Bn(Ti,{get leftIcon(){return Bn(Ps,{})},get children(){return Bn(ud,{translationKey:"walletModal.mobileConnectionModal.updateWallet",get translationValues(){return{name:e.wallet.name}},get children(){return["Update ",ir(()=>e.wallet.name)]}})}})}})]}}),Bn(Qn,{get when(){return"not-supported"===a()},get children(){return Bn(Ti,{onClick:()=>e.onBackClick(),get children(){return Bn(ud,{translationKey:"walletModal.mobileConnectionModal.chooseAnotherWallet",children:"Choose Another Wallet"})}})}}),Bn(Qn,{get when(){return"connection-declined"===a()},get children(){return[Bn(Ti,{get leftIcon(){return Bn(Ns,{})},onClick:d,get children(){return Bn(ud,{translationKey:"common.retry",children:"Retry"})}}),Bn(Ti,{get leftIcon(){return Bn(Ys,{get fill(){return t.colors.accent}})},onClick:g,get children(){return Bn(ud,{translationKey:"walletModal.mobileConnectionModal.showQR",children:"Show QR Code"})}})]}})]}})}})]}}),Bn(Gn,{get when(){return!a()},get children(){return[Bn(Pd,{size:"s"}),Bn(Dd,{translationKey:"walletModal.mobileConnectionModal.continueIn",get translationValues(){return{name:e.wallet.name}},get children(){return["Continue in ",ir(()=>e.wallet.name),"…"]}}),Bn(jd,{get children(){return[Bn(Ti,{get leftIcon(){return Bn(Ns,{})},onClick:d,get children(){return Bn(ud,{translationKey:"common.retry",children:"Retry"})}}),Bn(Ti,{get leftIcon(){return Bn(Ys,{get fill(){return t.colors.accent}})},onClick:g,get children(){return Bn(ud,{translationKey:"walletModal.mobileConnectionModal.showQR",children:"Show QR Code"})}})]}})]}})]}}),Bn(Id,{get children(){return[Bn(Nd,{get src(){return e.wallet.imageUrl}}),Bn(ls,{get children(){return e.wallet.name}}),Bn(Wd,{get href(){return e.wallet.aboutUrl},blank:!0,get children(){return Bn(Ti,{get children(){return Bn(ud,{translationKey:"common.get",children:"GET"})}})}})]}})]}})]}})},Zd={m:"16px",s:"12px",none:"0"},Gd={m:"6px",s:"6px",none:"0"};Ur.li`
901
900
  width: 82px;
902
901
  min-width: 82px;
903
902
  height: 124px;
@@ -911,7 +910,7 @@
911
910
 
912
911
  transition: transform 0.1s ease-in-out;
913
912
 
914
- ${yi} {
913
+ ${xi} {
915
914
  &:hover {
916
915
  transform: scale(1.04);
917
916
  }
@@ -921,29 +920,29 @@
921
920
  transform: scale(0.96);
922
921
  }
923
922
 
924
- ${wi} {
923
+ ${Ci} {
925
924
  &:active {
926
925
  transform: scale(0.92);
927
926
  }
928
927
  }
929
- `;const Kd=Nr(es)`
928
+ `;const Yd=Ur(os)`
930
929
  margin-top: 38px;
931
930
  margin-bottom: 4px;
932
931
  padding: 0 24px;
933
- `,Hd=Nr(ns)`
932
+ `,Qd=Ur(as)`
934
933
  margin: ${e=>{var t;return null!=(t=e.margin)?t:"0 0 28px 0"}};
935
934
  padding: ${e=>{var t;return null!=(t=e.padding)?t:"0 24px"}};
936
935
  min-height: ${e=>{var t;return null!=(t=e.padding)?t:"44px"}};
937
936
  max-width: ${e=>e.maxWidth}px;
938
937
  margin-left: ${e=>e.maxWidth?"auto":"0px"};
939
938
  margin-right: ${e=>e.maxWidth?"auto":"0px"};
940
- `;Nr(Si)`
939
+ `;Ur(Ti)`
941
940
  display: block;
942
941
  margin: 0 auto;
943
- `;const Fd=Nr(Si)`
942
+ `;const Jd=Ur(Ti)`
944
943
  margin: 0 28px 24px;
945
944
  width: calc(100% - 56px);
946
- border-radius: ${e=>$d[e.theme.borderRadius]};
945
+ border-radius: ${e=>Zd[e.theme.borderRadius]};
947
946
  padding: 14px 16px 14px 14px;
948
947
  background-color: ${e=>e.theme.colors.telegramButton};
949
948
 
@@ -956,66 +955,66 @@
956
955
  margin: 0 16px 24px;
957
956
  width: calc(100% - 32px);
958
957
  }
959
- `,Vd=Nr(ti)`
958
+ `,Xd=Ur(ii)`
960
959
  background-color: transparent;
961
- border-radius: ${e=>qd[e.theme.borderRadius]};
960
+ border-radius: ${e=>Gd[e.theme.borderRadius]};
962
961
  width: 24px;
963
962
  height: 24px;
964
- `,zd=Nr(Yi)`
963
+ `,eh=Ur(ea)`
965
964
  position: absolute;
966
965
  top: 16px;
967
966
  left: 16px;
968
- `,Zd={m:"16px",s:"8px",none:"0"},Gd=Nr(es)`
967
+ `,th={m:"16px",s:"8px",none:"0"},nh=Ur(os)`
969
968
  margin-bottom: 2px;
970
969
  padding: 0 52px;
971
- `,Yd=Nr(ns)`
970
+ `,rh=Ur(as)`
972
971
  margin-bottom: 20px;
973
972
  padding: 0 64px;
974
- `,Qd=Nr.div`
973
+ `,oh=Ur.div`
975
974
  padding: 0 24px 16px;
976
- `,Jd=Nr.div`
975
+ `,ih=Ur.div`
977
976
  display: flex;
978
977
  flex-direction: row;
979
978
  gap: 16px;
980
979
  padding: 0 24px 24px;
981
980
  margin-top: 0;
982
- `,Xd=Nr(Si)`
981
+ `,ah=Ur(Ti)`
983
982
  width: 100%;
984
983
  height: 56px;
985
- border-radius: ${e=>Zd[e.theme.borderRadius]};
986
- background-color: ${e=>jr(e.theme.colors.accent,.12)};
984
+ border-radius: ${e=>th[e.theme.borderRadius]};
985
+ background-color: ${e=>Kr(e.theme.colors.accent,.12)};
987
986
  color: ${e=>e.theme.colors.accent};
988
987
  font-size: 16px;
989
988
  line-height: 20px;
990
989
  font-weight: 500;
991
990
  padding: 17px 20px 19px 20px;
992
- `,eh=e=>[Pn(Gd,{translationKey:"walletModal.mobileUniversalModal.connectYourWallet",children:"Connect your TON wallet"}),Pn(Yd,{translationKey:"walletModal.mobileUniversalModal.scan",children:"Scan with your mobile wallet"}),Pn(Qd,{get children(){return Pn(Na,{get imageUrl(){return Xs},get sourceUrl(){return sd(e.universalLink,"none")},disableCopy:!0})}}),Pn(Jd,{get children(){return[Pn(Xd,{appearance:"secondary",onClick:()=>e.onOpenLink(),get children(){return Pn(ad,{translationKey:"walletModal.mobileUniversalModal.openLink",children:"Open Link"})}}),Pn(Xd,{appearance:"secondary",onClick:()=>e.onCopy(),get children(){return Pn(ad,{get translationKey(){return void 0!==e.isCopiedShown?"common.copied":"common.copyLink"},get children(){return void 0!==e.isCopiedShown?"Copied":"Copy Link"}})}})]}})];function th(e){const t=new Set(e.filter($e).map(e=>e.bridgeUrl));return Array.from(t).map(e=>({bridgeUrl:e}))}function nh(e,t){const n=new Set(null==e?void 0:e.map(e=>e.bridgeUrl)),r=new Set(null==t?void 0:t.map(e=>e.bridgeUrl));return n.size===r.size&&[...n].every(e=>r.has(e))}var rh=rr("<li>"),oh=rr("<div data-tc-wallets-modal-universal-mobile=true>");const ih=e=>{const[t,n]=Jt(!1),[r,o]=Jt(!0),[i,a]=Jt(null),s=Su.connector,l=()=>e.walletsList.filter(e=>Mu(e)&&e.appName!==Js),c=()=>l().length>7,u=nn(()=>th(e.walletsList),null,{equals:nh}),d=nn(()=>{var t,n;return null!=(n=null==(t=e.walletsList.find(e=>e.appName===Js))?void 0:t.isSupportRequiredFeatures)&&n},null),h=()=>(i()||a(s.connect(u(),e.additionalRequest)),i());bo({openMethod:"universal-link"});const[f,p]=Jt(void 0),g=()=>v(null,null,function*(){void 0!==f()&&clearTimeout(f()),yield Oa(h());const e=setTimeout(()=>p(void 0),1500);p(e)}),m=()=>{const e=!r();o(!1),cd(h(),void 0,{returnStrategy:Su.returnStrategy,forceRedirect:e},e=>{bo({openMethod:e})})},w=()=>{a(null);const t=e.walletsList.find(e=>e.appName===Js);if(!t||!$e(t))throw new zr("@wallet bot not found in the wallets list");const n=s.connect({bridgeUrl:t.bridgeUrl,universalLink:t.universalLink},e.additionalRequest),i=!r();o(!1),ld(n,{returnStrategy:Su.returnStrategy,twaReturnUrl:Su.twaReturnUrl,forceRedirect:i})},y=()=>{n(!0),bo({openMethod:"qrcode"})},b=()=>{n(!1),bo({openMethod:"universal-link"})},C=nn(()=>l().filter(e=>e.isSupportRequiredFeatures),null),x=nn(()=>C().slice(0,3),null),S=nn(()=>l().filter(e=>!x().find(t=>t.appName===e.appName)).slice(0,4),null);return lr(k=oh(),Pn(Fn,{get when(){return t()},get children(){return[Pn(zd,{icon:"arrow",onClick:b}),Pn(eh,{get universalLink(){return h()},get isCopiedShown(){return f()},onOpenLink:m,onCopy:g})]}}),null),lr(k,Pn(Fn,{get when(){return!t()},get children(){return[Pn(zd,{get icon(){return Pn(Vs,{})},onClick:y}),Pn(Kd,{translationKey:"walletModal.mobileUniversalModal.connectYourWallet",children:"Connect your TON wallet"}),Pn(Fn,{get when(){return d()},get children(){return[Pn(Hd,{translationKey:"walletModal.mobileUniversalModal.openWalletOnTelegramOrSelect",maxWidth:320,children:"Use Wallet in Telegram or choose other application"}),Pn(Fd,{get leftIcon(){return Pn(qs,{})},get rightIcon(){return Pn(Vd,{get src(){return el}})},onClick:w,scale:"s",get children(){return Pn(ad,{translationKey:"walletModal.mobileUniversalModal.openWalletOnTelegram",children:"Connect Wallet in Telegram"})}})]}}),Pn(Hd,{translationKey:"walletModal.mobileUniversalModal.chooseOtherApplication",maxWidth:342,padding:"0 24px 8px 24px",margin:"0",children:"Choose other application"}),Pn(Fa,{get children(){return[Pn(Hn,{get each(){return tr(()=>!!c())()?x():C()},children:t=>{return lr(n=rh(),Pn(Ja,{get icon(){return t.imageUrl},get name(){return t.name},onClick:()=>e.onSelect(t)})),n;var n}}),Pn(Fn,{get when(){return c()},get children(){var t=rh();return lr(t,Pn(Qs,{labelLine1:"View all",labelLine2:"wallets",get images(){return S().map(e=>e.imageUrl)},onClick:()=>e.onSelectAllWallets()})),t}})]}})]}}),null),k;var k},ah={m:"16px",s:"8px",none:"0"},sh={m:"8px",s:"4px",none:"0"},lh=Nr.div`
991
+ `,sh=e=>[Bn(nh,{translationKey:"walletModal.mobileUniversalModal.connectYourWallet",children:"Connect your TON wallet"}),Bn(rh,{translationKey:"walletModal.mobileUniversalModal.scan",children:"Scan with your mobile wallet"}),Bn(oh,{get children(){return Bn(Ua,{get imageUrl(){return rl},get sourceUrl(){return dd(e.universalLink,"none")},disableCopy:!0})}}),Bn(ih,{get children(){return[Bn(ah,{appearance:"secondary",onClick:()=>e.onOpenLink(),get children(){return Bn(ud,{translationKey:"walletModal.mobileUniversalModal.openLink",children:"Open Link"})}}),Bn(ah,{appearance:"secondary",onClick:()=>e.onCopy(),get children(){return Bn(ud,{get translationKey(){return void 0!==e.isCopiedShown?"common.copied":"common.copyLink"},get children(){return void 0!==e.isCopiedShown?"Copied":"Copy Link"}})}})]}})];function lh(e){const t=new Set(e.filter($e).map(e=>e.bridgeUrl));return Array.from(t).map(e=>({bridgeUrl:e}))}function ch(e,t){const n=new Set(null==e?void 0:e.map(e=>e.bridgeUrl)),r=new Set(null==t?void 0:t.map(e=>e.bridgeUrl));return n.size===r.size&&[...n].every(e=>r.has(e))}var uh=sr("<li>"),dh=sr("<div data-tc-wallets-modal-universal-mobile=true>");const hh=e=>{const[t,n]=nn(!1),[r,o]=nn(!0),[i,a]=nn(null),s=Tu.connector,l=()=>e.walletsList.filter(e=>Lu(e)&&e.appName!==nl),c=()=>l().length>7,u=sn(()=>lh(e.walletsList),null,{equals:ch}),d=sn(()=>{var t,n;return null!=(n=null==(t=e.walletsList.find(e=>e.appName===nl))?void 0:t.isSupportRequiredFeatures)&&n},null),h=()=>(i()||a(s.connect(u(),e.additionalRequest)),i());ko({openMethod:"universal-link"});const[f,p]=nn(void 0),g=()=>v(null,null,function*(){void 0!==f()&&clearTimeout(f()),yield Wa(h());const e=setTimeout(()=>p(void 0),1500);p(e)}),m=()=>{const e=!r();o(!1),fd(h(),void 0,{returnStrategy:Tu.returnStrategy,forceRedirect:e},e=>{ko({openMethod:e})})},w=()=>{a(null);const t=e.walletsList.find(e=>e.appName===nl);if(!t||!$e(t))throw new Qr("@wallet bot not found in the wallets list");const n=s.connect({bridgeUrl:t.bridgeUrl,universalLink:t.universalLink},e.additionalRequest),i=!r();o(!1),hd(n,{returnStrategy:Tu.returnStrategy,twaReturnUrl:Tu.twaReturnUrl,forceRedirect:i})},y=()=>{n(!0),ko({openMethod:"qrcode"})},b=()=>{n(!1),ko({openMethod:"universal-link"})},C=sn(()=>l().filter(e=>e.isSupportRequiredFeatures),null),x=sn(()=>C().slice(0,3),null),S=sn(()=>l().filter(e=>!x().find(t=>t.appName===e.appName)).slice(0,4),null);return hr(k=dh(),Bn(Gn,{get when(){return t()},get children(){return[Bn(eh,{icon:"arrow",onClick:b}),Bn(sh,{get universalLink(){return h()},get isCopiedShown(){return f()},onOpenLink:m,onCopy:g})]}}),null),hr(k,Bn(Gn,{get when(){return!t()},get children(){return[Bn(eh,{get icon(){return Bn(Ys,{})},onClick:y}),Bn(Yd,{translationKey:"walletModal.mobileUniversalModal.connectYourWallet",children:"Connect your TON wallet"}),Bn(Gn,{get when(){return d()},get children(){return[Bn(Qd,{translationKey:"walletModal.mobileUniversalModal.openWalletOnTelegramOrSelect",maxWidth:320,children:"Use Wallet in Telegram or choose other application"}),Bn(Jd,{get leftIcon(){return Bn(Vs,{})},get rightIcon(){return Bn(Xd,{get src(){return ol}})},onClick:w,scale:"s",get children(){return Bn(ud,{translationKey:"walletModal.mobileUniversalModal.openWalletOnTelegram",children:"Connect Wallet in Telegram"})}})]}}),Bn(Qd,{translationKey:"walletModal.mobileUniversalModal.chooseOtherApplication",maxWidth:342,padding:"0 24px 8px 24px",margin:"0",children:"Choose other application"}),Bn(Ga,{get children(){return[Bn(Zn,{get each(){return ir(()=>!!c())()?x():C()},children:t=>{return hr(n=uh(),Bn(ns,{get icon(){return t.imageUrl},get name(){return t.name},onClick:()=>e.onSelect(t)})),n;var n}}),Bn(Gn,{get when(){return c()},get children(){var t=uh();return hr(t,Bn(tl,{labelLine1:"View all",labelLine2:"wallets",get images(){return S().map(e=>e.imageUrl)},onClick:()=>e.onSelectAllWallets()})),t}})]}})]}}),null),k;var k},fh={m:"16px",s:"8px",none:"0"},ph={m:"8px",s:"4px",none:"0"},gh=Ur.div`
993
992
  display: flex;
994
993
  flex-direction: column;
995
994
  align-items: center;
996
995
  padding-bottom: 16px;
997
- `,ch=Nr(ns)`
996
+ `,mh=Ur(as)`
998
997
  max-width: 320px;
999
998
  margin-top: 2px;
1000
999
  margin-bottom: 20px;
1001
- `,uh=Nr(ns)`
1000
+ `,wh=Ur(as)`
1002
1001
  margin-bottom: 16px;
1003
- `,dh=Nr(Na)`
1002
+ `,yh=Ur(Ua)`
1004
1003
  margin-bottom: 24px;
1005
- `,hh=Nr.ul`
1004
+ `,vh=Ur.ul`
1006
1005
  display: flex;
1007
- `;Nr.div`
1006
+ `;Ur.div`
1008
1007
  display: flex;
1009
1008
  gap: 16px;
1010
1009
  width: 100%;
1011
- `,Nr(Si)`
1010
+ `,Ur(Ti)`
1012
1011
  position: relative;
1013
1012
  font-size: 16px;
1014
1013
  line-height: 20px;
1015
1014
  width: 100%;
1016
1015
  padding: 0 16px;
1017
1016
  height: 56px;
1018
- border-radius: ${e=>ah[e.theme.borderRadius]};
1017
+ border-radius: ${e=>fh[e.theme.borderRadius]};
1019
1018
 
1020
1019
  &:hover {
1021
1020
  ${e=>e.disableEventsAnimation?"transform: unset;":""}
@@ -1024,7 +1023,7 @@
1024
1023
  &:active {
1025
1024
  ${e=>e.disableEventsAnimation?"transform: unset;":""}
1026
1025
  }
1027
- `,Nr.ul`
1026
+ `,Ur.ul`
1028
1027
  position: absolute;
1029
1028
  bottom: 100%;
1030
1029
  left: 0;
@@ -1034,9 +1033,9 @@
1034
1033
  transform: translateY(-16px);
1035
1034
 
1036
1035
  background-color: ${e=>e.theme.colors.background.primary};
1037
- border-radius: ${e=>ah[e.theme.borderRadius]};
1036
+ border-radius: ${e=>fh[e.theme.borderRadius]};
1038
1037
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.16);
1039
- `,Nr.li`
1038
+ `,Ur.li`
1040
1039
  padding: 8px;
1041
1040
 
1042
1041
  display: flex;
@@ -1044,7 +1043,7 @@
1044
1043
  gap: 8px;
1045
1044
 
1046
1045
  cursor: pointer;
1047
- border-radius: ${e=>sh[e.theme.borderRadius]};
1046
+ border-radius: ${e=>ph[e.theme.borderRadius]};
1048
1047
 
1049
1048
  transition:
1050
1049
  background-color,
@@ -1057,44 +1056,44 @@
1057
1056
  &:active {
1058
1057
  transform: scale(0.96);
1059
1058
  }
1060
- `,Nr(ti)`
1059
+ `,Ur(ii)`
1061
1060
  width: 24px;
1062
1061
  height: 24px;
1063
1062
 
1064
1063
  border-radius: 6px;
1065
- `,Nr.div`
1064
+ `,Ur.div`
1066
1065
  margin-top: 23px;
1067
1066
  margin-bottom: 1px;
1068
1067
  width: 100%;
1069
1068
  display: flex;
1070
1069
  justify-content: center;
1071
1070
  align-items: center;
1072
- `,Nr(ja)`
1071
+ `,Ur(Ka)`
1073
1072
  color: ${e=>e.theme.colors.text.secondary};
1074
1073
  font-size: 16px;
1075
- `;var fh=rr("<li>");const ph=e=>{const[t,n]=Jt(!1),r=Su.connector,o=nn(()=>th(e.walletsList),null,{equals:nh});bo({openMethod:"qrcode"});const i=nn(()=>r.connect(o(),e.additionalRequest)),a=nn(()=>e.walletsList.filter(e=>e.isSupportRequiredFeatures),null),s=nn(()=>a().slice(0,3),null),l=nn(()=>e.walletsList.filter(e=>!s().find(t=>t.appName===e.appName)).slice(0,4),null);return Pn(lh,{onClick:()=>n(!1),"data-tc-wallets-modal-universal-desktop":"true",get children(){return[Pn(es,{translationKey:"walletModal.desktopUniversalModal.connectYourWallet",children:"Connect your wallet"}),Pn(ch,{translationKey:"walletModal.desktopUniversalModal.scan",children:"Scan with your mobile wallet"}),Pn(dh,{get sourceUrl(){return sd(i(),"none")},get disableCopy(){return t()},get imageUrl(){return Xs}}),Pn(uh,{translationKey:"walletModal.desktopUniversalModal.availableWallets",children:"Available wallets"}),Pn(hh,{get children(){return[Pn(Hn,{get each(){return s()},children:t=>{return lr(n=fh(),Pn(tl,{wallet:t,onClick:()=>e.onSelect(t)})),n;var n}}),Pn(Qs,{labelLine1:"View all",labelLine2:"wallets",get images(){return l().map(e=>e.imageUrl)},onClick:()=>e.onSelectAllWallets()})]}})]}})},gh={m:"16px",s:"8px",none:"0"},mh=Nr(es)`
1074
+ `;var bh=sr("<li>");const Ch=e=>{const[t,n]=nn(!1),r=Tu.connector,o=sn(()=>lh(e.walletsList),null,{equals:ch});ko({openMethod:"qrcode"});const i=sn(()=>r.connect(o(),e.additionalRequest)),a=sn(()=>e.walletsList.filter(e=>e.isSupportRequiredFeatures),null),s=sn(()=>a().slice(0,3),null),l=sn(()=>e.walletsList.filter(e=>!s().find(t=>t.appName===e.appName)).slice(0,4),null);return Bn(gh,{onClick:()=>n(!1),"data-tc-wallets-modal-universal-desktop":"true",get children(){return[Bn(os,{translationKey:"walletModal.desktopUniversalModal.connectYourWallet",children:"Connect your wallet"}),Bn(mh,{translationKey:"walletModal.desktopUniversalModal.scan",children:"Scan with your mobile wallet"}),Bn(yh,{get sourceUrl(){return dd(i(),"none")},get disableCopy(){return t()},get imageUrl(){return rl}}),Bn(wh,{translationKey:"walletModal.desktopUniversalModal.availableWallets",children:"Available wallets"}),Bn(vh,{get children(){return[Bn(Zn,{get each(){return s()},children:t=>{return hr(n=bh(),Bn(il,{wallet:t,onClick:()=>e.onSelect(t)})),n;var n}}),Bn(tl,{labelLine1:"View all",labelLine2:"wallets",get images(){return l().map(e=>e.imageUrl)},onClick:()=>e.onSelectAllWallets()})]}})]}})},xh={m:"16px",s:"8px",none:"0"},Sh=Ur(os)`
1076
1075
  max-width: 288px;
1077
1076
  margin: 0 auto 38px;
1078
- `,wh=Nr.div`
1077
+ `,kh=Ur.div`
1079
1078
  display: flex;
1080
1079
  flex-direction: column;
1081
1080
  align-items: center;
1082
- `,yh=Nr(Yi)`
1081
+ `,Rh=Ur(ea)`
1083
1082
  position: absolute;
1084
1083
  top: 16px;
1085
1084
  left: 16px;
1086
- `,vh=Nr(es)`
1085
+ `,Eh=Ur(os)`
1087
1086
  text-align: center;
1088
1087
  font-size: 20px;
1089
1088
  line-height: 28px;
1090
- `,bh=Nr(ja)`
1089
+ `,Th=Ur(Ka)`
1091
1090
  margin-top: 12px;
1092
1091
  margin-bottom: 24px;
1093
1092
  text-align: center;
1094
1093
  max-width: 360px;
1095
1094
  font-weight: 400;
1096
1095
  color: ${e=>e.theme.colors.text.secondary};
1097
- `;Nr.button`
1096
+ `;Ur.button`
1098
1097
  background: transparent;
1099
1098
  border: none;
1100
1099
  padding: 0;
@@ -1103,57 +1102,57 @@
1103
1102
  text-decoration: underline;
1104
1103
  cursor: pointer;
1105
1104
  font: inherit;
1106
- `;const Ch=Nr.div`
1105
+ `;const Ah=Ur.div`
1107
1106
  margin-bottom: 46px;
1108
- `,xh=Nr(ps)`
1107
+ `,Mh=Ur(ys)`
1109
1108
  margin-bottom: 16px;
1110
- `;Nr.ul`
1109
+ `;Ur.ul`
1111
1110
  display: flex;
1112
1111
  gap: 8px;
1113
1112
  margin-bottom: 24px;
1114
1113
  list-style: none;
1115
1114
  padding: 0;
1116
- `;const Sh=Nr(Si)`
1115
+ `;const _h=Ur(Ti)`
1117
1116
  max-width: 320px;
1118
1117
  width: 100%;
1119
1118
  height: 48px;
1120
1119
  font-size: 16px;
1121
1120
  line-height: 20px;
1122
- border-radius: ${e=>gh[e.theme.borderRadius]};
1121
+ border-radius: ${e=>xh[e.theme.borderRadius]};
1123
1122
  margin-bottom: 28px;
1124
- `,kh=Nr(ns)`
1123
+ `,Oh=Ur(as)`
1125
1124
  color: ${e=>e.theme.colors.text.secondary};
1126
1125
  text-align: center;
1127
1126
  margin-bottom: 20px;
1128
- `,Rh=Nr.div`
1127
+ `,Lh=Ur.div`
1129
1128
  display: flex;
1130
1129
  justify-content: center;
1131
1130
  gap: 8px;
1132
1131
  padding-bottom: 31px;
1133
- `,Eh=Nr.div`
1132
+ `,Ih=Ur.div`
1134
1133
  margin: 0 8px 16px 8px;
1135
- `,Ah=Nr(Yi)`
1134
+ `,Nh=Ur(ea)`
1136
1135
  position: absolute;
1137
1136
  top: 16px;
1138
1137
  left: 16px;
1139
- `,Mh=Nr(es)`
1138
+ `,Wh=Ur(os)`
1140
1139
  margin-bottom: 18px;
1141
1140
  text-align: center;
1142
- `,Th=Nr.div`
1141
+ `,Ph=Ur.div`
1143
1142
  padding: 16px 0;
1144
1143
  display: flex;
1145
1144
  flex-direction: column;
1146
1145
  align-items: center;
1147
- `;Nr.div`
1146
+ `;Ur.div`
1148
1147
  margin-bottom: 12px;
1149
- `;const _h=Nr(os)`
1148
+ `;const Uh=Ur(ls)`
1150
1149
  text-align: center;
1151
1150
  margin-bottom: 4px;
1152
- `,Oh=Nr(ja)`
1151
+ `,Dh=Ur(Ka)`
1153
1152
  text-align: center;
1154
1153
  max-width: 352px;
1155
1154
  color: ${e=>e.theme.colors.text.secondary};
1156
- `,Lh=Nr.div`
1155
+ `,jh=Ur.div`
1157
1156
  width: 44px;
1158
1157
  height: 44px;
1159
1158
  border-radius: 20px;
@@ -1165,14 +1164,14 @@
1165
1164
  font-weight: 700;
1166
1165
  font-size: 22px;
1167
1166
  color: ${e=>{var t;return null==(t=e.theme)?void 0:t.colors.text.primary}};
1168
- `,Nh=e=>Pn(Eh,{"data-tc-wallets-modal-restore":"true",get children(){return[Pn(Ah,{icon:"arrow",get onClick(){return e.onBackClick}}),Pn(Mh,{translationKey:"walletModal.restoreInfoModal.title",children:"Restore"}),Pn(cl,{get children(){return[Pn(Th,{get children(){return[Pn(Lh,{children:"1"}),Pn(_h,{translationKey:"walletModal.restoreModal.step1.title",children:"Find your current recovery phrase"}),Pn(Oh,{translationKey:"walletModal.restoreModal.step1.text",children:"Open your wallet settings and locate the recovery phrase"})]}}),Pn(Th,{get children(){return[Pn(Lh,{children:"2"}),Pn(_h,{translationKey:"walletModal.restoreModal.step2.title",children:"Copy your recovery phrase"}),Pn(Oh,{translationKey:"walletModal.restoreModal.step2.text",children:"Write it down or copy it to a safe place"})]}}),Pn(Th,{get children(){return[Pn(Lh,{children:"3"}),Pn(_h,{translationKey:"walletModal.restoreModal.step3.title",children:"Restore in a supported wallet from the list below"}),Pn(Oh,{translationKey:"walletModal.restoreModal.step3.text",children:"Enter the recovery phrase to access your wallet"})]}})]}})]}}),Ih=e=>{const[t,n]=Jt(null),[r,o]=Jt(!1),i=nn(()=>e.walletsList.find(t=>t.appName===e.currentWallet.device.appName||t.name===e.currentWallet.device.appName)),a=nn(()=>{var t,n,r,o;return(null!=(n=null==(t=i())?void 0:t.appName)?n:e.currentWallet.device.appName)===Js?"Wallet in Telegram":null!=(o=null==(r=i())?void 0:r.name)?o:e.currentWallet.device.appName}),s=nn(()=>{const t=i();if(!(null==t?void 0:t.features))return!1;const n=e.walletsModalState.requiredFeature,r=n?{[n.featureName]:n.value}:{},o=Qe(t.features,r),a=Qe(e.currentWallet.device.features,r);return o&&!a});return Pn(wh,{get children(){return Pn(Vn,{get children(){return[Pn(zn,{get when(){return r()},get children(){return Pn(Nh,{onBackClick:()=>o(!1)})}}),Pn(zn,{get when(){return t()},get children(){return[Pn(Ch,{}),Pn(wh,{get children(){return[Pn(yh,{icon:"arrow",onClick:()=>n(null)}),Pn(vh,{translationKey:"walletModal.featureNotSupported.disconnect.title",children:"Confirm Disconnect"}),Pn(bh,{translationKey:"walletModal.featureNotSupported.disconnect.description",get translationValues(){return{name:t().name}},get children(){return["You will be disconnected from your current wallet and redirected to connect ",tr(()=>{var e;return null==(e=t())?void 0:e.name}),"."]}}),Pn(Sh,{onClick:()=>v(null,null,function*(){yield e.onDisconnect(),e.onSelect(t())}),get children(){return Pn(ad,{translationKey:"walletModal.featureNotSupported.disconnect.button",children:"Disconnect"})}})]}})]}}),Pn(zn,{get when(){return s()},get children(){return[Pn(mh,{get children(){return a()}}),Pn(xh,{size:"s"}),Pn(kh,{translationKey:"walletModal.featureNotSupported.version.description",get translationValues(){return{name:a()}},get children(){return["Your current version of ",tr(()=>a())," or wallet contract type doesn't support the required features. Please update it to continue."]}}),Pn(Rh,{get children(){return[Pn(dl,{get href(){return i().aboutUrl},blank:!0,get children(){return Pn(Si,{get leftIcon(){return Pn(Ls,{})},get children(){return Pn(ad,{translationKey:"walletModal.featureNotSupported.version.updateButton",get translationValues(){return{name:a()}},get children(){return["Update ",tr(()=>a())]}})}})}}),Pn(dl,{href:"https://tonkeeper.helpscoutdocs.com/article/102-w5",blank:!0,get children(){return Pn(Si,{get leftIcon(){return Pn(Ls,{})},get children(){return Pn(ad,{translationKey:"walletModal.featureNotSupported.version.aboutW5",children:"About W5"})}})}})]}})]}}),Pn(zn,{when:!0,get children(){return[Pn(Ch,{}),Pn(xh,{size:"s"}),Pn(vh,{translationKey:"walletModal.featureNotSupported.wallet.title",get translationValues(){return{name:a()}},get children(){return[tr(()=>a())," doesn’t support the requested action"]}}),Pn(Ch,{})]}})]}})}})},Wh=()=>{const{locale:e}=Ua()[1];tn(()=>e(Su.language)),tn(()=>{ho()?ll():(i(null),c("universal"),d(!1))});const t=wn(Eo),n=wn(hl),[r]=rn(()=>n.getWallets()),[o,i]=Jt(null),[a,s]=Jt(null),[l,c]=Jt("universal"),[u,d]=Jt(!1),h=nn(()=>{const e=co();return"type"in e&&"wallet-not-support-feature"===e.type}),f=nn(()=>{var e;if("ready"!==r.state)return null;let t=Eu(r(),Su.walletsListConfiguration);const o=t.filter(De),i=t.filter(e=>!De(e));t=(o||[]).concat(i);const a=Su.preferredWalletAppName,s=t.find(e=>_u(e,a)),l=t.filter(e=>_u(e,a)).length>=2;a&&s&&!l&&(t=[w(m({},s),{isPreferred:!0})].concat(t.filter(e=>!_u(e,a))));const c=t.find(e=>_u(e,Js));c&&(t=[c].concat(t.filter(e=>!_u(e,Js))));const u=null!=(e=null==n?void 0:n.walletsRequiredFeatures)?e:null==n?void 0:n.walletsPreferredFeatures;return t.map(e=>{var t;return w(m({},e),{isSupportRequiredFeatures:!u||Qe(null!=(t=e.features)?t:[],u)})})}),p=()=>{var e;return"loading"===(null==(e=Su.connectRequestParameters)?void 0:e.state)},g=nn(()=>{var e;if(!p())return null==(e=Su.connectRequestParameters)?void 0:e.value}),y=e=>{n.closeModal(e)},v=t.onStatusChange(e=>{e&&y("wallet-selected")},e=>{var t;if(e instanceof te){const n=e.cause.connectEvent.device.appName.toLowerCase(),r=null==(t=f())?void 0:t.find(e=>e.appName.toLowerCase()===n);if(!r)throw new z("Wallet not found");const o=r.isSupportRequiredFeatures?"missing-features":"not-supported";s(o),i(r)}}),b=()=>{c("all-wallets")},C=()=>{c("universal")},x=e=>{i(e),Jh.openWalletsModal()},S=()=>{i(null),s(null)};return ln(()=>{i(null),s(null),d(!1)}),ln(v),Pn(bu,{get opened(){return ho()},get enableAndroidBackHandler(){return Su.enableAndroidBackHandler},onClose:()=>y("action-cancelled"),onClickQuestion:()=>d(e=>!e),get showFooter(){return!h()},"data-tc-wallets-modal-container":"true",get children(){return[Pn(Fn,{get when(){return u()},get children(){return Pn(Cd,{onBackClick:()=>d(!1)})}}),Pn(Fn,{get when(){return!u()},get children(){return[Pn(Fn,{get when(){return p()||!f()},get children(){return[Pn(Cu,{translationKey:"walletModal.loading",children:"Wallets list is loading"}),Pn(xu,{get children(){return Pn(ys,{size:"m"})}})]}}),Pn(Fn,{get when(){return tr(()=>!p())()&&f()},get children(){return Pn(Vn,{get children(){return[Pn(zn,{get when(){return h()},get children(){return Pn(Ih,{get walletsList(){return f()},get currentWallet(){return null==n?void 0:n.wallet},onSelect:x,onSelectAllWallets:b,onDisconnect:()=>t.disconnect(),get walletsModalState(){return co()},onClose:()=>y("action-cancelled")})}}),Pn(zn,{get when(){return o()},get children(){return Pn(yr,{get component(){return al()?Bd:dd},get wallet(){return o()},get additionalRequest(){return g()},onBackClick:S,get defaultError(){return a()}})}}),Pn(zn,{get when(){return"universal"===l()},get children(){return Pn(yr,{get component(){return al()?ih:ph},onSelect:i,get walletsList(){return f()},get additionalRequest(){return g()},onSelectAllWallets:b})}}),Pn(zn,{get when(){return"all-wallets"===l()},get children(){return Pn(Ku,{get walletsList(){return f()},get featureCheckMode(){return(null==n?void 0:n.walletsRequiredFeatures)?"strict":"soft"},onBack:C,onSelect:i})}})]}})}})]}})]}})},Ph=Nr.div`
1167
+ `,Bh=e=>Bn(Ih,{"data-tc-wallets-modal-restore":"true",get children(){return[Bn(Nh,{icon:"arrow",get onClick(){return e.onBackClick}}),Bn(Wh,{translationKey:"walletModal.restoreInfoModal.title",children:"Restore"}),Bn(fl,{get children(){return[Bn(Ph,{get children(){return[Bn(jh,{children:"1"}),Bn(Uh,{translationKey:"walletModal.restoreModal.step1.title",children:"Find your current recovery phrase"}),Bn(Dh,{translationKey:"walletModal.restoreModal.step1.text",children:"Open your wallet settings and locate the recovery phrase"})]}}),Bn(Ph,{get children(){return[Bn(jh,{children:"2"}),Bn(Uh,{translationKey:"walletModal.restoreModal.step2.title",children:"Copy your recovery phrase"}),Bn(Dh,{translationKey:"walletModal.restoreModal.step2.text",children:"Write it down or copy it to a safe place"})]}}),Bn(Ph,{get children(){return[Bn(jh,{children:"3"}),Bn(Uh,{translationKey:"walletModal.restoreModal.step3.title",children:"Restore in a supported wallet from the list below"}),Bn(Dh,{translationKey:"walletModal.restoreModal.step3.text",children:"Enter the recovery phrase to access your wallet"})]}})]}})]}}),$h=e=>{const[t,n]=nn(null),[r,o]=nn(!1),i=sn(()=>e.walletsList.find(t=>t.appName===e.currentWallet.device.appName||t.name===e.currentWallet.device.appName)),a=sn(()=>{var t,n,r,o;return(null!=(n=null==(t=i())?void 0:t.appName)?n:e.currentWallet.device.appName)===nl?"Wallet in Telegram":null!=(o=null==(r=i())?void 0:r.name)?o:e.currentWallet.device.appName}),s=sn(()=>{const t=i();if(!(null==t?void 0:t.features))return!1;const n=e.walletsModalState.requiredFeature,r=n?{[n.featureName]:n.value}:{},o=Ye(t.features,r),a=Ye(e.currentWallet.device.features,r);return o&&!a});return Bn(kh,{get children(){return Bn(Yn,{get children(){return[Bn(Qn,{get when(){return r()},get children(){return Bn(Bh,{onBackClick:()=>o(!1)})}}),Bn(Qn,{get when(){return t()},get children(){return[Bn(Ah,{}),Bn(kh,{get children(){return[Bn(Rh,{icon:"arrow",onClick:()=>n(null)}),Bn(Eh,{translationKey:"walletModal.featureNotSupported.disconnect.title",children:"Confirm Disconnect"}),Bn(Th,{translationKey:"walletModal.featureNotSupported.disconnect.description",get translationValues(){return{name:t().name}},get children(){return["You will be disconnected from your current wallet and redirected to connect ",ir(()=>{var e;return null==(e=t())?void 0:e.name}),"."]}}),Bn(_h,{onClick:()=>v(null,null,function*(){yield e.onDisconnect(),e.onSelect(t())}),get children(){return Bn(ud,{translationKey:"walletModal.featureNotSupported.disconnect.button",children:"Disconnect"})}})]}})]}}),Bn(Qn,{get when(){return s()},get children(){return[Bn(Sh,{get children(){return a()}}),Bn(Mh,{size:"s"}),Bn(Oh,{translationKey:"walletModal.featureNotSupported.version.description",get translationValues(){return{name:a()}},get children(){return["Your current version of ",ir(()=>a())," or wallet contract type doesn't support the required features. Please update it to continue."]}}),Bn(Lh,{get children(){return[Bn(gl,{get href(){return i().aboutUrl},blank:!0,get children(){return Bn(Ti,{get leftIcon(){return Bn(Ps,{})},get children(){return Bn(ud,{translationKey:"walletModal.featureNotSupported.version.updateButton",get translationValues(){return{name:a()}},get children(){return["Update ",ir(()=>a())]}})}})}}),Bn(gl,{href:"https://tonkeeper.helpscoutdocs.com/article/102-w5",blank:!0,get children(){return Bn(Ti,{get leftIcon(){return Bn(Ps,{})},get children(){return Bn(ud,{translationKey:"walletModal.featureNotSupported.version.aboutW5",children:"About W5"})}})}})]}})]}}),Bn(Qn,{when:!0,get children(){return[Bn(Ah,{}),Bn(Mh,{size:"s"}),Bn(Eh,{translationKey:"walletModal.featureNotSupported.wallet.title",get translationValues(){return{name:a()}},get children(){return[ir(()=>a())," doesn’t support the requested action"]}}),Bn(Ah,{})]}})]}})}})},qh=()=>{const{locale:e}=$a()[1];an(()=>e(Tu.language)),an(()=>{mo()?(hl(),o()):(a(null),u("universal"),h(!1))});const t=Cn(_o),n=Cn(ml),[r,{refetch:o}]=ln(()=>n.getWallets()),[i,a]=nn(null),[s,l]=nn(null),[c,u]=nn("universal"),[d,h]=nn(!1),f=sn(()=>{const e=po();return"type"in e&&"wallet-not-support-feature"===e.type}),p=sn(()=>{var e;if("ready"!==r.state)return null;let t=_u(r(),Tu.walletsListConfiguration);const o=t.filter(De),i=t.filter(e=>!De(e));t=(o||[]).concat(i);const a=Tu.preferredWalletAppName,s=t.find(e=>Nu(e,a)),l=t.filter(e=>Nu(e,a)).length>=2;a&&s&&!l&&(t=[w(m({},s),{isPreferred:!0})].concat(t.filter(e=>!Nu(e,a))));const c=t.find(e=>Nu(e,nl));c&&(t=[c].concat(t.filter(e=>!Nu(e,nl))));const u=null!=(e=null==n?void 0:n.walletsRequiredFeatures)?e:null==n?void 0:n.walletsPreferredFeatures;return t.map(e=>{var t;return w(m({},e),{isSupportRequiredFeatures:!u||Ye(null!=(t=e.features)?t:[],u)})})}),g=()=>{var e;return"loading"===(null==(e=Tu.connectRequestParameters)?void 0:e.state)},y=sn(()=>{var e;if(!g())return null==(e=Tu.connectRequestParameters)?void 0:e.value}),v=e=>{n.closeModal(e)},b=t.onStatusChange(e=>{e&&v("wallet-selected")},e=>{var t;if(e instanceof te){const n=e.cause.connectEvent.device.appName.toLowerCase(),r=null==(t=p())?void 0:t.find(e=>e.appName.toLowerCase()===n);if(!r)throw new z("Wallet not found");const o=r.isSupportRequiredFeatures?"missing-features":"not-supported";l(o),a(r)}}),C=()=>{u("all-wallets")},x=()=>{u("universal")},S=e=>{a(e),af.openWalletsModal()},k=()=>{a(null),l(null)};return hn(()=>{a(null),l(null),h(!1)}),hn(b),Bn(ku,{get opened(){return mo()},get enableAndroidBackHandler(){return Tu.enableAndroidBackHandler},onClose:()=>v("action-cancelled"),onClickQuestion:()=>h(e=>!e),get showFooter(){return!f()},"data-tc-wallets-modal-container":"true",get children(){return[Bn(Gn,{get when(){return d()},get children(){return Bn(Ad,{onBackClick:()=>h(!1)})}}),Bn(Gn,{get when(){return!d()},get children(){return[Bn(Gn,{get when(){return g()||!p()},get children(){return[Bn(Ru,{translationKey:"walletModal.loading",children:"Wallets list is loading"}),Bn(Eu,{get children(){return Bn(xs,{size:"m"})}})]}}),Bn(Gn,{get when(){return ir(()=>!g())()&&p()},get children(){return Bn(Yn,{get children(){return[Bn(Qn,{get when(){return f()},get children(){return Bn($h,{get walletsList(){return p()},get currentWallet(){return null==n?void 0:n.wallet},onSelect:S,onSelectAllWallets:C,onDisconnect:()=>t.disconnect(),get walletsModalState(){return po()},onClose:()=>v("action-cancelled")})}}),Bn(Qn,{get when(){return i()},get children(){return Bn(xr,{get component(){return ul()?zd:yd},get wallet(){return i()},get additionalRequest(){return y()},onBackClick:k,get defaultError(){return s()}})}}),Bn(Qn,{get when(){return"universal"===c()},get children(){return Bn(xr,{get component(){return ul()?hh:Ch},onSelect:a,get walletsList(){return p()},get additionalRequest(){return y()},onSelectAllWallets:C})}}),Bn(Qn,{get when(){return"all-wallets"===c()},get children(){return Bn(zu,{get walletsList(){return p()},get featureCheckMode(){return(null==n?void 0:n.walletsRequiredFeatures)?"strict":"soft"},onBack:x,onSelect:a})}})]}})}})]}})]}})},Kh=Ur.div`
1169
1168
  display: flex;
1170
1169
  flex-direction: column;
1171
1170
  align-items: center;
1172
1171
  padding-bottom: 8px;
1173
- `,Uh=Nr(es)`
1172
+ `,Hh=Ur(os)`
1174
1173
  margin-top: 16px;
1175
- `,Dh=Nr(ja)`
1174
+ `,Fh=Ur(Ka)`
1176
1175
  font-weight: 510;
1177
1176
  font-size: 16px;
1178
1177
  line-height: 20px;
@@ -1180,13 +1179,13 @@
1180
1179
  max-width: 250px;
1181
1180
 
1182
1181
  color: ${e=>e.theme.colors.text.secondary};
1183
- `,jh=Nr(Si)`
1182
+ `,Vh=Ur(Ti)`
1184
1183
  min-width: 112px;
1185
1184
  margin-top: 32px;
1186
- `,Bh=Nr(ys)`
1185
+ `,zh=Ur(xs)`
1187
1186
  height: 16px;
1188
1187
  width: 16px;
1189
- `,$h=Nr(Si)`
1188
+ `,Zh=Ur(Ti)`
1190
1189
  margin-top: 32px;
1191
- `,qh=e=>{const t=xi(e),n=wn(hl),[r,o]=Jt(!0),[i,a]=Jt(!1),[s,l]=Jt(!1),[c,u]=Jt(!1);let d,h;tn(()=>{const e=Co();a(!!e&&("sent"in e&&e.sent||"transaction-sent"===e.name)),l(!!e&&("signed"in e&&e.signed||"data-signed"===e.name)),u(!!e&&("transaction-canceled"===e.name||"sign-data-canceled"===e.name))}),(null==n?void 0:n.wallet)&&"universalLink"in n.wallet&&("universal-link"===n.wallet.openMethod||ve(n.wallet.universalLink)&&ai())&&(d=n.wallet.universalLink),(null==n?void 0:n.wallet)&&"deepLink"in n.wallet&&("custom-deeplink"===n.wallet.openMethod||ve(n.wallet.deepLink)&&ai())&&(h=n.wallet.deepLink);const f=()=>{const e=Co(),t="returnStrategy"in e?e.returnStrategy:Su.returnStrategy,n=!r();o(!1),ve(d)?ld(d,{returnStrategy:t,twaReturnUrl:"twaReturnUrl"in e?e.twaReturnUrl:Su.twaReturnUrl,forceRedirect:n}):cd(d,h,{returnStrategy:t,forceRedirect:n},()=>{})};return Pn(Ph,$n(t,{get children(){return[tr(()=>e.icon),Pn(Uh,{get translationKey(){return e.headerTranslationKey},get translationValues(){return e.headerTranslationValues}}),Pn(Dh,{get translationKey(){return e.textTranslationKey},get translationValues(){return e.textTranslationValues}}),Pn(Fn,{get when(){return!i()&&!s()&&!c()&&("open-wallet"===e.showButton&&d||"open-wallet"!==e.showButton)},get children(){return Pn(jh,{disabled:!0,"data-tc-connect-button-loading":"true",get children(){return Pn(Bh,{})}})}}),Pn(Fn,{get when(){return i()||s()},get children(){return[Pn(Fn,{get when(){return"open-wallet"!==e.showButton},get children(){return Pn($h,{onClick:()=>e.onClose(),get children(){return Pn(ad,{translationKey:"common.close",children:"Close"})}})}}),Pn(Fn,{get when(){return"open-wallet"===e.showButton&&d},get children(){return Pn($h,{onClick:f,get children(){return Pn(ad,{translationKey:"common.openWallet",children:"Open wallet"})}})}})]}})]}}))},Kh=e=>{const t=wn(hl),[n]=Ua();return Pn(qh,{headerTranslationKey:"actionModal.confirmTransaction.header",get headerTranslationValues(){return{name:t.wallet&&"name"in t.wallet?t.wallet.name:n("common.yourWallet",{},"Your wallet")}},textTranslationKey:"actionModal.confirmTransaction.text",get icon(){return Pn(ys,{size:"m"})},onClose:()=>e.onClose(),showButton:"open-wallet","data-tc-confirm-modal":"true"})},Hh=e=>Pn(qh,{headerTranslationKey:"actionModal.transactionCanceled.header",textTranslationKey:"actionModal.transactionCanceled.text",get icon(){return Pn(ps,{size:"m"})},onClose:()=>e.onClose(),"data-tc-transaction-canceled-modal":"true"}),Fh=e=>Pn(qh,{headerTranslationKey:"actionModal.transactionSent.header",textTranslationKey:"actionModal.transactionSent.text",get icon(){return Pn(us,{size:"m"})},showButton:"open-wallet",onClose:()=>e.onClose(),"data-tc-transaction-sent-modal":"true"}),Vh=e=>{const t=wn(hl),[n]=Ua();return Pn(qh,{headerTranslationKey:"actionModal.signData.header",get headerTranslationValues(){return{name:t.wallet&&"name"in t.wallet?t.wallet.name:n("common.yourWallet",{},"Your wallet")}},textTranslationKey:"actionModal.signData.text",get icon(){return Pn(ys,{size:"m"})},onClose:()=>e.onClose(),showButton:"open-wallet","data-tc-sign-data-confirm-modal":"true"})},zh=e=>Pn(qh,{headerTranslationKey:"actionModal.signDataCanceled.header",get icon(){return Pn(ps,{size:"m"})},onClose:()=>e.onClose(),"data-tc-sign-data-canceled-modal":"true"}),Zh=e=>Pn(qh,{headerTranslationKey:"actionModal.dataSigned.header",get icon(){return Pn(us,{size:"m"})},onClose:()=>e.onClose(),"data-tc-data-signed-modal":"true"}),Gh=()=>Pn(ha,{get opened(){var e;return tr(()=>null!==Co())()&&!0===(null==(e=Co())?void 0:e.openModal)},get enableAndroidBackHandler(){return Su.enableAndroidBackHandler},onClose:()=>xo(null),showFooter:!1,"data-tc-actions-modal-container":"true",get children(){return Pn(Vn,{get children(){return[Pn(zn,{get when(){return"transaction-sent"===Co().name},get children(){return Pn(Fh,{onClose:()=>xo(null)})}}),Pn(zn,{get when(){return"transaction-canceled"===Co().name},get children(){return Pn(Hh,{onClose:()=>xo(null)})}}),Pn(zn,{get when(){return"confirm-transaction"===Co().name},get children(){return Pn(Kh,{onClose:()=>xo(null)})}}),Pn(zn,{get when(){return"data-signed"===Co().name},get children(){return Pn(Zh,{onClose:()=>xo(null)})}}),Pn(zn,{get when(){return"sign-data-canceled"===Co().name},get children(){return Pn(zh,{onClose:()=>xo(null)})}}),Pn(zn,{get when(){return"confirm-sign-data"===Co().name},get children(){return Pn(Vh,{onClose:()=>xo(null)})}})]}})}}),Yh=()=>{const{locale:e}=Ua()[1];tn(()=>e(Su.language)),tn(()=>{go()&&ll()});const t=wn(Eo),n=wn(hl),[r,o]=Jt(!1),i=()=>{var e;return"loading"===(null==(e=Su.connectRequestParameters)?void 0:e.state)},a=nn(()=>{var e;if(!i())return null==(e=Su.connectRequestParameters)?void 0:e.value}),s=e=>{n.closeSingleWalletModal(e)};return ln(t.onStatusChange(e=>{e&&s("wallet-selected")})),ln(()=>{o(!1)}),Pn(bu,{get opened(){return go()},get enableAndroidBackHandler(){return Su.enableAndroidBackHandler},onClose:()=>s("action-cancelled"),onClickQuestion:()=>o(e=>!e),showFooter:!0,"data-tc-wallets-modal-container":"true",get children(){return[Pn(Fn,{get when(){return r()},get children(){return Pn(Cd,{onBackClick:()=>o(!1)})}}),Pn(Fn,{get when(){return!r()},get children(){return[Pn(Fn,{get when(){return i()},get children(){return[Pn(Cu,{translationKey:"walletModal.loading",children:"Wallets list is loading"}),Pn(xu,{get children(){return Pn(ys,{size:"m"})}})]}}),Pn(Fn,{get when(){return!i()},get children(){return Pn(yr,{get component(){return al()?Bd:dd},get wallet(){return mo()},get additionalRequest(){return a()},onBackClick:()=>{},backDisabled:!0})}})]}})]}})},Qh=e=>{const t=Wa(ko,Su.language);return customElements.get("tc-root")||customElements.define(Wr,class extends HTMLElement{}),document.body.hasAttribute("ontouchstart")||document.body.setAttribute("ontouchstart",""),Pn(Pa.Provider,{value:t,get children(){return Pn(hl.Provider,{get value(){return e.tonConnectUI},get children(){return Pn(Eo.Provider,{get value(){return Su.connector},get children(){return[Pn(Dr,{}),Pn(_r,{theme:Go,get children(){return[Pn(Fn,{get when(){return Su.buttonRootId},get children(){return Pn(wr,{get mount(){return document.getElementById(Su.buttonRootId)},get children(){return Pn(vu,{})}})}}),Pn(yr,{component:Wr,get children(){return[Pn(Wh,{}),Pn(Yh,{}),Pn(Gh,{})]}})]}})]}})}})}})},Jh={openWalletsModal:()=>{setTimeout(()=>uo({status:"opened",closeReason:null}))},closeWalletsModal:e=>{setTimeout(()=>uo({status:"closed",closeReason:e}))},openSingleWalletModal:e=>{setTimeout(()=>po({status:"opened",closeReason:null,walletInfo:e}))},closeSingleWalletModal:e=>{setTimeout(()=>po({status:"closed",closeReason:e}))},openWalletNotSupportFeatureModal:e=>{setTimeout(()=>uo({status:"opened",closeReason:null,type:"wallet-not-support-feature",requiredFeature:e.requiredFeature}))},setAction:e=>{setTimeout(()=>xo(e))},clearAction:()=>{setTimeout(()=>xo(null))},getSelectedWalletInfo:()=>yo(),removeSelectedWalletInfo:()=>bo(null),renderApp:(e,t)=>function(e,t,n,r={}){let o;return Qt(r=>{o=r,t===document?e():lr(t,e(),t.firstChild?null:void 0,n)},r.owner),()=>{o(),t.textContent=""}}(()=>Pn(Qh,{tonConnectUI:t}),document.getElementById(e))};class Xh{constructor(e){this.consumers=[],this.state=co(),this.connector=e.connector,this.tracker=e.tracker,this.setConnectRequestParametersCallback=e.setConnectRequestParametersCallback,tn(()=>{const e=co();this.state=e,this.consumers.forEach(t=>t(e))})}open(){return v(this,null,function*(){this.tracker.trackConnectionStarted();const e=(yield this.connector.getWallets()).find(je);return e?this.connectEmbeddedWallet(e):this.openWalletsModal()})}close(e="action-cancelled"){"action-cancelled"===e&&this.tracker.trackConnectionError("Connection was cancelled"),Jh.closeWalletsModal(e)}onStateChange(e){return this.consumers.push(e),()=>{this.consumers=this.consumers.filter(t=>t!==e)}}connectEmbeddedWallet(e){const t=t=>{bo(e),this.connector.connect({jsBridgeKey:e.jsBridgeKey},t)},n=Su.connectRequestParameters;"loading"===(null==n?void 0:n.state)?this.setConnectRequestParametersCallback(t):t(null==n?void 0:n.value)}openWalletsModal(){return v(this,null,function*(){return ai()&&li(),Jh.openWalletsModal(),new Promise(e=>{const t=this.onStateChange(n=>{const{status:r}=n;"opened"===r&&(t(),e())})})})}}class ef{constructor(e){this.consumers=[],this.connector=e.connector,tn(()=>{const e=Co();this.consumers.forEach(t=>t(e))})}onStateChange(e){return this.consumers.push(e),()=>{this.consumers=this.consumers.filter(t=>t!==e)}}}class tf{constructor(e){this.consumers=[],this.state=fo(),this.connector=e.connector,this.tracker=e.tracker,this.setConnectRequestParametersCallback=e.setConnectRequestParametersCallback,tn(()=>{const e=fo();this.state=e,this.consumers.forEach(t=>t(e))})}open(e){return v(this,null,function*(){this.tracker.trackConnectionStarted();const t=Eu(yield this.connector.getWallets(),Su.walletsListConfiguration),n=t.find(je);if(!!n)return this.connectEmbeddedWallet(n);const r=t.filter($e).find(t=>_u(t,e));if(!!r)return this.openSingleWalletModal(r);const o=`Trying to open modal window with unknown wallet "${e}".`;throw this.tracker.trackConnectionError(o),new zr(o)})}close(e="action-cancelled"){"action-cancelled"===e&&this.tracker.trackConnectionError("Connection was cancelled"),Jh.closeSingleWalletModal("action-cancelled")}onStateChange(e){return this.consumers.push(e),()=>{this.consumers=this.consumers.filter(t=>t!==e)}}connectEmbeddedWallet(e){const t=t=>{bo(e),this.connector.connect({jsBridgeKey:e.jsBridgeKey},t)},n=Su.connectRequestParameters;"loading"===(null==n?void 0:n.state)?this.setConnectRequestParametersCallback(t):t(null==n?void 0:n.value)}openSingleWalletModal(e){return v(this,null,function*(){return ai()&&li(),Jh.openSingleWalletModal(e),new Promise(e=>{const t=this.onStateChange(n=>{const{status:r}=n;"opened"===r&&(t(),e())})})})}}class nf{constructor(e){var t;this.eventPrefix="ton-connect-ui-",this.tonConnectSdkVersion=null,this.eventDispatcher=null!=(t=null==e?void 0:e.eventDispatcher)?t:new wt,this.tonConnectUiVersion=e.tonConnectUiVersion,this.init().catch()}get version(){return tt({ton_connect_sdk_lib:this.tonConnectSdkVersion,ton_connect_ui_lib:this.tonConnectUiVersion})}init(){return v(this,null,function*(){try{yield this.setRequestVersionHandler(),this.tonConnectSdkVersion=yield this.requestTonConnectSdkVersion()}catch(rf){}})}setRequestVersionHandler(){return v(this,null,function*(){yield this.eventDispatcher.addEventListener("ton-connect-ui-request-version",()=>v(this,null,function*(){yield this.eventDispatcher.dispatchEvent("ton-connect-ui-response-version",et(this.tonConnectUiVersion))}))})}requestTonConnectSdkVersion(){return v(this,null,function*(){return new Promise((e,t)=>v(this,null,function*(){try{yield this.eventDispatcher.addEventListener("ton-connect-response-version",t=>{e(t.detail.version)},{once:!0}),yield this.eventDispatcher.dispatchEvent("ton-connect-request-version",{type:"request-version"})}catch(rf){t(rf)}}))})}dispatchUserActionEvent(e){var t;try{null==(t=this.eventDispatcher)||t.dispatchEvent(`${this.eventPrefix}${e.type}`,e).catch()}catch(rf){}}trackConnectionStarted(...e){try{const t=rt(this.version,...e);this.dispatchUserActionEvent(t)}catch(rf){}}trackConnectionCompleted(...e){try{const t=ot(this.version,...e);this.dispatchUserActionEvent(t)}catch(rf){}}trackConnectionError(...e){try{const t=it(this.version,...e);this.dispatchUserActionEvent(t)}catch(rf){}}trackConnectionRestoringStarted(...e){try{const t=at(this.version,...e);this.dispatchUserActionEvent(t)}catch(rf){}}trackConnectionRestoringCompleted(...e){try{const t=st(this.version,...e);this.dispatchUserActionEvent(t)}catch(rf){}}trackConnectionRestoringError(...e){try{const t=lt(this.version,...e);this.dispatchUserActionEvent(t)}catch(rf){}}trackDisconnection(...e){try{const t=mt(this.version,...e);this.dispatchUserActionEvent(t)}catch(rf){}}trackTransactionSentForSignature(...e){try{const t=ut(this.version,...e);this.dispatchUserActionEvent(t)}catch(rf){}}trackTransactionSigned(...e){try{const t=dt(this.version,...e);this.dispatchUserActionEvent(t)}catch(rf){}}trackTransactionSigningFailed(...e){try{const t=ht(this.version,...e);this.dispatchUserActionEvent(t)}catch(rf){}}trackDataSentForSignature(...e){try{const t=ft(this.version,...e);this.dispatchUserActionEvent(t)}catch(rf){}}trackDataSigned(...e){try{const t=pt(this.version,...e);this.dispatchUserActionEvent(t)}catch(rf){}}trackDataSigningFailed(...e){try{const t=gt(this.version,...e);this.dispatchUserActionEvent(t)}catch(rf){}}}e.BadRequestError=re,e.BrowserEventDispatcher=wt,e.FetchWalletsError=ae,e.LocalstorageNotFoundError=ie,e.ParseHexError=le,e.THEME=vr,e.TonConnect=Wt,e.TonConnectError=z,e.TonConnectUI=class{constructor(e){if(this.walletInfoStorage=new ao,this.preferredWalletStorage=new so,this.walletInfo=null,this.systemThemeChangeUnsubscribe=null,this.connectionRestored=Promise.resolve(!1),e&&"connector"in e&&e.connector)this.connector=e.connector;else{if(!(e&&"manifestUrl"in e&&e.manifestUrl))throw new zr("You have to specify a `manifestUrl` or a `connector` in the options.");this.connector=new Wt({manifestUrl:e.manifestUrl,eventDispatcher:e.eventDispatcher,walletsRequiredFeatures:e.walletsRequiredFeatures})}this.tracker=new nf({eventDispatcher:null==e?void 0:e.eventDispatcher,tonConnectUiVersion:"2.3.0-beta.2"}),this.modal=new Xh({connector:this.connector,tracker:this.tracker,setConnectRequestParametersCallback:e=>{this.connectRequestParametersCallback=e}}),this.singleWalletModal=new tf({connector:this.connector,tracker:this.tracker,setConnectRequestParametersCallback:e=>{this.connectRequestParametersCallback=e}}),this.transactionModal=new ef({connector:this.connector}),this._walletsRequiredFeatures=e.walletsRequiredFeatures,this._walletsPreferredFeatures=e.walletsPreferredFeatures,this.walletsList=this.getWallets(),this.walletsList.then(e=>{return Xr((t=e.map(e=>e.imageUrl),[...new Set(t)]));var t});const t=this.normalizeWidgetRoot(null==e?void 0:e.widgetRootId);this.subscribeToWalletChange(),!1!==(null==e?void 0:e.restoreConnection)&&(this.connectionRestored=function(e){return v(this,null,function*(){return yield new Promise(e=>requestAnimationFrame(e)),e()})}(()=>v(this,null,function*(){return this.tracker.trackConnectionRestoringStarted(),yield this.connector.restoreConnection(),this.connector.connected?this.tracker.trackConnectionRestoringCompleted(this.wallet):(this.tracker.trackConnectionRestoringError("Connection was not restored"),this.walletInfoStorage.removeWalletInfo()),this.connector.connected}))),this.uiOptions=Zo(e,{uiPreferences:{theme:"SYSTEM"}});const n=this.preferredWalletStorage.getPreferredWalletAppName();ku({connector:this.connector,preferredWalletAppName:n}),Jh.renderApp(t,this)}static getWallets(){return Wt.getWallets()}get walletsRequiredFeatures(){return this._walletsRequiredFeatures}get walletsPreferredFeatures(){return this._walletsPreferredFeatures}get connected(){return this.connector.connected}get account(){return this.connector.account}get wallet(){return this.connector.wallet?m(m({},this.connector.wallet),this.walletInfo):null}set uiOptions(e){var t,n,r,o,i,a,s;this.checkButtonRootExist(e.buttonRootId),this.actionsConfiguration=e.actionsConfiguration,"walletsRequiredFeatures"in e&&(this._walletsRequiredFeatures=e.walletsRequiredFeatures),"walletsPreferredFeatures"in e&&(this._walletsPreferredFeatures=e.walletsPreferredFeatures),(null==(t=e.uiPreferences)?void 0:t.theme)?"SYSTEM"!==(null==(n=e.uiPreferences)?void 0:n.theme)?(null==(r=this.systemThemeChangeUnsubscribe)||r.call(this),Xo(e.uiPreferences.theme,e.uiPreferences.colorsSet)):(Xo(window.matchMedia&&window.matchMedia("(prefers-color-scheme: light)").matches?vr.LIGHT:vr.DARK,e.uiPreferences.colorsSet),this.systemThemeChangeUnsubscribe||(this.systemThemeChangeUnsubscribe=function(e){const t=t=>e(t.matches?vr.DARK:vr.LIGHT);return window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",t),()=>window.matchMedia("(prefers-color-scheme: dark)").removeEventListener("change",t)}(Xo))):(null==(o=e.uiPreferences)?void 0:o.colorsSet)&&(a=e.uiPreferences.colorsSet,Jo[vr.DARK]=Zo(a[vr.DARK],Jo[vr.DARK]),Jo[vr.LIGHT]=Zo(a[vr.LIGHT],Jo[vr.LIGHT]),Yo(e=>({colors:Zo(Jo[e.theme],Qo[e.theme])}))),(null==(i=e.uiPreferences)?void 0:i.borderRadius)&&(s=e.uiPreferences.borderRadius,Yo({borderRadius:s})),ku(t=>{var n,r;const o=Zo(m(m(m(m({},e.language&&{language:e.language}),!!(null==(n=e.actionsConfiguration)?void 0:n.returnStrategy)&&{returnStrategy:e.actionsConfiguration.returnStrategy}),!!(null==(r=e.actionsConfiguration)?void 0:r.twaReturnUrl)&&{twaReturnUrl:e.actionsConfiguration.twaReturnUrl}),!!e.walletsListConfiguration&&{walletsListConfiguration:e.walletsListConfiguration}),No(t));return void 0!==e.buttonRootId&&(o.buttonRootId=e.buttonRootId),void 0!==e.enableAndroidBackHandler&&(o.enableAndroidBackHandler=e.enableAndroidBackHandler),o})}setConnectRequestParameters(e){var t;ku({connectRequestParameters:e}),"ready"!==(null==e?void 0:e.state)&&e||null==(t=this.connectRequestParametersCallback)||t.call(this,null==e?void 0:e.value)}getWallets(){return v(this,null,function*(){return this.connector.getWallets()})}onStatusChange(e,t){return this.connector.onStatusChange(t=>v(this,null,function*(){if(t){const n=yield this.getSelectedWalletInfo(t);e(m(m({},t),n||this.walletInfoStorage.getWalletInfo()))}else e(t)}),t)}openModal(){return v(this,null,function*(){return this.modal.open()})}closeModal(e){this.modal.close(e)}onModalStateChange(e){return this.modal.onStateChange(e)}get modalState(){return this.modal.state}openSingleWalletModal(e){return v(this,null,function*(){return this.singleWalletModal.open(e)})}closeSingleWalletModal(e){this.singleWalletModal.close(e)}onSingleWalletModalStateChange(e){return this.singleWalletModal.onStateChange(e)}get singleWalletModalState(){return this.singleWalletModal.state}connectWallet(){return v(this,null,function*(){const e=(yield this.getWallets()).find(je);return e?yield this.connectEmbeddedWallet(e):yield this.connectExternalWallet()})}disconnect(){return this.tracker.trackDisconnection(this.wallet,"dapp"),Jh.clearAction(),Jh.removeSelectedWalletInfo(),this.walletInfoStorage.removeWalletInfo(),this.connector.disconnect()}sendTransaction(e,t){return v(this,null,function*(){if(this.tracker.trackTransactionSentForSignature(this.wallet,e),!this.connected)throw this.tracker.trackTransactionSigningFailed(this.wallet,e,"Wallet was not connected"),new zr("Connect wallet to send a transaction.");ai()&&li();const{notifications:n,modals:r,returnStrategy:o,twaReturnUrl:i}=this.getModalsAndNotificationsConfiguration(t);Jh.setAction({name:"confirm-transaction",showNotification:n.includes("before"),openModal:r.includes("before"),sent:!1});const a=new AbortController,s=()=>{var e;if(a.signal.aborted)return;Jh.setAction({name:"confirm-transaction",showNotification:n.includes("before"),openModal:r.includes("before"),sent:!0}),this.redirectAfterRequestSent({returnStrategy:o,twaReturnUrl:i});let s=!0;null==(e=null==t?void 0:t.onRequestSent)||e.call(t,()=>{if(a.signal.aborted)return;const e=!s;s=!1,this.redirectAfterRequestSent({returnStrategy:o,twaReturnUrl:i,forceRedirect:e})})},l=this.onTransactionModalStateChange(e=>{(null==e?void 0:e.openModal)||(l(),e||a.abort())});try{const t=yield this.waitForSendTransaction({transaction:e,signal:a.signal},s);return this.tracker.trackTransactionSigned(this.wallet,e,t),Jh.setAction({name:"transaction-sent",showNotification:n.includes("success"),openModal:r.includes("success")}),t}catch(rf){if(rf instanceof ee)throw Jh.clearAction(),Jh.openWalletNotSupportFeatureModal(rf.cause),rf;throw Jh.setAction({name:"transaction-canceled",showNotification:n.includes("error"),openModal:r.includes("error")}),rf instanceof z?rf:(console.error(rf),new zr("Unhandled error:"+rf))}finally{l()}})}signData(e,t){return v(this,null,function*(){if(this.tracker.trackDataSentForSignature(this.wallet,e),!this.connected)throw this.tracker.trackDataSigningFailed(this.wallet,e,"Wallet was not connected"),new zr("Connect wallet to send a transaction.");ai()&&li();const{notifications:n,modals:r,returnStrategy:o,twaReturnUrl:i}=this.getModalsAndNotificationsConfiguration();Jh.setAction({name:"confirm-sign-data",showNotification:n.includes("before"),openModal:r.includes("before"),signed:!1});const a=new AbortController,s=()=>{var e;if(a.signal.aborted)return;Jh.setAction({name:"confirm-sign-data",showNotification:n.includes("before"),openModal:r.includes("before"),signed:!0}),this.redirectAfterRequestSent({returnStrategy:o,twaReturnUrl:i});let s=!0;null==(e=null==t?void 0:t.onRequestSent)||e.call(t,()=>{if(a.signal.aborted)return;const e=!s;s=!1,this.redirectAfterRequestSent({returnStrategy:o,twaReturnUrl:i,forceRedirect:e})})},l=this.onTransactionModalStateChange(e=>{(null==e?void 0:e.openModal)||(l(),e||a.abort())});try{const t=yield this.waitForSignData({data:e,signal:(new AbortController).signal},s);return this.tracker.trackDataSigned(this.wallet,e,t),Jh.setAction({name:"data-signed",showNotification:n.includes("success"),openModal:r.includes("success")}),t}catch(rf){if(rf instanceof ee)throw Jh.clearAction(),Jh.openWalletNotSupportFeatureModal(rf.cause),rf;throw Jh.setAction({name:"sign-data-canceled",showNotification:n.includes("error"),openModal:r.includes("error")}),rf instanceof z?rf:(console.error(rf),new zr("Unhandled error:"+rf))}finally{l()}})}redirectAfterRequestSent({returnStrategy:e,twaReturnUrl:t,forceRedirect:n}){this.walletInfo&&"universalLink"in this.walletInfo&&("universal-link"===this.walletInfo.openMethod||"custom-deeplink"===this.walletInfo.openMethod)&&(ve(this.walletInfo.universalLink)?ld(this.walletInfo.universalLink,{returnStrategy:e,twaReturnUrl:t||Su.twaReturnUrl,forceRedirect:n||!1}):cd(this.walletInfo.universalLink,this.walletInfo.deepLink,{returnStrategy:e,forceRedirect:n||!1},()=>{}))}connectEmbeddedWallet(e){return v(this,null,function*(){const t=t=>{bo(e),this.connector.connect({jsBridgeKey:e.jsBridgeKey},t)},n=Su.connectRequestParameters;return"loading"===(null==n?void 0:n.state)?this.connectRequestParametersCallback=t:t(null==n?void 0:n.value),yield this.waitForWalletConnection({ignoreErrors:!1})})}connectExternalWallet(){return v(this,null,function*(){const e=new AbortController;Jh.openWalletsModal();const t=this.onModalStateChange(n=>{const{status:r,closeReason:o}=n;"opened"!==r&&(t(),"action-cancelled"===o&&e.abort())});return yield this.waitForWalletConnection({ignoreErrors:!0,signal:e.signal})})}waitForWalletConnection(e){return v(this,null,function*(){return new Promise((t,n)=>{this.tracker.trackConnectionStarted();const{ignoreErrors:r=!1,signal:o=null}=e;if(o&&o.aborted)return this.tracker.trackConnectionError("Connection was cancelled"),n(new zr("Wallet was not connected"));const i=e=>v(this,null,function*(){if(e)this.tracker.trackConnectionCompleted(e),s(),t(e);else{if(this.tracker.trackConnectionError("Connection was cancelled"),r)return;s(),n(new zr("Wallet was not connected"))}}),a=e=>{this.tracker.trackConnectionError(e.message),r||(s(),n(e))},s=this.onStatusChange(e=>i(e),e=>a(e));o&&o.addEventListener("abort",()=>{s(),n(new zr("Wallet was not connected"))},{once:!0})})})}waitForSendTransaction(e,t){return v(this,null,function*(){return new Promise((n,r)=>{const{transaction:o,signal:i}=e;if(i.aborted)return this.tracker.trackTransactionSigningFailed(this.wallet,o,"Transaction was cancelled"),r(new zr("Transaction was not sent"));const a=e=>v(this,null,function*(){n(e)}),s=()=>{this.tracker.trackTransactionSigningFailed(this.wallet,o,"Transaction was cancelled"),r(new zr("Transaction was not sent"))};i.addEventListener("abort",s,{once:!0}),this.connector.sendTransaction(o,{onRequestSent:t,signal:i}).then(e=>(i.removeEventListener("abort",s),a(e))).catch(e=>(i.removeEventListener("abort",s),(e=>{r(e)})(e)))})})}waitForSignData(e,t){return v(this,null,function*(){return new Promise((n,r)=>{const{data:o,signal:i}=e;if(i.aborted)return this.tracker.trackDataSigningFailed(this.wallet,o,"SignData was cancelled"),r(new zr("SignData was not sent"));const a=e=>v(this,null,function*(){n(e)});i.addEventListener("abort",()=>{this.tracker.trackDataSigningFailed(this.wallet,o,"SignData was cancelled"),r(new zr("SignData was not sent"))},{once:!0}),this.connector.signData(o,{onRequestSent:t,signal:i}).then(e=>a(e)).catch(e=>(e=>{r(e)})(e))})})}onTransactionModalStateChange(e){return this.transactionModal.onStateChange(e)}subscribeToWalletChange(){this.connector.onStatusChange(e=>v(this,null,function*(){var t;e?(yield this.updateWalletInfo(e),this.setPreferredWalletAppName((null==(t=this.walletInfo)?void 0:t.appName)||e.device.appName)):this.walletInfoStorage.removeWalletInfo()}))}setPreferredWalletAppName(e){this.preferredWalletStorage.setPreferredWalletAppName(e),ku({preferredWalletAppName:e})}getSelectedWalletInfo(e){return v(this,null,function*(){let t,n=Jh.getSelectedWalletInfo();if(!n)return null;if("name"in n)t=n;else{const r=Eu(yield this.walletsList,Su.walletsListConfiguration).find(t=>_u(t,e.device.appName));if(!r)throw new zr(`Cannot find WalletInfo for the '${e.device.appName}' wallet`);t=m(m({},r),n)}return t})}updateWalletInfo(e){return v(this,null,function*(){const t=yield this.getSelectedWalletInfo(e);if(t)return this.walletInfo=t,void this.walletInfoStorage.setWalletInfo(t);const n=this.walletInfoStorage.getWalletInfo();this.walletInfo=n||((yield this.walletsList).find(t=>_u(t,e.device.appName))||null)})}normalizeWidgetRoot(e){if(!e||!document.getElementById(e)){e="tc-widget-root";const t=document.createElement("div");t.id=e,document.body.appendChild(t)}return e}checkButtonRootExist(e){if(null!=e&&!document.getElementById(e))throw new zr(`${e} element not found in the document.`)}getModalsAndNotificationsConfiguration(e){var t,n,r,o,i,a;const s=["before","success","error"];let l=s;(null==(t=this.actionsConfiguration)?void 0:t.notifications)&&"all"!==(null==(n=this.actionsConfiguration)?void 0:n.notifications)&&(l=this.actionsConfiguration.notifications),(null==e?void 0:e.notifications)&&(l="all"===e.notifications?s:e.notifications);let c=["before"];(null==(r=this.actionsConfiguration)?void 0:r.modals)&&(c="all"===this.actionsConfiguration.modals?s:this.actionsConfiguration.modals),(null==e?void 0:e.modals)&&(c="all"===e.modals?s:e.modals);const u=(null==e?void 0:e.returnStrategy)||(null==(o=this.actionsConfiguration)?void 0:o.returnStrategy)||"back",d=(null==e?void 0:e.twaReturnUrl)||(null==(i=this.actionsConfiguration)?void 0:i.twaReturnUrl);let h=(null==e?void 0:e.skipRedirectToWallet)||(null==(a=this.actionsConfiguration)?void 0:a.skipRedirectToWallet)||"ios";return ai()&&(h="never"),{notifications:l,modals:c,returnStrategy:u,twaReturnUrl:d,skipRedirectToWallet:h}}},e.TonConnectUIError=zr,e.UnknownAppError=oe,e.UnknownError=ce,e.UserRejectsError=ne,e.WalletAlreadyConnectedError=Q,e.WalletMissingRequiredFeaturesError=te,e.WalletNotConnectedError=J,e.WalletNotInjectedError=X,e.WalletNotSupportFeatureError=ee,e.WalletsListManager=Ge,e.WrongAddressError=se,e.checkRequiredWalletFeatures=Qe,e.createConnectionCompletedEvent=ot,e.createConnectionErrorEvent=it,e.createConnectionRestoringCompletedEvent=st,e.createConnectionRestoringErrorEvent=lt,e.createConnectionRestoringStartedEvent=at,e.createConnectionStartedEvent=rt,e.createDataSentForSignatureEvent=ft,e.createDataSignedEvent=pt,e.createDataSigningFailedEvent=gt,e.createDisconnectionEvent=mt,e.createRequestVersionEvent=Xe,e.createResponseVersionEvent=et,e.createTransactionSentForSignatureEvent=ut,e.createTransactionSignedEvent=dt,e.createTransactionSigningFailedEvent=ht,e.createVersionInfo=tt,e.enableQaMode=function(){Ke=!0,console.warn("🚨 QA Mode enabled - validation is disabled. This is unsafe for production!"),ze(),function(){if("undefined"==typeof window||He)return;He=new MutationObserver(e=>{e.forEach(e=>{"childList"===e.type&&e.removedNodes.forEach(e=>{if(e.nodeType===Node.ELEMENT_NODE){const t=e;"ton-connect-qa-banner"===t.id&&Ke?(console.warn("QA Mode banner was removed, restoring..."),setTimeout(()=>ze(),100)):"ton-connect-qa-mode-styles"===t.id&&Ke&&(console.warn("QA Mode styles were removed, restoring..."),setTimeout(()=>Ze(),100))}})})}),He.observe(document.body,{childList:!0,subtree:!1}),He.observe(document.head,{childList:!0,subtree:!1})}(),Ze()},e.encodeTelegramUrlParameters=be,e.isQaModeEnabled=Fe,e.isTelegramUrl=ve,e.isWalletInfoCurrentlyEmbedded=je,e.isWalletInfoCurrentlyInjected=De,e.isWalletInfoInjectable=Be,e.isWalletInfoInjected=function(e){return"jsBridgeKey"in e},e.isWalletInfoRemote=$e,e.toUserFriendlyAddress=vt,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})});
1190
+ `,Gh=e=>{const t=Ei(e),n=Cn(ml),[r,o]=nn(!0),[i,a]=nn(!1),[s,l]=nn(!1),[c,u]=nn(!1);let d,h;an(()=>{const e=Ro();a(!!e&&("sent"in e&&e.sent||"transaction-sent"===e.name)),l(!!e&&("signed"in e&&e.signed||"data-signed"===e.name)),u(!!e&&("transaction-canceled"===e.name||"sign-data-canceled"===e.name))}),(null==n?void 0:n.wallet)&&"universalLink"in n.wallet&&("universal-link"===n.wallet.openMethod||ve(n.wallet.universalLink)&&ui())&&(d=n.wallet.universalLink),(null==n?void 0:n.wallet)&&"deepLink"in n.wallet&&("custom-deeplink"===n.wallet.openMethod||ve(n.wallet.deepLink)&&ui())&&(h=n.wallet.deepLink);const f=()=>{const e=Ro(),t="returnStrategy"in e?e.returnStrategy:Tu.returnStrategy,n=!r();o(!1);const i=pd(d,e.sessionId);ve(d)?hd(i,{returnStrategy:t,twaReturnUrl:"twaReturnUrl"in e?e.twaReturnUrl:Tu.twaReturnUrl,forceRedirect:n}):fd(i,h,{returnStrategy:t,forceRedirect:n},()=>{})};return Bn(Kh,Fn(t,{get children(){return[ir(()=>e.icon),Bn(Hh,{get translationKey(){return e.headerTranslationKey},get translationValues(){return e.headerTranslationValues}}),Bn(Fh,{get translationKey(){return e.textTranslationKey},get translationValues(){return e.textTranslationValues}}),Bn(Gn,{get when(){return!i()&&!s()&&!c()&&("open-wallet"===e.showButton&&d||"open-wallet"!==e.showButton)},get children(){return Bn(Vh,{disabled:!0,"data-tc-connect-button-loading":"true",get children(){return Bn(zh,{})}})}}),Bn(Gn,{get when(){return i()||s()},get children(){return[Bn(Gn,{get when(){return"open-wallet"!==e.showButton},get children(){return Bn(Zh,{onClick:()=>e.onClose(),get children(){return Bn(ud,{translationKey:"common.close",children:"Close"})}})}}),Bn(Gn,{get when(){return"open-wallet"===e.showButton&&d},get children(){return Bn(Zh,{onClick:f,get children(){return Bn(ud,{translationKey:"common.openWallet",children:"Open wallet"})}})}})]}})]}}))},Yh=e=>{const t=Cn(ml),[n]=$a();return Bn(Gh,{headerTranslationKey:"actionModal.confirmTransaction.header",get headerTranslationValues(){return{name:t.wallet&&"name"in t.wallet?t.wallet.name:n("common.yourWallet",{},"Your wallet")}},textTranslationKey:"actionModal.confirmTransaction.text",get icon(){return Bn(xs,{size:"m"})},onClose:()=>e.onClose(),showButton:"open-wallet","data-tc-confirm-modal":"true"})},Qh=e=>Bn(Gh,{headerTranslationKey:"actionModal.transactionCanceled.header",textTranslationKey:"actionModal.transactionCanceled.text",get icon(){return Bn(ys,{size:"m"})},onClose:()=>e.onClose(),"data-tc-transaction-canceled-modal":"true"}),Jh=e=>Bn(Gh,{headerTranslationKey:"actionModal.transactionSent.header",textTranslationKey:"actionModal.transactionSent.text",get icon(){return Bn(ps,{size:"m"})},showButton:"open-wallet",onClose:()=>e.onClose(),"data-tc-transaction-sent-modal":"true"}),Xh=e=>{const t=Cn(ml),[n]=$a();return Bn(Gh,{headerTranslationKey:"actionModal.signData.header",get headerTranslationValues(){return{name:t.wallet&&"name"in t.wallet?t.wallet.name:n("common.yourWallet",{},"Your wallet")}},textTranslationKey:"actionModal.signData.text",get icon(){return Bn(xs,{size:"m"})},onClose:()=>e.onClose(),showButton:"open-wallet","data-tc-sign-data-confirm-modal":"true"})},ef=e=>Bn(Gh,{headerTranslationKey:"actionModal.signDataCanceled.header",get icon(){return Bn(ys,{size:"m"})},onClose:()=>e.onClose(),"data-tc-sign-data-canceled-modal":"true"}),tf=e=>Bn(Gh,{headerTranslationKey:"actionModal.dataSigned.header",get icon(){return Bn(ps,{size:"m"})},onClose:()=>e.onClose(),"data-tc-data-signed-modal":"true"}),nf=()=>Bn(ma,{get opened(){var e;return ir(()=>null!==Ro())()&&!0===(null==(e=Ro())?void 0:e.openModal)},get enableAndroidBackHandler(){return Tu.enableAndroidBackHandler},onClose:()=>Eo(null),showFooter:!1,"data-tc-actions-modal-container":"true",get children(){return Bn(Yn,{get children(){return[Bn(Qn,{get when(){return"transaction-sent"===Ro().name},get children(){return Bn(Jh,{onClose:()=>Eo(null)})}}),Bn(Qn,{get when(){return"transaction-canceled"===Ro().name},get children(){return Bn(Qh,{onClose:()=>Eo(null)})}}),Bn(Qn,{get when(){return"confirm-transaction"===Ro().name},get children(){return Bn(Yh,{onClose:()=>Eo(null)})}}),Bn(Qn,{get when(){return"data-signed"===Ro().name},get children(){return Bn(tf,{onClose:()=>Eo(null)})}}),Bn(Qn,{get when(){return"sign-data-canceled"===Ro().name},get children(){return Bn(ef,{onClose:()=>Eo(null)})}}),Bn(Qn,{get when(){return"confirm-sign-data"===Ro().name},get children(){return Bn(Xh,{onClose:()=>Eo(null)})}})]}})}}),rf=()=>{const{locale:e}=$a()[1];an(()=>e(Tu.language)),an(()=>{vo()&&hl()});const t=Cn(_o),n=Cn(ml),[r,o]=nn(!1),i=()=>{var e;return"loading"===(null==(e=Tu.connectRequestParameters)?void 0:e.state)},a=sn(()=>{var e;if(!i())return null==(e=Tu.connectRequestParameters)?void 0:e.value}),s=e=>{n.closeSingleWalletModal(e)};return hn(t.onStatusChange(e=>{e&&s("wallet-selected")})),hn(()=>{o(!1)}),Bn(ku,{get opened(){return vo()},get enableAndroidBackHandler(){return Tu.enableAndroidBackHandler},onClose:()=>s("action-cancelled"),onClickQuestion:()=>o(e=>!e),showFooter:!0,"data-tc-wallets-modal-container":"true",get children(){return[Bn(Gn,{get when(){return r()},get children(){return Bn(Ad,{onBackClick:()=>o(!1)})}}),Bn(Gn,{get when(){return!r()},get children(){return[Bn(Gn,{get when(){return i()},get children(){return[Bn(Ru,{translationKey:"walletModal.loading",children:"Wallets list is loading"}),Bn(Eu,{get children(){return Bn(xs,{size:"m"})}})]}}),Bn(Gn,{get when(){return!i()},get children(){return Bn(xr,{get component(){return ul()?zd:yd},get wallet(){return bo()},get additionalRequest(){return a()},onBackClick:()=>{},backDisabled:!0})}})]}})]}})},of=e=>{const t=ja(Ao,Tu.language);return customElements.get("tc-root")||customElements.define(jr,class extends HTMLElement{}),document.body.hasAttribute("ontouchstart")||document.body.setAttribute("ontouchstart",""),Bn(Ba.Provider,{value:t,get children(){return Bn(ml.Provider,{get value(){return e.tonConnectUI},get children(){return Bn(_o.Provider,{get value(){return Tu.connector},get children(){return[Bn(qr,{}),Bn(Nr,{theme:Xo,get children(){return[Bn(Gn,{get when(){return Tu.buttonRootId},get children(){return Bn(Cr,{get mount(){return document.getElementById(Tu.buttonRootId)},get children(){return Bn(Su,{})}})}}),Bn(xr,{component:jr,get children(){return[Bn(qh,{}),Bn(rf,{}),Bn(nf,{})]}})]}})]}})}})}})},af={openWalletsModal:()=>{setTimeout(()=>go({status:"opened",closeReason:null}))},closeWalletsModal:e=>{setTimeout(()=>go({status:"closed",closeReason:e}))},openSingleWalletModal:e=>{setTimeout(()=>yo({status:"opened",closeReason:null,walletInfo:e}))},closeSingleWalletModal:e=>{setTimeout(()=>yo({status:"closed",closeReason:e}))},openWalletNotSupportFeatureModal:e=>{setTimeout(()=>go({status:"opened",closeReason:null,type:"wallet-not-support-feature",requiredFeature:e.requiredFeature}))},setAction:e=>{setTimeout(()=>Eo(e))},clearAction:()=>{setTimeout(()=>Eo(null))},getSelectedWalletInfo:()=>xo(),removeSelectedWalletInfo:()=>ko(null),renderApp:(e,t)=>function(e,t,n,r={}){let o;return tn(r=>{o=r,t===document?e():hr(t,e(),t.firstChild?null:void 0,n)},r.owner),()=>{o(),t.textContent=""}}(()=>Bn(of,{tonConnectUI:t}),document.getElementById(e))};class sf{constructor(e){this.consumers=[],this.state=po(),this.connector=e.connector,this.tracker=e.tracker,this.setConnectRequestParametersCallback=e.setConnectRequestParametersCallback,an(()=>{const e=po();this.state=e,this.consumers.forEach(t=>t(e))})}open(){return v(this,null,function*(){this.tracker.trackConnectionStarted();const e=(yield this.connector.getWallets()).find(je);return e?this.connectEmbeddedWallet(e):this.openWalletsModal()})}close(e="action-cancelled"){"action-cancelled"===e&&this.tracker.trackConnectionError("Connection was cancelled"),af.closeWalletsModal(e)}onStateChange(e){return this.consumers.push(e),()=>{this.consumers=this.consumers.filter(t=>t!==e)}}connectEmbeddedWallet(e){const t=t=>{ko(e),this.connector.connect({jsBridgeKey:e.jsBridgeKey},t)},n=Tu.connectRequestParameters;"loading"===(null==n?void 0:n.state)?this.setConnectRequestParametersCallback(t):t(null==n?void 0:n.value)}openWalletsModal(){return v(this,null,function*(){return ui()&&hi(),af.openWalletsModal(),new Promise(e=>{const t=this.onStateChange(n=>{const{status:r}=n;"opened"===r&&(t(),e())})})})}}class lf{constructor(e){this.consumers=[],this.connector=e.connector,an(()=>{const e=Ro();this.consumers.forEach(t=>t(e))})}onStateChange(e){return this.consumers.push(e),()=>{this.consumers=this.consumers.filter(t=>t!==e)}}}class cf{constructor(e){this.consumers=[],this.state=wo(),this.connector=e.connector,this.tracker=e.tracker,this.setConnectRequestParametersCallback=e.setConnectRequestParametersCallback,an(()=>{const e=wo();this.state=e,this.consumers.forEach(t=>t(e))})}open(e){return v(this,null,function*(){this.tracker.trackConnectionStarted();const t=_u(yield this.connector.getWallets(),Tu.walletsListConfiguration),n=t.find(je);if(!!n)return this.connectEmbeddedWallet(n);const r=t.filter($e).find(t=>Nu(t,e));if(!!r)return this.openSingleWalletModal(r);const o=`Trying to open modal window with unknown wallet "${e}".`;throw this.tracker.trackConnectionError(o),new Qr(o)})}close(e="action-cancelled"){"action-cancelled"===e&&this.tracker.trackConnectionError("Connection was cancelled"),af.closeSingleWalletModal("action-cancelled")}onStateChange(e){return this.consumers.push(e),()=>{this.consumers=this.consumers.filter(t=>t!==e)}}connectEmbeddedWallet(e){const t=t=>{ko(e),this.connector.connect({jsBridgeKey:e.jsBridgeKey},t)},n=Tu.connectRequestParameters;"loading"===(null==n?void 0:n.state)?this.setConnectRequestParametersCallback(t):t(null==n?void 0:n.value)}openSingleWalletModal(e){return v(this,null,function*(){return ui()&&hi(),af.openSingleWalletModal(e),new Promise(e=>{const t=this.onStateChange(n=>{const{status:r}=n;"opened"===r&&(t(),e())})})})}}class uf{constructor(e){var t;this.eventPrefix="ton-connect-ui-",this.tonConnectSdkVersion=null,this.eventDispatcher=null!=(t=null==e?void 0:e.eventDispatcher)?t:new mt,this.tonConnectUiVersion=e.tonConnectUiVersion,this.init().catch()}get version(){return et({ton_connect_sdk_lib:this.tonConnectSdkVersion,ton_connect_ui_lib:this.tonConnectUiVersion})}init(){return v(this,null,function*(){try{yield this.setRequestVersionHandler(),this.tonConnectSdkVersion=yield this.requestTonConnectSdkVersion()}catch(df){}})}setRequestVersionHandler(){return v(this,null,function*(){yield this.eventDispatcher.addEventListener("ton-connect-ui-request-version",()=>v(this,null,function*(){yield this.eventDispatcher.dispatchEvent("ton-connect-ui-response-version",Xe(this.tonConnectUiVersion))}))})}requestTonConnectSdkVersion(){return v(this,null,function*(){return new Promise((e,t)=>v(this,null,function*(){try{yield this.eventDispatcher.addEventListener("ton-connect-response-version",t=>{e(t.detail.version)},{once:!0}),yield this.eventDispatcher.dispatchEvent("ton-connect-request-version",{type:"request-version"})}catch(df){t(df)}}))})}dispatchUserActionEvent(e){var t;try{null==(t=this.eventDispatcher)||t.dispatchEvent(`${this.eventPrefix}${e.type}`,e).catch()}catch(df){}}trackConnectionStarted(...e){try{const t=nt(this.version,...e);this.dispatchUserActionEvent(t)}catch(df){}}trackConnectionCompleted(...e){try{const t=rt(this.version,...e);this.dispatchUserActionEvent(t)}catch(df){}}trackConnectionError(...e){try{const t=ot(this.version,...e);this.dispatchUserActionEvent(t)}catch(df){}}trackConnectionRestoringStarted(...e){try{const t=it(this.version,...e);this.dispatchUserActionEvent(t)}catch(df){}}trackConnectionRestoringCompleted(...e){try{const t=at(this.version,...e);this.dispatchUserActionEvent(t)}catch(df){}}trackConnectionRestoringError(...e){try{const t=st(this.version,...e);this.dispatchUserActionEvent(t)}catch(df){}}trackDisconnection(...e){try{const t=gt(this.version,...e);this.dispatchUserActionEvent(t)}catch(df){}}trackTransactionSentForSignature(...e){try{const t=ct(this.version,...e);this.dispatchUserActionEvent(t)}catch(df){}}trackTransactionSigned(...e){try{const t=ut(this.version,...e);this.dispatchUserActionEvent(t)}catch(df){}}trackTransactionSigningFailed(...e){try{const t=dt(this.version,...e);this.dispatchUserActionEvent(t)}catch(df){}}trackDataSentForSignature(...e){try{const t=ht(this.version,...e);this.dispatchUserActionEvent(t)}catch(df){}}trackDataSigned(...e){try{const t=ft(this.version,...e);this.dispatchUserActionEvent(t)}catch(df){}}trackDataSigningFailed(...e){try{const t=pt(this.version,...e);this.dispatchUserActionEvent(t)}catch(df){}}}e.BadRequestError=re,e.BrowserEventDispatcher=mt,e.FetchWalletsError=ae,e.LocalstorageNotFoundError=ie,e.ParseHexError=le,e.SessionCrypto=H,e.THEME=Sr,e.TonConnect=jt,e.TonConnectError=z,e.TonConnectUI=class{constructor(e){if(this.walletInfoStorage=new uo,this.preferredWalletStorage=new ho,this.walletInfo=null,this.systemThemeChangeUnsubscribe=null,this.connectionRestored=Promise.resolve(!1),e&&"connector"in e&&e.connector)this.connector=e.connector;else{if(!(e&&"manifestUrl"in e&&e.manifestUrl))throw new Qr("You have to specify a `manifestUrl` or a `connector` in the options.");this.connector=new jt({manifestUrl:e.manifestUrl,eventDispatcher:e.eventDispatcher,walletsRequiredFeatures:e.walletsRequiredFeatures})}this.tracker=new uf({eventDispatcher:null==e?void 0:e.eventDispatcher,tonConnectUiVersion:"2.3.0-beta.4"}),this.modal=new sf({connector:this.connector,tracker:this.tracker,setConnectRequestParametersCallback:e=>{this.connectRequestParametersCallback=e}}),this.singleWalletModal=new cf({connector:this.connector,tracker:this.tracker,setConnectRequestParametersCallback:e=>{this.connectRequestParametersCallback=e}}),this.transactionModal=new lf({connector:this.connector}),this._walletsRequiredFeatures=e.walletsRequiredFeatures,this._walletsPreferredFeatures=e.walletsPreferredFeatures,this.walletsList=this.getWallets(),this.walletsList.then(e=>{return ro((t=e.map(e=>e.imageUrl),[...new Set(t)]));var t});const t=this.normalizeWidgetRoot(null==e?void 0:e.widgetRootId);this.subscribeToWalletChange(),!1!==(null==e?void 0:e.restoreConnection)&&(this.connectionRestored=function(e){return v(this,null,function*(){return yield new Promise(e=>requestAnimationFrame(e)),e()})}(()=>v(this,null,function*(){return this.tracker.trackConnectionRestoringStarted(),yield this.connector.restoreConnection(),this.connector.connected?this.tracker.trackConnectionRestoringCompleted(this.wallet):(this.tracker.trackConnectionRestoringError("Connection was not restored"),this.walletInfoStorage.removeWalletInfo()),this.connector.connected}))),this.uiOptions=Jo(e,{uiPreferences:{theme:"SYSTEM"}});const n=this.preferredWalletStorage.getPreferredWalletAppName();Au({connector:this.connector,preferredWalletAppName:n}),af.renderApp(t,this)}static getWallets(){return jt.getWallets()}get walletsRequiredFeatures(){return this._walletsRequiredFeatures}get walletsPreferredFeatures(){return this._walletsPreferredFeatures}get connected(){return this.connector.connected}get account(){return this.connector.account}get wallet(){return this.connector.wallet?m(m({},this.connector.wallet),this.walletInfo):null}set uiOptions(e){var t,n,r,o,i,a,s;this.checkButtonRootExist(e.buttonRootId),this.actionsConfiguration=e.actionsConfiguration,"walletsRequiredFeatures"in e&&(this._walletsRequiredFeatures=e.walletsRequiredFeatures),"walletsPreferredFeatures"in e&&(this._walletsPreferredFeatures=e.walletsPreferredFeatures),(null==(t=e.uiPreferences)?void 0:t.theme)?"SYSTEM"!==(null==(n=e.uiPreferences)?void 0:n.theme)?(null==(r=this.systemThemeChangeUnsubscribe)||r.call(this),ri(e.uiPreferences.theme,e.uiPreferences.colorsSet)):(ri(window.matchMedia&&window.matchMedia("(prefers-color-scheme: light)").matches?Sr.LIGHT:Sr.DARK,e.uiPreferences.colorsSet),this.systemThemeChangeUnsubscribe||(this.systemThemeChangeUnsubscribe=function(e){const t=t=>e(t.matches?Sr.DARK:Sr.LIGHT);return window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",t),()=>window.matchMedia("(prefers-color-scheme: dark)").removeEventListener("change",t)}(ri))):(null==(o=e.uiPreferences)?void 0:o.colorsSet)&&(a=e.uiPreferences.colorsSet,ni[Sr.DARK]=Jo(a[Sr.DARK],ni[Sr.DARK]),ni[Sr.LIGHT]=Jo(a[Sr.LIGHT],ni[Sr.LIGHT]),ei(e=>({colors:Jo(ni[e.theme],ti[e.theme])}))),(null==(i=e.uiPreferences)?void 0:i.borderRadius)&&(s=e.uiPreferences.borderRadius,ei({borderRadius:s})),Au(t=>{var n,r;const o=Jo(m(m(m(m({},e.language&&{language:e.language}),!!(null==(n=e.actionsConfiguration)?void 0:n.returnStrategy)&&{returnStrategy:e.actionsConfiguration.returnStrategy}),!!(null==(r=e.actionsConfiguration)?void 0:r.twaReturnUrl)&&{twaReturnUrl:e.actionsConfiguration.twaReturnUrl}),!!e.walletsListConfiguration&&{walletsListConfiguration:e.walletsListConfiguration}),Uo(t));return void 0!==e.buttonRootId&&(o.buttonRootId=e.buttonRootId),void 0!==e.enableAndroidBackHandler&&(o.enableAndroidBackHandler=e.enableAndroidBackHandler),o})}setConnectRequestParameters(e){var t;Au({connectRequestParameters:e}),"ready"!==(null==e?void 0:e.state)&&e||null==(t=this.connectRequestParametersCallback)||t.call(this,null==e?void 0:e.value)}getWallets(){return v(this,null,function*(){return this.connector.getWallets()})}onStatusChange(e,t){return this.connector.onStatusChange(t=>v(this,null,function*(){if(t){const n=yield this.getSelectedWalletInfo(t);e(m(m({},t),n||this.walletInfoStorage.getWalletInfo()))}else e(t)}),t)}openModal(){return v(this,null,function*(){return this.modal.open()})}closeModal(e){this.modal.close(e)}onModalStateChange(e){return this.modal.onStateChange(e)}get modalState(){return this.modal.state}openSingleWalletModal(e){return v(this,null,function*(){return this.singleWalletModal.open(e)})}closeSingleWalletModal(e){this.singleWalletModal.close(e)}onSingleWalletModalStateChange(e){return this.singleWalletModal.onStateChange(e)}get singleWalletModalState(){return this.singleWalletModal.state}connectWallet(){return v(this,null,function*(){const e=(yield this.getWallets()).find(je);return e?yield this.connectEmbeddedWallet(e):yield this.connectExternalWallet()})}disconnect(){return this.tracker.trackDisconnection(this.wallet,"dapp"),af.clearAction(),af.removeSelectedWalletInfo(),this.walletInfoStorage.removeWalletInfo(),this.connector.disconnect()}sendTransaction(e,t){return v(this,null,function*(){if(this.tracker.trackTransactionSentForSignature(this.wallet,e),!this.connected)throw this.tracker.trackTransactionSigningFailed(this.wallet,e,"Wallet was not connected"),new Qr("Connect wallet to send a transaction.");ui()&&hi();const{notifications:n,modals:r,returnStrategy:o,twaReturnUrl:i}=this.getModalsAndNotificationsConfiguration(t),a=yield this.getSessionId();af.setAction({name:"confirm-transaction",showNotification:n.includes("before"),openModal:r.includes("before"),sent:!1,sessionId:a||void 0});const s=new AbortController,l=()=>{var e;if(s.signal.aborted)return;af.setAction({name:"confirm-transaction",showNotification:n.includes("before"),openModal:r.includes("before"),sent:!0,sessionId:a||void 0}),this.redirectAfterRequestSent({returnStrategy:o,twaReturnUrl:i,sessionId:a||void 0});let l=!0;null==(e=null==t?void 0:t.onRequestSent)||e.call(t,()=>v(this,null,function*(){if(s.signal.aborted)return;const e=!l;l=!1,yield this.redirectAfterRequestSent({returnStrategy:o,twaReturnUrl:i,forceRedirect:e,sessionId:a||void 0})}))},c=this.onTransactionModalStateChange(e=>{(null==e?void 0:e.openModal)||(c(),e||s.abort())});try{const t=yield this.waitForSendTransaction({transaction:e,signal:s.signal},l);return this.tracker.trackTransactionSigned(this.wallet,e,t),af.setAction({name:"transaction-sent",showNotification:n.includes("success"),openModal:r.includes("success")}),t}catch(df){if(df instanceof ee)throw af.clearAction(),af.openWalletNotSupportFeatureModal(df.cause),df;throw af.setAction({name:"transaction-canceled",showNotification:n.includes("error"),openModal:r.includes("error")}),df instanceof z?df:(console.error(df),new Qr("Unhandled error:"+df))}finally{c()}})}signData(e,t){return v(this,null,function*(){if(this.tracker.trackDataSentForSignature(this.wallet,e),!this.connected)throw this.tracker.trackDataSigningFailed(this.wallet,e,"Wallet was not connected"),new Qr("Connect wallet to send a transaction.");ui()&&hi();const{notifications:n,modals:r,returnStrategy:o,twaReturnUrl:i}=this.getModalsAndNotificationsConfiguration(),a=yield this.getSessionId();af.setAction({name:"confirm-sign-data",showNotification:n.includes("before"),openModal:r.includes("before"),signed:!1,sessionId:a||void 0});const s=new AbortController,l=()=>{var e;if(s.signal.aborted)return;af.setAction({name:"confirm-sign-data",showNotification:n.includes("before"),openModal:r.includes("before"),signed:!0,sessionId:a||void 0}),this.redirectAfterRequestSent({returnStrategy:o,twaReturnUrl:i,sessionId:a||void 0});let l=!0;null==(e=null==t?void 0:t.onRequestSent)||e.call(t,()=>{if(s.signal.aborted)return;const e=!l;l=!1,this.redirectAfterRequestSent({returnStrategy:o,twaReturnUrl:i,forceRedirect:e,sessionId:a||void 0})})},c=this.onTransactionModalStateChange(e=>{(null==e?void 0:e.openModal)||(c(),e||s.abort())});try{const t=yield this.waitForSignData({data:e,signal:(new AbortController).signal},l);return this.tracker.trackDataSigned(this.wallet,e,t),af.setAction({name:"data-signed",showNotification:n.includes("success"),openModal:r.includes("success")}),t}catch(df){if(df instanceof ee)throw af.clearAction(),af.openWalletNotSupportFeatureModal(df.cause),df;throw af.setAction({name:"sign-data-canceled",showNotification:n.includes("error"),openModal:r.includes("error")}),df instanceof z?df:(console.error(df),new Qr("Unhandled error:"+df))}finally{c()}})}getSessionId(){return v(this,null,function*(){var e,t;if(!this.connected)return null;try{const n=null==(e=this.connector.dappSettings)?void 0:e.storage;if(n){const e=yield n.getItem("ton-connect-storage_bridge-connection");if(e){const n=JSON.parse(e);if("http"===n.type&&n.sessionCrypto){const e=new H(n.sessionCrypto);return e.sessionId}if("http"===n.type&&(null==(t=n.session)?void 0:t.sessionKeyPair)){const e=new H(n.session.sessionKeyPair);return e.sessionId}}}}catch(df){}return null})}redirectAfterRequestSent({returnStrategy:e,twaReturnUrl:t,forceRedirect:n,sessionId:r}){if(this.walletInfo&&"universalLink"in this.walletInfo&&("universal-link"===this.walletInfo.openMethod||"custom-deeplink"===this.walletInfo.openMethod)){const o=pd(this.walletInfo.universalLink,r);ve(this.walletInfo.universalLink)?hd(o,{returnStrategy:e,twaReturnUrl:t||Tu.twaReturnUrl,forceRedirect:n||!1}):fd(o,this.walletInfo.deepLink,{returnStrategy:e,forceRedirect:n||!1},()=>{})}}connectEmbeddedWallet(e){return v(this,null,function*(){const t=t=>{ko(e),this.connector.connect({jsBridgeKey:e.jsBridgeKey},t)},n=Tu.connectRequestParameters;return"loading"===(null==n?void 0:n.state)?this.connectRequestParametersCallback=t:t(null==n?void 0:n.value),yield this.waitForWalletConnection({ignoreErrors:!1})})}connectExternalWallet(){return v(this,null,function*(){const e=new AbortController;af.openWalletsModal();const t=this.onModalStateChange(n=>{const{status:r,closeReason:o}=n;"opened"!==r&&(t(),"action-cancelled"===o&&e.abort())});return yield this.waitForWalletConnection({ignoreErrors:!0,signal:e.signal})})}waitForWalletConnection(e){return v(this,null,function*(){return new Promise((t,n)=>{this.tracker.trackConnectionStarted();const{ignoreErrors:r=!1,signal:o=null}=e;if(o&&o.aborted)return this.tracker.trackConnectionError("Connection was cancelled"),n(new Qr("Wallet was not connected"));const i=e=>v(this,null,function*(){if(e)this.tracker.trackConnectionCompleted(e),s(),t(e);else{if(this.tracker.trackConnectionError("Connection was cancelled"),r)return;s(),n(new Qr("Wallet was not connected"))}}),a=e=>{this.tracker.trackConnectionError(e.message),r||(s(),n(e))},s=this.onStatusChange(e=>i(e),e=>a(e));o&&o.addEventListener("abort",()=>{s(),n(new Qr("Wallet was not connected"))},{once:!0})})})}waitForSendTransaction(e,t){return v(this,null,function*(){return new Promise((n,r)=>{const{transaction:o,signal:i}=e;if(i.aborted)return this.tracker.trackTransactionSigningFailed(this.wallet,o,"Transaction was cancelled"),r(new Qr("Transaction was not sent"));const a=e=>v(this,null,function*(){n(e)}),s=()=>{this.tracker.trackTransactionSigningFailed(this.wallet,o,"Transaction was cancelled"),r(new Qr("Transaction was not sent"))};i.addEventListener("abort",s,{once:!0}),this.connector.sendTransaction(o,{onRequestSent:t,signal:i}).then(e=>(i.removeEventListener("abort",s),a(e))).catch(e=>(i.removeEventListener("abort",s),(e=>{r(e)})(e)))})})}waitForSignData(e,t){return v(this,null,function*(){return new Promise((n,r)=>{const{data:o,signal:i}=e;if(i.aborted)return this.tracker.trackDataSigningFailed(this.wallet,o,"SignData was cancelled"),r(new Qr("SignData was not sent"));const a=e=>v(this,null,function*(){n(e)});i.addEventListener("abort",()=>{this.tracker.trackDataSigningFailed(this.wallet,o,"SignData was cancelled"),r(new Qr("SignData was not sent"))},{once:!0}),this.connector.signData(o,{onRequestSent:t,signal:i}).then(e=>a(e)).catch(e=>(e=>{r(e)})(e))})})}onTransactionModalStateChange(e){return this.transactionModal.onStateChange(e)}subscribeToWalletChange(){this.connector.onStatusChange(e=>v(this,null,function*(){var t;e?(yield this.updateWalletInfo(e),this.setPreferredWalletAppName((null==(t=this.walletInfo)?void 0:t.appName)||e.device.appName)):this.walletInfoStorage.removeWalletInfo()}))}setPreferredWalletAppName(e){this.preferredWalletStorage.setPreferredWalletAppName(e),Au({preferredWalletAppName:e})}getSelectedWalletInfo(e){return v(this,null,function*(){let t,n=af.getSelectedWalletInfo();if(!n)return null;if("name"in n)t=n;else{const r=_u(yield this.walletsList,Tu.walletsListConfiguration).find(t=>Nu(t,e.device.appName));if(!r)throw new Qr(`Cannot find WalletInfo for the '${e.device.appName}' wallet`);t=m(m({},r),n)}return t})}updateWalletInfo(e){return v(this,null,function*(){const t=yield this.getSelectedWalletInfo(e);if(t)return this.walletInfo=t,void this.walletInfoStorage.setWalletInfo(t);const n=this.walletInfoStorage.getWalletInfo();this.walletInfo=n||((yield this.walletsList).find(t=>Nu(t,e.device.appName))||null)})}normalizeWidgetRoot(e){if(!e||!document.getElementById(e)){e="tc-widget-root";const t=document.createElement("div");t.id=e,document.body.appendChild(t)}return e}checkButtonRootExist(e){if(null!=e&&!document.getElementById(e))throw new Qr(`${e} element not found in the document.`)}getModalsAndNotificationsConfiguration(e){var t,n,r,o,i,a;const s=["before","success","error"];let l=s;(null==(t=this.actionsConfiguration)?void 0:t.notifications)&&"all"!==(null==(n=this.actionsConfiguration)?void 0:n.notifications)&&(l=this.actionsConfiguration.notifications),(null==e?void 0:e.notifications)&&(l="all"===e.notifications?s:e.notifications);let c=["before"];(null==(r=this.actionsConfiguration)?void 0:r.modals)&&(c="all"===this.actionsConfiguration.modals?s:this.actionsConfiguration.modals),(null==e?void 0:e.modals)&&(c="all"===e.modals?s:e.modals);const u=(null==e?void 0:e.returnStrategy)||(null==(o=this.actionsConfiguration)?void 0:o.returnStrategy)||"back",d=(null==e?void 0:e.twaReturnUrl)||(null==(i=this.actionsConfiguration)?void 0:i.twaReturnUrl);let h=(null==e?void 0:e.skipRedirectToWallet)||(null==(a=this.actionsConfiguration)?void 0:a.skipRedirectToWallet)||"ios";return ui()&&(h="never"),{notifications:l,modals:c,returnStrategy:u,twaReturnUrl:d,skipRedirectToWallet:h}}},e.TonConnectUIError=Qr,e.UnknownAppError=oe,e.UnknownError=ce,e.UserRejectsError=ne,e.WalletAlreadyConnectedError=Q,e.WalletMissingRequiredFeaturesError=te,e.WalletNotConnectedError=J,e.WalletNotInjectedError=X,e.WalletNotSupportFeatureError=ee,e.WalletsListManager=Ze,e.WrongAddressError=se,e.checkRequiredWalletFeatures=Ye,e.createConnectionCompletedEvent=rt,e.createConnectionErrorEvent=ot,e.createConnectionRestoringCompletedEvent=at,e.createConnectionRestoringErrorEvent=st,e.createConnectionRestoringStartedEvent=it,e.createConnectionStartedEvent=nt,e.createDataSentForSignatureEvent=ht,e.createDataSignedEvent=ft,e.createDataSigningFailedEvent=pt,e.createDisconnectionEvent=gt,e.createRequestVersionEvent=Je,e.createResponseVersionEvent=Xe,e.createTransactionSentForSignatureEvent=ct,e.createTransactionSignedEvent=ut,e.createTransactionSigningFailedEvent=dt,e.createVersionInfo=et,e.enableQaMode=function(){Ke=!0,console.warn("🚨 QA Mode enabled - validation is disabled. This is unsafe for production!"),Ve(),function(){if("undefined"==typeof window||He)return;He=new MutationObserver(e=>{e.forEach(e=>{"childList"===e.type&&e.removedNodes.forEach(e=>{if(e.nodeType===Node.ELEMENT_NODE){const t=e;"ton-connect-qa-banner"===t.id&&Ke?(console.warn("QA Mode banner was removed, restoring..."),setTimeout(()=>Ve(),100)):"ton-connect-qa-mode-styles"===t.id&&Ke&&(console.warn("QA Mode styles were removed, restoring..."),setTimeout(()=>ze(),100))}})})}),He.observe(document.body,{childList:!0,subtree:!1}),He.observe(document.head,{childList:!0,subtree:!1})}(),ze()},e.encodeTelegramUrlParameters=be,e.isQaModeEnabled=Fe,e.isTelegramUrl=ve,e.isWalletInfoCurrentlyEmbedded=je,e.isWalletInfoCurrentlyInjected=De,e.isWalletInfoInjectable=Be,e.isWalletInfoInjected=function(e){return"jsBridgeKey"in e},e.isWalletInfoRemote=$e,e.toUserFriendlyAddress=vt,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})});
1192
1191
  //# sourceMappingURL=tonconnect-ui.min.js.map