@tonconnect/ui 2.0.5 → 2.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/tonconnect-ui.min.js +1 -1
- package/dist/tonconnect-ui.min.js.map +1 -1
- package/lib/index.cjs +2 -2
- package/lib/index.cjs.map +1 -1
- package/lib/index.mjs +2 -2
- package/lib/index.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -596,7 +596,7 @@ var __defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnP
|
|
|
596
596
|
> div:first-child {
|
|
597
597
|
margin-top: 20px;
|
|
598
598
|
}
|
|
599
|
-
`;function Ya(e){return e.split("-")[0]}function Qa(e,t,n){let{reference:r,floating:o}=e;const i=r.x+r.width/2-o.width/2,s=r.y+r.height/2-o.height/2,a=function(e){return["top","bottom"].includes(Ya(e))?"x":"y"}(t),l="y"===a?"height":"width";const c=r[l]/2-o[l]/2,u="x"===a;let d;switch(Ya(t)){case"top":d={x:i,y:r.y-o.height};break;case"bottom":d={x:i,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:s};break;case"left":d={x:r.x-o.width,y:s};break;default:d={x:r.x,y:r.y}}switch(function(e){return e.split("-")[1]}(t)){case"start":d[a]-=c*(n&&u?-1:1);break;case"end":d[a]+=c*(n&&u?-1:1)}return d}const Ja=(e,t,n)=>__async(this,null,(function*(){const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=yield null==s.isRTL?void 0:s.isRTL(t);if("production"!==process.env.NODE_ENV){if(null==s&&console.error(["Floating UI: `platform` property was not passed to config. If you","want to use Floating UI on the web, install @floating-ui/dom","instead of the /core package. Otherwise, you can create your own","`platform`: https://floating-ui.com/docs/platform"].join(" ")),a.filter((e=>{let{name:t}=e;return"autoPlacement"===t||"flip"===t})).length>1)throw new Error(["Floating UI: duplicate `flip` and/or `autoPlacement` middleware","detected. This will lead to an infinite loop. Ensure only one of","either has been passed to the `middleware` array."].join(" "));e&&t||console.error(["Floating UI: The reference and/or floating element was not defined","when `computePosition()` was called. Ensure that both elements have","been created and can be measured."].join(" "))}let c=yield s.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=Qa(c,r,l),h=r,f={},g=0;for(let n=0;n<a.length;n++){const{name:i,fn:p}=a[n],{x:w,y:m,data:v,reset:y}=yield p({x:u,y:d,initialPlacement:r,placement:h,strategy:o,middlewareData:f,rects:c,platform:s,elements:{reference:e,floating:t}});u=null!=w?w:u,d=null!=m?m:d,f=__spreadProps(__spreadValues({},f),{[i]:__spreadValues(__spreadValues({},f[i]),v)}),"production"!==process.env.NODE_ENV&&g>50&&console.warn(["Floating UI: The middleware lifecycle appears to be running in an","infinite loop. This is usually caused by a `reset` continually","being returned without a break condition."].join(" ")),y&&g<=50&&(g++,"object"==typeof y&&(y.placement&&(h=y.placement),y.rects&&(c=!0===y.rects?yield s.getElementRects({reference:e,floating:t,strategy:o}):y.rects),({x:u,y:d}=Qa(c,h,l))),n=-1)}return{x:u,y:d,placement:h,strategy:o,middlewareData:f}}));function Xa(e){return __spreadProps(__spreadValues({},e),{top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height})}function el(e){var t;return(null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function tl(e){return el(e).getComputedStyle(e)}function nl(e){return al(e)?(e.nodeName||"").toLowerCase():""}let rl;function ol(){if(rl)return rl;const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?(rl=e.brands.map((e=>e.brand+"/"+e.version)).join(" "),rl):navigator.userAgent}function il(e){return e instanceof el(e).HTMLElement}function sl(e){return e instanceof el(e).Element}function al(e){return e instanceof el(e).Node}function ll(e){if("undefined"==typeof ShadowRoot)return!1;return e instanceof el(e).ShadowRoot||e instanceof ShadowRoot}function cl(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=tl(e);return/auto|scroll|overlay|hidden/.test(t+r+n)&&!["inline","contents"].includes(o)}function ul(e){return["table","td","th"].includes(nl(e))}function dl(e){const t=/firefox/i.test(ol()),n=tl(e),r=n.backdropFilter||n.WebkitBackdropFilter;return"none"!==n.transform||"none"!==n.perspective||!!r&&"none"!==r||t&&"filter"===n.willChange||t&&!!n.filter&&"none"!==n.filter||["transform","perspective"].some((e=>n.willChange.includes(e)))||["paint","layout","strict","content"].some((e=>{const t=n.contain;return null!=t&&t.includes(e)}))}function hl(){return!/^((?!chrome|android).)*safari/i.test(ol())}function fl(e){return["html","body","#document"].includes(nl(e))}const gl=Math.min,pl=Math.max,wl=Math.round,ml={x:1,y:1};function vl(e){const t=!sl(e)&&e.contextElement?e.contextElement:sl(e)?e:null;if(!t)return ml;const n=t.getBoundingClientRect(),r=tl(t);if("border-box"!==r.boxSizing)return il(t)?{x:t.offsetWidth>0&&wl(n.width)/t.offsetWidth||1,y:t.offsetHeight>0&&wl(n.height)/t.offsetHeight||1}:ml;let o=n.width/parseFloat(r.width),i=n.height/parseFloat(r.height);return o&&Number.isFinite(o)||(o=1),i&&Number.isFinite(i)||(i=1),{x:o,y:i}}function yl(e,t,n,r){var o,i,s,a;void 0===t&&(t=!1),void 0===n&&(n=!1);const l=e.getBoundingClientRect();let c=ml;t&&(r?sl(r)&&(c=vl(r)):c=vl(e));const u=sl(e)?el(e):window,d=!hl()&&n,h=(l.left+(d&&null!=(o=null==(i=u.visualViewport)?void 0:i.offsetLeft)?o:0))/c.x,f=(l.top+(d&&null!=(s=null==(a=u.visualViewport)?void 0:a.offsetTop)?s:0))/c.y,g=l.width/c.x,p=l.height/c.y;return{width:g,height:p,top:f,right:h+g,bottom:f+p,left:h,x:h,y:f}}function bl(e){return((al(e)?e.ownerDocument:e.document)||window.document).documentElement}function Cl(e){return sl(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function xl(e){return yl(bl(e)).left+Cl(e).scrollLeft}function _l(e,t,n){const r=il(t),o=bl(t),i=yl(e,!0,"fixed"===n,t);let s={scrollLeft:0,scrollTop:0};const a={x:0,y:0};if(r||!r&&"fixed"!==n)if(("body"!==nl(t)||cl(o))&&(s=Cl(t)),il(t)){const e=yl(t,!0);a.x=e.x+t.clientLeft,a.y=e.y+t.clientTop}else o&&(a.x=xl(o));return{x:i.left+s.scrollLeft-a.x,y:i.top+s.scrollTop-a.y,width:i.width,height:i.height}}function kl(e){if("html"===nl(e))return e;const t=e.assignedSlot||e.parentNode||(ll(e)?e.host:null)||bl(e);return ll(t)?t.host:t}function Sl(e){return il(e)&&"fixed"!==tl(e).position?e.offsetParent:null}function El(e){const t=el(e);let n=Sl(e);for(;n&&ul(n)&&"static"===tl(n).position;)n=Sl(n);return n&&("html"===nl(n)||"body"===nl(n)&&"static"===tl(n).position&&!dl(n))?t:n||function(e){let t=kl(e);for(;il(t)&&!fl(t);){if(dl(t))return t;t=kl(t)}return null}(e)||t}function Rl(e){const t=kl(e);return fl(t)?e.ownerDocument.body:il(t)&&cl(t)?t:Rl(t)}function Tl(e,t){var n;void 0===t&&(t=[]);const r=Rl(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=el(r);return o?t.concat(i,i.visualViewport||[],cl(r)?r:[]):t.concat(r,Tl(r))}function Ll(e,t,n){return"viewport"===t?Xa(function(e,t){const n=el(e),r=bl(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const e=hl();(e||!e&&"fixed"===t)&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:s,x:a,y:l}}(e,n)):sl(t)?function(e,t){const n=yl(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=il(e)?vl(e):{x:1,y:1},s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=o*i.x,c=r*i.y;return{top:c,left:l,right:l+s,bottom:c+a,x:l,y:c,width:s,height:a}}(t,n):Xa(function(e){var t;const n=bl(e),r=Cl(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=pl(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=pl(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0);let a=-r.scrollLeft+xl(e);const l=-r.scrollTop;return"rtl"===tl(o||n).direction&&(a+=pl(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:s,x:a,y:l}}(bl(e)))}const Al={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?function(e,t){const n=t.get(e);if(n)return n;let r=Tl(e).filter((e=>sl(e)&&"body"!==nl(e))),o=null;const i="fixed"===tl(e).position;let s=i?kl(e):e;for(;sl(s)&&!fl(s);){const e=tl(s),t=dl(s);(i?t||o:t||"static"!==e.position||!o||!["absolute","fixed"].includes(o.position))?o=e:r=r.filter((e=>e!==s)),s=kl(s)}return t.set(e,r),r}(t,this._c):[].concat(n),r],s=i[0],a=i.reduce(((e,n)=>{const r=Ll(t,n,o);return e.top=pl(r.top,e.top),e.right=gl(r.right,e.right),e.bottom=gl(r.bottom,e.bottom),e.left=pl(r.left,e.left),e}),Ll(t,s,o));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=il(n),i=bl(n);if(n===i)return t;let s={scrollLeft:0,scrollTop:0},a={x:1,y:1};const l={x:0,y:0};if((o||!o&&"fixed"!==r)&&(("body"!==nl(n)||cl(i))&&(s=Cl(n)),il(n))){const e=yl(n);a=vl(n),l.x=e.x+n.clientLeft,l.y=e.y+n.clientTop}return{width:t.width*a.x,height:t.height*a.y,x:t.x*a.x-s.scrollLeft*a.x+l.x,y:t.y*a.y-s.scrollTop*a.y+l.y}},isElement:sl,getDimensions:function(e){if(il(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=yl(e);return{width:t.width,height:t.height}},getOffsetParent:El,getDocumentElement:bl,getScale:vl,getElementRects(e){return __async(this,null,(function*(){let{reference:t,floating:n,strategy:r}=e;const o=this.getOffsetParent||El,i=this.getDimensions;return{reference:_l(t,yield o(n),r),floating:__spreadValues({x:0,y:0},yield i(n))}}))},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>"rtl"===tl(e).direction};function Ol(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=!0,animationFrame:a=!1}=r,l=o&&!a,c=l||i?[...sl(e)?Tl(e):e.contextElement?Tl(e.contextElement):[],...Tl(t)]:[];c.forEach((e=>{l&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));let u,d=null;if(s){let r=!0;d=new ResizeObserver((()=>{r||n(),r=!1})),sl(e)&&!a&&d.observe(e),sl(e)||!e.contextElement||a||d.observe(e.contextElement),d.observe(t)}let h=a?yl(e):null;return a&&function t(){const r=yl(e);!h||r.x===h.x&&r.y===h.y&&r.width===h.width&&r.height===h.height||n();h=r,u=requestAnimationFrame(t)}(),n(),()=>{var e;c.forEach((e=>{l&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==(e=d)||e.disconnect(),d=null,a&&cancelAnimationFrame(u)}}const Ml=(e,t,n)=>{const r=new Map,o=__spreadValues({platform:Al},n),i=__spreadProps(__spreadValues({},o.platform),{_c:r});return Ja(e,t,__spreadProps(__spreadValues({},o),{platform:i}))};const Nl=un('<tc-root data-tc-dropdown-container="true"></tc-root>'),Pl=()=>{const t=Vn(),n=St($r),r=St(ga),[o,i]=gt(!1),[s,a]=gt(n.account),[l,c]=gt(!n.account);let u;const[d,h]=gt(),[f,g]=gt(),p=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,s]=gt({x:null,y:null,placement:r(),strategy:o(),middlewareData:{}}),[a,l]=gt();mt((()=>{let e=a();if(e)throw e.value}));let c=vt((()=>(e(),t(),{})));function u(){let i=e(),a=t();if(i&&a){let e=c();Ml(i,a,{middleware:null==n?void 0:n.middleware,placement:r(),strategy:o()}).then((t=>{e===c()&&s(t)}),(e=>{l(e)}))}}return mt((()=>{let i=e(),s=t();if(null==n||n.middleware,r(),o(),i&&s)if(null!=n&&n.whileElementsMounted){let e=n.whileElementsMounted(i,s,u);e&&xt(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:Ol,placement:"bottom-end"});r.connectionRestored.then((()=>c(!1)));const w=n.onStatusChange((e=>{if(!e)return i(!1),a(null),void c(!1);a(e.account),c(!1)})),m=e=>{if(!s()||!o())return;const t=f().contains(e.target),n=u.contains(e.target);t||n||i(!1)};var v;return v=()=>{document.body.addEventListener("click",m)},mt((()=>Ct(v))),xt((()=>{document.body.removeEventListener("click",m),w()})),Ft(Rn,{component:zn,get children(){return[Ft(Jt,{get when(){return l()},get children(){return Ft(Fa,{disabled:!0,"data-tc-connect-button-loading":"true",get children(){return Ft(qa,{})}})}}),Ft(Jt,{get when(){return!l()},get children(){return[Ft(Jt,{get when(){return!s()},get children(){return Ft(Va,{onClick:()=>r.openModal(),"data-tc-connect-button":"true",scale:"s",get children(){return[Ft(ss,{get fill(){return t.colors.connectButton.foreground}}),Ft(ji,{translationKey:"button.connectWallet",fontSize:"15px",lineHeight:"18px",fontWeight:"590",get color(){return t.colors.connectButton.foreground},children:"Connect wallet"})]}})}}),Ft(Jt,{get when(){return s()},get children(){return Ft(za,{get children(){return[Ft(Ka,{onClick:()=>i((e=>!e)),ref:g,"data-tc-dropdown-button":"true",scale:"s",get children(){return[Ft(ji,{fontSize:"15px",fontWeight:"590",lineHeight:"18px",get children(){return(()=>{const t=s();if(t){const n=Ze(t.address,t.chain===e.CHAIN.TESTNET);return n.slice(0,4)+"…"+n.slice(-4)}return""})()}}),Ft(Zo,{direction:"bottom"})]}}),Ft(En,{get children(){const e=Ct((()=>document.importNode(Nl,!0)));return gn(h,e),e.style.setProperty("z-index","999"),e._$owner=st,pn(e,Ft(Do,{onBeforeEnter:e=>{ci(e,[{opacity:0,transform:"translateY(-8px)"},{opacity:1,transform:"translateY(0)"}],{duration:150})},onExit:(e,t)=>{ci(e,[{opacity:1,transform:"translateY(0)"},{opacity:0,transform:"translateY(-8px)"}],{duration:150}).finished.then(t)},get children(){return Ft(Jt,{get when(){return o()},get children(){return Ft(Za,{get hidden(){return!o()},onClose:()=>i(!1),ref(e){"function"==typeof u?u(e):u=e}})}})}}),null),pn(e,Ft(Ga,{}),null),wt((t=>{var n,r;const o=p.strategy,i=`${null!=(n=p.y)?n:0}px`,s=`${null!=(r=p.x)?r:0}px`;return o!==t._v$&&e.style.setProperty("position",t._v$=o),i!==t._v$2&&e.style.setProperty("top",t._v$2=i),s!==t._v$3&&e.style.setProperty("left",t._v$3=s),t}),{_v$:void 0,_v$2:void 0,_v$3:void 0}),e}})]}})}})]}})]}})},$l=Fn(gi)`
|
|
599
|
+
`;function Ya(e){return e.split("-")[0]}function Qa(e,t,n){let{reference:r,floating:o}=e;const i=r.x+r.width/2-o.width/2,s=r.y+r.height/2-o.height/2,a=function(e){return["top","bottom"].includes(Ya(e))?"x":"y"}(t),l="y"===a?"height":"width";const c=r[l]/2-o[l]/2,u="x"===a;let d;switch(Ya(t)){case"top":d={x:i,y:r.y-o.height};break;case"bottom":d={x:i,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:s};break;case"left":d={x:r.x-o.width,y:s};break;default:d={x:r.x,y:r.y}}switch(function(e){return e.split("-")[1]}(t)){case"start":d[a]-=c*(n&&u?-1:1);break;case"end":d[a]+=c*(n&&u?-1:1)}return d}const Ja=(e,t,n)=>__async(this,null,(function*(){const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=yield null==s.isRTL?void 0:s.isRTL(t);if("production"!=={}.NODE_ENV){if(null==s&&console.error(["Floating UI: `platform` property was not passed to config. If you","want to use Floating UI on the web, install @floating-ui/dom","instead of the /core package. Otherwise, you can create your own","`platform`: https://floating-ui.com/docs/platform"].join(" ")),a.filter((e=>{let{name:t}=e;return"autoPlacement"===t||"flip"===t})).length>1)throw new Error(["Floating UI: duplicate `flip` and/or `autoPlacement` middleware","detected. This will lead to an infinite loop. Ensure only one of","either has been passed to the `middleware` array."].join(" "));e&&t||console.error(["Floating UI: The reference and/or floating element was not defined","when `computePosition()` was called. Ensure that both elements have","been created and can be measured."].join(" "))}let c=yield s.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=Qa(c,r,l),h=r,f={},g=0;for(let n=0;n<a.length;n++){const{name:i,fn:p}=a[n],{x:w,y:m,data:v,reset:y}=yield p({x:u,y:d,initialPlacement:r,placement:h,strategy:o,middlewareData:f,rects:c,platform:s,elements:{reference:e,floating:t}});u=null!=w?w:u,d=null!=m?m:d,f=__spreadProps(__spreadValues({},f),{[i]:__spreadValues(__spreadValues({},f[i]),v)}),"production"!=={}.NODE_ENV&&g>50&&console.warn(["Floating UI: The middleware lifecycle appears to be running in an","infinite loop. This is usually caused by a `reset` continually","being returned without a break condition."].join(" ")),y&&g<=50&&(g++,"object"==typeof y&&(y.placement&&(h=y.placement),y.rects&&(c=!0===y.rects?yield s.getElementRects({reference:e,floating:t,strategy:o}):y.rects),({x:u,y:d}=Qa(c,h,l))),n=-1)}return{x:u,y:d,placement:h,strategy:o,middlewareData:f}}));function Xa(e){return __spreadProps(__spreadValues({},e),{top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height})}function el(e){var t;return(null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function tl(e){return el(e).getComputedStyle(e)}function nl(e){return al(e)?(e.nodeName||"").toLowerCase():""}let rl;function ol(){if(rl)return rl;const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?(rl=e.brands.map((e=>e.brand+"/"+e.version)).join(" "),rl):navigator.userAgent}function il(e){return e instanceof el(e).HTMLElement}function sl(e){return e instanceof el(e).Element}function al(e){return e instanceof el(e).Node}function ll(e){if("undefined"==typeof ShadowRoot)return!1;return e instanceof el(e).ShadowRoot||e instanceof ShadowRoot}function cl(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=tl(e);return/auto|scroll|overlay|hidden/.test(t+r+n)&&!["inline","contents"].includes(o)}function ul(e){return["table","td","th"].includes(nl(e))}function dl(e){const t=/firefox/i.test(ol()),n=tl(e),r=n.backdropFilter||n.WebkitBackdropFilter;return"none"!==n.transform||"none"!==n.perspective||!!r&&"none"!==r||t&&"filter"===n.willChange||t&&!!n.filter&&"none"!==n.filter||["transform","perspective"].some((e=>n.willChange.includes(e)))||["paint","layout","strict","content"].some((e=>{const t=n.contain;return null!=t&&t.includes(e)}))}function hl(){return!/^((?!chrome|android).)*safari/i.test(ol())}function fl(e){return["html","body","#document"].includes(nl(e))}const gl=Math.min,pl=Math.max,wl=Math.round,ml={x:1,y:1};function vl(e){const t=!sl(e)&&e.contextElement?e.contextElement:sl(e)?e:null;if(!t)return ml;const n=t.getBoundingClientRect(),r=tl(t);if("border-box"!==r.boxSizing)return il(t)?{x:t.offsetWidth>0&&wl(n.width)/t.offsetWidth||1,y:t.offsetHeight>0&&wl(n.height)/t.offsetHeight||1}:ml;let o=n.width/parseFloat(r.width),i=n.height/parseFloat(r.height);return o&&Number.isFinite(o)||(o=1),i&&Number.isFinite(i)||(i=1),{x:o,y:i}}function yl(e,t,n,r){var o,i,s,a;void 0===t&&(t=!1),void 0===n&&(n=!1);const l=e.getBoundingClientRect();let c=ml;t&&(r?sl(r)&&(c=vl(r)):c=vl(e));const u=sl(e)?el(e):window,d=!hl()&&n,h=(l.left+(d&&null!=(o=null==(i=u.visualViewport)?void 0:i.offsetLeft)?o:0))/c.x,f=(l.top+(d&&null!=(s=null==(a=u.visualViewport)?void 0:a.offsetTop)?s:0))/c.y,g=l.width/c.x,p=l.height/c.y;return{width:g,height:p,top:f,right:h+g,bottom:f+p,left:h,x:h,y:f}}function bl(e){return((al(e)?e.ownerDocument:e.document)||window.document).documentElement}function Cl(e){return sl(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function xl(e){return yl(bl(e)).left+Cl(e).scrollLeft}function _l(e,t,n){const r=il(t),o=bl(t),i=yl(e,!0,"fixed"===n,t);let s={scrollLeft:0,scrollTop:0};const a={x:0,y:0};if(r||!r&&"fixed"!==n)if(("body"!==nl(t)||cl(o))&&(s=Cl(t)),il(t)){const e=yl(t,!0);a.x=e.x+t.clientLeft,a.y=e.y+t.clientTop}else o&&(a.x=xl(o));return{x:i.left+s.scrollLeft-a.x,y:i.top+s.scrollTop-a.y,width:i.width,height:i.height}}function kl(e){if("html"===nl(e))return e;const t=e.assignedSlot||e.parentNode||(ll(e)?e.host:null)||bl(e);return ll(t)?t.host:t}function Sl(e){return il(e)&&"fixed"!==tl(e).position?e.offsetParent:null}function El(e){const t=el(e);let n=Sl(e);for(;n&&ul(n)&&"static"===tl(n).position;)n=Sl(n);return n&&("html"===nl(n)||"body"===nl(n)&&"static"===tl(n).position&&!dl(n))?t:n||function(e){let t=kl(e);for(;il(t)&&!fl(t);){if(dl(t))return t;t=kl(t)}return null}(e)||t}function Rl(e){const t=kl(e);return fl(t)?e.ownerDocument.body:il(t)&&cl(t)?t:Rl(t)}function Tl(e,t){var n;void 0===t&&(t=[]);const r=Rl(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=el(r);return o?t.concat(i,i.visualViewport||[],cl(r)?r:[]):t.concat(r,Tl(r))}function Ll(e,t,n){return"viewport"===t?Xa(function(e,t){const n=el(e),r=bl(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const e=hl();(e||!e&&"fixed"===t)&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:s,x:a,y:l}}(e,n)):sl(t)?function(e,t){const n=yl(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=il(e)?vl(e):{x:1,y:1},s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=o*i.x,c=r*i.y;return{top:c,left:l,right:l+s,bottom:c+a,x:l,y:c,width:s,height:a}}(t,n):Xa(function(e){var t;const n=bl(e),r=Cl(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=pl(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=pl(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0);let a=-r.scrollLeft+xl(e);const l=-r.scrollTop;return"rtl"===tl(o||n).direction&&(a+=pl(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:s,x:a,y:l}}(bl(e)))}const Al={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?function(e,t){const n=t.get(e);if(n)return n;let r=Tl(e).filter((e=>sl(e)&&"body"!==nl(e))),o=null;const i="fixed"===tl(e).position;let s=i?kl(e):e;for(;sl(s)&&!fl(s);){const e=tl(s),t=dl(s);(i?t||o:t||"static"!==e.position||!o||!["absolute","fixed"].includes(o.position))?o=e:r=r.filter((e=>e!==s)),s=kl(s)}return t.set(e,r),r}(t,this._c):[].concat(n),r],s=i[0],a=i.reduce(((e,n)=>{const r=Ll(t,n,o);return e.top=pl(r.top,e.top),e.right=gl(r.right,e.right),e.bottom=gl(r.bottom,e.bottom),e.left=pl(r.left,e.left),e}),Ll(t,s,o));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=il(n),i=bl(n);if(n===i)return t;let s={scrollLeft:0,scrollTop:0},a={x:1,y:1};const l={x:0,y:0};if((o||!o&&"fixed"!==r)&&(("body"!==nl(n)||cl(i))&&(s=Cl(n)),il(n))){const e=yl(n);a=vl(n),l.x=e.x+n.clientLeft,l.y=e.y+n.clientTop}return{width:t.width*a.x,height:t.height*a.y,x:t.x*a.x-s.scrollLeft*a.x+l.x,y:t.y*a.y-s.scrollTop*a.y+l.y}},isElement:sl,getDimensions:function(e){if(il(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=yl(e);return{width:t.width,height:t.height}},getOffsetParent:El,getDocumentElement:bl,getScale:vl,getElementRects(e){return __async(this,null,(function*(){let{reference:t,floating:n,strategy:r}=e;const o=this.getOffsetParent||El,i=this.getDimensions;return{reference:_l(t,yield o(n),r),floating:__spreadValues({x:0,y:0},yield i(n))}}))},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>"rtl"===tl(e).direction};function Ol(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=!0,animationFrame:a=!1}=r,l=o&&!a,c=l||i?[...sl(e)?Tl(e):e.contextElement?Tl(e.contextElement):[],...Tl(t)]:[];c.forEach((e=>{l&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));let u,d=null;if(s){let r=!0;d=new ResizeObserver((()=>{r||n(),r=!1})),sl(e)&&!a&&d.observe(e),sl(e)||!e.contextElement||a||d.observe(e.contextElement),d.observe(t)}let h=a?yl(e):null;return a&&function t(){const r=yl(e);!h||r.x===h.x&&r.y===h.y&&r.width===h.width&&r.height===h.height||n();h=r,u=requestAnimationFrame(t)}(),n(),()=>{var e;c.forEach((e=>{l&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==(e=d)||e.disconnect(),d=null,a&&cancelAnimationFrame(u)}}const Ml=(e,t,n)=>{const r=new Map,o=__spreadValues({platform:Al},n),i=__spreadProps(__spreadValues({},o.platform),{_c:r});return Ja(e,t,__spreadProps(__spreadValues({},o),{platform:i}))};const Nl=un('<tc-root data-tc-dropdown-container="true"></tc-root>'),Pl=()=>{const t=Vn(),n=St($r),r=St(ga),[o,i]=gt(!1),[s,a]=gt(n.account),[l,c]=gt(!n.account);let u;const[d,h]=gt(),[f,g]=gt(),p=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,s]=gt({x:null,y:null,placement:r(),strategy:o(),middlewareData:{}}),[a,l]=gt();mt((()=>{let e=a();if(e)throw e.value}));let c=vt((()=>(e(),t(),{})));function u(){let i=e(),a=t();if(i&&a){let e=c();Ml(i,a,{middleware:null==n?void 0:n.middleware,placement:r(),strategy:o()}).then((t=>{e===c()&&s(t)}),(e=>{l(e)}))}}return mt((()=>{let i=e(),s=t();if(null==n||n.middleware,r(),o(),i&&s)if(null!=n&&n.whileElementsMounted){let e=n.whileElementsMounted(i,s,u);e&&xt(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:Ol,placement:"bottom-end"});r.connectionRestored.then((()=>c(!1)));const w=n.onStatusChange((e=>{if(!e)return i(!1),a(null),void c(!1);a(e.account),c(!1)})),m=e=>{if(!s()||!o())return;const t=f().contains(e.target),n=u.contains(e.target);t||n||i(!1)};var v;return v=()=>{document.body.addEventListener("click",m)},mt((()=>Ct(v))),xt((()=>{document.body.removeEventListener("click",m),w()})),Ft(Rn,{component:zn,get children(){return[Ft(Jt,{get when(){return l()},get children(){return Ft(Fa,{disabled:!0,"data-tc-connect-button-loading":"true",get children(){return Ft(qa,{})}})}}),Ft(Jt,{get when(){return!l()},get children(){return[Ft(Jt,{get when(){return!s()},get children(){return Ft(Va,{onClick:()=>r.openModal(),"data-tc-connect-button":"true",scale:"s",get children(){return[Ft(ss,{get fill(){return t.colors.connectButton.foreground}}),Ft(ji,{translationKey:"button.connectWallet",fontSize:"15px",lineHeight:"18px",fontWeight:"590",get color(){return t.colors.connectButton.foreground},children:"Connect wallet"})]}})}}),Ft(Jt,{get when(){return s()},get children(){return Ft(za,{get children(){return[Ft(Ka,{onClick:()=>i((e=>!e)),ref:g,"data-tc-dropdown-button":"true",scale:"s",get children(){return[Ft(ji,{fontSize:"15px",fontWeight:"590",lineHeight:"18px",get children(){return(()=>{const t=s();if(t){const n=Ze(t.address,t.chain===e.CHAIN.TESTNET);return n.slice(0,4)+"…"+n.slice(-4)}return""})()}}),Ft(Zo,{direction:"bottom"})]}}),Ft(En,{get children(){const e=Ct((()=>document.importNode(Nl,!0)));return gn(h,e),e.style.setProperty("z-index","999"),e._$owner=st,pn(e,Ft(Do,{onBeforeEnter:e=>{ci(e,[{opacity:0,transform:"translateY(-8px)"},{opacity:1,transform:"translateY(0)"}],{duration:150})},onExit:(e,t)=>{ci(e,[{opacity:1,transform:"translateY(0)"},{opacity:0,transform:"translateY(-8px)"}],{duration:150}).finished.then(t)},get children(){return Ft(Jt,{get when(){return o()},get children(){return Ft(Za,{get hidden(){return!o()},onClose:()=>i(!1),ref(e){"function"==typeof u?u(e):u=e}})}})}}),null),pn(e,Ft(Ga,{}),null),wt((t=>{var n,r;const o=p.strategy,i=`${null!=(n=p.y)?n:0}px`,s=`${null!=(r=p.x)?r:0}px`;return o!==t._v$&&e.style.setProperty("position",t._v$=o),i!==t._v$2&&e.style.setProperty("top",t._v$2=i),s!==t._v$3&&e.style.setProperty("left",t._v$3=s),t}),{_v$:void 0,_v$2:void 0,_v$3:void 0}),e}})]}})}})]}})]}})},$l=Fn(gi)`
|
|
600
600
|
padding-left: 24px;
|
|
601
601
|
padding-right: 24px;
|
|
602
602
|
padding-top: 18px;
|