@dcl/explore-site 0.0.1-24138829632.commit-0946e16
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/assets/HomePage-CbNrtXMa.js +3 -0
- package/assets/QueryClientProvider-DUSjZ_J_.js +2 -0
- package/assets/RoobertPRO-Bold-DDyOqNrI.woff2 +0 -0
- package/assets/RoobertPRO-Bold-zQ2qeH97.ttf +0 -0
- package/assets/SensorsRounded-Ci-z6t1A.js +15 -0
- package/assets/___vite-browser-external_commonjs-proxy-BqV5D26a.js +1 -0
- package/assets/__federation_expose_App-BckrSixU.js +1 -0
- package/assets/__federation_fn_import-WDa0gv1I.js +1 -0
- package/assets/__federation_shared_@dcl/hooks-BmGk-LAU.js +535 -0
- package/assets/__federation_shared_@dcl/schemas-FcJQcJ28.js +1 -0
- package/assets/__federation_shared_@emotion/react-oi_M7gMJ.js +1 -0
- package/assets/__federation_shared_@emotion/styled-YrTPT9q1.js +1 -0
- package/assets/__federation_shared_@reduxjs/toolkit-R1Ell7gI.js +1 -0
- package/assets/__federation_shared_decentraland-ui2-D5N7yacO.js +357 -0
- package/assets/__federation_shared_react-B3tlNTLg.js +1 -0
- package/assets/__federation_shared_react-dom-Dsn5WX9N.js +1 -0
- package/assets/__federation_shared_react-redux-DMak3BVq.js +13 -0
- package/assets/__federation_shared_react-router-dom-CSW28ZSI.js +49 -0
- package/assets/__federation_shared_viem-DsDw7lUr.js +2 -0
- package/assets/__federation_shared_wagmi-h3zhLZbR.js +17 -0
- package/assets/__vite-optional-peer-dep_lottie-react_decentraland-ui2-BIHI7g3E.js +1 -0
- package/assets/_commonjsHelpers-C4iS2aBk.js +1 -0
- package/assets/add-Ccyt7YRh.js +15 -0
- package/assets/all-wallets-BIOtzF11.js +6 -0
- package/assets/app-store-BqACXnTM.js +17 -0
- package/assets/apple-zIEkvR7h.js +18 -0
- package/assets/arrow-bottom-CxQ54WH1.js +8 -0
- package/assets/arrow-bottom-circle-BjCA11Rn.js +11 -0
- package/assets/arrow-left-CsFQBdFD.js +8 -0
- package/assets/arrow-right-jT5LSgqq.js +8 -0
- package/assets/arrow-top-CA_1oaHw.js +8 -0
- package/assets/auto-track-UOggKKzv.js +1 -0
- package/assets/bank-81NjtLlm.js +14 -0
- package/assets/basic-CvR9b359.js +2128 -0
- package/assets/brotli_wasm_bg-NfWIZley.wasm +0 -0
- package/assets/browser-BjIqaPVu.js +14 -0
- package/assets/card-BJomEEgV.js +14 -0
- package/assets/ccip-DotuofV0.js +1 -0
- package/assets/checkmark-Cz0VZAkr.js +11 -0
- package/assets/checkmark-bold-blkVLUov.js +8 -0
- package/assets/chevron-bottom-ClawczSo.js +8 -0
- package/assets/chevron-left-DfJ9r4mv.js +8 -0
- package/assets/chevron-right-CrxmyW0K.js +8 -0
- package/assets/chevron-top-BVIfb-H3.js +8 -0
- package/assets/chrome-store-Cb5xVI0B.js +61 -0
- package/assets/clock-Bx-Kyhh-.js +8 -0
- package/assets/close-DOjpWTZi.js +8 -0
- package/assets/coinPlaceholder-BqONZM6Q.js +8 -0
- package/assets/compass-ByyIpxD6.js +8 -0
- package/assets/copy-BOu2-Xgv.js +15 -0
- package/assets/core-BGxUaCGc.js +907 -0
- package/assets/create-submenu-Bu20F8-Z.webp +0 -0
- package/assets/createClient-CSnZgvsb.js +1 -0
- package/assets/cursor-BqYz2L6D.js +3 -0
- package/assets/cursor-transparent-CWCRGDtx.js +12 -0
- package/assets/custom-welcome-background-BxlFQma9.webp +0 -0
- package/assets/defineChain-7I0Ce1VT.js +1 -0
- package/assets/desktop-Cd_vx0kT.js +9 -0
- package/assets/disconnect-D5AICJhj.js +8 -0
- package/assets/discord-26Vqbq7c.js +17 -0
- package/assets/emotion-react.browser.esm-5OnyV0Sh.js +8 -0
- package/assets/emotion-use-insertion-effect-with-fallbacks.browser.esm-B75LdcJS.js +1 -0
- package/assets/etherscan--DKVcYrP.js +6 -0
- package/assets/exclamation-triangle-DOsYf3fQ.js +4 -0
- package/assets/explore-submenu-BFVuYMi9.webp +0 -0
- package/assets/extension-DEaO3Zvk.js +8 -0
- package/assets/external-link-DcpG6wpM.js +8 -0
- package/assets/facebook-ByV0OclL.js +26 -0
- package/assets/farcaster-DI6fsEyh.js +12 -0
- package/assets/filters-Djn1aDVs.js +8 -0
- package/assets/github-B3p0LLP5.js +18 -0
- package/assets/google-ae7qga4R.js +18 -0
- package/assets/governance-submenu-VTIKvCIL.webp +0 -0
- package/assets/help-circle-BmzUA_Be.js +12 -0
- package/assets/hooks.module-Dz_XB4AG.js +1 -0
- package/assets/id-2hYEZqNH.js +12 -0
- package/assets/image-mDqi4ffo.js +4 -0
- package/assets/index-9zCVakoE.js +1 -0
- package/assets/index-BKLT1eit.js +2 -0
- package/assets/index-Biwg5bHN.js +1 -0
- package/assets/index-BzXoRVC1.js +1 -0
- package/assets/index-C05H8NDX.js +1 -0
- package/assets/index-CGCGB-at.js +1 -0
- package/assets/index-CNMKbeE1.js +5 -0
- package/assets/index-CVdhIPEJ.js +1 -0
- package/assets/index-CdOcIHYV.js +395 -0
- package/assets/index-CdrMQoR6.js +1 -0
- package/assets/index-Ctl4brHr.js +2 -0
- package/assets/index-D6O4pjzC.js +12 -0
- package/assets/index-D6ZMQedT.js +1 -0
- package/assets/index-DGVKdsht.js +1 -0
- package/assets/index-D_fJMF1A.js +1 -0
- package/assets/index-Dy0yjznp.js +1 -0
- package/assets/index-Dy0yjznp__bundled.js +9 -0
- package/assets/index-JFBsW0Hp.js +1 -0
- package/assets/index-OQ3TYt4p.js +7 -0
- package/assets/index-VfkM29PH.js +1 -0
- package/assets/index-VfkM29PH__bundled.js +24 -0
- package/assets/index-nibyPLVP.js +1 -0
- package/assets/index-pEp_vRda.js +8 -0
- package/assets/index.es-D_4_VpXc.js +38 -0
- package/assets/index.umd-6zndRFhB.js +1 -0
- package/assets/info-Bhf5PLdi.js +3 -0
- package/assets/info-circle-CZ5iih32.js +12 -0
- package/assets/inherits_browser-BlmhoU4v.js +1 -0
- package/assets/is-plan-event-enabled-DeNtQvA5.js +1 -0
- package/assets/jsx-runtime-B1l0k91v.js +1 -0
- package/assets/jsx-runtime-B1l0k91v__bundled.js +9 -0
- package/assets/learn-submenu-sfxVP5Db.webp +0 -0
- package/assets/lightbulb-CA3e26a0.js +3 -0
- package/assets/localBatchGatewayRequest-vExM5jac.js +1 -0
- package/assets/logo-pattern-D4X-bvlg.webp +0 -0
- package/assets/mail-BktjMbEk.js +8 -0
- package/assets/man-default1-BEO13leF.png +0 -0
- package/assets/marketplace-submenu-CixWTv8_.webp +0 -0
- package/assets/mobile-zfEM0JzU.js +9 -0
- package/assets/more-Dg45xuT9.js +11 -0
- package/assets/native-CJ5et6AR.js +1 -0
- package/assets/network-placeholder-duQhExzj.js +14 -0
- package/assets/nftPlaceholder-C3kMYu-p.js +8 -0
- package/assets/off-Cz636L92.js +8 -0
- package/assets/play-store-Cch0eiCp.js +32 -0
- package/assets/plus-orAhHwVf.js +13 -0
- package/assets/preload-helper-BrYcp76J.js +1 -0
- package/assets/qr-code-7plug-hj.js +6 -0
- package/assets/recycle-horizontal-B6ivY9Sz.js +9 -0
- package/assets/refresh-CqfvjhXq.js +8 -0
- package/assets/remoteEntry.js +1 -0
- package/assets/reown-logo-DGoAljI9.js +12 -0
- package/assets/reselect-BfUrOuXx.js +1 -0
- package/assets/rich-text-react-renderer_decentraland-ui2-BIHI7g3E.js +1 -0
- package/assets/search-nNK2K8mD.js +8 -0
- package/assets/secp256k1-D6s48BOl.js +1 -0
- package/assets/send-BPz2SBvc.js +15 -0
- package/assets/swapHorizontal-TvVHlgjl.js +8 -0
- package/assets/swapHorizontalBold-BTw_LG1-.js +8 -0
- package/assets/swapHorizontalMedium-C3jJnFs_.js +16 -0
- package/assets/swapHorizontalRoundedBold-nTFwdVeT.js +8 -0
- package/assets/swapVertical-CHKvPR_7.js +8 -0
- package/assets/telegram-C552IoSr.js +16 -0
- package/assets/three-dots-Nyfa4nYF.js +5 -0
- package/assets/top_background-Bnd2vX_F.webp +0 -0
- package/assets/tslib.es6-DbvBTznf.js +1 -0
- package/assets/twitch-7SJKGXSa.js +18 -0
- package/assets/twitterIcon-BBg9ypIU.js +6 -0
- package/assets/uid-CX4a_w4r.js +44 -0
- package/assets/verify-BwQ9FKM1.js +8 -0
- package/assets/verify-filled-BAdDAZxZ.js +8 -0
- package/assets/w3m-modal-BqXXR9rX.js +642 -0
- package/assets/wallet-DJsa1d3M.js +8 -0
- package/assets/wallet-placeholder-DPIkQ5vM.js +14 -0
- package/assets/walletconnect-osdnzzVU.js +30 -0
- package/assets/warning-circle-BQ9uHGTL.js +12 -0
- package/assets/webSocket-CIn5Ftst.js +3 -0
- package/assets/x-5oycQ-0v.js +12 -0
- package/dcl-logo.svg +1 -0
- package/index.html +41 -0
- package/package.json +21 -0
|
@@ -0,0 +1,2128 @@
|
|
|
1
|
+
import{i as B,e as M,r as A,c as _,d as c,k as P,n as T,q as E,E as J,R as O,O as Y,z as ke,g as D,B as S,D as ft,t as Kn,W as gt,C as jt,h as ln,T as kt,m as Qe,M as yn,F as xn,w as Ae,x as cn,f as Gn}from"./core-BGxUaCGc.js";import{n as u,c as C,o as y,r as v,U as se,e as Yn,f as Jn,a as Qn}from"./index-CdOcIHYV.js";var Fe={},Xn=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},Cn={},V={};let Kt;const Zn=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];V.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return e*4+17};V.getSymbolTotalCodewords=function(e){return Zn[e]};V.getBCHDigit=function(r){let e=0;for(;r!==0;)e++,r>>>=1;return e};V.setToSJISFunction=function(e){if(typeof e!="function")throw new Error('"toSJISFunc" is not a valid function.');Kt=e};V.isKanjiModeEnabled=function(){return typeof Kt<"u"};V.toSJIS=function(e){return Kt(e)};var wt={};(function(r){r.L={bit:1},r.M={bit:0},r.Q={bit:3},r.H={bit:2};function e(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"l":case"low":return r.L;case"m":case"medium":return r.M;case"q":case"quartile":return r.Q;case"h":case"high":return r.H;default:throw new Error("Unknown EC Level: "+n)}}r.isValid=function(i){return i&&typeof i.bit<"u"&&i.bit>=0&&i.bit<4},r.from=function(i,o){if(r.isValid(i))return i;try{return e(i)}catch{return o}}})(wt);function $n(){this.buffer=[],this.length=0}$n.prototype={get:function(r){const e=Math.floor(r/8);return(this.buffer[e]>>>7-r%8&1)===1},put:function(r,e){for(let n=0;n<e;n++)this.putBit((r>>>e-n-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(r){const e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),r&&(this.buffer[e]|=128>>>this.length%8),this.length++}};var ei=$n;function Ve(r){if(!r||r<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=r,this.data=new Uint8Array(r*r),this.reservedBit=new Uint8Array(r*r)}Ve.prototype.set=function(r,e,n,i){const o=r*this.size+e;this.data[o]=n,i&&(this.reservedBit[o]=!0)};Ve.prototype.get=function(r,e){return this.data[r*this.size+e]};Ve.prototype.xor=function(r,e,n){this.data[r*this.size+e]^=n};Ve.prototype.isReserved=function(r,e){return this.reservedBit[r*this.size+e]};var ti=Ve,Rn={};(function(r){const e=V.getSymbolSize;r.getRowColCoords=function(i){if(i===1)return[];const o=Math.floor(i/7)+2,t=e(i),a=t===145?26:Math.ceil((t-13)/(2*o-2))*2,s=[t-7];for(let l=1;l<o-1;l++)s[l]=s[l-1]-a;return s.push(6),s.reverse()},r.getPositions=function(i){const o=[],t=r.getRowColCoords(i),a=t.length;for(let s=0;s<a;s++)for(let l=0;l<a;l++)s===0&&l===0||s===0&&l===a-1||s===a-1&&l===0||o.push([t[s],t[l]]);return o}})(Rn);var _n={};const ni=V.getSymbolSize,un=7;_n.getPositions=function(e){const n=ni(e);return[[0,0],[n-un,0],[0,n-un]]};var In={};(function(r){r.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const e={N1:3,N2:3,N3:40,N4:10};r.isValid=function(o){return o!=null&&o!==""&&!isNaN(o)&&o>=0&&o<=7},r.from=function(o){return r.isValid(o)?parseInt(o,10):void 0},r.getPenaltyN1=function(o){const t=o.size;let a=0,s=0,l=0,h=null,d=null;for(let I=0;I<t;I++){s=l=0,h=d=null;for(let x=0;x<t;x++){let m=o.get(I,x);m===h?s++:(s>=5&&(a+=e.N1+(s-5)),h=m,s=1),m=o.get(x,I),m===d?l++:(l>=5&&(a+=e.N1+(l-5)),d=m,l=1)}s>=5&&(a+=e.N1+(s-5)),l>=5&&(a+=e.N1+(l-5))}return a},r.getPenaltyN2=function(o){const t=o.size;let a=0;for(let s=0;s<t-1;s++)for(let l=0;l<t-1;l++){const h=o.get(s,l)+o.get(s,l+1)+o.get(s+1,l)+o.get(s+1,l+1);(h===4||h===0)&&a++}return a*e.N2},r.getPenaltyN3=function(o){const t=o.size;let a=0,s=0,l=0;for(let h=0;h<t;h++){s=l=0;for(let d=0;d<t;d++)s=s<<1&2047|o.get(h,d),d>=10&&(s===1488||s===93)&&a++,l=l<<1&2047|o.get(d,h),d>=10&&(l===1488||l===93)&&a++}return a*e.N3},r.getPenaltyN4=function(o){let t=0;const a=o.data.length;for(let l=0;l<a;l++)t+=o.data[l];return Math.abs(Math.ceil(t*100/a/5)-10)*e.N4};function n(i,o,t){switch(i){case r.Patterns.PATTERN000:return(o+t)%2===0;case r.Patterns.PATTERN001:return o%2===0;case r.Patterns.PATTERN010:return t%3===0;case r.Patterns.PATTERN011:return(o+t)%3===0;case r.Patterns.PATTERN100:return(Math.floor(o/2)+Math.floor(t/3))%2===0;case r.Patterns.PATTERN101:return o*t%2+o*t%3===0;case r.Patterns.PATTERN110:return(o*t%2+o*t%3)%2===0;case r.Patterns.PATTERN111:return(o*t%3+(o+t)%2)%2===0;default:throw new Error("bad maskPattern:"+i)}}r.applyMask=function(o,t){const a=t.size;for(let s=0;s<a;s++)for(let l=0;l<a;l++)t.isReserved(l,s)||t.xor(l,s,n(o,l,s))},r.getBestMask=function(o,t){const a=Object.keys(r.Patterns).length;let s=0,l=1/0;for(let h=0;h<a;h++){t(h),r.applyMask(h,o);const d=r.getPenaltyN1(o)+r.getPenaltyN2(o)+r.getPenaltyN3(o)+r.getPenaltyN4(o);r.applyMask(h,o),d<l&&(l=d,s=h)}return s}})(In);var bt={};const he=wt,Ye=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],Je=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];bt.getBlocksCount=function(e,n){switch(n){case he.L:return Ye[(e-1)*4+0];case he.M:return Ye[(e-1)*4+1];case he.Q:return Ye[(e-1)*4+2];case he.H:return Ye[(e-1)*4+3];default:return}};bt.getTotalCodewordsCount=function(e,n){switch(n){case he.L:return Je[(e-1)*4+0];case he.M:return Je[(e-1)*4+1];case he.Q:return Je[(e-1)*4+2];case he.H:return Je[(e-1)*4+3];default:return}};var En={},mt={};const je=new Uint8Array(512),Xe=new Uint8Array(256);(function(){let e=1;for(let n=0;n<255;n++)je[n]=e,Xe[e]=n,e<<=1,e&256&&(e^=285);for(let n=255;n<512;n++)je[n]=je[n-255]})();mt.log=function(e){if(e<1)throw new Error("log("+e+")");return Xe[e]};mt.exp=function(e){return je[e]};mt.mul=function(e,n){return e===0||n===0?0:je[Xe[e]+Xe[n]]};(function(r){const e=mt;r.mul=function(i,o){const t=new Uint8Array(i.length+o.length-1);for(let a=0;a<i.length;a++)for(let s=0;s<o.length;s++)t[a+s]^=e.mul(i[a],o[s]);return t},r.mod=function(i,o){let t=new Uint8Array(i);for(;t.length-o.length>=0;){const a=t[0];for(let l=0;l<o.length;l++)t[l]^=e.mul(o[l],a);let s=0;for(;s<t.length&&t[s]===0;)s++;t=t.slice(s)}return t},r.generateECPolynomial=function(i){let o=new Uint8Array([1]);for(let t=0;t<i;t++)o=r.mul(o,new Uint8Array([1,e.exp(t)]));return o}})(En);const Wn=En;function Gt(r){this.genPoly=void 0,this.degree=r,this.degree&&this.initialize(this.degree)}Gt.prototype.initialize=function(e){this.degree=e,this.genPoly=Wn.generateECPolynomial(this.degree)};Gt.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");const n=new Uint8Array(e.length+this.degree);n.set(e);const i=Wn.mod(n,this.genPoly),o=this.degree-i.length;if(o>0){const t=new Uint8Array(this.degree);return t.set(i,o),t}return i};var ii=Gt,Sn={},fe={},Yt={};Yt.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40};var te={};const Tn="[0-9]+",oi="[A-Z $%*+\\-./:]+";let ze="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";ze=ze.replace(/u/g,"\\u");const ri="(?:(?![A-Z0-9 $%*+\\-./:]|"+ze+`)(?:.|[\r
|
|
2
|
+
]))+`;te.KANJI=new RegExp(ze,"g");te.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");te.BYTE=new RegExp(ri,"g");te.NUMERIC=new RegExp(Tn,"g");te.ALPHANUMERIC=new RegExp(oi,"g");const ai=new RegExp("^"+ze+"$"),si=new RegExp("^"+Tn+"$"),li=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");te.testKanji=function(e){return ai.test(e)};te.testNumeric=function(e){return si.test(e)};te.testAlphanumeric=function(e){return li.test(e)};(function(r){const e=Yt,n=te;r.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},r.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},r.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},r.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},r.MIXED={bit:-1},r.getCharCountIndicator=function(t,a){if(!t.ccBits)throw new Error("Invalid mode: "+t);if(!e.isValid(a))throw new Error("Invalid version: "+a);return a>=1&&a<10?t.ccBits[0]:a<27?t.ccBits[1]:t.ccBits[2]},r.getBestModeForData=function(t){return n.testNumeric(t)?r.NUMERIC:n.testAlphanumeric(t)?r.ALPHANUMERIC:n.testKanji(t)?r.KANJI:r.BYTE},r.toString=function(t){if(t&&t.id)return t.id;throw new Error("Invalid mode")},r.isValid=function(t){return t&&t.bit&&t.ccBits};function i(o){if(typeof o!="string")throw new Error("Param is not a string");switch(o.toLowerCase()){case"numeric":return r.NUMERIC;case"alphanumeric":return r.ALPHANUMERIC;case"kanji":return r.KANJI;case"byte":return r.BYTE;default:throw new Error("Unknown mode: "+o)}}r.from=function(t,a){if(r.isValid(t))return t;try{return i(t)}catch{return a}}})(fe);(function(r){const e=V,n=bt,i=wt,o=fe,t=Yt,a=7973,s=e.getBCHDigit(a);function l(x,m,$){for(let b=1;b<=40;b++)if(m<=r.getCapacity(b,$,x))return b}function h(x,m){return o.getCharCountIndicator(x,m)+4}function d(x,m){let $=0;return x.forEach(function(b){const R=h(b.mode,m);$+=R+b.getBitsLength()}),$}function I(x,m){for(let $=1;$<=40;$++)if(d(x,$)<=r.getCapacity($,m,o.MIXED))return $}r.from=function(m,$){return t.isValid(m)?parseInt(m,10):$},r.getCapacity=function(m,$,b){if(!t.isValid(m))throw new Error("Invalid QR Code version");typeof b>"u"&&(b=o.BYTE);const R=e.getSymbolTotalCodewords(m),w=n.getTotalCodewordsCount(m,$),f=(R-w)*8;if(b===o.MIXED)return f;const g=f-h(b,m);switch(b){case o.NUMERIC:return Math.floor(g/10*3);case o.ALPHANUMERIC:return Math.floor(g/11*2);case o.KANJI:return Math.floor(g/13);case o.BYTE:default:return Math.floor(g/8)}},r.getBestVersionForData=function(m,$){let b;const R=i.from($,i.M);if(Array.isArray(m)){if(m.length>1)return I(m,R);if(m.length===0)return 1;b=m[0]}else b=m;return l(b.mode,b.getLength(),R)},r.getEncodedBits=function(m){if(!t.isValid(m)||m<7)throw new Error("Invalid QR Code version");let $=m<<12;for(;e.getBCHDigit($)-s>=0;)$^=a<<e.getBCHDigit($)-s;return m<<12|$}})(Sn);var Bn={};const zt=V,Pn=1335,ci=21522,dn=zt.getBCHDigit(Pn);Bn.getEncodedBits=function(e,n){const i=e.bit<<3|n;let o=i<<10;for(;zt.getBCHDigit(o)-dn>=0;)o^=Pn<<zt.getBCHDigit(o)-dn;return(i<<10|o)^ci};var Ln={};const ui=fe;function $e(r){this.mode=ui.NUMERIC,this.data=r.toString()}$e.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)};$e.prototype.getLength=function(){return this.data.length};$e.prototype.getBitsLength=function(){return $e.getBitsLength(this.data.length)};$e.prototype.write=function(e){let n,i,o;for(n=0;n+3<=this.data.length;n+=3)i=this.data.substr(n,3),o=parseInt(i,10),e.put(o,10);const t=this.data.length-n;t>0&&(i=this.data.substr(n),o=parseInt(i,10),e.put(o,t*3+1))};var di=$e;const hi=fe,Wt=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function Re(r){this.mode=hi.ALPHANUMERIC,this.data=r}Re.getBitsLength=function(e){return 11*Math.floor(e/2)+6*(e%2)};Re.prototype.getLength=function(){return this.data.length};Re.prototype.getBitsLength=function(){return Re.getBitsLength(this.data.length)};Re.prototype.write=function(e){let n;for(n=0;n+2<=this.data.length;n+=2){let i=Wt.indexOf(this.data[n])*45;i+=Wt.indexOf(this.data[n+1]),e.put(i,11)}this.data.length%2&&e.put(Wt.indexOf(this.data[n]),6)};var pi=Re,fi=function(e){for(var n=[],i=e.length,o=0;o<i;o++){var t=e.charCodeAt(o);if(t>=55296&&t<=56319&&i>o+1){var a=e.charCodeAt(o+1);a>=56320&&a<=57343&&(t=(t-55296)*1024+a-56320+65536,o+=1)}if(t<128){n.push(t);continue}if(t<2048){n.push(t>>6|192),n.push(t&63|128);continue}if(t<55296||t>=57344&&t<65536){n.push(t>>12|224),n.push(t>>6&63|128),n.push(t&63|128);continue}if(t>=65536&&t<=1114111){n.push(t>>18|240),n.push(t>>12&63|128),n.push(t>>6&63|128),n.push(t&63|128);continue}n.push(239,191,189)}return new Uint8Array(n).buffer};const gi=fi,wi=fe;function _e(r){this.mode=wi.BYTE,typeof r=="string"&&(r=gi(r)),this.data=new Uint8Array(r)}_e.getBitsLength=function(e){return e*8};_e.prototype.getLength=function(){return this.data.length};_e.prototype.getBitsLength=function(){return _e.getBitsLength(this.data.length)};_e.prototype.write=function(r){for(let e=0,n=this.data.length;e<n;e++)r.put(this.data[e],8)};var bi=_e;const mi=fe,vi=V;function Ie(r){this.mode=mi.KANJI,this.data=r}Ie.getBitsLength=function(e){return e*13};Ie.prototype.getLength=function(){return this.data.length};Ie.prototype.getBitsLength=function(){return Ie.getBitsLength(this.data.length)};Ie.prototype.write=function(r){let e;for(e=0;e<this.data.length;e++){let n=vi.toSJIS(this.data[e]);if(n>=33088&&n<=40956)n-=33088;else if(n>=57408&&n<=60351)n-=49472;else throw new Error("Invalid SJIS character: "+this.data[e]+`
|
|
3
|
+
Make sure your charset is UTF-8`);n=(n>>>8&255)*192+(n&255),r.put(n,13)}};var yi=Ie,On={exports:{}};(function(r){var e={single_source_shortest_paths:function(n,i,o){var t={},a={};a[i]=0;var s=e.PriorityQueue.make();s.push(i,0);for(var l,h,d,I,x,m,$,b,R;!s.empty();){l=s.pop(),h=l.value,I=l.cost,x=n[h]||{};for(d in x)x.hasOwnProperty(d)&&(m=x[d],$=I+m,b=a[d],R=typeof a[d]>"u",(R||b>$)&&(a[d]=$,s.push(d,$),t[d]=h))}if(typeof o<"u"&&typeof a[o]>"u"){var w=["Could not find a path from ",i," to ",o,"."].join("");throw new Error(w)}return t},extract_shortest_path_from_predecessor_list:function(n,i){for(var o=[],t=i;t;)o.push(t),n[t],t=n[t];return o.reverse(),o},find_path:function(n,i,o){var t=e.single_source_shortest_paths(n,i,o);return e.extract_shortest_path_from_predecessor_list(t,o)},PriorityQueue:{make:function(n){var i=e.PriorityQueue,o={},t;n=n||{};for(t in i)i.hasOwnProperty(t)&&(o[t]=i[t]);return o.queue=[],o.sorter=n.sorter||i.default_sorter,o},default_sorter:function(n,i){return n.cost-i.cost},push:function(n,i){var o={value:n,cost:i};this.queue.push(o),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};r.exports=e})(On);var xi=On.exports;(function(r){const e=fe,n=di,i=pi,o=bi,t=yi,a=te,s=V,l=xi;function h(w){return unescape(encodeURIComponent(w)).length}function d(w,f,g){const p=[];let W;for(;(W=w.exec(g))!==null;)p.push({data:W[0],index:W.index,mode:f,length:W[0].length});return p}function I(w){const f=d(a.NUMERIC,e.NUMERIC,w),g=d(a.ALPHANUMERIC,e.ALPHANUMERIC,w);let p,W;return s.isKanjiModeEnabled()?(p=d(a.BYTE,e.BYTE,w),W=d(a.KANJI,e.KANJI,w)):(p=d(a.BYTE_KANJI,e.BYTE,w),W=[]),f.concat(g,p,W).sort(function(j,G){return j.index-G.index}).map(function(j){return{data:j.data,mode:j.mode,length:j.length}})}function x(w,f){switch(f){case e.NUMERIC:return n.getBitsLength(w);case e.ALPHANUMERIC:return i.getBitsLength(w);case e.KANJI:return t.getBitsLength(w);case e.BYTE:return o.getBitsLength(w)}}function m(w){return w.reduce(function(f,g){const p=f.length-1>=0?f[f.length-1]:null;return p&&p.mode===g.mode?(f[f.length-1].data+=g.data,f):(f.push(g),f)},[])}function $(w){const f=[];for(let g=0;g<w.length;g++){const p=w[g];switch(p.mode){case e.NUMERIC:f.push([p,{data:p.data,mode:e.ALPHANUMERIC,length:p.length},{data:p.data,mode:e.BYTE,length:p.length}]);break;case e.ALPHANUMERIC:f.push([p,{data:p.data,mode:e.BYTE,length:p.length}]);break;case e.KANJI:f.push([p,{data:p.data,mode:e.BYTE,length:h(p.data)}]);break;case e.BYTE:f.push([{data:p.data,mode:e.BYTE,length:h(p.data)}])}}return f}function b(w,f){const g={},p={start:{}};let W=["start"];for(let L=0;L<w.length;L++){const j=w[L],G=[];for(let de=0;de<j.length;de++){const Z=j[de],Oe=""+L+de;G.push(Oe),g[Oe]={node:Z,lastCount:0},p[Oe]={};for(let Et=0;Et<W.length;Et++){const re=W[Et];g[re]&&g[re].node.mode===Z.mode?(p[re][Oe]=x(g[re].lastCount+Z.length,Z.mode)-x(g[re].lastCount,Z.mode),g[re].lastCount+=Z.length):(g[re]&&(g[re].lastCount=Z.length),p[re][Oe]=x(Z.length,Z.mode)+4+e.getCharCountIndicator(Z.mode,f))}}W=G}for(let L=0;L<W.length;L++)p[W[L]].end=0;return{map:p,table:g}}function R(w,f){let g;const p=e.getBestModeForData(w);if(g=e.from(f,p),g!==e.BYTE&&g.bit<p.bit)throw new Error('"'+w+'" cannot be encoded with mode '+e.toString(g)+`.
|
|
4
|
+
Suggested mode is: `+e.toString(p));switch(g===e.KANJI&&!s.isKanjiModeEnabled()&&(g=e.BYTE),g){case e.NUMERIC:return new n(w);case e.ALPHANUMERIC:return new i(w);case e.KANJI:return new t(w);case e.BYTE:return new o(w)}}r.fromArray=function(f){return f.reduce(function(g,p){return typeof p=="string"?g.push(R(p,null)):p.data&&g.push(R(p.data,p.mode)),g},[])},r.fromString=function(f,g){const p=I(f,s.isKanjiModeEnabled()),W=$(p),L=b(W,g),j=l.find_path(L.map,"start","end"),G=[];for(let de=1;de<j.length-1;de++)G.push(L.table[j[de]].node);return r.fromArray(m(G))},r.rawSplit=function(f){return r.fromArray(I(f,s.isKanjiModeEnabled()))}})(Ln);const vt=V,St=wt,Ci=ei,$i=ti,Ri=Rn,_i=_n,Dt=In,Nt=bt,Ii=ii,Ze=Sn,Ei=Bn,Wi=fe,Tt=Ln;function Si(r,e){const n=r.size,i=_i.getPositions(e);for(let o=0;o<i.length;o++){const t=i[o][0],a=i[o][1];for(let s=-1;s<=7;s++)if(!(t+s<=-1||n<=t+s))for(let l=-1;l<=7;l++)a+l<=-1||n<=a+l||(s>=0&&s<=6&&(l===0||l===6)||l>=0&&l<=6&&(s===0||s===6)||s>=2&&s<=4&&l>=2&&l<=4?r.set(t+s,a+l,!0,!0):r.set(t+s,a+l,!1,!0))}}function Ti(r){const e=r.size;for(let n=8;n<e-8;n++){const i=n%2===0;r.set(n,6,i,!0),r.set(6,n,i,!0)}}function Bi(r,e){const n=Ri.getPositions(e);for(let i=0;i<n.length;i++){const o=n[i][0],t=n[i][1];for(let a=-2;a<=2;a++)for(let s=-2;s<=2;s++)a===-2||a===2||s===-2||s===2||a===0&&s===0?r.set(o+a,t+s,!0,!0):r.set(o+a,t+s,!1,!0)}}function Pi(r,e){const n=r.size,i=Ze.getEncodedBits(e);let o,t,a;for(let s=0;s<18;s++)o=Math.floor(s/3),t=s%3+n-8-3,a=(i>>s&1)===1,r.set(o,t,a,!0),r.set(t,o,a,!0)}function Bt(r,e,n){const i=r.size,o=Ei.getEncodedBits(e,n);let t,a;for(t=0;t<15;t++)a=(o>>t&1)===1,t<6?r.set(t,8,a,!0):t<8?r.set(t+1,8,a,!0):r.set(i-15+t,8,a,!0),t<8?r.set(8,i-t-1,a,!0):t<9?r.set(8,15-t-1+1,a,!0):r.set(8,15-t-1,a,!0);r.set(i-8,8,1,!0)}function Li(r,e){const n=r.size;let i=-1,o=n-1,t=7,a=0;for(let s=n-1;s>0;s-=2)for(s===6&&s--;;){for(let l=0;l<2;l++)if(!r.isReserved(o,s-l)){let h=!1;a<e.length&&(h=(e[a]>>>t&1)===1),r.set(o,s-l,h),t--,t===-1&&(a++,t=7)}if(o+=i,o<0||n<=o){o-=i,i=-i;break}}}function Oi(r,e,n){const i=new Ci;n.forEach(function(l){i.put(l.mode.bit,4),i.put(l.getLength(),Wi.getCharCountIndicator(l.mode,r)),l.write(i)});const o=vt.getSymbolTotalCodewords(r),t=Nt.getTotalCodewordsCount(r,e),a=(o-t)*8;for(i.getLengthInBits()+4<=a&&i.put(0,4);i.getLengthInBits()%8!==0;)i.putBit(0);const s=(a-i.getLengthInBits())/8;for(let l=0;l<s;l++)i.put(l%2?17:236,8);return Ai(i,r,e)}function Ai(r,e,n){const i=vt.getSymbolTotalCodewords(e),o=Nt.getTotalCodewordsCount(e,n),t=i-o,a=Nt.getBlocksCount(e,n),s=i%a,l=a-s,h=Math.floor(i/a),d=Math.floor(t/a),I=d+1,x=h-d,m=new Ii(x);let $=0;const b=new Array(a),R=new Array(a);let w=0;const f=new Uint8Array(r.buffer);for(let j=0;j<a;j++){const G=j<l?d:I;b[j]=f.slice($,$+G),R[j]=m.encode(b[j]),$+=G,w=Math.max(w,G)}const g=new Uint8Array(i);let p=0,W,L;for(W=0;W<w;W++)for(L=0;L<a;L++)W<b[L].length&&(g[p++]=b[L][W]);for(W=0;W<x;W++)for(L=0;L<a;L++)g[p++]=R[L][W];return g}function ji(r,e,n,i){let o;if(Array.isArray(r))o=Tt.fromArray(r);else if(typeof r=="string"){let h=e;if(!h){const d=Tt.rawSplit(r);h=Ze.getBestVersionForData(d,n)}o=Tt.fromString(r,h||40)}else throw new Error("Invalid data");const t=Ze.getBestVersionForData(o,n);if(!t)throw new Error("The amount of data is too big to be stored in a QR Code");if(!e)e=t;else if(e<t)throw new Error(`
|
|
5
|
+
The chosen QR Code version cannot contain this amount of data.
|
|
6
|
+
Minimum version required to store current data is: `+t+`.
|
|
7
|
+
`);const a=Oi(e,n,o),s=vt.getSymbolSize(e),l=new $i(s);return Si(l,e),Ti(l),Bi(l,e),Bt(l,n,0),e>=7&&Pi(l,e),Li(l,a),isNaN(i)&&(i=Dt.getBestMask(l,Bt.bind(null,l,n))),Dt.applyMask(i,l),Bt(l,n,i),{modules:l,version:e,errorCorrectionLevel:n,maskPattern:i,segments:o}}Cn.create=function(e,n){if(typeof e>"u"||e==="")throw new Error("No input text");let i=St.M,o,t;return typeof n<"u"&&(i=St.from(n.errorCorrectionLevel,St.M),o=Ze.from(n.version),t=Dt.from(n.maskPattern),n.toSJISFunc&&vt.setToSJISFunction(n.toSJISFunc)),ji(e,o,i,t)};var An={},Jt={};(function(r){function e(n){if(typeof n=="number"&&(n=n.toString()),typeof n!="string")throw new Error("Color should be defined as hex string");let i=n.slice().replace("#","").split("");if(i.length<3||i.length===5||i.length>8)throw new Error("Invalid hex color: "+n);(i.length===3||i.length===4)&&(i=Array.prototype.concat.apply([],i.map(function(t){return[t,t]}))),i.length===6&&i.push("F","F");const o=parseInt(i.join(""),16);return{r:o>>24&255,g:o>>16&255,b:o>>8&255,a:o&255,hex:"#"+i.slice(0,6).join("")}}r.getOptions=function(i){i||(i={}),i.color||(i.color={});const o=typeof i.margin>"u"||i.margin===null||i.margin<0?4:i.margin,t=i.width&&i.width>=21?i.width:void 0,a=i.scale||4;return{width:t,scale:t?4:a,margin:o,color:{dark:e(i.color.dark||"#000000ff"),light:e(i.color.light||"#ffffffff")},type:i.type,rendererOpts:i.rendererOpts||{}}},r.getScale=function(i,o){return o.width&&o.width>=i+o.margin*2?o.width/(i+o.margin*2):o.scale},r.getImageWidth=function(i,o){const t=r.getScale(i,o);return Math.floor((i+o.margin*2)*t)},r.qrToImageData=function(i,o,t){const a=o.modules.size,s=o.modules.data,l=r.getScale(a,t),h=Math.floor((a+t.margin*2)*l),d=t.margin*l,I=[t.color.light,t.color.dark];for(let x=0;x<h;x++)for(let m=0;m<h;m++){let $=(x*h+m)*4,b=t.color.light;if(x>=d&&m>=d&&x<h-d&&m<h-d){const R=Math.floor((x-d)/l),w=Math.floor((m-d)/l);b=I[s[R*a+w]?1:0]}i[$++]=b.r,i[$++]=b.g,i[$++]=b.b,i[$]=b.a}}})(Jt);(function(r){const e=Jt;function n(o,t,a){o.clearRect(0,0,t.width,t.height),t.style||(t.style={}),t.height=a,t.width=a,t.style.height=a+"px",t.style.width=a+"px"}function i(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}r.render=function(t,a,s){let l=s,h=a;typeof l>"u"&&(!a||!a.getContext)&&(l=a,a=void 0),a||(h=i()),l=e.getOptions(l);const d=e.getImageWidth(t.modules.size,l),I=h.getContext("2d"),x=I.createImageData(d,d);return e.qrToImageData(x.data,t,l),n(I,h,d),I.putImageData(x,0,0),h},r.renderToDataURL=function(t,a,s){let l=s;typeof l>"u"&&(!a||!a.getContext)&&(l=a,a=void 0),l||(l={});const h=r.render(t,a,l),d=l.type||"image/png",I=l.rendererOpts||{};return h.toDataURL(d,I.quality)}})(An);var jn={};const ki=Jt;function hn(r,e){const n=r.a/255,i=e+'="'+r.hex+'"';return n<1?i+" "+e+'-opacity="'+n.toFixed(2).slice(1)+'"':i}function Pt(r,e,n){let i=r+e;return typeof n<"u"&&(i+=" "+n),i}function zi(r,e,n){let i="",o=0,t=!1,a=0;for(let s=0;s<r.length;s++){const l=Math.floor(s%e),h=Math.floor(s/e);!l&&!t&&(t=!0),r[s]?(a++,s>0&&l>0&&r[s-1]||(i+=t?Pt("M",l+n,.5+h+n):Pt("m",o,0),o=0,t=!1),l+1<e&&r[s+1]||(i+=Pt("h",a),a=0)):o++}return i}jn.render=function(e,n,i){const o=ki.getOptions(n),t=e.modules.size,a=e.modules.data,s=t+o.margin*2,l=o.color.light.a?"<path "+hn(o.color.light,"fill")+' d="M0 0h'+s+"v"+s+'H0z"/>':"",h="<path "+hn(o.color.dark,"stroke")+' d="'+zi(a,t,o.margin)+'"/>',d='viewBox="0 0 '+s+" "+s+'"',x='<svg xmlns="http://www.w3.org/2000/svg" '+(o.width?'width="'+o.width+'" height="'+o.width+'" ':"")+d+' shape-rendering="crispEdges">'+l+h+`</svg>
|
|
8
|
+
`;return typeof i=="function"&&i(null,x),x};const Di=Xn,Mt=Cn,kn=An,Ni=jn;function Qt(r,e,n,i,o){const t=[].slice.call(arguments,1),a=t.length,s=typeof t[a-1]=="function";if(!s&&!Di())throw new Error("Callback required as last argument");if(s){if(a<2)throw new Error("Too few arguments provided");a===2?(o=n,n=e,e=i=void 0):a===3&&(e.getContext&&typeof o>"u"?(o=i,i=void 0):(o=i,i=n,n=e,e=void 0))}else{if(a<1)throw new Error("Too few arguments provided");return a===1?(n=e,e=i=void 0):a===2&&!e.getContext&&(i=n,n=e,e=void 0),new Promise(function(l,h){try{const d=Mt.create(n,i);l(r(d,e,i))}catch(d){h(d)}})}try{const l=Mt.create(n,i);o(null,r(l,e,i))}catch(l){o(l)}}Fe.create=Mt.create;Fe.toCanvas=Qt.bind(null,kn.render);Fe.toDataURL=Qt.bind(null,kn.renderToDataURL);Fe.toString=Qt.bind(null,function(r,e,n){return Ni.render(r,n)});const Mi=B`
|
|
9
|
+
:host {
|
|
10
|
+
position: relative;
|
|
11
|
+
background-color: var(--wui-color-gray-glass-002);
|
|
12
|
+
display: flex;
|
|
13
|
+
justify-content: center;
|
|
14
|
+
align-items: center;
|
|
15
|
+
width: var(--local-size);
|
|
16
|
+
height: var(--local-size);
|
|
17
|
+
border-radius: inherit;
|
|
18
|
+
border-radius: var(--local-border-radius);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
:host > wui-flex {
|
|
22
|
+
overflow: hidden;
|
|
23
|
+
border-radius: inherit;
|
|
24
|
+
border-radius: var(--local-border-radius);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
:host::after {
|
|
28
|
+
content: '';
|
|
29
|
+
position: absolute;
|
|
30
|
+
top: 0;
|
|
31
|
+
bottom: 0;
|
|
32
|
+
left: 0;
|
|
33
|
+
right: 0;
|
|
34
|
+
border-radius: inherit;
|
|
35
|
+
border: 1px solid var(--wui-color-gray-glass-010);
|
|
36
|
+
pointer-events: none;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
:host([name='Extension'])::after {
|
|
40
|
+
border: 1px solid var(--wui-color-accent-glass-010);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
:host([data-wallet-icon='allWallets']) {
|
|
44
|
+
background-color: var(--wui-all-wallets-bg-100);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
:host([data-wallet-icon='allWallets'])::after {
|
|
48
|
+
border: 1px solid var(--wui-color-accent-glass-010);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
wui-icon[data-parent-size='inherit'] {
|
|
52
|
+
width: 75%;
|
|
53
|
+
height: 75%;
|
|
54
|
+
align-items: center;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
wui-icon[data-parent-size='sm'] {
|
|
58
|
+
width: 18px;
|
|
59
|
+
height: 18px;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
wui-icon[data-parent-size='md'] {
|
|
63
|
+
width: 24px;
|
|
64
|
+
height: 24px;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
wui-icon[data-parent-size='lg'] {
|
|
68
|
+
width: 42px;
|
|
69
|
+
height: 42px;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
wui-icon[data-parent-size='full'] {
|
|
73
|
+
width: 100%;
|
|
74
|
+
height: 100%;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
:host > wui-icon-box {
|
|
78
|
+
position: absolute;
|
|
79
|
+
overflow: hidden;
|
|
80
|
+
right: -1px;
|
|
81
|
+
bottom: -2px;
|
|
82
|
+
z-index: 1;
|
|
83
|
+
border: 2px solid var(--wui-color-bg-150, #1e1f1f);
|
|
84
|
+
padding: 1px;
|
|
85
|
+
}
|
|
86
|
+
`;var xe=function(r,e,n,i){var o=arguments.length,t=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(r,e,n,i);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(t=(o<3?a(t):o>3?a(e,n,t):a(e,n))||t);return o>3&&t&&Object.defineProperty(e,n,t),t};let le=class extends _{constructor(){super(...arguments),this.size="md",this.name="",this.installed=!1,this.badgeSize="xs"}render(){let e="xxs";return this.size==="lg"?e="m":this.size==="md"?e="xs":e="xxs",this.style.cssText=`
|
|
87
|
+
--local-border-radius: var(--wui-border-radius-${e});
|
|
88
|
+
--local-size: var(--wui-wallet-image-size-${this.size});
|
|
89
|
+
`,this.walletIcon&&(this.dataset.walletIcon=this.walletIcon),c`
|
|
90
|
+
<wui-flex justifyContent="center" alignItems="center"> ${this.templateVisual()} </wui-flex>
|
|
91
|
+
`}templateVisual(){return this.imageSrc?c`<wui-image src=${this.imageSrc} alt=${this.name}></wui-image>`:this.walletIcon?c`<wui-icon
|
|
92
|
+
data-parent-size="md"
|
|
93
|
+
size="md"
|
|
94
|
+
color="inherit"
|
|
95
|
+
name=${this.walletIcon}
|
|
96
|
+
></wui-icon>`:c`<wui-icon
|
|
97
|
+
data-parent-size=${this.size}
|
|
98
|
+
size="inherit"
|
|
99
|
+
color="inherit"
|
|
100
|
+
name="walletPlaceholder"
|
|
101
|
+
></wui-icon>`}};le.styles=[M,A,Mi];xe([u()],le.prototype,"size",void 0);xe([u()],le.prototype,"name",void 0);xe([u()],le.prototype,"imageSrc",void 0);xe([u()],le.prototype,"walletIcon",void 0);xe([u({type:Boolean})],le.prototype,"installed",void 0);xe([u()],le.prototype,"badgeSize",void 0);le=xe([C("wui-wallet-image")],le);const Ui=B`
|
|
102
|
+
:host {
|
|
103
|
+
position: relative;
|
|
104
|
+
border-radius: var(--wui-border-radius-xxs);
|
|
105
|
+
width: 40px;
|
|
106
|
+
height: 40px;
|
|
107
|
+
overflow: hidden;
|
|
108
|
+
background: var(--wui-color-gray-glass-002);
|
|
109
|
+
display: flex;
|
|
110
|
+
justify-content: center;
|
|
111
|
+
align-items: center;
|
|
112
|
+
flex-wrap: wrap;
|
|
113
|
+
gap: var(--wui-spacing-4xs);
|
|
114
|
+
padding: 3.75px !important;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
:host::after {
|
|
118
|
+
content: '';
|
|
119
|
+
position: absolute;
|
|
120
|
+
top: 0;
|
|
121
|
+
bottom: 0;
|
|
122
|
+
left: 0;
|
|
123
|
+
right: 0;
|
|
124
|
+
border-radius: inherit;
|
|
125
|
+
border: 1px solid var(--wui-color-gray-glass-010);
|
|
126
|
+
pointer-events: none;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
:host > wui-wallet-image {
|
|
130
|
+
width: 14px;
|
|
131
|
+
height: 14px;
|
|
132
|
+
border-radius: var(--wui-border-radius-5xs);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
:host > wui-flex {
|
|
136
|
+
padding: 2px;
|
|
137
|
+
position: fixed;
|
|
138
|
+
overflow: hidden;
|
|
139
|
+
left: 34px;
|
|
140
|
+
bottom: 8px;
|
|
141
|
+
background: var(--dark-background-150, #1e1f1f);
|
|
142
|
+
border-radius: 50%;
|
|
143
|
+
z-index: 2;
|
|
144
|
+
display: flex;
|
|
145
|
+
}
|
|
146
|
+
`;var zn=function(r,e,n,i){var o=arguments.length,t=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(r,e,n,i);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(t=(o<3?a(t):o>3?a(e,n,t):a(e,n))||t);return o>3&&t&&Object.defineProperty(e,n,t),t};const Lt=4;let et=class extends _{constructor(){super(...arguments),this.walletImages=[]}render(){const e=this.walletImages.length<Lt;return c`${this.walletImages.slice(0,Lt).map(({src:n,walletName:i})=>c`
|
|
147
|
+
<wui-wallet-image
|
|
148
|
+
size="inherit"
|
|
149
|
+
imageSrc=${n}
|
|
150
|
+
name=${y(i)}
|
|
151
|
+
></wui-wallet-image>
|
|
152
|
+
`)}
|
|
153
|
+
${e?[...Array(Lt-this.walletImages.length)].map(()=>c` <wui-wallet-image size="inherit" name=""></wui-wallet-image>`):null}
|
|
154
|
+
<wui-flex>
|
|
155
|
+
<wui-icon-box
|
|
156
|
+
size="xxs"
|
|
157
|
+
iconSize="xxs"
|
|
158
|
+
iconcolor="success-100"
|
|
159
|
+
backgroundcolor="success-100"
|
|
160
|
+
icon="checkmark"
|
|
161
|
+
background="opaque"
|
|
162
|
+
></wui-icon-box>
|
|
163
|
+
</wui-flex>`}};et.styles=[A,Ui];zn([u({type:Array})],et.prototype,"walletImages",void 0);et=zn([C("wui-all-wallets-image")],et);const Fi=B`
|
|
164
|
+
button {
|
|
165
|
+
column-gap: var(--wui-spacing-s);
|
|
166
|
+
padding: 7px var(--wui-spacing-l) 7px var(--wui-spacing-xs);
|
|
167
|
+
width: 100%;
|
|
168
|
+
background-color: var(--wui-color-gray-glass-002);
|
|
169
|
+
border-radius: var(--wui-border-radius-xs);
|
|
170
|
+
color: var(--wui-color-fg-100);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
button > wui-text:nth-child(2) {
|
|
174
|
+
display: flex;
|
|
175
|
+
flex: 1;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
button:disabled {
|
|
179
|
+
background-color: var(--wui-color-gray-glass-015);
|
|
180
|
+
color: var(--wui-color-gray-glass-015);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
button:disabled > wui-tag {
|
|
184
|
+
background-color: var(--wui-color-gray-glass-010);
|
|
185
|
+
color: var(--wui-color-fg-300);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
wui-icon {
|
|
189
|
+
color: var(--wui-color-fg-200) !important;
|
|
190
|
+
}
|
|
191
|
+
`;var U=function(r,e,n,i){var o=arguments.length,t=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(r,e,n,i);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(t=(o<3?a(t):o>3?a(e,n,t):a(e,n))||t);return o>3&&t&&Object.defineProperty(e,n,t),t};let k=class extends _{constructor(){super(...arguments),this.walletImages=[],this.imageSrc="",this.name="",this.tabIdx=void 0,this.installed=!1,this.disabled=!1,this.showAllWallets=!1,this.loading=!1,this.loadingSpinnerColor="accent-100"}render(){return c`
|
|
192
|
+
<button ?disabled=${this.disabled} tabindex=${y(this.tabIdx)}>
|
|
193
|
+
${this.templateAllWallets()} ${this.templateWalletImage()}
|
|
194
|
+
<wui-text variant="paragraph-500" color="inherit">${this.name}</wui-text>
|
|
195
|
+
${this.templateStatus()}
|
|
196
|
+
</button>
|
|
197
|
+
`}templateAllWallets(){return this.showAllWallets&&this.imageSrc?c` <wui-all-wallets-image .imageeSrc=${this.imageSrc}> </wui-all-wallets-image> `:this.showAllWallets&&this.walletIcon?c` <wui-wallet-image .walletIcon=${this.walletIcon} size="sm"> </wui-wallet-image> `:null}templateWalletImage(){return!this.showAllWallets&&this.imageSrc?c`<wui-wallet-image
|
|
198
|
+
size="sm"
|
|
199
|
+
imageSrc=${this.imageSrc}
|
|
200
|
+
name=${this.name}
|
|
201
|
+
.installed=${this.installed}
|
|
202
|
+
></wui-wallet-image>`:!this.showAllWallets&&!this.imageSrc?c`<wui-wallet-image size="sm" name=${this.name}></wui-wallet-image>`:null}templateStatus(){return this.loading?c`<wui-loading-spinner
|
|
203
|
+
size="lg"
|
|
204
|
+
color=${this.loadingSpinnerColor}
|
|
205
|
+
></wui-loading-spinner>`:this.tagLabel&&this.tagVariant?c`<wui-tag variant=${this.tagVariant}>${this.tagLabel}</wui-tag>`:this.icon?c`<wui-icon color="inherit" size="sm" name=${this.icon}></wui-icon>`:null}};k.styles=[A,M,Fi];U([u({type:Array})],k.prototype,"walletImages",void 0);U([u()],k.prototype,"imageSrc",void 0);U([u()],k.prototype,"name",void 0);U([u()],k.prototype,"tagLabel",void 0);U([u()],k.prototype,"tagVariant",void 0);U([u()],k.prototype,"icon",void 0);U([u()],k.prototype,"walletIcon",void 0);U([u()],k.prototype,"tabIdx",void 0);U([u({type:Boolean})],k.prototype,"installed",void 0);U([u({type:Boolean})],k.prototype,"disabled",void 0);U([u({type:Boolean})],k.prototype,"showAllWallets",void 0);U([u({type:Boolean})],k.prototype,"loading",void 0);U([u({type:String})],k.prototype,"loadingSpinnerColor",void 0);k=U([C("wui-list-wallet")],k);var Be=function(r,e,n,i){var o=arguments.length,t=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(r,e,n,i);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(t=(o<3?a(t):o>3?a(e,n,t):a(e,n))||t);return o>3&&t&&Object.defineProperty(e,n,t),t};let we=class extends _{constructor(){super(),this.unsubscribe=[],this.tabIdx=void 0,this.connectors=P.state.connectors,this.count=T.state.count,this.filteredCount=T.state.filteredWallets.length,this.isFetchingRecommendedWallets=T.state.isFetchingRecommendedWallets,this.unsubscribe.push(P.subscribeKey("connectors",e=>this.connectors=e),T.subscribeKey("count",e=>this.count=e),T.subscribeKey("filteredWallets",e=>this.filteredCount=e.length),T.subscribeKey("isFetchingRecommendedWallets",e=>this.isFetchingRecommendedWallets=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){const e=this.connectors.find(l=>l.id==="walletConnect"),{allWallets:n}=Y.state;if(!e||n==="HIDE"||n==="ONLY_MOBILE"&&!E.isMobile())return null;const i=T.state.featured.length,o=this.count+i,t=o<10?o:Math.floor(o/10)*10,a=this.filteredCount>0?this.filteredCount:t;let s=`${a}`;return this.filteredCount>0?s=`${this.filteredCount}`:a<o&&(s=`${a}+`),c`
|
|
206
|
+
<wui-list-wallet
|
|
207
|
+
name="All Wallets"
|
|
208
|
+
walletIcon="allWallets"
|
|
209
|
+
showAllWallets
|
|
210
|
+
@click=${this.onAllWallets.bind(this)}
|
|
211
|
+
tagLabel=${s}
|
|
212
|
+
tagVariant="shade"
|
|
213
|
+
data-testid="all-wallets"
|
|
214
|
+
tabIdx=${y(this.tabIdx)}
|
|
215
|
+
.loading=${this.isFetchingRecommendedWallets}
|
|
216
|
+
loadingSpinnerColor=${this.isFetchingRecommendedWallets?"fg-300":"accent-100"}
|
|
217
|
+
></wui-list-wallet>
|
|
218
|
+
`}onAllWallets(){J.sendEvent({type:"track",event:"CLICK_ALL_WALLETS"}),O.push("AllWallets")}};Be([u()],we.prototype,"tabIdx",void 0);Be([v()],we.prototype,"connectors",void 0);Be([v()],we.prototype,"count",void 0);Be([v()],we.prototype,"filteredCount",void 0);Be([v()],we.prototype,"isFetchingRecommendedWallets",void 0);we=Be([C("w3m-all-wallets-widget")],we);var Xt=function(r,e,n,i){var o=arguments.length,t=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(r,e,n,i);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(t=(o<3?a(t):o>3?a(e,n,t):a(e,n))||t);return o>3&&t&&Object.defineProperty(e,n,t),t};let tt=class extends _{constructor(){super(),this.unsubscribe=[],this.tabIdx=void 0,this.connectors=P.state.connectors,this.unsubscribe.push(P.subscribeKey("connectors",e=>this.connectors=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){const e=this.connectors.filter(n=>n.type==="ANNOUNCED");return e?.length?c`
|
|
219
|
+
<wui-flex flexDirection="column" gap="xs">
|
|
220
|
+
${e.filter(ke.showConnector).map(n=>c`
|
|
221
|
+
<wui-list-wallet
|
|
222
|
+
imageSrc=${y(D.getConnectorImage(n))}
|
|
223
|
+
name=${n.name??"Unknown"}
|
|
224
|
+
@click=${()=>this.onConnector(n)}
|
|
225
|
+
tagVariant="success"
|
|
226
|
+
tagLabel="installed"
|
|
227
|
+
data-testid=${`wallet-selector-${n.id}`}
|
|
228
|
+
.installed=${!0}
|
|
229
|
+
tabIdx=${y(this.tabIdx)}
|
|
230
|
+
>
|
|
231
|
+
</wui-list-wallet>
|
|
232
|
+
`)}
|
|
233
|
+
</wui-flex>
|
|
234
|
+
`:(this.style.cssText="display: none",null)}onConnector(e){e.id==="walletConnect"?E.isMobile()?O.push("AllWallets"):O.push("ConnectingWalletConnect"):O.push("ConnectingExternal",{connector:e})}};Xt([u()],tt.prototype,"tabIdx",void 0);Xt([v()],tt.prototype,"connectors",void 0);tt=Xt([C("w3m-connect-announced-widget")],tt);var yt=function(r,e,n,i){var o=arguments.length,t=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(r,e,n,i);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(t=(o<3?a(t):o>3?a(e,n,t):a(e,n))||t);return o>3&&t&&Object.defineProperty(e,n,t),t};let De=class extends _{constructor(){super(),this.unsubscribe=[],this.tabIdx=void 0,this.connectors=P.state.connectors,this.loading=!1,this.unsubscribe.push(P.subscribeKey("connectors",e=>this.connectors=e)),E.isTelegram()&&E.isIos()&&(this.loading=!S.state.wcUri,this.unsubscribe.push(S.subscribeKey("wcUri",e=>this.loading=!e)))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){const{customWallets:e}=Y.state;if(!e?.length)return this.style.cssText="display: none",null;const n=this.filterOutDuplicateWallets(e);return c`<wui-flex flexDirection="column" gap="xs">
|
|
235
|
+
${n.map(i=>c`
|
|
236
|
+
<wui-list-wallet
|
|
237
|
+
imageSrc=${y(D.getWalletImage(i))}
|
|
238
|
+
name=${i.name??"Unknown"}
|
|
239
|
+
@click=${()=>this.onConnectWallet(i)}
|
|
240
|
+
data-testid=${`wallet-selector-${i.id}`}
|
|
241
|
+
tabIdx=${y(this.tabIdx)}
|
|
242
|
+
?loading=${this.loading}
|
|
243
|
+
>
|
|
244
|
+
</wui-list-wallet>
|
|
245
|
+
`)}
|
|
246
|
+
</wui-flex>`}filterOutDuplicateWallets(e){const n=ft.getRecentWallets(),i=this.connectors.map(s=>s.info?.rdns).filter(Boolean),o=n.map(s=>s.rdns).filter(Boolean),t=i.concat(o);if(t.includes("io.metamask.mobile")&&E.isMobile()){const s=t.indexOf("io.metamask.mobile");t[s]="io.metamask"}return e.filter(s=>!t.includes(String(s?.rdns)))}onConnectWallet(e){this.loading||O.push("ConnectingWalletConnect",{wallet:e})}};yt([u()],De.prototype,"tabIdx",void 0);yt([v()],De.prototype,"connectors",void 0);yt([v()],De.prototype,"loading",void 0);De=yt([C("w3m-connect-custom-widget")],De);var Zt=function(r,e,n,i){var o=arguments.length,t=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(r,e,n,i);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(t=(o<3?a(t):o>3?a(e,n,t):a(e,n))||t);return o>3&&t&&Object.defineProperty(e,n,t),t};let nt=class extends _{constructor(){super(),this.unsubscribe=[],this.tabIdx=void 0,this.connectors=P.state.connectors,this.unsubscribe.push(P.subscribeKey("connectors",e=>this.connectors=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){const i=this.connectors.filter(o=>o.type==="EXTERNAL").filter(ke.showConnector).filter(o=>o.id!==Kn.CONNECTOR_ID.COINBASE_SDK);return i?.length?c`
|
|
247
|
+
<wui-flex flexDirection="column" gap="xs">
|
|
248
|
+
${i.map(o=>c`
|
|
249
|
+
<wui-list-wallet
|
|
250
|
+
imageSrc=${y(D.getConnectorImage(o))}
|
|
251
|
+
.installed=${!0}
|
|
252
|
+
name=${o.name??"Unknown"}
|
|
253
|
+
data-testid=${`wallet-selector-external-${o.id}`}
|
|
254
|
+
@click=${()=>this.onConnector(o)}
|
|
255
|
+
tabIdx=${y(this.tabIdx)}
|
|
256
|
+
>
|
|
257
|
+
</wui-list-wallet>
|
|
258
|
+
`)}
|
|
259
|
+
</wui-flex>
|
|
260
|
+
`:(this.style.cssText="display: none",null)}onConnector(e){O.push("ConnectingExternal",{connector:e})}};Zt([u()],nt.prototype,"tabIdx",void 0);Zt([v()],nt.prototype,"connectors",void 0);nt=Zt([C("w3m-connect-external-widget")],nt);var en=function(r,e,n,i){var o=arguments.length,t=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(r,e,n,i);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(t=(o<3?a(t):o>3?a(e,n,t):a(e,n))||t);return o>3&&t&&Object.defineProperty(e,n,t),t};let it=class extends _{constructor(){super(...arguments),this.tabIdx=void 0,this.wallets=[]}render(){return this.wallets.length?c`
|
|
261
|
+
<wui-flex flexDirection="column" gap="xs">
|
|
262
|
+
${this.wallets.map(e=>c`
|
|
263
|
+
<wui-list-wallet
|
|
264
|
+
data-testid=${`wallet-selector-featured-${e.id}`}
|
|
265
|
+
imageSrc=${y(D.getWalletImage(e))}
|
|
266
|
+
name=${e.name??"Unknown"}
|
|
267
|
+
@click=${()=>this.onConnectWallet(e)}
|
|
268
|
+
tabIdx=${y(this.tabIdx)}
|
|
269
|
+
>
|
|
270
|
+
</wui-list-wallet>
|
|
271
|
+
`)}
|
|
272
|
+
</wui-flex>
|
|
273
|
+
`:(this.style.cssText="display: none",null)}onConnectWallet(e){P.selectWalletConnector(e)}};en([u()],it.prototype,"tabIdx",void 0);en([u()],it.prototype,"wallets",void 0);it=en([C("w3m-connect-featured-widget")],it);var tn=function(r,e,n,i){var o=arguments.length,t=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(r,e,n,i);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(t=(o<3?a(t):o>3?a(e,n,t):a(e,n))||t);return o>3&&t&&Object.defineProperty(e,n,t),t};let ot=class extends _{constructor(){super(...arguments),this.tabIdx=void 0,this.connectors=[]}render(){const e=this.connectors.filter(ke.showConnector);return e.length===0?(this.style.cssText="display: none",null):c`
|
|
274
|
+
<wui-flex flexDirection="column" gap="xs">
|
|
275
|
+
${e.map(n=>c`
|
|
276
|
+
<wui-list-wallet
|
|
277
|
+
imageSrc=${y(D.getConnectorImage(n))}
|
|
278
|
+
.installed=${!0}
|
|
279
|
+
name=${n.name??"Unknown"}
|
|
280
|
+
tagVariant="success"
|
|
281
|
+
tagLabel="installed"
|
|
282
|
+
data-testid=${`wallet-selector-${n.id}`}
|
|
283
|
+
@click=${()=>this.onConnector(n)}
|
|
284
|
+
tabIdx=${y(this.tabIdx)}
|
|
285
|
+
>
|
|
286
|
+
</wui-list-wallet>
|
|
287
|
+
`)}
|
|
288
|
+
</wui-flex>
|
|
289
|
+
`}onConnector(e){P.setActiveConnector(e),O.push("ConnectingExternal",{connector:e})}};tn([u()],ot.prototype,"tabIdx",void 0);tn([u()],ot.prototype,"connectors",void 0);ot=tn([C("w3m-connect-injected-widget")],ot);var nn=function(r,e,n,i){var o=arguments.length,t=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(r,e,n,i);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(t=(o<3?a(t):o>3?a(e,n,t):a(e,n))||t);return o>3&&t&&Object.defineProperty(e,n,t),t};let rt=class extends _{constructor(){super(),this.unsubscribe=[],this.tabIdx=void 0,this.connectors=P.state.connectors,this.unsubscribe.push(P.subscribeKey("connectors",e=>this.connectors=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){const e=this.connectors.filter(n=>n.type==="MULTI_CHAIN"&&n.name!=="WalletConnect");return e?.length?c`
|
|
290
|
+
<wui-flex flexDirection="column" gap="xs">
|
|
291
|
+
${e.map(n=>c`
|
|
292
|
+
<wui-list-wallet
|
|
293
|
+
imageSrc=${y(D.getConnectorImage(n))}
|
|
294
|
+
.installed=${!0}
|
|
295
|
+
name=${n.name??"Unknown"}
|
|
296
|
+
tagVariant="shade"
|
|
297
|
+
tagLabel="multichain"
|
|
298
|
+
data-testid=${`wallet-selector-${n.id}`}
|
|
299
|
+
@click=${()=>this.onConnector(n)}
|
|
300
|
+
tabIdx=${y(this.tabIdx)}
|
|
301
|
+
>
|
|
302
|
+
</wui-list-wallet>
|
|
303
|
+
`)}
|
|
304
|
+
</wui-flex>
|
|
305
|
+
`:(this.style.cssText="display: none",null)}onConnector(e){P.setActiveConnector(e),O.push("ConnectingMultiChain")}};nn([u()],rt.prototype,"tabIdx",void 0);nn([v()],rt.prototype,"connectors",void 0);rt=nn([C("w3m-connect-multi-chain-widget")],rt);var xt=function(r,e,n,i){var o=arguments.length,t=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(r,e,n,i);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(t=(o<3?a(t):o>3?a(e,n,t):a(e,n))||t);return o>3&&t&&Object.defineProperty(e,n,t),t};let Ne=class extends _{constructor(){super(),this.unsubscribe=[],this.tabIdx=void 0,this.connectors=P.state.connectors,this.loading=!1,this.unsubscribe.push(P.subscribeKey("connectors",e=>this.connectors=e)),E.isTelegram()&&E.isIos()&&(this.loading=!S.state.wcUri,this.unsubscribe.push(S.subscribeKey("wcUri",e=>this.loading=!e)))}render(){const n=ft.getRecentWallets().filter(i=>!gt.isExcluded(i)).filter(i=>!this.hasWalletConnector(i)).filter(i=>this.isWalletCompatibleWithCurrentChain(i));return n.length?c`
|
|
306
|
+
<wui-flex flexDirection="column" gap="xs">
|
|
307
|
+
${n.map(i=>c`
|
|
308
|
+
<wui-list-wallet
|
|
309
|
+
imageSrc=${y(D.getWalletImage(i))}
|
|
310
|
+
name=${i.name??"Unknown"}
|
|
311
|
+
@click=${()=>this.onConnectWallet(i)}
|
|
312
|
+
tagLabel="recent"
|
|
313
|
+
tagVariant="shade"
|
|
314
|
+
tabIdx=${y(this.tabIdx)}
|
|
315
|
+
?loading=${this.loading}
|
|
316
|
+
>
|
|
317
|
+
</wui-list-wallet>
|
|
318
|
+
`)}
|
|
319
|
+
</wui-flex>
|
|
320
|
+
`:(this.style.cssText="display: none",null)}onConnectWallet(e){this.loading||P.selectWalletConnector(e)}hasWalletConnector(e){return this.connectors.some(n=>n.id===e.id||n.name===e.name)}isWalletCompatibleWithCurrentChain(e){const n=jt.state.activeChain;return n&&e.chains?e.chains.some(i=>{const o=i.split(":")[0];return n===o}):!0}};xt([u()],Ne.prototype,"tabIdx",void 0);xt([v()],Ne.prototype,"connectors",void 0);xt([v()],Ne.prototype,"loading",void 0);Ne=xt([C("w3m-connect-recent-widget")],Ne);var Ct=function(r,e,n,i){var o=arguments.length,t=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(r,e,n,i);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(t=(o<3?a(t):o>3?a(e,n,t):a(e,n))||t);return o>3&&t&&Object.defineProperty(e,n,t),t};let Me=class extends _{constructor(){super(),this.unsubscribe=[],this.tabIdx=void 0,this.wallets=[],this.loading=!1,E.isTelegram()&&E.isIos()&&(this.loading=!S.state.wcUri,this.unsubscribe.push(S.subscribeKey("wcUri",e=>this.loading=!e)))}render(){const{connectors:e}=P.state,{customWallets:n,featuredWalletIds:i}=Y.state,o=ft.getRecentWallets(),t=e.find(I=>I.id==="walletConnect"),s=e.filter(I=>I.type==="INJECTED"||I.type==="ANNOUNCED"||I.type==="MULTI_CHAIN").filter(I=>I.name!=="Browser Wallet");if(!t)return null;if(i||n||!this.wallets.length)return this.style.cssText="display: none",null;const l=s.length+o.length,h=Math.max(0,2-l),d=gt.filterOutDuplicateWallets(this.wallets).slice(0,h);return d.length?c`
|
|
321
|
+
<wui-flex flexDirection="column" gap="xs">
|
|
322
|
+
${d.map(I=>c`
|
|
323
|
+
<wui-list-wallet
|
|
324
|
+
imageSrc=${y(D.getWalletImage(I))}
|
|
325
|
+
name=${I?.name??"Unknown"}
|
|
326
|
+
@click=${()=>this.onConnectWallet(I)}
|
|
327
|
+
tabIdx=${y(this.tabIdx)}
|
|
328
|
+
?loading=${this.loading}
|
|
329
|
+
>
|
|
330
|
+
</wui-list-wallet>
|
|
331
|
+
`)}
|
|
332
|
+
</wui-flex>
|
|
333
|
+
`:(this.style.cssText="display: none",null)}onConnectWallet(e){if(this.loading)return;const n=P.getConnector(e.id,e.rdns);n?O.push("ConnectingExternal",{connector:n}):O.push("ConnectingWalletConnect",{wallet:e})}};Ct([u()],Me.prototype,"tabIdx",void 0);Ct([u()],Me.prototype,"wallets",void 0);Ct([v()],Me.prototype,"loading",void 0);Me=Ct([C("w3m-connect-recommended-widget")],Me);var $t=function(r,e,n,i){var o=arguments.length,t=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(r,e,n,i);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(t=(o<3?a(t):o>3?a(e,n,t):a(e,n))||t);return o>3&&t&&Object.defineProperty(e,n,t),t};let Ue=class extends _{constructor(){super(),this.unsubscribe=[],this.tabIdx=void 0,this.connectors=P.state.connectors,this.connectorImages=ln.state.connectorImages,this.unsubscribe.push(P.subscribeKey("connectors",e=>this.connectors=e),ln.subscribeKey("connectorImages",e=>this.connectorImages=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){if(E.isMobile())return this.style.cssText="display: none",null;const e=this.connectors.find(i=>i.id==="walletConnect");if(!e)return this.style.cssText="display: none",null;const n=e.imageUrl||this.connectorImages[e?.imageId??""];return c`
|
|
334
|
+
<wui-list-wallet
|
|
335
|
+
imageSrc=${y(n)}
|
|
336
|
+
name=${e.name??"Unknown"}
|
|
337
|
+
@click=${()=>this.onConnector(e)}
|
|
338
|
+
tagLabel="qr code"
|
|
339
|
+
tagVariant="main"
|
|
340
|
+
tabIdx=${y(this.tabIdx)}
|
|
341
|
+
data-testid="wallet-selector-walletconnect"
|
|
342
|
+
>
|
|
343
|
+
</wui-list-wallet>
|
|
344
|
+
`}onConnector(e){P.setActiveConnector(e),O.push("ConnectingWalletConnect")}};$t([u()],Ue.prototype,"tabIdx",void 0);$t([v()],Ue.prototype,"connectors",void 0);$t([v()],Ue.prototype,"connectorImages",void 0);Ue=$t([C("w3m-connect-walletconnect-widget")],Ue);const Vi=B`
|
|
345
|
+
:host {
|
|
346
|
+
margin-top: var(--wui-spacing-3xs);
|
|
347
|
+
}
|
|
348
|
+
wui-separator {
|
|
349
|
+
margin: var(--wui-spacing-m) calc(var(--wui-spacing-m) * -1) var(--wui-spacing-xs)
|
|
350
|
+
calc(var(--wui-spacing-m) * -1);
|
|
351
|
+
width: calc(100% + var(--wui-spacing-s) * 2);
|
|
352
|
+
}
|
|
353
|
+
`;var qe=function(r,e,n,i){var o=arguments.length,t=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(r,e,n,i);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(t=(o<3?a(t):o>3?a(e,n,t):a(e,n))||t);return o>3&&t&&Object.defineProperty(e,n,t),t};let be=class extends _{constructor(){super(),this.unsubscribe=[],this.tabIdx=void 0,this.connectors=P.state.connectors,this.recommended=T.state.recommended,this.featured=T.state.featured,this.unsubscribe.push(P.subscribeKey("connectors",e=>this.connectors=e),T.subscribeKey("recommended",e=>this.recommended=e),T.subscribeKey("featured",e=>this.featured=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return c`
|
|
354
|
+
<wui-flex flexDirection="column" gap="xs"> ${this.connectorListTemplate()} </wui-flex>
|
|
355
|
+
`}connectorListTemplate(){const{custom:e,recent:n,announced:i,injected:o,multiChain:t,recommended:a,featured:s,external:l}=ke.getConnectorsByType(this.connectors,this.recommended,this.featured);return ke.getConnectorTypeOrder({custom:e,recent:n,announced:i,injected:o,multiChain:t,recommended:a,featured:s,external:l}).map(d=>{switch(d){case"injected":return c`
|
|
356
|
+
${t.length?c`<w3m-connect-multi-chain-widget
|
|
357
|
+
tabIdx=${y(this.tabIdx)}
|
|
358
|
+
></w3m-connect-multi-chain-widget>`:null}
|
|
359
|
+
${i.length?c`<w3m-connect-announced-widget
|
|
360
|
+
tabIdx=${y(this.tabIdx)}
|
|
361
|
+
></w3m-connect-announced-widget>`:null}
|
|
362
|
+
${o.length?c`<w3m-connect-injected-widget
|
|
363
|
+
.connectors=${o}
|
|
364
|
+
tabIdx=${y(this.tabIdx)}
|
|
365
|
+
></w3m-connect-injected-widget>`:null}
|
|
366
|
+
`;case"walletConnect":return c`<w3m-connect-walletconnect-widget
|
|
367
|
+
tabIdx=${y(this.tabIdx)}
|
|
368
|
+
></w3m-connect-walletconnect-widget>`;case"recent":return c`<w3m-connect-recent-widget
|
|
369
|
+
tabIdx=${y(this.tabIdx)}
|
|
370
|
+
></w3m-connect-recent-widget>`;case"featured":return c`<w3m-connect-featured-widget
|
|
371
|
+
.wallets=${s}
|
|
372
|
+
tabIdx=${y(this.tabIdx)}
|
|
373
|
+
></w3m-connect-featured-widget>`;case"custom":return c`<w3m-connect-custom-widget
|
|
374
|
+
tabIdx=${y(this.tabIdx)}
|
|
375
|
+
></w3m-connect-custom-widget>`;case"external":return c`<w3m-connect-external-widget
|
|
376
|
+
tabIdx=${y(this.tabIdx)}
|
|
377
|
+
></w3m-connect-external-widget>`;case"recommended":return c`<w3m-connect-recommended-widget
|
|
378
|
+
.wallets=${a}
|
|
379
|
+
tabIdx=${y(this.tabIdx)}
|
|
380
|
+
></w3m-connect-recommended-widget>`;default:return console.warn(`Unknown connector type: ${d}`),null}})}};be.styles=Vi;qe([u()],be.prototype,"tabIdx",void 0);qe([v()],be.prototype,"connectors",void 0);qe([v()],be.prototype,"recommended",void 0);qe([v()],be.prototype,"featured",void 0);be=qe([C("w3m-connector-list")],be);const qi=B`
|
|
381
|
+
:host {
|
|
382
|
+
display: inline-flex;
|
|
383
|
+
background-color: var(--wui-color-gray-glass-002);
|
|
384
|
+
border-radius: var(--wui-border-radius-3xl);
|
|
385
|
+
padding: var(--wui-spacing-3xs);
|
|
386
|
+
position: relative;
|
|
387
|
+
height: 36px;
|
|
388
|
+
min-height: 36px;
|
|
389
|
+
overflow: hidden;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
:host::before {
|
|
393
|
+
content: '';
|
|
394
|
+
position: absolute;
|
|
395
|
+
pointer-events: none;
|
|
396
|
+
top: 4px;
|
|
397
|
+
left: 4px;
|
|
398
|
+
display: block;
|
|
399
|
+
width: var(--local-tab-width);
|
|
400
|
+
height: 28px;
|
|
401
|
+
border-radius: var(--wui-border-radius-3xl);
|
|
402
|
+
background-color: var(--wui-color-gray-glass-002);
|
|
403
|
+
box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-002);
|
|
404
|
+
transform: translateX(calc(var(--local-tab) * var(--local-tab-width)));
|
|
405
|
+
transition: transform var(--wui-ease-out-power-1) var(--wui-duration-md);
|
|
406
|
+
will-change: background-color, opacity;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
:host([data-type='flex'])::before {
|
|
410
|
+
left: 3px;
|
|
411
|
+
transform: translateX(calc((var(--local-tab) * 34px) + (var(--local-tab) * 4px)));
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
:host([data-type='flex']) {
|
|
415
|
+
display: flex;
|
|
416
|
+
padding: 0px 0px 0px 12px;
|
|
417
|
+
gap: 4px;
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
:host([data-type='flex']) > button > wui-text {
|
|
421
|
+
position: absolute;
|
|
422
|
+
left: 18px;
|
|
423
|
+
opacity: 0;
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
button[data-active='true'] > wui-icon,
|
|
427
|
+
button[data-active='true'] > wui-text {
|
|
428
|
+
color: var(--wui-color-fg-100);
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
button[data-active='false'] > wui-icon,
|
|
432
|
+
button[data-active='false'] > wui-text {
|
|
433
|
+
color: var(--wui-color-fg-200);
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
button[data-active='true']:disabled,
|
|
437
|
+
button[data-active='false']:disabled {
|
|
438
|
+
background-color: transparent;
|
|
439
|
+
opacity: 0.5;
|
|
440
|
+
cursor: not-allowed;
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
button[data-active='true']:disabled > wui-text {
|
|
444
|
+
color: var(--wui-color-fg-200);
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
button[data-active='false']:disabled > wui-text {
|
|
448
|
+
color: var(--wui-color-fg-300);
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
button > wui-icon,
|
|
452
|
+
button > wui-text {
|
|
453
|
+
pointer-events: none;
|
|
454
|
+
transition: color var(--wui-e ase-out-power-1) var(--wui-duration-md);
|
|
455
|
+
will-change: color;
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
button {
|
|
459
|
+
width: var(--local-tab-width);
|
|
460
|
+
transition: background-color var(--wui-ease-out-power-1) var(--wui-duration-md);
|
|
461
|
+
will-change: background-color;
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
:host([data-type='flex']) > button {
|
|
465
|
+
width: 34px;
|
|
466
|
+
position: relative;
|
|
467
|
+
display: flex;
|
|
468
|
+
justify-content: flex-start;
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
button:hover:enabled,
|
|
472
|
+
button:active:enabled {
|
|
473
|
+
background-color: transparent !important;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
button:hover:enabled > wui-icon,
|
|
477
|
+
button:active:enabled > wui-icon {
|
|
478
|
+
transition: all var(--wui-ease-out-power-1) var(--wui-duration-lg);
|
|
479
|
+
color: var(--wui-color-fg-125);
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
button:hover:enabled > wui-text,
|
|
483
|
+
button:active:enabled > wui-text {
|
|
484
|
+
transition: all var(--wui-ease-out-power-1) var(--wui-duration-lg);
|
|
485
|
+
color: var(--wui-color-fg-125);
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
button {
|
|
489
|
+
border-radius: var(--wui-border-radius-3xl);
|
|
490
|
+
}
|
|
491
|
+
`;var ge=function(r,e,n,i){var o=arguments.length,t=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(r,e,n,i);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(t=(o<3?a(t):o>3?a(e,n,t):a(e,n))||t);return o>3&&t&&Object.defineProperty(e,n,t),t};let ee=class extends _{constructor(){super(...arguments),this.tabs=[],this.onTabChange=()=>null,this.buttons=[],this.disabled=!1,this.localTabWidth="100px",this.activeTab=0,this.isDense=!1}render(){return this.isDense=this.tabs.length>3,this.style.cssText=`
|
|
492
|
+
--local-tab: ${this.activeTab};
|
|
493
|
+
--local-tab-width: ${this.localTabWidth};
|
|
494
|
+
`,this.dataset.type=this.isDense?"flex":"block",this.tabs.map((e,n)=>{const i=n===this.activeTab;return c`
|
|
495
|
+
<button
|
|
496
|
+
?disabled=${this.disabled}
|
|
497
|
+
@click=${()=>this.onTabClick(n)}
|
|
498
|
+
data-active=${i}
|
|
499
|
+
data-testid="tab-${e.label?.toLowerCase()}"
|
|
500
|
+
>
|
|
501
|
+
${this.iconTemplate(e)}
|
|
502
|
+
<wui-text variant="small-600" color="inherit"> ${e.label} </wui-text>
|
|
503
|
+
</button>
|
|
504
|
+
`})}firstUpdated(){this.shadowRoot&&this.isDense&&(this.buttons=[...this.shadowRoot.querySelectorAll("button")],setTimeout(()=>{this.animateTabs(0,!0)},0))}iconTemplate(e){return e.icon?c`<wui-icon size="xs" color="inherit" name=${e.icon}></wui-icon>`:null}onTabClick(e){this.buttons&&this.animateTabs(e,!1),this.activeTab=e,this.onTabChange(e)}animateTabs(e,n){const i=this.buttons[this.activeTab],o=this.buttons[e],t=i?.querySelector("wui-text"),a=o?.querySelector("wui-text"),s=o?.getBoundingClientRect(),l=a?.getBoundingClientRect();i&&t&&!n&&e!==this.activeTab&&(t.animate([{opacity:0}],{duration:50,easing:"ease",fill:"forwards"}),i.animate([{width:"34px"}],{duration:500,easing:"ease",fill:"forwards"})),o&&s&&l&&a&&(e!==this.activeTab||n)&&(this.localTabWidth=`${Math.round(s.width+l.width)+6}px`,o.animate([{width:`${s.width+l.width}px`}],{duration:n?0:500,fill:"forwards",easing:"ease"}),a.animate([{opacity:1}],{duration:n?0:125,delay:n?0:200,fill:"forwards",easing:"ease"}))}};ee.styles=[A,M,qi];ge([u({type:Array})],ee.prototype,"tabs",void 0);ge([u()],ee.prototype,"onTabChange",void 0);ge([u({type:Array})],ee.prototype,"buttons",void 0);ge([u({type:Boolean})],ee.prototype,"disabled",void 0);ge([u()],ee.prototype,"localTabWidth",void 0);ge([v()],ee.prototype,"activeTab",void 0);ge([v()],ee.prototype,"isDense",void 0);ee=ge([C("wui-tabs")],ee);var on=function(r,e,n,i){var o=arguments.length,t=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(r,e,n,i);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(t=(o<3?a(t):o>3?a(e,n,t):a(e,n))||t);return o>3&&t&&Object.defineProperty(e,n,t),t};let at=class extends _{constructor(){super(...arguments),this.platformTabs=[],this.unsubscribe=[],this.platforms=[],this.onSelectPlatfrom=void 0}disconnectCallback(){this.unsubscribe.forEach(e=>e())}render(){const e=this.generateTabs();return c`
|
|
505
|
+
<wui-flex justifyContent="center" .padding=${["0","0","l","0"]}>
|
|
506
|
+
<wui-tabs .tabs=${e} .onTabChange=${this.onTabChange.bind(this)}></wui-tabs>
|
|
507
|
+
</wui-flex>
|
|
508
|
+
`}generateTabs(){const e=this.platforms.map(n=>n==="browser"?{label:"Browser",icon:"extension",platform:"browser"}:n==="mobile"?{label:"Mobile",icon:"mobile",platform:"mobile"}:n==="qrcode"?{label:"Mobile",icon:"mobile",platform:"qrcode"}:n==="web"?{label:"Webapp",icon:"browser",platform:"web"}:n==="desktop"?{label:"Desktop",icon:"desktop",platform:"desktop"}:{label:"Browser",icon:"extension",platform:"unsupported"});return this.platformTabs=e.map(({platform:n})=>n),e}onTabChange(e){const n=this.platformTabs[e];n&&this.onSelectPlatfrom?.(n)}};on([u({type:Array})],at.prototype,"platforms",void 0);on([u()],at.prototype,"onSelectPlatfrom",void 0);at=on([C("w3m-connecting-header")],at);const Hi=B`
|
|
509
|
+
:host {
|
|
510
|
+
width: var(--local-width);
|
|
511
|
+
position: relative;
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
button {
|
|
515
|
+
border: none;
|
|
516
|
+
border-radius: var(--local-border-radius);
|
|
517
|
+
width: var(--local-width);
|
|
518
|
+
white-space: nowrap;
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
/* -- Sizes --------------------------------------------------- */
|
|
522
|
+
button[data-size='md'] {
|
|
523
|
+
padding: 8.2px var(--wui-spacing-l) 9px var(--wui-spacing-l);
|
|
524
|
+
height: 36px;
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
button[data-size='md'][data-icon-left='true'][data-icon-right='false'] {
|
|
528
|
+
padding: 8.2px var(--wui-spacing-l) 9px var(--wui-spacing-s);
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
button[data-size='md'][data-icon-right='true'][data-icon-left='false'] {
|
|
532
|
+
padding: 8.2px var(--wui-spacing-s) 9px var(--wui-spacing-l);
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
button[data-size='lg'] {
|
|
536
|
+
padding: var(--wui-spacing-m) var(--wui-spacing-2l);
|
|
537
|
+
height: 48px;
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
/* -- Variants --------------------------------------------------------- */
|
|
541
|
+
button[data-variant='main'] {
|
|
542
|
+
background-color: var(--wui-color-accent-100);
|
|
543
|
+
color: var(--wui-color-inverse-100);
|
|
544
|
+
border: none;
|
|
545
|
+
box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010);
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
button[data-variant='inverse'] {
|
|
549
|
+
background-color: var(--wui-color-inverse-100);
|
|
550
|
+
color: var(--wui-color-inverse-000);
|
|
551
|
+
border: none;
|
|
552
|
+
box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010);
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
button[data-variant='accent'] {
|
|
556
|
+
background-color: var(--wui-color-accent-glass-010);
|
|
557
|
+
color: var(--wui-color-accent-100);
|
|
558
|
+
border: none;
|
|
559
|
+
box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-005);
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
button[data-variant='accent-error'] {
|
|
563
|
+
background: var(--wui-color-error-glass-015);
|
|
564
|
+
color: var(--wui-color-error-100);
|
|
565
|
+
border: none;
|
|
566
|
+
box-shadow: inset 0 0 0 1px var(--wui-color-error-glass-010);
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
button[data-variant='accent-success'] {
|
|
570
|
+
background: var(--wui-color-success-glass-015);
|
|
571
|
+
color: var(--wui-color-success-100);
|
|
572
|
+
border: none;
|
|
573
|
+
box-shadow: inset 0 0 0 1px var(--wui-color-success-glass-010);
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
button[data-variant='neutral'] {
|
|
577
|
+
background: transparent;
|
|
578
|
+
color: var(--wui-color-fg-100);
|
|
579
|
+
border: none;
|
|
580
|
+
box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-005);
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
/* -- Focus states --------------------------------------------------- */
|
|
584
|
+
button[data-variant='main']:focus-visible:enabled {
|
|
585
|
+
background-color: var(--wui-color-accent-090);
|
|
586
|
+
box-shadow:
|
|
587
|
+
inset 0 0 0 1px var(--wui-color-accent-100),
|
|
588
|
+
0 0 0 4px var(--wui-color-accent-glass-020);
|
|
589
|
+
}
|
|
590
|
+
button[data-variant='inverse']:focus-visible:enabled {
|
|
591
|
+
background-color: var(--wui-color-inverse-100);
|
|
592
|
+
box-shadow:
|
|
593
|
+
inset 0 0 0 1px var(--wui-color-gray-glass-010),
|
|
594
|
+
0 0 0 4px var(--wui-color-accent-glass-020);
|
|
595
|
+
}
|
|
596
|
+
button[data-variant='accent']:focus-visible:enabled {
|
|
597
|
+
background-color: var(--wui-color-accent-glass-010);
|
|
598
|
+
box-shadow:
|
|
599
|
+
inset 0 0 0 1px var(--wui-color-accent-100),
|
|
600
|
+
0 0 0 4px var(--wui-color-accent-glass-020);
|
|
601
|
+
}
|
|
602
|
+
button[data-variant='accent-error']:focus-visible:enabled {
|
|
603
|
+
background: var(--wui-color-error-glass-015);
|
|
604
|
+
box-shadow:
|
|
605
|
+
inset 0 0 0 1px var(--wui-color-error-100),
|
|
606
|
+
0 0 0 4px var(--wui-color-error-glass-020);
|
|
607
|
+
}
|
|
608
|
+
button[data-variant='accent-success']:focus-visible:enabled {
|
|
609
|
+
background: var(--wui-color-success-glass-015);
|
|
610
|
+
box-shadow:
|
|
611
|
+
inset 0 0 0 1px var(--wui-color-success-100),
|
|
612
|
+
0 0 0 4px var(--wui-color-success-glass-020);
|
|
613
|
+
}
|
|
614
|
+
button[data-variant='neutral']:focus-visible:enabled {
|
|
615
|
+
background: var(--wui-color-gray-glass-005);
|
|
616
|
+
box-shadow:
|
|
617
|
+
inset 0 0 0 1px var(--wui-color-gray-glass-010),
|
|
618
|
+
0 0 0 4px var(--wui-color-gray-glass-002);
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
/* -- Hover & Active states ----------------------------------------------------------- */
|
|
622
|
+
@media (hover: hover) and (pointer: fine) {
|
|
623
|
+
button[data-variant='main']:hover:enabled {
|
|
624
|
+
background-color: var(--wui-color-accent-090);
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
button[data-variant='main']:active:enabled {
|
|
628
|
+
background-color: var(--wui-color-accent-080);
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
button[data-variant='accent']:hover:enabled {
|
|
632
|
+
background-color: var(--wui-color-accent-glass-015);
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
button[data-variant='accent']:active:enabled {
|
|
636
|
+
background-color: var(--wui-color-accent-glass-020);
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
button[data-variant='accent-error']:hover:enabled {
|
|
640
|
+
background: var(--wui-color-error-glass-020);
|
|
641
|
+
color: var(--wui-color-error-100);
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
button[data-variant='accent-error']:active:enabled {
|
|
645
|
+
background: var(--wui-color-error-glass-030);
|
|
646
|
+
color: var(--wui-color-error-100);
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
button[data-variant='accent-success']:hover:enabled {
|
|
650
|
+
background: var(--wui-color-success-glass-020);
|
|
651
|
+
color: var(--wui-color-success-100);
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
button[data-variant='accent-success']:active:enabled {
|
|
655
|
+
background: var(--wui-color-success-glass-030);
|
|
656
|
+
color: var(--wui-color-success-100);
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
button[data-variant='neutral']:hover:enabled {
|
|
660
|
+
background: var(--wui-color-gray-glass-002);
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
button[data-variant='neutral']:active:enabled {
|
|
664
|
+
background: var(--wui-color-gray-glass-005);
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
button[data-size='lg'][data-icon-left='true'][data-icon-right='false'] {
|
|
668
|
+
padding-left: var(--wui-spacing-m);
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
button[data-size='lg'][data-icon-right='true'][data-icon-left='false'] {
|
|
672
|
+
padding-right: var(--wui-spacing-m);
|
|
673
|
+
}
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
/* -- Disabled state --------------------------------------------------- */
|
|
677
|
+
button:disabled {
|
|
678
|
+
background-color: var(--wui-color-gray-glass-002);
|
|
679
|
+
box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-002);
|
|
680
|
+
color: var(--wui-color-gray-glass-020);
|
|
681
|
+
cursor: not-allowed;
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
button > wui-text {
|
|
685
|
+
transition: opacity var(--wui-ease-out-power-1) var(--wui-duration-md);
|
|
686
|
+
will-change: opacity;
|
|
687
|
+
opacity: var(--local-opacity-100);
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
::slotted(*) {
|
|
691
|
+
transition: opacity var(--wui-ease-out-power-1) var(--wui-duration-md);
|
|
692
|
+
will-change: opacity;
|
|
693
|
+
opacity: var(--local-opacity-100);
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
wui-loading-spinner {
|
|
697
|
+
position: absolute;
|
|
698
|
+
left: 50%;
|
|
699
|
+
top: 50%;
|
|
700
|
+
transform: translate(-50%, -50%);
|
|
701
|
+
opacity: var(--local-opacity-000);
|
|
702
|
+
}
|
|
703
|
+
`;var ne=function(r,e,n,i){var o=arguments.length,t=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(r,e,n,i);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(t=(o<3?a(t):o>3?a(e,n,t):a(e,n))||t);return o>3&&t&&Object.defineProperty(e,n,t),t};const pn={main:"inverse-100",inverse:"inverse-000",accent:"accent-100","accent-error":"error-100","accent-success":"success-100",neutral:"fg-100",disabled:"gray-glass-020"},Ki={lg:"paragraph-600",md:"small-600"},Gi={lg:"md",md:"md"};let q=class extends _{constructor(){super(...arguments),this.size="lg",this.disabled=!1,this.fullWidth=!1,this.loading=!1,this.variant="main",this.hasIconLeft=!1,this.hasIconRight=!1,this.borderRadius="m"}render(){this.style.cssText=`
|
|
704
|
+
--local-width: ${this.fullWidth?"100%":"auto"};
|
|
705
|
+
--local-opacity-100: ${this.loading?0:1};
|
|
706
|
+
--local-opacity-000: ${this.loading?1:0};
|
|
707
|
+
--local-border-radius: var(--wui-border-radius-${this.borderRadius});
|
|
708
|
+
`;const e=this.textVariant??Ki[this.size];return c`
|
|
709
|
+
<button
|
|
710
|
+
data-variant=${this.variant}
|
|
711
|
+
data-icon-left=${this.hasIconLeft}
|
|
712
|
+
data-icon-right=${this.hasIconRight}
|
|
713
|
+
data-size=${this.size}
|
|
714
|
+
?disabled=${this.disabled}
|
|
715
|
+
>
|
|
716
|
+
${this.loadingTemplate()}
|
|
717
|
+
<slot name="iconLeft" @slotchange=${()=>this.handleSlotLeftChange()}></slot>
|
|
718
|
+
<wui-text variant=${e} color="inherit">
|
|
719
|
+
<slot></slot>
|
|
720
|
+
</wui-text>
|
|
721
|
+
<slot name="iconRight" @slotchange=${()=>this.handleSlotRightChange()}></slot>
|
|
722
|
+
</button>
|
|
723
|
+
`}handleSlotLeftChange(){this.hasIconLeft=!0}handleSlotRightChange(){this.hasIconRight=!0}loadingTemplate(){if(this.loading){const e=Gi[this.size],n=this.disabled?pn.disabled:pn[this.variant];return c`<wui-loading-spinner color=${n} size=${e}></wui-loading-spinner>`}return c``}};q.styles=[A,M,Hi];ne([u()],q.prototype,"size",void 0);ne([u({type:Boolean})],q.prototype,"disabled",void 0);ne([u({type:Boolean})],q.prototype,"fullWidth",void 0);ne([u({type:Boolean})],q.prototype,"loading",void 0);ne([u()],q.prototype,"variant",void 0);ne([u({type:Boolean})],q.prototype,"hasIconLeft",void 0);ne([u({type:Boolean})],q.prototype,"hasIconRight",void 0);ne([u()],q.prototype,"borderRadius",void 0);ne([u()],q.prototype,"textVariant",void 0);q=ne([C("wui-button")],q);const Yi=B`
|
|
724
|
+
button {
|
|
725
|
+
padding: var(--wui-spacing-4xs) var(--wui-spacing-xxs);
|
|
726
|
+
border-radius: var(--wui-border-radius-3xs);
|
|
727
|
+
background-color: transparent;
|
|
728
|
+
color: var(--wui-color-accent-100);
|
|
729
|
+
}
|
|
730
|
+
|
|
731
|
+
button:disabled {
|
|
732
|
+
background-color: transparent;
|
|
733
|
+
color: var(--wui-color-gray-glass-015);
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
button:hover {
|
|
737
|
+
background-color: var(--wui-color-gray-glass-005);
|
|
738
|
+
}
|
|
739
|
+
`;var Rt=function(r,e,n,i){var o=arguments.length,t=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(r,e,n,i);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(t=(o<3?a(t):o>3?a(e,n,t):a(e,n))||t);return o>3&&t&&Object.defineProperty(e,n,t),t};let Ee=class extends _{constructor(){super(...arguments),this.tabIdx=void 0,this.disabled=!1,this.color="inherit"}render(){return c`
|
|
740
|
+
<button ?disabled=${this.disabled} tabindex=${y(this.tabIdx)}>
|
|
741
|
+
<slot name="iconLeft"></slot>
|
|
742
|
+
<wui-text variant="small-600" color=${this.color}>
|
|
743
|
+
<slot></slot>
|
|
744
|
+
</wui-text>
|
|
745
|
+
<slot name="iconRight"></slot>
|
|
746
|
+
</button>
|
|
747
|
+
`}};Ee.styles=[A,M,Yi];Rt([u()],Ee.prototype,"tabIdx",void 0);Rt([u({type:Boolean})],Ee.prototype,"disabled",void 0);Rt([u()],Ee.prototype,"color",void 0);Ee=Rt([C("wui-link")],Ee);const Ji=B`
|
|
748
|
+
:host {
|
|
749
|
+
display: block;
|
|
750
|
+
width: var(--wui-box-size-md);
|
|
751
|
+
height: var(--wui-box-size-md);
|
|
752
|
+
}
|
|
753
|
+
|
|
754
|
+
svg {
|
|
755
|
+
width: var(--wui-box-size-md);
|
|
756
|
+
height: var(--wui-box-size-md);
|
|
757
|
+
}
|
|
758
|
+
|
|
759
|
+
rect {
|
|
760
|
+
fill: none;
|
|
761
|
+
stroke: var(--wui-color-accent-100);
|
|
762
|
+
stroke-width: 4px;
|
|
763
|
+
stroke-linecap: round;
|
|
764
|
+
animation: dash 1s linear infinite;
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
@keyframes dash {
|
|
768
|
+
to {
|
|
769
|
+
stroke-dashoffset: 0px;
|
|
770
|
+
}
|
|
771
|
+
}
|
|
772
|
+
`;var Dn=function(r,e,n,i){var o=arguments.length,t=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(r,e,n,i);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(t=(o<3?a(t):o>3?a(e,n,t):a(e,n))||t);return o>3&&t&&Object.defineProperty(e,n,t),t};let st=class extends _{constructor(){super(...arguments),this.radius=36}render(){return this.svgLoaderTemplate()}svgLoaderTemplate(){const e=this.radius>50?50:this.radius,i=36-e,o=116+i,t=245+i,a=360+i*1.75;return c`
|
|
773
|
+
<svg viewBox="0 0 110 110" width="110" height="110">
|
|
774
|
+
<rect
|
|
775
|
+
x="2"
|
|
776
|
+
y="2"
|
|
777
|
+
width="106"
|
|
778
|
+
height="106"
|
|
779
|
+
rx=${e}
|
|
780
|
+
stroke-dasharray="${o} ${t}"
|
|
781
|
+
stroke-dashoffset=${a}
|
|
782
|
+
/>
|
|
783
|
+
</svg>
|
|
784
|
+
`}};st.styles=[A,Ji];Dn([u({type:Number})],st.prototype,"radius",void 0);st=Dn([C("wui-loading-thumbnail")],st);const Qi=B`
|
|
785
|
+
button {
|
|
786
|
+
border: none;
|
|
787
|
+
border-radius: var(--wui-border-radius-3xl);
|
|
788
|
+
}
|
|
789
|
+
|
|
790
|
+
button[data-variant='main'] {
|
|
791
|
+
background-color: var(--wui-color-accent-100);
|
|
792
|
+
color: var(--wui-color-inverse-100);
|
|
793
|
+
box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010);
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
button[data-variant='accent'] {
|
|
797
|
+
background-color: var(--wui-color-accent-glass-010);
|
|
798
|
+
color: var(--wui-color-accent-100);
|
|
799
|
+
box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-005);
|
|
800
|
+
}
|
|
801
|
+
|
|
802
|
+
button[data-variant='gray'] {
|
|
803
|
+
background-color: transparent;
|
|
804
|
+
color: var(--wui-color-fg-200);
|
|
805
|
+
box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010);
|
|
806
|
+
}
|
|
807
|
+
|
|
808
|
+
button[data-variant='shade'] {
|
|
809
|
+
background-color: transparent;
|
|
810
|
+
color: var(--wui-color-accent-100);
|
|
811
|
+
box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010);
|
|
812
|
+
}
|
|
813
|
+
|
|
814
|
+
button[data-size='sm'] {
|
|
815
|
+
height: 32px;
|
|
816
|
+
padding: 0 var(--wui-spacing-s);
|
|
817
|
+
}
|
|
818
|
+
|
|
819
|
+
button[data-size='md'] {
|
|
820
|
+
height: 40px;
|
|
821
|
+
padding: 0 var(--wui-spacing-l);
|
|
822
|
+
}
|
|
823
|
+
|
|
824
|
+
button[data-size='sm'] > wui-image {
|
|
825
|
+
width: 16px;
|
|
826
|
+
height: 16px;
|
|
827
|
+
}
|
|
828
|
+
|
|
829
|
+
button[data-size='md'] > wui-image {
|
|
830
|
+
width: 24px;
|
|
831
|
+
height: 24px;
|
|
832
|
+
}
|
|
833
|
+
|
|
834
|
+
button[data-size='sm'] > wui-icon {
|
|
835
|
+
width: 12px;
|
|
836
|
+
height: 12px;
|
|
837
|
+
}
|
|
838
|
+
|
|
839
|
+
button[data-size='md'] > wui-icon {
|
|
840
|
+
width: 14px;
|
|
841
|
+
height: 14px;
|
|
842
|
+
}
|
|
843
|
+
|
|
844
|
+
wui-image {
|
|
845
|
+
border-radius: var(--wui-border-radius-3xl);
|
|
846
|
+
overflow: hidden;
|
|
847
|
+
}
|
|
848
|
+
|
|
849
|
+
button.disabled > wui-icon,
|
|
850
|
+
button.disabled > wui-image {
|
|
851
|
+
filter: grayscale(1);
|
|
852
|
+
}
|
|
853
|
+
|
|
854
|
+
button[data-variant='main'] > wui-image {
|
|
855
|
+
box-shadow: inset 0 0 0 1px var(--wui-color-accent-090);
|
|
856
|
+
}
|
|
857
|
+
|
|
858
|
+
button[data-variant='shade'] > wui-image,
|
|
859
|
+
button[data-variant='gray'] > wui-image {
|
|
860
|
+
box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010);
|
|
861
|
+
}
|
|
862
|
+
|
|
863
|
+
@media (hover: hover) and (pointer: fine) {
|
|
864
|
+
button[data-variant='main']:focus-visible {
|
|
865
|
+
background-color: var(--wui-color-accent-090);
|
|
866
|
+
}
|
|
867
|
+
|
|
868
|
+
button[data-variant='main']:hover:enabled {
|
|
869
|
+
background-color: var(--wui-color-accent-090);
|
|
870
|
+
}
|
|
871
|
+
|
|
872
|
+
button[data-variant='main']:active:enabled {
|
|
873
|
+
background-color: var(--wui-color-accent-080);
|
|
874
|
+
}
|
|
875
|
+
|
|
876
|
+
button[data-variant='accent']:hover:enabled {
|
|
877
|
+
background-color: var(--wui-color-accent-glass-015);
|
|
878
|
+
}
|
|
879
|
+
|
|
880
|
+
button[data-variant='accent']:active:enabled {
|
|
881
|
+
background-color: var(--wui-color-accent-glass-020);
|
|
882
|
+
}
|
|
883
|
+
|
|
884
|
+
button[data-variant='shade']:focus-visible,
|
|
885
|
+
button[data-variant='gray']:focus-visible,
|
|
886
|
+
button[data-variant='shade']:hover,
|
|
887
|
+
button[data-variant='gray']:hover {
|
|
888
|
+
background-color: var(--wui-color-gray-glass-002);
|
|
889
|
+
}
|
|
890
|
+
|
|
891
|
+
button[data-variant='gray']:active,
|
|
892
|
+
button[data-variant='shade']:active {
|
|
893
|
+
background-color: var(--wui-color-gray-glass-005);
|
|
894
|
+
}
|
|
895
|
+
}
|
|
896
|
+
|
|
897
|
+
button.disabled {
|
|
898
|
+
color: var(--wui-color-gray-glass-020);
|
|
899
|
+
background-color: var(--wui-color-gray-glass-002);
|
|
900
|
+
box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-002);
|
|
901
|
+
pointer-events: none;
|
|
902
|
+
}
|
|
903
|
+
`;var Ce=function(r,e,n,i){var o=arguments.length,t=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(r,e,n,i);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(t=(o<3?a(t):o>3?a(e,n,t):a(e,n))||t);return o>3&&t&&Object.defineProperty(e,n,t),t};let ce=class extends _{constructor(){super(...arguments),this.variant="accent",this.imageSrc="",this.disabled=!1,this.icon="externalLink",this.size="md",this.text=""}render(){const e=this.size==="sm"?"small-600":"paragraph-600";return c`
|
|
904
|
+
<button
|
|
905
|
+
class=${this.disabled?"disabled":""}
|
|
906
|
+
data-variant=${this.variant}
|
|
907
|
+
data-size=${this.size}
|
|
908
|
+
>
|
|
909
|
+
${this.imageSrc?c`<wui-image src=${this.imageSrc}></wui-image>`:null}
|
|
910
|
+
<wui-text variant=${e} color="inherit"> ${this.text} </wui-text>
|
|
911
|
+
<wui-icon name=${this.icon} color="inherit" size="inherit"></wui-icon>
|
|
912
|
+
</button>
|
|
913
|
+
`}};ce.styles=[A,M,Qi];Ce([u()],ce.prototype,"variant",void 0);Ce([u()],ce.prototype,"imageSrc",void 0);Ce([u({type:Boolean})],ce.prototype,"disabled",void 0);Ce([u()],ce.prototype,"icon",void 0);Ce([u()],ce.prototype,"size",void 0);Ce([u()],ce.prototype,"text",void 0);ce=Ce([C("wui-chip-button")],ce);const Xi=B`
|
|
914
|
+
wui-flex {
|
|
915
|
+
width: 100%;
|
|
916
|
+
background-color: var(--wui-color-gray-glass-002);
|
|
917
|
+
border-radius: var(--wui-border-radius-xs);
|
|
918
|
+
}
|
|
919
|
+
`;var _t=function(r,e,n,i){var o=arguments.length,t=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(r,e,n,i);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(t=(o<3?a(t):o>3?a(e,n,t):a(e,n))||t);return o>3&&t&&Object.defineProperty(e,n,t),t};let We=class extends _{constructor(){super(...arguments),this.disabled=!1,this.label="",this.buttonLabel=""}render(){return c`
|
|
920
|
+
<wui-flex
|
|
921
|
+
justifyContent="space-between"
|
|
922
|
+
alignItems="center"
|
|
923
|
+
.padding=${["1xs","2l","1xs","2l"]}
|
|
924
|
+
>
|
|
925
|
+
<wui-text variant="paragraph-500" color="fg-200">${this.label}</wui-text>
|
|
926
|
+
<wui-chip-button size="sm" variant="shade" text=${this.buttonLabel} icon="chevronRight">
|
|
927
|
+
</wui-chip-button>
|
|
928
|
+
</wui-flex>
|
|
929
|
+
`}};We.styles=[A,M,Xi];_t([u({type:Boolean})],We.prototype,"disabled",void 0);_t([u()],We.prototype,"label",void 0);_t([u()],We.prototype,"buttonLabel",void 0);We=_t([C("wui-cta-button")],We);const Zi=B`
|
|
930
|
+
:host {
|
|
931
|
+
display: block;
|
|
932
|
+
padding: 0 var(--wui-spacing-xl) var(--wui-spacing-xl);
|
|
933
|
+
}
|
|
934
|
+
`;var Nn=function(r,e,n,i){var o=arguments.length,t=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(r,e,n,i);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(t=(o<3?a(t):o>3?a(e,n,t):a(e,n))||t);return o>3&&t&&Object.defineProperty(e,n,t),t};let lt=class extends _{constructor(){super(...arguments),this.wallet=void 0}render(){if(!this.wallet)return this.style.display="none",null;const{name:e,app_store:n,play_store:i,chrome_store:o,homepage:t}=this.wallet,a=E.isMobile(),s=E.isIos(),l=E.isAndroid(),h=[n,i,t,o].filter(Boolean).length>1,d=se.getTruncateString({string:e,charsStart:12,charsEnd:0,truncate:"end"});return h&&!a?c`
|
|
935
|
+
<wui-cta-button
|
|
936
|
+
label=${`Don't have ${d}?`}
|
|
937
|
+
buttonLabel="Get"
|
|
938
|
+
@click=${()=>O.push("Downloads",{wallet:this.wallet})}
|
|
939
|
+
></wui-cta-button>
|
|
940
|
+
`:!h&&t?c`
|
|
941
|
+
<wui-cta-button
|
|
942
|
+
label=${`Don't have ${d}?`}
|
|
943
|
+
buttonLabel="Get"
|
|
944
|
+
@click=${this.onHomePage.bind(this)}
|
|
945
|
+
></wui-cta-button>
|
|
946
|
+
`:n&&s?c`
|
|
947
|
+
<wui-cta-button
|
|
948
|
+
label=${`Don't have ${d}?`}
|
|
949
|
+
buttonLabel="Get"
|
|
950
|
+
@click=${this.onAppStore.bind(this)}
|
|
951
|
+
></wui-cta-button>
|
|
952
|
+
`:i&&l?c`
|
|
953
|
+
<wui-cta-button
|
|
954
|
+
label=${`Don't have ${d}?`}
|
|
955
|
+
buttonLabel="Get"
|
|
956
|
+
@click=${this.onPlayStore.bind(this)}
|
|
957
|
+
></wui-cta-button>
|
|
958
|
+
`:(this.style.display="none",null)}onAppStore(){this.wallet?.app_store&&E.openHref(this.wallet.app_store,"_blank")}onPlayStore(){this.wallet?.play_store&&E.openHref(this.wallet.play_store,"_blank")}onHomePage(){this.wallet?.homepage&&E.openHref(this.wallet.homepage,"_blank")}};lt.styles=[Zi];Nn([u({type:Object})],lt.prototype,"wallet",void 0);lt=Nn([C("w3m-mobile-download-links")],lt);const eo=B`
|
|
959
|
+
@keyframes shake {
|
|
960
|
+
0% {
|
|
961
|
+
transform: translateX(0);
|
|
962
|
+
}
|
|
963
|
+
25% {
|
|
964
|
+
transform: translateX(3px);
|
|
965
|
+
}
|
|
966
|
+
50% {
|
|
967
|
+
transform: translateX(-3px);
|
|
968
|
+
}
|
|
969
|
+
75% {
|
|
970
|
+
transform: translateX(3px);
|
|
971
|
+
}
|
|
972
|
+
100% {
|
|
973
|
+
transform: translateX(0);
|
|
974
|
+
}
|
|
975
|
+
}
|
|
976
|
+
|
|
977
|
+
wui-flex:first-child:not(:only-child) {
|
|
978
|
+
position: relative;
|
|
979
|
+
}
|
|
980
|
+
|
|
981
|
+
wui-loading-thumbnail {
|
|
982
|
+
position: absolute;
|
|
983
|
+
}
|
|
984
|
+
|
|
985
|
+
wui-icon-box {
|
|
986
|
+
position: absolute;
|
|
987
|
+
right: calc(var(--wui-spacing-3xs) * -1);
|
|
988
|
+
bottom: calc(var(--wui-spacing-3xs) * -1);
|
|
989
|
+
opacity: 0;
|
|
990
|
+
transform: scale(0.5);
|
|
991
|
+
transition-property: opacity, transform;
|
|
992
|
+
transition-duration: var(--wui-duration-lg);
|
|
993
|
+
transition-timing-function: var(--wui-ease-out-power-2);
|
|
994
|
+
will-change: opacity, transform;
|
|
995
|
+
}
|
|
996
|
+
|
|
997
|
+
wui-text[align='center'] {
|
|
998
|
+
width: 100%;
|
|
999
|
+
padding: 0px var(--wui-spacing-l);
|
|
1000
|
+
}
|
|
1001
|
+
|
|
1002
|
+
[data-error='true'] wui-icon-box {
|
|
1003
|
+
opacity: 1;
|
|
1004
|
+
transform: scale(1);
|
|
1005
|
+
}
|
|
1006
|
+
|
|
1007
|
+
[data-error='true'] > wui-flex:first-child {
|
|
1008
|
+
animation: shake 250ms cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
|
|
1009
|
+
}
|
|
1010
|
+
|
|
1011
|
+
[data-retry='false'] wui-link {
|
|
1012
|
+
display: none;
|
|
1013
|
+
}
|
|
1014
|
+
|
|
1015
|
+
[data-retry='true'] wui-link {
|
|
1016
|
+
display: block;
|
|
1017
|
+
opacity: 1;
|
|
1018
|
+
}
|
|
1019
|
+
`;var ie=function(r,e,n,i){var o=arguments.length,t=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(r,e,n,i);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(t=(o<3?a(t):o>3?a(e,n,t):a(e,n))||t);return o>3&&t&&Object.defineProperty(e,n,t),t};class z extends _{constructor(){super(),this.wallet=O.state.data?.wallet,this.connector=O.state.data?.connector,this.timeout=void 0,this.secondaryBtnIcon="refresh",this.onConnect=void 0,this.onRender=void 0,this.onAutoConnect=void 0,this.isWalletConnect=!0,this.unsubscribe=[],this.imageSrc=D.getWalletImage(this.wallet)??D.getConnectorImage(this.connector),this.name=this.wallet?.name??this.connector?.name??"Wallet",this.isRetrying=!1,this.uri=S.state.wcUri,this.error=S.state.wcError,this.ready=!1,this.showRetry=!1,this.secondaryBtnLabel="Try again",this.secondaryLabel="Accept connection request in the wallet",this.isLoading=!1,this.isMobile=!1,this.onRetry=void 0,this.unsubscribe.push(S.subscribeKey("wcUri",e=>{this.uri=e,this.isRetrying&&this.onRetry&&(this.isRetrying=!1,this.onConnect?.())}),S.subscribeKey("wcError",e=>this.error=e)),(E.isTelegram()||E.isSafari())&&E.isIos()&&S.state.wcUri&&this.onConnect?.()}firstUpdated(){this.onAutoConnect?.(),this.showRetry=!this.onAutoConnect}disconnectedCallback(){this.unsubscribe.forEach(e=>e()),S.setWcError(!1),clearTimeout(this.timeout)}render(){this.onRender?.(),this.onShowRetry();const e=this.error?"Connection can be declined if a previous request is still active":this.secondaryLabel;let n=`Continue in ${this.name}`;return this.error&&(n="Connection declined"),c`
|
|
1020
|
+
<wui-flex
|
|
1021
|
+
data-error=${y(this.error)}
|
|
1022
|
+
data-retry=${this.showRetry}
|
|
1023
|
+
flexDirection="column"
|
|
1024
|
+
alignItems="center"
|
|
1025
|
+
.padding=${["3xl","xl","xl","xl"]}
|
|
1026
|
+
gap="xl"
|
|
1027
|
+
>
|
|
1028
|
+
<wui-flex justifyContent="center" alignItems="center">
|
|
1029
|
+
<wui-wallet-image size="lg" imageSrc=${y(this.imageSrc)}></wui-wallet-image>
|
|
1030
|
+
|
|
1031
|
+
${this.error?null:this.loaderTemplate()}
|
|
1032
|
+
|
|
1033
|
+
<wui-icon-box
|
|
1034
|
+
backgroundColor="error-100"
|
|
1035
|
+
background="opaque"
|
|
1036
|
+
iconColor="error-100"
|
|
1037
|
+
icon="close"
|
|
1038
|
+
size="sm"
|
|
1039
|
+
border
|
|
1040
|
+
borderColor="wui-color-bg-125"
|
|
1041
|
+
></wui-icon-box>
|
|
1042
|
+
</wui-flex>
|
|
1043
|
+
|
|
1044
|
+
<wui-flex flexDirection="column" alignItems="center" gap="xs">
|
|
1045
|
+
<wui-text variant="paragraph-500" color=${this.error?"error-100":"fg-100"}>
|
|
1046
|
+
${n}
|
|
1047
|
+
</wui-text>
|
|
1048
|
+
<wui-text align="center" variant="small-500" color="fg-200">${e}</wui-text>
|
|
1049
|
+
</wui-flex>
|
|
1050
|
+
|
|
1051
|
+
${this.secondaryBtnLabel?c`
|
|
1052
|
+
<wui-button
|
|
1053
|
+
variant="accent"
|
|
1054
|
+
size="md"
|
|
1055
|
+
?disabled=${this.isRetrying||this.isLoading}
|
|
1056
|
+
@click=${this.onTryAgain.bind(this)}
|
|
1057
|
+
data-testid="w3m-connecting-widget-secondary-button"
|
|
1058
|
+
>
|
|
1059
|
+
<wui-icon color="inherit" slot="iconLeft" name=${this.secondaryBtnIcon}></wui-icon>
|
|
1060
|
+
${this.secondaryBtnLabel}
|
|
1061
|
+
</wui-button>
|
|
1062
|
+
`:null}
|
|
1063
|
+
</wui-flex>
|
|
1064
|
+
|
|
1065
|
+
${this.isWalletConnect?c`
|
|
1066
|
+
<wui-flex .padding=${["0","xl","xl","xl"]} justifyContent="center">
|
|
1067
|
+
<wui-link @click=${this.onCopyUri} color="fg-200" data-testid="wui-link-copy">
|
|
1068
|
+
<wui-icon size="xs" color="fg-200" slot="iconLeft" name="copy"></wui-icon>
|
|
1069
|
+
Copy link
|
|
1070
|
+
</wui-link>
|
|
1071
|
+
</wui-flex>
|
|
1072
|
+
`:null}
|
|
1073
|
+
|
|
1074
|
+
<w3m-mobile-download-links .wallet=${this.wallet}></w3m-mobile-download-links>
|
|
1075
|
+
`}onShowRetry(){this.error&&!this.showRetry&&(this.showRetry=!0,this.shadowRoot?.querySelector("wui-button")?.animate([{opacity:0},{opacity:1}],{fill:"forwards",easing:"ease"}))}onTryAgain(){S.setWcError(!1),this.onRetry?(this.isRetrying=!0,this.onRetry?.()):this.onConnect?.()}loaderTemplate(){const e=kt.state.themeVariables["--w3m-border-radius-master"],n=e?parseInt(e.replace("px",""),10):4;return c`<wui-loading-thumbnail radius=${n*9}></wui-loading-thumbnail>`}onCopyUri(){try{this.uri&&(E.copyToClopboard(this.uri),Qe.showSuccess("Link copied"))}catch{Qe.showError("Failed to copy")}}}z.styles=eo;ie([v()],z.prototype,"isRetrying",void 0);ie([v()],z.prototype,"uri",void 0);ie([v()],z.prototype,"error",void 0);ie([v()],z.prototype,"ready",void 0);ie([v()],z.prototype,"showRetry",void 0);ie([v()],z.prototype,"secondaryBtnLabel",void 0);ie([v()],z.prototype,"secondaryLabel",void 0);ie([v()],z.prototype,"isLoading",void 0);ie([u({type:Boolean})],z.prototype,"isMobile",void 0);ie([u()],z.prototype,"onRetry",void 0);var to=function(r,e,n,i){var o=arguments.length,t=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(r,e,n,i);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(t=(o<3?a(t):o>3?a(e,n,t):a(e,n))||t);return o>3&&t&&Object.defineProperty(e,n,t),t};let fn=class extends z{constructor(){if(super(),!this.wallet)throw new Error("w3m-connecting-wc-browser: No wallet provided");this.onConnect=this.onConnectProxy.bind(this),this.onAutoConnect=this.onConnectProxy.bind(this),J.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"browser"}})}async onConnectProxy(){try{this.error=!1;const{connectors:e}=P.state,n=e.find(i=>i.type==="ANNOUNCED"&&i.info?.rdns===this.wallet?.rdns||i.type==="INJECTED"||i.name===this.wallet?.name);if(n)await S.connectExternal(n,n.chain);else throw new Error("w3m-connecting-wc-browser: No connector found");yn.close(),J.sendEvent({type:"track",event:"CONNECT_SUCCESS",properties:{method:"browser",name:this.wallet?.name||"Unknown"}})}catch(e){J.sendEvent({type:"track",event:"CONNECT_ERROR",properties:{message:e?.message??"Unknown"}}),this.error=!0}}};fn=to([C("w3m-connecting-wc-browser")],fn);var no=function(r,e,n,i){var o=arguments.length,t=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(r,e,n,i);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(t=(o<3?a(t):o>3?a(e,n,t):a(e,n))||t);return o>3&&t&&Object.defineProperty(e,n,t),t};let gn=class extends z{constructor(){if(super(),!this.wallet)throw new Error("w3m-connecting-wc-desktop: No wallet provided");this.onConnect=this.onConnectProxy.bind(this),this.onRender=this.onRenderProxy.bind(this),J.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"desktop"}})}onRenderProxy(){!this.ready&&this.uri&&(this.ready=!0,this.onConnect?.())}onConnectProxy(){if(this.wallet?.desktop_link&&this.uri)try{this.error=!1;const{desktop_link:e,name:n}=this.wallet,{redirect:i,href:o}=E.formatNativeUrl(e,this.uri);S.setWcLinking({name:n,href:o}),S.setRecentWallet(this.wallet),E.openHref(i,"_blank")}catch{this.error=!0}}};gn=no([C("w3m-connecting-wc-desktop")],gn);var Pe=function(r,e,n,i){var o=arguments.length,t=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(r,e,n,i);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(t=(o<3?a(t):o>3?a(e,n,t):a(e,n))||t);return o>3&&t&&Object.defineProperty(e,n,t),t};let me=class extends z{constructor(){if(super(),this.btnLabelTimeout=void 0,this.redirectDeeplink=void 0,this.redirectUniversalLink=void 0,this.target=void 0,this.preferUniversalLinks=Y.state.experimental_preferUniversalLinks,this.isLoading=!0,this.onConnect=()=>{if(this.wallet?.mobile_link&&this.uri)try{this.error=!1;const{mobile_link:e,link_mode:n,name:i}=this.wallet,{redirect:o,redirectUniversalLink:t,href:a}=E.formatNativeUrl(e,this.uri,n);this.redirectDeeplink=o,this.redirectUniversalLink=t,this.target=E.isIframe()?"_top":"_self",S.setWcLinking({name:i,href:a}),S.setRecentWallet(this.wallet),this.preferUniversalLinks&&this.redirectUniversalLink?E.openHref(this.redirectUniversalLink,this.target):E.openHref(this.redirectDeeplink,this.target)}catch(e){J.sendEvent({type:"track",event:"CONNECT_PROXY_ERROR",properties:{message:e instanceof Error?e.message:"Error parsing the deeplink",uri:this.uri,mobile_link:this.wallet.mobile_link,name:this.wallet.name}}),this.error=!0}},!this.wallet)throw new Error("w3m-connecting-wc-mobile: No wallet provided");this.secondaryBtnLabel="Open",this.secondaryLabel=xn.CONNECT_LABELS.MOBILE,this.secondaryBtnIcon="externalLink",this.onHandleURI(),this.unsubscribe.push(S.subscribeKey("wcUri",()=>{this.onHandleURI()})),J.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"mobile"}})}disconnectedCallback(){super.disconnectedCallback(),clearTimeout(this.btnLabelTimeout)}onHandleURI(){this.isLoading=!this.uri,!this.ready&&this.uri&&(this.ready=!0,this.onConnect?.())}onTryAgain(){S.setWcError(!1),this.onConnect?.()}};Pe([v()],me.prototype,"redirectDeeplink",void 0);Pe([v()],me.prototype,"redirectUniversalLink",void 0);Pe([v()],me.prototype,"target",void 0);Pe([v()],me.prototype,"preferUniversalLinks",void 0);Pe([v()],me.prototype,"isLoading",void 0);me=Pe([C("w3m-connecting-wc-mobile")],me);const io=.1,wn=2.5,ae=7;function Ot(r,e,n){return r===e?!1:(r-e<0?e-r:r-e)<=n+io}function oo(r,e){const n=Array.prototype.slice.call(Fe.create(r,{errorCorrectionLevel:e}).modules.data,0),i=Math.sqrt(n.length);return n.reduce((o,t,a)=>(a%i===0?o.push([t]):o[o.length-1].push(t))&&o,[])}const ro={generate({uri:r,size:e,logoSize:n,dotColor:i="#141414"}){const o="transparent",a=[],s=oo(r,"Q"),l=e/s.length,h=[{x:0,y:0},{x:1,y:0},{x:0,y:1}];h.forEach(({x:b,y:R})=>{const w=(s.length-ae)*l*b,f=(s.length-ae)*l*R,g=.45;for(let p=0;p<h.length;p+=1){const W=l*(ae-p*2);a.push(Ae`
|
|
1076
|
+
<rect
|
|
1077
|
+
fill=${p===2?i:o}
|
|
1078
|
+
width=${p===0?W-5:W}
|
|
1079
|
+
rx= ${p===0?(W-5)*g:W*g}
|
|
1080
|
+
ry= ${p===0?(W-5)*g:W*g}
|
|
1081
|
+
stroke=${i}
|
|
1082
|
+
stroke-width=${p===0?5:0}
|
|
1083
|
+
height=${p===0?W-5:W}
|
|
1084
|
+
x= ${p===0?f+l*p+5/2:f+l*p}
|
|
1085
|
+
y= ${p===0?w+l*p+5/2:w+l*p}
|
|
1086
|
+
/>
|
|
1087
|
+
`)}});const d=Math.floor((n+25)/l),I=s.length/2-d/2,x=s.length/2+d/2-1,m=[];s.forEach((b,R)=>{b.forEach((w,f)=>{if(s[R][f]&&!(R<ae&&f<ae||R>s.length-(ae+1)&&f<ae||R<ae&&f>s.length-(ae+1))&&!(R>I&&R<x&&f>I&&f<x)){const g=R*l+l/2,p=f*l+l/2;m.push([g,p])}})});const $={};return m.forEach(([b,R])=>{$[b]?$[b]?.push(R):$[b]=[R]}),Object.entries($).map(([b,R])=>{const w=R.filter(f=>R.every(g=>!Ot(f,g,l)));return[Number(b),w]}).forEach(([b,R])=>{R.forEach(w=>{a.push(Ae`<circle cx=${b} cy=${w} fill=${i} r=${l/wn} />`)})}),Object.entries($).filter(([b,R])=>R.length>1).map(([b,R])=>{const w=R.filter(f=>R.some(g=>Ot(f,g,l)));return[Number(b),w]}).map(([b,R])=>{R.sort((f,g)=>f<g?-1:1);const w=[];for(const f of R){const g=w.find(p=>p.some(W=>Ot(f,W,l)));g?g.push(f):w.push([f])}return[b,w.map(f=>[f[0],f[f.length-1]])]}).forEach(([b,R])=>{R.forEach(([w,f])=>{a.push(Ae`
|
|
1088
|
+
<line
|
|
1089
|
+
x1=${b}
|
|
1090
|
+
x2=${b}
|
|
1091
|
+
y1=${w}
|
|
1092
|
+
y2=${f}
|
|
1093
|
+
stroke=${i}
|
|
1094
|
+
stroke-width=${l/(wn/2)}
|
|
1095
|
+
stroke-linecap="round"
|
|
1096
|
+
/>
|
|
1097
|
+
`)})}),a}},ao=B`
|
|
1098
|
+
:host {
|
|
1099
|
+
position: relative;
|
|
1100
|
+
user-select: none;
|
|
1101
|
+
display: block;
|
|
1102
|
+
overflow: hidden;
|
|
1103
|
+
aspect-ratio: 1 / 1;
|
|
1104
|
+
width: var(--local-size);
|
|
1105
|
+
}
|
|
1106
|
+
|
|
1107
|
+
:host([data-theme='dark']) {
|
|
1108
|
+
border-radius: clamp(0px, var(--wui-border-radius-l), 40px);
|
|
1109
|
+
background-color: var(--wui-color-inverse-100);
|
|
1110
|
+
padding: var(--wui-spacing-l);
|
|
1111
|
+
}
|
|
1112
|
+
|
|
1113
|
+
:host([data-theme='light']) {
|
|
1114
|
+
box-shadow: 0 0 0 1px var(--wui-color-bg-125);
|
|
1115
|
+
background-color: var(--wui-color-bg-125);
|
|
1116
|
+
}
|
|
1117
|
+
|
|
1118
|
+
:host([data-clear='true']) > wui-icon {
|
|
1119
|
+
display: none;
|
|
1120
|
+
}
|
|
1121
|
+
|
|
1122
|
+
svg:first-child,
|
|
1123
|
+
wui-image,
|
|
1124
|
+
wui-icon {
|
|
1125
|
+
position: absolute;
|
|
1126
|
+
top: 50%;
|
|
1127
|
+
left: 50%;
|
|
1128
|
+
transform: translateY(-50%) translateX(-50%);
|
|
1129
|
+
}
|
|
1130
|
+
|
|
1131
|
+
wui-image {
|
|
1132
|
+
width: 25%;
|
|
1133
|
+
height: 25%;
|
|
1134
|
+
border-radius: var(--wui-border-radius-xs);
|
|
1135
|
+
}
|
|
1136
|
+
|
|
1137
|
+
wui-icon {
|
|
1138
|
+
width: 100%;
|
|
1139
|
+
height: 100%;
|
|
1140
|
+
color: var(--local-icon-color) !important;
|
|
1141
|
+
transform: translateY(-50%) translateX(-50%) scale(0.25);
|
|
1142
|
+
}
|
|
1143
|
+
`;var ue=function(r,e,n,i){var o=arguments.length,t=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(r,e,n,i);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(t=(o<3?a(t):o>3?a(e,n,t):a(e,n))||t);return o>3&&t&&Object.defineProperty(e,n,t),t};const so="#3396ff";let Q=class extends _{constructor(){super(...arguments),this.uri="",this.size=0,this.theme="dark",this.imageSrc=void 0,this.alt=void 0,this.arenaClear=void 0,this.farcaster=void 0}render(){return this.dataset.theme=this.theme,this.dataset.clear=String(this.arenaClear),this.style.cssText=`
|
|
1144
|
+
--local-size: ${this.size}px;
|
|
1145
|
+
--local-icon-color: ${this.color??so}
|
|
1146
|
+
`,c`${this.templateVisual()} ${this.templateSvg()}`}templateSvg(){const e=this.theme==="light"?this.size:this.size-32;return Ae`
|
|
1147
|
+
<svg height=${e} width=${e}>
|
|
1148
|
+
${ro.generate({uri:this.uri,size:e,logoSize:this.arenaClear?0:e/4,dotColor:this.color})}
|
|
1149
|
+
</svg>
|
|
1150
|
+
`}templateVisual(){return this.imageSrc?c`<wui-image src=${this.imageSrc} alt=${this.alt??"logo"}></wui-image>`:this.farcaster?c`<wui-icon
|
|
1151
|
+
class="farcaster"
|
|
1152
|
+
size="inherit"
|
|
1153
|
+
color="inherit"
|
|
1154
|
+
name="farcaster"
|
|
1155
|
+
></wui-icon>`:c`<wui-icon size="inherit" color="inherit" name="walletConnect"></wui-icon>`}};Q.styles=[A,ao];ue([u()],Q.prototype,"uri",void 0);ue([u({type:Number})],Q.prototype,"size",void 0);ue([u()],Q.prototype,"theme",void 0);ue([u()],Q.prototype,"imageSrc",void 0);ue([u()],Q.prototype,"alt",void 0);ue([u()],Q.prototype,"color",void 0);ue([u({type:Boolean})],Q.prototype,"arenaClear",void 0);ue([u({type:Boolean})],Q.prototype,"farcaster",void 0);Q=ue([C("wui-qr-code")],Q);const lo=B`
|
|
1156
|
+
:host {
|
|
1157
|
+
display: block;
|
|
1158
|
+
box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-005);
|
|
1159
|
+
background: linear-gradient(
|
|
1160
|
+
120deg,
|
|
1161
|
+
var(--wui-color-bg-200) 5%,
|
|
1162
|
+
var(--wui-color-bg-200) 48%,
|
|
1163
|
+
var(--wui-color-bg-300) 55%,
|
|
1164
|
+
var(--wui-color-bg-300) 60%,
|
|
1165
|
+
var(--wui-color-bg-300) calc(60% + 10px),
|
|
1166
|
+
var(--wui-color-bg-200) calc(60% + 12px),
|
|
1167
|
+
var(--wui-color-bg-200) 100%
|
|
1168
|
+
);
|
|
1169
|
+
background-size: 250%;
|
|
1170
|
+
animation: shimmer 3s linear infinite reverse;
|
|
1171
|
+
}
|
|
1172
|
+
|
|
1173
|
+
:host([variant='light']) {
|
|
1174
|
+
background: linear-gradient(
|
|
1175
|
+
120deg,
|
|
1176
|
+
var(--wui-color-bg-150) 5%,
|
|
1177
|
+
var(--wui-color-bg-150) 48%,
|
|
1178
|
+
var(--wui-color-bg-200) 55%,
|
|
1179
|
+
var(--wui-color-bg-200) 60%,
|
|
1180
|
+
var(--wui-color-bg-200) calc(60% + 10px),
|
|
1181
|
+
var(--wui-color-bg-150) calc(60% + 12px),
|
|
1182
|
+
var(--wui-color-bg-150) 100%
|
|
1183
|
+
);
|
|
1184
|
+
background-size: 250%;
|
|
1185
|
+
}
|
|
1186
|
+
|
|
1187
|
+
@keyframes shimmer {
|
|
1188
|
+
from {
|
|
1189
|
+
background-position: -250% 0;
|
|
1190
|
+
}
|
|
1191
|
+
to {
|
|
1192
|
+
background-position: 250% 0;
|
|
1193
|
+
}
|
|
1194
|
+
}
|
|
1195
|
+
`;var He=function(r,e,n,i){var o=arguments.length,t=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(r,e,n,i);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(t=(o<3?a(t):o>3?a(e,n,t):a(e,n))||t);return o>3&&t&&Object.defineProperty(e,n,t),t};let ve=class extends _{constructor(){super(...arguments),this.width="",this.height="",this.borderRadius="m",this.variant="default"}render(){return this.style.cssText=`
|
|
1196
|
+
width: ${this.width};
|
|
1197
|
+
height: ${this.height};
|
|
1198
|
+
border-radius: ${`clamp(0px,var(--wui-border-radius-${this.borderRadius}), 40px)`};
|
|
1199
|
+
`,c`<slot></slot>`}};ve.styles=[lo];He([u()],ve.prototype,"width",void 0);He([u()],ve.prototype,"height",void 0);He([u()],ve.prototype,"borderRadius",void 0);He([u()],ve.prototype,"variant",void 0);ve=He([C("wui-shimmer")],ve);const co="https://reown.com",uo=B`
|
|
1200
|
+
.reown-logo {
|
|
1201
|
+
height: var(--wui-spacing-xxl);
|
|
1202
|
+
}
|
|
1203
|
+
|
|
1204
|
+
a {
|
|
1205
|
+
text-decoration: none;
|
|
1206
|
+
cursor: pointer;
|
|
1207
|
+
}
|
|
1208
|
+
|
|
1209
|
+
a:hover {
|
|
1210
|
+
opacity: 0.9;
|
|
1211
|
+
}
|
|
1212
|
+
`;var ho=function(r,e,n,i){var o=arguments.length,t=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(r,e,n,i);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(t=(o<3?a(t):o>3?a(e,n,t):a(e,n))||t);return o>3&&t&&Object.defineProperty(e,n,t),t};let Ut=class extends _{render(){return c`
|
|
1213
|
+
<a
|
|
1214
|
+
data-testid="ux-branding-reown"
|
|
1215
|
+
href=${co}
|
|
1216
|
+
rel="noreferrer"
|
|
1217
|
+
target="_blank"
|
|
1218
|
+
style="text-decoration: none;"
|
|
1219
|
+
>
|
|
1220
|
+
<wui-flex
|
|
1221
|
+
justifyContent="center"
|
|
1222
|
+
alignItems="center"
|
|
1223
|
+
gap="xs"
|
|
1224
|
+
.padding=${["0","0","l","0"]}
|
|
1225
|
+
>
|
|
1226
|
+
<wui-text variant="small-500" color="fg-100"> UX by </wui-text>
|
|
1227
|
+
<wui-icon name="reown" size="xxxl" class="reown-logo"></wui-icon>
|
|
1228
|
+
</wui-flex>
|
|
1229
|
+
</a>
|
|
1230
|
+
`}};Ut.styles=[A,M,uo];Ut=ho([C("wui-ux-by-reown")],Ut);const po=B`
|
|
1231
|
+
@keyframes fadein {
|
|
1232
|
+
from {
|
|
1233
|
+
opacity: 0;
|
|
1234
|
+
}
|
|
1235
|
+
to {
|
|
1236
|
+
opacity: 1;
|
|
1237
|
+
}
|
|
1238
|
+
}
|
|
1239
|
+
|
|
1240
|
+
wui-shimmer {
|
|
1241
|
+
width: 100%;
|
|
1242
|
+
aspect-ratio: 1 / 1;
|
|
1243
|
+
border-radius: clamp(0px, var(--wui-border-radius-l), 40px) !important;
|
|
1244
|
+
}
|
|
1245
|
+
|
|
1246
|
+
wui-qr-code {
|
|
1247
|
+
opacity: 0;
|
|
1248
|
+
animation-duration: 200ms;
|
|
1249
|
+
animation-timing-function: ease;
|
|
1250
|
+
animation-name: fadein;
|
|
1251
|
+
animation-fill-mode: forwards;
|
|
1252
|
+
}
|
|
1253
|
+
`;var fo=function(r,e,n,i){var o=arguments.length,t=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(r,e,n,i);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(t=(o<3?a(t):o>3?a(e,n,t):a(e,n))||t);return o>3&&t&&Object.defineProperty(e,n,t),t};let Ft=class extends z{constructor(){super(),this.forceUpdate=()=>{this.requestUpdate()},window.addEventListener("resize",this.forceUpdate),J.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet?.name??"WalletConnect",platform:"qrcode"}})}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribe?.forEach(e=>e()),window.removeEventListener("resize",this.forceUpdate)}render(){return this.onRenderProxy(),c`
|
|
1254
|
+
<wui-flex
|
|
1255
|
+
flexDirection="column"
|
|
1256
|
+
alignItems="center"
|
|
1257
|
+
.padding=${["0","xl","xl","xl"]}
|
|
1258
|
+
gap="xl"
|
|
1259
|
+
>
|
|
1260
|
+
<wui-shimmer borderRadius="l" width="100%"> ${this.qrCodeTemplate()} </wui-shimmer>
|
|
1261
|
+
|
|
1262
|
+
<wui-text variant="paragraph-500" color="fg-100">
|
|
1263
|
+
Scan this QR Code with your phone
|
|
1264
|
+
</wui-text>
|
|
1265
|
+
${this.copyTemplate()}
|
|
1266
|
+
</wui-flex>
|
|
1267
|
+
<w3m-mobile-download-links .wallet=${this.wallet}></w3m-mobile-download-links>
|
|
1268
|
+
`}onRenderProxy(){!this.ready&&this.uri&&(this.timeout=setTimeout(()=>{this.ready=!0},200))}qrCodeTemplate(){if(!this.uri||!this.ready)return null;const e=this.getBoundingClientRect().width-40,n=this.wallet?this.wallet.name:void 0;return S.setWcLinking(void 0),S.setRecentWallet(this.wallet),c` <wui-qr-code
|
|
1269
|
+
size=${e}
|
|
1270
|
+
theme=${kt.state.themeMode}
|
|
1271
|
+
uri=${this.uri}
|
|
1272
|
+
imageSrc=${y(D.getWalletImage(this.wallet))}
|
|
1273
|
+
color=${y(kt.state.themeVariables["--w3m-qr-color"])}
|
|
1274
|
+
alt=${y(n)}
|
|
1275
|
+
data-testid="wui-qr-code"
|
|
1276
|
+
></wui-qr-code>`}copyTemplate(){const e=!this.uri||!this.ready;return c`<wui-link
|
|
1277
|
+
.disabled=${e}
|
|
1278
|
+
@click=${this.onCopyUri}
|
|
1279
|
+
color="fg-200"
|
|
1280
|
+
data-testid="copy-wc2-uri"
|
|
1281
|
+
>
|
|
1282
|
+
<wui-icon size="xs" color="fg-200" slot="iconLeft" name="copy"></wui-icon>
|
|
1283
|
+
Copy link
|
|
1284
|
+
</wui-link>`}};Ft.styles=po;Ft=fo([C("w3m-connecting-wc-qrcode")],Ft);var go=function(r,e,n,i){var o=arguments.length,t=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(r,e,n,i);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(t=(o<3?a(t):o>3?a(e,n,t):a(e,n))||t);return o>3&&t&&Object.defineProperty(e,n,t),t};let bn=class extends _{constructor(){if(super(),this.wallet=O.state.data?.wallet,!this.wallet)throw new Error("w3m-connecting-wc-unsupported: No wallet provided");J.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"browser"}})}render(){return c`
|
|
1285
|
+
<wui-flex
|
|
1286
|
+
flexDirection="column"
|
|
1287
|
+
alignItems="center"
|
|
1288
|
+
.padding=${["3xl","xl","xl","xl"]}
|
|
1289
|
+
gap="xl"
|
|
1290
|
+
>
|
|
1291
|
+
<wui-wallet-image
|
|
1292
|
+
size="lg"
|
|
1293
|
+
imageSrc=${y(D.getWalletImage(this.wallet))}
|
|
1294
|
+
></wui-wallet-image>
|
|
1295
|
+
|
|
1296
|
+
<wui-text variant="paragraph-500" color="fg-100">Not Detected</wui-text>
|
|
1297
|
+
</wui-flex>
|
|
1298
|
+
|
|
1299
|
+
<w3m-mobile-download-links .wallet=${this.wallet}></w3m-mobile-download-links>
|
|
1300
|
+
`}};bn=go([C("w3m-connecting-wc-unsupported")],bn);var Mn=function(r,e,n,i){var o=arguments.length,t=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(r,e,n,i);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(t=(o<3?a(t):o>3?a(e,n,t):a(e,n))||t);return o>3&&t&&Object.defineProperty(e,n,t),t};let Vt=class extends z{constructor(){if(super(),this.isLoading=!0,!this.wallet)throw new Error("w3m-connecting-wc-web: No wallet provided");this.onConnect=this.onConnectProxy.bind(this),this.secondaryBtnLabel="Open",this.secondaryLabel=xn.CONNECT_LABELS.MOBILE,this.secondaryBtnIcon="externalLink",this.updateLoadingState(),this.unsubscribe.push(S.subscribeKey("wcUri",()=>{this.updateLoadingState()})),J.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"web"}})}updateLoadingState(){this.isLoading=!this.uri}onConnectProxy(){if(this.wallet?.webapp_link&&this.uri)try{this.error=!1;const{webapp_link:e,name:n}=this.wallet,{redirect:i,href:o}=E.formatUniversalUrl(e,this.uri);S.setWcLinking({name:n,href:o}),S.setRecentWallet(this.wallet),E.openHref(i,"_blank")}catch{this.error=!0}}};Mn([v()],Vt.prototype,"isLoading",void 0);Vt=Mn([C("w3m-connecting-wc-web")],Vt);var Ke=function(r,e,n,i){var o=arguments.length,t=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(r,e,n,i);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(t=(o<3?a(t):o>3?a(e,n,t):a(e,n))||t);return o>3&&t&&Object.defineProperty(e,n,t),t};let Se=class extends _{constructor(){super(),this.wallet=O.state.data?.wallet,this.unsubscribe=[],this.platform=void 0,this.platforms=[],this.isSiwxEnabled=!!Y.state.siwx,this.remoteFeatures=Y.state.remoteFeatures,this.determinePlatforms(),this.initializeConnection(),this.unsubscribe.push(Y.subscribeKey("remoteFeatures",e=>this.remoteFeatures=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return c`
|
|
1301
|
+
${this.headerTemplate()}
|
|
1302
|
+
<div>${this.platformTemplate()}</div>
|
|
1303
|
+
${this.reownBrandingTemplate()}
|
|
1304
|
+
`}reownBrandingTemplate(){return this.remoteFeatures?.reownBranding?c`<wui-ux-by-reown></wui-ux-by-reown>`:null}async initializeConnection(e=!1){if(!(this.platform==="browser"||Y.state.manualWCControl&&!e))try{const{wcPairingExpiry:n,status:i}=S.state;(e||Y.state.enableEmbedded||E.isPairingExpired(n)||i==="connecting")&&(await S.connectWalletConnect(),this.isSiwxEnabled||yn.close())}catch(n){J.sendEvent({type:"track",event:"CONNECT_ERROR",properties:{message:n?.message??"Unknown"}}),S.setWcError(!0),Qe.showError(n.message??"Connection error"),S.resetWcConnection(),O.goBack()}}determinePlatforms(){if(!this.wallet){this.platforms.push("qrcode"),this.platform="qrcode";return}if(this.platform)return;const{mobile_link:e,desktop_link:n,webapp_link:i,injected:o,rdns:t}=this.wallet,a=o?.map(({injected_id:$})=>$).filter(Boolean),s=[...t?[t]:a??[]],l=Y.state.isUniversalProvider?!1:s.length,h=e,d=i,I=S.checkInstalled(s),x=l&&I,m=n&&!E.isMobile();x&&!jt.state.noAdapters&&this.platforms.push("browser"),h&&this.platforms.push(E.isMobile()?"mobile":"qrcode"),d&&this.platforms.push("web"),m&&this.platforms.push("desktop"),!x&&l&&!jt.state.noAdapters&&this.platforms.push("unsupported"),this.platform=this.platforms[0]}platformTemplate(){switch(this.platform){case"browser":return c`<w3m-connecting-wc-browser></w3m-connecting-wc-browser>`;case"web":return c`<w3m-connecting-wc-web></w3m-connecting-wc-web>`;case"desktop":return c`
|
|
1305
|
+
<w3m-connecting-wc-desktop .onRetry=${()=>this.initializeConnection(!0)}>
|
|
1306
|
+
</w3m-connecting-wc-desktop>
|
|
1307
|
+
`;case"mobile":return c`
|
|
1308
|
+
<w3m-connecting-wc-mobile isMobile .onRetry=${()=>this.initializeConnection(!0)}>
|
|
1309
|
+
</w3m-connecting-wc-mobile>
|
|
1310
|
+
`;case"qrcode":return c`<w3m-connecting-wc-qrcode></w3m-connecting-wc-qrcode>`;default:return c`<w3m-connecting-wc-unsupported></w3m-connecting-wc-unsupported>`}}headerTemplate(){return this.platforms.length>1?c`
|
|
1311
|
+
<w3m-connecting-header
|
|
1312
|
+
.platforms=${this.platforms}
|
|
1313
|
+
.onSelectPlatfrom=${this.onSelectPlatform.bind(this)}
|
|
1314
|
+
>
|
|
1315
|
+
</w3m-connecting-header>
|
|
1316
|
+
`:null}async onSelectPlatform(e){const n=this.shadowRoot?.querySelector("div");n&&(await n.animate([{opacity:1},{opacity:0}],{duration:200,fill:"forwards",easing:"ease"}).finished,this.platform=e,n.animate([{opacity:0},{opacity:1}],{duration:200,fill:"forwards",easing:"ease"}))}};Ke([v()],Se.prototype,"platform",void 0);Ke([v()],Se.prototype,"platforms",void 0);Ke([v()],Se.prototype,"isSiwxEnabled",void 0);Ke([v()],Se.prototype,"remoteFeatures",void 0);Se=Ke([C("w3m-connecting-wc-view")],Se);var Un=function(r,e,n,i){var o=arguments.length,t=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(r,e,n,i);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(t=(o<3?a(t):o>3?a(e,n,t):a(e,n))||t);return o>3&&t&&Object.defineProperty(e,n,t),t};let qt=class extends _{constructor(){super(...arguments),this.isMobile=E.isMobile()}render(){if(this.isMobile){const{featured:e,recommended:n}=T.state,{customWallets:i}=Y.state,o=ft.getRecentWallets(),t=e.length||n.length||i?.length||o.length;return c`<wui-flex
|
|
1317
|
+
flexDirection="column"
|
|
1318
|
+
gap="xs"
|
|
1319
|
+
.margin=${["3xs","s","s","s"]}
|
|
1320
|
+
>
|
|
1321
|
+
${t?c`<w3m-connector-list></w3m-connector-list>`:null}
|
|
1322
|
+
<w3m-all-wallets-widget></w3m-all-wallets-widget>
|
|
1323
|
+
</wui-flex>`}return c`<wui-flex flexDirection="column" .padding=${["0","0","l","0"]}>
|
|
1324
|
+
<w3m-connecting-wc-view></w3m-connecting-wc-view>
|
|
1325
|
+
<wui-flex flexDirection="column" .padding=${["0","m","0","m"]}>
|
|
1326
|
+
<w3m-all-wallets-widget></w3m-all-wallets-widget> </wui-flex
|
|
1327
|
+
></wui-flex>`}};Un([v()],qt.prototype,"isMobile",void 0);qt=Un([C("w3m-connecting-wc-basic-view")],qt);/**
|
|
1328
|
+
* @license
|
|
1329
|
+
* Copyright 2020 Google LLC
|
|
1330
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
1331
|
+
*/const rn=()=>new wo;class wo{}const At=new WeakMap,an=Yn(class extends Jn{render(r){return cn}update(r,[e]){const n=e!==this.G;return n&&this.G!==void 0&&this.rt(void 0),(n||this.lt!==this.ct)&&(this.G=e,this.ht=r.options?.host,this.rt(this.ct=r.element)),cn}rt(r){if(this.isConnected||(r=void 0),typeof this.G=="function"){const e=this.ht??globalThis;let n=At.get(e);n===void 0&&(n=new WeakMap,At.set(e,n)),n.get(this.G)!==void 0&&this.G.call(this.ht,void 0),n.set(this.G,r),r!==void 0&&this.G.call(this.ht,r)}else this.G.value=r}get lt(){return typeof this.G=="function"?At.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}}),bo=B`
|
|
1332
|
+
:host {
|
|
1333
|
+
display: flex;
|
|
1334
|
+
align-items: center;
|
|
1335
|
+
justify-content: center;
|
|
1336
|
+
}
|
|
1337
|
+
|
|
1338
|
+
label {
|
|
1339
|
+
position: relative;
|
|
1340
|
+
display: inline-block;
|
|
1341
|
+
width: 32px;
|
|
1342
|
+
height: 22px;
|
|
1343
|
+
}
|
|
1344
|
+
|
|
1345
|
+
input {
|
|
1346
|
+
width: 0;
|
|
1347
|
+
height: 0;
|
|
1348
|
+
opacity: 0;
|
|
1349
|
+
}
|
|
1350
|
+
|
|
1351
|
+
span {
|
|
1352
|
+
position: absolute;
|
|
1353
|
+
cursor: pointer;
|
|
1354
|
+
top: 0;
|
|
1355
|
+
left: 0;
|
|
1356
|
+
right: 0;
|
|
1357
|
+
bottom: 0;
|
|
1358
|
+
background-color: var(--wui-color-blue-100);
|
|
1359
|
+
border-width: 1px;
|
|
1360
|
+
border-style: solid;
|
|
1361
|
+
border-color: var(--wui-color-gray-glass-002);
|
|
1362
|
+
border-radius: 999px;
|
|
1363
|
+
transition:
|
|
1364
|
+
background-color var(--wui-ease-inout-power-1) var(--wui-duration-md),
|
|
1365
|
+
border-color var(--wui-ease-inout-power-1) var(--wui-duration-md);
|
|
1366
|
+
will-change: background-color, border-color;
|
|
1367
|
+
}
|
|
1368
|
+
|
|
1369
|
+
span:before {
|
|
1370
|
+
position: absolute;
|
|
1371
|
+
content: '';
|
|
1372
|
+
height: 16px;
|
|
1373
|
+
width: 16px;
|
|
1374
|
+
left: 3px;
|
|
1375
|
+
top: 2px;
|
|
1376
|
+
background-color: var(--wui-color-inverse-100);
|
|
1377
|
+
transition: transform var(--wui-ease-inout-power-1) var(--wui-duration-lg);
|
|
1378
|
+
will-change: transform;
|
|
1379
|
+
border-radius: 50%;
|
|
1380
|
+
}
|
|
1381
|
+
|
|
1382
|
+
input:checked + span {
|
|
1383
|
+
border-color: var(--wui-color-gray-glass-005);
|
|
1384
|
+
background-color: var(--wui-color-blue-100);
|
|
1385
|
+
}
|
|
1386
|
+
|
|
1387
|
+
input:not(:checked) + span {
|
|
1388
|
+
background-color: var(--wui-color-gray-glass-010);
|
|
1389
|
+
}
|
|
1390
|
+
|
|
1391
|
+
input:checked + span:before {
|
|
1392
|
+
transform: translateX(calc(100% - 7px));
|
|
1393
|
+
}
|
|
1394
|
+
`;var Fn=function(r,e,n,i){var o=arguments.length,t=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(r,e,n,i);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(t=(o<3?a(t):o>3?a(e,n,t):a(e,n))||t);return o>3&&t&&Object.defineProperty(e,n,t),t};let ct=class extends _{constructor(){super(...arguments),this.inputElementRef=rn(),this.checked=void 0}render(){return c`
|
|
1395
|
+
<label>
|
|
1396
|
+
<input
|
|
1397
|
+
${an(this.inputElementRef)}
|
|
1398
|
+
type="checkbox"
|
|
1399
|
+
?checked=${y(this.checked)}
|
|
1400
|
+
@change=${this.dispatchChangeEvent.bind(this)}
|
|
1401
|
+
/>
|
|
1402
|
+
<span></span>
|
|
1403
|
+
</label>
|
|
1404
|
+
`}dispatchChangeEvent(){this.dispatchEvent(new CustomEvent("switchChange",{detail:this.inputElementRef.value?.checked,bubbles:!0,composed:!0}))}};ct.styles=[A,M,Gn,bo];Fn([u({type:Boolean})],ct.prototype,"checked",void 0);ct=Fn([C("wui-switch")],ct);const mo=B`
|
|
1405
|
+
:host {
|
|
1406
|
+
height: 100%;
|
|
1407
|
+
}
|
|
1408
|
+
|
|
1409
|
+
button {
|
|
1410
|
+
display: flex;
|
|
1411
|
+
align-items: center;
|
|
1412
|
+
justify-content: center;
|
|
1413
|
+
column-gap: var(--wui-spacing-1xs);
|
|
1414
|
+
padding: var(--wui-spacing-xs) var(--wui-spacing-s);
|
|
1415
|
+
background-color: var(--wui-color-gray-glass-002);
|
|
1416
|
+
border-radius: var(--wui-border-radius-xs);
|
|
1417
|
+
box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-002);
|
|
1418
|
+
transition: background-color var(--wui-ease-out-power-1) var(--wui-duration-md);
|
|
1419
|
+
will-change: background-color;
|
|
1420
|
+
cursor: pointer;
|
|
1421
|
+
}
|
|
1422
|
+
|
|
1423
|
+
wui-switch {
|
|
1424
|
+
pointer-events: none;
|
|
1425
|
+
}
|
|
1426
|
+
`;var Vn=function(r,e,n,i){var o=arguments.length,t=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(r,e,n,i);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(t=(o<3?a(t):o>3?a(e,n,t):a(e,n))||t);return o>3&&t&&Object.defineProperty(e,n,t),t};let ut=class extends _{constructor(){super(...arguments),this.checked=void 0}render(){return c`
|
|
1427
|
+
<button>
|
|
1428
|
+
<wui-icon size="xl" name="walletConnectBrown"></wui-icon>
|
|
1429
|
+
<wui-switch ?checked=${y(this.checked)}></wui-switch>
|
|
1430
|
+
</button>
|
|
1431
|
+
`}};ut.styles=[A,M,mo];Vn([u({type:Boolean})],ut.prototype,"checked",void 0);ut=Vn([C("wui-certified-switch")],ut);const vo=B`
|
|
1432
|
+
button {
|
|
1433
|
+
background-color: var(--wui-color-fg-300);
|
|
1434
|
+
border-radius: var(--wui-border-radius-4xs);
|
|
1435
|
+
width: 16px;
|
|
1436
|
+
height: 16px;
|
|
1437
|
+
}
|
|
1438
|
+
|
|
1439
|
+
button:disabled {
|
|
1440
|
+
background-color: var(--wui-color-bg-300);
|
|
1441
|
+
}
|
|
1442
|
+
|
|
1443
|
+
wui-icon {
|
|
1444
|
+
color: var(--wui-color-bg-200) !important;
|
|
1445
|
+
}
|
|
1446
|
+
|
|
1447
|
+
button:focus-visible {
|
|
1448
|
+
background-color: var(--wui-color-fg-250);
|
|
1449
|
+
border: 1px solid var(--wui-color-accent-100);
|
|
1450
|
+
}
|
|
1451
|
+
|
|
1452
|
+
@media (hover: hover) and (pointer: fine) {
|
|
1453
|
+
button:hover:enabled {
|
|
1454
|
+
background-color: var(--wui-color-fg-250);
|
|
1455
|
+
}
|
|
1456
|
+
|
|
1457
|
+
button:active:enabled {
|
|
1458
|
+
background-color: var(--wui-color-fg-225);
|
|
1459
|
+
}
|
|
1460
|
+
}
|
|
1461
|
+
`;var qn=function(r,e,n,i){var o=arguments.length,t=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(r,e,n,i);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(t=(o<3?a(t):o>3?a(e,n,t):a(e,n))||t);return o>3&&t&&Object.defineProperty(e,n,t),t};let dt=class extends _{constructor(){super(...arguments),this.icon="copy"}render(){return c`
|
|
1462
|
+
<button>
|
|
1463
|
+
<wui-icon color="inherit" size="xxs" name=${this.icon}></wui-icon>
|
|
1464
|
+
</button>
|
|
1465
|
+
`}};dt.styles=[A,M,vo];qn([u()],dt.prototype,"icon",void 0);dt=qn([C("wui-input-element")],dt);const yo=B`
|
|
1466
|
+
:host {
|
|
1467
|
+
position: relative;
|
|
1468
|
+
width: 100%;
|
|
1469
|
+
display: inline-block;
|
|
1470
|
+
color: var(--wui-color-fg-275);
|
|
1471
|
+
}
|
|
1472
|
+
|
|
1473
|
+
input {
|
|
1474
|
+
width: 100%;
|
|
1475
|
+
border-radius: var(--wui-border-radius-xs);
|
|
1476
|
+
box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-002);
|
|
1477
|
+
background: var(--wui-color-gray-glass-002);
|
|
1478
|
+
font-size: var(--wui-font-size-paragraph);
|
|
1479
|
+
letter-spacing: var(--wui-letter-spacing-paragraph);
|
|
1480
|
+
color: var(--wui-color-fg-100);
|
|
1481
|
+
transition:
|
|
1482
|
+
background-color var(--wui-ease-inout-power-1) var(--wui-duration-md),
|
|
1483
|
+
border-color var(--wui-ease-inout-power-1) var(--wui-duration-md),
|
|
1484
|
+
box-shadow var(--wui-ease-inout-power-1) var(--wui-duration-md);
|
|
1485
|
+
will-change: background-color, border-color, box-shadow;
|
|
1486
|
+
caret-color: var(--wui-color-accent-100);
|
|
1487
|
+
}
|
|
1488
|
+
|
|
1489
|
+
input:disabled {
|
|
1490
|
+
cursor: not-allowed;
|
|
1491
|
+
border: 1px solid var(--wui-color-gray-glass-010);
|
|
1492
|
+
}
|
|
1493
|
+
|
|
1494
|
+
input:disabled::placeholder,
|
|
1495
|
+
input:disabled + wui-icon {
|
|
1496
|
+
color: var(--wui-color-fg-300);
|
|
1497
|
+
}
|
|
1498
|
+
|
|
1499
|
+
input::placeholder {
|
|
1500
|
+
color: var(--wui-color-fg-275);
|
|
1501
|
+
}
|
|
1502
|
+
|
|
1503
|
+
input:focus:enabled {
|
|
1504
|
+
background-color: var(--wui-color-gray-glass-005);
|
|
1505
|
+
-webkit-box-shadow:
|
|
1506
|
+
inset 0 0 0 1px var(--wui-color-accent-100),
|
|
1507
|
+
0px 0px 0px 4px var(--wui-box-shadow-blue);
|
|
1508
|
+
-moz-box-shadow:
|
|
1509
|
+
inset 0 0 0 1px var(--wui-color-accent-100),
|
|
1510
|
+
0px 0px 0px 4px var(--wui-box-shadow-blue);
|
|
1511
|
+
box-shadow:
|
|
1512
|
+
inset 0 0 0 1px var(--wui-color-accent-100),
|
|
1513
|
+
0px 0px 0px 4px var(--wui-box-shadow-blue);
|
|
1514
|
+
}
|
|
1515
|
+
|
|
1516
|
+
input:hover:enabled {
|
|
1517
|
+
background-color: var(--wui-color-gray-glass-005);
|
|
1518
|
+
}
|
|
1519
|
+
|
|
1520
|
+
wui-icon {
|
|
1521
|
+
position: absolute;
|
|
1522
|
+
top: 50%;
|
|
1523
|
+
transform: translateY(-50%);
|
|
1524
|
+
pointer-events: none;
|
|
1525
|
+
}
|
|
1526
|
+
|
|
1527
|
+
.wui-size-sm {
|
|
1528
|
+
padding: 9px var(--wui-spacing-m) 10px var(--wui-spacing-s);
|
|
1529
|
+
}
|
|
1530
|
+
|
|
1531
|
+
wui-icon + .wui-size-sm {
|
|
1532
|
+
padding: 9px var(--wui-spacing-m) 10px 36px;
|
|
1533
|
+
}
|
|
1534
|
+
|
|
1535
|
+
wui-icon[data-input='sm'] {
|
|
1536
|
+
left: var(--wui-spacing-s);
|
|
1537
|
+
}
|
|
1538
|
+
|
|
1539
|
+
.wui-size-md {
|
|
1540
|
+
padding: 15px var(--wui-spacing-m) var(--wui-spacing-l) var(--wui-spacing-m);
|
|
1541
|
+
}
|
|
1542
|
+
|
|
1543
|
+
wui-icon + .wui-size-md,
|
|
1544
|
+
wui-loading-spinner + .wui-size-md {
|
|
1545
|
+
padding: 10.5px var(--wui-spacing-3xl) 10.5px var(--wui-spacing-3xl);
|
|
1546
|
+
}
|
|
1547
|
+
|
|
1548
|
+
wui-icon[data-input='md'] {
|
|
1549
|
+
left: var(--wui-spacing-l);
|
|
1550
|
+
}
|
|
1551
|
+
|
|
1552
|
+
.wui-size-lg {
|
|
1553
|
+
padding: var(--wui-spacing-s) var(--wui-spacing-s) var(--wui-spacing-s) var(--wui-spacing-l);
|
|
1554
|
+
letter-spacing: var(--wui-letter-spacing-medium-title);
|
|
1555
|
+
font-size: var(--wui-font-size-medium-title);
|
|
1556
|
+
font-weight: var(--wui-font-weight-light);
|
|
1557
|
+
line-height: 130%;
|
|
1558
|
+
color: var(--wui-color-fg-100);
|
|
1559
|
+
height: 64px;
|
|
1560
|
+
}
|
|
1561
|
+
|
|
1562
|
+
.wui-padding-right-xs {
|
|
1563
|
+
padding-right: var(--wui-spacing-xs);
|
|
1564
|
+
}
|
|
1565
|
+
|
|
1566
|
+
.wui-padding-right-s {
|
|
1567
|
+
padding-right: var(--wui-spacing-s);
|
|
1568
|
+
}
|
|
1569
|
+
|
|
1570
|
+
.wui-padding-right-m {
|
|
1571
|
+
padding-right: var(--wui-spacing-m);
|
|
1572
|
+
}
|
|
1573
|
+
|
|
1574
|
+
.wui-padding-right-l {
|
|
1575
|
+
padding-right: var(--wui-spacing-l);
|
|
1576
|
+
}
|
|
1577
|
+
|
|
1578
|
+
.wui-padding-right-xl {
|
|
1579
|
+
padding-right: var(--wui-spacing-xl);
|
|
1580
|
+
}
|
|
1581
|
+
|
|
1582
|
+
.wui-padding-right-2xl {
|
|
1583
|
+
padding-right: var(--wui-spacing-2xl);
|
|
1584
|
+
}
|
|
1585
|
+
|
|
1586
|
+
.wui-padding-right-3xl {
|
|
1587
|
+
padding-right: var(--wui-spacing-3xl);
|
|
1588
|
+
}
|
|
1589
|
+
|
|
1590
|
+
.wui-padding-right-4xl {
|
|
1591
|
+
padding-right: var(--wui-spacing-4xl);
|
|
1592
|
+
}
|
|
1593
|
+
|
|
1594
|
+
.wui-padding-right-5xl {
|
|
1595
|
+
padding-right: var(--wui-spacing-5xl);
|
|
1596
|
+
}
|
|
1597
|
+
|
|
1598
|
+
wui-icon + .wui-size-lg,
|
|
1599
|
+
wui-loading-spinner + .wui-size-lg {
|
|
1600
|
+
padding-left: 50px;
|
|
1601
|
+
}
|
|
1602
|
+
|
|
1603
|
+
wui-icon[data-input='lg'] {
|
|
1604
|
+
left: var(--wui-spacing-l);
|
|
1605
|
+
}
|
|
1606
|
+
|
|
1607
|
+
.wui-size-mdl {
|
|
1608
|
+
padding: 17.25px var(--wui-spacing-m) 17.25px var(--wui-spacing-m);
|
|
1609
|
+
}
|
|
1610
|
+
wui-icon + .wui-size-mdl,
|
|
1611
|
+
wui-loading-spinner + .wui-size-mdl {
|
|
1612
|
+
padding: 17.25px var(--wui-spacing-3xl) 17.25px 40px;
|
|
1613
|
+
}
|
|
1614
|
+
wui-icon[data-input='mdl'] {
|
|
1615
|
+
left: var(--wui-spacing-m);
|
|
1616
|
+
}
|
|
1617
|
+
|
|
1618
|
+
input:placeholder-shown ~ ::slotted(wui-input-element),
|
|
1619
|
+
input:placeholder-shown ~ ::slotted(wui-icon) {
|
|
1620
|
+
opacity: 0;
|
|
1621
|
+
pointer-events: none;
|
|
1622
|
+
}
|
|
1623
|
+
|
|
1624
|
+
input::-webkit-outer-spin-button,
|
|
1625
|
+
input::-webkit-inner-spin-button {
|
|
1626
|
+
-webkit-appearance: none;
|
|
1627
|
+
margin: 0;
|
|
1628
|
+
}
|
|
1629
|
+
|
|
1630
|
+
input[type='number'] {
|
|
1631
|
+
-moz-appearance: textfield;
|
|
1632
|
+
}
|
|
1633
|
+
|
|
1634
|
+
::slotted(wui-input-element),
|
|
1635
|
+
::slotted(wui-icon) {
|
|
1636
|
+
position: absolute;
|
|
1637
|
+
top: 50%;
|
|
1638
|
+
transform: translateY(-50%);
|
|
1639
|
+
}
|
|
1640
|
+
|
|
1641
|
+
::slotted(wui-input-element) {
|
|
1642
|
+
right: var(--wui-spacing-m);
|
|
1643
|
+
}
|
|
1644
|
+
|
|
1645
|
+
::slotted(wui-icon) {
|
|
1646
|
+
right: 0px;
|
|
1647
|
+
}
|
|
1648
|
+
`;var oe=function(r,e,n,i){var o=arguments.length,t=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(r,e,n,i);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(t=(o<3?a(t):o>3?a(e,n,t):a(e,n))||t);return o>3&&t&&Object.defineProperty(e,n,t),t};let H=class extends _{constructor(){super(...arguments),this.inputElementRef=rn(),this.size="md",this.disabled=!1,this.placeholder="",this.type="text",this.value=""}render(){const e=`wui-padding-right-${this.inputRightPadding}`,i={[`wui-size-${this.size}`]:!0,[e]:!!this.inputRightPadding};return c`${this.templateIcon()}
|
|
1649
|
+
<input
|
|
1650
|
+
data-testid="wui-input-text"
|
|
1651
|
+
${an(this.inputElementRef)}
|
|
1652
|
+
class=${Qn(i)}
|
|
1653
|
+
type=${this.type}
|
|
1654
|
+
enterkeyhint=${y(this.enterKeyHint)}
|
|
1655
|
+
?disabled=${this.disabled}
|
|
1656
|
+
placeholder=${this.placeholder}
|
|
1657
|
+
@input=${this.dispatchInputChangeEvent.bind(this)}
|
|
1658
|
+
.value=${this.value||""}
|
|
1659
|
+
tabindex=${y(this.tabIdx)}
|
|
1660
|
+
/>
|
|
1661
|
+
<slot></slot>`}templateIcon(){return this.icon?c`<wui-icon
|
|
1662
|
+
data-input=${this.size}
|
|
1663
|
+
size=${this.size}
|
|
1664
|
+
color="inherit"
|
|
1665
|
+
name=${this.icon}
|
|
1666
|
+
></wui-icon>`:null}dispatchInputChangeEvent(){this.dispatchEvent(new CustomEvent("inputChange",{detail:this.inputElementRef.value?.value,bubbles:!0,composed:!0}))}};H.styles=[A,M,yo];oe([u()],H.prototype,"size",void 0);oe([u()],H.prototype,"icon",void 0);oe([u({type:Boolean})],H.prototype,"disabled",void 0);oe([u()],H.prototype,"placeholder",void 0);oe([u()],H.prototype,"type",void 0);oe([u()],H.prototype,"keyHint",void 0);oe([u()],H.prototype,"value",void 0);oe([u()],H.prototype,"inputRightPadding",void 0);oe([u()],H.prototype,"tabIdx",void 0);H=oe([C("wui-input-text")],H);const xo=B`
|
|
1667
|
+
:host {
|
|
1668
|
+
position: relative;
|
|
1669
|
+
display: inline-block;
|
|
1670
|
+
width: 100%;
|
|
1671
|
+
}
|
|
1672
|
+
`;var Co=function(r,e,n,i){var o=arguments.length,t=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(r,e,n,i);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(t=(o<3?a(t):o>3?a(e,n,t):a(e,n))||t);return o>3&&t&&Object.defineProperty(e,n,t),t};let Ht=class extends _{constructor(){super(...arguments),this.inputComponentRef=rn()}render(){return c`
|
|
1673
|
+
<wui-input-text
|
|
1674
|
+
${an(this.inputComponentRef)}
|
|
1675
|
+
placeholder="Search wallet"
|
|
1676
|
+
icon="search"
|
|
1677
|
+
type="search"
|
|
1678
|
+
enterKeyHint="search"
|
|
1679
|
+
size="sm"
|
|
1680
|
+
>
|
|
1681
|
+
<wui-input-element @click=${this.clearValue} icon="close"></wui-input-element>
|
|
1682
|
+
</wui-input-text>
|
|
1683
|
+
`}clearValue(){const n=this.inputComponentRef.value?.inputElementRef.value;n&&(n.value="",n.focus(),n.dispatchEvent(new Event("input")))}};Ht.styles=[A,xo];Ht=Co([C("wui-search-bar")],Ht);const $o=Ae`<svg viewBox="0 0 48 54" fill="none">
|
|
1684
|
+
<path
|
|
1685
|
+
d="M43.4605 10.7248L28.0485 1.61089C25.5438 0.129705 22.4562 0.129705 19.9515 1.61088L4.53951 10.7248C2.03626 12.2051 0.5 14.9365 0.5 17.886V36.1139C0.5 39.0635 2.03626 41.7949 4.53951 43.2752L19.9515 52.3891C22.4562 53.8703 25.5438 53.8703 28.0485 52.3891L43.4605 43.2752C45.9637 41.7949 47.5 39.0635 47.5 36.114V17.8861C47.5 14.9365 45.9637 12.2051 43.4605 10.7248Z"
|
|
1686
|
+
/>
|
|
1687
|
+
</svg>`,Ro=B`
|
|
1688
|
+
:host {
|
|
1689
|
+
display: flex;
|
|
1690
|
+
flex-direction: column;
|
|
1691
|
+
align-items: center;
|
|
1692
|
+
width: 104px;
|
|
1693
|
+
row-gap: var(--wui-spacing-xs);
|
|
1694
|
+
padding: var(--wui-spacing-xs) 10px;
|
|
1695
|
+
background-color: var(--wui-color-gray-glass-002);
|
|
1696
|
+
border-radius: clamp(0px, var(--wui-border-radius-xs), 20px);
|
|
1697
|
+
position: relative;
|
|
1698
|
+
}
|
|
1699
|
+
|
|
1700
|
+
wui-shimmer[data-type='network'] {
|
|
1701
|
+
border: none;
|
|
1702
|
+
-webkit-clip-path: var(--wui-path-network);
|
|
1703
|
+
clip-path: var(--wui-path-network);
|
|
1704
|
+
}
|
|
1705
|
+
|
|
1706
|
+
svg {
|
|
1707
|
+
position: absolute;
|
|
1708
|
+
width: 48px;
|
|
1709
|
+
height: 54px;
|
|
1710
|
+
z-index: 1;
|
|
1711
|
+
}
|
|
1712
|
+
|
|
1713
|
+
svg > path {
|
|
1714
|
+
stroke: var(--wui-color-gray-glass-010);
|
|
1715
|
+
stroke-width: 1px;
|
|
1716
|
+
}
|
|
1717
|
+
|
|
1718
|
+
@media (max-width: 350px) {
|
|
1719
|
+
:host {
|
|
1720
|
+
width: 100%;
|
|
1721
|
+
}
|
|
1722
|
+
}
|
|
1723
|
+
`;var Hn=function(r,e,n,i){var o=arguments.length,t=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(r,e,n,i);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(t=(o<3?a(t):o>3?a(e,n,t):a(e,n))||t);return o>3&&t&&Object.defineProperty(e,n,t),t};let ht=class extends _{constructor(){super(...arguments),this.type="wallet"}render(){return c`
|
|
1724
|
+
${this.shimmerTemplate()}
|
|
1725
|
+
<wui-shimmer width="56px" height="20px" borderRadius="xs"></wui-shimmer>
|
|
1726
|
+
`}shimmerTemplate(){return this.type==="network"?c` <wui-shimmer
|
|
1727
|
+
data-type=${this.type}
|
|
1728
|
+
width="48px"
|
|
1729
|
+
height="54px"
|
|
1730
|
+
borderRadius="xs"
|
|
1731
|
+
></wui-shimmer>
|
|
1732
|
+
${$o}`:c`<wui-shimmer width="56px" height="56px" borderRadius="xs"></wui-shimmer>`}};ht.styles=[A,M,Ro];Hn([u()],ht.prototype,"type",void 0);ht=Hn([C("wui-card-select-loader")],ht);const _o=B`
|
|
1733
|
+
:host {
|
|
1734
|
+
display: grid;
|
|
1735
|
+
width: inherit;
|
|
1736
|
+
height: inherit;
|
|
1737
|
+
}
|
|
1738
|
+
`;var K=function(r,e,n,i){var o=arguments.length,t=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(r,e,n,i);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(t=(o<3?a(t):o>3?a(e,n,t):a(e,n))||t);return o>3&&t&&Object.defineProperty(e,n,t),t};let N=class extends _{render(){return this.style.cssText=`
|
|
1739
|
+
grid-template-rows: ${this.gridTemplateRows};
|
|
1740
|
+
grid-template-columns: ${this.gridTemplateColumns};
|
|
1741
|
+
justify-items: ${this.justifyItems};
|
|
1742
|
+
align-items: ${this.alignItems};
|
|
1743
|
+
justify-content: ${this.justifyContent};
|
|
1744
|
+
align-content: ${this.alignContent};
|
|
1745
|
+
column-gap: ${this.columnGap&&`var(--wui-spacing-${this.columnGap})`};
|
|
1746
|
+
row-gap: ${this.rowGap&&`var(--wui-spacing-${this.rowGap})`};
|
|
1747
|
+
gap: ${this.gap&&`var(--wui-spacing-${this.gap})`};
|
|
1748
|
+
padding-top: ${this.padding&&se.getSpacingStyles(this.padding,0)};
|
|
1749
|
+
padding-right: ${this.padding&&se.getSpacingStyles(this.padding,1)};
|
|
1750
|
+
padding-bottom: ${this.padding&&se.getSpacingStyles(this.padding,2)};
|
|
1751
|
+
padding-left: ${this.padding&&se.getSpacingStyles(this.padding,3)};
|
|
1752
|
+
margin-top: ${this.margin&&se.getSpacingStyles(this.margin,0)};
|
|
1753
|
+
margin-right: ${this.margin&&se.getSpacingStyles(this.margin,1)};
|
|
1754
|
+
margin-bottom: ${this.margin&&se.getSpacingStyles(this.margin,2)};
|
|
1755
|
+
margin-left: ${this.margin&&se.getSpacingStyles(this.margin,3)};
|
|
1756
|
+
`,c`<slot></slot>`}};N.styles=[A,_o];K([u()],N.prototype,"gridTemplateRows",void 0);K([u()],N.prototype,"gridTemplateColumns",void 0);K([u()],N.prototype,"justifyItems",void 0);K([u()],N.prototype,"alignItems",void 0);K([u()],N.prototype,"justifyContent",void 0);K([u()],N.prototype,"alignContent",void 0);K([u()],N.prototype,"columnGap",void 0);K([u()],N.prototype,"rowGap",void 0);K([u()],N.prototype,"gap",void 0);K([u()],N.prototype,"padding",void 0);K([u()],N.prototype,"margin",void 0);N=K([C("wui-grid")],N);const Io=B`
|
|
1757
|
+
button {
|
|
1758
|
+
display: flex;
|
|
1759
|
+
flex-direction: column;
|
|
1760
|
+
justify-content: center;
|
|
1761
|
+
align-items: center;
|
|
1762
|
+
cursor: pointer;
|
|
1763
|
+
width: 104px;
|
|
1764
|
+
row-gap: var(--wui-spacing-xs);
|
|
1765
|
+
padding: var(--wui-spacing-s) var(--wui-spacing-0);
|
|
1766
|
+
background-color: var(--wui-color-gray-glass-002);
|
|
1767
|
+
border-radius: clamp(0px, var(--wui-border-radius-xs), 20px);
|
|
1768
|
+
transition:
|
|
1769
|
+
color var(--wui-duration-lg) var(--wui-ease-out-power-1),
|
|
1770
|
+
background-color var(--wui-duration-lg) var(--wui-ease-out-power-1),
|
|
1771
|
+
border-radius var(--wui-duration-lg) var(--wui-ease-out-power-1);
|
|
1772
|
+
will-change: background-color, color, border-radius;
|
|
1773
|
+
outline: none;
|
|
1774
|
+
border: none;
|
|
1775
|
+
}
|
|
1776
|
+
|
|
1777
|
+
button > wui-flex > wui-text {
|
|
1778
|
+
color: var(--wui-color-fg-100);
|
|
1779
|
+
max-width: 86px;
|
|
1780
|
+
white-space: nowrap;
|
|
1781
|
+
overflow: hidden;
|
|
1782
|
+
text-overflow: ellipsis;
|
|
1783
|
+
justify-content: center;
|
|
1784
|
+
}
|
|
1785
|
+
|
|
1786
|
+
button > wui-flex > wui-text.certified {
|
|
1787
|
+
max-width: 66px;
|
|
1788
|
+
}
|
|
1789
|
+
|
|
1790
|
+
button:hover:enabled {
|
|
1791
|
+
background-color: var(--wui-color-gray-glass-005);
|
|
1792
|
+
}
|
|
1793
|
+
|
|
1794
|
+
button:disabled > wui-flex > wui-text {
|
|
1795
|
+
color: var(--wui-color-gray-glass-015);
|
|
1796
|
+
}
|
|
1797
|
+
|
|
1798
|
+
[data-selected='true'] {
|
|
1799
|
+
background-color: var(--wui-color-accent-glass-020);
|
|
1800
|
+
}
|
|
1801
|
+
|
|
1802
|
+
@media (hover: hover) and (pointer: fine) {
|
|
1803
|
+
[data-selected='true']:hover:enabled {
|
|
1804
|
+
background-color: var(--wui-color-accent-glass-015);
|
|
1805
|
+
}
|
|
1806
|
+
}
|
|
1807
|
+
|
|
1808
|
+
[data-selected='true']:active:enabled {
|
|
1809
|
+
background-color: var(--wui-color-accent-glass-010);
|
|
1810
|
+
}
|
|
1811
|
+
|
|
1812
|
+
@media (max-width: 350px) {
|
|
1813
|
+
button {
|
|
1814
|
+
width: 100%;
|
|
1815
|
+
}
|
|
1816
|
+
}
|
|
1817
|
+
`;var Ge=function(r,e,n,i){var o=arguments.length,t=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(r,e,n,i);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(t=(o<3?a(t):o>3?a(e,n,t):a(e,n))||t);return o>3&&t&&Object.defineProperty(e,n,t),t};let ye=class extends _{constructor(){super(),this.observer=new IntersectionObserver(()=>{}),this.visible=!1,this.imageSrc=void 0,this.imageLoading=!1,this.wallet=void 0,this.observer=new IntersectionObserver(e=>{e.forEach(n=>{n.isIntersecting?(this.visible=!0,this.fetchImageSrc()):this.visible=!1})},{threshold:.01})}firstUpdated(){this.observer.observe(this)}disconnectedCallback(){this.observer.disconnect()}render(){const e=this.wallet?.badge_type==="certified";return c`
|
|
1818
|
+
<button>
|
|
1819
|
+
${this.imageTemplate()}
|
|
1820
|
+
<wui-flex flexDirection="row" alignItems="center" justifyContent="center" gap="3xs">
|
|
1821
|
+
<wui-text
|
|
1822
|
+
variant="tiny-500"
|
|
1823
|
+
color="inherit"
|
|
1824
|
+
class=${y(e?"certified":void 0)}
|
|
1825
|
+
>${this.wallet?.name}</wui-text
|
|
1826
|
+
>
|
|
1827
|
+
${e?c`<wui-icon size="sm" name="walletConnectBrown"></wui-icon>`:null}
|
|
1828
|
+
</wui-flex>
|
|
1829
|
+
</button>
|
|
1830
|
+
`}imageTemplate(){return!this.visible&&!this.imageSrc||this.imageLoading?this.shimmerTemplate():c`
|
|
1831
|
+
<wui-wallet-image
|
|
1832
|
+
size="md"
|
|
1833
|
+
imageSrc=${y(this.imageSrc)}
|
|
1834
|
+
name=${this.wallet?.name}
|
|
1835
|
+
.installed=${this.wallet?.installed}
|
|
1836
|
+
badgeSize="sm"
|
|
1837
|
+
>
|
|
1838
|
+
</wui-wallet-image>
|
|
1839
|
+
`}shimmerTemplate(){return c`<wui-shimmer width="56px" height="56px" borderRadius="xs"></wui-shimmer>`}async fetchImageSrc(){this.wallet&&(this.imageSrc=D.getWalletImage(this.wallet),!this.imageSrc&&(this.imageLoading=!0,this.imageSrc=await D.fetchWalletImage(this.wallet.image_id),this.imageLoading=!1))}};ye.styles=Io;Ge([v()],ye.prototype,"visible",void 0);Ge([v()],ye.prototype,"imageSrc",void 0);Ge([v()],ye.prototype,"imageLoading",void 0);Ge([u()],ye.prototype,"wallet",void 0);ye=Ge([C("w3m-all-wallets-list-item")],ye);const Eo=B`
|
|
1840
|
+
wui-grid {
|
|
1841
|
+
max-height: clamp(360px, 400px, 80vh);
|
|
1842
|
+
overflow: scroll;
|
|
1843
|
+
scrollbar-width: none;
|
|
1844
|
+
grid-auto-rows: min-content;
|
|
1845
|
+
grid-template-columns: repeat(auto-fill, 104px);
|
|
1846
|
+
}
|
|
1847
|
+
|
|
1848
|
+
@media (max-width: 350px) {
|
|
1849
|
+
wui-grid {
|
|
1850
|
+
grid-template-columns: repeat(2, 1fr);
|
|
1851
|
+
}
|
|
1852
|
+
}
|
|
1853
|
+
|
|
1854
|
+
wui-grid[data-scroll='false'] {
|
|
1855
|
+
overflow: hidden;
|
|
1856
|
+
}
|
|
1857
|
+
|
|
1858
|
+
wui-grid::-webkit-scrollbar {
|
|
1859
|
+
display: none;
|
|
1860
|
+
}
|
|
1861
|
+
|
|
1862
|
+
wui-loading-spinner {
|
|
1863
|
+
padding-top: var(--wui-spacing-l);
|
|
1864
|
+
padding-bottom: var(--wui-spacing-l);
|
|
1865
|
+
justify-content: center;
|
|
1866
|
+
grid-column: 1 / span 4;
|
|
1867
|
+
}
|
|
1868
|
+
`;var Le=function(r,e,n,i){var o=arguments.length,t=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(r,e,n,i);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(t=(o<3?a(t):o>3?a(e,n,t):a(e,n))||t);return o>3&&t&&Object.defineProperty(e,n,t),t};const mn="local-paginator";let pe=class extends _{constructor(){super(),this.unsubscribe=[],this.paginationObserver=void 0,this.loading=!T.state.wallets.length,this.wallets=T.state.wallets,this.recommended=T.state.recommended,this.featured=T.state.featured,this.filteredWallets=T.state.filteredWallets,this.unsubscribe.push(T.subscribeKey("wallets",e=>this.wallets=e),T.subscribeKey("recommended",e=>this.recommended=e),T.subscribeKey("featured",e=>this.featured=e),T.subscribeKey("filteredWallets",e=>this.filteredWallets=e))}firstUpdated(){this.initialFetch(),this.createPaginationObserver()}disconnectedCallback(){this.unsubscribe.forEach(e=>e()),this.paginationObserver?.disconnect()}render(){return c`
|
|
1869
|
+
<wui-grid
|
|
1870
|
+
data-scroll=${!this.loading}
|
|
1871
|
+
.padding=${["0","s","s","s"]}
|
|
1872
|
+
columnGap="xxs"
|
|
1873
|
+
rowGap="l"
|
|
1874
|
+
justifyContent="space-between"
|
|
1875
|
+
>
|
|
1876
|
+
${this.loading?this.shimmerTemplate(16):this.walletsTemplate()}
|
|
1877
|
+
${this.paginationLoaderTemplate()}
|
|
1878
|
+
</wui-grid>
|
|
1879
|
+
`}async initialFetch(){this.loading=!0;const e=this.shadowRoot?.querySelector("wui-grid");e&&(await T.fetchWalletsByPage({page:1}),await e.animate([{opacity:1},{opacity:0}],{duration:200,fill:"forwards",easing:"ease"}).finished,this.loading=!1,e.animate([{opacity:0},{opacity:1}],{duration:200,fill:"forwards",easing:"ease"}))}shimmerTemplate(e,n){return[...Array(e)].map(()=>c`
|
|
1880
|
+
<wui-card-select-loader type="wallet" id=${y(n)}></wui-card-select-loader>
|
|
1881
|
+
`)}walletsTemplate(){const e=this.filteredWallets?.length>0?E.uniqueBy([...this.featured,...this.recommended,...this.filteredWallets],"id"):E.uniqueBy([...this.featured,...this.recommended,...this.wallets],"id");return gt.markWalletsAsInstalled(e).map(i=>c`
|
|
1882
|
+
<w3m-all-wallets-list-item
|
|
1883
|
+
@click=${()=>this.onConnectWallet(i)}
|
|
1884
|
+
.wallet=${i}
|
|
1885
|
+
></w3m-all-wallets-list-item>
|
|
1886
|
+
`)}paginationLoaderTemplate(){const{wallets:e,recommended:n,featured:i,count:o}=T.state,t=window.innerWidth<352?3:4,a=e.length+n.length;let l=Math.ceil(a/t)*t-a+t;return l-=e.length?i.length%t:0,o===0&&i.length>0?null:o===0||[...i,...e,...n].length<o?this.shimmerTemplate(l,mn):null}createPaginationObserver(){const e=this.shadowRoot?.querySelector(`#${mn}`);e&&(this.paginationObserver=new IntersectionObserver(([n])=>{if(n?.isIntersecting&&!this.loading){const{page:i,count:o,wallets:t}=T.state;t.length<o&&T.fetchWalletsByPage({page:i+1})}}),this.paginationObserver.observe(e))}onConnectWallet(e){P.selectWalletConnector(e)}};pe.styles=Eo;Le([v()],pe.prototype,"loading",void 0);Le([v()],pe.prototype,"wallets",void 0);Le([v()],pe.prototype,"recommended",void 0);Le([v()],pe.prototype,"featured",void 0);Le([v()],pe.prototype,"filteredWallets",void 0);pe=Le([C("w3m-all-wallets-list")],pe);const Wo=B`
|
|
1887
|
+
wui-grid,
|
|
1888
|
+
wui-loading-spinner,
|
|
1889
|
+
wui-flex {
|
|
1890
|
+
height: 360px;
|
|
1891
|
+
}
|
|
1892
|
+
|
|
1893
|
+
wui-grid {
|
|
1894
|
+
overflow: scroll;
|
|
1895
|
+
scrollbar-width: none;
|
|
1896
|
+
grid-auto-rows: min-content;
|
|
1897
|
+
grid-template-columns: repeat(auto-fill, 104px);
|
|
1898
|
+
}
|
|
1899
|
+
|
|
1900
|
+
wui-grid[data-scroll='false'] {
|
|
1901
|
+
overflow: hidden;
|
|
1902
|
+
}
|
|
1903
|
+
|
|
1904
|
+
wui-grid::-webkit-scrollbar {
|
|
1905
|
+
display: none;
|
|
1906
|
+
}
|
|
1907
|
+
|
|
1908
|
+
wui-loading-spinner {
|
|
1909
|
+
justify-content: center;
|
|
1910
|
+
align-items: center;
|
|
1911
|
+
}
|
|
1912
|
+
|
|
1913
|
+
@media (max-width: 350px) {
|
|
1914
|
+
wui-grid {
|
|
1915
|
+
grid-template-columns: repeat(2, 1fr);
|
|
1916
|
+
}
|
|
1917
|
+
}
|
|
1918
|
+
`;var It=function(r,e,n,i){var o=arguments.length,t=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(r,e,n,i);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(t=(o<3?a(t):o>3?a(e,n,t):a(e,n))||t);return o>3&&t&&Object.defineProperty(e,n,t),t};let Te=class extends _{constructor(){super(...arguments),this.prevQuery="",this.prevBadge=void 0,this.loading=!0,this.query=""}render(){return this.onSearch(),this.loading?c`<wui-loading-spinner color="accent-100"></wui-loading-spinner>`:this.walletsTemplate()}async onSearch(){(this.query.trim()!==this.prevQuery.trim()||this.badge!==this.prevBadge)&&(this.prevQuery=this.query,this.prevBadge=this.badge,this.loading=!0,await T.searchWallet({search:this.query,badge:this.badge}),this.loading=!1)}walletsTemplate(){const{search:e}=T.state,n=gt.markWalletsAsInstalled(e);return e.length?c`
|
|
1919
|
+
<wui-grid
|
|
1920
|
+
data-testid="wallet-list"
|
|
1921
|
+
.padding=${["0","s","s","s"]}
|
|
1922
|
+
rowGap="l"
|
|
1923
|
+
columnGap="xs"
|
|
1924
|
+
justifyContent="space-between"
|
|
1925
|
+
>
|
|
1926
|
+
${n.map(i=>c`
|
|
1927
|
+
<w3m-all-wallets-list-item
|
|
1928
|
+
@click=${()=>this.onConnectWallet(i)}
|
|
1929
|
+
.wallet=${i}
|
|
1930
|
+
data-testid="wallet-search-item-${i.id}"
|
|
1931
|
+
></w3m-all-wallets-list-item>
|
|
1932
|
+
`)}
|
|
1933
|
+
</wui-grid>
|
|
1934
|
+
`:c`
|
|
1935
|
+
<wui-flex
|
|
1936
|
+
data-testid="no-wallet-found"
|
|
1937
|
+
justifyContent="center"
|
|
1938
|
+
alignItems="center"
|
|
1939
|
+
gap="s"
|
|
1940
|
+
flexDirection="column"
|
|
1941
|
+
>
|
|
1942
|
+
<wui-icon-box
|
|
1943
|
+
size="lg"
|
|
1944
|
+
iconColor="fg-200"
|
|
1945
|
+
backgroundColor="fg-300"
|
|
1946
|
+
icon="wallet"
|
|
1947
|
+
background="transparent"
|
|
1948
|
+
></wui-icon-box>
|
|
1949
|
+
<wui-text data-testid="no-wallet-found-text" color="fg-200" variant="paragraph-500">
|
|
1950
|
+
No Wallet found
|
|
1951
|
+
</wui-text>
|
|
1952
|
+
</wui-flex>
|
|
1953
|
+
`}onConnectWallet(e){P.selectWalletConnector(e)}};Te.styles=Wo;It([v()],Te.prototype,"loading",void 0);It([u()],Te.prototype,"query",void 0);It([u()],Te.prototype,"badge",void 0);Te=It([C("w3m-all-wallets-search")],Te);var sn=function(r,e,n,i){var o=arguments.length,t=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(r,e,n,i);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(t=(o<3?a(t):o>3?a(e,n,t):a(e,n))||t);return o>3&&t&&Object.defineProperty(e,n,t),t};let pt=class extends _{constructor(){super(...arguments),this.search="",this.onDebouncedSearch=E.debounce(e=>{this.search=e})}render(){const e=this.search.length>=2;return c`
|
|
1954
|
+
<wui-flex .padding=${["0","s","s","s"]} gap="xs">
|
|
1955
|
+
<wui-search-bar @inputChange=${this.onInputChange.bind(this)}></wui-search-bar>
|
|
1956
|
+
<wui-certified-switch
|
|
1957
|
+
?checked=${this.badge}
|
|
1958
|
+
@click=${this.onClick.bind(this)}
|
|
1959
|
+
data-testid="wui-certified-switch"
|
|
1960
|
+
></wui-certified-switch>
|
|
1961
|
+
${this.qrButtonTemplate()}
|
|
1962
|
+
</wui-flex>
|
|
1963
|
+
${e||this.badge?c`<w3m-all-wallets-search
|
|
1964
|
+
query=${this.search}
|
|
1965
|
+
badge=${y(this.badge)}
|
|
1966
|
+
></w3m-all-wallets-search>`:c`<w3m-all-wallets-list badge=${y(this.badge)}></w3m-all-wallets-list>`}
|
|
1967
|
+
`}onInputChange(e){this.onDebouncedSearch(e.detail)}onClick(){if(this.badge==="certified"){this.badge=void 0;return}this.badge="certified",Qe.showSvg("Only WalletConnect certified",{icon:"walletConnectBrown",iconColor:"accent-100"})}qrButtonTemplate(){return E.isMobile()?c`
|
|
1968
|
+
<wui-icon-box
|
|
1969
|
+
size="lg"
|
|
1970
|
+
iconSize="xl"
|
|
1971
|
+
iconColor="accent-100"
|
|
1972
|
+
backgroundColor="accent-100"
|
|
1973
|
+
icon="qrCode"
|
|
1974
|
+
background="transparent"
|
|
1975
|
+
border
|
|
1976
|
+
borderColor="wui-accent-glass-010"
|
|
1977
|
+
@click=${this.onWalletConnectQr.bind(this)}
|
|
1978
|
+
></wui-icon-box>
|
|
1979
|
+
`:null}onWalletConnectQr(){O.push("ConnectingWalletConnect")}};sn([v()],pt.prototype,"search",void 0);sn([v()],pt.prototype,"badge",void 0);pt=sn([C("w3m-all-wallets-view")],pt);const So=B`
|
|
1980
|
+
button {
|
|
1981
|
+
column-gap: var(--wui-spacing-s);
|
|
1982
|
+
padding: 11px 18px 11px var(--wui-spacing-s);
|
|
1983
|
+
width: 100%;
|
|
1984
|
+
background-color: var(--wui-color-gray-glass-002);
|
|
1985
|
+
border-radius: var(--wui-border-radius-xs);
|
|
1986
|
+
color: var(--wui-color-fg-250);
|
|
1987
|
+
transition:
|
|
1988
|
+
color var(--wui-ease-out-power-1) var(--wui-duration-md),
|
|
1989
|
+
background-color var(--wui-ease-out-power-1) var(--wui-duration-md);
|
|
1990
|
+
will-change: color, background-color;
|
|
1991
|
+
}
|
|
1992
|
+
|
|
1993
|
+
button[data-iconvariant='square'],
|
|
1994
|
+
button[data-iconvariant='square-blue'] {
|
|
1995
|
+
padding: 6px 18px 6px 9px;
|
|
1996
|
+
}
|
|
1997
|
+
|
|
1998
|
+
button > wui-flex {
|
|
1999
|
+
flex: 1;
|
|
2000
|
+
}
|
|
2001
|
+
|
|
2002
|
+
button > wui-image {
|
|
2003
|
+
width: 32px;
|
|
2004
|
+
height: 32px;
|
|
2005
|
+
box-shadow: 0 0 0 2px var(--wui-color-gray-glass-005);
|
|
2006
|
+
border-radius: var(--wui-border-radius-3xl);
|
|
2007
|
+
}
|
|
2008
|
+
|
|
2009
|
+
button > wui-icon {
|
|
2010
|
+
width: 36px;
|
|
2011
|
+
height: 36px;
|
|
2012
|
+
transition: opacity var(--wui-ease-out-power-1) var(--wui-duration-md);
|
|
2013
|
+
will-change: opacity;
|
|
2014
|
+
}
|
|
2015
|
+
|
|
2016
|
+
button > wui-icon-box[data-variant='blue'] {
|
|
2017
|
+
box-shadow: 0 0 0 2px var(--wui-color-accent-glass-005);
|
|
2018
|
+
}
|
|
2019
|
+
|
|
2020
|
+
button > wui-icon-box[data-variant='overlay'] {
|
|
2021
|
+
box-shadow: 0 0 0 2px var(--wui-color-gray-glass-005);
|
|
2022
|
+
}
|
|
2023
|
+
|
|
2024
|
+
button > wui-icon-box[data-variant='square-blue'] {
|
|
2025
|
+
border-radius: var(--wui-border-radius-3xs);
|
|
2026
|
+
position: relative;
|
|
2027
|
+
border: none;
|
|
2028
|
+
width: 36px;
|
|
2029
|
+
height: 36px;
|
|
2030
|
+
}
|
|
2031
|
+
|
|
2032
|
+
button > wui-icon-box[data-variant='square-blue']::after {
|
|
2033
|
+
content: '';
|
|
2034
|
+
position: absolute;
|
|
2035
|
+
top: 0;
|
|
2036
|
+
bottom: 0;
|
|
2037
|
+
left: 0;
|
|
2038
|
+
right: 0;
|
|
2039
|
+
border-radius: inherit;
|
|
2040
|
+
border: 1px solid var(--wui-color-accent-glass-010);
|
|
2041
|
+
pointer-events: none;
|
|
2042
|
+
}
|
|
2043
|
+
|
|
2044
|
+
button > wui-icon:last-child {
|
|
2045
|
+
width: 14px;
|
|
2046
|
+
height: 14px;
|
|
2047
|
+
}
|
|
2048
|
+
|
|
2049
|
+
button:disabled {
|
|
2050
|
+
color: var(--wui-color-gray-glass-020);
|
|
2051
|
+
}
|
|
2052
|
+
|
|
2053
|
+
button[data-loading='true'] > wui-icon {
|
|
2054
|
+
opacity: 0;
|
|
2055
|
+
}
|
|
2056
|
+
|
|
2057
|
+
wui-loading-spinner {
|
|
2058
|
+
position: absolute;
|
|
2059
|
+
right: 18px;
|
|
2060
|
+
top: 50%;
|
|
2061
|
+
transform: translateY(-50%);
|
|
2062
|
+
}
|
|
2063
|
+
`;var X=function(r,e,n,i){var o=arguments.length,t=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(r,e,n,i);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(t=(o<3?a(t):o>3?a(e,n,t):a(e,n))||t);return o>3&&t&&Object.defineProperty(e,n,t),t};let F=class extends _{constructor(){super(...arguments),this.tabIdx=void 0,this.variant="icon",this.disabled=!1,this.imageSrc=void 0,this.alt=void 0,this.chevron=!1,this.loading=!1}render(){return c`
|
|
2064
|
+
<button
|
|
2065
|
+
?disabled=${this.loading?!0:!!this.disabled}
|
|
2066
|
+
data-loading=${this.loading}
|
|
2067
|
+
data-iconvariant=${y(this.iconVariant)}
|
|
2068
|
+
tabindex=${y(this.tabIdx)}
|
|
2069
|
+
>
|
|
2070
|
+
${this.loadingTemplate()} ${this.visualTemplate()}
|
|
2071
|
+
<wui-flex gap="3xs">
|
|
2072
|
+
<slot></slot>
|
|
2073
|
+
</wui-flex>
|
|
2074
|
+
${this.chevronTemplate()}
|
|
2075
|
+
</button>
|
|
2076
|
+
`}visualTemplate(){if(this.variant==="image"&&this.imageSrc)return c`<wui-image src=${this.imageSrc} alt=${this.alt??"list item"}></wui-image>`;if(this.iconVariant==="square"&&this.icon&&this.variant==="icon")return c`<wui-icon name=${this.icon}></wui-icon>`;if(this.variant==="icon"&&this.icon&&this.iconVariant){const e=["blue","square-blue"].includes(this.iconVariant)?"accent-100":"fg-200",n=this.iconVariant==="square-blue"?"mdl":"md",i=this.iconSize?this.iconSize:n;return c`
|
|
2077
|
+
<wui-icon-box
|
|
2078
|
+
data-variant=${this.iconVariant}
|
|
2079
|
+
icon=${this.icon}
|
|
2080
|
+
iconSize=${i}
|
|
2081
|
+
background="transparent"
|
|
2082
|
+
iconColor=${e}
|
|
2083
|
+
backgroundColor=${e}
|
|
2084
|
+
size=${n}
|
|
2085
|
+
></wui-icon-box>
|
|
2086
|
+
`}return null}loadingTemplate(){return this.loading?c`<wui-loading-spinner
|
|
2087
|
+
data-testid="wui-list-item-loading-spinner"
|
|
2088
|
+
color="fg-300"
|
|
2089
|
+
></wui-loading-spinner>`:c``}chevronTemplate(){return this.chevron?c`<wui-icon size="inherit" color="fg-200" name="chevronRight"></wui-icon>`:null}};F.styles=[A,M,So];X([u()],F.prototype,"icon",void 0);X([u()],F.prototype,"iconSize",void 0);X([u()],F.prototype,"tabIdx",void 0);X([u()],F.prototype,"variant",void 0);X([u()],F.prototype,"iconVariant",void 0);X([u({type:Boolean})],F.prototype,"disabled",void 0);X([u()],F.prototype,"imageSrc",void 0);X([u()],F.prototype,"alt",void 0);X([u({type:Boolean})],F.prototype,"chevron",void 0);X([u({type:Boolean})],F.prototype,"loading",void 0);F=X([C("wui-list-item")],F);var To=function(r,e,n,i){var o=arguments.length,t=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(r,e,n,i);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(t=(o<3?a(t):o>3?a(e,n,t):a(e,n))||t);return o>3&&t&&Object.defineProperty(e,n,t),t};let vn=class extends _{constructor(){super(...arguments),this.wallet=O.state.data?.wallet}render(){if(!this.wallet)throw new Error("w3m-downloads-view");return c`
|
|
2090
|
+
<wui-flex gap="xs" flexDirection="column" .padding=${["s","s","l","s"]}>
|
|
2091
|
+
${this.chromeTemplate()} ${this.iosTemplate()} ${this.androidTemplate()}
|
|
2092
|
+
${this.homepageTemplate()}
|
|
2093
|
+
</wui-flex>
|
|
2094
|
+
`}chromeTemplate(){return this.wallet?.chrome_store?c`<wui-list-item
|
|
2095
|
+
variant="icon"
|
|
2096
|
+
icon="chromeStore"
|
|
2097
|
+
iconVariant="square"
|
|
2098
|
+
@click=${this.onChromeStore.bind(this)}
|
|
2099
|
+
chevron
|
|
2100
|
+
>
|
|
2101
|
+
<wui-text variant="paragraph-500" color="fg-100">Chrome Extension</wui-text>
|
|
2102
|
+
</wui-list-item>`:null}iosTemplate(){return this.wallet?.app_store?c`<wui-list-item
|
|
2103
|
+
variant="icon"
|
|
2104
|
+
icon="appStore"
|
|
2105
|
+
iconVariant="square"
|
|
2106
|
+
@click=${this.onAppStore.bind(this)}
|
|
2107
|
+
chevron
|
|
2108
|
+
>
|
|
2109
|
+
<wui-text variant="paragraph-500" color="fg-100">iOS App</wui-text>
|
|
2110
|
+
</wui-list-item>`:null}androidTemplate(){return this.wallet?.play_store?c`<wui-list-item
|
|
2111
|
+
variant="icon"
|
|
2112
|
+
icon="playStore"
|
|
2113
|
+
iconVariant="square"
|
|
2114
|
+
@click=${this.onPlayStore.bind(this)}
|
|
2115
|
+
chevron
|
|
2116
|
+
>
|
|
2117
|
+
<wui-text variant="paragraph-500" color="fg-100">Android App</wui-text>
|
|
2118
|
+
</wui-list-item>`:null}homepageTemplate(){return this.wallet?.homepage?c`
|
|
2119
|
+
<wui-list-item
|
|
2120
|
+
variant="icon"
|
|
2121
|
+
icon="browser"
|
|
2122
|
+
iconVariant="square-blue"
|
|
2123
|
+
@click=${this.onHomePage.bind(this)}
|
|
2124
|
+
chevron
|
|
2125
|
+
>
|
|
2126
|
+
<wui-text variant="paragraph-500" color="fg-100">Website</wui-text>
|
|
2127
|
+
</wui-list-item>
|
|
2128
|
+
`:null}onChromeStore(){this.wallet?.chrome_store&&E.openHref(this.wallet.chrome_store,"_blank")}onAppStore(){this.wallet?.app_store&&E.openHref(this.wallet.app_store,"_blank")}onPlayStore(){this.wallet?.play_store&&E.openHref(this.wallet.play_store,"_blank")}onHomePage(){this.wallet?.homepage&&E.openHref(this.wallet.homepage,"_blank")}};vn=To([C("w3m-downloads-view")],vn);export{pt as W3mAllWalletsView,qt as W3mConnectingWcBasicView,vn as W3mDownloadsView};
|