1import{a as u,b as p,c as v,d as go,e as Lt,f as wo,h as bo}from"./chunk-LNL7WEPP.js";import{A as P,B as z,C as X,D as d,F as fo,J as mo,l as it,o as c,p as _e,s as Wt,t as ho,u as f,w as y}from"./chunk-ZDFADUDA.js";import"./chunk-MKHTXU3Y.js";import{A as V,B as W,C as S,D as Ue,E as uo,F as g,G as Re,H as U,M as po,O as w,U as Y,V as rt,a as De,f as et,p as tt,q as co,r as b,u as B,v as se,x as ot,z as It}from"./chunk-HU7RPYJZ.js";import"./chunk-3RPMVPPX.js";import"./chunk-4S22LEGP.js";import"./chunk-SQLCXRSN.js";import"./chunk-UGZMQAEK.js";import{f as E,i as ri,l as J}from"./chunk-E77BULOG.js";var Wo=E((Sl,Io)=>{"use strict";Io.exports=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}});var ae=E(we=>{"use strict";var Bt,ai=[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];we.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};we.getSymbolTotalCodewords=function(e){return ai[e]};we.getBCHDigit=function(t){let e=0;for(;t!==0;)e++,t>>>=1;return e};we.setToSJISFunction=function(e){if(typeof e!="function")throw new Error('"toSJISFunc" is not a valid function.');Bt=e};we.isKanjiModeEnabled=function(){return typeof Bt<"u"};we.toSJIS=function(e){return Bt(e)}});var ct=E(H=>{"use strict";H.L={bit:1};H.M={bit:0};H.Q={bit:3};H.H={bit:2};function ci(t){if(typeof t!="string")throw new Error("Param is not a string");switch(t.toLowerCase()){case"l":case"low":return H.L;case"m":case"medium":return H.M;case"q":case"quartile":return H.Q;case"h":case"high":return H.H;default:throw new Error("Unknown EC Level: "+t)}}H.isValid=function(e){return e&&typeof e.bit<"u"&&e.bit>=0&&e.bit<4};H.from=function(e,o){if(H.isValid(e))return e;try{return ci(e)}catch{return o}}});var Bo=E((Il,Po)=>{"use strict";function Lo(){this.buffer=[],this.length=0}Lo.prototype={get:function(t){let e=Math.floor(t/8);return(this.buffer[e]>>>7-t%8&1)===1},put:function(t,e){for(let o=0;o<e;o++)this.putBit((t>>>e-o-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(t){let e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}};Po.exports=Lo});var No=E((Wl,ko)=>{"use strict";function qe(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}qe.prototype.set=function(t,e,o,r){let n=t*this.size+e;this.data[n]=o,r&&(this.reservedBit[n]=!0)};qe.prototype.get=function(t,e){return this.data[t*this.size+e]};qe.prototype.xor=function(t,e,o){this.data[t*this.size+e]^=o};qe.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]};ko.exports=qe});var Oo=E(ut=>{"use strict";var ui=ae().getSymbolSize;ut.getRowColCoords=function(e){if(e===1)return[];let o=Math.floor(e/7)+2,r=ui(e),n=r===145?26:Math.ceil((r-13)/(2*o-2))*2,i=[r-7];for(let s=1;s<o-1;s++)i[s]=i[s-1]-n;return i.push(6),i.reverse()};ut.getPositions=function(e){let o=[],r=ut.getRowColCoords(e),n=r.length;for(let i=0;i<n;i++)for(let s=0;s<n;s++)i===0&&s===0||i===0&&s===n-1||i===n-1&&s===0||o.push([r[i],r[s]]);return o}});var Uo=E(Do=>{"use strict";var di=ae().getSymbolSize,Mo=7;Do.getPositions=function(e){let o=di(e);return[[0,0],[o-Mo,0],[0,o-Mo]]}});var jo=E(A=>{"use strict";A.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var be={N1:3,N2:3,N3:40,N4:10};A.isValid=function(e){return e!=null&&e!==""&&!isNaN(e)&&e>=0&&e<=7};A.from=function(e){return A.isValid(e)?parseInt(e,10):void 0};A.getPenaltyN1=function(e){let o=e.size,r=0,n=0,i=0,s=null,l=null;for(let a=0;a<o;a++){n=i=0,s=l=null;for(let h=0;h<o;h++){let m=e.get(a,h);m===s?n++:(n>=5&&(r+=be.N1+(n-5)),s=m,n=1),m=e.get(h,a),m===l?i++:(i>=5&&(r+=be.N1+(i-5)),l=m,i=1)}n>=5&&(r+=be.N1+(n-5)),i>=5&&(r+=be.N1+(i-5))}return r};A.getPenaltyN2=function(e){let o=e.size,r=0;for(let n=0;n<o-1;n++)for(let i=0;i<o-1;i++){let s=e.get(n,i)+e.get(n,i+1)+e.get(n+1,i)+e.get(n+1,i+1);(s===4||s===0)&&r++}return r*be.N2};A.getPenaltyN3=function(e){let o=e.size,r=0,n=0,i=0;for(let s=0;s<o;s++){n=i=0;for(let l=0;l<o;l++)n=n<<1&2047|e.get(s,l),l>=10&&(n===1488||n===93)&&r++,i=i<<1&2047|e.get(l,s),l>=10&&(i===1488||i===93)&&r++}return r*be.N3};A.getPenaltyN4=function(e){let o=0,r=e.data.length;for(let i=0;i<r;i++)o+=e.data[i];return Math.abs(Math.ceil(o*100/r/5)-10)*be.N4};function pi(t,e,o){switch(t){case A.Patterns.PATTERN000:return(e+o)%2===0;case A.Patterns.PATTERN001:return e%2===0;case A.Patterns.PATTERN010:return o%3===0;case A.Patterns.PATTERN011:return(e+o)%3===0;case A.Patterns.PATTERN100:return(Math.floor(e/2)+Math.floor(o/3))%2===0;case A.Patterns.PATTERN101:return e*o%2+e*o%3===0;case A.Patterns.PATTERN110:return(e*o%2+e*o%3)%2===0;case A.Patterns.PATTERN111:return(e*o%3+(e+o)%2)%2===0;default:throw new Error("bad maskPattern:"+t)}}
1A.applyMask=function(e,o){let r=o.size;for(let n=0;n<r;n++)for(let i=0;i<r;i++)o.isReserved(i,n)||o.xor(i,n,pi(e,i,n))};A.getBestMask=function(e,o){let r=Object.keys(A.Patterns).length,n=0,i=1/0;for(let s=0;s<r;s++){o(s),A.applyMask(s,e);let l=A.getPenaltyN1(e)+A.getPenaltyN2(e)+A.getPenaltyN3(e)+A.getPenaltyN4(e);A.applyMask(s,e),l<i&&(i=l,n=s)}return n}});var Nt=E(kt=>{"use strict";var ce=ct(),dt=[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],pt=[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];kt.getBlocksCount=function(e,o){switch(o){case ce.L:return dt[(e-1)*4+0];case ce.M:return dt[(e-1)*4+1];case ce.Q:return dt[(e-1)*4+2];case ce.H:return dt[(e-1)*4+3];default:return}};kt.getTotalCodewordsCount=function(e,o){switch(o){case ce.L:return pt[(e-1)*4+0];case ce.M:return pt[(e-1)*4+1];case ce.Q:return pt[(e-1)*4+2];case ce.H:return pt[(e-1)*4+3];default:return}}});var zo=E(ft=>{"use strict";var Fe=new Uint8Array(512),ht=new Uint8Array(256);(function(){let e=1;for(let o=0;o<255;o++)Fe[o]=e,ht[e]=o,e<<=1,e&256&&(e^=285);for(let o=255;o<512;o++)Fe[o]=Fe[o-255]})();ft.log=function(e){if(e<1)throw new Error("log("+e+")");return ht[e]};ft.exp=function(e){return Fe[e]};ft.mul=function(e,o){return e===0||o===0?0:Fe[ht[e]+ht[o]]}});var qo=E(Ve=>{"use strict";var Ot=zo();Ve.mul=function(e,o){let r=new Uint8Array(e.length+o.length-1);for(let n=0;n<e.length;n++)for(let i=0;i<o.length;i++)r[n+i]^=Ot.mul(e[n],o[i]);return r};Ve.mod=function(e,o){let r=new Uint8Array(e);for(;r.length-o.length>=0;){let n=r[0];for(let s=0;s<o.length;s++)r[s]^=Ot.mul(o[s],n);let i=0;for(;i<r.length&&r[i]===0;)i++;r=r.slice(i)}return r};Ve.generateECPolynomial=function(e){let o=new Uint8Array([1]);for(let r=0;r<e;r++)o=Ve.mul(o,new Uint8Array([1,Ot.exp(r)]));return o}});var Ho=E((Ml,Vo)=>{"use strict";var Fo=qo();function Mt(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree)}Mt.prototype.initialize=function(e){this.degree=e,this.genPoly=Fo.generateECPolynomial(this.degree)};Mt.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");let o=new Uint8Array(e.length+this.degree);o.set(e);let r=Fo.mod(o,this.genPoly),n=this.degree-r.length;if(n>0){let i=new Uint8Array(this.degree);return i.set(r,n),i}return r};Vo.exports=Mt});var Dt=E(Ko=>{"use strict";Ko.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}});var Ut=E(re=>{"use strict";var Go="[0-9]+",hi="[A-Z $%*+\\-./:]+",He="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";He=He.replace(/u/g,"\\u");var fi="(?:(?![A-Z0-9 $%*+\\-./:]|"+He+`)(?:.|[\r 2]))+`;re.KANJI=new RegExp(He,"g");re.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");re.BYTE=new RegExp(fi,"g");re.NUMERIC=new RegExp(Go,"g");re.ALPHANUMERIC=new RegExp(hi,"g");var mi=new RegExp("^"+He+"$"),gi=new RegExp("^"+Go+"$"),wi=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");re.testKanji=function(e){return mi.test(e)};re.testNumeric=function(e){return gi.test(e)};re.testAlphanumeric=function(e){return wi.test(e)}});var ue=E(N=>{"use strict";var bi=Dt(),jt=Ut();N.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]};N.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]};N.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]};N.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]};N.MIXED={bit:-1};N.getCharCountIndicator=function(e,o){if(!e.ccBits)throw new Error("Invalid mode: "+e);if(!bi.isValid(o))throw new Error("Invalid version: "+o);return o>=1&&o<10?e.ccBits[0]:o<27?e.ccBits[1]:e.ccBits[2]};N.getBestModeForData=function(e){return jt.testNumeric(e)?N.NUMERIC:jt.testAlphanumeric(e)?N.ALPHANUMERIC:jt.testKanji(e)?N.KA
2NJI:N.BYTE};N.toString=function(e){if(e&&e.id)return e.id;throw new Error("Invalid mode")};N.isValid=function(e){return e&&e.bit&&e.ccBits};function yi(t){if(typeof t!="string")throw new Error("Param is not a string");switch(t.toLowerCase()){case"numeric":return N.NUMERIC;case"alphanumeric":return N.ALPHANUMERIC;case"kanji":return N.KANJI;case"byte":return N.BYTE;default:throw new Error("Unknown mode: "+t)}}N.from=function(e,o){if(N.isValid(e))return e;try{return yi(e)}catch{return o}}});var Zo=E(ye=>{"use strict";var mt=ae(),xi=Nt(),Qo=ct(),de=ue(),zt=Dt(),Yo=7973,Jo=mt.getBCHDigit(Yo);function Ci(t,e,o){for(let r=1;r<=40;r++)if(e<=ye.getCapacity(r,o,t))return r}function Xo(t,e){return de.getCharCountIndicator(t,e)+4}function vi(t,e){let o=0;return t.forEach(function(r){let n=Xo(r.mode,e);o+=n+r.getBitsLength()}),o}function $i(t,e){for(let o=1;o<=40;o++)if(vi(t,o)<=ye.getCapacity(o,e,de.MIXED))return o}ye.from=function(e,o){return zt.isValid(e)?parseInt(e,10):o};ye.getCapacity=function(e,o,r){if(!zt.isValid(e))throw new Error("Invalid QR Code version");typeof r>"u"&&(r=de.BYTE);let n=mt.getSymbolTotalCodewords(e),i=xi.getTotalCodewordsCount(e,o),s=(n-i)*8;if(r===de.MIXED)return s;let l=s-Xo(r,e);switch(r){case de.NUMERIC:return Math.floor(l/10*3);case de.ALPHANUMERIC:return Math.floor(l/11*2);case de.KANJI:return Math.floor(l/13);case de.BYTE:default:return Math.floor(l/8)}};ye.getBestVersionForData=function(e,o){let r,n=Qo.from(o,Qo.M);if(Array.isArray(e)){if(e.length>1)return $i(e,n);if(e.length===0)return 1;r=e[0]}else r=e;return Ci(r.mode,r.getLength(),n)};ye.getEncodedBits=function(e){if(!zt.isValid(e)||e<7)throw new Error("Invalid QR Code version");let o=e<<12;for(;mt.getBCHDigit(o)-Jo>=0;)o^=Yo<<mt.getBCHDigit(o)-Jo;return e<<12|o}});var rr=E(or=>{"use strict";var qt=ae(),tr=1335,Ei=21522,er=qt.getBCHDigit(tr);or.getEncodedBits=function(e,o){let r=e.bit<<3|o,n=r<<10;for(;qt.getBCHDigit(n)-er>=0;)n^=tr<<qt.getBCHDigit(n)-er;return(r<<10|n)^Ei}});var nr=E((Fl,ir)=>{"use strict";var Ri=ue();function We(t){this.mode=Ri.NUMERIC,this.data=t.toString()}We.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)};We.prototype.getLength=function(){return this.data.length};We.prototype.getBitsLength=function(){return We.getBitsLength(this.data.length)};We.prototype.write=function(e){let o,r,n;for(o=0;o+3<=this.data.length;o+=3)r=this.data.substr(o,3),n=parseInt(r,10),e.put(n,10);let i=this.data.length-o;i>0&&(r=this.data.substr(o),n=parseInt(r,10),e.put(n,i*3+1))};ir.exports=We});var lr=E((Vl,sr)=>{"use strict";var _i=ue(),Ft=["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 Le(t){this.mode=_i.ALPHANUMERIC,this.data=t}Le.getBitsLength=function(e){return 11*Math.floor(e/2)+6*(e%2)};Le.prototype.getLength=function(){return this.data.length};Le.prototype.getBitsLength=function(){return Le.getBitsLength(this.data.length)};Le.prototype.write=function(e){let o;for(o=0;o+2<=this.data.length;o+=2){let r=Ft.indexOf(this.data[o])*45;r+=Ft.indexOf(this.data[o+1]),e.put(r,11)}this.data.length%2&&e.put(Ft.indexOf(this.data[o]),6)};sr.exports=Le});var cr=E((Hl,ar)=>{"use strict";ar.exports=function(e){for(var o=[],r=e.length,n=0;n<r;n++){var i=e.charCodeAt(n);if(i>=55296&&i<=56319&&r>n+1){var s=e.charCodeAt(n+1);s>=56320&&s<=57343&&(i=(i-55296)*1024+s-56320+65536,n+=1)}if(i<128){o.push(i);continue}if(i<2048){o.push(i>>6|192),o.push(i&63|128);continue}if(i<55296||i>=57344&&i<65536){o.push(i>>12|224),o.push(i>>6&63|128),o.push(i&63|128);continue}if(i>=65536&&i<=1114111){o.push(i>>18|240),o.push(i>>12&63|128),o.push(i>>6&63|128),o.push(i&63|128);continue}o.push(239,191,189)}return new Uint8Array(o).buffer}});var dr=E((Kl,ur)=>{"use strict";var Si=cr(),Ai=ue();function Pe(t){this.mode=Ai.BYTE,typeof t=="string"&&(t=Si(t)),this.data=new Uint8Array(t)}Pe.getBitsLength=function(e){return e*8};Pe.prototype.getLength=function(){return this.data.length};Pe.prototype.getBitsLength=function(){return Pe.getBitsLength(this.data.length)};Pe.prototype.write=function(t){for(let e=0,o=this.data.length;e<o;e++)t.put(this.data[e],8)};ur.exports=Pe});var hr=E((Gl,pr)=>{"use strict";var Ti=ue(),Ii=ae();function Be(t){this.mode=Ti.KANJI,this.data=t}Be.getBitsLength=function(e){return e*13};Be.prototype.getLength=function(){return this.data.length};Be.prototype.getBitsLength=function(){return Be.getBitsLength(this.data.length)};Be.prototype.write=function(t){let e;for(e=0;e<this.data.length;e++){let o=Ii.toSJIS(this.data[e]);if(o>=33088&&o<=40956)o-=33088;else if(o>=57408&&o<=60351)o-=49472;else throw new Error("Invalid SJIS character: "+this.data[e]+` 3Make sure your charset is UTF-8`);o=(o>>>8&255)*192+(o&255),t.put(o,13)}};pr.exports=Be});var fr=E((Ql,Vt)=>{"use strict";var Ke={single_source_shortest_paths:function(t,e,o){var r={},n={};n[e]=0;
3var i=Ke.PriorityQueue.make();i.push(e,0);for(var s,l,a,h,m,I,x,j,D;!i.empty();){s=i.pop(),l=s.value,h=s.cost,m=t[l]||{};for(a in m)m.hasOwnProperty(a)&&(I=m[a],x=h+I,j=n[a],D=typeof n[a]>"u",(D||j>x)&&(n[a]=x,i.push(a,x),r[a]=l))}if(typeof o<"u"&&typeof n[o]>"u"){var R=["Could not find a path from ",e," to ",o,"."].join("");throw new Error(R)}return r},extract_shortest_path_from_predecessor_list:function(t,e){for(var o=[],r=e,n;r;)o.push(r),n=t[r],r=t[r];return o.reverse(),o},find_path:function(t,e,o){var r=Ke.single_source_shortest_paths(t,e,o);return Ke.extract_shortest_path_from_predecessor_list(r,o)},PriorityQueue:{make:function(t){var e=Ke.PriorityQueue,o={},r;t=t||{};for(r in e)e.hasOwnProperty(r)&&(o[r]=e[r]);return o.queue=[],o.sorter=t.sorter||e.default_sorter,o},default_sorter:function(t,e){return t.cost-e.cost},push:function(t,e){var o={value:t,cost:e};this.queue.push(o),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};typeof Vt<"u"&&(Vt.exports=Ke)});var vr=E(ke=>{"use strict";var $=ue(),wr=nr(),br=lr(),yr=dr(),xr=hr(),Ge=Ut(),gt=ae(),Wi=fr();function mr(t){return unescape(encodeURIComponent(t)).length}function Qe(t,e,o){let r=[],n;for(;(n=t.exec(o))!==null;)r.push({data:n[0],index:n.index,mode:e,length:n[0].length});return r}function Cr(t){let e=Qe(Ge.NUMERIC,$.NUMERIC,t),o=Qe(Ge.ALPHANUMERIC,$.ALPHANUMERIC,t),r,n;return gt.isKanjiModeEnabled()?(r=Qe(Ge.BYTE,$.BYTE,t),n=Qe(Ge.KANJI,$.KANJI,t)):(r=Qe(Ge.BYTE_KANJI,$.BYTE,t),n=[]),e.concat(o,r,n).sort(function(s,l){return s.index-l.index}).map(function(s){return{data:s.data,mode:s.mode,length:s.length}})}function Ht(t,e){switch(e){case $.NUMERIC:return wr.getBitsLength(t);case $.ALPHANUMERIC:return br.getBitsLength(t);case $.KANJI:return xr.getBitsLength(t);case $.BYTE:return yr.getBitsLength(t)}}function Li(t){return t.reduce(function(e,o){let r=e.length-1>=0?e[e.length-1]:null;return r&&r.mode===o.mode?(e[e.length-1].data+=o.data,e):(e.push(o),e)},[])}function Pi(t){let e=[];for(let o=0;o<t.length;o++){let r=t[o];switch(r.mode){case $.NUMERIC:e.push([r,{data:r.data,mode:$.ALPHANUMERIC,length:r.length},{data:r.data,mode:$.BYTE,length:r.length}]);break;case $.ALPHANUMERIC:e.push([r,{data:r.data,mode:$.BYTE,length:r.length}]);break;case $.KANJI:e.push([r,{data:r.data,mode:$.BYTE,length:mr(r.data)}]);break;case $.BYTE:e.push([{data:r.data,mode:$.BYTE,length:mr(r.data)}])}}return e}function Bi(t,e){let o={},r={start:{}},n=["start"];for(let i=0;i<t.length;i++){let s=t[i],l=[];for(let a=0;a<s.length;a++){let h=s[a],m=""+i+a;l.push(m),o[m]={node:h,lastCount:0},r[m]={};for(let I=0;I<n.length;I++){let x=n[I];o[x]&&o[x].node.mode===h.mode?(r[x][m]=Ht(o[x].lastCount+h.length,h.mode)-Ht(o[x].lastCount,h.mode),o[x].lastCount+=h.length):(o[x]&&(o[x].lastCount=h.length),r[x][m]=Ht(h.length,h.mode)+4+$.getCharCountIndicator(h.mode,e))}}n=l}for(let i=0;i<n.length;i++)r[n[i]].end=0;return{map:r,table:o}}function gr(t,e){let o,r=$.getBestModeForData(t);if(o=$.from(e,r),o!==$.BYTE&&o.bit<r.bit)throw new Error('"'+t+'" cannot be encoded with mode '+$.toString(o)+`. 4 Suggested mode is: `+$.toString(r));switch(o===$.KANJI&&!gt.isKanjiModeEnabled()&&(o=$.BYTE),o){case $.NUMERIC:return new wr(t);case $.ALPHANUMERIC:return new br(t);case $.KANJI:return new xr(t);case $.BYTE:return new yr(t)}}ke.fromArray=function(e){return e.reduce(function(o,r){return typeof r=="string"?o.push(gr(r,null)):r.data&&o.push(gr(r.data,r.mode)),o},[])};ke.fromString=function(e,o){let r=Cr(e,gt.isKanjiModeEnabled()),n=Pi(r),i=Bi(n,o),s=Wi.find_path(i.map,"start","end"),l=[];for(let a=1;a<s.length-1;a++)l.push(i.table[s[a]].node);return ke.fromArray(Li(l))};ke.rawSplit=function(e){return ke.fromArray(Cr(e,gt.isKanjiModeEnabled()))}});var Er=E($r=>{"use strict";var bt=ae(),Kt=ct(),ki=Bo(),Ni=No(),Oi=Oo(),Mi=Uo(),Jt=jo(),Yt=Nt(),Di=Ho(),wt=Zo(),Ui=rr(),ji=ue(),Gt=vr();function zi(t,e){let o=t.size,r=Mi.getPositions(e);for(let n=0;n<r.length;n++){let i=r[n][0],s=r[n][1];for(let l=-1;l<=7;l++)if(!(i+l<=-1||o<=i+l))for(let a=-1;a<=7;a++)s+a<=-1||o<=s+a||(l>=0&&l<=6&&(a===0||a===6)||a>=0&&a<=6&&(l===0||l===6)||l>=2&&l<=4&&a>=2&&a<=4?t.set(i+l,s+a,!0,!0):t.set(i+l,s+a,!1,!0))}}function qi(t){let e=t.size;
4for(let o=8;o<e-8;o++){let r=o%2===0;t.set(o,6,r,!0),t.set(6,o,r,!0)}}function Fi(t,e){let o=Oi.getPositions(e);for(let r=0;r<o.length;r++){let n=o[r][0],i=o[r][1];for(let s=-2;s<=2;s++)for(let l=-2;l<=2;l++)s===-2||s===2||l===-2||l===2||s===0&&l===0?t.set(n+s,i+l,!0,!0):t.set(n+s,i+l,!1,!0)}}function Vi(t,e){let o=t.size,r=wt.getEncodedBits(e),n,i,s;for(let l=0;l<18;l++)n=Math.floor(l/3),i=l%3+o-8-3,s=(r>>l&1)===1,t.set(n,i,s,!0),t.set(i,n,s,!0)}function Qt(t,e,o){let r=t.size,n=Ui.getEncodedBits(e,o),i,s;for(i=0;i<15;i++)s=(n>>i&1)===1,i<6?t.set(i,8,s,!0):i<8?t.set(i+1,8,s,!0):t.set(r-15+i,8,s,!0),i<8?t.set(8,r-i-1,s,!0):i<9?t.set(8,15-i-1+1,s,!0):t.set(8,15-i-1,s,!0);t.set(r-8,8,1,!0)}function Hi(t,e){let o=t.size,r=-1,n=o-1,i=7,s=0;for(let l=o-1;l>0;l-=2)for(l===6&&l--;;){for(let a=0;a<2;a++)if(!t.isReserved(n,l-a)){let h=!1;s<e.length&&(h=(e[s]>>>i&1)===1),t.set(n,l-a,h),i--,i===-1&&(s++,i=7)}if(n+=r,n<0||o<=n){n-=r,r=-r;break}}}function Ki(t,e,o){let r=new ki;o.forEach(function(a){r.put(a.mode.bit,4),r.put(a.getLength(),ji.getCharCountIndicator(a.mode,t)),a.write(r)});let n=bt.getSymbolTotalCodewords(t),i=Yt.getTotalCodewordsCount(t,e),s=(n-i)*8;for(r.getLengthInBits()+4<=s&&r.put(0,4);r.getLengthInBits()%8!==0;)r.putBit(0);let l=(s-r.getLengthInBits())/8;for(let a=0;a<l;a++)r.put(a%2?17:236,8);return Gi(r,t,e)}function Gi(t,e,o){let r=bt.getSymbolTotalCodewords(e),n=Yt.getTotalCodewordsCount(e,o),i=r-n,s=Yt.getBlocksCount(e,o),l=r%s,a=s-l,h=Math.floor(r/s),m=Math.floor(i/s),I=m+1,x=h-m,j=new Di(x),D=0,R=new Array(s),C=new Array(s),O=0,_=new Uint8Array(t.buffer);for(let Ee=0;Ee<s;Ee++){let Tt=Ee<a?m:I;R[Ee]=_.slice(D,D+Tt),C[Ee]=j.encode(R[Ee]),D+=Tt,O=Math.max(O,Tt)}let M=new Uint8Array(r),L=0,k,oe;for(k=0;k<O;k++)for(oe=0;oe<s;oe++)k<R[oe].length&&(M[L++]=R[oe][k]);for(k=0;k<x;k++)for(oe=0;oe<s;oe++)M[L++]=C[oe][k];return M}function Qi(t,e,o,r){let n;if(Array.isArray(t))n=Gt.fromArray(t);else if(typeof t=="string"){let h=e;if(!h){let m=Gt.rawSplit(t);h=wt.getBestVersionForData(m,o)}n=Gt.fromString(t,h||40)}else throw new Error("Invalid data");let i=wt.getBestVersionForData(n,o);if(!i)throw new Error("The amount of data is too big to be stored in a QR Code");if(!e)e=i;else if(e<i)throw new Error(` 5The chosen QR Code version cannot contain this amount of data. 6Minimum version required to store current data is: `+i+`. 7`);let s=Ki(e,o,n),l=bt.getSymbolSize(e),a=new Ni(l);return zi(a,e),qi(a),Fi(a,e),Qt(a,o,0),e>=7&&Vi(a,e),Hi(a,s),isNaN(r)&&(r=Jt.getBestMask(a,Qt.bind(null,a,o))),Jt.applyMask(r,a),Qt(a,o,r),{modules:a,version:e,errorCorrectionLevel:o,maskPattern:r,segments:n}}$r.create=function(e,o){if(typeof e>"u"||e==="")throw new Error("No input text");let r=Kt.M,n,i;return typeof o<"u"&&(r=Kt.from(o.errorCorrectionLevel,Kt.M),n=wt.from(o.version),i=Jt.from(o.maskPattern),o.toSJISFunc&&bt.setToSJISFunction(o.toSJISFunc)),Qi(e,n,r,i)}});var Xt=E(xe=>{"use strict";function Rr(t){if(typeof t=="number"&&(t=t.toString()),typeof t!="string")throw new Error("Color should be defined as hex string");let e=t.slice().replace("#","").split("");if(e.length<3||e.length===5||e.length>8)throw new Error("Invalid hex color: "+t);(e.length===3||e.length===4)&&(e=Array.prototype.concat.apply([],e.map(function(r){return[r,r]}))),e.length===6&&e.push("F","F");let o=parseInt(e.join(""),16);return{r:o>>24&255,g:o>>16&255,b:o>>8&255,a:o&255,hex:"#"+e.slice(0,6).join("")}}xe.getOptions=function(e){e||(e={}),e.color||(e.color={});let o=typeof e.margin>"u"||e.margin===null||e.margin<0?4:e.margin,r=e.width&&e.width>=21?e.width:void 0,n=e.scale||4;return{width:r,scale:r?4:n,margin:o,color:{dark:Rr(e.color.dark||"#000000ff"),light:Rr(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}};xe.getScale=function(e,o){return o.width&&o.width>=e+o.margin*2?o.width/(e+o.margin*2):o.scale};xe.getImageWidth=function(e,o){let r=xe.getScale(e,o);return Math.floor((e+o.margin*2)*r)};xe.qrToImageData=function(e,o,r){let n=o.modules.size,i=o.modules.data,s=xe.getScale(n,r),l=Math.floor((n+r.margin*2)*s),a=r.margin*s,h=[r.color.light,r.color.dark];for(let m=0;m<l;m++)for(let I=0;I<l;I++){let x=(m*l+I)*4,j=r.color.light;if(m>=a&&I>
7=a&&m<l-a&&I<l-a){let D=Math.floor((m-a)/s),R=Math.floor((I-a)/s);j=h[i[D*n+R]?1:0]}e[x++]=j.r,e[x++]=j.g,e[x++]=j.b,e[x]=j.a}}});var _r=E(yt=>{"use strict";var Zt=Xt();function Ji(t,e,o){t.clearRect(0,0,e.width,e.height),e.style||(e.style={}),e.height=o,e.width=o,e.style.height=o+"px",e.style.width=o+"px"}function Yi(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}yt.render=function(e,o,r){let n=r,i=o;typeof n>"u"&&(!o||!o.getContext)&&(n=o,o=void 0),o||(i=Yi()),n=Zt.getOptions(n);let s=Zt.getImageWidth(e.modules.size,n),l=i.getContext("2d"),a=l.createImageData(s,s);return Zt.qrToImageData(a.data,e,n),Ji(l,i,s),l.putImageData(a,0,0),i};yt.renderToDataURL=function(e,o,r){let n=r;typeof n>"u"&&(!o||!o.getContext)&&(n=o,o=void 0),n||(n={});let i=yt.render(e,o,n),s=n.type||"image/png",l=n.rendererOpts||{};return i.toDataURL(s,l.quality)}});var Tr=E(Ar=>{"use strict";var Xi=Xt();function Sr(t,e){let o=t.a/255,r=e+'="'+t.hex+'"';return o<1?r+" "+e+'-opacity="'+o.toFixed(2).slice(1)+'"':r}function eo(t,e,o){let r=t+e;return typeof o<"u"&&(r+=" "+o),r}function Zi(t,e,o){let r="",n=0,i=!1,s=0;for(let l=0;l<t.length;l++){let a=Math.floor(l%e),h=Math.floor(l/e);!a&&!i&&(i=!0),t[l]?(s++,l>0&&a>0&&t[l-1]||(r+=i?eo("M",a+o,.5+h+o):eo("m",n,0),n=0,i=!1),a+1<e&&t[l+1]||(r+=eo("h",s),s=0)):n++}return r}Ar.render=function(e,o,r){let n=Xi.getOptions(o),i=e.modules.size,s=e.modules.data,l=i+n.margin*2,a=n.color.light.a?"<path "+Sr(n.color.light,"fill")+' d="M0 0h'+l+"v"+l+'H0z"/>':"",h="<path "+Sr(n.color.dark,"stroke")+' d="'+Zi(s,i,n.margin)+'"/>',m='viewBox="0 0 '+l+" "+l+'"',x='<svg xmlns="http://www.w3.org/2000/svg" '+(n.width?'width="'+n.width+'" height="'+n.width+'" ':"")+m+' shape-rendering="crispEdges">'+a+h+`</svg> 8`;return typeof r=="function"&&r(null,x),x}});var Wr=E(Je=>{"use strict";var en=Wo(),to=Er(),Ir=_r(),tn=Tr();function oo(t,e,o,r,n){let i=[].slice.call(arguments,1),s=i.length,l=typeof i[s-1]=="function";if(!l&&!en())throw new Error("Callback required as last argument");if(l){if(s<2)throw new Error("Too few arguments provided");s===2?(n=o,o=e,e=r=void 0):s===3&&(e.getContext&&typeof n>"u"?(n=r,r=void 0):(n=r,r=o,o=e,e=void 0))}else{if(s<1)throw new Error("Too few arguments provided");return s===1?(o=e,e=r=void 0):s===2&&!e.getContext&&(r=o,o=e,e=void 0),new Promise(function(a,h){try{let m=to.create(o,r);a(t(m,e,r))}catch(m){h(m)}})}try{let a=to.create(o,r);n(null,t(a,e,r))}catch(a){n(a)}}Je.create=to.create;Je.toCanvas=oo.bind(null,Ir.render);Je.toDataURL=oo.bind(null,Ir.renderToDataURL);Je.toString=oo.bind(null,function(t,e,o){return tn.render(t,o)})});var Se=function(t,e,o,r){var n=arguments.length,i=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,o):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,o,r);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(i=(n<3?s(i):n>3?s(e,o,i):s(e,o))||i);return n>3&&i&&Object.defineProperty(e,o,i),i},he=class extends f{constructor(){super(),this.unsubscribe=[],this.tabIdx=void 0,this.connectors=U.state.connectors,this.count=S.state.count,this.filteredCount=S.state.filteredWallets.length,this.isFetchingRecommendedWallets=S.state.isFetchingRecommendedWallets,this.unsubscribe.push(U.subscribeKey("connectors",e=>this.connectors=e),S.subscribeKey("count",e=>this.count=e),S.subscribeKey("filteredWallets",e=>this.filteredCount=e.length),S.subscribeKey("isFetchingRecommendedWallets",e=>this.isFetchingRecommendedWallets=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){let e=this.connectors.find(h=>h.id==="walletConnect"),{allWallets:o}=B.state;if(!e||o==="HIDE"||o==="ONLY_MOBILE"&&!b.isMobile())return null;let r=S.state.featured.length,n=this.count+r,i=n<10?n:Math.floor(n/10)*10,s=this.filteredCount>0?this.filteredCount:i,l=`${s}`;this.filteredCount>0?l=`${this.filteredCount}`:s<n&&(l=`${s}+`);let a=w.hasAnyConnection(De.CONNECTOR_ID.WALLET_CONNECT);return c` 9 <wui-list-wallet 10 name="Search Wallet" 11 walletIcon="search" 12 showAllWallets 13 @click=${this.onAllWallets.bind(this)} 14 tagLabel=${l} 15 tagVariant="info" 16 data-testid="all-wallets" 17 tabIdx=${v(this.tabIdx)} 18 .loading=${this.isFetchingRecommendedWallets} 19 ?disabled=${a} 20 size="sm" 21 ></wui-list-wallet> 22 `}onAllWallets(){W.sendEvent({type:"track",event:"CLICK_ALL_WALLETS"}),g.push("AllWallets",{redirectView:g.state.data?.redirectView})}};Se([u()],he.prototype,"tabIdx",void 0);Se([p()],he.prototype,"connectors",void 0);Se([p()],he.prototype,"count",void 0);Se([p()],he.prototype,"filteredCount",void 0);Se([p()],he.prototype,"isFetchingRecommendedWallets",void 0);he=Se([d("w3m-all-wallets-widget")],he);var yo=y` 23 :host { 24 margin-top: ${({spacing:t})=>t[1]}; 25 } 26 wui-separator { 27 margin: ${({spacing:t})=>t[3]} calc(${({spacing:t})=>t[3]} * -1) 28 ${({spacing:t})=>t[2]} calc(${({spacing:t})=>t[3]} * -1); 29 width: calc(100% + ${({spacing:t})=>t[3]} * 2); 30 } 31`;var Ae=function(t,e,o,r){var n=arguments.length,i=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,o):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,o,r);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(i=(n<3?s(i):n>3?s(e,o,i):s(e,o))||i);return n>3&&i&&Object.defineProperty(e,o,i),i},le=class extends f{constructor(){super(),this.unsubscribe=[],this.explorerWallets=S.state.explorerWallets,this.connections=w.state.connections,this.connectorImages=It.state.connectorImages,this.loadingTelegram=!1,this.unsubscribe.push(w.subscribeKey("connections",e=>this.connections=e),It.subscribeKey("connectorImages",e=>this.connectorImages=e),S.subscribeKey("explorerFilteredWallets",e=>{this.explorerWallets=e?.length?e:S.state.explorerWallets}),S.subscribeKey("explorerWallets",e=>{this.explorerWallets?.length||(this.explorerWallets=e)})),b.isTelegram()&&b.isIos()&&(this.loadingTelegram=!w.state.wcUri,this.unsubscribe.push(w.subscribeKey("wcUri",e=>this.loadingTelegram=!e)))}
31disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return c` 32 <wui-flex flexDirection="column" gap="2"> ${this.connectorListTemplate()} </wui-flex> 33 `}connectorListTemplate(){return uo.connectorList().map((e,o)=>e.kind==="connector"?this.renderConnector(e,o):this.renderWallet(e,o))}getConnectorNamespaces(e){return e.subtype==="walletConnect"?[]:e.subtype==="multiChain"?e.connector.connectors?.map(o=>o.chain)||[]:[e.connector.chain]}renderConnector(e,o){let r=e.connector,n=V.getConnectorImage(r)||this.connectorImages[r?.imageId??""],s=(this.connections.get(r.chain)??[]).some(I=>fo.isLowerCaseMatch(I.connectorId,r.id)),l,a;e.subtype==="walletConnect"?(l="qr code",a="accent"):e.subtype==="injected"||e.subtype==="announced"?(l=s?"connected":"installed",a=s?"info":"success"):(l=void 0,a=void 0);let h=w.hasAnyConnection(De.CONNECTOR_ID.WALLET_CONNECT),m=e.subtype==="walletConnect"||e.subtype==="external"?h:!1;return c` 34 <w3m-list-wallet 35 displayIndex=${o} 36 imageSrc=${v(n)} 37 .installed=${!0} 38 name=${r.name??"Unknown"} 39 .tagVariant=${a} 40 tagLabel=${v(l)} 41 data-testid=${`wallet-selector-${r.id.toLowerCase()}`} 42 size="sm" 43 @click=${()=>this.onClickConnector(e)} 44 tabIdx=${v(this.tabIdx)} 45 ?disabled=${m} 46 rdnsId=${v(r.explorerWallet?.rdns||void 0)} 47 walletRank=${v(r.explorerWallet?.order)} 48 .namespaces=${this.getConnectorNamespaces(e)} 49 > 50 </w3m-list-wallet> 51 `}onClickConnector(e){let o=g.state.data?.redirectView;if(e.subtype==="walletConnect"){U.setActiveConnector(e.connector),b.isMobile()?g.push("AllWallets"):g.push("ConnectingWalletConnect",{redirectView:o});return}if(e.subtype==="multiChain"){U.setActiveConnector(e.connector),g.push("ConnectingMultiChain",{redirectView:o});return}
51if(e.subtype==="injected"){U.setActiveConnector(e.connector),g.push("ConnectingExternal",{connector:e.connector,redirectView:o,wallet:e.connector.explorerWallet});return}if(e.subtype==="announced"){if(e.connector.id==="walletConnect"){b.isMobile()?g.push("AllWallets"):g.push("ConnectingWalletConnect",{redirectView:o});return}g.push("ConnectingExternal",{connector:e.connector,redirectView:o,wallet:e.connector.explorerWallet});return}g.push("ConnectingExternal",{connector:e.connector,redirectView:o})}renderWallet(e,o){let r=e.wallet,n=V.getWalletImage(r),s=w.hasAnyConnection(De.CONNECTOR_ID.WALLET_CONNECT),l=this.loadingTelegram,a=e.subtype==="recent"?"recent":void 0,h=e.subtype==="recent"?"info":void 0;return c` 52 <w3m-list-wallet 53 displayIndex=${o} 54 imageSrc=${v(n)} 55 name=${r.name??"Unknown"} 56 @click=${()=>this.onClickWallet(e)} 57 size="sm" 58 data-testid=${`wallet-selector-${r.id}`} 59 tabIdx=${v(this.tabIdx)} 60 ?loading=${l} 61 ?disabled=${s} 62 rdnsId=${v(r.rdns||void 0)} 63 walletRank=${v(r.order)} 64 tagLabel=${v(a)} 65 .tagVariant=${h} 66 > 67 </w3m-list-wallet> 68 `}onClickWallet(e){let o=g.state.data?.redirectView,r=Y.state.activeChain;if(e.subtype==="featured"){U.selectWalletConnector(e.wallet);return}if(e.subtype==="recent"){if(this.loadingTelegram)return;U.selectWalletConnector(e.wallet);return}if(e.subtype==="custom"){if(this.loadingTelegram)return;g.push("ConnectingWalletConnect",{wallet:e.wallet,redirectView:o});return}if(this.loadingTelegram)return;let n=r?U.getConnector({id:e.wallet.id,namespace:r}):void 0;n?g.push("ConnectingExternal",{connector:n,redirectView:o}):g.push("ConnectingWalletConnect",{wallet:e.wallet,redirectView:o})}};le.styles=yo;Ae([u({type:Number})],le.prototype,"tabIdx",void 0);Ae([p()],le.prototype,"explorerWallets",void 0);Ae([p()],le.prototype,"connections",void 0);Ae([p()],le.prototype,"connectorImages",void 0);Ae([p()],le.prototype,"loadingTelegram",void 0);le=Ae([d("w3m-connector-list")],le);var xo=y` 69 :host { 70 flex: 1; 71 height: 100%; 72 } 73 74 button { 75 width: 100%; 76 height: 100%; 77 display: inline-flex; 78 align-items: center; 79 padding: ${({spacing:t})=>t[1]} ${({spacing:t})=>t[2]}; 80 column-gap: ${({spacing:t})=>t[1]}; 81 color: ${({tokens:t})=>t.theme.textSecondary}; 82 border-radius: ${({borderRadius:t})=>t[20]}; 83 background-color: transparent; 84 transition: background-color ${({durations:t})=>t.lg} 85 ${({easings:t})=>t["ease-out-power-2"]}; 86 will-change: background-color; 87 } 88 89 /* -- Hover & Active states ----------------------------------------------------------- */ 90 button[data-active='true'] { 91 color: ${({tokens:t})=>t.theme.textPrimary}; 92 background-color: ${({tokens:t})=>t.theme.foregroundTertiary}; 93 } 94 95 button:hover:enabled:not([data-active='true']), 96 button:active:enabled:not([data-active='true']) { 97 wui-text, 98 wui-icon { 99 color: ${({tokens:t})=>t.theme.textPrimary}; 100 } 101 } 102`;var je=function(t,e,o,r){var n=arguments.length,i=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,o):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,o,r);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(i=(n<3?s(i):n>3?s(e,o,i):s(e,o))||i);return n>3&&i&&Object.defineProperty(e,o,i),i},ii={lg:"lg-regular",md:"md-regular",sm:"sm-regular"},ni={lg:"md",md:"sm",sm:"sm"},fe=class extends f{constructor(){super(...arguments),this.icon="mobile",this.size="md",this.label="",this.active=!1}render(){return c` 103 <button data-active=${this.active}> 104 ${this.icon?c`<wui-icon size=${ni[this.size]} name=${this.icon}></wui-icon>`:""} 105 <wui-text variant=${ii[this.size]}> ${this.label} </wui-text> 106 </button> 107 `}};fe.styles=[P,z,xo];je([u()],fe.prototype,"icon",void 0);je([u()],fe.prototype,"size",void 0);je([u()],fe.prototype,"label",void 0);je([u({type:Boolean})],fe.prototype,"active",void 0);fe=je([d("wui-tab-item")],fe);var Co=y` 108 :host { 109 display: inline-flex; 110 align-items: center; 111 background-color: ${({tokens:t})=>t.theme.foregroundSecondary}; 112 border-radius: ${({borderRadius:t})=>t[32]}; 113 padding: ${({spacing:t})=>t["01"]}; 114 box-sizing: border-box; 115 } 116 117 :host([data-size='sm']) {
118 height: 26px; 119 } 120 121 :host([data-size='md']) { 122 height: 36px; 123 } 124`;var ze=function(t,e,o,r){var n=arguments.length,i=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,o):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,o,r);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(i=(n<3?s(i):n>3?s(e,o,i):s(e,o))||i);return n>3&&i&&Object.defineProperty(e,o,i),i},me=class extends f{constructor(){super(...arguments),this.tabs=[],this.onTabChange=()=>null,this.size="md",this.activeTab=0}render(){return this.dataset.size=this.size,this.tabs.map((e,o)=>{let r=o===this.activeTab;return c` 125 <wui-tab-item 126 @click=${()=>this.onTabClick(o)} 127 icon=${e.icon} 128 size=${this.size} 129 label=${e.label} 130 ?active=${r} 131 data-active=${r} 132 data-testid="tab-${e.label?.toLowerCase()}" 133 ></wui-tab-item> 134 `})}onTabClick(e){this.activeTab=e,this.onTabChange(e)}};me.styles=[P,z,Co];ze([u({type:Array})],me.prototype,"tabs",void 0);ze([u()],me.prototype,"onTabChange",void 0);ze([u()],me.prototype,"size",void 0);ze([p()],me.prototype,"activeTab",void 0);me=ze([d("wui-tabs")],me);var Pt=function(t,e,o,r){var n=arguments.length,i=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,o):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,o,r);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(i=(n<3?s(i):n>3?s(e,o,i):s(e,o))||i);return n>3&&i&&Object.defineProperty(e,o,i),i},nt=class extends f{constructor(){super(...arguments),this.platformTabs=[],this.unsubscribe=[],this.platforms=[],this.onSelectPlatfrom=void 0}disconnectCallback(){this.unsubscribe.forEach(e=>e())}render(){let e=this.generateTabs();return c` 135 <wui-flex justifyContent="center" .padding=${["0","0","4","0"]}> 136 <wui-tabs .tabs=${e} .onTabChange=${this.onTabChange.bind(this)}></wui-tabs> 137 </wui-flex> 138 `}generateTabs(){let e=this.platforms.map(o=>o==="browser"?{label:"Browser",icon:"extension",platform:"browser"}:o==="mobile"?{label:"Mobile",icon:"mobile",platform:"mobile"}:o==="qrcode"?{label:"Mobile",icon:"mobile",platform:"qrcode"}:o==="web"?{label:"Webapp",icon:"browser",platform:"web"}:o==="desktop"?{label:"Desktop",icon:"desktop",platform:"desktop"}:{label:"Browser",icon:"extension",platform:"unsupported"});return this.platformTabs=e.map(({platform:o})=>o),e}onTabChange(e){let o=this.platformTabs[e];o&&this.onSelectPlatfrom?.(o)}};Pt([u({type:Array})],nt.prototype,"platforms",void 0);Pt([u()],nt.prototype,"onSelectPlatfrom",void 0);nt=Pt([d("w3m-connecting-header")],nt);var vo=y` 139 :host { 140 display: block; 141 width: 100px; 142 height: 100px; 143 } 144 145 svg { 146 width: 100px; 147 height: 100px; 148 } 149 150 rect { 151 fill: none; 152 stroke: ${t=>t.colors.accent100}; 153 stroke-width: 3px; 154 stroke-linecap: round; 155 animation: dash 1s linear infinite; 156 } 157 158 @keyframes dash { 159 to { 160 stroke-dashoffset: 0px; 161 } 162 } 163`;var $o=function(t,e,o,r){var n=arguments.length,i=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,o):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,o,r);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(i=(n<3?s(i):n>3?s(e,o,i):s(e,o))||i);return n>3&&i&&Object.defineProperty(e,o,i),i},st=class extends f{constructor(){super(...arguments),this.radius=36}render(){return this.svgLoaderTemplate()}svgLoaderTemplate(){let e=this.radius>50?50:this.radius,r=36-e,n=116+r,i=245+r,s=360+r*1.75;return c` 164 <svg viewBox="0 0 110 110" width="110" height="110"> 165 <rect 166 x="2" 167 y="2" 168 width="106" 169 height="106" 170 rx=${e} 171 stroke-dasharray="${n} ${i}" 172 stroke-dashoffset=${s} 173 /> 174 </svg> 175 `}};st.styles=[P,vo];$o([u({type:Number})],st.prototype,"radius",void 0);st=$o([d("wui-loading-thumbnail")],st);var Eo=y` 176 wui-flex { 177 width: 100%; 178 height: 52px; 179 box-sizing: border-box; 180 background-color: ${({tokens:t})=>t.theme.foregroundPrimary}; 181 border-radius: ${({borderRadius:t})=>t[5]}; 182 padding-left: ${({spacing:t})=>t[3]}; 183 padding-right: ${({spacing:t})=>t[3]}; 184 display: flex; 185 align-items: center; 186 justify-content: space-between; 187 gap: ${({spacing:t})=>t[6]}; 188 } 189 190 wui-text { 191 color: ${({tokens:t})=>t.theme.textSecondary}; 192 } 193 194 wui-icon { 195 width: 12px; 196 height: 12px; 197 } 198`;var lt=function(t,e,o,r){var n=arguments.length,i=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,o):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,o,r);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(i=(n<3?s(i):n>3?s(e,o,i):s(e,o))||i);return n>3&&i&&Object.defineProperty(e,o,i),i},Te=class extends f{constructor(){super(...arguments),this.disabled=!1,this.label="",this.buttonLabel=""}render(){return c` 199 <wui-flex justifyContent="space-between" alignItems="center"> 200 <wui-text variant="lg-regular" color="inherit">${this.label}</wui-text> 201 <wui-button variant="accent-secondary" size="sm"> 202 ${this.buttonLabel} 203 <wui-icon name="chevronRight" color="inherit" size="inherit" slot="iconRight"></wui-icon> 204 </wui-button>
204 205 </wui-flex> 206 `}};Te.styles=[P,z,Eo];lt([u({type:Boolean})],Te.prototype,"disabled",void 0);lt([u()],Te.prototype,"label",void 0);lt([u()],Te.prototype,"buttonLabel",void 0);Te=lt([d("wui-cta-button")],Te);var Ro=y` 207 :host { 208 display: block; 209 padding: 0 ${({spacing:t})=>t[5]} ${({spacing:t})=>t[5]}; 210 } 211`;var _o=function(t,e,o,r){var n=arguments.length,i=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,o):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,o,r);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(i=(n<3?s(i):n>3?s(e,o,i):s(e,o))||i);return n>3&&i&&Object.defineProperty(e,o,i),i},at=class extends f{constructor(){super(...arguments),this.wallet=void 0}render(){if(!this.wallet)return this.style.display="none",null;let{name:e,app_store:o,play_store:r,chrome_store:n,homepage:i}=this.wallet,s=b.isMobile(),l=b.isIos(),a=b.isAndroid(),h=[o,r,i,n].filter(Boolean).length>1,m=X.getTruncateString({string:e,charsStart:12,charsEnd:0,truncate:"end"});return h&&!s?c` 212 <wui-cta-button 213 label=${`Don't have ${m}?`} 214 buttonLabel="Get" 215 @click=${()=>g.push("Downloads",{wallet:this.wallet})} 216 ></wui-cta-button> 217 `:!h&&i?c` 218 <wui-cta-button 219 label=${`Don't have ${m}?`} 220 buttonLabel="Get" 221 @click=${this.onHomePage.bind(this)} 222 ></wui-cta-button> 223 `:o&&l?c` 224 <wui-cta-button 225 label=${`Don't have ${m}?`} 226 buttonLabel="Get" 227 @click=${this.onAppStore.bind(this)} 228 ></wui-cta-button> 229 `:r&&a?c` 230 <wui-cta-button 231 label=${`Don't have ${m}?`} 232 buttonLabel="Get" 233 @click=${this.onPlayStore.bind(this)} 234 ></wui-cta-button> 235 `:(this.style.display="none",null)}onAppStore(){this.wallet?.app_store&&b.openHref(this.wallet.app_store,"_blank")}onPlayStore(){this.wallet?.play_store&&b.openHref(this.wallet.play_store,"_blank")}onHomePage(){this.wallet?.homepage&&b.openHref(this.wallet.homepage,"_blank")}};at.styles=[Ro];_o([u({type:Object})],at.prototype,"wallet",void 0);at=_o([d("w3m-mobile-download-links")],at);var So=y` 236 @keyframes shake { 237 0% { 238 transform: translateX(0); 239 } 240 25% { 241 transform: translateX(3px); 242 } 243 50% { 244 transform: translateX(-3px); 245 } 246 75% { 247 transform: translateX(3px); 248 } 249 100% { 250 transform: translateX(0); 251 } 252 } 253 254 wui-flex:first-child:not(:only-child) { 255 position: relative; 256 } 257 258 wui-wallet-image { 259 width: 56px; 260 height: 56px; 261 } 262 263 wui-loading-thumbnail { 264 position: absolute; 265 } 266 267 wui-icon-box { 268 position: absolute; 269 right: calc(${({spacing:t})=>t[1]} * -1); 270 bottom: calc(${({spacing:t})=>t[1]} * -1); 271 opacity: 0; 272 transform: scale(0.5); 273 transition-property: opacity, transform; 274 transition-duration: ${({durations:t})=>t.lg}; 275 transition-timing-function: ${({easings:t})=>t["ease-out-power-2"]}; 276 will-change: opacity, transform; 277 } 278 279 wui-text[align='center'] { 280 width: 100%; 281 padding: 0px ${({spacing:t})=>t[4]}; 282 } 283 284 [data-error='true'] wui-icon-box { 285 opacity: 1; 286 transform: scale(1); 287 } 288 289 [data-error='true'] > wui-flex:first-child { 290 animation: shake 250ms ${({easings:t})=>t["ease-out-power-2"]} both; 291 } 292 293 [data-retry='false'] wui-link { 294 display: none; 295 } 296 297 [data-retry='true'] wui-link { 298 display: block; 299 opacity: 1; 300 } 301 302 w3m-mobile-download-links { 303 padding: 0px; 304 width: 100%; 305 } 306`;var Z=function(t,e,o,r){var n=arguments.length,i=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,o):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,o,r);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(i=(n<3?s(i):n>3?s(e,o,i):s(e,o))||i);return n>3&&i&&Object.defineProperty(e,o,i),i},T=class extends f{constructor(){super(),this.wallet=g.state.data?.wallet,this.connector=g.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=V.getConnectorImage(this.connector)??V.getWalletImage(this.wallet),this.name=this.wallet?.name??this.connector?.name??"Wallet",this.isRetrying=!1,this.uri=w.state.wcUri,this.error=w.state.wcError,this.ready=!1,this.showRetry=!1,this.label=void 0,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(w.subscribeKey("wcUri",e=>{this.uri=e,this.isRetrying&&this.onRetry&&(this.isRetrying=!1,this.onConnect?.())}),w.subscribeKey("wcError",e=>this.error=e)),(b.isTelegram()||b.isSafari())&&b.isIos()&&w.state.wcUri&&this.onConnect?.()}firstUpdated(){this.onAutoConnect?.(),this.showRetry=!this.onAutoConnect}
306disconnectedCallback(){this.unsubscribe.forEach(e=>e()),w.setWcError(!1),clearTimeout(this.timeout)}render(){this.onRender?.(),this.onShowRetry();let e=this.error?"Connection can be declined if a previous request is still active":this.secondaryLabel,o="";return this.label?o=this.label:(o=`Continue in ${this.name}`,this.error&&(o="Connection declined")),c` 307 <wui-flex 308 data-error=${v(this.error)} 309 data-retry=${this.showRetry} 310 flexDirection="column" 311 alignItems="center" 312 .padding=${["10","5","5","5"]} 313 gap="6" 314 > 315 <wui-flex gap="2" justifyContent="center" alignItems="center"> 316 <wui-wallet-image size="lg" imageSrc=${v(this.imageSrc)}></wui-wallet-image> 317 318 ${this.error?null:this.loaderTemplate()} 319 320 <wui-icon-box 321 color="error" 322 icon="close" 323 size="sm" 324 border 325 borderColor="wui-color-bg-125" 326 ></wui-icon-box> 327 </wui-flex> 328 329 <wui-flex flexDirection="column" alignItems="center" gap="6"> <wui-flex 330 flexDirection="column" 331 alignItems="center" 332 gap="2" 333 .padding=${["2","0","0","0"]} 334 > 335 <wui-text align="center" variant="lg-medium" color=${this.error?"error":"primary"}> 336 ${o} 337 </wui-text> 338 <wui-text align="center" variant="lg-regular" color="secondary">${e}</wui-text> 339 </wui-flex> 340 341 ${this.secondaryBtnLabel?c` 342 <wui-button 343 variant="neutral-secondary" 344 size="md" 345 ?disabled=${this.isRetrying||this.isLoading} 346 @click=${this.onTryAgain.bind(this)} 347 data-testid="w3m-connecting-widget-secondary-button" 348 > 349 <wui-icon 350 color="inherit" 351 slot="iconLeft" 352 name=${this.secondaryBtnIcon} 353 ></wui-icon> 354 ${this.secondaryBtnLabel} 355 </wui-button> 356 `:null} 357 </wui-flex> 358 359 ${this.isWalletConnect?c` 360 <wui-flex .padding=${["0","5","5","5"]} justifyContent="center"> 361 <wui-link 362 @click=${this.onCopyUri} 363 variant="secondary" 364 icon="copy" 365 data-testid="wui-link-copy" 366 > 367 Copy link 368 </wui-link> 369 </wui-flex> 370 `:null} 371 372 <w3m-mobile-download-links .wallet=${this.wallet}></w3m-mobile-download-links></wui-flex> 373 </wui-flex> 374 `}onShowRetry(){this.error&&!this.showRetry&&(this.showRetry=!0,this.shadowRoot?.querySelector("wui-button")?.animate([{opacity:0},{opacity:1}],{fill:"forwards",easing:"ease"}))}onTryAgain(){w.setWcError(!1),this.onRetry?(this.isRetrying=!0,this.onRetry?.()):this.onConnect?.()}loaderTemplate(){let e=Re.state.themeVariables["--w3m-border-radius-master"],o=e?parseInt(e.replace("px",""),10):4;return c`<wui-loading-thumbnail radius=${o*9}></wui-loading-thumbnail>`}onCopyUri(){try{this.uri&&(b.copyToClopboard(this.uri),se.showSuccess("Link copied"))}catch{se.showError("Failed to copy")}}};T.styles=So;Z([p()],T.prototype,"isRetrying",void 0);Z([p()],T.prototype,"uri",void 0);Z([p()],T.prototype,"error",void 0);Z([p()],T.prototype,"ready",void 0);Z([p()],T.prototype,"showRetry",void 0);Z([p()],T.prototype,"label",void 0);Z([p()],T.prototype,"secondaryBtnLabel",void 0);Z([p()],T.prototype,"secondaryLabel",void 0);Z([p()],T.prototype,"isLoading",void 0);Z([u({type:Boolean})],T.prototype,"isMobile",void 0);Z([u()],T.prototype,"onRetry",void 0);var si=function(t,e,o,r){var n=arguments.length,i=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,o):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,o,r);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(i=(n<3?s(i):n>3?s(e,o,i):s(e,o))||i);return n>3&&i&&Object.defineProperty(e,o,i),i},Ao=class extends T{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),W.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"browser",dis
374playIndex:this.wallet?.display_index,walletRank:this.wallet.order,view:g.state.view}})}onConnectProxy(){return J(this,null,function*(){try{this.error=!1;let{connectors:e}=U.state,o=e.find(r=>r.type==="ANNOUNCED"&&r.info?.rdns===this.wallet?.rdns||r.type==="INJECTED"||r.name===this.wallet?.name);if(o)yield w.connectExternal(o,o.chain);else throw new Error("w3m-connecting-wc-browser: No connector found");rt.close()}catch(e){e instanceof ot&&e.originalName===et.PROVIDER_RPC_ERROR_NAME.USER_REJECTED_REQUEST?W.sendEvent({type:"track",event:"USER_REJECTED",properties:{message:e.message}}):W.sendEvent({type:"track",event:"CONNECT_ERROR",properties:{message:e?.message??"Unknown"}}),this.error=!0}})}};Ao=si([d("w3m-connecting-wc-browser")],Ao);var li=function(t,e,o,r){var n=arguments.length,i=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,o):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,o,r);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(i=(n<3?s(i):n>3?s(e,o,i):s(e,o))||i);return n>3&&i&&Object.defineProperty(e,o,i),i},To=class extends T{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),W.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"desktop",displayIndex:this.wallet?.display_index,walletRank:this.wallet.order,view:g.state.view}})}onRenderProxy(){!this.ready&&this.uri&&(this.ready=!0,this.onConnect?.())}onConnectProxy(){if(this.wallet?.desktop_link&&this.uri)try{this.error=!1;let{desktop_link:e,name:o}=this.wallet,{redirect:r,href:n}=b.formatNativeUrl(e,this.uri);w.setWcLinking({name:o,href:n}),w.setRecentWallet(this.wallet),b.openHref(r,"_blank")}catch{this.error=!0}}};To=li([d("w3m-connecting-wc-desktop")],To);var Ie=function(t,e,o,r){var n=arguments.length,i=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,o):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,o,r);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(i=(n<3?s(i):n>3?s(e,o,i):s(e,o))||i);return n>3&&i&&Object.defineProperty(e,o,i),i},ge=class extends T{constructor(){if(super(),this.btnLabelTimeout=void 0,this.redirectDeeplink=void 0,this.redirectUniversalLink=void 0,this.target=void 0,this.preferUniversalLinks=B.state.experimental_preferUniversalLinks,this.isLoading=!0,this.onConnect=()=>{po.onConnectMobile(this.wallet)},!this.wallet)throw new Error("w3m-connecting-wc-mobile: No wallet provided");this.secondaryBtnLabel="Open",this.secondaryLabel=tt.CONNECT_LABELS.MOBILE,this.secondaryBtnIcon="externalLink",this.onHandleURI(),this.unsubscribe.push(w.subscribeKey("wcUri",()=>{this.onHandleURI()})),W.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"mobile",displayIndex:this.wallet?.display_index,walletRank:this.wallet.order,view:g.state.view}})}disconnectedCallback(){super.disconnectedCallback(),clearTimeout(this.btnLabelTimeout)}onHandleURI(){this.isLoading=!this.uri,!this.ready&&this.uri&&(this.ready=!0,this.onConnect?.())}onTryAgain(){w.setWcError(!1),this.onConnect?.()}};Ie([p()],ge.prototype,"redirectDeeplink",void 0);Ie([p()],ge.prototype,"redirectUniversalLink",void 0);Ie([p()],ge.prototype,"target",void 0);Ie([p()],ge.prototype,"preferUniversalLinks",void 0);Ie([p()],ge.prototype,"isLoading",void 0);ge=Ie([d("w3m-connecting-wc-mobile")],ge);var Pr=ri(Wr(),1);var on=.1,Lr=2.5,ie=7;function ro(t,e,o){return t===e?!1:(t-e<0?e-t:t-e)<=o+on}function rn(t,e){let o=Array.prototype.slice.call(Pr.default.create(t,{errorCorrectionLevel:e}).modules.data,0),r=Math.sqrt(o.length);return o.reduce((n,i,s)=>(s%r===0?n.push([i]):n[n.length-1].push(i))&&n,[])}var Br={generate({uri:t,size:e,logoSize:o,padding:r=8,dotColor:n="var(--apkt-colors-black)"}){let s=[],l=rn(t,"Q"),a=(e-2*r)/l.length,h=[{x:0,y:0},{x:1,y:0},{x:0,y:1}];h.forEach(({x:R,y:C})=>{let O=(l.length-ie)*a*R+r,_=(l.length-ie)*a*C+r,M=.45;for(let L=0;L<h.length;L+=1){let k=a*(ie-L*2);s.push(_e` 375 <rect 376 fill=${L===2?"var(--apkt-colors-black)":"var(--apkt-colors-white)"} 377 width=${L===0?k-10:k} 378 rx= ${L===0?(k-10)*M:k*M} 379 ry= ${L===0?(k-10)*M:k*M} 380 stroke=${n} 381 stroke-width=${L===0?10:0} 382 height=${L===0?k-10:k}
383 x= ${L===0?_+a*L+10/2:_+a*L} 384 y= ${L===0?O+a*L+10/2:O+a*L} 385 /> 386 `)}});let m=Math.floor((o+25)/a),I=l.length/2-m/2,x=l.length/2+m/2-1,j=[];l.forEach((R,C)=>{R.forEach((O,_)=>{if(l[C][_]&&!(C<ie&&_<ie||C>l.length-(ie+1)&&_<ie||C<ie&&_>l.length-(ie+1))&&!(C>I&&C<x&&_>I&&_<x)){let M=C*a+a/2+r,L=_*a+a/2+r;j.push([M,L])}})});let D={};return j.forEach(([R,C])=>{D[R]?D[R]?.push(C):D[R]=[C]}),Object.entries(D).map(([R,C])=>{let O=C.filter(_=>C.every(M=>!ro(_,M,a)));return[Number(R),O]}).forEach(([R,C])=>{C.forEach(O=>{s.push(_e`<circle cx=${R} cy=${O} fill=${n} r=${a/Lr} />`)})}),Object.entries(D).filter(([R,C])=>C.length>1).map(([R,C])=>{let O=C.filter(_=>C.some(M=>ro(_,M,a)));return[Number(R),O]}).map(([R,C])=>{C.sort((_,M)=>_<M?-1:1);let O=[];for(let _ of C){let M=O.find(L=>L.some(k=>ro(_,k,a)));M?M.push(_):O.push([_])}return[R,O.map(_=>[_[0],_[_.length-1]])]}).forEach(([R,C])=>{C.forEach(([O,_])=>{s.push(_e` 387 <line 388 x1=${R} 389 x2=${R} 390 y1=${O} 391 y2=${_} 392 stroke=${n} 393 stroke-width=${a/(Lr/2)} 394 stroke-linecap="round" 395 /> 396 `)})}),s}};var kr=y` 397 :host { 398 position: relative; 399 user-select: none; 400 display: block; 401 overflow: hidden; 402 aspect-ratio: 1 / 1; 403 width: 100%; 404 height: 100%; 405 background-color: ${({colors:t})=>t.white}; 406 border: 1px solid ${({tokens:t})=>t.theme.borderPrimary}; 407 } 408 409 :host { 410 border-radius: ${({borderRadius:t})=>t[4]}; 411 display: flex; 412 align-items: center; 413 justify-content: center; 414 } 415 416 :host([data-clear='true']) > wui-icon { 417 display: none; 418 } 419 420 svg:first-child, 421 wui-image, 422 wui-icon { 423 position: absolute; 424 top: 50%; 425 left: 50%; 426 transform: translateY(-50%) translateX(-50%); 427 background-color: ${({tokens:t})=>t.theme.backgroundPrimary}; 428 box-shadow: inset 0 0 0 4px ${({tokens:t})=>t.theme.backgroundPrimary}; 429 border-radius: ${({borderRadius:t})=>t[6]}; 430 } 431 432 wui-image { 433 width: 25%; 434 height: 25%; 435 border-radius: ${({borderRadius:t})=>t[2]}; 436 } 437 438 wui-icon { 439 width: 100%; 440 height: 100%; 441 color: #3396ff !important; 442 transform: translateY(-50%) translateX(-50%) scale(0.25); 443 } 444 445 wui-icon > svg { 446 width: inherit; 447 height: inherit; 448 } 449`;var pe=function(t,e,o,r){var n=arguments.length,i=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,o):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,o,r);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(i=(n<3?s(i):n>3?s(e,o,i):s(e,o))||i);return n>3&&i&&Object.defineProperty(e,o,i),i},ee=class extends f{constructor(){super(...arguments),this.uri="",this.size=500,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),c`<wui-flex 450 alignItems="center" 451 justifyContent="center" 452 class="wui-qr-code" 453 direction="column" 454 gap="4" 455 width="100%" 456 style="height: 100%" 457 > 458 ${this.templateVisual()} ${this.templateSvg()} 459 </wui-flex>`}templateSvg(){return _e` 460 <svg viewBox="0 0 ${this.size} ${this.size}" width="100%" height="100%"> 461 ${Br.generate({uri:this.uri,size:this.size,logoSize:this.arenaClear?0:this.size/4})} 462 </svg> 463 `}templateVisual(){return this.imageSrc?c`<wui-image src=${this.imageSrc} alt=${this.alt??"logo"}></wui-image>`:this.farcaster?c`<wui-icon 464 class="farcaster" 465 size="inherit" 466 color="inherit" 467 name="farcaster" 468 ></wui-icon>`:c`<wui-icon size="inherit" color="inherit" name="walletConnect"></wui-icon>`}};ee.styles=[P,kr];pe([u()],ee.prototype,"uri",void 0);pe([u({type:Number})],ee.prototype,"size",void 0);pe([u()],ee.prototype,"theme",void 0);pe([u()],ee.prototype,"imageSrc",void 0);pe([u()],ee.prototype,"alt",void 0);pe([u({type:Boolean})],ee.prototype,"arenaClear",void 0);pe([u({type:Boolean})],ee.prototype,"farcaster",void 0);ee=pe([d("wui-qr-code")],ee);var Nr=y` 469 wui-shimmer { 470 width: 100%; 471 aspect-ratio: 1 / 1; 472 border-radius: ${({borderRadius:t})=>t[4]}; 473 } 474 475 wui-qr-code { 476 opacity: 0; 477 animation-duration: ${({durations:t})=>t.xl}; 478 animation-timing-function: ${({easings:t})=>t["ease-out-power-2"]}; 479 animation-name: fade-in; 480 animation-fill-mode: forwards; 481 } 482 483 @keyframes fade-in { 484 from { 485 opacity: 0; 486 } 487 to { 488 opacity: 1; 489 } 490 } 491`;var Or=function(t,e,o,r){var n=arguments.length,i=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,o):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,o,r);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(i=(n<3?s(i):n>3?s(e,o,i):s(e,o))||i);return n>3&&i&&Object.defineProperty(e,o,i),i},xt=class extends T{constructor(){super(),this.basic=!1}firstUpdated(){this.basic||W.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet?.name??"WalletConnect",platform:"qrcode",dis
491playIndex:this.wallet?.display_index,walletRank:this.wallet?.order,view:g.state.view}})}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribe?.forEach(e=>e())}render(){return this.onRenderProxy(),c` 492 <wui-flex 493 flexDirection="column" 494 alignItems="center" 495 .padding=${["0","5","5","5"]} 496 gap="5" 497 > 498 <wui-shimmer width="100%"> ${this.qrCodeTemplate()} </wui-shimmer> 499 <wui-text variant="lg-medium" color="primary"> Scan this QR Code with your phone </wui-text> 500 ${this.copyTemplate()} 501 </wui-flex> 502 <w3m-mobile-download-links .wallet=${this.wallet}></w3m-mobile-download-links> 503 `}onRenderProxy(){!this.ready&&this.uri&&(this.ready=!0)}qrCodeTemplate(){if(!this.uri||!this.ready)return null;let e=this.wallet?this.wallet.name:void 0;w.setWcLinking(void 0),w.setRecentWallet(this.wallet);let o=Re.state.themeVariables["--apkt-qr-color"]??Re.state.themeVariables["--w3m-qr-color"];return c` <wui-qr-code 504 theme=${Re.state.themeMode} 505 uri=${this.uri} 506 imageSrc=${v(V.getWalletImage(this.wallet))} 507 color=${v(o)} 508 alt=${v(e)} 509 data-testid="wui-qr-code" 510 ></wui-qr-code>`}copyTemplate(){let e=!this.uri||!this.ready;return c`<wui-button 511 .disabled=${e} 512 @click=${this.onCopyUri} 513 variant="neutral-secondary" 514 size="sm" 515 data-testid="copy-wc2-uri" 516 > 517 Copy link 518 <wui-icon size="sm" color="inherit" name="copy" slot="iconRight"></wui-icon> 519 </wui-button>`}};xt.styles=Nr;Or([u({type:Boolean})],xt.prototype,"basic",void 0);xt=Or([d("w3m-connecting-wc-qrcode")],xt);var nn=function(t,e,o,r){var n=arguments.length,i=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,o):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,o,r);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(i=(n<3?s(i):n>3?s(e,o,i):s(e,o))||i);return n>3&&i&&Object.defineProperty(e,o,i),i},Mr=class extends f{constructor(){if(super(),this.wallet=g.state.data?.wallet,!this.wallet)throw new Error("w3m-connecting-wc-unsupported: No wallet provided");W.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"browser",displayIndex:this.wallet?.display_index,walletRank:this.wallet?.order,view:g.state.view}})}render(){return c` 520 <wui-flex 521 flexDirection="column" 522 alignItems="center" 523 .padding=${["10","5","5","5"]} 524 gap="5" 525 > 526 <wui-wallet-image 527 size="lg" 528 imageSrc=${v(V.getWalletImage(this.wallet))} 529 ></wui-wallet-image> 530 531 <wui-text variant="md-regular" color="primary">Not Detected</wui-text> 532 </wui-flex> 533 534 <w3m-mobile-download-links .wallet=${this.wallet}></w3m-mobile-download-links> 535 `}};Mr=nn([d("w3m-connecting-wc-unsupported")],Mr);var Dr=function(t,e,o,r){var n=arguments.length,i=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,o):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,o,r);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(i=(n<3?s(i):n>3?s(e,o,i):s(e,o))||i);return n>3&&i&&Object.defineProperty(e,o,i),i},io=class extends T{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=tt.CONNECT_LABELS.MOBILE,this.secondaryBtnIcon="externalLink",this.updateLoadingState(),this.unsubscribe.push(w.subscribeKey("wcUri",()=>{this.updateLoadingState()})),W.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"web",displayIndex:this.wallet?.display_index,walletRank:this.wallet?.order,view:g.state.view}})}updateLoadingState(){this.isLoading=!this.uri}onConnectProxy(){if(this.wallet?.webapp_link&&this.uri)try{this.error=!1;let{webapp_link:e,name:o}=this.wallet,{redirect:r,href:n}=b.formatUniversalUrl(e,this.uri);w.setWcLinking({name:o,href:n}),w.setRecentWallet(this.wallet),b.openHref(r,"_blank")}catch{this.error=!0}}};Dr([p()],io.prototype,"isLoading",void 0);io=Dr([d("w3m-connecting-wc-web")],io);var Ur=y` 536 :host([data-mobile-fullscreen='true']) { 537 height: 100%; 538 display: flex; 539 flex-direction: column; 540 } 541 542 :host([data-mobile-fullscreen='true']) wui-ux-by-reown { 543 margin-top: auto; 544 } 545`;var Ce=function(t,e,o,r){var n=arguments.length,i=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,o):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,o,r);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(i=(n<3?s(i):n>3?s(e,o,i):s(e,o))||i);return n>3&&i&&Object.defineProperty(e,o,i),i},ne=class extends f{constructor(){super(),this.wallet=g.state.data?.wallet,this.unsubscribe=[],this.platform=void 0,this.platforms=[],this.isSiwxEnabled=!!B.state.siwx,this.remoteFeatures=B.state.remoteFeatures,this.displayBranding=!0,this.basic=!1,this.determinePlatforms(),this.initializeConnection(),this.unsubscribe.push(B.subscribeKey("remoteFeatures",e=>this.remoteFeatures=e))}
545disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return B.state.enableMobileFullScreen&&this.setAttribute("data-mobile-fullscreen","true"),c` 546 ${this.headerTemplate()} 547 <div class="platform-container">${this.platformTemplate()}</div> 548 ${this.reownBrandingTemplate()} 549 `}reownBrandingTemplate(){return!this.remoteFeatures?.reownBranding||!this.displayBranding?null:c`<wui-ux-by-reown></wui-ux-by-reown>`}initializeConnection(e=!1){return J(this,null,function*(){if(!(this.platform==="browser"||B.state.manualWCControl&&!e))try{let{wcPairingExpiry:o,status:r}=w.state,{redirectView:n}=g.state.data??{};if(e||B.state.enableEmbedded||b.isPairingExpired(o)||r==="connecting"){let i=w.getConnections(Y.state.activeChain),s=this.remoteFeatures?.multiWallet,l=i.length>0;yield w.connectWalletConnect({cache:"never"}),this.isSiwxEnabled||(l&&s?(g.replace("ProfileWallets"),se.showSuccess("New Wallet Added")):n?g.replace(n):rt.close())}}catch(o){if(o instanceof Error&&o.message.includes("An error occurred when attempting to switch chain")&&!B.state.enableNetworkSwitch&&Y.state.activeChain){Y.setActiveCaipNetwork(mo.getUnsupportedNetwork(`${Y.state.activeChain}:${Y.state.activeCaipNetwork?.id}`)),Y.showUnsupportedChainUI();return}o instanceof ot&&o.originalName===et.PROVIDER_RPC_ERROR_NAME.USER_REJECTED_REQUEST?W.sendEvent({type:"track",event:"USER_REJECTED",properties:{message:o.message}}):W.sendEvent({type:"track",event:"CONNECT_ERROR",properties:{message:o?.message??"Unknown"}}),w.setWcError(!0),se.showError(o.message??"Connection error"),w.resetWcConnection(),g.goBack()}})}determinePlatforms(){if(!this.wallet){this.platforms.push("qrcode"),this.platform="qrcode";return}if(this.platform)return;let{mobile_link:e,desktop_link:o,webapp_link:r,injected:n,rdns:i}=this.wallet,s=n?.map(({injected_id:D})=>D).filter(Boolean),l=[...i?[i]:s??[]],a=B.state.isUniversalProvider?!1:l.length,h=e,m=r,I=w.checkInstalled(l),x=a&&I,j=o&&!b.isMobile();x&&!Y.state.noAdapters&&this.platforms.push("browser"),h&&this.platforms.push(b.isMobile()?"mobile":"qrcode"),m&&this.platforms.push("web"),j&&this.platforms.push("desktop"),!x&&a&&!Y.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` 550 <w3m-connecting-wc-desktop .onRetry=${()=>this.initializeConnection(!0)}> 551 </w3m-connecting-wc-desktop> 552 `;case"mobile":return c` 553 <w3m-connecting-wc-mobile isMobile .onRetry=${()=>this.initializeConnection(!0)}> 554 </w3m-connecting-wc-mobile> 555 `;case"qrcode":return c`<w3m-connecting-wc-qrcode ?basic=${this.basic}></w3m-connecting-wc-qrcode>`;default:return c`<w3m-connecting-wc-unsupported></w3m-connecting-wc-unsupported>`}}headerTemplate(){return this.platforms.length>1?c` 556 <w3m-connecting-header 557 .platforms=${this.platforms} 558 .onSelectPlatfrom=${this.onSelectPlatform.bind(this)} 559 > 560 </w3m-connecting-header> 561 `:null}onSelectPlatform(e){return J(this,null,function*(){let o=this.shadowRoot?.querySelector("div");o&&(yield o.animate([{opacity:1},{opacity:0}],{duration:200,fill:"forwards",easing:"ease"}).finished,this.platform=e,o.animate([{opacity:0},{opacity:1}],{duration:200,fill:"forwards",easing:"ease"}))})}};ne.styles=Ur;Ce([p()],ne.prototype,"platform",void 0);Ce([p()],ne.prototype,"platforms",void 0);Ce([p()],ne.prototype,"isSiwxEnabled",void 0);Ce([p()],ne.prototype,"remoteFeatures",void 0);Ce([u({type:Boolean})],ne.prototype,"displayBranding",void 0);Ce([u({type:Boolean})],ne.prototype,"basic",void 0);ne=Ce([d("w3m-connecting-wc-view")],ne);var no=function(t,e,o,r){var n=arguments.length,i=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,o):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,o,r);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(i=(n<3?s(i):n>3?s(e,o,i):s(e,o))||i);return n>3&&i&&Object.defineProperty(e,o,i),i},Ct=class extends f{constructor(){super(),this.unsubscribe=[],this.isMobile=b.isMobile(),this.remoteFeatures=B.state.remoteFeatures,this.unsubscribe.push(B.subscribeKey("remoteFeatures",e=>this.remoteFeatures=e))}
vendor: 5,606 bytes, lines 561-661
561disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){if(this.isMobile){let{featured:e,recommended:o}=S.state,{customWallets:r}=B.state,n=co.getRecentWallets(),i=e.length||o.length||r?.length||n.length;return c`<wui-flex flexDirection="column" gap="2" .margin=${["1","3","3","3"]}> 562 ${i?c`<w3m-connector-list></w3m-connector-list>`:null} 563 <w3m-all-wallets-widget></w3m-all-wallets-widget> 564 </wui-flex>`}return c`<wui-flex flexDirection="column" .padding=${["0","0","4","0"]}> 565 <w3m-connecting-wc-view ?basic=${!0} .displayBranding=${!1}></w3m-connecting-wc-view> 566 <wui-flex flexDirection="column" .padding=${["0","3","0","3"]}> 567 <w3m-all-wallets-widget></w3m-all-wallets-widget> 568 </wui-flex> 569 </wui-flex> 570 ${this.reownBrandingTemplate()} `}reownBrandingTemplate(){return this.remoteFeatures?.reownBranding?c` <wui-flex flexDirection="column" .padding=${["1","0","1","0"]}> 571 <wui-ux-by-reown></wui-ux-by-reown> 572 </wui-flex>`:null}};no([p()],Ct.prototype,"isMobile",void 0);no([p()],Ct.prototype,"remoteFeatures",void 0);Ct=no([d("w3m-connecting-wc-basic-view")],Ct);var{I:Ic}=ho;var jr=t=>t.strings===void 0;var Ye=(t,e)=>{let o=t._$AN;if(o===void 0)return!1;for(let r of o)r._$AO?.(e,!1),Ye(r,e);return!0},vt=t=>{let e,o;do{if((e=t._$AM)===void 0)break;o=e._$AN,o.delete(t),t=e}while(o?.size===0)},zr=t=>{for(let e;e=t._$AM;t=e){let o=e._$AN;if(o===void 0)e._$AN=o=new Set;else if(o.has(t))break;o.add(t),an(e)}};function sn(t){this._$AN!==void 0?(vt(this),this._$AM=t,zr(this)):this._$AM=t}function ln(t,e=!1,o=0){let r=this._$AH,n=this._$AN;if(n!==void 0&&n.size!==0)if(e)if(Array.isArray(r))for(let i=o;i<r.length;i++)Ye(r[i],!1),vt(r[i]);else r!=null&&(Ye(r,!1),vt(r));else Ye(this,t)}var an=t=>{t.type==go.CHILD&&(t._$AP??=ln,t._$AQ??=sn)},$t=class extends wo{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,o,r){super._$AT(e,o,r),zr(this),this.isConnected=e._$AU}_$AO(e,o=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),o&&(Ye(this,e),vt(this))}setValue(e){if(jr(this._$Ct))this._$Ct._$AI(e,this);else{let o=[...this._$Ct._$AH];o[this._$Ci]=e,this._$Ct._$AI(o,this,0)}}disconnected(){}reconnected(){}};var Ne=()=>new lo,lo=class{},so=new WeakMap,Oe=Lt(class extends $t{render(t){return Wt}update(t,[e]){let o=e!==this.G;return o&&this.G!==void 0&&this.rt(void 0),(o||this.lt!==this.ct)&&(this.G=e,this.ht=t.options?.host,this.rt(this.ct=t.element)),Wt}rt(t){if(this.isConnected||(t=void 0),typeof this.G=="function"){let e=this.ht??globalThis,o=so.get(e);o===void 0&&(o=new WeakMap,so.set(e,o)),o.get(this.G)!==void 0&&this.G.call(this.ht,void 0),o.set(this.G,t),t!==void 0&&this.G.call(this.ht,t)}else this.G.value=t}get lt(){return typeof this.G=="function"?so.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var qr=y` 573 :host { 574 display: flex; 575 align-items: center; 576 justify-content: center; 577 } 578 579 label { 580 position: relative; 581 display: inline-block; 582 user-select: none; 583 transition: 584 background-color ${({durations:t})=>t.lg} 585 ${({easings:t})=>t["ease-out-power-2"]}, 586 color ${({durations:t})=>t.lg} ${({easings:t})=>t["ease-out-power-2"]}, 587 border ${({durations:t})=>t.lg} ${({easings:t})=>t["ease-out-power-2"]}, 588 box-shadow ${({durations:t})=>t.lg} 589 ${({easings:t})=>t["ease-out-power-2"]}, 590 width ${({durations:t})=>t.lg} ${({easings:t})=>t["ease-out-power-2"]}, 591 height ${({durations:t})=>t.lg} ${({easings:t})=>t["ease-out-power-2"]}, 592 transform ${({durations:t})=>t.lg} 593 ${({easings:t})=>t["ease-out-power-2"]}, 594 opacity ${({durations:t})=>t.lg} ${({easings:t})=>t["ease-out-power-2"]}; 595 will-change: background-color, color, border, box-shadow, width, height, transform, opacity; 596 } 597 598 input { 599 width: 0; 600 height: 0; 601 opacity: 0; 602 } 603 604 span { 605 position: absolute; 606 cursor: pointer; 607 top: 0; 608 left: 0; 609 right: 0; 610 bottom: 0; 611 background-color: ${({colors:t})=>t.neutrals300}; 612 border-radius: ${({borderRadius:t})=>t.round}; 613 border: 1px solid transparent; 614 will-change: border; 615 transition: 616 background-color ${({durations:t})=>t.lg} 617 ${({easings:t})=>t["ease-out-power-2"]}, 618 color ${({durations:t})=>t.lg} ${({easings:t})=>t["ease-out-power-2"]}, 619 border ${({durations:t})=>t.lg} ${({easings:t})=>t["ease-out-power-2"]}, 620 box-shadow ${({durations:t})=>t.lg} 621 ${({easings:t})=>t["ease-out-power-2"]}, 622 width ${({durations:t})=>t.lg} ${({easings:t})=>t["ease-out-power-2"]}, 623 height ${({durations:t})=>t.lg} ${({easings:t})=>t["ease-out-power-2"]}, 624 transform ${({durations:t})=>t.lg} 625 ${({easings:t})=>t["ease-out-power-2"]}, 626 opacity ${({durations:t})=>t.lg} ${({easings:t})=>t["ease-out-power-2"]}; 627 will-change: background-color, color, border, box-shadow, width, height, transform, opacity; 628 } 629 630 span:before { 631 content: ''; 632 position: absolute; 633 background-color: ${({colors:t})=>t.white}; 634 border-radius: 50%; 635 } 636 637 /* -- Sizes --------------------------------------------------------- */ 638 label[data-size='lg'] { 639 width: 48px; 640 height: 32px; 641 } 642 643 label[data-size='md'] { 644 width: 40px; 645 height: 28px; 646 } 647 648 label[data-size='sm'] { 649 width: 32px; 650 height: 22px; 651 } 652 653 label[data-size='lg'] > span:before { 654 height: 24px; 655 width: 24px; 656 left: 4px; 657 top: 3px; 658 } 659 660 label[data-size='md'] > span:before { 661 height: 20px;
662 width: 20px; 663 left: 4px; 664 top: 3px; 665 } 666 667 label[data-size='sm'] > span:before { 668 height: 16px; 669 width: 16px; 670 left: 3px; 671 top: 2px; 672 } 673 674 /* -- Focus states --------------------------------------------------- */ 675 input:focus-visible:not(:checked) + span, 676 input:focus:not(:checked) + span { 677 border: 1px solid ${({tokens:t})=>t.core.iconAccentPrimary}; 678 background-color: ${({tokens:t})=>t.theme.textTertiary}; 679 box-shadow: 0px 0px 0px 4px rgba(9, 136, 240, 0.2); 680 } 681 682 input:focus-visible:checked + span, 683 input:focus:checked + span { 684 border: 1px solid ${({tokens:t})=>t.core.iconAccentPrimary}; 685 box-shadow: 0px 0px 0px 4px rgba(9, 136, 240, 0.2); 686 } 687 688 /* -- Checked states --------------------------------------------------- */ 689 input:checked + span { 690 background-color: ${({tokens:t})=>t.core.iconAccentPrimary}; 691 } 692 693 label[data-size='lg'] > input:checked + span:before { 694 transform: translateX(calc(100% - 9px)); 695 } 696 697 label[data-size='md'] > input:checked + span:before { 698 transform: translateX(calc(100% - 9px)); 699 } 700 701 label[data-size='sm'] > input:checked + span:before { 702 transform: translateX(calc(100% - 7px)); 703 } 704 705 /* -- Hover states ------------------------------------------------------- */ 706 label:hover > input:not(:checked):not(:disabled) + span { 707 background-color: ${({colors:t})=>t.neutrals400}; 708 } 709 710 label:hover > input:checked:not(:disabled) + span { 711 background-color: ${({colors:t})=>t.accent080}; 712 } 713 714 /* -- Disabled state --------------------------------------------------- */ 715 label:has(input:disabled) { 716 pointer-events: none; 717 user-select: none; 718 } 719 720 input:not(:checked):disabled + span { 721 background-color: ${({colors:t})=>t.neutrals700}; 722 } 723 724 input:checked:disabled + span { 725 background-color: ${({colors:t})=>t.neutrals700}; 726 } 727 728 input:not(:checked):disabled + span::before { 729 background-color: ${({colors:t})=>t.neutrals400}; 730 } 731 732 input:checked:disabled + span::before { 733 background-color: ${({tokens:t})=>t.theme.textTertiary}; 734 } 735`;var Et=function(t,e,o,r){var n=arguments.length,i=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,o):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,o,r);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(i=(n<3?s(i):n>3?s(e,o,i):s(e,o))||i);return n>3&&i&&Object.defineProperty(e,o,i),i},Me=class extends f{constructor(){super(...arguments),this.inputElementRef=Ne(),this.checked=!1,this.disabled=!1,this.size="md"}render(){return c` 736 <label data-size=${this.size}> 737 <input 738 ${Oe(this.inputElementRef)} 739 type="checkbox" 740 ?checked=${this.checked} 741 ?disabled=${this.disabled} 742 @change=${this.dispatchChangeEvent.bind(this)} 743 /> 744 <span></span> 745 </label> 746 `}dispatchChangeEvent(){this.dispatchEvent(new CustomEvent("switchChange",{detail:this.inputElementRef.value?.checked,bubbles:!0,composed:!0}))}};Me.styles=[P,z,qr];Et([u({type:Boolean})],Me.prototype,"checked",void 0);Et([u({type:Boolean})],Me.prototype,"disabled",void 0);Et([u()],Me.prototype,"size",void 0);Me=Et([d("wui-toggle")],Me);var Fr=y` 747 :host { 748 height: auto; 749 } 750 751 :host > wui-flex { 752 height: 100%; 753 display: flex; 754 align-items: center; 755 justify-content: center; 756 column-gap: ${({spacing:t})=>t[2]}; 757 padding: ${({spacing:t})=>t[2]} ${({spacing:t})=>t[3]}; 758 background-color: ${({tokens:t})=>t.theme.foregroundPrimary}; 759 border-radius: ${({borderRadius:t})=>t[4]}; 760 box-shadow: inset 0 0 0 1px ${({tokens:t})=>t.theme.foregroundPrimary}; 761 transition: background-color ${({durations:t})=>t.lg} 762 ${({easings:t})=>t["ease-out-power-2"]}; 763 will-change: background-color; 764 cursor: pointer; 765 } 766 767 wui-switch { 768 pointer-events: none; 769 } 770`;var Vr=function(t,e,o,r){var n=arguments.length,i=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,o):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,o,r);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(i=(n<3?s(i):n>3?s(e,o,i):s(e,o))||i);return n>3&&i&&Object.defineProperty(e,o,i),i},Rt=class extends f{constructor(){super(...arguments),this.checked=!1}
770render(){return c` 771 <wui-flex> 772 <wui-icon size="xl" name="walletConnectBrown"></wui-icon> 773 <wui-toggle 774 ?checked=${this.checked} 775 size="sm" 776 @switchChange=${this.handleToggleChange.bind(this)} 777 ></wui-toggle> 778 </wui-flex> 779 `}handleToggleChange(e){e.stopPropagation(),this.checked=e.detail,this.dispatchSwitchEvent()}dispatchSwitchEvent(){this.dispatchEvent(new CustomEvent("certifiedSwitchChange",{detail:this.checked,bubbles:!0,composed:!0}))}};Rt.styles=[P,z,Fr];Vr([u({type:Boolean})],Rt.prototype,"checked",void 0);Rt=Vr([d("wui-certified-switch")],Rt);var Hr=y` 780 :host { 781 position: relative; 782 width: 100%; 783 display: inline-flex; 784 flex-direction: column; 785 gap: ${({spacing:t})=>t[3]}; 786 color: ${({tokens:t})=>t.theme.textPrimary}; 787 caret-color: ${({tokens:t})=>t.core.textAccentPrimary}; 788 } 789 790 .wui-input-text-container { 791 position: relative; 792 display: flex; 793 } 794 795 input { 796 width: 100%; 797 border-radius: ${({borderRadius:t})=>t[4]}; 798 color: inherit; 799 background: transparent; 800 border: 1px solid ${({tokens:t})=>t.theme.borderPrimary}; 801 caret-color: ${({tokens:t})=>t.core.textAccentPrimary}; 802 padding: ${({spacing:t})=>t[3]} ${({spacing:t})=>t[3]} 803 ${({spacing:t})=>t[3]} ${({spacing:t})=>t[10]}; 804 font-size: ${({textSize:t})=>t.large}; 805 line-height: ${({typography:t})=>t["lg-regular"].lineHeight}; 806 letter-spacing: ${({typography:t})=>t["lg-regular"].letterSpacing}; 807 font-weight: ${({fontWeight:t})=>t.regular}; 808 font-family: ${({fontFamily:t})=>t.regular}; 809 } 810 811 input[data-size='lg'] { 812 padding: ${({spacing:t})=>t[4]} ${({spacing:t})=>t[3]} 813 ${({spacing:t})=>t[4]} ${({spacing:t})=>t[10]}; 814 } 815 816 @media (hover: hover) and (pointer: fine) { 817 input:hover:enabled { 818 border: 1px solid ${({tokens:t})=>t.theme.borderSecondary}; 819 } 820 } 821 822 input:disabled { 823 cursor: unset; 824 border: 1px solid ${({tokens:t})=>t.theme.borderPrimary}; 825 } 826 827 input::placeholder { 828 color: ${({tokens:t})=>t.theme.textSecondary}; 829 } 830 831 input:focus:enabled { 832 border: 1px solid ${({tokens:t})=>t.theme.borderSecondary}; 833 background-color: ${({tokens:t})=>t.theme.foregroundPrimary}; 834 -webkit-box-shadow: 0px 0px 0px 4px ${({tokens:t})=>t.core.foregroundAccent040}; 835 -moz-box-shadow: 0px 0px 0px 4px ${({tokens:t})=>t.core.foregroundAccent040}; 836 box-shadow: 0px 0px 0px 4px ${({tokens:t})=>t.core.foregroundAccent040}; 837 } 838 839 div.wui-input-text-container:has(input:disabled) { 840 opacity: 0.5; 841 } 842 843 wui-icon.wui-input-text-left-icon { 844 position: absolute; 845 top: 50%; 846 transform: translateY(-50%); 847 pointer-events: none; 848 left: ${({spacing:t})=>t[4]}; 849 color: ${({tokens:t})=>t.theme.iconDefault}; 850 } 851 852 button.wui-input-text-submit-button { 853 position: absolute; 854 top: 50%; 855 transform: translateY(-50%); 856 right: ${({spacing:t})=>t[3]}; 857 width: 24px; 858 height: 24px; 859 border: none; 860 background: transparent; 861 border-radius: ${({borderRadius:t})=>t[2]}; 862 color: ${({tokens:t})=>t.core.textAccentPrimary}; 863 } 864 865 button.wui-input-text-submit-button:disabled { 866 opacity: 1; 867 } 868 869 button.wui-input-text-submit-button.loading wui-icon { 870 animation: spin 1s linear infinite; 871 } 872 873 button.wui-input-text-submit-button:hover { 874 background: ${({tokens:t})=>t.core.foregroundAccent010}; 875 } 876 877 input:has(+ .wui-input-text-submit-button) { 878 padding-right: ${({spacing:t})=>t[12]}; 879 } 880 881 input[type='number'] { 882 -moz-appearance: textfield; 883 } 884 885 input[type='search']::-webkit-search-decoration, 886 input[type='search']::-webkit-search-cancel-button, 887 input[type='search']::-webkit-search-results-button, 888 input[type='search']::-webkit-search-results-decoration { 889 -webkit-appearance: none; 890 } 891 892 /* -- Keyframes --------------------------------------------------- */ 893 @keyframes spin { 894 from { 895 transform: rotate(0deg); 896 } 897 to { 898 transform: rotate(360deg); 899 } 900 } 901`;var K=function(t,e,o,r){var n=arguments.length,i=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,o):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,o,r);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(i=(n<3?s(i):n>3?s(e,o,i):s(e,o))||i);return n>3&&i&&Object.defineProperty(e,o,i),i},q=class extends f{constructor(){super(...arguments),this.inputElementRef=Ne(),this.disabled=!1,this.loading=!1,this.placeholder="",this.type="text",this.value="",this.size="md"}render(){return c` <div class="wui-input-text-container"> 902 ${this.templateLeftIcon()} 903 <input 904 data-size=${this.size} 905 ${Oe(this.inputElementRef)} 906 data-testid="wui-input-text" 907 type=${this.type} 908 enterkeyhint=${v(this.enterKeyHint)} 909 ?disabled=${this.disabled} 910 placeholder=${this.placeholder}
911 @input=${this.dispatchInputChangeEvent.bind(this)} 912 @keydown=${this.onKeyDown} 913 .value=${this.value||""} 914 /> 915 ${this.templateSubmitButton()} 916 <slot class="wui-input-text-slot"></slot> 917 </div> 918 ${this.templateError()} ${this.templateWarning()}`}templateLeftIcon(){return this.icon?c`<wui-icon 919 class="wui-input-text-left-icon" 920 size="md" 921 data-size=${this.size} 922 color="inherit" 923 name=${this.icon} 924 ></wui-icon>`:null}templateSubmitButton(){return this.onSubmit?c`<button 925 class="wui-input-text-submit-button ${this.loading?"loading":""}" 926 @click=${this.onSubmit?.bind(this)} 927 ?disabled=${this.disabled||this.loading} 928 > 929 ${this.loading?c`<wui-icon name="spinner" size="md"></wui-icon>`:c`<wui-icon name="chevronRight" size="md"></wui-icon>`} 930 </button>`:null}templateError(){return this.errorText?c`<wui-text variant="sm-regular" color="error">${this.errorText}</wui-text>`:null}templateWarning(){return this.warningText?c`<wui-text variant="sm-regular" color="warning">${this.warningText}</wui-text>`:null}dispatchInputChangeEvent(){this.dispatchEvent(new CustomEvent("inputChange",{detail:this.inputElementRef.value?.value,bubbles:!0,composed:!0}))}};q.styles=[P,z,Hr];K([u()],q.prototype,"icon",void 0);K([u({type:Boolean})],q.prototype,"disabled",void 0);K([u({type:Boolean})],q.prototype,"loading",void 0);K([u()],q.prototype,"placeholder",void 0);K([u()],q.prototype,"type",void 0);K([u()],q.prototype,"value",void 0);K([u()],q.prototype,"errorText",void 0);K([u()],q.prototype,"warningText",void 0);K([u()],q.prototype,"onSubmit",void 0);K([u()],q.prototype,"size",void 0);K([u({attribute:!1})],q.prototype,"onKeyDown",void 0);q=K([d("wui-input-text")],q);var Kr=y` 931 :host { 932 position: relative; 933 display: inline-block; 934 width: 100%; 935 } 936 937 wui-icon { 938 position: absolute; 939 top: 50%; 940 transform: translateY(-50%); 941 right: ${({spacing:t})=>t[3]}; 942 color: ${({tokens:t})=>t.theme.iconDefault}; 943 cursor: pointer; 944 padding: ${({spacing:t})=>t[2]}; 945 background-color: transparent; 946 border-radius: ${({borderRadius:t})=>t[4]}; 947 transition: background-color ${({durations:t})=>t.lg} 948 ${({easings:t})=>t["ease-out-power-2"]}; 949 } 950 951 @media (hover: hover) { 952 wui-icon:hover { 953 background-color: ${({tokens:t})=>t.theme.foregroundSecondary}; 954 } 955 } 956`;var Gr=function(t,e,o,r){var n=arguments.length,i=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,o):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,o,r);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(i=(n<3?s(i):n>3?s(e,o,i):s(e,o))||i);return n>3&&i&&Object.defineProperty(e,o,i),i},_t=class extends f{constructor(){super(...arguments),this.inputComponentRef=Ne(),this.inputValue=""}render(){return c` 957 <wui-input-text 958 ${Oe(this.inputComponentRef)} 959 placeholder="Search wallet" 960 icon="search" 961 type="search" 962 enterKeyHint="search" 963 size="sm" 964 @inputChange=${this.onInputChange} 965 > 966 ${this.inputValue?c`<wui-icon 967 @click=${this.clearValue} 968 color="inherit" 969 size="sm" 970 name="close" 971 ></wui-icon>`:null} 972 </wui-input-text> 973 `}onInputChange(e){this.inputValue=e.detail||""}clearValue(){let o=this.inputComponentRef.value?.inputElementRef.value;o&&(o.value="",this.inputValue="",o.focus(),o.dispatchEvent(new Event("input")))}};_t.styles=[P,Kr];Gr([u()],_t.prototype,"inputValue",void 0);_t=Gr([d("wui-search-bar")],_t);var Qr=y` 974 :host { 975 display: flex; 976 flex-direction: column; 977 justify-content: center; 978 align-items: center; 979 height: 104px; 980 width: 104px; 981 row-gap: ${({spacing:t})=>t[2]}; 982 background-color: ${({tokens:t})=>t.theme.foregroundPrimary}; 983 border-radius: ${({borderRadius:t})=>t[5]}; 984 position: relative; 985 } 986 987 wui-shimmer[data-type='network'] { 988 border: none; 989 -webkit-clip-path: var(--apkt-path-network); 990 clip-path: var(--apkt-path-network); 991 } 992 993 svg { 994 position: absolute; 995 width: 48px; 996 height: 54px; 997 z-index: 1; 998 } 999 1000 svg > path { 1001 stroke: ${({tokens:t})=>t.theme.foregroundSecondary}; 1002 stroke-width: 1px; 1003 } 1004 1005 @media (max-width: 350px) { 1006 :host { 1007 width: 100%; 1008 } 1009 } 1010`;var Jr=function(t,e,o,r){var n=arguments.length,i=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,o):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,o,r);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(i=(n<3?s(i):n>3?s(e,o,i):s(e,o))||i);return n>3&&i&&Object.defineProperty(e,o,i),i},St=class extends f{constructor(){super(...arguments),this.type="wallet"}render(){return c` 1011 ${this.shimmerTemplate()} 1012 <wui-shimmer width="80px" height="20px"></wui-shimmer> 1013 `}shimmerTemplate(){return this.type==="network"?c` <wui-shimmer data-type=${this.type} width="48px" height="54px"></wui-shimmer> 1014 ${bo}`:c`<wui-shimmer width="56px" height="56px"></wui-shimmer>`}};St.styles=[P,z,Qr];Jr([u()],St.prototype,"type",void 0);St=Jr([d("wui-card-select-loader")],St);var Yr=it` 1015 :host { 1016 display: grid; 1017 width: inherit; 1018 height: inherit; 1019 } 1020`;var G=function(t,e,o,r){var n=arguments.length,i=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,o):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,o,r);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(i=(n<3?s(i):n>3?s(e,o,i):s(e,o))||i);return n>3&&i&&Object.defineProperty(e,o,i),i},F=class extends f{render(){return this.style.cssText=` 1021 grid-template-rows: ${this.gridTemplateRows}; 1022 grid-template-columns: ${this.gridTemplateColumns}; 1023 justify-items: ${this.justifyItems}; 1024 align-items: ${this.alignItems}; 1025 justify-content: ${this.justifyContent}; 1026 align-content: ${this.alignContent}; 1027 column-gap: ${this.columnGap&&`var(--apkt-spacing-${this.columnGap})`}; 1028 row-gap: ${this.rowGap&&`var(--apkt-spacing-${this.rowGap})`}; 1029 gap: ${this.gap&&`var(--apkt-spacing-${this.gap})`}; 1030 padding-top: ${this.padding&&X.getSpacingStyles(this.padding,0)}; 1031 padding-right: ${this.padding&&X.getSpacingStyles(this.padding,1)}; 1032 padding-bottom: ${this.padding&&X.getSpacingStyles(this.padding,2)}; 1033 padding-left: ${this.padding&&X.getSpacingStyles(this.padding,3)}; 1034 margin-top: ${this.margin&&X.getSpacingStyles(this.margin,
10340)}; 1035 margin-right: ${this.margin&&X.getSpacingStyles(this.margin,1)}; 1036 margin-bottom: ${this.margin&&X.getSpacingStyles(this.margin,2)}; 1037 margin-left: ${this.margin&&X.getSpacingStyles(this.margin,3)}; 1038 `,c`<slot></slot>`}};F.styles=[P,Yr];G([u()],F.prototype,"gridTemplateRows",void 0);G([u()],F.prototype,"gridTemplateColumns",void 0);G([u()],F.prototype,"justifyItems",void 0);G([u()],F.prototype,"alignItems",void 0);G([u()],F.prototype,"justifyContent",void 0);G([u()],F.prototype,"alignContent",void 0);G([u()],F.prototype,"columnGap",void 0);G([u()],F.prototype,"rowGap",void 0);G([u()],F.prototype,"gap",void 0);G([u()],F.prototype,"padding",void 0);G([u()],F.prototype,"margin",void 0);F=G([d("wui-grid")],F);var Xr=y` 1039 button { 1040 display: flex; 1041 flex-direction: column; 1042 justify-content: center; 1043 align-items: center; 1044 cursor: pointer; 1045 width: 104px; 1046 row-gap: ${({spacing:t})=>t[2]}; 1047 padding: ${({spacing:t})=>t[3]} ${({spacing:t})=>t[0]}; 1048 background-color: ${({tokens:t})=>t.theme.foregroundPrimary}; 1049 border-radius: clamp(0px, ${({borderRadius:t})=>t[4]}, 20px); 1050 transition: 1051 color ${({durations:t})=>t.lg} ${({easings:t})=>t["ease-out-power-1"]}, 1052 background-color ${({durations:t})=>t.lg} 1053 ${({easings:t})=>t["ease-out-power-1"]}, 1054 border-radius ${({durations:t})=>t.lg} 1055 ${({easings:t})=>t["ease-out-power-1"]}; 1056 will-change: background-color, color, border-radius; 1057 outline: none; 1058 border: none; 1059 } 1060 1061 button > wui-flex > wui-text { 1062 color: ${({tokens:t})=>t.theme.textPrimary}; 1063 max-width: 86px; 1064 white-space: nowrap; 1065 overflow: hidden; 1066 text-overflow: ellipsis; 1067 justify-content: center; 1068 } 1069 1070 button > wui-flex > wui-text.certified { 1071 max-width: 66px; 1072 } 1073 1074 @media (hover: hover) and (pointer: fine) { 1075 button:hover:enabled { 1076 background-color: ${({tokens:t})=>t.theme.foregroundSecondary}; 1077 } 1078 } 1079 1080 button:disabled > wui-flex > wui-text { 1081 color: ${({tokens:t})=>t.core.glass010}; 1082 } 1083 1084 [data-selected='true'] { 1085 background-color: ${({colors:t})=>t.accent020}; 1086 } 1087 1088 @media (hover: hover) and (pointer: fine) { 1089 [data-selected='true']:hover:enabled { 1090 background-color: ${({colors:t})=>t.accent010}; 1091 } 1092 } 1093 1094 [data-selected='true']:active:enabled { 1095 background-color: ${({colors:t})=>t.accent010}; 1096 } 1097 1098 @media (max-width: 350px) { 1099 button { 1100 width: 100%; 1101 } 1102 } 1103`;var te=function(t,e,o,r){var n=arguments.length,i=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,o):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,o,r);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(i=(n<3?s(i):n>3?s(e,o,i):s(e,o))||i);return n>3&&i&&Object.defineProperty(e,o,i),i},Q=class extends f{constructor(){super(),this.observer=new IntersectionObserver(()=>{}),this.visible=!1,this.imageSrc=void 0,this.imageLoading=!1,this.isImpressed=!1,this.explorerId="",this.walletQuery="",this.certified=!1,this.displayIndex=0,this.wallet=void 0,this.observer=new IntersectionObserver(e=>{e.forEach(o=>{o.isIntersecting?(this.visible=!0,this.fetchImageSrc(),this.sendImpressionEvent()):this.visible=!1})},{threshold:.01})}firstUpdated(){this.observer.observe(this)}disconnectedCallback(){this.observer.disconnect()}render(){let e=this.wallet?.badge_type==="certified";return c` 1104 <button> 1105 ${this.imageTemplate()} 1106 <wui-flex flexDirection="row" alignItems="center" justifyContent="center" gap="1"> 1107 <wui-text 1108 variant="md-regular" 1109 color="inherit" 1110 class=${v(e?"certified":void 0)} 1111 >${this.wallet?.name}</wui-text 1112 > 1113 ${e?c`<wui-icon size="sm" name="walletConnectBrown"></wui-icon>`:null} 1114 </wui-flex> 1115 </button> 1116 `}imageTemplate(){return!this.visible&&!this.imageSrc||this.imageLoading?this.shimmerTemplate():c` 1117 <wui-wallet-image 1118 size="lg" 1119 imageSrc=${v(this.imageSrc)} 1120 name=${v(this.wallet?.name)} 1121 .installed=${this.wallet?.installed??!1} 1122 badgeSize="sm" 1123 > 1124 </wui-wallet-image> 1125 `}shimmerTemplate(){return c`<wui-shimmer width="56px" height="56px"></wui-shimmer>`}fetchImageSrc(){return J(this,null,function*(){this.wallet&&(this.imageSrc=V.getWalletImage(this.wallet),!this.imageSrc&&(this.imageLoading=!0,this.imageSrc=yield V.fetchWalletImage(this.wallet.image_id),this.imageLoading=!1))})}sendImpressionEvent(){!this.wallet||this.isImpressed||(this.isImpressed=!0,W.sendWalletImpressionEvent({name:this.wallet.name,walletRank:this.wallet.order,explorerId:this.explorerId,view:g.state.view,query:this.walletQuery,certified:this.certified,displayIndex:this.displayIndex}))}};Q.styles=Xr;te([p()],Q.prototype,"visible",void 0);te([p()],Q.prototype,"imageSrc",void 0);te([p()],Q.prototype,"imageLoading",void 0);te([p()],Q.prototype,"isImpressed",void 0);te([u()],Q.prototype,"explorerId",void 0);te([u()],Q.prototype,"walletQuery",void 0);te([u()],Q.prototype,"certified",void 0);te([u()],Q.prototype,"displayIndex",void 0);te([u({type:Object})],Q.prototype,"wallet",void 0);Q=te([d("w3m-all-wallets-list-item")],Q);var Zr=y` 1126 wui-grid { 1127 max-height: clamp(360px, 400px, 80vh); 1128 overflow: scroll; 1129 scrollbar-width: none; 1130 grid-auto-rows: min-content; 1131 grid-template-columns: repeat(auto-fill, 104px); 1132 } 1133 1134 :host([data-mobile-fullscreen='true']) wui-grid { 1135 max-height: none; 1136 } 1137 1138 @media (max-width: 350px) { 1139 wui-grid { 1140 grid-template-columns: repeat(2, 1fr); 1141 } 1142 } 1143 1144 wui-grid[data-scroll='false'] { 1145 overflow: hidden; 1146 } 1147 1148 wui-grid::-webkit-scrollbar {
1149 display: none; 1150 } 1151 1152 w3m-all-wallets-list-item { 1153 opacity: 0; 1154 animation-duration: ${({durations:t})=>t.xl}; 1155 animation-timing-function: ${({easings:t})=>t["ease-inout-power-2"]}; 1156 animation-name: fade-in; 1157 animation-fill-mode: forwards; 1158 } 1159 1160 @keyframes fade-in { 1161 from { 1162 opacity: 0; 1163 } 1164 to { 1165 opacity: 1; 1166 } 1167 } 1168 1169 wui-loading-spinner { 1170 padding-top: ${({spacing:t})=>t[4]}; 1171 padding-bottom: ${({spacing:t})=>t[4]}; 1172 justify-content: center; 1173 grid-column: 1 / span 4; 1174 } 1175`;var Xe=function(t,e,o,r){var n=arguments.length,i=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,o):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,o,r);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(i=(n<3?s(i):n>3?s(e,o,i):s(e,o))||i);return n>3&&i&&Object.defineProperty(e,o,i),i},ei="local-paginator",ve=class extends f{constructor(){super(),this.unsubscribe=[],this.paginationObserver=void 0,this.loading=!S.state.wallets.length,this.wallets=S.state.wallets,this.mobileFullScreen=B.state.enableMobileFullScreen,this.unsubscribe.push(S.subscribeKey("wallets",e=>this.wallets=e))}firstUpdated(){this.initialFetch(),this.createPaginationObserver()}disconnectedCallback(){this.unsubscribe.forEach(e=>e()),this.paginationObserver?.disconnect()}render(){return this.mobileFullScreen&&this.setAttribute("data-mobile-fullscreen","true"),c` 1176 <wui-grid 1177 data-scroll=${!this.loading} 1178 .padding=${["0","3","3","3"]} 1179 gap="2" 1180 justifyContent="space-between" 1181 > 1182 ${this.loading?this.shimmerTemplate(16):this.walletsTemplate()} 1183 ${this.paginationLoaderTemplate()} 1184 </wui-grid> 1185 `}initialFetch(){return J(this,null,function*(){this.loading=!0;let e=this.shadowRoot?.querySelector("wui-grid");e&&(yield S.fetchWalletsByPage({page:1}),yield 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,o){return[...Array(e)].map(()=>c` 1186 <wui-card-select-loader type="wallet" id=${v(o)}></wui-card-select-loader> 1187 `)}walletsTemplate(){return Ue.getWalletConnectWallets(this.wallets).map((e,o)=>c` 1188 <w3m-all-wallets-list-item 1189 data-testid="wallet-search-item-${e.id}" 1190 @click=${()=>this.onConnectWallet(e)} 1191 .wallet=${e} 1192 explorerId=${e.id} 1193 certified=${this.badge==="certified"} 1194 displayIndex=${o} 1195 ></w3m-all-wallets-list-item> 1196 `)}paginationLoaderTemplate(){let{wallets:e,recommended:o,featured:r,count:n,mobileFilteredOutWalletsLength:i}=S.state,s=window.innerWidth<352?3:4,l=e.length+o.length,h=Math.ceil(l/s)*s-l+s;return h-=e.length?r.length%s:0,n===0&&r.length>0?null:n===0||[...r,...e,...o].length<n-(i??0)?this.shimmerTemplate(h,ei):null}createPaginationObserver(){let e=this.shadowRoot?.querySelector(`#${ei}`);e&&(this.paginationObserver=new IntersectionObserver(([o])=>{if(o?.isIntersecting&&!this.loading){let{page:r,count:n,wallets:i}=S.state;i.length<n&&S.fetchWalletsByPage({page:r+1})}}),this.paginationObserver.observe(e))}onConnectWallet(e){U.selectWalletConnector(e)}};ve.styles=Zr;Xe([p()],ve.prototype,"loading",void 0);Xe([p()],ve.prototype,"wallets",void 0);Xe([p()],ve.prototype,"badge",void 0);Xe([p()],ve.prototype,"mobileFullScreen",void 0);ve=Xe([d("w3m-all-wallets-list")],ve);var ti=it` 1197 wui-grid, 1198 wui-loading-spinner, 1199 wui-flex { 1200 height: 360px; 1201 } 1202 1203 wui-grid { 1204 overflow: scroll; 1205 scrollbar-width: none; 1206 grid-auto-rows: min-content; 1207 grid-template-columns: repeat(auto-fill, 104px); 1208 } 1209 1210 :host([data-mobile-fullscreen='true']) wui-grid { 1211 max-height: none; 1212 height: auto; 1213 } 1214 1215 wui-grid[data-scroll='false'] { 1216 overflow: hidden; 1217 } 1218 1219 wui-grid::-webkit-scrollbar {
1220 display: none; 1221 } 1222 1223 wui-loading-spinner { 1224 justify-content: center; 1225 align-items: center; 1226 } 1227 1228 @media (max-width: 350px) { 1229 wui-grid { 1230 grid-template-columns: repeat(2, 1fr); 1231 } 1232 } 1233`;var Ze=function(t,e,o,r){var n=arguments.length,i=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,o):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,o,r);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(i=(n<3?s(i):n>3?s(e,o,i):s(e,o))||i);return n>3&&i&&Object.defineProperty(e,o,i),i},$e=class extends f{constructor(){super(...arguments),this.prevQuery="",this.prevBadge=void 0,this.loading=!0,this.mobileFullScreen=B.state.enableMobileFullScreen,this.query=""}render(){return this.mobileFullScreen&&this.setAttribute("data-mobile-fullscreen","true"),this.onSearch(),this.loading?c`<wui-loading-spinner color="accent-primary"></wui-loading-spinner>`:this.walletsTemplate()}onSearch(){return J(this,null,function*(){(this.query.trim()!==this.prevQuery.trim()||this.badge!==this.prevBadge)&&(this.prevQuery=this.query,this.prevBadge=this.badge,this.loading=!0,yield S.searchWallet({search:this.query,badge:this.badge}),this.loading=!1)})}walletsTemplate(){let{search:e}=S.state,o=Ue.markWalletsAsInstalled(e),r=Ue.filterWalletsByWcSupport(o);return r.length?c` 1234 <wui-grid 1235 data-testid="wallet-list" 1236 .padding=${["0","3","3","3"]} 1237 rowGap="4" 1238 columngap="2" 1239 justifyContent="space-between" 1240 > 1241 ${r.map((n,i)=>c` 1242 <w3m-all-wallets-list-item 1243 @click=${()=>this.onConnectWallet(n)} 1244 .wallet=${n} 1245 data-testid="wallet-search-item-${n.id}" 1246 explorerId=${n.id} 1247 certified=${this.badge==="certified"} 1248 walletQuery=${this.query} 1249 displayIndex=${i} 1250 ></w3m-all-wallets-list-item> 1251 `)} 1252 </wui-grid> 1253 `:c` 1254 <wui-flex 1255 data-testid="no-wallet-found" 1256 justifyContent="center" 1257 alignItems="center" 1258 gap="3" 1259 flexDirection="column" 1260 > 1261 <wui-icon-box size="lg" color="default" icon="wallet"></wui-icon-box> 1262 <wui-text data-testid="no-wallet-found-text" color="secondary" variant="md-medium"> 1263 No Wallet found 1264 </wui-text> 1265 </wui-flex> 1266 `}onConnectWallet(e){U.selectWalletConnector(e)}};$e.styles=ti;Ze([p()],$e.prototype,"loading",void 0);Ze([p()],$e.prototype,"mobileFullScreen",void 0);Ze([u()],$e.prototype,"query",void 0);Ze([u()],$e.prototype,"badge",void 0);$e=Ze([d("w3m-all-wallets-search")],$e);var ao=function(t,e,o,r){var n=arguments.length,i=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,o):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,o,r);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(i=(n<3?s(i):n>3?s(e,o,i):s(e,o))||i);return n>3&&i&&Object.defineProperty(e,o,i),i},At=class extends f{constructor(){super(...arguments),this.search="",this.badge=void 0,this.onDebouncedSearch=b.debounce(e=>{this.search=e})}render(){let e=this.search.length>=2;return c` 1267 <wui-flex .padding=${["1","3","3","3"]} gap="2" alignItems="center"> 1268 <wui-search-bar @inputChange=${this.onInputChange.bind(this)}></wui-search-bar> 1269 <wui-certified-switch 1270 ?checked=${this.badge==="certified"} 1271 @certifiedSwitchChange=${this.onCertifiedSwitchChange.bind(this)} 1272 data-testid="wui-certified-switch" 1273 ></wui-certified-switch> 1274 ${this.qrButtonTemplate()} 1275 </wui-flex> 1276 ${e||this.badge?c`<w3m-all-wallets-search 1277 query=${this.search} 1278 .badge=${this.badge} 1279 ></w3m-all-wallets-search>`:c`<w3m-all-wallets-list .badge=${this.badge}></w3m-all-wallets-list>`} 1280 `}onInputChange(e){this.onDebouncedSearch(e.detail)}onCertifiedSwitchChange(e){e.detail?(this.badge="certified",se.showSvg("Only WalletConnect certified",{icon:"walletConnectBrown",iconColor:"accent-100"})):this.badge=void 0}qrButtonTemplate(){return b.isMobile()?c` 1281 <wui-icon-box 1282 size="xl" 1283 iconSize="xl" 1284 color="accent-primary" 1285 icon="qrCode" 1286 border 1287 borderColor="wui-accent-glass-010" 1288 @click=${this.onWalletConnectQr.bind(this)} 1289 ></wui-icon-box> 1290 `:null}onWalletConnectQr(){g.push("ConnectingWalletConnect")}};ao([p()],At.prototype,"search",void 0);ao([p()],At.prototype,"badge",void 0);At=ao([d("w3m-all-wallets-view")],At);var cn=function(t,e,o,r){var n=arguments.length,i=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,o):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,o,r);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(i=(n<3?s(i):n>3?s(e,o,i):s(e,o))||i);return n>3&&i&&Object.defineProperty(e,o,i),i},oi=class extends f{constructor(){super(...arguments),this.wallet=g.state.data?.wallet}
1290render(){if(!this.wallet)throw new Error("w3m-downloads-view");return c` 1291 <wui-flex gap="2" flexDirection="column" .padding=${["3","3","4","3"]}> 1292 ${this.chromeTemplate()} ${this.iosTemplate()} ${this.androidTemplate()} 1293 ${this.homepageTemplate()} 1294 </wui-flex> 1295 `}chromeTemplate(){return this.wallet?.chrome_store?c`<wui-list-item 1296 variant="icon" 1297 icon="chromeStore" 1298 iconVariant="square" 1299 @click=${this.onChromeStore.bind(this)} 1300 chevron 1301 > 1302 <wui-text variant="md-medium" color="primary">Chrome Extension</wui-text> 1303 </wui-list-item>`:null}iosTemplate(){return this.wallet?.app_store?c`<wui-list-item 1304 variant="icon" 1305 icon="appStore" 1306 iconVariant="square" 1307 @click=${this.onAppStore.bind(this)} 1308 chevron 1309 > 1310 <wui-text variant="md-medium" color="primary">iOS App</wui-text> 1311 </wui-list-item>`:null}androidTemplate(){return this.wallet?.play_store?c`<wui-list-item 1312 variant="icon" 1313 icon="playStore" 1314 iconVariant="square" 1315 @click=${this.onPlayStore.bind(this)} 1316 chevron 1317 > 1318 <wui-text variant="md-medium" color="primary">Android App</wui-text> 1319 </wui-list-item>`:null}homepageTemplate(){return this.wallet?.homepage?c` 1320 <wui-list-item 1321 variant="icon" 1322 icon="browser" 1323 iconVariant="square-blue" 1324 @click=${this.onHomePage.bind(this)} 1325 chevron 1326 > 1327 <wui-text variant="md-medium" color="primary">Website</wui-text> 1328 </wui-list-item> 1329 `:null}openStore(e){e.href&&this.wallet&&(W.sendEvent({type:"track",event:"GET_WALLET",properties:{name:this.wallet.name,walletRank:this.wallet.order,explorerId:this.wallet.id,type:e.type}}),b.openHref(e.href,"_blank"))}onChromeStore(){this.wallet?.chrome_store&&this.openStore({href:this.wallet.chrome_store,type:"chrome_store"})}onAppStore(){this.wallet?.app_store&&this.openStore({href:this.wallet.app_store,type:"app_store"})}onPlayStore(){this.wallet?.play_store&&this.openStore({href:this.wallet.play_store,type:"play_store"})}onHomePage(){this.wallet?.homepage&&this.openStore({href:this.wallet.homepage,type:"homepage"})}};oi=cn([d("w3m-downloads-view")],oi);export{At as W3mAllWalletsView,Ct as W3mConnectingWcBasicView,oi as W3mDownloadsView};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.