1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6898],{6898:(e,t,r)=>{"use strict";let o;r.r(t),r.d(t,{W3mAllWalletsView:()=>rx,W3mConnectingWcBasicView:()=>t_,W3mDownloadsView:()=>rk});var i=r(49509),n=r(87589),a=r(79445),s=r(75348),l=r(5874),c=r(41239),d=r(27567);r(42485);var u=r(40677),h=r(45691),p=r(35937),f=r(22338),g=r(55571),w=r(75863);r(18862);var m=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a};let b=class extends i.WF{constructor(){super(),this.unsubscribe=[],this.tabIdx=void 0,this.connectors=p.a.state.connectors,this.count=l.N.state.count,this.filteredCount=l.N.state.filteredWallets.length,this.isFetchingRecommendedWallets=l.N.state.isFetchingRecommendedWallets,this.unsubscribe.push(p.a.subscribeKey("connectors",e=>this.connectors=e),l.N.subscribeKey("count",e=>this.count=e),l.N.subscribeKey("filteredWallets",e=>this.filteredCount=e.length),l.N.subscribeKey("isFetchingRecommendedWallets",e=>this.isFetchingRecommendedWallets=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){let e=this.connectors.find(e=>"walletConnect"===e.id),{allWallets:t}=s.H.state;if(!e||"HIDE"===t||"ONLY_MOBILE"===t&&!a.w.isMobile())return null;let r=l.N.state.featured.length,o=this.count+r,n=o<10?o:10*Math.floor(o/10),c=this.filteredCount>0?this.filteredCount:n,d=`${c}`;this.filteredCount>0?d=`${this.filteredCount}`:c<o&&(d=`${c}+`);let p=f.x.hasAnyConnection(h.o.CONNECTOR_ID.WALLET_CONNECT);return(0,i.qy)` 2 <wui-list-wallet 3 name="Search Wallet" 4 walletIcon="search" 5 showAllWallets 6 @click=${this.onAllWallets.bind(this)} 7 tagLabel=${d} 8 tagVariant="info" 9 data-testid="all-wallets" 10 tabIdx=${(0,u.J)(this.tabIdx)} 11 .loading=${this.isFetchingRecommendedWallets} 12 ?disabled=${p} 13 size="sm" 14 ></wui-list-wallet> 15 `}onAllWallets(){g.E.sendEvent({type:"track",event:"CLICK_ALL_WALLETS"}),w.I.push("AllWallets",{redirectView:w.I.state.data?.redirectView})}};m([(0,n.MZ)()],b.prototype,"tabIdx",void 0),m([(0,n.wk)()],b.prototype,"connectors",void 0),m([(0,n.wk)()],b.prototype,"count",void 0),m([(0,n.wk)()],b.prototype,"filteredCount",void 0),m([(0,n.wk)()],b.prototype,"isFetchingRecommendedWallets",void 0),b=m([(0,d.EM)("w3m-all-wallets-widget")],b);var y=r(81378),v=r(42186),x=r(4061),$=r(63755);let C=(0,d.AH)` 16 :host { 17 margin-top: ${({spacing:e})=>e["1"]}; 18 } 19 wui-separator { 20 margin: ${({spacing:e})=>e["3"]} calc(${({spacing:e})=>e["3"]} * -1) 21 ${({spacing:e})=>e["2"]} calc(${({spacing:e})=>e["3"]} * -1); 22 width: calc(100% + ${({spacing:e})=>e["3"]} * 2); 23 } 24`;var E=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a};let k=class extends i.WF{constructor(){super(),this.unsubscribe=[],this.connectors=p.a.state.connectors,this.recommended=l.N.state.recommended,this.featured=l.N.state.featured,this.explorerWallets=l.N.state.explorerWallets,this.connections=f.x.state.connections,this.connectorImages=y.j.state.connectorImages,this.loadingTelegram=!1,this.unsubscribe.push(p.a.subscribeKey("connectors",e=>this.connectors=e),f.x.subscribeKey("connections",e=>this.connections=e),y.j.subscribeKey("connectorImages",e=>this.connectorImages=e),l.N.subscribeKey("recommended",e=>this.recommended=e),l.N.subscribeKey("featured",e=>this.featured=e),l.N.subscribeKey("explorerFilteredWallets",e=>{this.explorerWallets=e?.length?e:l.N.state.explorerWallets}),l.N.subscribeKey("explorerWallets",e=>{this.explorerWallets?.length||(this.explorerWallets=e)})),a.w.isTelegram()&&a.w.isIos()&&(this.loadingTelegram=!f.x.state.wcUri,this.unsubscribe.push(f.x.subscribeKey("wcUri",e=>this.loadingTelegram=!e)))}
24disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return(0,i.qy)` 25 <wui-flex flexDirection="column" gap="2"> ${this.connectorListTemplate()} </wui-flex> 26 `}mapConnectorsToExplorerWallets(e,t){return e.map(e=>{if("MULTI_CHAIN"===e.type&&e.connectors){let r=e.connectors.map(e=>e.id),o=e.connectors.map(e=>e.name),i=e.connectors.map(e=>e.info?.rdns);return e.explorerWallet=t?.find(e=>r.includes(e.id)||o.includes(e.name)||e.rdns&&(i.includes(e.rdns)||r.includes(e.rdns)))??e.explorerWallet,e}let r=t?.find(t=>t.id===e.id||t.rdns===e.info?.rdns||t.name===e.name);return e.explorerWallet=r??e.explorerWallet,e})}processConnectorsByType(e,t=!0){let r=$.g.sortConnectorsByExplorerWallet([...e]);return t?r.filter($.g.showConnector):r}connectorListTemplate(){let e=this.mapConnectorsToExplorerWallets(this.connectors,this.explorerWallets??[]),t=$.g.getConnectorsByType(e,this.recommended,this.featured),r=this.processConnectorsByType(t.announced.filter(e=>"walletConnect"!==e.id)),o=this.processConnectorsByType(t.injected),i=this.processConnectorsByType(t.multiChain.filter(e=>"WalletConnect"!==e.name),!1),n=t.custom,s=t.recent,l=this.processConnectorsByType(t.external.filter(e=>e.id!==h.o.CONNECTOR_ID.COINBASE_SDK)),c=t.recommended,d=t.featured,u=$.g.getConnectorTypeOrder({custom:n,recent:s,announced:r,injected:o,multiChain:i,recommended:c,featured:d,external:l}),p=this.connectors.find(e=>"walletConnect"===e.id),f=a.w.isMobile(),g=[];for(let e of u)switch(e){case"walletConnect":!f&&p&&g.push({kind:"connector",subtype:"walletConnect",connector:p});break;case"recent":$.g.getFilteredRecentWallets().forEach(e=>g.push({kind:"wallet",subtype:"recent",wallet:e}));break;case"injected":i.forEach(e=>g.push({kind:"connector",subtype:"multiChain",connector:e})),r.forEach(e=>g.push({kind:"connector",subtype:"announced",connector:e})),o.forEach(e=>g.push({kind:"connector",subtype:"injected",connector:e}));break;case"featured":d.forEach(e=>g.push({kind:"wallet",subtype:"featured",wallet:e}));break;case"custom":$.g.getFilteredCustomWallets(n??[]).forEach(e=>g.push({kind:"wallet",subtype:"custom",wallet:e}));break;case"external":l.forEach(e=>g.push({kind:"connector",subtype:"external",connector:e}));break;case"recommended":$.g.getCappedRecommendedWallets(c).forEach(e=>g.push({kind:"wallet",subtype:"recommended",wallet:e}));break;default:console.warn(`Unknown connector type: ${e}`)}return g.map((e,t)=>"connector"===e.kind?this.renderConnector(e,t):this.renderWallet(e,t))}renderConnector(e,t){let r,o,n=e.connector,a=v.$.getConnectorImage(n)||this.connectorImages[n?.imageId??""],s=(this.connections.get(n.chain)??[]).some(e=>x.y.isLowerCaseMatch(e.connectorId,n.id));"multiChain"===e.subtype?(r="multichain",o="info"):"walletConnect"===e.subtype?(r="qr code",o="accent"):"injected"===e.subtype||"announced"===e.subtype?(r=s?"connected":"installed",o=s?"info":"success"):(r=void 0,o=void 0);let l=f.x.hasAnyConnection(h.o.CONNECTOR_ID.WALLET_CONNECT),c=("walletConnect"===e.subtype||"external"===e.subtype)&&l;return(0,i.qy)` 27 <w3m-list-wallet 28 displayIndex=${t} 29 imageSrc=${(0,u.J)(a)} 30 .installed=${!0} 31 name=${n.name??"Unknown"} 32 .tagVariant=${o} 33 tagLabel=${(0,u.J)(r)} 34 data-testid=${`wallet-selector-${n.id.toLowerCase()}`} 35 size="sm" 36 @click=${()=>this.onClickConnector(e)} 37 tabIdx=${(0,u.J)(this.tabIdx)} 38 ?disabled=${c} 39 rdnsId=${(0,u.J)(n.explorerWallet?.rdns||void 0)} 40 walletRank=${(0,u.J)(n.explorerWallet?.order)} 41 > 42 </w3m-list-wallet> 43 `}onClickConnector(e){let t=w.I.state.data?.redirectView;if("walletConnect"===e.subtype){p.a.setActiveConnector(e.connector),a.w.isMobile()?w.I.push("AllWallets"):w.I.push("ConnectingWalletConnect",{redirectView:t});return}if("multiChain"===e.subtype){p.a.setActiveConnector(e.connector),w.I.push("ConnectingMultiChain",{redirectView:t});return}if("injected"===e.subtype){p.a.setActiveConnector(e.connector),w.I.push("ConnectingExternal",{connector:e.connector,redirectView:t,wallet:e.connector.explorerWallet});return}if("announced"===e.subtype)return"walletConnect"===e.connector.id?void(a.w.isMobile()?w.I.push("AllWallets"):w.I.push("ConnectingWalletConnect",{redirectView:t}
43)):(w.I.push("ConnectingExternal",{connector:e.connector,redirectView:t,wallet:e.connector.explorerWallet}),void 0);w.I.push("ConnectingExternal",{connector:e.connector,redirectView:t})}renderWallet(e,t){let r=e.wallet,o=v.$.getWalletImage(r),n=f.x.hasAnyConnection(h.o.CONNECTOR_ID.WALLET_CONNECT),a=this.loadingTelegram,s="recent"===e.subtype?"recent":void 0,l="recent"===e.subtype?"info":void 0;return(0,i.qy)` 44 <w3m-list-wallet 45 displayIndex=${t} 46 imageSrc=${(0,u.J)(o)} 47 name=${r.name??"Unknown"} 48 @click=${()=>this.onClickWallet(e)} 49 size="sm" 50 data-testid=${`wallet-selector-${r.id}`} 51 tabIdx=${(0,u.J)(this.tabIdx)} 52 ?loading=${a} 53 ?disabled=${n} 54 rdnsId=${(0,u.J)(r.rdns||void 0)} 55 walletRank=${(0,u.J)(r.order)} 56 tagLabel=${(0,u.J)(s)} 57 .tagVariant=${l} 58 > 59 </w3m-list-wallet> 60 `}onClickWallet(e){let t=w.I.state.data?.redirectView;if("featured"===e.subtype)return void p.a.selectWalletConnector(e.wallet);if("recent"===e.subtype){if(this.loadingTelegram)return;p.a.selectWalletConnector(e.wallet);return}if("custom"===e.subtype){if(this.loadingTelegram)return;w.I.push("ConnectingWalletConnect",{wallet:e.wallet,redirectView:t});return}if(this.loadingTelegram)return;let r=p.a.getConnector({id:e.wallet.id,rdns:e.wallet.rdns});r?w.I.push("ConnectingExternal",{connector:r,redirectView:t}):w.I.push("ConnectingWalletConnect",{wallet:e.wallet,redirectView:t})}};k.styles=C,E([(0,n.MZ)({type:Number})],k.prototype,"tabIdx",void 0),E([(0,n.wk)()],k.prototype,"connectors",void 0),E([(0,n.wk)()],k.prototype,"recommended",void 0),E([(0,n.wk)()],k.prototype,"featured",void 0),E([(0,n.wk)()],k.prototype,"explorerWallets",void 0),E([(0,n.wk)()],k.prototype,"connections",void 0),E([(0,n.wk)()],k.prototype,"connectorImages",void 0),E([(0,n.wk)()],k.prototype,"loadingTelegram",void 0),k=E([(0,d.EM)("w3m-connector-list")],k);var R=r(40204),T=r(51971),N=r(74400),I=r(25467),O=r(94515);let P=(e,t,r)=>JSON.stringify(e,(e,r)=>{let o="bigint"==typeof r?r.toString():r;return"function"==typeof t?t(e,o):o},r),M="2.51.3",A={getDocsUrl:({docsBaseUrl:e,docsPath:t="",docsSlug:r})=>t?`${e??"https://viem.sh"}${t}${r?`#${r}`:""}`:void 0,version:`viem@${M}`};class S extends Error{constructor(e,t={}){const r=t.cause instanceof S?t.cause.details:t.cause?.message?t.cause.message:t.details,o=t.cause instanceof S&&t.cause.docsPath||t.docsPath,i=A.getDocsUrl?.({...t,docsPath:o});super([e||"An error occurred.","",...t.metaMessages?[...t.metaMessages,""]:[],...i?[`Docs: ${i}`]:[],...r?[`Details: ${r}`]:[],...A.version?[`Version: ${A.version}`]:[]].join("\n"),t.cause?{cause:t.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.details=r,this.docsPath=o,this.metaMessages=t.metaMessages,this.name=t.name??this.name,this.shortMessage=e,this.version=M}walk(e){return function e(t,r){return r?.(t)?t:t&&"object"==typeof t&&"cause"in t&&void 0!==t.cause?e(t.cause,r):r?null:t}(this,e)}}function j(e){if(e?.reason)return e.reason;if("function"==typeof DOMException)return new DOMException("This operation was aborted","AbortError");let t=Error("This operation was aborted");return t.name="AbortError",t}function W(e){return"object"==typeof e&&null!==e&&"name"in e&&"AbortError"===e.name}let L=e=>{try{let t=new URL(e);if(!t.username&&!t.password)return e;return t.username="",t.password="",t.toString()}catch{return e}};class _ extends S{constructor({body:e,cause:t,details:r,headers:o,status:i,url:n}){super("HTTP request failed.",{cause:t,details:r,metaMessages:[i&&`Status: ${i}`,`URL: ${L(n)}`,e&&`Request body: ${P(e)}
60`].filter(Boolean),name:"HttpRequestError"}),Object.defineProperty(this,"body",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"headers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.body=e,this.headers=o,this.status=i,this.url=n}}class q extends S{constructor({body:e,error:t,url:r}){super("RPC Request failed.",{cause:t,details:t.message,metaMessages:[`URL: ${L(r)}`,`Request body: ${P(e)}`],name:"RpcRequestError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=t.code,this.data=t.data,this.url=r}}class B extends S{constructor({body:e,url:t}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${L(t)}`,`Request body: ${P(e)}`],name:"TimeoutError"}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.url=t}}class D extends S{constructor(){super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.",{docsPath:"/docs/clients/intro",name:"UrlRequiredError"})}}let U=new Map,z={current:0,take(){return this.current++},reset(){this.current=0}};class F extends S{constructor(e,{code:t,docsPath:r,metaMessages:o,name:i,shortMessage:n}){super(n,{cause:e,docsPath:r,metaMessages:o||e?.metaMessages,name:i||"RpcError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=i||e.name,this.code=e instanceof q?e.code:t??-1}}class H extends F{constructor(e,t){super(e,t),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=t.data}}class Z extends F{constructor(e){super(e,{code:Z.code,name:"ParseRpcError",shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."})}}Object.defineProperty(Z,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700});class J extends F{constructor(e){super(e,{code:J.code,name:"InvalidRequestRpcError",shortMessage:"JSON is not a valid request object."})}}Object.defineProperty(J,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600});class K extends F{constructor(e,{method:t}={}){super(e,{code:K.code,name:"MethodNotFoundRpcError",shortMessage:`The method${t?` "${t}"`:""} does not exist / is not available.`})}}Object.defineProperty(K,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601});class V extends F{constructor(e){super(e,{code:V.code,name:"InvalidParamsRpcError",shortMessage:"Invalid parameters were provided to the RPC method.\nDouble check you have provided the correct parameters."})}}Object.defineProperty(V,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602});class Y extends F{constructor(e){super(e,{code:Y.code,name:"InternalRpcError",shortMessage:"An internal error was received."})}}Object.defineProperty(Y,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603});class G extends F{constructor(e){super(e,{code:G.code,name:"InvalidInputRpcError",shortMessage:"Missing or invalid parameters.\nDouble check you have provided the correct parameters."})}}Object.defineProperty(G,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});class Q extends F{constructor(e){super(e,{code:Q.code,name:"ResourceNotFoundRpcError",shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}}Object.defineProperty(Q,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});class X extends F{constructor(e){super(e,{code:X.code,name:"ResourceUnavailableRpcError",shortMessage:"Requested resource not available."})}}Object.defineProperty(X,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});class ee extends F{constructor(e){super(e,{code:ee.code,name:"TransactionRejectedRpcError",shortMessage:"Transaction creation failed."})}}Object.defineProperty(ee,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});class et extends F{constructor(e,{method:t}={}){super(e,{code:et.code,name:"MethodNotSupportedRpcError",shortMessage:`Method${t?` "${t}"`:""} is not supported.`})}}Object.defineProperty(et,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});class er extends F{constructor(e){super(e,{code:er.code,name:"LimitExceededRpcError",shortMessage:"Request exceeds defined limit."})}}Object.defineProperty(er,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});class eo extends F{constructor(e){super(e,{code:eo.code,name:"JsonRpcVersionUnsupportedError",shortMessage:"Version of JSON-RPC protocol is not supported."})}}Object.defineProperty(eo,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});class ei extends H{constructor(e){super(e,{code:ei.code,name:"UserRejectedRequestError",shortMessage:"User rejected the request."})}}Object.defineProperty(ei,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});class en extends H{constructor(e){super(e,{code:en.code,name:"UnauthorizedProviderError",shortMessage:"The requested method and/or account has not been authorized by the user."})}}Object.defineProperty(en,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});class ea extends H{constructor(e,{method:t}={}){super(e,{code:ea.code,name:"UnsupportedProviderMethodError",shortMessage:`The Provider does not support the requested method${t?` " ${t}"`:""}.`})}}Object.defineProperty(ea,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});class es extends H{constructor(e){super(e,{code:es.code,name:"ProviderDisconnectedError",shortMessage:"The Provider is disconnected from all chains."})}}Object.defineProperty(es,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});class el extends H{constructor(e){super(e,{code:el.code,name:"ChainDisconnectedError",shortMessage:"The Provider is not connected to the requested chain."})}}Object.defineProperty(el,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});
60class ec extends H{constructor(e){super(e,{code:ec.code,name:"SwitchChainError",shortMessage:"An error occurred when attempting to switch chain."})}}Object.defineProperty(ec,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902});class ed extends H{constructor(e){super(e,{code:ed.code,name:"UnsupportedNonOptionalCapabilityError",shortMessage:"This Wallet does not support a capability that was not marked as optional."})}}Object.defineProperty(ed,"code",{enumerable:!0,configurable:!0,writable:!0,value:5700});class eu extends H{constructor(e){super(e,{code:eu.code,name:"UnsupportedChainIdError",shortMessage:"This Wallet does not support the requested chain ID."})}}Object.defineProperty(eu,"code",{enumerable:!0,configurable:!0,writable:!0,value:5710});class eh extends H{constructor(e){super(e,{code:eh.code,name:"DuplicateIdError",shortMessage:"There is already a bundle submitted with this ID."})}}Object.defineProperty(eh,"code",{enumerable:!0,configurable:!0,writable:!0,value:5720});class ep extends H{constructor(e){super(e,{code:ep.code,name:"UnknownBundleIdError",shortMessage:"This bundle id is unknown / has not been submitted"})}}Object.defineProperty(ep,"code",{enumerable:!0,configurable:!0,writable:!0,value:5730});class ef extends H{constructor(e){super(e,{code:ef.code,name:"BundleTooLargeError",shortMessage:"The call bundle is too large for the Wallet to process."})}}Object.defineProperty(ef,"code",{enumerable:!0,configurable:!0,writable:!0,value:5740});class eg extends H{constructor(e){super(e,{code:eg.code,name:"AtomicReadyWalletRejectedUpgradeError",shortMessage:"The Wallet can support atomicity after an upgrade, but the user rejected the upgrade."})}}Object.defineProperty(eg,"code",{enumerable:!0,configurable:!0,writable:!0,value:5750});class ew extends H{constructor(e){super(e,{code:ew.code,name:"AtomicityNotSupportedError",shortMessage:"The wallet does not support atomic execution but the request requires it."})}}Object.defineProperty(ew,"code",{enumerable:!0,configurable:!0,writable:!0,value:5760});class em extends H{constructor(e){super(e,{code:em.code,name:"WalletConnectSessionSettlementError",shortMessage:"WalletConnect session settlement failed."})}}Object.defineProperty(em,"code",{enumerable:!0,configurable:!0,writable:!0,value:7e3});class eb extends F{constructor(e){super(e,{name:"UnknownRpcError",shortMessage:"An unknown RPC error occurred."})}}class ey extends Map{constructor(e){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=e}get(e){let t=super.get(e);return super.has(e)&&(super.delete(e),super.set(e,t)),t}set(e,t){if(super.has(e)&&super.delete(e),super.set(e,t),this.maxSize&&this.size>this.maxSize){let e=super.keys().next().value;void 0!==e&&super.delete(e)}return this}}let ev=new ey(8192);async function ex(e,{signal:t}={}){return new Promise((r,o)=>{if(t?.aborted)return void o(j(t));let i=()=>t?.removeEventListener("abort",a),n=setTimeout(()=>{i(),r()},e),a=()=>{clearTimeout(n),i(),o(j(t))};t?.addEventListener("abort",a,{once:!0})})}let e$=256;function eC({key:e,methods:t,name:r,request:i,retryCount:n=3,retryDelay:a=150,timeout:s,type:l},c){return{config:{key:e,methods:t,name:r,request:i,retryCount:n,retryDelay:a,timeout:s,type:l},request:function(e,t={}){return async(r,o={})=>{let{dedupe:i=!1,methods:n,retryDelay:a=150,retryCount:s=3,signal:l,uid:c}={...t,...o},{method:d}=r;if(n?.exclude?.includes(d)||n?.include&&!n.include.includes(d))throw new et(Error("method not supported"),{method:d});if(l?.aborted)throw j(l);let u=i?function(e,t=0){let r=0xdeadbeef^t,o=0x41c6ce57^t;for(let t=0;t<e.length;t++){let i=e.charCodeAt(t);r=Math.imul(r^i,0x9e3779b1),o=Math.imul(o^i,0x5f356495)}return r=Math.imul(r^r>>>16,0x85ebca6b)^Math.imul(o^o>>>16,0xc2b2ae35),(0x100000000*(2097151&(o=Math.imul(o^o>>>16,0x85ebca6b)^Math.imul(r^r>>>16,0xc2b2ae35)))+(r>>>0)).toString(36)}(`${c}.${P(r)}`):void 0;return function(e,{enabled:t=!0,id:r}){if(!t||!r)return e();if(ev.get(r))return ev.get(r);let o=e().finally(()=>ev.delete(r));return ev.set(r,o),o}(()=>(function(e,{delay:t=100,retryCount:r=2,shouldRetry:o=()=>!0,signal:i}={}){return new Promise((n,a)=>{let s=async({count:l=0}={})=>
60{if(i?.aborted)return void a(j(i));let c=async({error:e})=>{let r="function"==typeof t?t({count:l,error:e}):t;if(r)try{await ex(r,{signal:i})}catch(e){a(e);return}s({count:l+1})};try{let t=await e();n(t)}catch(e){if(i?.aborted)return void a(j(i));if(W(e))return void a(e);if(l<r&&await o({count:l,error:e}))return c({error:e});a(e)}};s()})})(async()=>{try{return await e(r,l?{signal:l}:void 0)}catch(e){if(l?.aborted)throw j(l);if(W(e))throw e;switch(e.code){case Z.code:throw new Z(e);case J.code:throw new J(e);case K.code:throw new K(e,{method:r.method});case V.code:throw new V(e);case Y.code:throw new Y(e);case G.code:throw new G(e);case Q.code:throw new Q(e);case X.code:throw new X(e);case ee.code:throw new ee(e);case et.code:throw new et(e,{method:r.method});case er.code:throw new er(e);case eo.code:throw new eo(e);case ei.code:throw new ei(e);case en.code:throw new en(e);case ea.code:throw new ea(e);case es.code:throw new es(e);case el.code:throw new el(e);case ec.code:throw new ec(e);case ed.code:throw new ed(e);case eu.code:throw new eu(e);case eh.code:throw new eh(e);case ep.code:throw new ep(e);case ef.code:throw new ef(e);case eg.code:throw new eg(e);case ew.code:throw new ew(e);case 5e3:throw new ei(e);case em.code:throw new em(e);default:if(e instanceof S)throw e;throw new eb(e)}}},{delay:({count:e,error:t})=>{if(t&&t instanceof _){let e=t?.headers?.get("Retry-After");if(e?.match(/\d/))return 1e3*Number.parseInt(e,10)}return~~(1<<e)*a},retryCount:s,signal:l,shouldRetry:({error:e})=>{var t;return!W(t=e)&&("code"in t&&"number"==typeof t.code?-1===t.code||t.code===er.code||t.code===Y.code||429===t.code:!(t instanceof _)||!t.status||403===t.status||408===t.status||413===t.status||429===t.status||500===t.status||502===t.status||503===t.status||504===t.status||!1)}}),{enabled:i,id:u})}}(i,{methods:t,retryCount:n,retryDelay:a,uid:function(e=11){if(!o||e$+e>512){o="",e$=0;for(let e=0;e<256;e++)o+=(256+256*Math.random()|0).toString(16).substring(1)}return o.substring(e$,e$+++e)}()}),value:c}}let eE=0,ek=new WeakMap;function eR(e,t={}){let{batch:r,fetchFn:o,fetchOptions:i,key:n="http",methods:a,name:s="HTTP JSON-RPC",onFetchRequest:l,onFetchResponse:c,retryDelay:d,raw:u}=t;return({chain:h,retryCount:p,timeout:f})=>{let{batchSize:g=1e3,wait:w=0}="object"==typeof r?r:{},m=t.retryCount??p,b=f??t.timeout??1e4,y=e||h?.rpcUrls.default.http[0];if(!y)throw new D;let v=function(e,t={}){let{url:r,headers:o}=function(e){try{let t=new URL(e),r=(()=>{if(t.username){let e=`${decodeURIComponent(t.username)}:${decodeURIComponent(t.password)}`;return t.username="",t.password="",{url:t.toString(),headers:{Authorization:`Basic ${btoa(e)}`}}}})();return{url:t.toString(),...r}}catch{return{url:e}}}(e);return{async request(e){let{body:i,fetchFn:n=t.fetchFn??fetch,onRequest:a=t.onRequest,onResponse:s=t.onResponse,timeout:l=t.timeout??1e4}=e,c={...t.fetchOptions??{},...e.fetchOptions??{}},{headers:d,method:u,signal:h}=c;try{let e,t=await function(e,{errorInstance:t=Error("timed out"),timeout:r,signal:o}){return new Promise((i,n)=>{(async()=>{let a,s=new AbortController;try{r>0&&(a=setTimeout(()=>{o?s.abort():n(t)},r)),i(await e({signal:s?.signal||null}))}catch(e){if(s?.signal.aborted&&W(e))return void n(t);n(e)}finally{clearTimeout(a)}})()})}(async({signal:e})=>{let t={...c,body:Array.isArray(i)?P(i.map(e=>({jsonrpc:"2.0",id:e.id??z.take(),...e}))):P({jsonrpc:"2.0",id:i.id??z.take(),...i}),headers:{...o,"Content-Type":"application/json",...d},method:u||"POST",signal:h||(l>0?e:null)},s=new Request(r,t),p=await a?.(s,t)??{...t,url:r};return await n(p.url??r,p)},{errorInstance:new B({body:i,url:r}),timeout:l,signal:!0});if(s&&await s(t),t.headers.get("Content-Type")?.startsWith("application/json"))e=await t.json();else{e=await t.text();try{e=JSON.parse(e||"{}")}catch(r){if(t.ok)throw r;e={error:e}}}if(!t.ok){if("number"==typeof e.error?.code&&"string"==typeof e.error?.message)return e;throw new _({body:i,details:P(e.error)||t.statusText,headers:t.headers,status:t.status,url:r})}return e}catch(e){if(h?.aborted)throw j(h);if(W(e)||e instanceof _||e instanceof B)throw e;throw new _({body:i,cause:e,url:r})}}}}(y,{fetchFn:o,fetchOptions:i,onRequest:l,onResponse:c,timeout:b});return eC({key:n,methods:a,name:s,async request({method:e,params:t},o){let i={method:e,params:t},n=o?.signal?{signal:o.signal}:void 0,{schedule:a}=function({fn:e,id:t,shouldSplitBatch:r,wait:o=0,sort:i}){let n=async()=>{let t=s();a();let r=t.map(({args:e})=>e);0!==r.length&&e(r).then(e=>{i&&Array.isArray(e)&&e.sort(i);for(let r=0;r<t.length;r++){let{resolve:o}=t[r];o?.([e[r],e])}}).catch(e=>{for(let r=0;r<t.length;r++){let{reject:o}=t[r];o?.(e)}})},a=()=>U.delete(t),s=()=>U.get(t)||[],l=e=>U.set(t,[...s(),e]);return{flush:a,async schedule(e){let t,i,{promise:a,resolve:c,reject:d}=(t=()=>void 0,i=()=>void 0,{promise:new Promise((e,r)=>{t=e,i=r}),resolve:t,reject:i});return(r?.([...s().map(({args:e})=>e),e])&&n(),s().length>0)?l({args:e,resolve:c,reject:d}):(l({args:e,resolve:c,reject:d}),setTimeout(n,o)),a}}}({id:`${y}.${function(e){if(!e)return"default";let t=ek.get(e);if(void 0!==t)return t;let r=eE++;return ek.set(e,r),r}(o?.signal)}`,wait:w,shouldSplitBatch:e=>e.length>g,fn:e=>v.request({body:e,fetchOptions:n}),sort:(e,t)=>e.id-t.id}),s=async e=>r?a(e):[await v.request({body:e,fetchOptions:n})],[{error:l,result:c}]=await s(i);if(u)return{error:l,result:c};if(l)throw new q({body:i,error:l,url:y});return c},retryCount:m,retryDelay:d,timeout:b,type:"http"},{fetchOptions:i,url:y})}}let eT={ether:-9,wei:9};function eN(e,t="wei"){return function(e,t){let r=e.toString(),o=r.startsWith("-");o&&(r=r.slice(1));let[i,n]=[(r=r.padStart(t,"0")).slice(0,r.length-t),r.slice(r.length-t)];return n=n.replace(/(0+)$/,""),`${o?"-":""}${i||"0"}${n?`.${n}`:""}`}(e,eT[t])}class eI extends S{constructor({cause:e,message:t}={}){const r=t?.replace("execution reverted: ","")?.replace("execution reverted","");super(`Execution reverted ${r?`with reason: ${r}`:"for an unknown reason"}.`,{cause:e,name:"ExecutionRevertedError"})}}Object.defineProperty(eI,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(eI,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted|gas required exceeds allowance/});class eO extends S{constructor({cause:e,maxFeePerGas:t}={}){super(`The fee cap (\`maxFeePerGas\`${t?` = ${eN(t)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:e,name:"FeeCapTooHighError"})}}Object.defineProperty(eO,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/});class eP extends S{constructor({cause:e,maxFeePerGas:t}={}){super(`The fee cap (\`maxFeePerGas\`${t?` = ${eN(t)}`:""} gwei) cannot be lower than the block base fee.`,{cause:e,name:"FeeCapTooLowError"})}}Object.defineProperty(eP,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/});class eM extends S{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}is higher than the next one expected.`,{cause:e,name:"NonceTooHighError"})}}Object.defineProperty(eM,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class eA extends S{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}is lower than the current nonce of the account.
61Try increasing the nonce or find the latest nonce with \`getTransactionCount\`.`,{cause:e,name:"NonceTooLowError"})}}Object.defineProperty(eA,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});class eS extends S{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}exceeds the maximum allowed nonce.`,{cause:e,name:"NonceMaxValueError"})}}Object.defineProperty(eS,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});class ej extends S{constructor({cause:e}={}){super("The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account.",{cause:e,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."],name:"InsufficientFundsError"})}}Object.defineProperty(ej,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds|exceeds transaction sender account balance/});class eW extends S{constructor({cause:e,gas:t}={}){super(`The amount of gas ${t?`(${t}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:e,name:"IntrinsicGasTooHighError"})}}Object.defineProperty(eW,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});class eL extends S{constructor({cause:e,gas:t}={}){super(`The amount of gas ${t?`(${t}) `:""}provided for the transaction is too low.`,{cause:e,name:"IntrinsicGasTooLowError"})}}Object.defineProperty(eL,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});class e_ extends S{constructor({cause:e}){super("The transaction type is not supported for this chain.",{cause:e,name:"TransactionTypeNotSupportedError"})}}Object.defineProperty(e_,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});class eq extends S{constructor({cause:e,maxPriorityFeePerGas:t,maxFeePerGas:r}={}){super(`The provided tip (\`maxPriorityFeePerGas\`${t?` = ${eN(t)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${r?` = ${eN(r)} gwei`:""}).`,{cause:e,name:"TipAboveFeeCapError"})}}function eB(e,t={}){let{key:r="fallback",name:o="Fallback",rank:i=!1,shouldThrow:n=eD,retryCount:a,retryDelay:s}=t;return({chain:t,pollingInterval:l=4e3,timeout:c,...d})=>{let u=e,h=()=>{},p=eC({key:r,name:o,async request({method:e,params:r}){let o,i=async(a=0)=>{let s=u[a]({...d,chain:t,retryCount:0,timeout:c});try{let t=await s.request({method:e,params:r});return h({method:e,params:r,response:t,transport:s,status:"success"}),t}catch(l){if(h({error:l,method:e,params:r,transport:s,status:"error"}),n(l)||a===u.length-1||!(o??=u.slice(a+1).some(r=>{let{include:o,exclude:i}=r({chain:t}).config.methods||{};return o?o.includes(e):!i||!i.includes(e)})))throw l;return i(a+1)}};return i()},retryCount:a,retryDelay:s,type:"fallback"},{onResponse:e=>h=e,transports:u.map(e=>e({chain:t,retryCount:0}))});if(i){let e="object"==typeof i?i:{};!function({chain:e,interval:t=4e3,onTransports:r,ping:o,sampleCount:i=10,timeout:n=1e3,transports:a,weights:s={}}){let{stability:l=.7,latency:c=.3}=s,d=[],u=async()=>{let s=await Promise.all(a.map(async t=>{let r,i,a=t({chain:e,retryCount:0,timeout:n}),s=Date.now();try{await (o?o({transport:a}):a.request({method:"net_listening"})),i=1}catch{i=0}finally{r=Date.now()}return{latency:r-s,success:i}}));d.push(s),d.length>i&&d.shift();let h=Math.max(...d.map(e=>Math.max(...e.map(({latency:e})=>e))));r(a.map((e,t)=>{let r=d.map(e=>e[t].latency),o=r.reduce((e,t)=>e+t,0)/r.length,i=d.map(e=>e[t].success),n=i.reduce((e,t)=>e+t,0)/i.length;return 0===n?[0,t]:[c*(1-o/h)+l*n,t]}).sort((e,t)=>t[0]-e[0]).map(([,e])=>a[e])),await ex(t),u()};u()}({chain:t,interval:e.interval??l,onTransports:e=>
61u=e,ping:e.ping,sampleCount:e.sampleCount,timeout:e.timeout,transports:u,weights:e.weights})}return p}}function eD(e){return!!("code"in e&&"number"==typeof e.code&&(e.code===ee.code||e.code===ei.code||e.code===em.code||eI.nodeMessage.test(e.message)||5e3===e.code))}Object.defineProperty(eq,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});var eU=r(78225);h.o.CONNECTOR_ID.COINBASE,h.o.CONNECTOR_ID.COINBASE_SDK,h.o.CONNECTOR_ID.SAFE,h.o.CONNECTOR_ID.LEDGER,h.o.CONNECTOR_ID.OKX,eU.o.METMASK_CONNECTOR_NAME,eU.o.TRUST_CONNECTOR_NAME,eU.o.SOLFLARE_CONNECTOR_NAME,eU.o.PHANTOM_CONNECTOR_NAME,eU.o.COIN98_CONNECTOR_NAME,eU.o.MAGIC_EDEN_CONNECTOR_NAME,eU.o.BACKPACK_CONNECTOR_NAME,eU.o.BITGET_CONNECTOR_NAME,eU.o.FRONTIER_CONNECTOR_NAME,eU.o.XVERSE_CONNECTOR_NAME,eU.o.LEATHER_CONNECTOR_NAME,eU.o.OKX_CONNECTOR_NAME;let ez={1:"ba0ba0cd-17c6-4806-ad93-f9d174f17900",42161:"3bff954d-5cb0-47a0-9a23-d20192e74600",43114:"30c46e53-e989-45fb-4549-be3bd4eb3b00",56:"93564157-2e8e-4ce7-81df-b264dbee9b00",250:"06b26297-fe0c-4733-5d6b-ffa5498aac00",10:"ab9c186a-c52f-464b-2906-ca59d760a400",137:"41d04d42-da3b-4453-8506-668cc0727900",5e3:"e86fae9b-b770-4eea-e520-150e12c81100",295:"6a97d510-cac8-4e58-c7ce-e8681b044c00",0xaa36a7:"e909ea0a-f92a-4512-c8fc-748044ea6800",84532:"a18a7ecd-e307-4360-4746-283182228e00",1301:"4eeea7ef-0014-4649-5d1d-07271a80f600",130:"2257980a-3463-48c6-cbac-a42d2a956e00",10143:"0a728e83-bacb-46db-7844-948f05434900",100:"02b53f6a-e3d4-479e-1cb4-21178987d100",9001:"f926ff41-260d-4028-635e-91913fc28e00",324:"b310f07f-4ef7-49f3-7073-2a0a39685800",314:"5a73b3dd-af74-424e-cae0-0de859ee9400",4689:"34e68754-e536-40da-c153-6ef2e7188a00",1088:"3897a66d-40b9-4833-162f-a2c90531c900",1284:"161038da-44ae-4ec7-1208-0ea569454b00",1285:"f1d73bb6-5450-4e18-38f7-fb6484264a00",7777777:"845c60df-d429-4991-e687-91ae45791600",42220:"ab781bbc-ccc6-418d-d32d-789b15da1f00",8453:"7289c336-3981-4081-c5f4-efc26ac64a00",0x4e454152:"3ff73439-a619-4894-9262-4470c773a100",2020:"b8101fc0-9c19-4b6f-ec65-f6dfff106e00",2021:"b8101fc0-9c19-4b6f-ec65-f6dfff106e00",80094:"e329c2c9-59b0-4a02-83e4-212ff3779900",2741:"fc2427d1-5af9-4a9c-8da5-6f94627cd900","5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp":"a1b58899-f671-4276-6a5e-56ca5bd59700","4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z":"a1b58899-f671-4276-6a5e-56ca5bd59700",EtWTRABZaYq6iMfeYKouRu166VU2xqa1:"a1b58899-f671-4276-6a5e-56ca5bd59700","000000000019d6689c085ae165831e93":"0b4838db-0161-4ffe-022d-532bf03dba00","000000000933ea01ad0ee984209779ba":"39354064-d79b-420b-065d-f980c4b78200","00000008819873e925422c1ff0f99f7c":"b3406e4a-bbfc-44fb-e3a6-89673c78b700"};function eF(e,t){let r=new URL("https://rpc.walletconnect.org/v1/");return r.searchParams.set("chainId",e),r.searchParams.set("projectId",t),r.toString()}h.o.CONNECTOR_ID.COINBASE,h.o.CONNECTOR_ID.COINBASE_SDK,h.o.CONNECTOR_ID.SAFE,h.o.CONNECTOR_ID.LEDGER,h.o.CONNECTOR_ID.WALLET_CONNECT,h.o.CONNECTOR_ID.INJECTED,h.o.CONNECTOR_ID.INJECTED,h.o.CONNECTOR_ID.WALLET_CONNECT,h.o.CONNECTOR_ID.COINBASE,h.o.CONNECTOR_ID.COINBASE_SDK,h.o.CONNECTOR_ID.LEDGER,h.o.CONNECTOR_ID.SAFE,h.o.CONNECTOR_ID.INJECTED,h.o.CONNECTOR_ID.WALLET_CONNECT,h.o.CONNECTOR_ID.EIP6963,h.o.CONNECTOR_ID.AUTH,eU.o.CONNECTOR_TYPE_AUTH;let eH=["near:mainnet","solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp","eip155:1101","eip155:56","eip155:42161","eip155:7777777","eip155:59144","eip155:324","solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1","eip155:5000","solana:4sgjmw1sunhzsxgspuhpqldx6wiyjntz","eip155:80084","eip155:5003","eip155:100","eip155:8453","eip155:42220","eip155:1313161555","eip155:17000","eip155:1","eip155:300","eip155:1313161554","eip155:1329","eip155:84532","eip155:421614","eip155:11155111","eip155:8217","eip155:43114","solana:4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z","eip155:999999999","eip155:11155420","eip155:80002","eip155:97","eip155:43113","eip155:137","eip155:10","eip155:1301","eip155:80094","eip155:80069","eip155:560048","eip155:31","eip155:2818","eip155:57054","eip155:911867","eip155:534351","eip155:1112","eip155:534352","eip155:1111","eip155:146","eip155:130","eip155:1284","eip155:30","eip155:2810","bip122:000000000019d6689c085ae165831e93","bip122:000000000933ea01ad0ee984209779ba"],eZ={extendRpcUrlWithProjectId(e,t){let r=!1;try{r="rpc.walletconnect.org"===new URL(e).host}catch(e){r=!1}if(r){let r=new URL(e);return r.searchParams.has("projectId")||r.searchParams.set("projectId",t),r.toString()}return e},isCaipNetwork:e=>"chainNamespace"in e&&"caipNetworkId"in e,getChainNamespace(e){return this.isCaipNetwork(e)?e.chainNamespace:h.o.CHAIN.EVM},getCaipNetworkId(e){return this.isCaipNetwork(e)?e.caipNetworkId:`${h.o.CHAIN.EVM}:${e.id}`},getDefaultRpcUrl(e,t,r){let o=e.rpcUrls?.default?.http?.[0];return eH.includes(t)?eF(t,r):o||""},extendCaipNetwork(e,{customNetworkImageUrls:t,projectId:r,customRpcUrls:o}){let i=this.getChainNamespace(e),n=this.getCaipNetworkId(e),a=e.rpcUrls?.default?.http?.[0],s=this.getDefaultRpcUrl(e,n,r),l=e?.rpcUrls?.chainDefault?.http?.[0]||a,c=o?.[n]?.map(e=>e.url)||[],d=[...c,...s?[s]:[]],u=[...c];return l&&!u.includes(l)&&u.push(l),{...e,chainNamespace:i,caipNetworkId:n,assets:{imageId:ez[e.id],imageUrl:t?.[e.id]},rpcUrls:{...e.rpcUrls,default:{http:d},chainDefault:{http:u}}}},extendCaipNetworks:(e,{customNetworkImageUrls:t,projectId:r,customRpcUrls:o})=>e.map(e=>eZ.extendCaipNetwork(e,{customNetworkImageUrls:t,customRpcUrls:o,projectId:r}
61)),getViemTransport(e,t,r){let o=[];return r?.forEach(e=>{o.push(eR(e.url,e.config))}),eH.includes(e.caipNetworkId)&&o.push(eR(eF(e.caipNetworkId,t),{fetchOptions:{headers:{"Content-Type":"text/plain"}}})),e?.rpcUrls?.default?.http?.forEach(e=>{o.push(eR(e))}),eB(o)},extendWagmiTransports(e,t,r){return eH.includes(e.caipNetworkId)?eB([r,eR(this.getDefaultRpcUrl(e,e.caipNetworkId,t))]):r},getUnsupportedNetwork:e=>({id:e.split(":")[1],caipNetworkId:e,name:h.o.UNSUPPORTED_NETWORK_NAME,chainNamespace:e.split(":")[0],nativeCurrency:{name:"",decimals:0,symbol:""},rpcUrls:{default:{http:[]}}}),getCaipNetworkFromStorage(e){let t=c.i.getActiveCaipNetworkId(),r=T.W.getAllRequestedCaipNetworks(),o=Array.from(T.W.state.chains?.keys()||[]),i=t?.split(":")[0],n=!!i&&o.includes(i),a=r?.find(e=>e.caipNetworkId===t);return n&&!a&&t?this.getUnsupportedNetwork(t):a||e||r?.[0]}};var eJ=r(31318),eK=r(54025);r(59416),r(19908);var eV=r(4942);let eY=(0,eV.AH)` 62 :host { 63 flex: 1; 64 height: 100%; 65 } 66 67 button { 68 width: 100%; 69 height: 100%; 70 display: inline-flex; 71 align-items: center; 72 padding: ${({spacing:e})=>e[1]} ${({spacing:e})=>e[2]}; 73 column-gap: ${({spacing:e})=>e[1]}; 74 color: ${({tokens:e})=>e.theme.textSecondary}; 75 border-radius: ${({borderRadius:e})=>e[20]}; 76 background-color: transparent; 77 transition: background-color ${({durations:e})=>e.lg} 78 ${({easings:e})=>e["ease-out-power-2"]}; 79 will-change: background-color; 80 } 81 82 /* -- Hover & Active states ----------------------------------------------------------- */ 83 button[data-active='true'] { 84 color: ${({tokens:e})=>e.theme.textPrimary}; 85 background-color: ${({tokens:e})=>e.theme.foregroundTertiary}; 86 } 87 88 button:hover:enabled:not([data-active='true']), 89 button:active:enabled:not([data-active='true']) { 90 wui-text, 91 wui-icon { 92 color: ${({tokens:e})=>e.theme.textPrimary}; 93 } 94 } 95`;var eG=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a};let eQ={lg:"lg-regular",md:"md-regular",sm:"sm-regular"},eX={lg:"md",md:"sm",sm:"sm"},e0=class extends i.WF{constructor(){super(...arguments),this.icon="mobile",this.size="md",this.label="",this.active=!1}render(){return(0,i.qy)` 96 <button data-active=${this.active}> 97 ${this.icon?(0,i.qy)`<wui-icon size=${eX[this.size]} name=${this.icon}></wui-icon>`:""} 98 <wui-text variant=${eQ[this.size]}> ${this.label} </wui-text> 99 </button> 100 `}};e0.styles=[eJ.W5,eJ.fD,eY],eG([(0,n.MZ)()],e0.prototype,"icon",void 0),eG([
100(0,n.MZ)()],e0.prototype,"size",void 0),eG([(0,n.MZ)()],e0.prototype,"label",void 0),eG([(0,n.MZ)({type:Boolean})],e0.prototype,"active",void 0),e0=eG([(0,eK.E)("wui-tab-item")],e0);let e1=(0,eV.AH)` 101 :host { 102 display: inline-flex; 103 align-items: center; 104 background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; 105 border-radius: ${({borderRadius:e})=>e[32]}; 106 padding: ${({spacing:e})=>e["01"]}; 107 box-sizing: border-box; 108 } 109 110 :host([data-size='sm']) { 111 height: 26px; 112 } 113 114 :host([data-size='md']) { 115 height: 36px; 116 } 117`;var e3=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a};let e2=class extends i.WF{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,t)=>{let r=t===this.activeTab;return(0,i.qy)` 118 <wui-tab-item 119 @click=${()=>this.onTabClick(t)} 120 icon=${e.icon} 121 size=${this.size} 122 label=${e.label} 123 ?active=${r} 124 data-active=${r} 125 data-testid="tab-${e.label?.toLowerCase()}" 126 ></wui-tab-item> 127 `})}onTabClick(e){this.activeTab=e,this.onTabChange(e)}};e2.styles=[eJ.W5,eJ.fD,e1],e3([(0,n.MZ)({type:Array})],e2.prototype,"tabs",void 0),e3([(0,n.MZ)()],e2.prototype,"onTabChange",void 0),e3([(0,n.MZ)()],e2.prototype,"size",void 0),e3([(0,n.wk)()],e2.prototype,"activeTab",void 0),e2=e3([(0,eK.E)("wui-tabs")],e2);var e5=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a};let e4=class extends i.WF{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(0,i.qy)` 128 <wui-flex justifyContent="center" .padding=${["0","0","4","0"]}> 129 <wui-tabs .tabs=${e} .onTabChange=${this.onTabChange.bind(this)}></wui-tabs> 130 </wui-flex> 131 `}generateTabs(){let e=this.platforms.map(e=>{if("browser"===e)return{label:"Browser",icon:"extension",platform:"browser"};if("mobile"===e)return{label:"Mobile",icon:"mobile",platform:"mobile"};if("qrcode"===e)return{label:"Mobile",icon:"mobile",platform:"qrcode"};if("web"===e)return{label:"Webapp",icon:"browser",platform:"web"};if("desktop"===e)return{label:"Desktop",icon:"desktop",platform:"desktop"};return{label:"Browser",icon:"extension",platform:"unsupported"}});return this.platformTabs=e.map(({platform:e})=>e),e}onTabChange(e){let t=this.platformTabs[e];t&&this.onSelectPlatfrom?.(t)}};e5([(0,n.MZ)({type:Array})],e4.prototype,"platforms",void 0),e5([(0,n.MZ)()],e4.prototype,"onSelectPlatfrom",void 0),e4=e5([(0,d.EM)("w3m-connecting-header")],e4);var e8=r(71303);r(41550);let e6=(0,eV.AH)` 132 :host { 133 width: var(--local-width); 134 } 135 136 button { 137 width: var(--local-width); 138 white-space: nowrap; 139 column-gap: ${({spacing:e})=>e[2]}; 140 transition: 141 scale ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-1"]}, 142 background-color ${({durations:e})=>e.lg} 143 ${({easings:e})=>e["ease-out-power-2"]}, 144 border-radius ${({durations:e})=>e.lg} 145 ${({easings:e})=>e["ease-out-power-1"]}; 146 will-change: scale, background-color, border-radius; 147 cursor: pointer; 148 } 149 150 /* -- Sizes --------------------------------------------------- */ 151 button[data-size='sm'] { 152 border-radius: ${({borderRadius:e})=>e[2]}; 153 padding: 0 ${({spacing:e})=>e[2]}; 154 height: 28px; 155 } 156 157 button[data-size='md'] { 158 border-radius: ${({borderRadius:e})=>e[3]}; 159 padding: 0 ${({spacing:e})=>e[4]}; 160 height: 38px; 161 } 162 163 button[data-size='lg'] { 164 border-radius: ${({borderRadius:e})=>e[4]}; 165 padding: 0 ${({spacing:e})=>e[5]}; 166 height: 48px; 167 } 168 169 /* -- Variants --------------------------------------------------------- */ 170 button[data-variant='accent-primary'] { 171 background-color: ${({tokens:e})=>e.core.backgroundAccentPrimary}; 172 color: ${({tokens:e})=>e.theme.textInvert}; 173 } 174 175 button[data-variant='accent-secondary'] { 176 background-color: ${({tokens:e})=>e.core.foregroundAccent010}; 177 color: ${({tokens:e})=>e.core.textAccentPrimary}; 178 } 179 180 button[data-variant='neutral-primary'] { 181 background-color: ${({tokens:e})=>e.theme.backgroundInvert}; 182 color: ${({tokens:e})=>e.theme.textInvert}; 183 } 184 185 button[data-variant='neutral-secondary'] { 186 background-color: transparent; 187 border: 1px solid ${({tokens:e})=>e.theme.borderSecondary}; 188 color: ${({tokens:e})=>e.theme.textPrimary}; 189 } 190 191 button[data-variant='neutral-tertiary'] { 192 background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; 193 color: ${({tokens:e})=>e.theme.textPrimary}; 194 } 195 196 button[data-variant='error-primary'] { 197 background-color: ${({tokens:e})=>e.core.textError}; 198 color: ${({tokens:e})=>e.theme.textInvert}; 199 } 200 201 button[data-variant='error-secondary'] { 202 background-color: ${({tokens:e})=>e.core.backgroundError}; 203 color: ${({tokens:e})=>e.core.textError}; 204 } 205 206 button[data-variant='shade'] { 207 background: var(--wui-color-gray-glass-002); 208 color: var(--wui-color-fg-200); 209 border: none; 210 box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-005); 211 } 212 213 /* -- Focus states --------------------------------------------------- */ 214 button[data-size='sm']:focus-visible:enabled { 215 border-radius: 28px; 216 } 217 218 button[data-size='md']:focus-visible:enabled { 219 border-radius: 38px; 220 } 221 222 button[data-size='lg']:focus-visible:enabled { 223 border-radius: 48px; 224 } 225 button[data-variant='shade']:focus-visible:enabled { 226 background: var(--wui-color-gray-glass-005); 227 box-shadow: 228 inset 0 0 0 1px var(--wui-color-gray-glass-010), 229 0 0 0 4px var(--wui-color-gray-glass-002); 230 } 231 232 /* -- Hover & Active states ----------------------------------------------------------- */ 233 @media (hover: hover) { 234 button[data-size='sm']:hover:enabled { 235 border-radius: 28px; 236 } 237 238 button[data-size='md']:hover:enabled { 239 border-radius: 38px; 240 } 241 242 button[data-size='lg']:hover:enabled { 243 border-radius: 48px; 244 } 245 246 button[data-variant='shade']:hover:enabled { 247 background: var(--wui-color-gray-glass-002); 248 } 249 250 button[data-variant='shade']:active:enabled { 251 background: var(--wui-color-gray-glass-005); 252 } 253 } 254 255 button[data-size='sm']:active:enabled { 256 border-radius: 28px; 257 } 258 259 button[data-size='md']:active:enabled { 260 border-radius: 38px; 261 } 262 263 button[data-size='lg']:active:enabled { 264 border-radius: 48px; 265 } 266 267 /* -- Disabled states --------------------------------------------------- */ 268 button:disabled { 269 opacity: 0.3; 270 } 271`;var e9=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a};let e7={lg:"lg-regular-mono",md:"md-regular-mono",sm:"sm-regular-mono"},te={lg:"md",md:"md",sm:"sm"},tt=class extends i.WF{constructor(){super(...arguments),this.size="lg",this.disabled=!1,this.fullWidth=!1,this.loading=!1,this.variant="accent-primary"}render(){this.style.cssText=` 272 --local-width: ${this.fullWidth?"100%":"auto"}; 273 `;let e=this.textVariant??e7[this.size];return(0,i.qy)` 274 <button data-variant=${this.variant} data-size=${this.size} ?disabled=${this.disabled}> 275 ${this.loadingTemplate()} 276 <slot name="iconLeft"></slot> 277 <wui-text variant=${e} color="inherit"> 278 <slot></slot> 279 </wui-text> 280 <slot name="iconRight"></slot> 281 </button> 282 `}loadingTemplate(){if(this.loading){let e=te[this.size],t="neutral-primary"===this.variant||"accent-primary"===this.variant?"invert":"primary";return(0,i.qy)`<wui-loading-spinner color=${t} size=${e}></wui-loading-spinner>`}return null}};tt.styles=[eJ.W5,eJ.fD,e6],e9([(0,n.MZ)()],tt.prototype,"size",void 0),e9([(0,n.MZ)({type:Boolean})],tt.prototype,"disabled",void 0),e9([(0,n.MZ)({type:Boolean})],tt.prototype,"fullWidth",void 0),e9([(0,n.MZ)({type:Boolean})],tt.prototype,"loading",void 0),e9([(0,n.MZ)()],tt.prototype,"variant",void 0),e9([(0,n.MZ)()],tt.prototype,"textVariant",void 0),tt=e9([(0,eK.E)("wui-button")],tt),r(75315),r(49225),r(8859);let tr=(0,eV.AH)` 283 :host { 284 display: block; 285 width: 100px; 286 height: 100px; 287 } 288 289 svg { 290 width: 100px; 291 height: 100px; 292 } 293 294 rect { 295 fill: none; 296 stroke: ${e=>e.colors.accent100}; 297 stroke-width: 3px; 298 stroke-linecap: round; 299 animation: dash 1s linear infinite; 300 } 301 302 @keyframes dash { 303 to { 304 stroke-dashoffset: 0px; 305 } 306 } 307`;var to=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a};let ti=class extends i.WF{constructor(){super(...arguments),this.radius=36}render(){return this.svgLoaderTemplate()}svgLoaderTemplate(){let e=this.radius>50?50:this.radius,t=36-e;return(0,i.qy)` 308 <svg viewBox="0 0 110 110" width="110" height="110"> 309 <rect 310 x="2" 311 y="2" 312 width="106" 313 height="106" 314 rx=${e} 315 stroke-dasharray="${116+t} ${245+t}" 316 stroke-dashoffset=${360+1.75*t} 317 /> 318 </svg> 319 `}};ti.styles=[eJ.W5,tr],to([(0,n.MZ)({type:Number})],ti.prototype,"radius",void 0),ti=to([(0,eK.E)("wui-loading-thumbnail")],ti),r(47469),r(10153),r(83677);let tn=(0,eV.AH)` 320 wui-flex { 321 width: 100%; 322 height: 52px; 323 box-sizing: border-box; 324 background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; 325 border-radius: ${({borderRadius:e})=>e[5]}; 326 padding-left: ${({spacing:e})=>e[3]}; 327 padding-right: ${({spacing:e})=>e[3]}; 328 display: flex; 329 align-items: center; 330 justify-content: space-between; 331 gap: ${({spacing:e})=>e[6]}; 332 } 333 334 wui-text { 335 color: ${({tokens:e})=>e.theme.textSecondary}; 336 } 337 338 wui-icon { 339 width: 12px; 340 height: 12px; 341 } 342`;var ta=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a};let ts=class extends i.WF{constructor(){super(...arguments),this.disabled=!1,this.label="",this.buttonLabel=""}render(){return(0,i.qy)` 343 <wui-flex justifyContent="space-between" alignItems="center"> 344 <wui-text variant="lg-regular" color="inherit">${this.label}</wui-text> 345 <wui-button variant="accent-secondary" size="sm"> 346 ${this.buttonLabel} 347 <wui-icon name="chevronRight" color="inherit" size="inherit" slot="iconRight"></wui-icon> 348 </wui-button>
348 349 </wui-flex> 350 `}};ts.styles=[eJ.W5,eJ.fD,tn],ta([(0,n.MZ)({type:Boolean})],ts.prototype,"disabled",void 0),ta([(0,n.MZ)()],ts.prototype,"label",void 0),ta([(0,n.MZ)()],ts.prototype,"buttonLabel",void 0),ts=ta([(0,eK.E)("wui-cta-button")],ts);let tl=(0,d.AH)` 351 :host { 352 display: block; 353 padding: 0 ${({spacing:e})=>e["5"]} ${({spacing:e})=>e["5"]}; 354 } 355`;var tc=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a};let td=class extends i.WF{constructor(){super(...arguments),this.wallet=void 0}render(){if(!this.wallet)return this.style.display="none",null;let{name:e,app_store:t,play_store:r,chrome_store:o,homepage:n}=this.wallet,s=a.w.isMobile(),l=a.w.isIos(),c=a.w.isAndroid(),u=[t,r,n,o].filter(Boolean).length>1,h=d.Zv.getTruncateString({string:e,charsStart:12,charsEnd:0,truncate:"end"});return u&&!s?(0,i.qy)` 356 <wui-cta-button 357 label=${`Don't have ${h}?`} 358 buttonLabel="Get" 359 @click=${()=>w.I.push("Downloads",{wallet:this.wallet})} 360 ></wui-cta-button> 361 `:!u&&n?(0,i.qy)` 362 <wui-cta-button 363 label=${`Don't have ${h}?`} 364 buttonLabel="Get" 365 @click=${this.onHomePage.bind(this)} 366 ></wui-cta-button> 367 `:t&&l?(0,i.qy)` 368 <wui-cta-button 369 label=${`Don't have ${h}?`} 370 buttonLabel="Get" 371 @click=${this.onAppStore.bind(this)} 372 ></wui-cta-button> 373 `:r&&c?(0,i.qy)` 374 <wui-cta-button 375 label=${`Don't have ${h}?`} 376 buttonLabel="Get" 377 @click=${this.onPlayStore.bind(this)} 378 ></wui-cta-button> 379 `:(this.style.display="none",null)}onAppStore(){this.wallet?.app_store&&a.w.openHref(this.wallet.app_store,"_blank")}onPlayStore(){this.wallet?.play_store&&a.w.openHref(this.wallet.play_store,"_blank")}onHomePage(){this.wallet?.homepage&&a.w.openHref(this.wallet.homepage,"_blank")}};td.styles=[tl],tc([(0,n.MZ)({type:Object})],td.prototype,"wallet",void 0),td=tc([(0,d.EM)("w3m-mobile-download-links")],td);let tu=(0,d.AH)` 380 @keyframes shake { 381 0% { 382 transform: translateX(0); 383 } 384 25% { 385 transform: translateX(3px); 386 } 387 50% { 388 transform: translateX(-3px); 389 } 390 75% { 391 transform: translateX(3px); 392 } 393 100% { 394 transform: translateX(0); 395 } 396 } 397 398 wui-flex:first-child:not(:only-child) { 399 position: relative; 400 } 401 402 wui-wallet-image { 403 width: 56px; 404 height: 56px; 405 } 406 407 wui-loading-thumbnail { 408 position: absolute; 409 } 410 411 wui-icon-box { 412 position: absolute; 413 right: calc(${({spacing:e})=>e["1"]} * -1); 414 bottom: calc(${({spacing:e})=>e["1"]} * -1); 415 opacity: 0; 416 transform: scale(0.5); 417 transition-property: opacity, transform; 418 transition-duration: ${({durations:e})=>e.lg}; 419 transition-timing-function: ${({easings:e})=>e["ease-out-power-2"]}; 420 will-change: opacity, transform; 421 } 422 423 wui-text[align='center'] { 424 width: 100%; 425 padding: 0px ${({spacing:e})=>e["4"]}; 426 } 427 428 [data-error='true'] wui-icon-box { 429 opacity: 1; 430 transform: scale(1); 431 } 432 433 [data-error='true'] > wui-flex:first-child { 434 animation: shake 250ms ${({easings:e})=>e["ease-out-power-2"]} both; 435 } 436 437 [data-retry='false'] wui-link { 438 display: none; 439 } 440 441 [data-retry='true'] wui-link { 442 display: block; 443 opacity: 1; 444 } 445 446 w3m-mobile-download-links { 447 padding: 0px; 448 width: 100%; 449 } 450`;var th=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a};class tp extends i.WF{constructor(){super(),this.wallet=w.I.state.data?.wallet,this.connector=w.I.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=f.x.state.wcUri,this.error=f.x.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(f.x.subscribeKey("wcUri",e=>{this.uri=e,this.isRetrying&&this.onRetry&&(this.isRetrying=!1,this.onConnect?.())}),f.x.subscribeKey("wcError",e=>this.error=e)),(a.w.isTelegram()||a.w.isSafari())&&a.w.isIos()&&f.x.state.wcUri&&this.onConnect?.()}firstUpdated(){this.onAutoConnect?.(),this.showRetry=!this.onAutoConnect}
450disconnectedCallback(){this.unsubscribe.forEach(e=>e()),f.x.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,t="";return this.label?t=this.label:(t=`Continue in ${this.name}`,this.error&&(t="Connection declined")),(0,i.qy)` 451 <wui-flex 452 data-error=${(0,u.J)(this.error)} 453 data-retry=${this.showRetry} 454 flexDirection="column" 455 alignItems="center" 456 .padding=${["10","5","5","5"]} 457 gap="6" 458 > 459 <wui-flex gap="2" justifyContent="center" alignItems="center"> 460 <wui-wallet-image size="lg" imageSrc=${(0,u.J)(this.imageSrc)}></wui-wallet-image> 461 462 ${this.error?null:this.loaderTemplate()} 463 464 <wui-icon-box 465 color="error" 466 icon="close" 467 size="sm" 468 border 469 borderColor="wui-color-bg-125" 470 ></wui-icon-box> 471 </wui-flex> 472 473 <wui-flex flexDirection="column" alignItems="center" gap="6"> <wui-flex 474 flexDirection="column" 475 alignItems="center" 476 gap="2" 477 .padding=${["2","0","0","0"]} 478 > 479 <wui-text align="center" variant="lg-medium" color=${this.error?"error":"primary"}> 480 ${t} 481 </wui-text> 482 <wui-text align="center" variant="lg-regular" color="secondary">${e}</wui-text> 483 </wui-flex> 484 485 ${this.secondaryBtnLabel?(0,i.qy)` 486 <wui-button 487 variant="neutral-secondary" 488 size="md" 489 ?disabled=${this.isRetrying||this.isLoading} 490 @click=${this.onTryAgain.bind(this)} 491 data-testid="w3m-connecting-widget-secondary-button" 492 > 493 <wui-icon 494 color="inherit" 495 slot="iconLeft" 496 name=${this.secondaryBtnIcon} 497 ></wui-icon> 498 ${this.secondaryBtnLabel} 499 </wui-button> 500 `:null} 501 </wui-flex> 502 503 ${this.isWalletConnect?(0,i.qy)` 504 <wui-flex .padding=${["0","5","5","5"]} justifyContent="center"> 505 <wui-link 506 @click=${this.onCopyUri} 507 variant="secondary" 508 icon="copy" 509 data-testid="wui-link-copy" 510 > 511 Copy link 512 </wui-link> 513 </wui-flex> 514 `:null} 515 516 <w3m-mobile-download-links .wallet=${this.wallet}></w3m-mobile-download-links></wui-flex> 517 </wui-flex> 518 `}onShowRetry(){if(this.error&&!this.showRetry){this.showRetry=!0;let e=this.shadowRoot?.querySelector("wui-button");e?.animate([{opacity:0},{opacity:1}],{fill:"forwards",easing:"ease"})}}onTryAgain(){f.x.setWcError(!1),this.onRetry?(this.isRetrying=!0,this.onRetry?.()):this.onConnect?.()}loaderTemplate(){let e=e8.W.state.themeVariables["--w3m-border-radius-master"],t=e?parseInt(e.replace("px",""),10):4;return(0,i.qy)`<wui-loading-thumbnail radius=${9*t}></wui-loading-thumbnail>`}onCopyUri(){try{this.uri&&(a.w.copyToClopboard(this.uri),N.P.showSuccess("Link copied"))}catch{N.P.showError("Failed to copy")}}}tp.styles=tu,th([(0,n.wk)()],tp.prototype,"isRetrying",void 0),th([(0,n.wk)()],tp.prototype,"uri",void 0),th([(0,n.wk)()],tp.prototype,"error",void 0),th([(0,n.wk)()],tp.prototype,"ready",void 0),th([(0,n.wk)()],tp.prototype,"showRetry",void 0),th([(0,n.wk)()],tp.prototype,"label",void 0),th([(0,n.wk)()],tp.prototype,"secondaryBtnLabel",void 0),th([(0,n.wk)()],tp.prototype,"secondaryLabel",void 0),th([(0,n.wk)()],tp.prototype,"isLoading",void 0),th([(0,n.MZ)({type:Boolean})],tp.prototype,"isMobile",void 0),th([(0,n.MZ)()],tp.prototype,"onRetry",void 0);let tf=class extends tp{constructor(){if(super(),!this.wallet)throw Error("w3m-connecting-wc-browser: No wallet provided");this.onConnect=this.onConnectProxy.bind(this),this.onAutoConnect=this.onConnectProxy.bind(this),g.E.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"browser",dis
518playIndex:this.wallet?.display_index,walletRank:this.wallet.order,view:w.I.state.view}})}async onConnectProxy(){try{this.error=!1;let{connectors:e}=p.a.state,t=e.find(e=>"ANNOUNCED"===e.type&&e.info?.rdns===this.wallet?.rdns||"INJECTED"===e.type||e.name===this.wallet?.name);if(t)await f.x.connectExternal(t,t.chain);else throw Error("w3m-connecting-wc-browser: No connector found");I.W.close(),g.E.sendEvent({type:"track",event:"CONNECT_SUCCESS",properties:{method:"browser",name:this.wallet?.name||"Unknown",view:w.I.state.view,walletRank:this.wallet?.order}})}catch(e){e instanceof O.A&&e.originalName===R.RQ.PROVIDER_RPC_ERROR_NAME.USER_REJECTED_REQUEST?g.E.sendEvent({type:"track",event:"USER_REJECTED",properties:{message:e.message}}):g.E.sendEvent({type:"track",event:"CONNECT_ERROR",properties:{message:e?.message??"Unknown"}}),this.error=!0}}};tf=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a}([(0,d.EM)("w3m-connecting-wc-browser")],tf);let tg=class extends tp{constructor(){if(super(),!this.wallet)throw Error("w3m-connecting-wc-desktop: No wallet provided");this.onConnect=this.onConnectProxy.bind(this),this.onRender=this.onRenderProxy.bind(this),g.E.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"desktop",displayIndex:this.wallet?.display_index,walletRank:this.wallet.order,view:w.I.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:t}=this.wallet,{redirect:r,href:o}=a.w.formatNativeUrl(e,this.uri);f.x.setWcLinking({name:t,href:o}),f.x.setRecentWallet(this.wallet),a.w.openHref(r,"_blank")}catch{this.error=!0}}};tg=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a}([(0,d.EM)("w3m-connecting-wc-desktop")],tg);var tw=r(96539),tm=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a};let tb=class extends tp{constructor(){if(super(),this.btnLabelTimeout=void 0,this.redirectDeeplink=void 0,this.redirectUniversalLink=void 0,this.target=void 0,this.preferUniversalLinks=s.H.state.experimental_preferUniversalLinks,this.isLoading=!0,this.onConnect=()=>{if(this.wallet?.mobile_link&&this.uri)try{this.error=!1;let{mobile_link:e,link_mode:t,name:r}=this.wallet,{redirect:o,redirectUniversalLink:i,href:n}=a.w.formatNativeUrl(e,this.uri,t);this.redirectDeeplink=o,this.redirectUniversalLink=i,this.target=a.w.isIframe()?"_top":"_self",f.x.setWcLinking({name:r,href:n}),f.x.setRecentWallet(this.wallet),this.preferUniversalLinks&&this.redirectUniversalLink?a.w.openHref(this.redirectUniversalLink,this.target):a.w.openHref(this.redirectDeeplink,this.target)}catch(e){g.E.sendEvent({type:"track",event:"CONNECT_PROXY_ERROR",properties:{message:e instanceof Error?e.message:"Error parsing the deeplink",uri:this.uri,mobile_link:this.wallet.mobile_link,name:this.wallet.name}}),this.error=!0}},!this.wallet)throw Error("w3m-connecting-wc-mobile: No wallet provided");this.secondaryBtnLabel="Open",this.secondaryLabel=tw.oU.CONNECT_LABELS.MOBILE,this.secondaryBtnIcon="externalLink",this.onHandleURI(),this.unsubscribe.push(f.x.subscribeKey("wcUri",()=>{this.onHandleURI()})),g.E.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"mobile",displayIndex:this.wallet?.display_index,walletRank:this.wallet.order,view:w.I.state.view}})}disconnectedCallback(){super.disconnectedCallback(),clearTimeout(this.btnLabelTimeout)}onHandleURI(){this.isLoading=!this.uri,!this.ready&&this.uri&&(this.ready=!0,this.onConnect?.())}onTryAgain(){f.x.setWcError(!1),this.onConnect?.()}};tm([(0,n.wk)()],tb.prototype,"redirectDeeplink",void 0),tm([(0,n.wk)()],tb.prototype,"redirectUniversalLink",void 0),tm([(0,n.wk)()],tb.prototype,"target",void 0),tm([(0,n.wk)()],tb.prototype,"preferUniversalLinks",void 0),tm([(0,n.wk)()],tb.prototype,"isLoading",void 0),tb=tm([(0,d.EM)("w3m-connecting-wc-mobile")],tb),r(79357);var ty=r(54587);function tv(e,t,r){return e!==t&&(e-t<0?t-e:e-t)<=r+.1}let tx={generate({uri:e,size:t,logoSize:r,padding:o=8,dotColor:n="var(--apkt-colors-black)"}){let a,s,l=[],c=(s=Math.sqrt((a=Array.prototype.slice.call(ty.create(e,{errorCorrectionLevel:"Q"}).modules.data,0)).length),a.reduce((e,t,r)=>(r%s==0?e.push([t]):e[e.length-1].push(t))&&e,[])),d=(t-2*o)/c.length,u=[{x:0,y:0},{x:1,y:0},{x:0,y:1}];u.forEach(({x:e,y:t})=>
518{let r=(c.length-7)*d*e+o,a=(c.length-7)*d*t+o;for(let e=0;e<u.length;e+=1){let t=d*(7-2*e);l.push((0,i.JW)` 519 <rect 520 fill=${2===e?"var(--apkt-colors-black)":"var(--apkt-colors-white)"} 521 width=${0===e?t-10:t} 522 rx= ${0===e?(t-10)*.45:.45*t} 523 ry= ${0===e?(t-10)*.45:.45*t} 524 stroke=${n} 525 stroke-width=${10*(0===e)} 526 height=${0===e?t-10:t} 527 x= ${0===e?a+d*e+5:a+d*e} 528 y= ${0===e?r+d*e+5:r+d*e} 529 /> 530 `)}});let h=Math.floor((r+25)/d),p=c.length/2-h/2,f=c.length/2+h/2-1,g=[];c.forEach((e,t)=>{e.forEach((e,r)=>{!c[t][r]||t<7&&r<7||t>c.length-8&&r<7||t<7&&r>c.length-8||t>p&&t<f&&r>p&&r<f||g.push([t*d+d/2+o,r*d+d/2+o])})});let w={};return g.forEach(([e,t])=>{w[e]?w[e]?.push(t):w[e]=[t]}),Object.entries(w).map(([e,t])=>{let r=t.filter(e=>t.every(t=>!tv(e,t,d)));return[Number(e),r]}).forEach(([e,t])=>{t.forEach(t=>{l.push((0,i.JW)`<circle cx=${e} cy=${t} fill=${n} r=${d/2.5} />`)})}),Object.entries(w).filter(([e,t])=>t.length>1).map(([e,t])=>{let r=t.filter(e=>t.some(t=>tv(e,t,d)));return[Number(e),r]}).map(([e,t])=>{t.sort((e,t)=>e<t?-1:1);let r=[];for(let e of t){let t=r.find(t=>t.some(t=>tv(e,t,d)));t?t.push(e):r.push([e])}return[e,r.map(e=>[e[0],e[e.length-1]])]}).forEach(([e,t])=>{t.forEach(([t,r])=>{l.push((0,i.JW)` 531 <line 532 x1=${e} 533 x2=${e} 534 y1=${t} 535 y2=${r} 536 stroke=${n} 537 stroke-width=${d/1.25} 538 stroke-linecap="round" 539 /> 540 `)})}),l}},t$=(0,eV.AH)` 541 :host { 542 position: relative; 543 user-select: none; 544 display: block; 545 overflow: hidden; 546 aspect-ratio: 1 / 1; 547 width: 100%; 548 height: 100%; 549 background-color: ${({colors:e})=>e.white}; 550 border: 1px solid ${({tokens:e})=>e.theme.borderPrimary}; 551 } 552 553 :host { 554 border-radius: ${({borderRadius:e})=>e[4]}; 555 display: flex; 556 align-items: center; 557 justify-content: center; 558 } 559 560 :host([data-clear='true']) > wui-icon { 561 display: none; 562 } 563 564 svg:first-child, 565 wui-image, 566 wui-icon { 567 position: absolute; 568 top: 50%; 569 left: 50%; 570 transform: translateY(-50%) translateX(-50%); 571 background-color: ${({tokens:e})=>e.theme.backgroundPrimary}; 572 box-shadow: inset 0 0 0 4px ${({tokens:e})=>e.theme.backgroundPrimary}; 573 border-radius: ${({borderRadius:e})=>e[6]}; 574 } 575 576 wui-image { 577 width: 25%; 578 height: 25%; 579 border-radius: ${({borderRadius:e})=>e[2]}; 580 } 581 582 wui-icon { 583 width: 100%; 584 height: 100%; 585 color: #3396ff !important; 586 transform: translateY(-50%) translateX(-50%) scale(0.25); 587 } 588 589 wui-icon > svg { 590 width: inherit; 591 height: inherit; 592 } 593`;var tC=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a};let tE=class extends i.WF{constructor(){super(...arguments),this.uri="",this.size=0,this.theme="dark",this.imageSrc=void 0,this.alt=void 0,this.arenaClear=void 0,this.farcaster=void 0}render(){return this.dataset.theme=this.theme,this.dataset.clear=String(this.arenaClear),this.style.cssText=`--local-size: ${this.size}px`,(0,i.qy)`<wui-flex 594 alignItems="center" 595 justifyContent="center" 596 class="wui-qr-code" 597 direction="column" 598 gap="4" 599 width="100%" 600 style="height: 100%" 601 > 602 ${this.templateVisual()} ${this.templateSvg()} 603 </wui-flex>`}templateSvg(){return(0,i.JW)` 604 <svg height=${this.size} width=${this.size}> 605 ${tx.generate({uri:this.uri,size:this.size,logoSize:this.arenaClear?0:this.size/4})} 606 </svg> 607 `}templateVisual(){return this.imageSrc?(0,i.qy)`<wui-image src=${this.imageSrc} alt=${this.alt??"logo"}></wui-image>`:this.farcaster?(0,i.qy)`<wui-icon 608 class="farcaster" 609 size="inherit" 610 color="inherit" 611 name="farcaster" 612 ></wui-icon>`:(0,i.qy)`<wui-icon size="inherit" color="inherit" name="walletConnect"></wui-icon>`}};tE.styles=[eJ.W5,t$],tC([(0,n.MZ)()],tE.prototype,"uri",void 0),tC([(0,n.MZ)({type:Number})],tE.prototype,"size",void 0),tC([(0,n.MZ)()],tE.prototype,"theme",void 0),tC([(0,n.MZ)()],tE.prototype,"imageSrc",void 0),tC([(0,n.MZ)()],tE.prototype,"alt",void 0),tC([(0,n.MZ)({type:Boolean})],tE.prototype,"arenaClear",void 0),tC([(0,n.MZ)({type:Boolean})],tE.prototype,"farcaster",void 0),tE=tC([(0,eK.E)("wui-qr-code")],tE);let tk=(0,eV.AH)` 613 :host { 614 display: block; 615 background: linear-gradient( 616 90deg, 617 ${({tokens:e})=>e.theme.foregroundSecondary} 0%, 618 ${({tokens:e})=>e.theme.foregroundTertiary} 50%, 619 ${({tokens:e})=>e.theme.foregroundSecondary} 100% 620 ); 621 background-size: 200% 100%; 622 animation: shimmer 1s ease-in-out infinite; 623 border-radius: ${({borderRadius:e})=>e[2]}; 624 } 625 626 :host([data-rounded='true']) { 627 border-radius: ${({borderRadius:e})=>e[16]}; 628 } 629 630 @keyframes shimmer { 631 0% { 632 background-position: 200% 0; 633 } 634 100% { 635 background-position: -200% 0; 636 } 637 } 638`;var tR=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a};let tT=class extends i.WF{constructor(){super(...arguments),this.width="",this.height="",this.variant="default",this.rounded=!1}render(){return this.style.cssText=` 639 width: ${this.width}; 640 height: ${this.height}; 641 `,this.dataset.rounded=this.rounded?"true":"false",(0,i.qy)`<slot></slot>`}};tT.styles=[tk],tR([(0,n.MZ)()],tT.prototype,"width",void 0),tR([(0,n.MZ)()],tT.prototype,"height",void 0),tR([(0,n.MZ)()],tT.prototype,"variant",void 0),tR([(0,n.MZ)({type:Boolean})],tT.prototype,"rounded",void 0),tT=tR([(0,eK.E)("wui-shimmer")],tT),r(87624);let tN=(0,d.AH)` 642 wui-shimmer { 643 width: 100%; 644 aspect-ratio: 1 / 1; 645 border-radius: ${({borderRadius:e})=>e[4]}; 646 } 647 648 wui-qr-code { 649 opacity: 0; 650 animation-duration: ${({durations:e})=>e.xl}; 651 animation-timing-function: ${({easings:e})=>e["ease-out-power-2"]}; 652 animation-name: fade-in; 653 animation-fill-mode: forwards; 654 } 655 656 @keyframes fade-in { 657 from { 658 opacity: 0; 659 } 660 to { 661 opacity: 1; 662 } 663 } 664`;var tI=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a};let tO=class extends tp{constructor(){super(),this.basic=!1,this.forceUpdate=()=>{this.requestUpdate()},window.addEventListener("resize",this.forceUpdate)}firstUpdated(){this.basic||g.E.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet?.name??"WalletConnect",platform:"qrcode",dis
664playIndex:this.wallet?.display_index,walletRank:this.wallet?.order,view:w.I.state.view}})}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribe?.forEach(e=>e()),window.removeEventListener("resize",this.forceUpdate)}render(){return this.onRenderProxy(),(0,i.qy)` 665 <wui-flex 666 flexDirection="column" 667 alignItems="center" 668 .padding=${["0","5","5","5"]} 669 gap="5" 670 > 671 <wui-shimmer width="100%"> ${this.qrCodeTemplate()} </wui-shimmer> 672 <wui-text variant="lg-medium" color="primary"> Scan this QR Code with your phone </wui-text> 673 ${this.copyTemplate()} 674 </wui-flex> 675 <w3m-mobile-download-links .wallet=${this.wallet}></w3m-mobile-download-links> 676 `}onRenderProxy(){!this.ready&&this.uri&&(this.timeout=setTimeout(()=>{this.ready=!0},200))}qrCodeTemplate(){if(!this.uri||!this.ready)return null;let e=this.getBoundingClientRect().width-40,t=this.wallet?this.wallet.name:void 0;f.x.setWcLinking(void 0),f.x.setRecentWallet(this.wallet);let r=this.uri;if(this.wallet?.mobile_link){let{redirect:e}=a.w.formatNativeUrl(this.wallet?.mobile_link,this.uri,null);r=e}return(0,i.qy)` <wui-qr-code 677 size=${e} 678 theme=${e8.W.state.themeMode} 679 uri=${r} 680 imageSrc=${(0,u.J)(v.$.getWalletImage(this.wallet))} 681 color=${(0,u.J)(e8.W.state.themeVariables["--w3m-qr-color"])} 682 alt=${(0,u.J)(t)} 683 data-testid="wui-qr-code" 684 ></wui-qr-code>`}copyTemplate(){let e=!this.uri||!this.ready;return(0,i.qy)`<wui-button 685 .disabled=${e} 686 @click=${this.onCopyUri} 687 variant="neutral-secondary" 688 size="sm" 689 data-testid="copy-wc2-uri" 690 > 691 Copy link 692 <wui-icon size="sm" color="inherit" name="copy" slot="iconRight"></wui-icon> 693 </wui-button>`}};tO.styles=tN,tI([(0,n.MZ)({type:Boolean})],tO.prototype,"basic",void 0),tO=tI([(0,d.EM)("w3m-connecting-wc-qrcode")],tO);let tP=class extends i.WF{constructor(){if(super(),this.wallet=w.I.state.data?.wallet,!this.wallet)throw Error("w3m-connecting-wc-unsupported: No wallet provided");g.E.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"browser",displayIndex:this.wallet?.display_index,walletRank:this.wallet?.order,view:w.I.state.view}})}render(){return(0,i.qy)` 694 <wui-flex 695 flexDirection="column" 696 alignItems="center" 697 .padding=${["10","5","5","5"]} 698 gap="5" 699 > 700 <wui-wallet-image 701 size="lg" 702 imageSrc=${(0,u.J)(v.$.getWalletImage(this.wallet))} 703 ></wui-wallet-image> 704 705 <wui-text variant="md-regular" color="primary">Not Detected</wui-text> 706 </wui-flex> 707 708 <w3m-mobile-download-links .wallet=${this.wallet}></w3m-mobile-download-links> 709 `}};tP=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a}([(0,d.EM)("w3m-connecting-wc-unsupported")],tP);var tM=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a};let tA=class extends tp{constructor(){if(super(),this.isLoading=!0,!this.wallet)throw Error("w3m-connecting-wc-web: No wallet provided");this.onConnect=this.onConnectProxy.bind(this),this.secondaryBtnLabel="Open",this.secondaryLabel=tw.oU.CONNECT_LABELS.MOBILE,this.secondaryBtnIcon="externalLink",this.updateLoadingState(),this.unsubscribe.push(f.x.subscribeKey("wcUri",()=>{this.updateLoadingState()})),g.E.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"web",displayIndex:this.wallet?.display_index,walletRank:this.wallet?.order,view:w.I.state.view}})}updateLoadingState(){this.isLoading=!this.uri}onConnectProxy(){if(this.wallet?.webapp_link&&this.uri)try{this.error=!1;let{webapp_link:e,name:t}=this.wallet,{redirect:r,href:o}=a.w.formatUniversalUrl(e,this.uri);f.x.setWcLinking({name:t,href:o}),f.x.setRecentWallet(this.wallet),a.w.openHref(r,"_blank")}catch{this.error=!0}}};tM([(0,n.wk)()],tA.prototype,"isLoading",void 0),tA=tM([(0,d.EM)("w3m-connecting-wc-web")],tA);let tS=(0,d.AH)` 710 :host([data-mobile-fullscreen='true']) { 711 height: 100%; 712 display: flex; 713 flex-direction: column; 714 } 715 716 :host([data-mobile-fullscreen='true']) wui-ux-by-reown { 717 margin-top: auto; 718 } 719`;var tj=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a};let tW=class extends i.WF{constructor(){super(),this.wallet=w.I.state.data?.wallet,this.unsubscribe=[],this.platform=void 0,this.platforms=[],this.isSiwxEnabled=!!s.H.state.siwx,this.remoteFeatures=s.H.state.remoteFeatures,this.displayBranding=!0,this.basic=!1,this.determinePlatforms(),this.initializeConnection(),this.unsubscribe.push(s.H.subscribeKey("remoteFeatures",e=>this.remoteFeatures=e))}
719disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return s.H.state.enableMobileFullScreen&&this.setAttribute("data-mobile-fullscreen","true"),(0,i.qy)` 720 ${this.headerTemplate()} 721 <div class="platform-container">${this.platformTemplate()}</div> 722 ${this.reownBrandingTemplate()} 723 `}reownBrandingTemplate(){return this.remoteFeatures?.reownBranding&&this.displayBranding?(0,i.qy)`<wui-ux-by-reown></wui-ux-by-reown>`:null}async initializeConnection(e=!1){if("browser"!==this.platform&&(!s.H.state.manualWCControl||e))try{let{wcPairingExpiry:t,status:r}=f.x.state,{redirectView:o}=w.I.state.data??{};if(e||s.H.state.enableEmbedded||a.w.isPairingExpired(t)||"connecting"===r){let e=f.x.getConnections(T.W.state.activeChain),t=this.remoteFeatures?.multiWallet,r=e.length>0;await f.x.connectWalletConnect({cache:"never"}),this.isSiwxEnabled||(r&&t?(w.I.replace("ProfileWallets"),N.P.showSuccess("New Wallet Added")):o?w.I.replace(o):I.W.close())}}catch(e){if(e instanceof Error&&e.message.includes("An error occurred when attempting to switch chain")&&!s.H.state.enableNetworkSwitch&&T.W.state.activeChain){T.W.setActiveCaipNetwork(eZ.getUnsupportedNetwork(`${T.W.state.activeChain}:${T.W.state.activeCaipNetwork?.id}`)),T.W.showUnsupportedChainUI();return}e instanceof O.A&&e.originalName===R.RQ.PROVIDER_RPC_ERROR_NAME.USER_REJECTED_REQUEST?g.E.sendEvent({type:"track",event:"USER_REJECTED",properties:{message:e.message}}):g.E.sendEvent({type:"track",event:"CONNECT_ERROR",properties:{message:e?.message??"Unknown"}}),f.x.setWcError(!0),N.P.showError(e.message??"Connection error"),f.x.resetWcConnection(),w.I.goBack()}}determinePlatforms(){if(!this.wallet){this.platforms.push("qrcode"),this.platform="qrcode";return}if(this.platform)return;let{mobile_link:e,desktop_link:t,webapp_link:r,injected:o,rdns:i}=this.wallet,n=o?.map(({injected_id:e})=>
723e).filter(Boolean),l=[...i?[i]:n??[]],c=!s.H.state.isUniversalProvider&&l.length,d=f.x.checkInstalled(l),u=c&&d,h=t&&!a.w.isMobile();u&&!T.W.state.noAdapters&&this.platforms.push("browser"),e&&this.platforms.push(a.w.isMobile()?"mobile":"qrcode"),r&&this.platforms.push("web"),h&&this.platforms.push("desktop"),u||!c||T.W.state.noAdapters||this.platforms.push("unsupported"),this.platform=this.platforms[0]}platformTemplate(){switch(this.platform){case"browser":return(0,i.qy)`<w3m-connecting-wc-browser></w3m-connecting-wc-browser>`;case"web":return(0,i.qy)`<w3m-connecting-wc-web></w3m-connecting-wc-web>`;case"desktop":return(0,i.qy)` 724 <w3m-connecting-wc-desktop .onRetry=${()=>this.initializeConnection(!0)}> 725 </w3m-connecting-wc-desktop> 726 `;case"mobile":return(0,i.qy)` 727 <w3m-connecting-wc-mobile isMobile .onRetry=${()=>this.initializeConnection(!0)}> 728 </w3m-connecting-wc-mobile> 729 `;case"qrcode":return(0,i.qy)`<w3m-connecting-wc-qrcode ?basic=${this.basic}></w3m-connecting-wc-qrcode>`;default:return(0,i.qy)`<w3m-connecting-wc-unsupported></w3m-connecting-wc-unsupported>`}}headerTemplate(){return this.platforms.length>1?(0,i.qy)` 730 <w3m-connecting-header 731 .platforms=${this.platforms} 732 .onSelectPlatfrom=${this.onSelectPlatform.bind(this)} 733 > 734 </w3m-connecting-header> 735 `:null}async onSelectPlatform(e){let t=this.shadowRoot?.querySelector("div");t&&(await t.animate([{opacity:1},{opacity:0}],{duration:200,fill:"forwards",easing:"ease"}).finished,this.platform=e,t.animate([{opacity:0},{opacity:1}],{duration:200,fill:"forwards",easing:"ease"}))}};tW.styles=tS,tj([(0,n.wk)()],tW.prototype,"platform",void 0),tj([(0,n.wk)()],tW.prototype,"platforms",void 0),tj([(0,n.wk)()],tW.prototype,"isSiwxEnabled",void 0),tj([(0,n.wk)()],tW.prototype,"remoteFeatures",void 0),tj([(0,n.MZ)({type:Boolean})],tW.prototype,"displayBranding",void 0),tj([(0,n.MZ)({type:Boolean})],tW.prototype,"basic",void 0),tW=tj([(0,d.EM)("w3m-connecting-wc-view")],tW);var tL=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a};let t_=class extends i.WF{constructor(){super(),this.unsubscribe=[],this.isMobile=a.w.isMobile(),this.remoteFeatures=s.H.state.remoteFeatures,this.unsubscribe.push(s.H.subscribeKey("remoteFeatures",e=>this.remoteFeatures=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){if(this.isMobile){let{featured:e,recommended:t}=l.N.state,{customWallets:r}=s.H.state,o=c.i.getRecentWallets(),n=e.length||t.length||r?.length||o.length;return(0,i.qy)`<wui-flex flexDirection="column" gap="2" .margin=${["1","3","3","3"]}> 736 ${n?(0,i.qy)`<w3m-connector-list></w3m-connector-list>`:null} 737 <w3m-all-wallets-widget></w3m-all-wallets-widget> 738 </wui-flex>`}return(0,i.qy)`<wui-flex flexDirection="column" .padding=${["0","0","4","0"]}> 739 <w3m-connecting-wc-view ?basic=${!0} .displayBranding=${!1}></w3m-connecting-wc-view> 740 <wui-flex flexDirection="column" .padding=${["0","3","0","3"]}> 741 <w3m-all-wallets-widget></w3m-all-wallets-widget> 742 </wui-flex> 743 </wui-flex> 744 ${this.reownBrandingTemplate()} `}reownBrandingTemplate(){return this.remoteFeatures?.reownBranding?(0,i.qy)` <wui-flex flexDirection="column" .padding=${["1","0","1","0"]}> 745 <wui-ux-by-reown></wui-ux-by-reown> 746 </wui-flex>`:null}};tL([(0,n.wk)()],t_.prototype,"isMobile",void 0),tL([(0,n.wk)()],t_.prototype,"remoteFeatures",void 0),t_=tL([(0,d.EM)("w3m-connecting-wc-basic-view")],t_);var tq=r(20707);let{I:tB}=tq.ge;var tD=r(78927);let tU=(e,t)=>{let r=e._$AN;if(void 0===r)return!1;for(let e of r)e._$AO?.(t,!1),tU(e,t);return!0},tz=e=>{let t,r;do{if(void 0===(t=e._$AM))break;(r=t._$AN).delete(e),e=t}while(0===r?.size)},tF=e=>{for(let t;t=e._$AM;e=t){let r=t._$AN;if(void 0===r)t._$AN=r=new Set;else if(r.has(e))break;r.add(e),tJ(t)}};function tH(e){void 0!==this._$AN?(tz(this),this._$AM=e,tF(this)):this._$AM=e}function tZ(e,t=!1,r=0){let o=this._$AH,i=this._$AN;if(void 0!==i&&0!==i.size)if(t)if(Array.isArray(o))for(let e=r;e<o.length;e++)tU(o[e],!1),tz(o[e]);else null!=o&&(tU(o,!1),tz(o));else tU(this,e)}let tJ=e=>{e.type==tD.OA.CHILD&&(e._$AP??=tZ,e._$AQ??=tH)};class tK extends tD.WL{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,t,r){super._$AT(e,t,r),tF(this),this.isConnected=e._$AU}_$AO(e,t=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),t&&(tU(this,e),tz(this))}setValue(e){if(void 0===this._$Ct.strings)this._$Ct._$AI(e,this);else{let t=[...this._$Ct._$AH];t[this._$Ci]=e,this._$Ct._$AI(t,this,0)}}disconnected(){}reconnected(){}}let tV=()=>new tY;class tY{}let tG=new WeakMap,tQ=(0,tD.u$)(class extends tK{render(e){return tq.s6}update(e,[t]){let r=t!==this.G;return r&&void 0!==this.G&&this.rt(void 0),(r||this.lt!==this.ct)&&(this.G=t,this.ht=e.options?.host,this.rt(this.ct=e.element)),tq.s6}rt(e){if(this.isConnected||(e=void 0),"function"==typeof this.G){let t=this.ht??globalThis,r=tG.get(t);void 0===r&&(r=new WeakMap,tG.set(t,r)),void 0!==r.get(this.G)&&this.G.call(this.ht,void 0),r.set(this.G,e),void 0!==e&&this.G.call(this.ht,e)}else this.G.value=e}get lt(){return"function"==typeof this.G?tG.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}}),tX=(0,eV.AH)` 747 :host { 748 display: flex; 749 align-items: center; 750 justify-content: center; 751 } 752 753 label { 754 position: relative; 755 display: inline-block; 756 user-select: none; 757 transition: 758 background-color ${({durations:e})=>e.lg} 759 ${({easings:e})=>e["ease-out-power-2"]}, 760 color ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]}, 761 border ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]}, 762 box-shadow ${({durations:e})=>e.lg} 763 ${({easings:e})=>e["ease-out-power-2"]}, 764 width ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]}, 765 height ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]}, 766 transform ${({durations:e})=>e.lg} 767 ${({easings:e})=>e["ease-out-power-2"]}, 768 opacity ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]}; 769 will-change: background-color, color, border, box-shadow, width, height, transform, opacity; 770 } 771 772 input { 773 width: 0; 774 height: 0; 775 opacity: 0; 776 } 777 778 span { 779 position: absolute; 780 cursor: pointer; 781 top: 0; 782 left: 0; 783 right: 0; 784 bottom: 0; 785 background-color: ${({colors:e})=>e.neutrals300}; 786 border-radius: ${({borderRadius:e})=>e.round}; 787 border: 1px solid transparent; 788 will-change: border; 789 transition: 790 background-color ${({durations:e})=>e.lg} 791 ${({easings:e})=>e["ease-out-power-2"]}, 792 color ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]}, 793 border ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]}, 794 box-shadow ${({durations:e})=>e.lg} 795 ${({easings:e})=>e["ease-out-power-2"]}, 796 width ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]}, 797 height ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]}, 798 transform ${({durations:e})=>e.lg} 799 ${({easings:e})=>e["ease-out-power-2"]}, 800 opacity ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]}; 801 will-change: background-color, color, border, box-shadow, width, height, transform, opacity; 802 } 803 804 span:before { 805 content: ''; 806 position: absolute; 807 background-color: ${({colors:e})=>e.white}; 808 border-radius: 50%; 809 } 810 811 /* -- Sizes --------------------------------------------------------- */ 812 label[data-size='lg'] { 813 width: 48px; 814 height: 32px; 815 } 816 817 label[data-size='md'] { 818 width: 40px; 819 height: 28px; 820 } 821 822 label[data-size='sm'] { 823 width: 32px; 824 height: 22px; 825 } 826 827 label[data-size='lg'] > span:before { 828 height: 24px; 829 width: 24px; 830 left: 4px; 831 top: 3px; 832 } 833 834 label[data-size='md'] > span:before { 835 height: 20px;
836 width: 20px; 837 left: 4px; 838 top: 3px; 839 } 840 841 label[data-size='sm'] > span:before { 842 height: 16px; 843 width: 16px; 844 left: 3px; 845 top: 2px; 846 } 847 848 /* -- Focus states --------------------------------------------------- */ 849 input:focus-visible:not(:checked) + span, 850 input:focus:not(:checked) + span { 851 border: 1px solid ${({tokens:e})=>e.core.iconAccentPrimary}; 852 background-color: ${({tokens:e})=>e.theme.textTertiary}; 853 box-shadow: 0px 0px 0px 4px rgba(9, 136, 240, 0.2); 854 } 855 856 input:focus-visible:checked + span, 857 input:focus:checked + span { 858 border: 1px solid ${({tokens:e})=>e.core.iconAccentPrimary}; 859 box-shadow: 0px 0px 0px 4px rgba(9, 136, 240, 0.2); 860 } 861 862 /* -- Checked states --------------------------------------------------- */ 863 input:checked + span { 864 background-color: ${({tokens:e})=>e.core.iconAccentPrimary}; 865 } 866 867 label[data-size='lg'] > input:checked + span:before { 868 transform: translateX(calc(100% - 9px)); 869 } 870 871 label[data-size='md'] > input:checked + span:before { 872 transform: translateX(calc(100% - 9px)); 873 } 874 875 label[data-size='sm'] > input:checked + span:before { 876 transform: translateX(calc(100% - 7px)); 877 } 878 879 /* -- Hover states ------------------------------------------------------- */ 880 label:hover > input:not(:checked):not(:disabled) + span { 881 background-color: ${({colors:e})=>e.neutrals400}; 882 } 883 884 label:hover > input:checked:not(:disabled) + span { 885 background-color: ${({colors:e})=>e.accent080}; 886 } 887 888 /* -- Disabled state --------------------------------------------------- */ 889 label:has(input:disabled) { 890 pointer-events: none; 891 user-select: none; 892 } 893 894 input:not(:checked):disabled + span { 895 background-color: ${({colors:e})=>e.neutrals700}; 896 } 897 898 input:checked:disabled + span { 899 background-color: ${({colors:e})=>e.neutrals700}; 900 } 901 902 input:not(:checked):disabled + span::before { 903 background-color: ${({colors:e})=>e.neutrals400}; 904 } 905 906 input:checked:disabled + span::before { 907 background-color: ${({tokens:e})=>e.theme.textTertiary}; 908 } 909`;var t0=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a};let t1=class extends i.WF{constructor(){super(...arguments),this.inputElementRef=tV(),this.checked=!1,this.disabled=!1,this.size="md"}render(){return(0,i.qy)` 910 <label data-size=${this.size}> 911 <input 912 ${tQ(this.inputElementRef)} 913 type="checkbox" 914 ?checked=${this.checked} 915 ?disabled=${this.disabled} 916 @change=${this.dispatchChangeEvent.bind(this)} 917 /> 918 <span></span> 919 </label> 920 `}dispatchChangeEvent(){this.dispatchEvent(new CustomEvent("switchChange",{detail:this.inputElementRef.value?.checked,bubbles:!0,composed:!0}))}};t1.styles=[eJ.W5,eJ.fD,tX],t0([(0,n.MZ)({type:Boolean})],t1.prototype,"checked",void 0),t0([(0,n.MZ)({type:Boolean})],t1.prototype,"disabled",void 0),t0([(0,n.MZ)()],t1.prototype,"size",void 0),t1=t0([(0,eK.E)("wui-toggle")],t1);let t3=(0,eV.AH)` 921 :host { 922 height: auto; 923 } 924 925 :host > wui-flex { 926 height: 100%; 927 display: flex; 928 align-items: center; 929 justify-content: center; 930 column-gap: ${({spacing:e})=>e["2"]}; 931 padding: ${({spacing:e})=>e["2"]} ${({spacing:e})=>e["3"]}; 932 background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; 933 border-radius: ${({borderRadius:e})=>e["4"]}; 934 box-shadow: inset 0 0 0 1px ${({tokens:e})=>e.theme.foregroundPrimary}; 935 transition: background-color ${({durations:e})=>e.lg} 936 ${({easings:e})=>e["ease-out-power-2"]}; 937 will-change: background-color; 938 cursor: pointer; 939 } 940 941 wui-switch { 942 pointer-events: none; 943 } 944`;var t2=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a};let t5=class extends i.WF{constructor(){super(...arguments),this.checked=!1}
944render(){return(0,i.qy)` 945 <wui-flex> 946 <wui-icon size="xl" name="walletConnectBrown"></wui-icon> 947 <wui-toggle 948 ?checked=${this.checked} 949 size="sm" 950 @switchChange=${this.handleToggleChange.bind(this)} 951 ></wui-toggle> 952 </wui-flex> 953 `}handleToggleChange(e){e.stopPropagation(),this.checked=e.detail,this.dispatchSwitchEvent()}dispatchSwitchEvent(){this.dispatchEvent(new CustomEvent("certifiedSwitchChange",{detail:this.checked,bubbles:!0,composed:!0}))}};t5.styles=[eJ.W5,eJ.fD,t3],t2([(0,n.MZ)({type:Boolean})],t5.prototype,"checked",void 0),t5=t2([(0,eK.E)("wui-certified-switch")],t5);let t4=(0,eV.AH)` 954 :host { 955 position: relative; 956 width: 100%; 957 display: inline-flex; 958 flex-direction: column; 959 gap: ${({spacing:e})=>e[3]}; 960 color: ${({tokens:e})=>e.theme.textPrimary}; 961 caret-color: ${({tokens:e})=>e.core.textAccentPrimary}; 962 } 963 964 .wui-input-text-container { 965 position: relative; 966 display: flex; 967 } 968 969 input { 970 width: 100%; 971 border-radius: ${({borderRadius:e})=>e[4]}; 972 color: inherit; 973 background: transparent; 974 border: 1px solid ${({tokens:e})=>e.theme.borderPrimary}; 975 caret-color: ${({tokens:e})=>e.core.textAccentPrimary}; 976 padding: ${({spacing:e})=>e[3]} ${({spacing:e})=>e[3]} 977 ${({spacing:e})=>e[3]} ${({spacing:e})=>e[10]}; 978 font-size: ${({textSize:e})=>e.large}; 979 line-height: ${({typography:e})=>e["lg-regular"].lineHeight}; 980 letter-spacing: ${({typography:e})=>e["lg-regular"].letterSpacing}; 981 font-weight: ${({fontWeight:e})=>e.regular}; 982 font-family: ${({fontFamily:e})=>e.regular}; 983 } 984 985 input[data-size='lg'] { 986 padding: ${({spacing:e})=>e[4]} ${({spacing:e})=>e[3]} 987 ${({spacing:e})=>e[4]} ${({spacing:e})=>e[10]}; 988 } 989 990 @media (hover: hover) and (pointer: fine) { 991 input:hover:enabled { 992 border: 1px solid ${({tokens:e})=>e.theme.borderSecondary}; 993 } 994 } 995 996 input:disabled { 997 cursor: unset; 998 border: 1px solid ${({tokens:e})=>e.theme.borderPrimary}; 999 } 1000 1001 input::placeholder { 1002 color: ${({tokens:e})=>e.theme.textSecondary}; 1003 } 1004 1005 input:focus:enabled { 1006 border: 1px solid ${({tokens:e})=>e.theme.borderSecondary}; 1007 background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; 1008 -webkit-box-shadow: 0px 0px 0px 4px ${({tokens:e})=>e.core.foregroundAccent040}; 1009 -moz-box-shadow: 0px 0px 0px 4px ${({tokens:e})=>e.core.foregroundAccent040}; 1010 box-shadow: 0px 0px 0px 4px ${({tokens:e})=>e.core.foregroundAccent040}; 1011 } 1012 1013 div.wui-input-text-container:has(input:disabled) { 1014 opacity: 0.5; 1015 } 1016 1017 wui-icon.wui-input-text-left-icon { 1018 position: absolute; 1019 top: 50%; 1020 transform: translateY(-50%); 1021 pointer-events: none; 1022 left: ${({spacing:e})=>e[4]}; 1023 color: ${({tokens:e})=>e.theme.iconDefault}; 1024 } 1025 1026 button.wui-input-text-submit-button { 1027 position: absolute; 1028 top: 50%; 1029 transform: translateY(-50%); 1030 right: ${({spacing:e})=>e[3]}; 1031 width: 24px; 1032 height: 24px; 1033 border: none; 1034 background: transparent; 1035 border-radius: ${({borderRadius:e})=>e[2]}; 1036 color: ${({tokens:e})=>e.core.textAccentPrimary}; 1037 } 1038 1039 button.wui-input-text-submit-button:disabled { 1040 opacity: 1; 1041 } 1042 1043 button.wui-input-text-submit-button.loading wui-icon { 1044 animation: spin 1s linear infinite; 1045 } 1046 1047 button.wui-input-text-submit-button:hover { 1048 background: ${({tokens:e})=>e.core.foregroundAccent010}; 1049 } 1050 1051 input:has(+ .wui-input-text-submit-button) { 1052 padding-right: ${({spacing:e})=>e[12]}; 1053 } 1054 1055 input[type='number'] { 1056 -moz-appearance: textfield; 1057 } 1058 1059 input[type='search']::-webkit-search-decoration, 1060 input[type='search']::-webkit-search-cancel-button, 1061 input[type='search']::-webkit-search-results-button, 1062 input[type='search']::-webkit-search-results-decoration { 1063 -webkit-appearance: none; 1064 } 1065 1066 /* -- Keyframes --------------------------------------------------- */ 1067 @keyframes spin { 1068 from { 1069 transform: rotate(0deg); 1070 } 1071 to { 1072 transform: rotate(360deg); 1073 } 1074 } 1075`;var t8=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a};let t6=class extends i.WF{constructor(){super(...arguments),this.inputElementRef=tV(),this.disabled=!1,this.loading=!1,this.placeholder="",this.type="text",this.value="",this.size="md"}render(){return(0,i.qy)` <div class="wui-input-text-container"> 1076 ${this.templateLeftIcon()} 1077 <input 1078 data-size=${this.size} 1079 ${tQ(this.inputElementRef)} 1080 data-testid="wui-input-text" 1081 type=${this.type} 1082 enterkeyhint=${(0,u.J)(this.enterKeyHint)} 1083 ?disabled=${this.disabled} 1084 placeholder=${this.placeholder}
1085 @input=${this.dispatchInputChangeEvent.bind(this)} 1086 @keydown=${this.onKeyDown} 1087 .value=${this.value||""} 1088 /> 1089 ${this.templateSubmitButton()} 1090 <slot class="wui-input-text-slot"></slot> 1091 </div> 1092 ${this.templateError()} ${this.templateWarning()}`}templateLeftIcon(){return this.icon?(0,i.qy)`<wui-icon 1093 class="wui-input-text-left-icon" 1094 size="md" 1095 data-size=${this.size} 1096 color="inherit" 1097 name=${this.icon} 1098 ></wui-icon>`:null}templateSubmitButton(){return this.onSubmit?(0,i.qy)`<button 1099 class="wui-input-text-submit-button ${this.loading?"loading":""}" 1100 @click=${this.onSubmit?.bind(this)} 1101 ?disabled=${this.disabled||this.loading} 1102 > 1103 ${this.loading?(0,i.qy)`<wui-icon name="spinner" size="md"></wui-icon>`:(0,i.qy)`<wui-icon name="chevronRight" size="md"></wui-icon>`} 1104 </button>`:null}templateError(){return this.errorText?(0,i.qy)`<wui-text variant="sm-regular" color="error">${this.errorText}</wui-text>`:null}templateWarning(){return this.warningText?(0,i.qy)`<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}))}};t6.styles=[eJ.W5,eJ.fD,t4],t8([(0,n.MZ)()],t6.prototype,"icon",void 0),t8([(0,n.MZ)({type:Boolean})],t6.prototype,"disabled",void 0),t8([(0,n.MZ)({type:Boolean})],t6.prototype,"loading",void 0),t8([(0,n.MZ)()],t6.prototype,"placeholder",void 0),t8([(0,n.MZ)()],t6.prototype,"type",void 0),t8([(0,n.MZ)()],t6.prototype,"value",void 0),t8([(0,n.MZ)()],t6.prototype,"errorText",void 0),t8([(0,n.MZ)()],t6.prototype,"warningText",void 0),t8([(0,n.MZ)()],t6.prototype,"onSubmit",void 0),t8([(0,n.MZ)()],t6.prototype,"size",void 0),t8([(0,n.MZ)({attribute:!1})],t6.prototype,"onKeyDown",void 0),t6=t8([(0,eK.E)("wui-input-text")],t6);let t9=(0,eV.AH)` 1105 :host { 1106 position: relative; 1107 display: inline-block; 1108 width: 100%; 1109 } 1110 1111 wui-icon { 1112 position: absolute; 1113 top: 50%; 1114 transform: translateY(-50%); 1115 right: ${({spacing:e})=>e[3]}; 1116 color: ${({tokens:e})=>e.theme.iconDefault}; 1117 cursor: pointer; 1118 padding: ${({spacing:e})=>e[2]}; 1119 background-color: transparent; 1120 border-radius: ${({borderRadius:e})=>e[4]}; 1121 transition: background-color ${({durations:e})=>e.lg} 1122 ${({easings:e})=>e["ease-out-power-2"]}; 1123 } 1124 1125 @media (hover: hover) { 1126 wui-icon:hover { 1127 background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; 1128 } 1129 } 1130`;var t7=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a};let re=class extends i.WF{constructor(){super(...arguments),this.inputComponentRef=tV(),this.inputValue=""}render(){return(0,i.qy)` 1131 <wui-input-text 1132 ${tQ(this.inputComponentRef)} 1133 placeholder="Search wallet" 1134 icon="search" 1135 type="search" 1136 enterKeyHint="search" 1137 size="sm" 1138 @inputChange=${this.onInputChange} 1139 > 1140 ${this.inputValue?(0,i.qy)`<wui-icon 1141 @click=${this.clearValue} 1142 color="inherit" 1143 size="sm" 1144 name="close" 1145 ></wui-icon>`:null} 1146 </wui-input-text> 1147 `}onInputChange(e){this.inputValue=e.detail||""}clearValue(){let e=this.inputComponentRef.value,t=e?.inputElementRef.value;t&&(t.value="",this.inputValue="",t.focus(),t.dispatchEvent(new Event("input")))}};re.styles=[eJ.W5,t9],t7([(0,n.MZ)()],re.prototype,"inputValue",void 0),re=t7([(0,eK.E)("wui-search-bar")],re);let rt=(0,i.JW)`<svg viewBox="0 0 48 54" fill="none"> 1148 <path 1149 d="M43.4605 10.7248L28.0485 1.61089C25.5438 0.129705 22.4562 0.129705 19.9515 1.61088L4.53951 10.7248C2.03626 12.2051 0.5 14.9365 0.5 17.886V36.1139C0.5 39.0635 2.03626 41.7949 4.53951 43.2752L19.9515 52.3891C22.4562 53.8703 25.5438 53.8703 28.0485 52.3891L43.4605 43.2752C45.9637 41.7949 47.5 39.0635 47.5 36.114V17.8861C47.5 14.9365 45.9637 12.2051 43.4605 10.7248Z" 1150 /> 1151</svg>`,rr=(0,eV.AH)` 1152 :host { 1153 display: flex; 1154 flex-direction: column; 1155 justify-content: center;
1156 align-items: center; 1157 height: 104px; 1158 width: 104px; 1159 row-gap: ${({spacing:e})=>e[2]}; 1160 background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; 1161 border-radius: ${({borderRadius:e})=>e[5]}; 1162 position: relative; 1163 } 1164 1165 wui-shimmer[data-type='network'] { 1166 border: none; 1167 -webkit-clip-path: var(--apkt-path-network); 1168 clip-path: var(--apkt-path-network); 1169 } 1170 1171 svg { 1172 position: absolute; 1173 width: 48px; 1174 height: 54px; 1175 z-index: 1; 1176 } 1177 1178 svg > path { 1179 stroke: ${({tokens:e})=>e.theme.foregroundSecondary}; 1180 stroke-width: 1px; 1181 } 1182 1183 @media (max-width: 350px) { 1184 :host { 1185 width: 100%; 1186 } 1187 } 1188`;var ro=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a};let ri=class extends i.WF{constructor(){super(...arguments),this.type="wallet"}render(){return(0,i.qy)` 1189 ${this.shimmerTemplate()} 1190 <wui-shimmer width="80px" height="20px"></wui-shimmer> 1191 `}shimmerTemplate(){return"network"===this.type?(0,i.qy)` <wui-shimmer data-type=${this.type} width="48px" height="54px"></wui-shimmer> 1192 ${rt}`:(0,i.qy)`<wui-shimmer width="56px" height="56px"></wui-shimmer>`}};ri.styles=[eJ.W5,eJ.fD,rr],ro([(0,n.MZ)()],ri.prototype,"type",void 0),ri=ro([(0,eK.E)("wui-card-select-loader")],ri);var rn=r(1191);let ra=(0,i.AH)` 1193 :host { 1194 display: grid; 1195 width: inherit; 1196 height: inherit; 1197 } 1198`;var rs=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a};let rl=class extends i.WF{render(){return this.style.cssText=` 1199 grid-template-rows: ${this.gridTemplateRows}; 1200 grid-template-columns: ${this.gridTemplateColumns}; 1201 justify-items: ${this.justifyItems}; 1202 align-items: ${this.alignItems}; 1203 justify-content: ${this.justifyContent}; 1204 align-content: ${this.alignContent}; 1205 column-gap: ${this.columnGap&&`var(--apkt-spacing-${this.columnGap})`}; 1206 row-gap: ${this.rowGap&&`var(--apkt-spacing-${this.rowGap})`}; 1207 gap: ${this.gap&&`var(--apkt-spacing-${this.gap})`}; 1208 padding-top: ${this.padding&&rn.Z.getSpacingStyles(this.padding,0)}; 1209 padding-right: ${this.padding&&rn.Z.getSpacingStyles(this.padding,1)}; 1210 padding-bottom: ${this.padding&&rn.Z.getSpacingStyles(this.padding,2)}; 1211 padding-left: ${this.padding&&rn.Z.getSpacingStyles(this.padding,3)}; 1212 margin-top: ${this.margin&&rn.Z.getSpacingStyles(this.margin,0)}; 1213 margin-right: ${this.margin&&rn.Z.getSpacingStyles(this.margin,1)}; 1214 margin-bottom: ${this.margin&&rn.Z.getSpacingStyles(this.margin,2)}; 1215 margin-left: ${this.margin&&rn.Z.getSpacingStyles(this.margin,3)}; 1216 `,(0,i.qy)`<slot></slot>`}};rl.styles=[eJ.W5,ra],rs([(0,n.MZ)()],rl.prototype,"gridTemplateRows",void 0),rs([(0,n.MZ)()],rl.prototype,"gridTemplateColumns",void 0),rs([(0,n.MZ)()],rl.prototype,"justifyItems",void 0),rs([(0,n.MZ)()],rl.prototype,"alignItems",void 0),rs([(0,n.MZ)()],rl.prototype,"justifyContent",void 0),rs([(0,n.MZ)()],rl.prototype,"alignContent",void 0),rs([(0,n.MZ)()],rl.prototype,"columnGap",void 0),rs([(0,n.MZ)()],rl.prototype,"rowGap",void 0),rs([(0,n.MZ)()],rl.prototype,"gap",void 0),rs([(0,n.MZ)()],rl.prototype,"padding",void 0),rs([(0,n.MZ)()],rl.prototype,"margin",void 0),rl=rs([(0,eK.E)("wui-grid")],rl);var rc=r(38637);let rd=(0,d.AH)` 1217 button { 1218 display: flex; 1219 flex-direction: column; 1220 justify-content: center; 1221 align-items: center; 1222 cursor: pointer; 1223 width: 104px; 1224 row-gap: ${({spacing:e})=>e["2"]}; 1225 padding: ${({spacing:e})=>e["3"]} ${({spacing:e})=>e["0"]}; 1226 background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; 1227 border-radius: clamp(0px, ${({borderRadius:e})=>e["4"]}, 20px); 1228 transition: 1229 color ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-1"]}, 1230 background-color ${({durations:e})=>e.lg} 1231 ${({easings:e})=>e["ease-out-power-1"]}, 1232 border-radius ${({durations:e})=>e.lg} 1233 ${({easings:e})=>e["ease-out-power-1"]}; 1234 will-change: background-color, color, border-radius; 1235 outline: none; 1236 border: none; 1237 } 1238 1239 button > wui-flex > wui-text { 1240 color: ${({tokens:e})=>e.theme.textPrimary}; 1241 max-width: 86px; 1242 white-space: nowrap; 1243 overflow: hidden; 1244 text-overflow: ellipsis; 1245 justify-content: center; 1246 } 1247 1248 button > wui-flex > wui-text.certified { 1249 max-width: 66px; 1250 } 1251 1252 @media (hover: hover) and (pointer: fine) { 1253 button:hover:enabled { 1254 background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; 1255 } 1256 } 1257 1258 button:disabled > wui-flex > wui-text { 1259 color: ${({tokens:e})=>e.core.glass010}; 1260 } 1261 1262 [data-selected='true'] { 1263 background-color: ${({colors:e})=>e.accent020}; 1264 } 1265 1266 @media (hover: hover) and (pointer: fine) { 1267 [data-selected='true']:hover:enabled { 1268 background-color: ${({colors:e})=>e.accent010}; 1269 } 1270 } 1271 1272 [data-selected='true']:active:enabled { 1273 background-color: ${({colors:e})=>e.accent010}; 1274 } 1275 1276 @media (max-width: 350px) { 1277 button { 1278 width: 100%; 1279 } 1280 } 1281`;var ru=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a};let rh=class extends i.WF{constructor(){super(),this.observer=new IntersectionObserver(()=>void 0),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=>
1281{e.forEach(e=>{e.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(0,i.qy)` 1282 <button> 1283 ${this.imageTemplate()} 1284 <wui-flex flexDirection="row" alignItems="center" justifyContent="center" gap="1"> 1285 <wui-text 1286 variant="md-regular" 1287 color="inherit" 1288 class=${(0,u.J)(e?"certified":void 0)} 1289 >${this.wallet?.name}</wui-text 1290 > 1291 ${e?(0,i.qy)`<wui-icon size="sm" name="walletConnectBrown"></wui-icon>`:null} 1292 </wui-flex> 1293 </button> 1294 `}imageTemplate(){return(this.visible||this.imageSrc)&&!this.imageLoading?(0,i.qy)` 1295 <wui-wallet-image 1296 size="lg" 1297 imageSrc=${(0,u.J)(this.imageSrc)} 1298 name=${(0,u.J)(this.wallet?.name)} 1299 .installed=${this.wallet?.installed??!1} 1300 badgeSize="sm" 1301 > 1302 </wui-wallet-image> 1303 `:this.shimmerTemplate()}shimmerTemplate(){return(0,i.qy)`<wui-shimmer width="56px" height="56px"></wui-shimmer>`}async fetchImageSrc(){!this.wallet||(this.imageSrc=v.$.getWalletImage(this.wallet),this.imageSrc||(this.imageLoading=!0,this.imageSrc=await v.$.fetchWalletImage(this.wallet.image_id),this.imageLoading=!1))}sendImpressionEvent(){this.wallet&&!this.isImpressed&&(this.isImpressed=!0,g.E.sendWalletImpressionEvent({name:this.wallet.name,walletRank:this.wallet.order,explorerId:this.explorerId,view:w.I.state.view,query:this.walletQuery,certified:this.certified,displayIndex:this.displayIndex}))}};rh.styles=rd,ru([(0,n.wk)()],rh.prototype,"visible",void 0),ru([(0,n.wk)()],rh.prototype,"imageSrc",void 0),ru([(0,n.wk)()],rh.prototype,"imageLoading",void 0),ru([(0,n.wk)()],rh.prototype,"isImpressed",void 0),ru([(0,n.MZ)()],rh.prototype,"explorerId",void 0),ru([(0,n.MZ)()],rh.prototype,"walletQuery",void 0),ru([(0,n.MZ)()],rh.prototype,"certified",void 0),ru([(0,n.MZ)()],rh.prototype,"displayIndex",void 0),ru([(0,n.MZ)({type:Object})],rh.prototype,"wallet",void 0),rh=ru([(0,d.EM)("w3m-all-wallets-list-item")],rh);let rp=(0,d.AH)` 1304 wui-grid { 1305 max-height: clamp(360px, 400px, 80vh); 1306 overflow: scroll; 1307 scrollbar-width: none; 1308 grid-auto-rows: min-content; 1309 grid-template-columns: repeat(auto-fill, 104px); 1310 } 1311 1312 :host([data-mobile-fullscreen='true']) wui-grid { 1313 max-height: none; 1314 } 1315 1316 @media (max-width: 350px) { 1317 wui-grid { 1318 grid-template-columns: repeat(2, 1fr); 1319 } 1320 } 1321 1322 wui-grid[data-scroll='false'] { 1323 overflow: hidden; 1324 } 1325 1326 wui-grid::-webkit-scrollbar {
1327 display: none; 1328 } 1329 1330 w3m-all-wallets-list-item { 1331 opacity: 0; 1332 animation-duration: ${({durations:e})=>e.xl}; 1333 animation-timing-function: ${({easings:e})=>e["ease-inout-power-2"]}; 1334 animation-name: fade-in; 1335 animation-fill-mode: forwards; 1336 } 1337 1338 @keyframes fade-in { 1339 from { 1340 opacity: 0; 1341 } 1342 to { 1343 opacity: 1; 1344 } 1345 } 1346 1347 wui-loading-spinner { 1348 padding-top: ${({spacing:e})=>e["4"]}; 1349 padding-bottom: ${({spacing:e})=>e["4"]}; 1350 justify-content: center; 1351 grid-column: 1 / span 4; 1352 } 1353`;var rf=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a};let rg="local-paginator",rw=class extends i.WF{constructor(){super(),this.unsubscribe=[],this.paginationObserver=void 0,this.loading=!l.N.state.wallets.length,this.wallets=l.N.state.wallets,this.recommended=l.N.state.recommended,this.featured=l.N.state.featured,this.filteredWallets=l.N.state.filteredWallets,this.mobileFullScreen=s.H.state.enableMobileFullScreen,this.unsubscribe.push(l.N.subscribeKey("wallets",e=>this.wallets=e),l.N.subscribeKey("recommended",e=>this.recommended=e),l.N.subscribeKey("featured",e=>this.featured=e),l.N.subscribeKey("filteredWallets",e=>this.filteredWallets=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"),(0,i.qy)` 1354 <wui-grid 1355 data-scroll=${!this.loading} 1356 .padding=${["0","3","3","3"]} 1357 gap="2" 1358 justifyContent="space-between" 1359 > 1360 ${this.loading?this.shimmerTemplate(16):this.walletsTemplate()} 1361 ${this.paginationLoaderTemplate()} 1362 </wui-grid> 1363 `}async initialFetch(){this.loading=!0;let e=this.shadowRoot?.querySelector("wui-grid");e&&(await l.N.fetchWalletsByPage({page:1}),await e.animate([{opacity:1},{opacity:0}],{duration:200,fill:"forwards",easing:"ease"}).finished,this.loading=!1,e.animate([{opacity:0},{opacity:1}],{duration:200,fill:"forwards",easing:"ease"}))}shimmerTemplate(e,t){return[...Array(e)].map(()=>(0,i.qy)` 1364 <wui-card-select-loader type="wallet" id=${(0,u.J)(t)}></wui-card-select-loader> 1365 `)}getWallets(){let e=[...this.featured,...this.recommended];this.filteredWallets?.length>0?e.push(...this.filteredWallets):e.push(...this.wallets);let t=a.w.uniqueBy(e,"id"),r=rc.A.markWalletsAsInstalled(t);return rc.A.markWalletsWithDisplayIndex(r)}walletsTemplate(){return this.getWallets().map((e,t)=>(0,i.qy)` 1366 <w3m-all-wallets-list-item 1367 data-testid="wallet-search-item-${e.id}" 1368 @click=${()=>this.onConnectWallet(e)} 1369 .wallet=${e} 1370 explorerId=${e.id} 1371 certified=${"certified"===this.badge} 1372 displayIndex=${t} 1373 ></w3m-all-wallets-list-item> 1374 `)}paginationLoaderTemplate(){let{wallets:e,recommended:t,featured:r,count:o,mobileFilteredOutWalletsLength:i}=l.N.state,n=window.innerWidth<352?3:4,a=e.length+t.length,s=Math.ceil(a/n)*n-a+n;return(s-=e.length?r.length%n:0,0===o&&r.length>0)?null:0===o||[...r,...e,...t].length<o-(i??0)?this.shimmerTemplate(s,rg):null}createPaginationObserver(){let e=this.shadowRoot?.querySelector(`#${rg}`);e&&(this.paginationObserver=new IntersectionObserver(([e])=>{if(e?.isIntersecting&&!this.loading){let{page:e,count:t,wallets:r}=l.N.state;r.length<t&&l.N.fetchWalletsByPage({page:e+1})}}),this.paginationObserver.observe(e))}onConnectWallet(e){p.a.selectWalletConnector(e)}};rw.styles=rp,rf([(0,n.wk)()],rw.prototype,"loading",void 0),rf([(0,n.wk)()],rw.prototype,"wallets",void 0),rf([(0,n.wk)()],rw.prototype,"recommended",void 0),rf([(0,n.wk)()],rw.prototype,"featured",void 0),rf([(0,n.wk)()],rw.prototype,"filteredWallets",void 0),rf([(0,n.wk)()],rw.prototype,"badge",void 0),rf([(0,n.wk)()],rw.prototype,"mobileFullScreen",void 0),rw=rf([(0,d.EM)("w3m-all-wallets-list")],rw);let rm=(0,i.AH)` 1375 wui-grid, 1376 wui-loading-spinner, 1377 wui-flex { 1378 height: 360px; 1379 } 1380 1381 wui-grid { 1382 overflow: scroll; 1383 scrollbar-width: none; 1384 grid-auto-rows: min-content; 1385 grid-template-columns: repeat(auto-fill, 104px); 1386 } 1387 1388 :host([data-mobile-fullscreen='true']) wui-grid { 1389 max-height: none; 1390 height: auto; 1391 } 1392 1393 wui-grid[data-scroll='false'] { 1394 overflow: hidden; 1395 } 1396 1397 wui-grid::-webkit-scrollbar {
1398 display: none; 1399 } 1400 1401 wui-loading-spinner { 1402 justify-content: center; 1403 align-items: center; 1404 } 1405 1406 @media (max-width: 350px) { 1407 wui-grid { 1408 grid-template-columns: repeat(2, 1fr); 1409 } 1410 } 1411`;var rb=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a};let ry=class extends i.WF{constructor(){super(...arguments),this.prevQuery="",this.prevBadge=void 0,this.loading=!0,this.mobileFullScreen=s.H.state.enableMobileFullScreen,this.query=""}render(){return this.mobileFullScreen&&this.setAttribute("data-mobile-fullscreen","true"),this.onSearch(),this.loading?(0,i.qy)`<wui-loading-spinner color="accent-primary"></wui-loading-spinner>`:this.walletsTemplate()}async onSearch(){(this.query.trim()!==this.prevQuery.trim()||this.badge!==this.prevBadge)&&(this.prevQuery=this.query,this.prevBadge=this.badge,this.loading=!0,await l.N.searchWallet({search:this.query,badge:this.badge}),this.loading=!1)}walletsTemplate(){let{search:e}=l.N.state,t=rc.A.markWalletsAsInstalled(e);return e.length?(0,i.qy)` 1412 <wui-grid 1413 data-testid="wallet-list" 1414 .padding=${["0","3","3","3"]} 1415 rowGap="4" 1416 columngap="2" 1417 justifyContent="space-between" 1418 > 1419 ${t.map((e,t)=>(0,i.qy)` 1420 <w3m-all-wallets-list-item 1421 @click=${()=>this.onConnectWallet(e)} 1422 .wallet=${e} 1423 data-testid="wallet-search-item-${e.id}" 1424 explorerId=${e.id} 1425 certified=${"certified"===this.badge} 1426 walletQuery=${this.query} 1427 displayIndex=${t} 1428 ></w3m-all-wallets-list-item> 1429 `)} 1430 </wui-grid> 1431 `:(0,i.qy)` 1432 <wui-flex 1433 data-testid="no-wallet-found" 1434 justifyContent="center" 1435 alignItems="center" 1436 gap="3" 1437 flexDirection="column" 1438 > 1439 <wui-icon-box size="lg" color="default" icon="wallet"></wui-icon-box> 1440 <wui-text data-testid="no-wallet-found-text" color="secondary" variant="md-medium"> 1441 No Wallet found 1442 </wui-text> 1443 </wui-flex> 1444 `}onConnectWallet(e){p.a.selectWalletConnector(e)}};ry.styles=rm,rb([(0,n.wk)()],ry.prototype,"loading",void 0),rb([(0,n.wk)()],ry.prototype,"mobileFullScreen",void 0),rb([(0,n.MZ)()],ry.prototype,"query",void 0),rb([(0,n.MZ)()],ry.prototype,"badge",void 0),ry=rb([(0,d.EM)("w3m-all-wallets-search")],ry);var rv=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a};let rx=class extends i.WF{constructor(){super(...arguments),this.search="",this.badge=void 0,this.onDebouncedSearch=a.w.debounce(e=>{this.search=e})}render(){let e=this.search.length>=2;return(0,i.qy)` 1445 <wui-flex .padding=${["1","3","3","3"]} gap="2" alignItems="center"> 1446 <wui-search-bar @inputChange=${this.onInputChange.bind(this)}></wui-search-bar> 1447 <wui-certified-switch 1448 ?checked=${"certified"===this.badge} 1449 @certifiedSwitchChange=${this.onCertifiedSwitchChange.bind(this)} 1450 data-testid="wui-certified-switch" 1451 ></wui-certified-switch> 1452 ${this.qrButtonTemplate()} 1453 </wui-flex> 1454 ${e||this.badge?(0,i.qy)`<w3m-all-wallets-search 1455 query=${this.search} 1456 .badge=${this.badge} 1457 ></w3m-all-wallets-search>`:(0,i.qy)`<w3m-all-wallets-list .badge=${this.badge}></w3m-all-wallets-list>`} 1458 `}onInputChange(e){this.onDebouncedSearch(e.detail)}onCertifiedSwitchChange(e){e.detail?(this.badge="certified",N.P.showSvg("Only WalletConnect certified",{icon:"walletConnectBrown",iconColor:"accent-100"})):this.badge=void 0}qrButtonTemplate(){return a.w.isMobile()?(0,i.qy)` 1459 <wui-icon-box 1460 size="xl" 1461 iconSize="xl" 1462 color="accent-primary" 1463 icon="qrCode" 1464 border 1465 borderColor="wui-accent-glass-010" 1466 @click=${this.onWalletConnectQr.bind(this)} 1467 ></wui-icon-box> 1468 `:null}onWalletConnectQr(){w.I.push("ConnectingWalletConnect")}};rv([(0,n.wk)()],rx.prototype,"search",void 0),rv([(0,n.wk)()],rx.prototype,"badge",void 0),rx=rv([(0,d.EM)("w3m-all-wallets-view")],rx);let r$=(0,eV.AH)` 1469 :host { 1470 width: 100%; 1471 } 1472 1473 button { 1474 display: flex; 1475 align-items: center; 1476 justify-content: space-between; 1477 padding: ${({spacing:e})=>e[3]}; 1478 width: 100%; 1479 background-color: ${({tokens:e})=>e.theme.backgroundPrimary}; 1480 border-radius: ${({borderRadius:e})=>e[4]}; 1481 transition: 1482 background-color ${({durations:e})=>e.lg} 1483 ${({easings:e})=>e["ease-out-power-2"]}, 1484 scale ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]}; 1485 will-change: background-color, scale; 1486 } 1487 1488 wui-text { 1489 text-transform: capitalize; 1490 } 1491 1492 wui-image { 1493 color: ${({tokens:e})=>e.theme.textPrimary}; 1494 } 1495 1496 @media (hover: hover) { 1497 button:hover:enabled { 1498 background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; 1499 } 1500 } 1501 1502 button:disabled { 1503 opacity: 0.5;
1504 cursor: not-allowed; 1505 } 1506`;var rC=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a};let rE=class extends i.WF{constructor(){super(...arguments),this.imageSrc="google",this.loading=!1,this.disabled=!1,this.rightIcon=!0,this.rounded=!1,this.fullSize=!1}render(){return this.dataset.rounded=this.rounded?"true":"false",(0,i.qy)` 1507 <button 1508 ?disabled=${!!this.loading||!!this.disabled} 1509 data-loading=${this.loading} 1510 tabindex=${(0,u.J)(this.tabIdx)} 1511 > 1512 <wui-flex gap="2" alignItems="center"> 1513 ${this.templateLeftIcon()} 1514 <wui-flex gap="1"> 1515 <slot></slot> 1516 </wui-flex> 1517 </wui-flex> 1518 ${this.templateRightIcon()} 1519 </button> 1520 `}templateLeftIcon(){return this.icon?(0,i.qy)`<wui-image 1521 icon=${this.icon} 1522 iconColor=${(0,u.J)(this.iconColor)} 1523 ?boxed=${!0} 1524 ?rounded=${this.rounded} 1525 ></wui-image>`:(0,i.qy)`<wui-image 1526 ?boxed=${!0} 1527 ?rounded=${this.rounded} 1528 ?fullSize=${this.fullSize} 1529 src=${this.imageSrc} 1530 ></wui-image>`}templateRightIcon(){return this.rightIcon?this.loading?(0,i.qy)`<wui-loading-spinner size="md" color="accent-primary"></wui-loading-spinner>`:(0,i.qy)`<wui-icon name="chevronRight" size="lg" color="default"></wui-icon>`:null}};rE.styles=[eJ.W5,eJ.fD,r$],rC([(0,n.MZ)()],rE.prototype,"imageSrc",void 0),rC([(0,n.MZ)()],rE.prototype,"icon",void 0),rC([(0,n.MZ)()],rE.prototype,"iconColor",void 0),rC([(0,n.MZ)({type:Boolean})],rE.prototype,"loading",void 0),rC([(0,n.MZ)()],rE.prototype,"tabIdx",void 0),rC([(0,n.MZ)({type:Boolean})],rE.prototype,"disabled",void 0),rC([(0,n.MZ)({type:Boolean})],rE.prototype,"rightIcon",void 0),rC([(0,n.MZ)({type:Boolean})],rE.prototype,"rounded",void 0),rC([(0,n.MZ)({type:Boolean})],rE.prototype,"fullSize",void 0),rE=rC([(0,eK.E)("wui-list-item")],rE);let rk=class extends i.WF{constructor(){super(...arguments),this.wallet=w.I.state.data?.wallet}render(){if(!this.wallet)throw Error("w3m-downloads-view");return(0,i.qy)` 1531 <wui-flex gap="2" flexDirection="column" .padding=${["3","3","4","3"]}> 1532 ${this.chromeTemplate()} ${this.iosTemplate()} ${this.androidTemplate()} 1533 ${this.homepageTemplate()} 1534 </wui-flex> 1535 `}chromeTemplate(){return this.wallet?.chrome_store?(0,i.qy)`<wui-list-item 1536 variant="icon" 1537 icon="chromeStore" 1538 iconVariant="square" 1539 @click=${this.onChromeStore.bind(this)} 1540 chevron 1541 > 1542 <wui-text variant="md-medium" color="primary">Chrome Extension</wui-text> 1543 </wui-list-item>`:null}iosTemplate(){return this.wallet?.app_store?(0,i.qy)`<wui-list-item 1544 variant="icon" 1545 icon="appStore" 1546 iconVariant="square" 1547 @click=${this.onAppStore.bind(this)} 1548 chevron 1549 > 1550 <wui-text variant="md-medium" color="primary">iOS App</wui-text> 1551 </wui-list-item>`:null}androidTemplate(){return this.wallet?.play_store?(0,i.qy)`<wui-list-item 1552 variant="icon" 1553 icon="playStore" 1554 iconVariant="square" 1555 @click=${this.onPlayStore.bind(this)} 1556 chevron 1557 > 1558 <wui-text variant="md-medium" color="primary">Android App</wui-text> 1559 </wui-list-item>`:null}homepageTemplate(){return this.wallet?.homepage?(0,i.qy)` 1560 <wui-list-item 1561 variant="icon" 1562 icon="browser" 1563 iconVariant="square-blue" 1564 @click=${this.onHomePage.bind(this)} 1565 chevron 1566 > 1567 <wui-text variant="md-medium" color="primary">Website</wui-text> 1568 </wui-list-item> 1569 `:null}openStore(e){e.href&&this.wallet&&(g.E.sendEvent({type:"track",event:"GET_WALLET",properties:{name:this.wallet.name,walletRank:this.wallet.order,explorerId:this.wallet.id,type:e.type}}),a.w.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"})}};rk=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a}([(0,d.EM)("w3m-downloads-view")],rk)},10364:(e,t)=>
1569{function r(e){if("number"==typeof e&&(e=e.toString()),"string"!=typeof e)throw Error("Color should be defined as hex string");let t=e.slice().replace("#","").split("");if(t.length<3||5===t.length||t.length>8)throw Error("Invalid hex color: "+e);(3===t.length||4===t.length)&&(t=Array.prototype.concat.apply([],t.map(function(e){return[e,e]}))),6===t.length&&t.push("F","F");let r=parseInt(t.join(""),16);return{r:r>>24&255,g:r>>16&255,b:r>>8&255,a:255&r,hex:"#"+t.slice(0,6).join("")}}t.getOptions=function(e){e||(e={}),e.color||(e.color={});let t=void 0===e.margin||null===e.margin||e.margin<0?4:e.margin,o=e.width&&e.width>=21?e.width:void 0,i=e.scale||4;return{width:o,scale:o?4:i,margin:t,color:{dark:r(e.color.dark||"#000000ff"),light:r(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}},t.getScale=function(e,t){return t.width&&t.width>=e+2*t.margin?t.width/(e+2*t.margin):t.scale},t.getImageWidth=function(e,r){let o=t.getScale(e,r);return Math.floor((e+2*r.margin)*o)},t.qrToImageData=function(e,r,o){let i=r.modules.size,n=r.modules.data,a=t.getScale(i,o),s=Math.floor((i+2*o.margin)*a),l=o.margin*a,c=[o.color.light,o.color.dark];for(let t=0;t<s;t++)for(let r=0;r<s;r++){let d=(t*s+r)*4,u=o.color.light;t>=l&&r>=l&&t<s-l&&r<s-l&&(u=c[+!!n[Math.floor((t-l)/a)*i+Math.floor((r-l)/a)]]),e[d++]=u.r,e[d++]=u.g,e[d++]=u.b,e[d]=u.a}}},11764:e=>{function t(e){if(!e||e<1)throw Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}t.prototype.set=function(e,t,r,o){let i=e*this.size+t;this.data[i]=r,o&&(this.reservedBit[i]=!0)},t.prototype.get=function(e,t){return this.data[e*this.size+t]},t.prototype.xor=function(e,t,r){this.data[e*this.size+t]^=r},t.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},e.exports=t},11878:(e,t,r)=>{let o=r(10364);function i(e,t){let r=e.a/255,o=t+'="'+e.hex+'"';return r<1?o+" "+t+'-opacity="'+r.toFixed(2).slice(1)+'"':o}function n(e,t,r){let o=e+t;return void 0!==r&&(o+=" "+r),o}t.render=function(e,t,r){let a=o.getOptions(t),s=e.modules.size,l=e.modules.data,c=s+2*a.margin,d=a.color.light.a?"<path "+i(a.color.light,"fill")+' d="M0 0h'+c+"v"+c+'H0z"/>':"",u="<path "+i(a.color.dark,"stroke")+' d="'+function(e,t,r){let o="",i=0,a=!1,s=0;for(let l=0;l<e.length;l++){let c=Math.floor(l%t),d=Math.floor(l/t);c||a||(a=!0),e[l]?(s++,l>0&&c>0&&e[l-1]||(o+=a?n("M",c+r,.5+d+r):n("m",i,0),i=0,a=!1),c+1<t&&e[l+1]||(o+=n("h",s),s=0)):i++}return o}(l,s,a.margin)+'"/>',h='<svg xmlns="http://www.w3.org/2000/svg" '+(a.width?'width="'+a.width+'" height="'+a.width+'" ':"")+('viewBox="0 0 '+c+" ")+c+'" shape-rendering="crispEdges">'+d+u+"</svg>\n";return"function"==typeof r&&r(null,h),h}},12351:(e,t)=>{let r=new Uint8Array(512),o=new Uint8Array(256),i=1;for(let e=0;e<255;e++)r[e]=i,o[i]=e,256&(i<<=1)&&(i^=285);for(let e=255;e<512;e++)r[e]=r[e-255];t.log=function(e){if(e<1)throw Error("log("+e+")");return o[e]},t.exp=function(e){return r[e]},t.mul=function(e,t){return 0===e||0===t?0:r[o[e]+o[t]]}},18840:(e,t,r)=>{let o=r(48191),i=r(24828);function n(e){this.mode=i.BYTE,"string"==typeof e&&(e=o(e)),this.data=new Uint8Array(e)}n.getBitsLength=function(e){return 8*e},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(e){for(let t=0,r=this.data.length;t<r;t++)e.put(this.data[t],8)},e.exports=n},19588:(e,t,r)=>{let o=r(21488).getSymbolSize;t.getPositions=function(e){let t=o(e);return[[0,0],[t-7,0],[0,t-7]]}},21488:(e,t)=>{let r,o=[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];t.getSymbolSize=function(e){if(!e)throw Error('"version" cannot be null or undefined');if(e<1||e>40)throw Error('"version" should be in range from 1 to 40');return 4*e+17},t.getSymbolTotalCodewords=function(e){return o[e]},t.getBCHDigit=function(e){let t=0;for(;0!==e;)t++,e>>>=1;return t},t.setToSJISFunction=function(e){if("function"!=typeof e)throw Error('"toSJISFunc" is not a valid function.');r=e},t.isKanjiModeEnabled=function(){return void 0!==r},t.toSJIS=function(e){return r(e)}},24828:(e,t,r)=>
1569{let o=r(41344),i=r(59598);t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(e,t){if(!e.ccBits)throw Error("Invalid mode: "+e);if(!o.isValid(t))throw Error("Invalid version: "+t);return t>=1&&t<10?e.ccBits[0]:t<27?e.ccBits[1]:e.ccBits[2]},t.getBestModeForData=function(e){return i.testNumeric(e)?t.NUMERIC:i.testAlphanumeric(e)?t.ALPHANUMERIC:i.testKanji(e)?t.KANJI:t.BYTE},t.toString=function(e){if(e&&e.id)return e.id;throw Error("Invalid mode")},t.isValid=function(e){return e&&e.bit&&e.ccBits},t.from=function(e,r){if(t.isValid(e))return e;try{if("string"!=typeof e)throw Error("Param is not a string");switch(e.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw Error("Unknown mode: "+e)}}catch(e){return r}}},29825:(e,t,r)=>{let o=r(12351);t.mul=function(e,t){let r=new Uint8Array(e.length+t.length-1);for(let i=0;i<e.length;i++)for(let n=0;n<t.length;n++)r[i+n]^=o.mul(e[i],t[n]);return r},t.mod=function(e,t){let r=new Uint8Array(e);for(;r.length-t.length>=0;){let e=r[0];for(let i=0;i<t.length;i++)r[i]^=o.mul(t[i],e);let i=0;for(;i<r.length&&0===r[i];)i++;r=r.slice(i)}return r},t.generateECPolynomial=function(e){let r=new Uint8Array([1]);for(let i=0;i<e;i++)r=t.mul(r,new Uint8Array([1,o.exp(i)]));return r}},40199:e=>{function t(){this.buffer=[],this.length=0}t.prototype={get:function(e){let t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)==1},put:function(e,t){for(let r=0;r<t;r++)this.putBit((e>>>t-r-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(e){let t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},e.exports=t},41344:(e,t)=>{t.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}},48191:e=>{"use strict";e.exports=function(e){for(var t=[],r=e.length,o=0;o<r;o++){var i=e.charCodeAt(o);if(i>=55296&&i<=56319&&r>o+1){var n=e.charCodeAt(o+1);n>=56320&&n<=57343&&(i=(i-55296)*1024+n-56320+65536,o+=1)}if(i<128){t.push(i);continue}if(i<2048){t.push(i>>6|192),t.push(63&i|128);continue}if(i<55296||i>=57344&&i<65536){t.push(i>>12|224),t.push(i>>6&63|128),t.push(63&i|128);continue}if(i>=65536&&i<=1114111){t.push(i>>18|240),t.push(i>>12&63|128),t.push(i>>6&63|128),t.push(63&i|128);continue}t.push(239,191,189)}return new Uint8Array(t).buffer}},49552:(e,t)=>{t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};t.isValid=function(e){return null!=e&&""!==e&&!isNaN(e)&&e>=0&&e<=7},t.from=function(e){return t.isValid(e)?parseInt(e,10):void 0},t.getPenaltyN1=function(e){let t=e.size,r=0,o=0,i=0,n=null,a=null;for(let s=0;s<t;s++){o=i=0,n=a=null;for(let l=0;l<t;l++){let t=e.get(s,l);t===n?o++:(o>=5&&(r+=3+(o-5)),n=t,o=1),(t=e.get(l,s))===a?i++:(i>=5&&(r+=3+(i-5)),a=t,i=1)}o>=5&&(r+=3+(o-5)),i>=5&&(r+=3+(i-5))}return r},t.getPenaltyN2=function(e){let t=e.size,r=0;for(let o=0;o<t-1;o++)for(let i=0;i<t-1;i++){let t=e.get(o,i)+e.get(o,i+1)+e.get(o+1,i)+e.get(o+1,i+1);(4===t||0===t)&&r++}return 3*r},t.getPenaltyN3=function(e){let t=e.size,r=0,o=0,i=0;for(let n=0;n<t;n++){o=i=0;for(let a=0;a<t;a++)o=o<<1&2047|e.get(n,a),a>=10&&(1488===o||93===o)&&r++,i=i<<1&2047|e.get(a,n),a>=10&&(1488===i||93===i)&&r++}return 40*r},t.getPenaltyN4=function(e){let t=0,r=e.data.length;for(let o=0;o<r;o++)t+=e.data[o];return 10*Math.abs(Math.ceil(100*t/r/5)-10)},t.applyMask=function(e,r){let o=r.size;for(let i=0;i<o;i++)for(let n=0;n<o;n++)r.isReserved(n,i)||r.xor(n,i,function(e,r,o){switch(e){case t.Patterns.PATTERN000:return(r+o)%2==0;case t.Patterns.PATTERN001:return r%2==0;case t.Patterns.PATTERN010:return o%3==0;case t.Patterns.PATTERN011:return(r+o)%3==0;case t.Patterns.PATTERN100:return(Math.floor(r/2)+Math.floor(o/3))%2==0;case t.Patterns.PATTERN101:return r*o%2+r*o%3==0;case t.Patterns.PATTERN110:return(r*o%2+r*o%3)%2==0;case t.Patterns.PATTERN111:return(r*o%3+(r+o)%2)%2==0;default:throw Error("bad maskPattern:"+e)}}(e,n,i))},t.getBestMask=function(e,r){let o=Object.keys(t.Patterns).length,i=0,n=1/0;for(let a=0;a<o;
vendor: 8,824 bytes, line 1569
1569a++){r(a),t.applyMask(a,e);let o=t.getPenaltyN1(e)+t.getPenaltyN2(e)+t.getPenaltyN3(e)+t.getPenaltyN4(e);t.applyMask(a,e),o<n&&(n=o,i=a)}return i}},54587:(e,t,r)=>{let o=r(75557),i=r(59805),n=r(96127),a=r(11878);function s(e,t,r,n,a){let s=[].slice.call(arguments,1),l=s.length,c="function"==typeof s[l-1];if(!c&&!o())throw Error("Callback required as last argument");if(c){if(l<2)throw Error("Too few arguments provided");2===l?(a=r,r=t,t=n=void 0):3===l&&(t.getContext&&void 0===a?(a=n,n=void 0):(a=n,n=r,r=t,t=void 0))}else{if(l<1)throw Error("Too few arguments provided");return 1===l?(r=t,t=n=void 0):2!==l||t.getContext||(n=r,r=t,t=void 0),new Promise(function(o,a){try{let a=i.create(r,n);o(e(a,t,n))}catch(e){a(e)}})}try{let o=i.create(r,n);a(null,e(o,t,n))}catch(e){a(e)}}t.create=i.create,t.toCanvas=s.bind(null,n.render),t.toDataURL=s.bind(null,n.renderToDataURL),t.toString=s.bind(null,function(e,t,r){return a.render(e,r)})},55629:(e,t,r)=>{let o=r(24828);function i(e){this.mode=o.NUMERIC,this.data=e.toString()}i.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){let t,r;for(t=0;t+3<=this.data.length;t+=3)r=parseInt(this.data.substr(t,3),10),e.put(r,10);let o=this.data.length-t;o>0&&(r=parseInt(this.data.substr(t),10),e.put(r,3*o+1))},e.exports=i},58647:(e,t,r)=>{let o=r(21488),i=o.getBCHDigit(1335);t.getEncodedBits=function(e,t){let r=e.bit<<3|t,n=r<<10;for(;o.getBCHDigit(n)-i>=0;)n^=1335<<o.getBCHDigit(n)-i;return(r<<10|n)^21522}},59598:(e,t)=>{let r="[0-9]+",o="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+",i="(?:(?![A-Z0-9 $%*+\\-./:]|"+(o=o.replace(/u/g,"\\u"))+")(?:.|[\r\n]))+";t.KANJI=RegExp(o,"g"),t.BYTE_KANJI=RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),t.BYTE=RegExp(i,"g"),t.NUMERIC=RegExp(r,"g"),t.ALPHANUMERIC=RegExp("[A-Z $%*+\\-./:]+","g");let n=RegExp("^"+o+"$"),a=RegExp("^"+r+"$"),s=RegExp("^[A-Z0-9 $%*+\\-./:]+$");t.testKanji=function(e){return n.test(e)},t.testNumeric=function(e){return a.test(e)},t.testAlphanumeric=function(e){return s.test(e)}},59805:(e,t,r)=>{let o=r(21488),i=r(95169),n=r(40199),a=r(11764),s=r(87583),l=r(19588),c=r(49552),d=r(95732),u=r(80464),h=r(75005),p=r(58647),f=r(24828),g=r(61269);function w(e,t,r){let o,i,n=e.size,a=p.getEncodedBits(t,r);for(o=0;o<15;o++)i=(a>>o&1)==1,o<6?e.set(o,8,i,!0):o<8?e.set(o+1,8,i,!0):e.set(n-15+o,8,i,!0),o<8?e.set(8,n-o-1,i,!0):o<9?e.set(8,15-o-1+1,i,!0):e.set(8,15-o-1,i,!0);e.set(n-8,8,1,!0)}t.create=function(e,t){let r,p;if(void 0===e||""===e)throw Error("No input text");let m=i.M;return void 0!==t&&(m=i.from(t.errorCorrectionLevel,i.M),r=h.from(t.version),p=c.from(t.maskPattern),t.toSJISFunc&&o.setToSJISFunction(t.toSJISFunc)),function(e,t,r,i){let p;if(Array.isArray(e))p=g.fromArray(e);else if("string"==typeof e){let o=t;if(!o){let t=g.rawSplit(e);o=h.getBestVersionForData(t,r)}p=g.fromString(e,o||40)}else throw Error("Invalid data");let m=h.getBestVersionForData(p,r);if(!m)throw Error("The amount of data is too big to be stored in a QR Code");if(t){if(t<m)throw Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+m+".\n")}else t=m;let b=function(e,t,r){let i=new n;r.forEach(function(t){i.put(t.mode.bit,4),i.put(t.getLength(),f.getCharCountIndicator(t.mode,e)),t.write(i)});let a=(o.getSymbolTotalCodewords(e)-d.getTotalCodewordsCount(e,t))*8;for(i.getLengthInBits()+4<=a&&i.put(0,4);i.getLengthInBits()%8!=0;)i.putBit(0);let s=(a-i.getLengthInBits())/8;for(let e=0;e<s;e++)i.put(e%2?17:236,8);return function(e,t,r){let i,n,a=o.getSymbolTotalCodewords(t),s=a-d.getTotalCodewordsCount(t,r),l=d.getBlocksCount(t,r),c=a%l,h=l-c,p=Math.floor(a/l),f=Math.floor(s/l),g=f+1,w=p-f,m=new u(w),b=0,y=Array(l),v=Array(l),x=0,$=new Uint8Array(e.buffer);for(let e=0;e<l;e++){let t=e<h?f:g;y[e]=$.slice(b,b+t),v[e]=m.encode(y[e]),b+=t,x=Math.max(x,t)}let C=new Uint8Array(a),E=0;for(i=0;i<x;i++)for(n=0;n<l;n++)i<y[n].length&&(C[E++]=y[n][i]);for(i=0;i<w;i++)for(n=0;n<l;n++)C[E++]=v[n][i];return C}(i,e,t)}(t,r,p),y=new a(o.getSymbolSize(t));!function(e,t){let r=e.size,o=l.getPositions(t);for(let t=0;t<o.length;t++){let i=o[t][0],n=o[t][1];for(let t=-1;t<=7;t++)if(!(i+t<=-1)&&!(r<=i+t))for(let o=-1;o<=7;o++)n+o<=-1||r<=n+o||(t>=0&&t<=6&&(0===o||6===o)||o>=0&&o<=6&&(0===t||6===t)||t>=2&&t<=4&&o>=2&&o<=4?e.set(i+t,n+o,!0,!0):e.set(i+t,n+o,!1,!0))}}(y,t);let v=y.size;for(let e=8;e<v-8;e++){let t=e%2==0;y.set(e,6,t,!0),y.set(6,e,t,!0)}return!function(e,t){let r=s.getPositions(t);for(let t=0;t<r.length;t++){let o=r[t][0],i=r[t][1];for(let t=-2;t<=2;t++)for(let r=-2;r<=2;r++)-2===t||2===t||-2===r||2===r||0===t&&0===r?e.set(o+t,i+r,!0,!0):e.set(o+t,i+r,!1,!0)}}(y,t),w(y,r,0),t>=7&&function(e,t){let r,o,i,n=e.size,a=h.getEncodedBits(t);for(let t=0;t<18;t++)r=Math.floor(t/3),o=t%3+n-8-3,i=(a>>t&1)==1,e.set(r,o,i,!0),e.set(o,r,i,!0)}(y,t),!function(e,t){let r=e.size,o=-1,i=r-1,n=7,a=0;for(let s=r-1;s>0;s-=2)for(6===s&&s--;;){for(let r=0;r<2;r++)if(!e.isReserved(i,s-r)){let o=!1;a<t.length&&(o=(t[a]>>>n&1)==1),e.set(i,s-r,o),-1==--n&&(a++,n=7)}if((i+=o)<0||r<=i){i-=o,o=-o;break}}}(y,b),isNaN(i)&&(i=c.getBestMask(y,w.bind(null,y,r))),c.applyMask(i,y),w(y,r,i),{modules:y,version:t,errorCorrectionLevel:r,maskPattern:i,segments:p}}(e,r,m,p)}},61269:(e,t,r)=>{let o=r(24828),i=r(55629),n=r(72451),a=r(18840),s=r(64065),l=r(59598),c=r(21488),d=r(76458);function u(e){return unescape(encodeURIComponent(e)).length}function h(e,t,r){let o,i=[];for(;null!==(o=e.exec(r));)i.push({data:o[0],index:o.index,mode:t,length:o[0].length});return i}function p(e){let t,r,i=h(l.NUMERIC,o.NUMERIC,e),n=h(l.ALPHANUMERIC,o.ALPHANUMERIC,e);return c.isKanjiModeEnabled()?(t=h(l.BYTE,o.BYTE,e),r=h(l.KANJI,o.KANJI,e)):(t=h(l.BYTE_KANJI,o.BYTE,e),r=[]),i.concat(n,t,r).sort(function(e,t){return e.index-t.index}).map(function(e){return{data:e.data,mode:e.mode,length:e.length}})}function f(e,t){switch(t){case o.NUMERIC:return i.getBitsLength(e);case o.ALPHANUMERIC:return n.getBitsLength(e);case o.KANJI:return s.getBitsLength(e);case o.BYTE:return a.getBitsLength(e)}}function g(e,t){let r,l=o.getBestModeForData(e);if((r=o.from(t,l))!==o.BYTE&&r.bit<l.bit)throw Error('"'+e+'" cannot be encoded with mode '+o.toString(r)+".\n Suggested mode is: "+o.toString(l));switch(r===o.KANJI&&!c.isKanjiModeEnabled()&&(r=o.BYTE),r){case o.NUMERIC:return new i(e);case o.ALPHANUMERIC:return new n(e);case o.KANJI:return new s(e);case o.BYTE:return new a(e)}}t.fromArray=function(e){return e.reduce(function(e,t){return"string"==typeof t?e.push(g(t,null)):t.data&&e.push(g(t.data,t.mode)),e},[])},t.fromString=function(e,r){let i=function(e,t){let r={},i={start:{}},n=["start"];for(let a=0;a<e.length;a++){let s=e[a],l=[];for(let e=0;e<s.length;e++){let c=s[e],d=""+a+e;l.push(d),r[d]={node:c,lastCount:0},i[d]={};for(let e=0;e<n.length;e++){let a=n[e];r[a]&&r[a].node.mode===c.mode?(i[a][d]=f(r[a].lastCount+c.length,c.mode)-f(r[a].lastCount,c.mode),r[a].lastCount+=c.length):(r[a]&&(r[a].lastCount=c.length),i[a][d]=f(c.length,c.mode)+4+o.getCharCountIndicator(c.mode,t))}}n=l}for(let e=0;e<n.length;e++)i[n[e]].end=0;return{map:i,table:r}}(function(e){let t=[];for(let r=0;r<e.length;r++){let i=e[r];switch(i.mode){case o.NUMERIC:t.push([i,{data:i.data,mode:o.ALPHANUMERIC,length:i.length},{data:i.data,mode:o.BYTE,length:i.length}]);break;case o.ALPHANUMERIC:t.push([i,{data:i.data,mode:o.BYTE,length:i.length}]);break;case o.KANJI:t.push([i,{data:i.data,mode:o.BYTE,length:u(i.data)}]);break;case o.BYTE:t.push([{data:i.data,mode:o.BYTE,length:u(i.data)}])}}return t}(p(e,c.isKanjiModeEnabled())),r),n=d.find_path(i.map,"start","end"),a=[];for(let e=1;e<n.length-1;e++)a.push(i.table[n[e]].node);return t.fromArray(a.reduce(function(e,t){let r=e.length-1>=0?e[e.length-1]:null;return r&&r.mode===t.mode?e[e.length-1].data+=t.data:e.push(t),e},[]))},t.rawSplit=function(e){return t.fromArray(p(e,c.isKanjiModeEnabled()))}},64065:(e,t,r)=>{let o=r(24828),i=r(21488);function n(e){this.mode=o.KANJI,this.data=e}n.getBitsLength=function(e){return 13*e},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(e){let t;for(t=0;t<this.data.length;t++){let r=i.toSJIS(this.data[t]);if(r>=33088&&r<=40956)r-=33088;else if(r>=57408&&r<=60351)r-=49472;else throw Error("Invalid SJIS character: "+this.data[t]+"\nMake sure your charset is UTF-8");r=(r>>>8&255)*192+(255&r),e.put(r,13)}},e.exports=n},72451:(e,t,r)=>
1569{let o=r(24828),i=["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 n(e){this.mode=o.ALPHANUMERIC,this.data=e}n.getBitsLength=function(e){return 11*Math.floor(e/2)+e%2*6},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(e){let t;for(t=0;t+2<=this.data.length;t+=2){let r=45*i.indexOf(this.data[t]);r+=i.indexOf(this.data[t+1]),e.put(r,11)}this.data.length%2&&e.put(i.indexOf(this.data[t]),6)},e.exports=n},75005:(e,t,r)=>{let o=r(21488),i=r(95732),n=r(95169),a=r(24828),s=r(41344),l=o.getBCHDigit(7973);function c(e,t){return a.getCharCountIndicator(e,t)+4}t.from=function(e,t){return s.isValid(e)?parseInt(e,10):t},t.getCapacity=function(e,t,r){if(!s.isValid(e))throw Error("Invalid QR Code version");void 0===r&&(r=a.BYTE);let n=(o.getSymbolTotalCodewords(e)-i.getTotalCodewordsCount(e,t))*8;if(r===a.MIXED)return n;let l=n-c(r,e);switch(r){case a.NUMERIC:return Math.floor(l/10*3);case a.ALPHANUMERIC:return Math.floor(l/11*2);case a.KANJI:return Math.floor(l/13);case a.BYTE:default:return Math.floor(l/8)}},t.getBestVersionForData=function(e,r){let o,i=n.from(r,n.M);if(Array.isArray(e)){if(e.length>1){for(let r=1;r<=40;r++)if(function(e,t){let r=0;return e.forEach(function(e){let o=c(e.mode,t);r+=o+e.getBitsLength()}),r}(e,r)<=t.getCapacity(r,i,a.MIXED))return r;return}if(0===e.length)return 1;o=e[0]}else o=e;return function(e,r,o){for(let i=1;i<=40;i++)if(r<=t.getCapacity(i,o,e))return i}(o.mode,o.getLength(),i)},t.getEncodedBits=function(e){if(!s.isValid(e)||e<7)throw Error("Invalid QR Code version");let t=e<<12;for(;o.getBCHDigit(t)-l>=0;)t^=7973<<o.getBCHDigit(t)-l;return e<<12|t}},75557:e=>{e.exports=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}},76458:e=>{"use strict";var t={single_source_shortest_paths:function(e,r,o){var i,n,a,s,l,c,d,u={},h={};h[r]=0;var p=t.PriorityQueue.make();for(p.push(r,0);!p.empty();)for(a in n=(i=p.pop()).value,s=i.cost,l=e[n]||{})l.hasOwnProperty(a)&&(c=s+l[a],d=h[a],(void 0===h[a]||d>c)&&(h[a]=c,p.push(a,c),u[a]=n));if(void 0!==o&&void 0===h[o])throw Error("Could not find a path from "+r+" to "+o+".");return u},extract_shortest_path_from_predecessor_list:function(e,t){for(var r=[],o=t;o;)r.push(o),e[o],o=e[o];return r.reverse(),r},find_path:function(e,r,o){var i=t.single_source_shortest_paths(e,r,o);return t.extract_shortest_path_from_predecessor_list(i,o)},PriorityQueue:{make:function(e){var r,o=t.PriorityQueue,i={};for(r in e=e||{},o)o.hasOwnProperty(r)&&(i[r]=o[r]);return i.queue=[],i.sorter=e.sorter||o.default_sorter,i},default_sorter:function(e,t){return e.cost-t.cost},push:function(e,t){this.queue.push({value:e,cost:t}),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};e.exports=t},80464:(e,t,r)=>{let o=r(29825);function i(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}i.prototype.initialize=function(e){this.degree=e,this.genPoly=o.generateECPolynomial(this.degree)},i.prototype.encode=function(e){if(!this.genPoly)throw Error("Encoder not initialized");let t=new Uint8Array(e.length+this.degree);t.set(e);let r=o.mod(t,this.genPoly),i=this.degree-r.length;if(i>0){let e=new Uint8Array(this.degree);return e.set(r,i),e}return r},e.exports=i},87583:(e,t,r)=>{let o=r(21488).getSymbolSize;t.getRowColCoords=function(e){if(1===e)return[];let t=Math.floor(e/7)+2,r=o(e),i=145===r?26:2*Math.ceil((r-13)/(2*t-2)),n=[r-7];for(let e=1;e<t-1;e++)n[e]=n[e-1]-i;return n.push(6),n.reverse()},t.getPositions=function(e){let r=[],o=t.getRowColCoords(e),i=o.length;for(let e=0;e<i;e++)for(let t=0;t<i;t++)(0!==e||0!==t)&&(0!==e||t!==i-1)&&(e!==i-1||0!==t)&&r.push([o[e],o[t]]);return r}},95169:(e,t)=>{t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2},t.isValid=function(e){return e&&void 0!==e.bit&&e.bit>=0&&e.bit<4},t.from=function(e,r){if(t.isValid(e))return e;try{if("string"!=typeof e)throw Error("Param is not a string");switch(e.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw Error("Unknown EC Level: "+e)}}catch(e){return r}}},95732:(e,t,r)=>
1569{let o=r(95169),i=[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],n=[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];t.getBlocksCount=function(e,t){switch(t){case o.L:return i[(e-1)*4+0];case o.M:return i[(e-1)*4+1];case o.Q:return i[(e-1)*4+2];case o.H:return i[(e-1)*4+3];default:return}},t.getTotalCodewordsCount=function(e,t){switch(t){case o.L:return n[(e-1)*4+0];case o.M:return n[(e-1)*4+1];case o.Q:return n[(e-1)*4+2];case o.H:return n[(e-1)*4+3];default:return}}},96127:(e,t,r)=>{let o=r(10364);t.render=function(e,t,r){var i;let n=r,a=t;void 0!==n||t&&t.getContext||(n=t,t=void 0),t||(a=function(){try{return document.createElement("canvas")}catch(e){throw Error("You need to specify a canvas element")}}()),n=o.getOptions(n);let s=o.getImageWidth(e.modules.size,n),l=a.getContext("2d"),c=l.createImageData(s,s);return o.qrToImageData(c.data,e,n),i=a,l.clearRect(0,0,i.width,i.height),i.style||(i.style={}),i.height=s,i.width=s,i.style.height=s+"px",i.style.width=s+"px",l.putImageData(c,0,0),a},t.renderToDataURL=function(e,r,o){let i=o;void 0!==i||r&&r.getContext||(i=r,r=void 0),i||(i={});let n=t.render(e,r,i),a=i.type||"image/png",s=i.rendererOpts||{};return n.toDataURL(a,s.quality)}}}]);
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.