PageSourceSearch

https://pharos-mvp.vercel.app/_next/static/chunks/b79b4d29873911fb.js

js pharos-mvp.vercel.app collected 2026-10-03 07:29:16 UTC 1,380,143 bytes, 1 lines download raw bytes

vendor: 4,755 bytes, line 1
1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,176822,(e,t,n)=>{!function(r,i){"use strict";var a="function",o="undefined",s="object",l="string",c="major",d="model",u="name",h="type",p="vendor",f="version",g="architecture",m="console",y="mobile",b="tablet",w="smarttv",x="wearable",C="embedded",E="Amazon",k="Apple",S="ASUS",I="BlackBerry",A="Browser",T="Chrome",_="Firefox",j="Google",P="Honor",$="Huawei",N="Microsoft",O="Motorola",M="Nvidia",R="OnePlus",L="Opera",D="OPPO",F="Samsung",U="Sharp",B="Sony",z="Xiaomi",W="Zebra",q="Facebook",H="Chromium OS",V="Mac OS",G=" Browser",K=function(e,t){var n={};for(var r in e)t[r]&&t[r].length%2==0?n[r]=t[r].concat(e[r]):n[r]=e[r];return n},Y=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},Z=function(e,t){return typeof e===l&&-1!==J(t).indexOf(J(e))},J=function(e){return e.toLowerCase()},Q=function(e,t){if(typeof e===l)return e=e.replace(/^\s\s*/,""),typeof t===o?e:e.substring(0,500)},X=function(e,t){for(var n,r,o,l,c,d,u=0;u<t.length&&!c;){var h=t[u],p=t[u+1];for(n=r=0;n<h.length&&!c&&h[n];)if(c=h[n++].exec(e))for(o=0;o<p.length;o++)d=c[++r],typeof(l=p[o])===s&&l.length>0?2===l.length?typeof l[1]==a?this[l[0]]=l[1].call(this,d):this[l[0]]=l[1]:3===l.length?typeof l[1]!==a||l[1].exec&&l[1].test?this[l[0]]=d?d.replace(l[1],l[2]):void 0:this[l[0]]=d?l[1].call(this,d,l[2]):void 0:4===l.length&&(this[l[0]]=d?l[3].call(this,d.replace(l[1],l[2])):i):this[l]=d||i;u+=2}},ee=function(e,t){for(var n in t)if(typeof t[n]===s&&t[n].length>0){for(var r=0;r<t[n].length;r++)if(Z(t[n][r],e))return"?"===n?i:n}else if(Z(t[n],e))return"?"===n?i:n;return t.hasOwnProperty("*")?t["*"]:e},et={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},en={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[f,[u,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[f,[u,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[u,f],[/opios[\/ ]+([\w\.]+)/i],[f,[u,L+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[f,[u,L+" GX"]],[/\bopr\/([\w\.]+)/i],[f,[u,L]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[f,[u,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[f,[u,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i,/(heytap|ovi|115)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[u,f],[/quark(?:pc)?\/([-\w\.]+)/i],[f,[u,"Quark"]],[/\bddg\/([\w\.]+)/i],[f,[u,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[f,[u,"UC"+A]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[f,[u,"WeChat"]],[/konqueror\/([\w\.]+)/i],[f,[u,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[f,[u,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[f,[u,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[f,[u,"Smart Lenovo "+A]],[/(avast|avg)\/([\w\.]+)/i],[[u,/(.+)/,"$1 Secure "+A],f],[/\bfocus\/([\w\.]+)/i],[f,[u,_+" Focus"]],[/\bopt\/([\w\.]+)/i],[f,[u,L+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[f,[u,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[f,[u,"Dolphin"]],[/coast\/([\w\.]+)/i],[f,[u,L+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[f,[u,"MIUI"+G]],[/fxios\/([\w\.-]+)/i],[f,[u,_]],[/\bqihoobrowser\/?([\w\.]*)/i],[f,[u,"360"]],[/\b(qq)\/([\w\.]+)/i],[[u,/(.+)/,"$1Browser"],f],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[u,/(.+)/,"$1"+G],f],[/samsungbrowser\/([\w\.]+)/i],[f,[u,F+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[f,[u,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[u,"Sogou Mobile"],f],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[u,f],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[u],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[f,u],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[u,q],f],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[u,f],[/\bgsa\/([\w\.]+) .*safari\//i],[f,[u,"GSA"]],[/musical_ly(?:.
1+app_?version\/|_)([\w\.]+)/i],[f,[u,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[f,[u,T+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[u,T+" WebView"],f],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[f,[u,"Android "+A]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[u,f],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[f,[u,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[f,u],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[u,[f,ee,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[u,f],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[u,"Netscape"],f],[/(wolvic|librewolf)\/([\w\.]+)/i],[u,f],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[f,[u,_+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[u,[f,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[u,[f,/master.|lts./,""]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[g,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[g,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[g,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[g,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[g,"arm"]],[/((ppc|powerpc)(64)?)( mac|;|\))/i],[[g,/ower/,"",J]],[/ sun4\w[;\)]/i],[[g,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i],[[g,J]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[d,[p,F],[h,b]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[d,[p,F],[h,y]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[d,[p,k],[h,y]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[d,[p,k],[h,b]],[/(macintosh);/i],[d,[p,k]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[d,[p,U],[h,y]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[d,[p,P],[h,b]],[/honor([-\w ]+)[;\)]/i],[d,[p,P],[h,y]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[d,[p,$],[h,b]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[d,[p,$],[h,y]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[d,/_/g," "],[p,z],[h,b]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[d,/_/g," "],[p,z],[h,y]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[d,[p,D],[h,y]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[d,[p,ee,{OnePlus:["304","403","203"],"*":D}],[h,b]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[d,[p,"Vivo"],[h,y]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[d,[p,"Realme"],[h,y]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto(?! 360)[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[d,[p,O],[h,y]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[d,[p,O],[h,b]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[d,[p,"LG"],[h,b]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv|watch)\w+)/i,/\blg-?([\d\w]+) bui/i],[d,[p,"LG"],[h,y]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}
1(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[d,[p,"Lenovo"],[h,b]],[/(nokia) (t[12][01])/i],[p,d,[h,b]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*))/i],[[d,/_/g," "],[h,y],[p,"Nokia"]],[/(pixel (c|tablet))\b/i],[d,[p,j],[h,b]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[d,[p,j],[h,y]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[d,[p,B],[h,y]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[d,"Xperia Tablet"],[p,B],[h,b]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[d,[p,R],[h,y]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[d,[p,E],[h,b]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[d,/(.+)/g,"Fire Phone $1"],[p,E],[h,y]],[/(playbook);[-\w\),; ]+(rim)/i],[d,p,[h,b]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[d,[p,I],[h,y]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[d,[p,S],[h,b]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[d,[p,S],[h,y]],[/(nexus 9)/i],[d,[p,"HTC"],[h,b]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[p,[d,/_/g," "],[h,y]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[d,[p,"TCL"],[h,b]],[/(itel) ((\w+))/i],[[p,J],d,[h,ee,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[d,[p,"Acer"],[h,b]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[d,[p,"Meizu"],[h,y]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[d,[p,"Ulefone"],[h,y]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[d,[p,"Energizer"],[h,y]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[d,[p,"Cat"],[h,y]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[d,[p,"Smartfren"],[h,y]],[/droid.+; (a(?:015|06[35]|142p?))/i],[d,[p,"Nothing"],[h,y]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[d,[p,"Archos"],[h,b]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[d,[p,"Archos"],[h,y]],[/(imo) (tab \w+)/i,/(infinix) (x1101b?)/i],[p,d,[h,b]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (hmd|imo) ([\w ]+?)(?: bui|\))/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i,/(oppo) ?([\w ]+) bui/i],[p,d,[h,y]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[p,d,[h,b]],[/(surface duo)/i],[d,[p,N],[h,b]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[d,[p,"Fairphone"],[h,y]],[/(u304aa)/i],[d,[p,"AT&T"],[h,y]],[/\bsie-(\w*)/i],[d,[p,"Siemens"],[h,y]],[/\b(rct\w+) b/i],[d,[p,"RCA"],[h,b]],[/\b(venue[\d ]{2,7}) b/i],[d,[p,"Dell"],[h,b]],[/\b(q(?:mv|ta)\w+) b/i],[d,[p,"Verizon"],[h,b]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[d,[p,"Barnes & Noble"],[h,b]],[/\b(tm\d{3}\w+) b/i],[d,[p,"NuVision"],[h,b]],[/\b(k88) b/i],[d,[p,"ZTE"],[h,b]],[/\b(nx\d{3}j) b/i],[d,[p,"ZTE"],[h,y]],[/\b(gen\d{3}) b.+49h/i],[d,[p,"Swiss"],[h,y]],[/\b(zur\d{3}) b/i],[d,[p,"Swiss"],[h,b]],[/\b((zeki)?tb.*\b) b/i],[d,[p,"Zeki"],[h,b]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[p,"Dragon Touch"],d,[h,b]],[/\b(ns-?\w{0,9}) b/i],[d,[p,"Insignia"],[h,b]],[/\b((nxa|next)-?\w{0,9}) b/i],[d,[p,"NextBook"],[h,b]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[p,"Voice"],d,[h,y]],[/\b(lvtel\-)?(v1[12]) b/i],[[p,"LvTel"],d,[h,y]],[/\b(ph-1) /i],[d,[p,"Essential"],[h,y]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[d,[p,"Envizen"],[h,b]],[/\b(trio[-\w\. ]+) b/i],[d,[p,"MachSpeed"],[h,b]],[/\btu_(1491) b/i],[d,[p,"Rotor"],[h,b]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[d,[p,M],[h,b]],[/(sprint) (\w+)/i],[p,d,[h,y]],[/(kin\.[onetw]{3})/i],[[d,/\./g," "],[p,N],[h,y]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[d,[p,W],[h,b]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[d,[p,W],[h,y]],[/smart-tv.+(samsung)/i],[p,[h,w]],[/hbbtv.+maple;(\d+)/i],[[d,/^/,"SmartTV"],[p,F],[h,w]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[p,"LG"],[h,w]],[/(apple) ?tv/i],[p,[d,k+" TV"],[h,w]],[/crkey/i],[[d,T+"cast"],[p,j],[h,w]],[/droid.+aft(\w+)( bui|\))/i],[d,[p,E],[h,w]],[/(shield \w+ tv)/i],[d,[p,M],[h,w]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[d,[p,U],[h,w]],[/(bravia[\w ]+)( bui|\))/i],[d,[p,B],[h,w]],[/(mi(tv|box)-?\w+) bui/i],[d,[p,z],[h,w]],[/Hbbtv.*(technisat) (.*);/i],[p,d,[h,w]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[p,Q],[d,Q],[h,w]],[/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i],[d,[h,w]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[h,w]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[p,d,[h,m]],[/droid.+; (shield)( bui|\))/i],[d,[p,M],[h,m]],[/(playstation \w+)/i],[d,[p,B],[h,m]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[d,[p,N],[h,m]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[d,[p,F],[h,x]],[/((pebble))app/i,/(asu
vendor: 4,090 bytes, line 1
1s|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[p,d,[h,x]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[d,[p,D],[h,x]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[d,[p,k],[h,x]],[/(opwwe\d{3})/i],[d,[p,R],[h,x]],[/(moto 360)/i],[d,[p,O],[h,x]],[/(smartwatch 3)/i],[d,[p,B],[h,x]],[/(g watch r)/i],[d,[p,"LG"],[h,x]],[/droid.+; (wt63?0{2,3})\)/i],[d,[p,W],[h,x]],[/droid.+; (glass) \d/i],[d,[p,j],[h,x]],[/(pico) (4|neo3(?: link|pro)?)/i],[p,d,[h,x]],[/; (quest( \d| pro)?)/i],[d,[p,q],[h,x]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[p,[h,C]],[/(aeobc)\b/i],[d,[p,E],[h,C]],[/(homepod).+mac os/i],[d,[p,k],[h,C]],[/windows iot/i],[[h,C]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[d,[h,y]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[d,[h,b]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[h,b]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[h,y]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[d,[p,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[f,[u,"EdgeHTML"]],[/(arkweb)\/([\w\.]+)/i],[u,f],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[f,[u,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[u,f],[/ladybird\//i],[[u,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[f,u]],os:[[/microsoft (windows) (vista|xp)/i],[u,f],[/(windows (?:phone(?: os)?|mobile|iot))[\/ ]?([\d\.\w ]*)/i],[u,[f,ee,et]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[f,ee,et],[u,"Windows"]],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[f,/_/g,"."],[u,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[u,V],[f,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[f,u],[/(ubuntu) ([\w\.]+) like android/i],[[u,/(.+)/,"$1 Touch"],f],[/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen|webos)\w*[-\/; ]?([\d\.]*)/i],[u,f],[/\(bb(10);/i],[f,[u,I]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[f,[u,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[f,[u,_+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[f,[u,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[f,[u,"watchOS"]],[/crkey\/([\d\.]+)/i],[f,[u,T+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[u,H],f],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux)(?: arm\w*| x86\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[u,f],[/(sunos) ?([\w\.\d]*)/i],[[u,"Solaris"],f],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[u,f]]},er=function(e,t){if(typeof e===s&&(t=e,e=i),!(this instanceof er))return new er(e,t).getResult();var n=typeof r!==o&&r.navigator?r.navigator:i,m=e||(n&&n.userAgent?n.userAgent:""),w=n&&n.userAgentData?n.userAgentData:i,x=t?K(en,t):en,C=n&&n.userAgent==m;return this.getBrowser=function(){var e,t={};return t[u]=i,t[f]=i,X.call(t,m,x.browser),t[c]=typeof(e=t[f])===l?e.replace(/[^\d\.]/g,"").split(".")[0]:i,C&&n&&n.brave&&typeof n.brave.isBrave==a&&(t[u]="Brave"),t},this.getCPU=function(){var e={};return e[g]=i,X.call(e,m,x.cpu),e},this.getDevice=function(){var e={};
1return e[p]=i,e[d]=i,e[h]=i,X.call(e,m,x.device),C&&!e[h]&&w&&w.mobile&&(e[h]=y),C&&"Macintosh"==e[d]&&n&&typeof n.standalone!==o&&n.maxTouchPoints&&n.maxTouchPoints>2&&(e[d]="iPad",e[h]=b),e},this.getEngine=function(){var e={};return e[u]=i,e[f]=i,X.call(e,m,x.engine),e},this.getOS=function(){var e={};return e[u]=i,e[f]=i,X.call(e,m,x.os),C&&!e[u]&&w&&w.platform&&"Unknown"!=w.platform&&(e[u]=w.platform.replace(/chrome os/i,H).replace(/macos/i,V)),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return m},this.setUA=function(e){return m=typeof e===l&&e.length>500?Q(e,500):e,this},this.setUA(m),this};if(er.VERSION="1.0.41",er.BROWSER=Y([u,f,c]),er.CPU=Y([g]),er.DEVICE=Y([d,p,h,m,y,w,b,x,C]),er.ENGINE=er.OS=Y([u,f]),typeof n!==o)t.exports&&(n=t.exports=er),n.UAParser=er;else if(typeof define===a&&define.amd)e.r,i!==er&&e.v(er);else typeof r!==o&&(r.UAParser=er);var ei=typeof r!==o&&(r.jQuery||r.Zepto);if(ei&&!ei.ua){var ea=new er;ei.ua=ea.getResult(),ei.ua.get=function(){return ea.getUA()},ei.ua.set=function(e){ea.setUA(e);var t=ea.getResult();for(var n in t)ei.ua[n]=t[n]}}}("object"==typeof window?window:e.e)},33750,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e.r(271645),i=function(e){return e&&"object"==typeof e&&"default"in e?e.default:e}(r),a=e.r(176822),o=new a,s=o.getBrowser(),l=o.getCPU(),c=o.getDevice(),d=o.getEngine(),u=o.getOS(),h=o.getUA(),p=function(e){return o.setUA(e)},f=function(e){if(!e)return void console.error("No userAgent string was provided");var t=new a(e);return{UA:t,browser:t.getBrowser(),cpu:t.getCPU(),device:t.getDevice(),engine:t.getEngine(),os:t.getOS(),ua:t.getUA(),setUserAgent:function(e){return t.setUA(e)}}},g=Object.freeze({ClientUAInstance:o,browser:s,cpu:l,device:c,engine:d,os:u,ua:h,setUa:p,parseUserAgent:f});function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function y(e){return(y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function b(){return(b=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function w(e){return(w=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function x(e,t){return(x=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function C(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function E(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var S={Mobile:"mobile",Tablet:"tablet",SmartTv:"smarttv",Console:"console",Wearable:"wearable",Embedded:"embedded",Browser:void 0},I={Chrome:"Chrome",Firefox:"Firefox",Opera:"Opera",Yandex:"Yandex",Safari:"Safari",InternetExplorer:"Internet Explorer",Edge:"Edge",Chromium:"Chromium",Ie:"IE",MobileSafari:"Mobile Safari",EdgeChromium:"Edge Chromium",MIUI:"MIUI Browser",SamsungBrowser:"Samsung Browser"},A={IOS:"iOS",Android:"Android",WindowsPhone:"Windows Phone",Windows:"Windows",MAC_OS:"Mac OS"},T={isMobile:!1,isTablet:!1,isBrowser:!1,isSmartTV:!1,isConsole:!1,isWearable:!1},_=function(e){switch(e){case S.Mobile:return{isMobile:!0};case S.Tablet:return{isTablet:!0};case S.SmartTv:return{isSmartTV:!0};case S.Console:return{isConsole:!0};case S.Wearable:return{isWearable:!0};case S.Browser:return{isBrowser:!0};case S.Embedded:return{isEmbedded:!0};default:return T}},j=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"none";return e||t},P=function(){return!!("undefined"!=typeof window&&(window.navigator||navigator))&&(window.navigator||navigator)},$=function(e){var t=P();return t&&t.platform&&(-1!==t.platform.indexOf(e)||"MacIntel"===t.platform&&t.maxTouchPoints>1&&!window.MSStream)},N=function(e){return e.type===S.Mobile},O=function(e){return e.type===S.Tablet},M=function(e){var t=e.type;return t===S.Mobile||t===S.Tablet},R=function(e){return e.type===S.SmartTv},L=function(e){return e.type===S.Browser},D=function(e){return e.type===S.Wearable},F=function(e){return e.type===S.Console},U=function(e){return e.type===S.Embedded},B=function(e){return j(e.vendor)},z=function(e){return j(e.model)}
vendor: 9,819 bytes, line 1
1,W=function(e){return j(e.type,"browser")},q=function(e){return e.name===A.Android},H=function(e){return e.name===A.Windows},V=function(e){return e.name===A.MAC_OS},G=function(e){return e.name===A.WindowsPhone},K=function(e){return e.name===A.IOS},Y=function(e){return j(e.version)},Z=function(e){return j(e.name)},J=function(e){return e.name===I.Chrome},Q=function(e){return e.name===I.Firefox},X=function(e){return e.name===I.Chromium},ee=function(e){return e.name===I.Edge},et=function(e){return e.name===I.Yandex},en=function(e){var t=e.name;return t===I.Safari||t===I.MobileSafari},er=function(e){return e.name===I.MobileSafari},ei=function(e){return e.name===I.Opera},ea=function(e){var t=e.name;return t===I.InternetExplorer||t===I.Ie},eo=function(e){return e.name===I.MIUI},es=function(e){return e.name===I.SamsungBrowser},el=function(e){return j(e.version)},ec=function(e){return j(e.major)},ed=function(e){return j(e.name)},eu=function(e){return j(e.name)},eh=function(e){return j(e.version)},ep=function(){var e=P(),t=e&&e.userAgent&&e.userAgent.toLowerCase();return"string"==typeof t&&/electron/.test(t)},ef=function(e){return"string"==typeof e&&-1!==e.indexOf("Edg/")},eg=function(){var e=P();return e&&(/iPad|iPhone|iPod/.test(e.platform)||"MacIntel"===e.platform&&e.maxTouchPoints>1)&&!window.MSStream},em=function(){return $("iPad")},ey=function(){return $("iPhone")},ev=function(){return $("iPod")},eb=function(e){return j(e)};function ew(e){var t=e||g,n=t.device,r=t.browser,i=t.os,a=t.engine,o=t.ua;return{isSmartTV:R(n),isConsole:F(n),isWearable:D(n),isEmbedded:U(n),isMobileSafari:er(r)||em(),isChromium:X(r),isMobile:M(n)||em(),isMobileOnly:N(n),isTablet:O(n)||em(),isBrowser:L(n),isDesktop:L(n),isAndroid:q(i),isWinPhone:G(i),isIOS:K(i)||em(),isChrome:J(r),isFirefox:Q(r),isSafari:en(r),isOpera:ei(r),isIE:ea(r),osVersion:Y(i),osName:Z(i),fullBrowserVersion:el(r),browserVersion:ec(r),browserName:ed(r),mobileVendor:B(n),mobileModel:z(n),engineName:eu(a),engineVersion:eh(a),getUA:eb(o),isEdge:ee(r)||ef(o),isYandex:et(r),deviceType:W(n),isIOS13:eg(),isIPad13:em(),isIPhone13:ey(),isIPod13:ev(),isElectron:ep(),isEdgeChromium:ef(o),isLegacyEdge:ee(r)&&!ef(o),isWindows:H(i),isMacOs:V(i),isMIUI:eo(r),isSamsungBrowser:es(r)}}var ex=R(c),eC=F(c),eE=D(c),ek=U(c),eS=er(s)||em(),eI=X(s),eA=M(c)||em(),eT=N(c),e_=O(c)||em(),ej=L(c),eP=L(c),e$=q(u),eN=G(u),eO=K(u)||em(),eM=J(s),eR=Q(s),eL=en(s),eD=ei(s),eF=ea(s),eU=Y(u),eB=Z(u),ez=el(s),eW=ec(s),eq=ed(s),eH=B(c),eV=z(c),eG=eu(d),eK=eh(d),eY=eb(h),eZ=ee(s)||ef(h),eJ=et(s),eQ=W(c),eX=eg(),e0=em(),e1=ey(),e2=ev(),e3=ep(),e5=ef(h),e4=ee(s)&&!ef(h),e6=H(u),e8=V(u),e9=eo(s),e7=es(s);function te(e){return f(e||window.navigator.userAgent)}n.AndroidView=function(e){var t=e.renderWithFragment,n=e.children,a=C(e,["renderWithFragment","children"]);return e$?t?i.createElement(r.Fragment,null,n):i.createElement("div",a,n):null},n.BrowserTypes=I,n.BrowserView=function(e){var t=e.renderWithFragment,n=e.children,a=C(e,["renderWithFragment","children"]);return ej?t?i.createElement(r.Fragment,null,n):i.createElement("div",a,n):null},n.ConsoleView=function(e){var t=e.renderWithFragment,n=e.children,a=C(e,["renderWithFragment","children"]);return eC?t?i.createElement(r.Fragment,null,n):i.createElement("div",a,n):null},n.CustomView=function(e){var t=e.renderWithFragment,n=e.children,a=(e.viewClassName,e.style,e.condition),o=C(e,["renderWithFragment","children","viewClassName","style","condition"]);return a?t?i.createElement(r.Fragment,null,n):i.createElement("div",o,n):null},n.IEView=function(e){var t=e.renderWithFragment,n=e.children,a=C(e,["renderWithFragment","children"]);return eF?t?i.createElement(r.Fragment,null,n):i.createElement("div",a,n):null},n.IOSView=function(e){var t=e.renderWithFragment,n=e.children,a=C(e,["renderWithFragment","children"]);return eO?t?i.createElement(r.Fragment,null,n):i.createElement("div",a,n):null},n.MobileOnlyView=function(e){var t=e.renderWithFragment,n=e.children,a=(e.viewClassName,e.style,C(e,["renderWithFragment","children","viewClassName","style"]));return eT?t?i.createElement(r.Fragment,null,n):i.createElement("div",a,n):null},n.MobileView=function(e){var t=e.renderWithFragment,n=e.children,a=C(e,["renderWithFragment","children"]);return eA?t?i.createElement(r.Fragment,null,n):i.createElement("div",a,n):null},n.OsTypes=A,n.SmartTVView=function(e){var t=e.renderWithFragment,n=e.children,a=C(e,["renderWithFragment","children"]);return ex?t?i.createElement(r.Fragment,null,n):i.createElement("div",a,n):null},n.TabletView=function(e){var t=e.renderWithFragment,n=e.children,a=C(e,["renderWithFragment","children"]);return e_?t?i.createElement(r.Fragment,null,n):i.createElement("div",a,n):null},n.WearableView=function(e){var t=e.renderWithFragment,n=e.children,a=C(e,["renderWithFragment","children"]);return eE?t?i.createElement(r.Fragment,null,n):i.createElement("div",a,n):null},n.WinPhoneView=function(e){var t=e.renderWithFragment,n=e.children,a=C(e,["renderWithFragment","children"]);return eN?t?i.createElement(r.Fragment,null,n):i.createElement("div",a,n):null},n.browserName=eq,n.browserVersion=eW,n.deviceDetect=function(e){var t,n,r,i,a=e?f(e):g,o=a.device,s=a.browser,l=a.engine,c=a.os,d=a.ua,u=_(o.type),h=u.isBrowser,p=u.isMobile,y=u.isTablet,b=u.isSmartTV,w=u.isConsole,x=u.isWearable,C=u.isEmbedded;if(h)return{isBrowser:h,browserMajorVersion:j(s.major),browserFullVersion:j(s.version),browserName:j(s.name),engineName:j(l.name),engineVersion:j(l.version),osName:j(c.name),osVersion:j(c.version),userAgent:j(d)};if(b)return{isSmartTV:b,engineName:j(l.name),engineVersion:j(l.version),osName:j(c.name),osVersion:j(c.version),userAgent:j(d)};if(w)return{isConsole:w,engineName:j(l.name),engineVersion:j(l.version),osName:j(c.name),osVersion:j(c.version),userAgent:j(d)};if(p||y){return t=u,n=o,r=c,i=d,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach(function(t){var r,i,a;r=e,i=t,a=n[t],i in r?Object.defineProperty(r,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[i]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},t,{vendor:j(n.vendor),model:j(n.model),os:j(r.name),osVersion:j(r.version),ua:j(i)})}return x?{isWearable:x,engineName:j(l.name),engineVersion:j(l.version),osName:j(c.name),osVersion:j(c.version),userAgent:j(d)}:C?{isEmbedded:C,vendor:j(o.vendor),model:j(o.model),engineName:j(l.name),engineVersion:j(l.version),osName:j(c.name),osVersion:j(c.version),userAgent:j(d)}:void 0},n.deviceType=eQ,n.engineName=eG,n.engineVersion=eK,n.fullBrowserVersion=ez,n.getSelectorsByUserAgent=function(e){if(!e||"string"!=typeof e)return void console.error("No valid user agent string was provided");var t=f(e);return ew({device:t.device,browser:t.browser,os:t.os,engine:t.engine,ua:t.ua})},n.getUA=eY,n.isAndroid=e$,n.isBrowser=ej,n.isChrome=eM,n.isChromium=eI,n.isConsole=eC,n.isDesktop=eP,n.isEdge=eZ,n.isEdgeChromium=e5,n.isElectron=e3,n.isEmbedded=ek,n.isFirefox=eR,n.isIE=eF,n.isIOS=eO,n.isIOS13=eX,n.isIPad13=e0,n.isIPhone13=e1,n.isIPod13=e2,n.isLegacyEdge=e4,n.isMIUI=e9,n.isMacOs=e8,n.isMobile=eA,n.isMobileOnly=eT,n.isMobileSafari=eS,n.isOpera=eD,n.isSafari=eL,n.isSamsungBrowser=e7,n.isSmartTV=ex,n.isTablet=e_,n.isWearable=eE,n.isWinPhone=eN,n.isWindows=e6,n.isYandex=eJ,n.mobileModel=eV,n.mobileVendor=eH,n.osName=eB,n.osVersion=eU,n.parseUserAgent=f,n.setUserAgent=function(e){return p(e)},n.useDeviceData=te,n.useDeviceSelectors=function(e){var t=te(e||window.navigator.userAgent);return[ew(t),t]},n.useMobileOrientation=function(){var e,t=function(e){if(Array.isArray(e))return e}(e=r.useState(function(){var e=90*(window.innerWidth>window.innerHeight);return{isPortrait:0===e,isLandscape:90===e,orientation:0===e?"portrait":"landscape"}}))||function(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),a.length!==t);o=!0);}catch(e){s=!0,r=e}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}(e,2)||function(e,t){if(e){if("string"==typeof e)return k(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return k(e,t)}}(e,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),n=t[0],i=t[1],a=r.useCallback(function(){var e=90*(window.innerWidth>window.innerHeight),t={isPortrait:0===e,isLandscape:90===e,orientation:0===e?"portrait":"landscape"};n.orientation!==t.orientation&&i(t)},[n.orientation]);return r.useEffect(function(){return("undefined"==typeof window?"undefined":y(window))!==void 0&&eA&&(a(),window.addEventListener("load",a,!1),window.addEventListener("resize",a,!1)),function(){window.removeEventListener("resize",a,!1),window.removeEventListener("load",a,!1)}},[a]),n},n.withOrientationChange=function(e){return function(t){var n;if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");function r(e){var t;if(!(this instanceof r))throw TypeError("Cannot call a class as a function");return(t=function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return E(e)}(this,w(r).call(this,e))).isEventListenerAdded=!1,t.handleOrientationChange=t.handleOrientationChange.bind(E(t)),t.onOrientationChange=t.onOr
1ientationChange.bind(E(t)),t.onPageLoad=t.onPageLoad.bind(E(t)),t.state={isLandscape:!1,isPortrait:!1},t}return r.prototype=Object.create(t&&t.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),t&&x(r,t),n=[{key:"handleOrientationChange",value:function(){this.isEventListenerAdded||(this.isEventListenerAdded=!0);var e=90*(window.innerWidth>window.innerHeight);this.setState({isPortrait:0===e,isLandscape:90===e})}},{key:"onOrientationChange",value:function(){this.handleOrientationChange()}},{key:"onPageLoad",value:function(){this.handleOrientationChange()}},{key:"componentDidMount",value:function(){("undefined"==typeof window?"undefined":y(window))!==void 0&&eA&&(this.isEventListenerAdded?window.removeEventListener("load",this.onPageLoad,!1):(this.handleOrientationChange(),window.addEventListener("load",this.onPageLoad,!1)),window.addEventListener("resize",this.onOrientationChange,!1))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.onOrientationChange,!1)}},{key:"render",value:function(){return i.createElement(e,b({},this.props,{isLandscape:this.state.isLandscape,isPortrait:this.state.isPortrait}))}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(r.prototype,n),r}(i.Component)}},840796,932763,e=>{"use strict";e.s(["decode",()=>i,"encode",()=>r],840796),e.s(["decoder",()=>n,"encoder",()=>t],932763),crypto;let t=new TextEncoder,n=new TextDecoder,r=e=>(e=>{let n=e;"string"==typeof n&&(n=t.encode(n));let r=[];for(let e=0;e<n.length;e+=32768)r.push(String.fromCharCode.apply(null,n.subarray(e,e+32768)));return btoa(r.join(""))})(e).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_"),i=e=>{let t=e;t instanceof Uint8Array&&(t=n.decode(t)),t=t.replace(/-/g,"+").replace(/_/g,"/").replace(/\s/g,"");try{return(e=>{let t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n})(t)}catch(e){throw TypeError("The input to be decoded is not correctly encoded.")}}},716100,e=>{"use strict";e.s(["WalletCreate",()=>t,"WalletGet",()=>n,"WalletRpc",()=>r,"WalletUpdate",()=>i,"WalletsRevoke",()=>a]);let t={path:"/api/v1/wallets",method:"POST"},n={path:"/api/v1/wallets/:wallet_id",method:"GET"},r={path:"/api/v1/wallets/:wallet_id/rpc",method:"POST"},i={path:"/api/v1/wallets/:wallet_id",method:"PATCH"},a={path:"/api/v1/wallets/revoke",method:"POST"}},331191,e=>{"use strict";e.s(["arbitrum",()=>t]);let t={id:42161,name:"Arbitrum One",network:"arbitrum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{privy:{http:["https://arbitrum-mainnet.rpc.privy.systems"]},alchemy:{http:["https://arb-mainnet.g.alchemy.com/v2"],webSocket:["wss://arb-mainnet.g.alchemy.com/v2"]},infura:{http:["https://arbitrum-mainnet.infura.io/v3"],webSocket:["wss://arbitrum-mainnet.infura.io/ws/v3"]},default:{http:["https://arb1.arbitrum.io/rpc"]},public:{http:["https://arb1.arbitrum.io/rpc"]}},blockExplorers:{etherscan:{name:"Arbiscan",url:"https://arbiscan.io"},default:{name:"Arbiscan",url:"https://arbiscan.io"}}}},435528,e=>{"use strict";e.s(["arbitrumSepolia",()=>t]);let t={id:421614,name:"Arbitrum Sepolia",network:"arbitrum-sepolia",nativeCurrency:{name:"Arbitrum Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{privy:{http:["https://arbitrum-sepolia.rpc.privy.systems"]}
1,default:{http:["https://sepolia-rollup.arbitrum.io/rpc"]},public:{http:["https://sepolia-rollup.arbitrum.io/rpc"]}},blockExplorers:{default:{name:"Blockscout",url:"https://sepolia-explorer.arbitrum.io"}},testnet:!0}},853317,e=>{"use strict";e.s(["avalanche",()=>t]);let t={id:43114,name:"Avalanche",network:"avalanche",nativeCurrency:{decimals:18,name:"Avalanche",symbol:"AVAX"},rpcUrls:{default:{http:["https://api.avax.network/ext/bc/C/rpc"]},public:{http:["https://api.avax.network/ext/bc/C/rpc"]}},blockExplorers:{etherscan:{name:"SnowTrace",url:"https://snowtrace.io"},default:{name:"SnowTrace",url:"https://snowtrace.io"}}}},47258,e=>{"use strict";e.s(["avalancheFuji",()=>t]);let t={id:43113,name:"Avalanche Fuji",network:"avalanche-fuji",nativeCurrency:{decimals:18,name:"Avalanche Fuji",symbol:"AVAX"},rpcUrls:{default:{http:["https://api.avax-test.network/ext/bc/C/rpc"]},public:{http:["https://api.avax-test.network/ext/bc/C/rpc"]}},blockExplorers:{etherscan:{name:"SnowTrace",url:"https://testnet.snowtrace.io"},default:{name:"SnowTrace",url:"https://testnet.snowtrace.io"}},testnet:!0}},83319,e=>{"use strict";e.s(["base",()=>t]);let t={id:8453,network:"base",name:"Base",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{privy:{http:["https://base-mainnet.rpc.privy.systems"]},blast:{http:["https://base-mainnet.blastapi.io"],webSocket:["wss://base-mainnet.blastapi.io"]},default:{http:["https://mainnet.base.org"]},public:{http:["https://mainnet.base.org"]}},blockExplorers:{etherscan:{name:"Basescan",url:"https://basescan.org"},default:{name:"Basescan",url:"https://basescan.org"}}}},975477,e=>{"use strict";e.s(["baseSepolia",()=>t]);let t={id:84532,network:"base-sepolia",name:"Base Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{privy:{http:["https://base-sepolia.rpc.privy.systems"]},default:{http:["https://sepolia.base.org"]},public:{http:["https://sepolia.base.org"]}},blockExplorers:{default:{name:"Blockscout",url:"https://base-sepolia.blockscout.com"}},testnet:!0}},470898,374889,958747,93954,76547,497450,872836,922649,538838,683898,223082,e=>{"use strict";e.s(["berachainArtio",()=>t],470898);let t={id:80085,network:"berachain-artio",name:"Berachain Artio",nativeCurrency:{name:"BERA",symbol:"BERA",decimals:18},rpcUrls:{default:{http:["https://berachain-artio.rpc.privy.systems"]},public:{http:["https://berachain-artio.rpc.privy.systems"]}},blockExplorers:{default:{name:"Beratrail",url:"https://artio.beratrail.io"}},testnet:!0};e.s(["bsc",()=>n],374889);let n={id:56,network:"bsc",name:"Binance Smart Chain",nativeCurrency:{name:"BNB",symbol:"BNB",decimals:18},rpcUrls:{privy:{http:["https://bsc-mainnet.rpc.privy.systems"]},default:{http:["https://56.rpc.thirdweb.com"]},public:{http:["https://56.rpc.thirdweb.com"]}},blockExplorers:{etherscan:{name:"BscScan",url:"https://bscscan.com"},default:{name:"BscScan",url:"https://bscscan.com"}}};e.s(["celo",()=>r],958747);let r={id:42220,name:"Celo Mainnet",network:"celo",nativeCurrency:{decimals:18,name:"CELO",symbol:"CELO"},rpcUrls:{default:{http:["https://forno.celo.org"]},infura:{http:["https://celo-mainnet.infura.io/v3"]},public:{http:["https://forno.celo.org"]}},blockExplorers:{default:{name:"Celo Explorer",url:"https://explorer.celo.org/mainnet"},etherscan:{name:"CeloScan",url:"https://celoscan.io"}},testnet:!1};e.s(["celoAlfajores",()=>i],93954);let i={id:44787,name:"Celo Alfajores Testnet",network:"celo-alfajores",nativeCurrency:{decimals:18,name:"CELO",symbol:"CELO"},rpcUrls:{default:{http:["https://alfajores-forno.celo-testnet.org"]},infura:{http:["https://celo-alfajores.infura.io/v3"]},public:{http:["https://alfajores-forno.celo-testnet.org"]}},blockExplorers:{default:{name:"Celo Explorer",url:"https://explorer.celo.org/alfajores"},etherscan:{name:"CeloScan",url:"https://alfajores.celoscan.io/"}},testnet:!0};e.s(["filecoin",()=>a],76547);let a={id:314,name:"Filecoin - Mainnet",network:"filecoin-mainnet",nativeCurrency:{decimals:18,name:"filecoin",symbol:"FIL"},rpcUrls:{default:{http:["https://api.node.glif.io/rpc/v1"]},public:{http:["https://api.node.glif.io/rpc/v1"]}},blockExplorers:{default:{name:"Filfox",url:"https://filfox.info/en"},filscan:{name:"Filscan",url:"https://filscan.io"},filscout:{name:"Filscout",url:"https://filscout.io/en"},glif:{name:"Glif",url:"https://explorer.glif.io"}}};e.s(["filecoinCalibration",()=>o],497450);
1let o={id:314159,name:"Filecoin - Calibration testnet",network:"filecoin-calibration",nativeCurrency:{decimals:18,name:"testnet filecoin",symbol:"tFIL"},rpcUrls:{default:{http:["https://api.calibration.node.glif.io/rpc/v1"]},public:{http:["https://api.calibration.node.glif.io/rpc/v1"]}},blockExplorers:{default:{name:"Filscan",url:"https://calibration.filscan.io"}}};e.s(["garnetHolesky",()=>s],872836);let s={id:17069,name:"Garnet Holesky",network:"garnet-holesky",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.garnetchain.com"]},public:{http:["https://rpc.garnetchain.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.garnetchain.com"}}};e.s(["holesky",()=>l],922649);let l={id:17e3,name:"Holesky",network:"holesky",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://ethereum-holesky.publicnode.com"]},public:{http:["https://ethereum-holesky.publicnode.com"]}},blockExplorers:{etherscan:{name:"EtherScan",url:"https://holesky.etherscan.io"},default:{name:"EtherScan",url:"https://holesky.etherscan.io"}}};e.s(["linea",()=>c],538838);let c={id:59144,network:"linea-mainnet",name:"Linea Mainnet",nativeCurrency:{name:"Linea Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.linea.build"],webSocket:["wss://rpc.linea.build"]},public:{http:["https://rpc.linea.build"],webSocket:["wss://rpc.linea.build"]}},blockExplorers:{default:{name:"Etherscan",url:"https://lineascan.build"},etherscan:{name:"Etherscan",url:"https://lineascan.build"}},testnet:!1};e.s(["lineaTestnet",()=>d],683898);let d={id:59140,network:"linea-testnet",name:"Linea Goerli Testnet",nativeCurrency:{name:"Linea Ether",symbol:"ETH",decimals:18},rpcUrls:{infura:{http:["https://linea-goerli.infura.io/v3"],webSocket:["wss://linea-goerli.infura.io/ws/v3"]},default:{http:["https://rpc.goerli.linea.build"],webSocket:["wss://rpc.goerli.linea.build"]},public:{http:["https://rpc.goerli.linea.build"],webSocket:["wss://rpc.goerli.linea.build"]}},blockExplorers:{default:{name:"Etherscan",url:"https://goerli.lineascan.build"},etherscan:{name:"Etherscan",url:"https://goerli.lineascan.build"}},testnet:!0};e.s(["lukso",()=>u],223082);let u={id:42,network:"lukso",name:"LUKSO",nativeCurrency:{name:"LUKSO",symbol:"LYX",decimals:18},rpcUrls:{default:{http:["https://rpc.mainnet.lukso.network"],webSocket:["wss://ws-rpc.mainnet.lukso.network"]}},blockExplorers:{default:{name:"LUKSO Mainnet Explorer",url:"https://explorer.execution.mainnet.lukso.network"}}}},991120,e=>{"use strict";e.s(["mainnet",()=>t]);let t={id:1,network:"homestead",name:"Ethereum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{privy:{http:["https://mainnet.rpc.privy.systems"]},alchemy:{http:["https://eth-mainnet.g.alchemy.com/v2"],webSocket:["wss://eth-mainnet.g.alchemy.com/v2"]},infura:{http:["https://mainnet.infura.io/v3"],webSocket:["wss://mainnet.infura.io/ws/v3"]},default:{http:["https://cloudflare-eth.com"]},public:{http:["https://cloudflare-eth.com"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://etherscan.io"},default:{name:"Etherscan",url:"https://etherscan.io"}}}},707213,e=>{"use strict";e.s(["optimism",()=>t]);let t={id:10,name:"OP Mainnet",network:"optimism",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{privy:{http:["https://optimism-mainnet.rpc.privy.systems"]},alchemy:{http:["https://opt-mainnet.g.alchemy.com/v2"],webSocket:["wss://opt-mainnet.g.alchemy.com/v2"]},infura:{http:["https://optimism-mainnet.infura.io/v3"],webSocket:["wss://optimism-mainnet.infura.io/ws/v3"]},default:{http:["https://mainnet.optimism.io"]},public:{http:["https://mainnet.optimism.io"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://optimistic.etherscan.io"},default:{name:"Optimism Explorer",url:"https://explorer.optimism.io"}}}},141628,e=>{"use strict";e.s(["optimismSepolia",()=>t]);let t={id:0xaa37dc,name:"Optimism Sepolia",network:"optimism-sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{privy:{http:["https://optimism-sepolia.rpc.privy.systems"]},default:{http:["https://sepolia.optimism.io"]},public:{http:["https://sepolia.optimism.io"]},infura:{http:["https://optimism-sepolia.infura.io/v3"]}},blockExplorers:{default:{name:"Blockscout",url:"https://optimism-sepolia.blockscout.com"}},testnet:!0}},744645,e=>{"use strict";e.s(["polygon",()=>t]);let t={id:137,name:"Polygon Mainnet",network:"polygon",nativeCurrency:{name:"POL",symbol:"POL",decimals:18},rpcUrls:{privy:{http:["https://polygon-mainnet.rpc.privy.systems"]},alchemy:{http:["https://polygon-mainnet.g.alchemy.com/v2"],webSocket:["wss://polygon-mainnet.g.alchemy.com/v2"]},infura:{http:["https://polygon-mainnet.infura.io/v3"],webSocket:["wss://polygon-mainnet.infura.io/ws/v3"]},default:{http:["https://polygon-rpc.com"]},public:{http:["https://polygon-rpc.com"]}},blockExplorers:{etherscan:{name:"PolygonScan",url:"https://polygonscan.com"},default:{name:"PolygonScan",url:"https://polygonscan.com"}}}},301325,e=>{"use strict";e.s(["polygonAmoy",()=>t]);let t={id:80002,name:"Polygon Amoy",network:"polygon-amoy",nativeCurrency:{name:"POL",symbol:"POL",decimals:18},rpcUrls:{privy:{http:["https://polygon-amoy.rpc.privy.systems"]},infura:{http:["https://polygon-amoy.infura.io/v3"],webSocket:["wss://polygon-amoy.infura.io/ws/v3"]},default:{http:["https://rpc-amoy.polygon.technology"]}},blockExplorers:{default:{name:"OK LINK",url:"https://www.oklink.com/amoy"}},testnet:!0}},40571,e=>{"use strict";e.s(["redstone",()=>t]);let t={id:690,name:"Redstone",network:"redstone",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18}
1,rpcUrls:{default:{http:["https://rpc.redstonechain.com"]},public:{http:["https://rpc.redstonechain.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.redstone.xyz/"}}}},554952,e=>{"use strict";e.s(["sepolia",()=>t]);let t={id:0xaa36a7,network:"sepolia",name:"Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"SEP",decimals:18},rpcUrls:{privy:{http:["https://sepolia.rpc.privy.systems"]},alchemy:{http:["https://eth-sepolia.g.alchemy.com/v2"],webSocket:["wss://eth-sepolia.g.alchemy.com/v2"]},infura:{http:["https://sepolia.infura.io/v3"],webSocket:["wss://sepolia.infura.io/ws/v3"]},default:{http:["https://rpc.sepolia.org"]},public:{http:["https://rpc.sepolia.org"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://sepolia.etherscan.io"},default:{name:"Etherscan",url:"https://sepolia.etherscan.io"}},testnet:!0}},877225,209150,e=>{"use strict";e.s(["DEFAULT_SUPPORTED_CHAINS",()=>A,"DEFAULT_SUPPORTED_CHAIN_IDS",()=>T],877225);var t=e.i(331191),n=e.i(435528),r=e.i(853317),i=e.i(47258),a=e.i(83319),o=e.i(975477),s=e.i(470898),l=e.i(374889),c=e.i(958747),d=e.i(93954),u=e.i(76547),h=e.i(497450),p=e.i(872836),f=e.i(922649),g=e.i(538838),m=e.i(683898),y=e.i(223082),b=e.i(991120),w=e.i(707213),x=e.i(141628),C=e.i(744645),E=e.i(301325),k=e.i(40571),S=e.i(554952);e.s(["zora",()=>I],209150);let I={id:7777777,name:"Zora",network:"zora",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.zora.energy"],webSocket:["wss://rpc.zora.energy"]},public:{http:["https://rpc.zora.energy"],webSocket:["wss://rpc.zora.energy"]}},blockExplorers:{default:{name:"Explorer",url:"https://explorer.zora.energy"}}},A=[b.mainnet,S.sepolia,f.holesky,t.arbitrum,n.arbitrumSepolia,w.optimism,x.optimismSepolia,C.polygon,E.polygonAmoy,c.celo,d.celoAlfajores,u.filecoin,h.filecoinCalibration,a.base,o.baseSepolia,s.berachainArtio,l.bsc,y.lukso,g.linea,m.lineaTestnet,r.avalanche,i.avalancheFuji,I,{id:999,name:"Zora Goerli Testnet",network:"zora-testnet",nativeCurrency:{decimals:18,name:"Zora Goerli",symbol:"ETH"},rpcUrls:{default:{http:["https://testnet.rpc.zora.energy"],webSocket:["wss://testnet.rpc.zora.energy"]},public:{http:["https://testnet.rpc.zora.energy"],webSocket:["wss://testnet.rpc.zora.energy"]}},blockExplorers:{default:{name:"Explorer",url:"https://testnet.explorer.zora.energy"}},testnet:!0},{id:0x3b9ac9ff,name:"Zora Sepolia",network:"zora-sepolia",nativeCurrency:{decimals:18,name:"Zora Sepolia",symbol:"ETH"},rpcUrls:{default:{http:["https://sepolia.rpc.zora.energy"],webSocket:["wss://sepolia.rpc.zora.energy"]},public:{http:["https://sepolia.rpc.zora.energy"],webSocket:["wss://sepolia.rpc.zora.energy"]}},blockExplorers:{default:{name:"Zora Sepolia Explorer",url:"https://sepolia.explorer.zora.energy/"}},testnet:!0},k.redstone,p.garnetHolesky],T=new Set(A.map(e=>e.id))},203988,e=>{"use strict";function t(e,t){return{...e,rpcUrls:{...e.rpcUrls,privy:{http:[t]}}}}e.s(["addPrivyRpcToChain",()=>t])},906764,e=>{"use strict";e.s(["dedupeSupportedChains",()=>r]);var t=e.i(203988),n=e.i(877225);let r=e=>e.map(e=>{var r;if(e.rpcUrls.privyWalletOverride)return e;let i=n.DEFAULT_SUPPORTED_CHAINS.find(t=>t.id===e.id),a=null==i||null==(r=i.rpcUrls.privy)?void 0:r.http[0];return a?(0,t.addPrivyRpcToChain)(e,a):e})},180635,e=>{"use strict";var t;e.s(["EmbeddedProviderError",()=>o,"PrivyConnectorError",()=>a,"PrivyIframeError",()=>i,"ProviderErrors",()=>s,"errorIndicatesRecoveryIsNeeded",()=>l],180635);let n=["error","invalid_request_arguments","wallet_not_on_device","invalid_recovery_pin","insufficient_funds","mfa_timeout","missing_or_invalid_mfa","mfa_verification_max_attempts_reached"];(t={}).MISSING_OR_INVALID_PRIVY_APP_ID="missing_or_invalid_privy_app_id",t.MISSING_OR_INVALID_PRIVY_ACCOUNT_ID="missing_or_invalid_privy_account_id",t.INVALID_DATA="invalid_data",t.LINKED_TO_ANOTHER_USER="linked_to_another_user",t.ALLOWLIST_REJECTED="allowlist_rejected",t.OAUTH_USER_DENIED="oauth_user_denied",t.UNKNOWN_AUTH_ERROR="unknown_auth_error",t.USER_EXITED_AUTH_FLOW="exited_auth_flow",t.MUST_BE_AUTHENTICATED="must_be_authenticated",t.UNKNOWN_CONNECT_WALLET_ERROR="unknown_connect_wallet_error",t.GENERIC_CONNECT_WALLET_ERROR="generic_connect_wallet_error",t.CLIENT_REQUEST_TIMEOUT="client_request_timeout",t.INVA
1LID_CREDENTIALS="invalid_credentials";class r extends Error{toString(){return"".concat(this.type).concat(this.privyErrorCode?"-".concat(this.privyErrorCode):"",": ").concat(this.message).concat(this.cause?" [cause: ".concat(this.cause,"]"):"")}constructor(e,t,n){super(e),t instanceof Error&&(this.cause=t),this.privyErrorCode=n}}class i extends Error{constructor(e,t){super(t),this.type=e}}class a extends r{constructor(e,t,n){super(e,t,n),this.type="connector_error"}}class o extends Error{constructor(e,t,n){super(e),this.code=t,this.data=n}}let s={UNKNOWN_ERROR:{eipCode:0,message:"Unknown error",detail:"Unknown error",retryable:!0},E4001_DEFAULT_USER_REJECTED_REQUEST:{eipCode:4001,message:"User Rejected Request",detail:"The user rejected the request.",default:!0,retryable:!0},E4100_DEFAULT_UNAUTHORIZED:{eipCode:4100,message:"Unauthorized",detail:"The requested method and/or account has not been authorized by the user.",default:!0,retryable:!1},E4200_DEFAULT_UNSUPPORTED_METHOD:{eipCode:4200,message:"Unsupported Method",detail:"The Provider does not support the requested method.",default:!0,retryable:!1},E4900_DEFAULT_DISCONNECTED:{eipCode:4900,message:"Disconnected",detail:"The Provider is disconnected from all chains.",default:!0,retryable:!0},E4901_DEFAULT_CHAIN_DISCONNECTED:{eipCode:4901,message:"Chain Disconnected",detail:"The Provider is not connected to the requested chain.",default:!0,retryable:!0},E32700_DEFAULT_PARSE_ERROR:{eipCode:-32700,message:"Parse error",detail:"Invalid JSON",default:!0,retryable:!1},E32600_DEFAULT_INVALID_REQUEST:{eipCode:-32600,message:"Invalid request",detail:"JSON is not a valid request object",default:!0,retryable:!1},E32601_DEFAULT_METHOD_NOT_FOUND:{eipCode:-32601,message:"Method not found",detail:"Method does not exist",default:!0,retryable:!1},E32602_DEFAULT_INVALID_PARAMS:{eipCode:-32602,message:"Invalid params",detail:"Invalid method parameters",default:!0,retryable:!1},E32603_DEFAULT_INTERNAL_ERROR:{eipCode:-32603,message:"Internal error",detail:"Internal JSON-RPC error",default:!0,retryable:!0},E32000_DEFAULT_INVALID_INPUT:{eipCode:-32e3,message:"Invalid input",detail:"Missing or invalid parameters",default:!0,retryable:!1},E32001_DEFAULT_RESOURCE_NOT_FOUND:{eipCode:-32001,message:"Resource not found",detail:"Requested resource not found",default:!0,retryable:!1},E32002_DEFAULT_RESOURCE_UNAVAILABLE:{eipCode:-32002,message:"Resource unavailable",detail:"Requested resource not available",default:!0,retryable:!0},E32003_DEFAULT_TRANSACTION_REJECTED:{eipCode:-32003,message:"Transaction rejected",detail:"Transaction creation failed",default:!0,retryable:!0},E32004_DEFAULT_METHOD_NOT_SUPPORTED:{eipCode:-32004,message:"Method not supported",detail:"Method is not implemented",default:!0,retryable:!1},E32005_DEFAULT_LIMIT_EXCEEDED:{eipCode:-32005,message:"Limit exceeded",detail:"Request exceeds defined limit",default:!0,retryable:!1},E32006_DEFAULT_JSON_RPC_VERSION_NOT_SUPPORTED:{eipCode:-32006,message:"JSON-RPC version not supported",detail:"Version of JSON-RPC protocol is not supported",default:!0,retryable:!1},E32002_CONNECTION_ALREADY_PENDING:{eipCode:-32002,message:"Connection request already pending",detail:"Don’t see your wallet? Check your other browser windows.",retryable:!1},E32002_REQUEST_ALREADY_PENDING:{eipCode:-32002,message:"Resource request already pending",detail:"Don’t see your wallet? Check your other browser windows.",retryable:!1},E32002_WALLET_LOCKED:{eipCode:-32002,message:"Wallet might be locked",detail:"Don’t see your wallet? Check your other browser windows.",retryable:!1},E4001_USER_REJECTED_REQUEST:{eipCode:4001,message:"Signature rejected",detail:"Please try signing again.",retryable:!0}};function l(e){let t;return"string"==typeof(t=e.type)&&n.includes(t)&&"wallet_not_on_device"===e.type}},403555,e=>{"use strict";e.s(["create",()=>n]);var t=e.i(716100);async function n(e,n){let{request:r}=n;return await e.fetchPrivyRoute(t.WalletCreate,{body:r})}},497530,e=>{"use strict";e.s(["getJsonRpcEndpointFromChain",()=>a,"getPublicClient",()=>i,"throwIfInvalidRecoveryUpgradePath",()=>o]);var t=e.i(309682),n=e.i(110163),r=e.i(180635);let i=(e,i,o,s)=>{let l=Number(e),c=i.find(e=>e.id===l);if(!c)throw new r.PrivyConnectorError("Unsupported chainId ".concat(e),4901);return(0,t.createPublicClient)({transport:(0,n.http)(a(c,o,s.appId)),chain:c})},a=(e,t,n)=>{var i,a,o;let s,l=e.id,c=Number(e.id);if(e.rpcUrls.privyWalletOverride&&e.rpcUrls.privyWalletOverride.http[0])s=e.rpcUrls.privyWalletOverride.http[0];else if(t.rpcUrls&&t.rpcUrls[c])s=t.rpcUrls[c];else if(null==(i=e.rpcUrls.privy)?void 0:i.http[0]){let t=new URL(e.rpcUrls.privy.http[0]);t.searchParams.append("privyAppId",n),s=t.toString()}else s=(null==(a=e.rpcUrls.public)?void 0:a.http[0])?e.rpcUrls.public.http[0]:null==(o=e.rpcUrls.default)?void 0:o.http[0];if(!s)throw new r.PrivyConnectorError("No RPC url found for ".concat(l));return s};function o(e){let{currentRecoveryMethod:t,upgradeToRecoveryMethod:n}=e;switch(t){case"privy":case"user-passcode":case"recovery-encryption-key":return!0;case"icloud":case"google-drive":if(t===n)throw Error("Cannot upgrade to the existing cloud platform");return!0;
1default:throw Error("Unknown recovery method")}}},740382,e=>{"use strict";e.s(["STRING_TO_NUMBER_TXN_TYPE",()=>i,"toViemTransactionSerializable",()=>o]);var t=e.i(880841),n=e.i(675107);let r={0:"legacy",1:"eip2930",2:"eip1559",3:"eip4844",4:"eip7702"},i={legacy:0,eip2930:1,eip1559:2,eip4844:3,eip7702:4},a=e=>void 0!==e?BigInt(e):void 0;function o(e){var i,o;let s,{type:l=2,...c}="string"==typeof e?JSON.parse(e):e;c.accessList&&Array.isArray(c.accessList)?s=c.accessList.map(e=>Array.isArray(e)?{address:e[0],storageKeys:e[1]}:e):c.accessList&&(s=Object.entries(c.accessList).map(e=>({address:e[0],storageKeys:e[1]})));let d=Number(null!=(i=c.chainId)?i:1),u=(0,t.isHex)(c.data)?c.data:c.data?(0,n.toHex)(Uint8Array.from(c.data)):void 0,h=c.nonce?Number(c.nonce):void 0,p={chainId:d,data:u,nonce:h,value:a(c.value),gas:a(null!=(o=c.gas)?o:c.gasLimit)},f=Number(l);if(0===f)return{...c,type:r[f],...p,gasPrice:a(c.gasPrice),accessList:void 0,maxFeePerGas:void 0,maxPriorityFeePerGas:void 0};if(1===f)return{...c,type:r[f],...p,gasPrice:a(c.gasPrice),accessList:s,maxFeePerGas:void 0,maxPriorityFeePerGas:void 0};if(2===f)return{...c,type:r[f],...p,nonce:h,accessList:s,maxFeePerGas:a(c.maxFeePerGas),maxPriorityFeePerGas:a(c.maxPriorityFeePerGas),gasPrice:void 0,maxFeePerBlobGas:void 0};throw Error("Unsupported transaction type: ".concat(l))}},199220,e=>{"use strict";e.s(["base64url",()=>t]);var t=e.i(840796)},920209,422749,802360,e=>{"use strict";e.s(["MoonpayEnvironments",()=>l,"chainToMoonpayCurrency",()=>h,"isSupportedChainIdForMoonpay",()=>u],920209);var t=e.i(991120),n=e.i(331191),r=e.i(83319),i=e.i(744645),a=e.i(853317),o=e.i(958747),s=e.i(707213);let l={prod:{url:"https://api.moonpay.com/v1",key:"pk_live_hirbpu0cVcLHrjktC9l7fbc9ctjv0SL"},sandbox:{url:"https://api.moonpay.com/v1",key:"pk_test_fqWjXZMSFwloh7orvJsRfjiUHXJqFzI"}},c=new Set([t.mainnet.id,n.arbitrum.id,r.base.id,i.polygon.id,a.avalanche.id,o.celo.id]),d=new Set([t.mainnet.id,n.arbitrum.id,s.optimism.id,r.base.id,i.polygon.id,a.avalanche.id]);function u(e,t){switch(t){case"native-currency":return c.has(e);case"USDC":return d.has(e);default:return console.warn("Unknown asset passed to MoonPay Onramp"),!1}}function h(e,s){switch(e){case n.arbitrum.id:return"native-currency"===s?"ETH_ARBITRUM":"USDC_ARBITRUM";case a.avalanche.id:return"native-currency"===s?"AVAX_CCHAIN":"USDC_CCHAIN";case r.base.id:return"native-currency"===s?"ETH_BASE":"USDC_BASE";case o.celo.id:return"CELO_CELO";case i.polygon.id:return"native-currency"===s?"MATIC_POLYGON":"USDC_POLYGON";case t.mainnet.id:return"native-currency"===s?"ETH_ETHEREUM":"USDC_ETHEREUM";default:return console.warn("Chain ".concat(e," not supported by Moonpay, defaulting to Ethereum mainnet")),"ETH_ETHEREUM"}}e.s(["countryCodesAndNumbers",()=>t_,"formatPhoneNumber",()=>tI,"getPhoneCountryCodeAndNumber",()=>tP,"getPlaceholderPhoneNumber",()=>tj,"lastFourDigits",()=>tA,"phoneNumberTypingFormatter",()=>tT,"validatePhoneNumber",()=>tS],802360);let p={AC:"40123",AD:"312345",AE:"501234567",AF:"701234567",AG:"2684641234",AI:"2642351234",AL:"672123456",AM:"77123456",AO:"923123456",AR:"91123456789",AS:"6847331234",AT:"664123456",AU:"412345678",AW:"5601234",AX:"412345678",AZ:"401234567",BA:"61123456",BB:"2462501234",BD:"1812345678",BE:"470123456",BF:"70123456",BG:"43012345",BH:"36001234",BI:"79561234",BJ:"0195123456",BL:"690001234",BM:"4413701234",BN:"7123456",BO:"71234567",BQ:"3181234",BR:"11961234567",BS:"2423591234",BT:"17123456",BW:"71123456",BY:"294911911",BZ:"6221234",CA:"5062345678",CC:"412345678",CD:"991234567",CF:"70012345",CG:"061234567",CH:"781234567",CI:"0123456789",CK:"71234",CL:"221234567",CM:"671234567",CN:"13123456789",CO:"3211234567",CR:"83123456",CU:"51234567",CV:"9911234",CW:"95181234",CX:"412345678",CY:"96123456",CZ:"601123456",DE:"15123456789",DJ:"77831001",DK:"34412345",DM:"7672251234",DO:"8092345678",DZ:"551234567",EC:"991234567",EE:"51234567",EG:"1001234567",EH:"650123456",ER:"7123456",ES:"612345678",ET:"911234567",FI:"412345678",FJ:"7012345",FK:"51234",FM:"3501234",FO:"211234",FR:"612345678",GA:"06031234",GB:"7400123456",GD:"4734031234",GE:"555123456",GF:"694201234",GG:"7781123456",GH:"231234567",GI:"57123456",GL:"221234",GM:"3012345",GN:"601123456",GP:"690001234",GQ:"222123456",GR:"6912345678",GT:"51234567",GU:"6713001234",GW:"955012345",GY:"6091234",HK:"51234567",HN:"91234567",HR:"921234567",HT:"34101234",HU:"201234567",ID:"812345678",IE:"850123456",IL:"502345678",IM:"7924123456",IN:"8123456789",IO:"3801234",IQ:"7912345678",IR:"9123456789",IS:"6111234",IT:"3123456789",JE:"7797712345",JM:"8762101234",JO:"790123456",JP:"9012345678",KE:"712123456",KG:"700123456",KH:"91234567",KI:"72001234",KM:"3212345",KN:"8697652917",KP:"1921234567",KR:"1020000000",KW:"50012345",KY:"3453231234",KZ:"7710009998",LA:"2023123456",LB:"71123456",LC:"7582845678",LI:"660234567",LK:"712345678",LR:"770123456",LS:"50123456",LT:"61234567",LU:"628123456",LV:"21234567",LY:"912345678",MA:"650123456",MC:"612345678",MD:"62112345",ME:"60123456",MF:"690001234",MG:"321234567",MH:"2351234",MK:"72345678",ML:"65012345",MM:"92123456",MN:"88123456",MO:"66123456",MP:"6702345678",MQ:"696201234",MR:"22123456",MS:"6644923456",MT:"96961234",MU:"52512345",MV:"7712345",MW:"991234567",MX:"2221234567",MY:"123456789",MZ:"821234567",NA:"811234567",NC:"751234",NE:"93123456",NF:"381234",NG:"8021234567",NI:"81234567",NL:"612345678",NO:"40612345",NP:"9841234567",NR:"5551234",NU:"8884012",NZ:"211234567",OM:"92123456",PA:"61234567",PE:"912345678",PF:"87123456",PG:"70123456",PH:"9051234567",PK:"3012345678",PL:"512345678",PM:"551234",PR:"7872345678",PS:"599123456",PT:"912345678",PW:"6201234",PY:"961456789",QA:"33123456",RE:"692123456",RO:"712034567",RS:"601234567",RU:"9123456789",RW:"720123456",SA:"512345678",SB:"7421234",SC:"2510123",SD:"911231234",SE:"701234567",SG:"81234567",SH:"51234",SI:"31234567",SJ:"41234567",SK:"912123456",SL:"25123456",SM:"66661212",SN:"701234567",SO:"71123456",SR:"7412345",SS:"977123456",ST:"9812345",SV:"70123456",SX:"7215205678",SY:"944567890",SZ:"76123456",TA:"8999",TC:"6492311234",TD:"63012345",TG:"90112345",TH:"812345678",TJ:"917123456",TK:"7290",TL:"77212345",TM:"66123456",TN:"20123456",TO:"7715123",TR:"5012345678",TT:"8682911234",TV:"901234",TW:"912345678",TZ:"621234567",UA:"501234567",UG:"712345678",US:"2015550123",UY:"94231234",UZ:"912345678",VA:"3123456789",VC:"7844301234",VE:"4121234567",VG:"2843001234",VI:"3406421234",VN:"912345678",VU:"5912345",WF:"821234",WS:"7212345",XK:"43201234",YE:"712345678",YT:"639012345",ZA:"711234567",ZM:"955123456",ZW:"712345678"},f={version:4,country_calling_codes:{1:["US","AG","AI","AS","BB","BM","BS","CA","DM","DO","GD","GU","JM","KN","KY","LC","MP","MS","PR","SX","TC","TT","VC","VG","VI"],7:["RU","KZ"],20:["EG"],27:["ZA"],30:["GR"],31:["NL"],32:["BE"],33:["FR"],34:["ES"],36:["HU"],39:["IT","VA"],40:["RO"],41:["CH"],43:["AT"],44:["GB","GG","IM","JE"],45:["DK"],46:["SE"],47:["NO","SJ"],48:["PL"],49:["DE"],51:["PE"],52:["MX"],53:["CU"],54:["AR"],55:["BR"],56:["CL"],57:["CO"],58:["VE"],60:["MY"],61:["AU","CC","CX"],62:["ID"],63:["PH"],64:["NZ"],65:["SG"],66:["TH"],81:["JP"],82:["KR"],84:["VN"],86:["CN"],90:["TR"],91:["IN"],92:["PK"],93:["AF"],94:["LK"],95:["MM"],98:["IR"],211:["SS"],212:["MA","EH"],213:["DZ"],216:["TN"],218:["LY"],220:["GM"],221:["SN"],222:["MR"],223:["ML"],224:["GN"],225:["CI"],226:["BF"],227:["NE"],228:["TG"],229:["BJ"],230:["MU"],231:["LR"],232:["SL"],233:["GH"],234:["NG"],235:["TD"],236:["CF"],237:["CM"],238:["CV"],239:["ST"],240:["GQ"],241:["GA"],242:["CG"],243:["CD"],244:["AO"],245:["GW"],246:["IO"],247:["AC"],248:["SC"],249:["SD"],250:["RW"],251:["ET"],252:["SO"],253:["DJ"],254:["KE"],255:["TZ"],256:["UG"],257:["BI"],258:["MZ"],260:["ZM"],261:["MG"],262:["RE","YT"],263:["ZW"],264:["NA"],265:["MW"],266:["LS"],267:["BW"],268:["SZ"],269:["KM"],290:["SH","TA"],291:["ER"],297:["AW"],298:["FO"],299:["GL"],350:["GI"],351:["PT"],352:["LU"],353:["IE"],354:["IS"],355:["AL"],356:["MT"],357:["CY"],358:["FI","AX"],359:["BG"],370:["LT"],371:["LV"],372:["EE"],373:["MD"],374:["AM"],375:["BY"],376:["AD"],377:["MC"],378:["SM"],380:["UA"],381:["RS"],382:["ME"],383:["XK"],385:["HR"],386:["SI"],387:["BA"],389:["MK"],420:["CZ"],421:["SK"],423:["LI"],500:["FK"],501:["BZ"],502:["GT"],503:["SV"],504:["HN"],505:["NI"],506:["CR"],507:["PA"],508:["PM"],509:["HT"],590:["GP","BL","MF"],591:["BO"],592:["GY"],593:["EC"],594:["GF"],595:["PY"],596:["MQ"],597:["SR"],598:["UY"],599:["CW","BQ"],670:["TL"],672:["NF"],673:["BN"],674:["NR"],675:["PG"],676:["TO"],677:["SB"],678:["VU"],679:["FJ"],680:["PW"],681:["WF"],682:["CK"],683:["NU"],685:["WS"],686:["KI"],687:["NC"],688:["TV"],689:["PF"],690:["TK"],691:["FM"],692:["MH"],850:["KP"],852:["HK"],853:["MO"],855:["KH"],856:["LA"],880:["BD"],886:["TW"],960:["MV"],961:["LB"],962:["JO"],963:["SY"],964:["IQ"],965:["KW"],966:["SA"],967:["YE"],968:["OM"],970:["PS"],971:["AE"],972:["IL"],973:["BH"],974:["QA"],975:["BT"],976:["MN"],977:["NP"],992:["TJ"],993:["TM"],994:["AZ"],995:["GE"],996:["KG"],998:["UZ"]},countries:{AC:["247","00","(?:[01589]\\d|[46])\\d{4}",[5,6]],AD:["376","00","(?:1|6\\d)\\d{7}|[135-9]\\d{5}",[6,8,9],[["(\\d{3})(\\d{3})","$1 $2",["[135-9]"]],["(\\d{4})(\\d{4})","$1 $2",["1"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]]],AE:["971","00","(?:[4-7]\\d|9[0-689])\\d{7}|800\\d{2,9}|[2-4679]\\d{7}",[5,6,7,8,9,10,11,12],[["(\\d{3})(\\d{2,9})","$1 $2",["60|8"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[236]|[479][2-8]"],"0$1"],["(\\d{3})(\\d)(\\d{5})","$1 $2 $3",["[479]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"]],"0"],AF:["93","00","[2-7]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"]],"0"],AG:["1","011","(?:268|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([457]\\d{6})$|1","268$1",0,"268"],AI:["1","011","(?:264|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2457]\\d{6})$|1","264$1",0,"264"],AL:["355","00","(?:700\\d\\d|900)\\d{3}|8\\d{5,7}|(?:[2-5]|6\\d)\\d{7}",[6,7,8,9],[["(\\d{3})(\\d{3,4})","$1 $2",["80|9"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["4[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2358][2-5]|4"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["[23578]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["6"],"0$1"]],"0"],AM:["374","00","(?:[1-489]\\d|55|60|77)\\d{6}",[8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[89]0"],"0 $1"],["(\\d{3})(\\d{5})","$1 $2",["2|3[12]"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["1|47"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[3-9]"],"0$1"]],"0"],AO:["244","00","[29]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[29]"]]]],AR:["54","00","(?:11|[89]\\d\\d)\\d{8}|[2368]\\d{9}",[10,11],[["(\\d{4})(\\d{2})(\\d{4})","$1 $2-$3",["2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9])","2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8]))|2(?:2[24-9]|3[1-59]|47)","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5[56][46]|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|58|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|54(?:4|5[13-7]|6[89])|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:454|85[56])[46]|3(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["1"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[68]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2-$3",["[23]"],"0$1",1],["(\\d)(\\d{4})(\\d{2})(\\d{4})","$2 15-$3-$4",["9(?:2[2-469]|3[3-578])","9(?:2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9]))","9(?:2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8])))|92(?:2[24-9]|3[1-59]|47)","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5(?:[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|5(?:4(?:4|5[13-7]|6[89])|[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",0,"$1 $2 $3-$4"],["(\\d)(\\d{2})(\\d{4})(\\d{4})","$2 15-$3-$4",["91"],"0$1",0,"$1 $2 $3-$4"],["(\\d{3})(\\d{3})(\\d{5})","$1-$2-$3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{4})","$2 15-$3-$4",["9"],"0$1",0,"$1 $2 $3-$4"]],"0",0,"0?(?:(11|2(?:2(?:02?|[13]|2[13-79]|4[1-6]|5[2457]|6[124-8]|7[1-4]|8[13-6]|9[1267])|3(?:02?|1[467]|2[03-6]|3[13-8]|[49][2-6]|5[2-8]|[67])|4(?:7[3-578]|9)|6(?:[0136]|2[24-6]|4[6-8]?|5[15-8])|80|9(?:0[1-3]|[19]|2\\d|3[1-6]|4[02568]?|5[2-4]|6[2-46]|72?|8[23]?))|3(?:3(?:2[79]|6|8[2578])|4(?:0[0-24-9]|[12]|3[5-8]?|4[24-7]|5[4-68]?|6[02-9]|7[126]|8[2379]?|9[1-36-8])|5(?:1|2[1245]|3[237]?|4[1-4
16-9]|6[2-4]|7[1-6]|8[2-5]?)|6[24]|7(?:[069]|1[1568]|2[15]|3[145]|4[13]|5[14-8]|7[2-57]|8[126])|8(?:[01]|2[15-7]|3[2578]?|4[13-6]|5[4-8]?|6[1-357-9]|7[36-8]?|8[5-8]?|9[124])))15)?","9$1"],AS:["1","011","(?:[58]\\d\\d|684|900)\\d{7}",[10],0,"1",0,"([267]\\d{6})$|1","684$1",0,"684"],AT:["43","00","1\\d{3,12}|2\\d{6,12}|43(?:(?:0\\d|5[02-9])\\d{3,9}|2\\d{4,5}|[3467]\\d{4}|8\\d{4,6}|9\\d{4,7})|5\\d{4,12}|8\\d{7,12}|9\\d{8,12}|(?:[367]\\d|4[0-24-9])\\d{4,11}",[4,5,6,7,8,9,10,11,12,13],[["(\\d)(\\d{3,12})","$1 $2",["1(?:11|[2-9])"],"0$1"],["(\\d{3})(\\d{2})","$1 $2",["517"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["5[079]"],"0$1"],["(\\d{3})(\\d{3,10})","$1 $2",["(?:31|4)6|51|6(?:48|5[0-3579]|[6-9])|7(?:20|32|8)|[89]","(?:31|4)6|51|6(?:485|5[0-3579]|[6-9])|7(?:20|32|8)|[89]"],"0$1"],["(\\d{4})(\\d{3,9})","$1 $2",["[2-467]|5[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["5"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,7})","$1 $2 $3",["5"],"0$1"]],"0"],AU:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{7}(?:\\d(?:\\d{2})?)?|8[0-24-9]\\d{7})|[2-478]\\d{8}|1\\d{4,7}",[5,6,7,8,9,10,12],[["(\\d{2})(\\d{3,4})","$1 $2",["16"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,4})","$1 $2 $3",["16"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["14|4"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[2378]"],"(0$1)"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:30|[89])"]]],"0",0,"(183[12])|0",0,0,0,[["(?:(?:2(?:(?:[0-26-9]\\d|3[0-8]|5[0135-9])\\d|4(?:[02-9]\\d|10))|3(?:(?:[0-3589]\\d|6[1-9]|7[0-35-9])\\d|4(?:[0-578]\\d|90))|7(?:[013-57-9]\\d|2[0-8])\\d)\\d\\d|8(?:51(?:0(?:0[03-9]|[12479]\\d|3[2-9]|5[0-8]|6[1-9]|8[0-7])|1(?:[0235689]\\d|1[0-69]|4[0-589]|7[0-47-9])|2(?:0[0-79]|[18][13579]|2[14-9]|3[0-46-9]|[4-6]\\d|7[89]|9[0-4])|[34]\\d\\d)|(?:6[0-8]|[78]\\d)\\d{3}|9(?:[02-9]\\d{3}|1(?:(?:[0-58]\\d|6[0135-9])\\d|7(?:0[0-24-9]|[1-9]\\d)|9(?:[0-46-9]\\d|5[0-79])))))\\d{3}",[9]],["4(?:79[01]|83[0-36-9])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,["163\\d{2,6}",[5,6,7,8,9]],["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],AW:["297","00","(?:[25-79]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[25-9]"]]]],AX:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","2\\d{4,9}|35\\d{4,5}|(?:60\\d\\d|800)\\d{4,6}|7\\d{5,11}|(?:[14]\\d|3[0-46-9]|50)\\d{4,8}",[5,6,7,8,9,10,11,12],0,"0",0,0,0,0,"18",0,"00"],AZ:["994","00","365\\d{6}|(?:[124579]\\d|60|88)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[28]|2|365|46","1[28]|2|365[45]|46","1[28]|2|365(?:4|5[02])|46"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[13-9]"],"0$1"]],"0"],BA:["387","00","6\\d{8}|(?:[35689]\\d|49|70)\\d{6}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["6[1-3]|[7-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2-$3",["[3-5]|6[56]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["6"],"0$1"]],"0"],BB:["1","011","(?:246|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","246$1",0,"246"],BD:["880","00","[1-469]\\d{9}|8[0-79]\\d{7,8}|[2-79]\\d{8}|[2-9]\\d{7}|[3-9]\\d{6}|[57-9]\\d{5}",[6,7,8,9,10],[["(\\d{2})(\\d{4,6})","$1-$2",["31[5-8]|[459]1"],"0$1"],["(\\d{3})(\\d{3,7})","$1-$2",["3(?:[67]|8[013-9])|4(?:6[168]|7|[89][18])|5(?:6[128]|9)|6(?:[15]|28|4[14])|7[2-589]|8(?:0[014-9]|[12])|9[358]|(?:3[2-5]|4[235]|5[2-578]|6[0389]|76|8[3-7]|9[24])1|(?:44|66)[01346-9]"],"0$1"],["(\\d{4})(\\d{3,6})","$1-$2",["[13-9]|2[23]"],"0$1"],["(\\d)(\\d{7,8})","$1-$2",["2"],"0$1"]],"0"],BE:["32","00","4\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:80|9)0"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[239]|4[23]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[15-8]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4"],"0$1"]],"0"],BF:["226","00","(?:[025-7]\\d|44)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[024-7]"]]]],BG:["359","00","00800\\d{7}|[2-7]\\d{6,7}|[89]\\d{6,8}|2\\d{5}",[6,7,8,9,12],[["(\\d)(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["43[1-6]|70[1-9]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[356]|4[124-7]|7[1-9]|8[1-6]|9[1-7]"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:70|8)0"],"0$1"],["(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3",["43[1-7]|7"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[48]|9[08]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"]],"0"],BH:["973","00","[136-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[13679]|8[02-4679]"]]]],BI:["257","00","(?:[267]\\d|31)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2367]"]]]],BJ:["229","00","(?:01\\d|[24-689])\\d{7}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-689]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["0"]]]],BL:["590","00","(?:590\\d|7090)\\d{5}|(?:69|80|9\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["590(?:2[7-9]|3[3-7]|5[12]|87)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],BM:["1","011","(?:441|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","441$1",0,"441"],BN:["673","00","[2-578]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-578]"]]]],BO:["591","00(?:1\\d)?","8001\\d{5}|(?:[2-467]\\d|50)\\d{6}",[8,9],[["(\\d)(\\d{7})","$1 $2",["[235]|4[46]"]],["(\\d{8})","$1",["[67]"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["8"]]],"0",0,"0(1\\d)?"],BQ:["599","00","(?:[34]1|7\\d)\\d{5}",[7],0,0,0,0,0,0,"[347]"],BR:["55","00(?:1[245]|2[1-35]|31|4[13]|[56]5|99)","[1-467]\\d{9,10}
1|55[0-46-9]\\d{8}|[34]\\d{7}|55\\d{7,8}|(?:5[0-46-9]|[89]\\d)\\d{7,9}",[8,9,10,11],[["(\\d{4})(\\d{4})","$1-$2",["300|4(?:0[02]|37|86)","300|4(?:0(?:0|20)|370|864)"]],["(\\d{3})(\\d{2,3})(\\d{4})","$1 $2 $3",["(?:[358]|90)0"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-57]"],"($1)"],["(\\d{2})(\\d{5})(\\d{4})","$1 $2-$3",["[16][1-9]|[2-57-9]"],"($1)"]],"0",0,"(?:0|90)(?:(1[245]|2[1-35]|31|4[13]|[56]5|99)(\\d{10,11}))?","$2"],BS:["1","011","(?:242|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([3-8]\\d{6})$|1","242$1",0,"242"],BT:["975","00","[178]\\d{7}|[2-8]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[2-6]|7[246]|8[2-4]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[67]|[78]"]]]],BW:["267","00","(?:0800|(?:[37]|800)\\d)\\d{6}|(?:[2-6]\\d|90)\\d{5}",[7,8,10],[["(\\d{2})(\\d{5})","$1 $2",["90"]],["(\\d{3})(\\d{4})","$1 $2",["[24-6]|3[15-9]"]],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37]"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["8"]]]],BY:["375","810","(?:[12]\\d|33|44|902)\\d{7}|8(?:0[0-79]\\d{5,7}|[1-7]\\d{9})|8(?:1[0-489]|[5-79]\\d)\\d{7}|8[1-79]\\d{6,7}|8[0-79]\\d{5}|8\\d{5}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3})","$1 $2",["800"],"8 $1"],["(\\d{3})(\\d{2})(\\d{2,4})","$1 $2 $3",["800"],"8 $1"],["(\\d{4})(\\d{2})(\\d{3})","$1 $2-$3",["1(?:5[169]|6[3-5]|7[179])|2(?:1[35]|2[34]|3[3-5])","1(?:5[169]|6(?:3[1-3]|4|5[125])|7(?:1[3-9]|7[0-24-6]|9[2-7]))|2(?:1[35]|2[34]|3[3-5])"],"8 0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["1(?:[56]|7[467])|2[1-3]"],"8 0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-4]"],"8 0$1"],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["[89]"],"8 $1"]],"8",0,"0|80?",0,0,0,0,"8~10"],BZ:["501","00","(?:0800\\d|[2-8])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1-$2",["[2-8]"]],["(\\d)(\\d{3})(\\d{4})(\\d{3})","$1-$2-$3-$4",["0"]]]],CA:["1","011","[2-9]\\d{9}|3\\d{6}",[7,10],0,"1",0,0,0,0,0,[["(?:2(?:04|[23]6|[48]9|5[07]|63)|3(?:06|43|54|6[578]|82)|4(?:03|1[68]|[26]8|3[178]|50|74)|5(?:06|1[49]|48|79|8[147])|6(?:04|[18]3|39|47|72)|7(?:0[59]|42|53|78|8[02])|8(?:[06]7|19|25|7[39])|9(?:0[25]|42))[2-9]\\d{6}",[10]],["",[10]],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",[10]],["900[2-9]\\d{6}",[10]],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|(?:5(?:2[125-9]|33|44|66|77|88)|6(?:22|33))[2-9]\\d{6}",[10]],0,["310\\d{4}",[7]],0,["600[2-9]\\d{6}",[10]]]],CC:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:02|31|60|89)|1(?:18|76)|223)|91(?:0(?:1[0-2]|29)|1(?:[28]2|50|79)|2(?:10|64)|3(?:[06]8|22)|4[29]8|62\\d|70[23]|959))\\d{3}",[9]],["4(?:79[01]|83[0-36-9])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CD:["243","00","(?:(?:[189]|5\\d)\\d|2)\\d{7}|[1-68]\\d{6}",[7,8,9,10],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["[1-6]"],"0$1"],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["5"],"0$1"]],"0"],CF:["236","00","(?:[27]\\d{3}|8776)\\d{4}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[278]"]]]],CG:["242","00","222\\d{6}|(?:0\\d|80)\\d{7}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[02]"]]]],CH:["41","00","8\\d{11}|[2-9]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8[047]|90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]|81"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["8"],"0$1"]],"0"],CI:["225","00","[02]\\d{9}",[10],[["(\\d{2})(\\d{2})(\\d)(\\d{5})","$1 $2 $3 $4",["2"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3 $4",["0"]]]],CK:["682","00","[2-578]\\d{4}",[5],[["(\\d{2})(\\d{3})","$1 $2",["[2-578]"]]]],CL:["56","(?:0|1(?:1[0-69]|2[02-5]|5[13-58]|69|7[0167]|8[018]))0","12300\\d{6}|6\\d{9,10}|[2-9]\\d{8}",[9,10,11],[["(\\d{5})(\\d{4})","$1 $2",["219","2196"],"($1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["60|809"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["44"]],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2[1-36]"],"($1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["9(?:10|[2-9])"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["3[2-5]|[47]|5[1-3578]|6[13-57]|8(?:0[1-8]|[1-9])"],"($1)"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["60|8"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{3})(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3 $4",["60"]]]],CM:["237","00","[26]\\d{8}|88\\d{6,7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["88"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[26]|88"]]]],CN:["86","00|1(?:[12]\\d|79)\\d\\d00","(?:(?:1[03-689]|2\\d)\\d\\d|6)\\d{8}|1\\d{10}|[126]\\d{6}(?:\\d(?:\\d{2})?)?|86\\d{5,6}|(?:[3-579]\\d|8[0-57-9])\\d{5,9}",[7,8,9,10,11,12],[["(\\d{2})(\\d{5,6})","$1 $2",["(?:10|2[0-57-9])[19]|3(?:[157]|35|49|9[1-68])|4(?:1[124-9]|2[179]|6[47-9]|7|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:07|1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3|4[13]|5[1-5]|7[0-79]|9[0-35-9])|(?:4[35]|59|85)[1-9]","(?:10|2[0-57-9])(?:1[02]|9[56])|8078|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))1","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|80781|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))12","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|807812|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:078|1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123"],"0$1"],["(\\d{3})(\\d{5,6})","$1 $2",["3(?:[157]|35|49|9[1-68])|4(?:[17]|2[179]|6[47-9]|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])|(?:4[35]|59|85)[1-9]","(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))[19]","85[23](?:10|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:10|9[56])","85[23](?:100|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:100|9[56])"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["(?:4|80)0"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|2(?:[02-57-9]|1[1-9])","10|2(?:[02-57-9]|1[1-9])","10[0-79]|2(?:[02-57-9]|1[1-79])|(?:10|21)8(?:0[1-9]|[1-9])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4}
1)","$1 $2 $3",["3(?:[3-59]|7[02-68])|4(?:[26-8]|3[3-9]|5[2-9])|5(?:3[03-9]|[468]|7[028]|9[2-46-9])|6|7(?:[0-247]|3[04-9]|5[0-4689]|6[2368])|8(?:[1-358]|9[1-7])|9(?:[013479]|5[1-5])|(?:[34]1|55|79|87)[02-9]"],"0$1",1],["(\\d{3})(\\d{7,8})","$1 $2",["9"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["80"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[3-578]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["1[3-9]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3 $4",["[12]"],"0$1",1]],"0",0,"(1(?:[12]\\d|79)\\d\\d)|0",0,0,0,0,"00"],CO:["57","00(?:4(?:[14]4|56)|[579])","(?:46|60\\d\\d)\\d{6}|(?:1\\d|[39])\\d{9}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["46"]],["(\\d{3})(\\d{7})","$1 $2",["6|90"],"($1)"],["(\\d{3})(\\d{7})","$1 $2",["3[0-357]|9[14]"]],["(\\d)(\\d{3})(\\d{7})","$1-$2-$3",["1"],"0$1",0,"$1 $2 $3"]],"0",0,"0([3579]|4(?:[14]4|56))?"],CR:["506","00","(?:8\\d|90)\\d{8}|(?:[24-8]\\d{3}|3005)\\d{4}",[8,10],[["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[3-9]"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[89]"]]],0,0,"(19(?:0[0-2468]|1[09]|20|66|77|99))"],CU:["53","119","(?:[2-7]|8\\d\\d)\\d{7}|[2-47]\\d{6}|[34]\\d{5}",[6,7,8,10],[["(\\d{2})(\\d{4,6})","$1 $2",["2[1-4]|[34]"],"(0$1)"],["(\\d)(\\d{6,7})","$1 $2",["7"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["[56]"],"0$1"],["(\\d{3})(\\d{7})","$1 $2",["8"],"0$1"]],"0"],CV:["238","0","(?:[2-59]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2-589]"]]]],CW:["599","00","(?:[34]1|60|(?:7|9\\d)\\d)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[3467]"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["9[4-8]"]]],0,0,0,0,0,"[69]"],CX:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:01|30|59|88)|1(?:17|46|75)|2(?:22|35))|91(?:00[6-9]|1(?:[28]1|49|78)|2(?:09|63)|3(?:12|26|75)|4(?:56|97)|64\\d|7(?:0[01]|1[0-2])|958))\\d{3}",[9]],["4(?:79[01]|83[0-36-9
vendor: 7,582 bytes, line 1
1])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CY:["357","00","(?:[279]\\d|[58]0)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[257-9]"]]]],CZ:["420","00","(?:[2-578]\\d|60)\\d{7}|9\\d{8,11}",[9,10,11,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]|9[015-7]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3 $4",["96"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]]],DE:["49","00","[2579]\\d{5,14}|49(?:[34]0|69|8\\d)\\d\\d?|49(?:37|49|60|7[089]|9\\d)\\d{1,3}|49(?:2[024-9]|3[2-689]|7[1-7])\\d{1,8}|(?:1|[368]\\d|4[0-8])\\d{3,13}|49(?:[015]\\d|2[13]|31|[46][1-8])\\d{1,9}",[4,5,6,7,8,9,10,11,12,13,14,15],[["(\\d{2})(\\d{3,13})","$1 $2",["3[02]|40|[68]9"],"0$1"],["(\\d{3})(\\d{3,12})","$1 $2",["2(?:0[1-389]|1[124]|2[18]|3[14])|3(?:[35-9][15]|4[015])|906|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1","2(?:0[1-389]|12[0-8])|3(?:[35-9][15]|4[015])|906|2(?:[13][14]|2[18])|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1"],"0$1"],["(\\d{4})(\\d{2,11})","$1 $2",["[24-6]|3(?:[3569][02-46-9]|4[2-4679]|7[2-467]|8[2-46-8])|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]","[24-6]|3(?:3(?:0[1-467]|2[127-9]|3[124578]|7[1257-9]|8[1256]|9[145])|4(?:2[135]|4[13578]|9[1346])|5(?:0[14]|2[1-3589]|6[1-4]|7[13468]|8[13568])|6(?:2[1-489]|3[124-6]|6[13]|7[12579]|8[1-356]|9[135])|7(?:2[1-7]|4[145]|6[1-5]|7[1-4])|8(?:21|3[1468]|6|7[1467]|8[136])|9(?:0[12479]|2[1358]|4[134679]|6[1-9]|7[136]|8[147]|9[1468]))|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]|3[68]4[1347]|3(?:47|60)[1356]|3(?:3[46]|46|5[49])[1246]|3[4579]3[1357]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["138"],"0$1"],["(\\d{5})(\\d{2,10})","$1 $2",["3"],"0$1"],["(\\d{3})(\\d{5,11})","$1 $2",["181"],"0$1"],["(\\d{3})(\\d)(\\d{4,10})","$1 $2 $3",["1(?:3|80)|9"],"0$1"],["(\\d{3})(\\d{7,8})","$1 $2",["1[67]"],"0$1"],["(\\d{3})(\\d{7,12})","$1 $2",["8"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["185","1850","18500"],"0$1"],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["18[68]"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["15[1279]"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["15[03568]","15(?:[0568]|3[13])"],"0$1"],["(\\d{3})(\\d{8})","$1 $2",["18"],"0$1"],["(\\d{3})(\\d{2})(\\d{7,8})","$1 $2 $3",["1(?:6[023]|7)"],"0$1"],["(\\d{4})(\\d{2})(\\d{7})","$1 $2 $3",["15[279]"],"0$1"],["(\\d{3})(\\d{2})(\\d{8})","$1 $2 $3",["15"],"0$1"]],"0"],DJ:["253","00","(?:2\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[27]"]]]],DK:["45","00","[2-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-9]"]]]],DM:["1","011","(?:[58]\\d\\d|767|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","767$1",0,"767"],DO:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,0,0,0,"8001|8[024]9"],DZ:["213","00","(?:[1-4]|[5-79]\\d|80)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["9"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-8]"],"0$1"]],"0"],EC:["593","00","1\\d{9,10}|(?:[2-7]|9\\d)\\d{7}",[8,9,10,11],[["(\\d)(\\d{3})(\\d{4})","$1 $2-$3",["[2-7]"],"(0$1)",0,"$1-$2-$3"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{3})(\\d{3,4})","$1 $2 $3",["1"]]],"0"],EE:["372","00","8\\d{9}|[4578]\\d{7}|(?:[3-8]\\d|90)\\d{5}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[369]|4[3-8]|5(?:[0-2]|5[0-478]|6[45])|7[1-9]|88","[369]|4[3-8]|5(?:[02]|1(?:[0-8]|95)|5[0-478]|6(?:4[0-4]|5[1-589]))|7[1-9]|88"]],["(\\d{4})(\\d{3,4})","$1 $2",["[45]|8(?:00|[1-49])","[45]|8(?:00[1-9]|[1-49])"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],EG:["20","00","[189]\\d{8,9}|[24-6]\\d{8}|[135]\\d{7}",[8,9,10],[["(\\d)(\\d{7,8})","$1 $2",["[23]"],"0$1"],["(\\d{2})(\\d{6,7})","$1 $2",["1[35]|[4-6]|8[2468]|9[235-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{8})","$1 $2",["1"],"0$1"]],"0"],EH:["212","00","[5-8]\\d{8}",[9],0,"0",0,0,0,0,"528[89]"],ER:["291","00","[178]\\d{6}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[178]"],"0$1"]],"0"],ES:["34","00","[5-9]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]00"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-9]"]]]],ET:["251","00","(?:11|[2-579]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-579]"],"0$1"]],"0"],FI:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","[1-35689]\\d{4}|7\\d{10,11}|(?:[124-7]\\d|3[0-46-9])\\d{8}|[1-9]\\d{5,8}",[5,6,7,8,9,10,11,12],[["(\\d{5})","$1",["20[2-59]"],"0$1"],["(\\d{3})(\\d{3,7})","$1 $2",["(?:[1-3]0|[68])0|70[07-9]"],"0$1"],["(\\d{2})(\\d{4,8})","$1 $2",["[14]|2[09]|50|7[135]"],"0$1"],["(\\d{2})(\\d{6,10})","$1 $2",["7"],"0$1"],["(\\d)(\\d{4,9})","$1 $2",["(?:19|[2568])[1-8]|3(?:0[1-9]|[1-9])|9"],"0$1"]],"0",0,0,0,0,"1[03-79]|[2-9]",0,"00"],FJ:["679","0(?:0|52)","45\\d{5}|(?:0800\\d|[235-9])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1 $2",["[235-9]|45"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]]],0,0,0,0,0,0,0,"00"],FK:["500","00","[2-7]\\d{4}",[5]],FM:["691","00","(?:[39]\\d\\d|820)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[389]"]]]],FO:["298","00","[2-9]\\d{5}",[6],[["(\\d{6})","$1",["[2-9]"]]],0,0,"(10(?:01|[12]0|88))"],FR:["33","00","[1-9]\\d{8}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0 $1"],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[1-79]"],"0$1"]],"0"],GA:["241","00","(?:[067]\\d|11)\\d{6}|[2-7]\\d{6}",[7,8],[["(\\d)(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-7]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["11|[67]"],"0$1"]],0,0,"0(11\\d{6}|60\\d{6}|61\\d{6}|6[256]\\d{6}|7[467]\\d{6})","$1"],GB:["44","00","[1-357-9]\\d{9}|[18]\\d{8}|8\\d{6}",[7,9,10],[["(\\d{3})(\\d{4})","$1 $2",["800","8001","80011","800111","8001111"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["845","8454","84546","845464"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["800"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["1(?:38|5[23]|69|76|94)","1(?:(?:38|69)7|5(?:24|39)|768|946)","1(?:3873|5(?:242|39[4-6])|(?:697|768)[347]|9467)"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["1(?:[2-69][02-9]|[78])"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[25]|7(?:0|6[02-9])","[25]|7(?:0|6(?:[03-9]|2[356]))"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[1389]"],"0$1"]],"0",0,"0|180020",0,0,0,[["(?:1(?:1(?:3(?:[0-58]\\d\\d|73[0-5])|4(?:(?:[0-5]\\d|70)\\d|69[7-9])|(?:(?:5[0-26-9]|[78][0-49])\\d|6(?:[0-4]\\d|5[01]))\\d)|(?:2(?:(?:0[024-9]|2[3-9]|3[3-79]|4[1-689]|[58][02-9]|6[0-47-9]|7[013-9]|9\\d)\\d|1(?:[0-7]\\d|8[0-3]))|(?:3(?:0\\d|1[0-8]|[25][02-9]|3[02-579]|[468][0-46-9]|7[1-35-79]|9[2-578])|4(?:0[03-9]|[137]\\d|[28][02-57-9]|4[02-69]|5[0-8]|[69][0-79])|5(?:0[1-35-9]|[16]\\d|2[024-9]|3[015689]|4[02-9]|5[03-9]|7[0-35-9]|8[0-468]|9[0-57-9])|6(?:0[034689]|1\\d|2[0-35689]|[38][013-9]|4[1-467]|5[0-69]|6[13-9]|7[0-8]|9[0-24578])|7(?:0[0246-9]|2\\d|3[0236-8]|4[03-9]|5[0-46-9]|6[013-9]|7[0-35-9]|8[024-9]|9[02-9])|8(?:0[35-9]|2[1-57-9]|3[02-578]|4[0-578]|5[124-9]|6[2-69]|7\\d|8[02-9]|9[02569])|9(?:0[02-589]|[18]\\d|2[02-689]|3[1-57-9]|4[2-9]|5[0-579]|6[2-47-9]|7[0-24578]|9[2-57]))\\d)\\d)|2(?:0[013478]|3[0189]|4[017]|8[0-46-9]|9[0-2])\\d{3})\\d{4}|1(?:2(?:0(?:46[1-4]|87[2-9])|545[1-79]|76(?:2\\d|3[1-8]|6[1-6])|9(?:7(?:2[0-4]|3[2-5])|8(?:2[2-8]|7[0-47-9]|8[3-5])
vendor: 9,381 bytes, line 1
1))|3(?:6(?:38[2-5]|47[23])|8(?:47[04-9]|64[0157-9]))|4(?:044[1-7]|20(?:2[23]|8\\d)|6(?:0(?:30|5[2-57]|6[1-8]|7[2-8])|140)|8(?:052|87[1-3]))|5(?:2(?:4(?:3[2-79]|6\\d)|76\\d)|6(?:26[06-9]|686))|6(?:06(?:4\\d|7[4-79])|295[5-7]|35[34]\\d|47(?:24|61)|59(?:5[08]|6[67]|74)|9(?:55[0-4]|77[23]))|7(?:26(?:6[13-9]|7[0-7])|(?:442|688)\\d|50(?:2[0-3]|[3-68]2|76))|8(?:27[56]\\d|37(?:5[2-5]|8[239])|843[2-58])|9(?:0(?:0(?:6[1-8]|85)|52\\d)|3583|4(?:66[1-8]|9(?:2[01]|81))|63(?:23|3[1-4])|9561))\\d{3}",[9,10]],["7(?:457[0-57-9]|700[01]|911[028])\\d{5}|7(?:[1-3]\\d\\d|4(?:[0-46-9]\\d|5[0-689])|5(?:0[0-8]|[13-9]\\d|2[0-35-9])|7(?:0[1-9]|[1-7]\\d|8[02-9]|9[0-689])|8(?:[014-9]\\d|[23][0-8])|9(?:[024-9]\\d|1[02-9]|3[0-689]))\\d{6}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[2-49]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]],0," x"],GD:["1","011","(?:473|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","473$1",0,"473"],GE:["995","00","(?:[3-57]\\d\\d|800)\\d{6}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["32"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[57]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[348]"],"0$1"]],"0"],GF:["594","00","(?:[56]94\\d|7093)\\d{5}|(?:80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]|9[47]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[89]"],"0$1"]],"0"],GG:["44","00","(?:1481|[357-9]\\d{3})\\d{6}|8\\d{6}(?:\\d{2})?",[7,9,10],0,"0",0,"([25-9]\\d{5})$|0|180020","1481$1",0,0,[["1481[25-9]\\d{5}",[10]],["7(?:(?:781|839)\\d|911[17])\\d{5}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[0-3]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]]],GH:["233","00","(?:[235]\\d{3}|800)\\d{5}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[235]"],"0$1"]],"0"],GI:["350","00","(?:[25]\\d|60)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["2"]]]],GL:["299","00","(?:19|[2-689]\\d|70)\\d{4}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["19|[2-9]"]]]],GM:["220","00","[2-9]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],GN:["224","00","722\\d{6}|(?:3|6\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["3"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[67]"]]]],GP:["590","00","(?:590\\d|7090)\\d{5}|(?:69|80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-79]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0",0,0,0,0,0,[["590(?:0[1-68]|[14][0-24-9]|2[0-68]|3[1-9]|5[3-579]|[68][0-689]|7[08]|9\\d)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],GQ:["240","00","222\\d{6}|(?:3\\d|55|[89]0)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235]"]],["(\\d{3})(\\d{6})","$1 $2",["[89]"]]]],GR:["30","00","5005000\\d{3}|8\\d{9,11}|(?:[269]\\d|70)\\d{8}",[10,11,12],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["21|7"]],["(\\d{4})(\\d{6})","$1 $2",["2(?:2|3[2-57-9]|4[2-469]|5[2-59]|6[2-9]|7[2-69]|8[2-49])|5"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2689]"]],["(\\d{3})(\\d{3,4})(\\d{5})","$1 $2 $3",["8"]]]],GT:["502","00","80\\d{6}|(?:1\\d{3}|[2-7])\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1 $2",["[2-8]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],GU:["1","011","(?:[58]\\d\\d|671|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","671$1",0,"671"],GW:["245","00","[49]\\d{8}|4\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["40"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"]]]],GY:["592","001","(?:[2-8]\\d{3}|9008)\\d{3}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],HK:["852","00(?:30|5[09]|[126-9]?)","8[0-46-9]\\d{6,7}|9\\d{4,7}|(?:[2-7]|9\\d{3})\\d{7}",[5,6,7,8,9,11],[["(\\d{3})(\\d{2,5})","$1 $2",["900","9003"]],["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[1-4]|9(?:0[1-9]|[1-8])"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{3})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]],0,0,0,0,0,0,0,"00"],HN:["504","00","8\\d{10}|[237-9]\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1-$2",["[237-9]"]]]],HR:["385","00","[2-69]\\d{8}|80\\d{5,7}|[1-79]\\d{7}|6\\d{6}",[7,8,9],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["6[01]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{4})(\\d{3})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6|7[245]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-57]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"]],"0"],HT:["509","00","[2-589]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[2-589]"]]]],HU:["36","00","[235-7]\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27][2-9]|3[2-7]|4[24-9]|5[2-79]|6|8[2-57-9]|9[2-69]"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"06 $1"]],"06"],ID:["62","00[89]","00[1-9]\\d{9,14}|(?:[1-36]|8\\d{5})\\d{6}|00\\d{9}|[1-9]\\d{8,10}|[2-9]\\d{7}",[7,8,9,10,11,12,13,14,15,16,17],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["15"]],["(\\d{2})(\\d{5,9})","$1 $2",["2[124]|[36]1"],"(0$1)"],["(\\d{3})(\\d{5,7})","$1 $2",["800"],"0$1"],["(\\d{3})(\\d{5,8})","$1 $2",["[2-79]"],"(0$1)"],["(\\d{3})(\\d{3,4})(\\d{3})","$1-$2-$3",["8[1-35-9]"],"0$1"],["(\\d{3})(\\d{6,8})","$1 $2",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["804"],"0$1"],["(\\d{3})(\\d)(\\d{3})(\\d{3})","$1 $2 $3 $4",["80"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1-$2-$3",["8"],"0$1"]],"0"],IE:["353","00","(?:1\\d|[2569])\\d{6,8}|4\\d{6,9}|7\\d{8}|8\\d{8,9}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["2[24-9]|47|58|6[237-9]|9[35-9]"],"(0$1)"],["(\\d{3})(\\d{5})","$1 $2",["[45]0"],"(0$1)"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["1"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2569]|4[1-69]|7[14]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["81"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[78]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["4"],"(0$1)"],["(\\d{2})(\\d)(\\d{3})(\\d{4})","$1 $2 $3 $4",["8"],"0$1"]],"0"],IL:["972","0(?:0|1[2-9])","1\\d{6}(?:\\d{3,5})?|[57]\\d{8}|[1-489]\\d{7}",[7,8,9,10,11,12],[["(\\d{4})(\\d{3})","$1-$2",["125"]],["(\\d{4})(\\d{2})(\\d{2})","$1-$2-$3",["121"]],["(\\d)(\\d{3})(\\d{4})","$1-$2-$3",["[2-489]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1-$2-$3",["12"]],["(\\d{4})(\\d{6})","$1-$2",["159"]],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3-$4",["1[7-9]"]],["(\\d{3})(\\d{1,2})(\\d{3})(\\d{4})","$1-$2 $3-$4",["15"]]],"0"],IM:["44","00","1624\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([25-8]\\d{5})$|0|180020","1624$1",0,"74576|(?:16|7[56])24"],IN:["91","00","(?:000800|[2-9]\\d\\d)\\d{7}|1\\d{7,12}",[8,9,10,11,12,13],[["(\\d{8})","$1",["5(?:0|2[23]|3[03]|[67]1|88)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|888)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|8888)"],0,1],["(\\d{4})(\\d{4,5})","$1 $2",["180","1800"],0,1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["140"],0,1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["11|2[02]|33|4[04]|79[1-7]|80[2-46]","11|2[02]|33|4[04]|79(?:[1-6]|7[19])|80(?:[2-4]|6[0-589])","11|2[02]|33|4[04]|79(?:[124-6]|3(?:[02-9]|1[0-24-9])|7(?:1|9[1-6]))|80(?:[2-4]|6[0-589])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1(?:2[0-249]|3[0-25]|4[145]|[68]|7[1257])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|5[12]|[78]1)|6(?:12|[2-4]1|5[17]|6[13]|80)|7(?:12|3[134]|4[47]|61|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)|(?:43|59|75)[15]|(?:1[59]|29|67|72)[14]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|674|7(?:(?:2[14]|3[34]|5[15])[2-6]|61[346]|88[0-8])|8(?:70[2-6]|84[235-7]|91[3-7])|(?:1(?:29|60|8[06])|261|552|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|31|4[47])|8(?:16|2[014]|3[126]|6[136]|7[78]|83))[2-7]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12(?:[2-6]|7[0-8])|74[2-7])|7(?:(?:2[14]|5[15])[2-6]|3171|61[346]|88(?:[2-7]|82))|8(?:70[2-6]|84(?:[2356]|7[19])|91(?:[3-6]|7[19]))|73[134][2-6]|(?:74[47]|8(?:16|2[014]|3[126]|6[136]|7[78]|83))(?:[2-6]|7[19])|(?:1(?:29|60|8[06])|261|552|6(?:[2-4]1|5[17]|6[13]|7(?:1|4[0189])|80)|7(?:12|88[01]))[2-7]"],"0$1",1],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2[2457-9]|3[2-5]|4[235-7]|5[2
vendor: 12,435 bytes, line 1
1-689]|6[24578]|7[235689]|8[1-6])|7(?:1[013-9]|28|3[129]|4[1-35689]|5[29]|6[02-5]|70)|807","1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2(?:[2457]|84|95)|3(?:[2-4]|55)|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1(?:[013-8]|9[6-9])|28[6-8]|3(?:17|2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4|5[0-367])|70[13-7])|807[19]","1(?:[2-479]|5(?:[0236-9]|5[013-9]))|[2-5]|6(?:2(?:84|95)|355|83)|73179|807(?:1|9[1-3])|(?:1552|6(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[124-6])\\d|7(?:1(?:[013-8]\\d|9[6-9])|28[6-8]|3(?:2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]\\d|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]))[2-7]"],"0$1",1],["(\\d{5})(\\d{5})","$1 $2",["[6-9]"],"0$1",1],["(\\d{4})(\\d{2,4})(\\d{4})","$1 $2 $3",["1(?:6|8[06])","1(?:6|8[06]0)"],0,1],["(\\d{4})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["18"],0,1]],"0"],IO:["246","00","3\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["3"]]]],IQ:["964","00","(?:1|7\\d\\d)\\d{7}|[2-6]\\d{7,8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-6]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"]],"0"],IR:["98","00","[1-9]\\d{9}|(?:[1-8]\\d\\d|9)\\d{3,4}",[4,5,6,7,10],[["(\\d{4,5})","$1",["96"],"0$1"],["(\\d{2})(\\d{4,5})","$1 $2",["(?:1[137]|2[13-68]|3[1458]|4[145]|5[1468]|6[16]|7[1467]|8[13467])[12689]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[1-8]"],"0$1"]],"0"],IS:["354","00|1(?:0(?:01|[12]0)|100)","(?:38\\d|[4-9])\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["[4-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["3"]]],0,0,0,0,0,0,0,"00"],IT:["39","00","0\\d{5,11}|1\\d{8,10}|3(?:[0-8]\\d{7,10}|9\\d{7,8})|(?:43|55|70)\\d{8}|8\\d{5}(?:\\d{2,4})?",[6,7,8,9,10,11,12],[["(\\d{2})(\\d{4,6})","$1 $2",["0[26]"]],["(\\d{3})(\\d{3,6})","$1 $2",["0[13-57-9][0159]|8(?:03|4[17]|9[2-5])","0[13-57-9][0159]|8(?:03|4[17]|9(?:2|3[04]|[45][0-4]))"]],["(\\d{4})(\\d{2,6})","$1 $2",["0(?:[13-579][2-46-8]|8[236-8])"]],["(\\d{4})(\\d{4})","$1 $2",["894"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[26]|5"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["1(?:44|[679])|[378]|43"]],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[13-57-9][0159]|14"]],["(\\d{2})(\\d{4})(\\d{5})","$1 $2 $3",["0[26]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[03]"]]],0,0,0,0,0,0,[["0(?:669[0-79]\\d{1,6}|831\\d{2,8})|0(?:1(?:[0159]\\d|[27][1-5]|31|4[1-4]|6[1356]|8[2-57])|2\\d\\d|3(?:[0159]\\d|2[1-4]|3[12]|[48][1-6]|6[2-59]|7[1-7])|4(?:[0159]\\d|[23][1-9]|4[245]|6[1-5]|7[1-4]|81)|5(?:[0159]\\d|2[1-5]|3[2-6]|4[1-79]|6[4-6]|7[1-578]|8[3-8])|6(?:[0-57-9]\\d|6[0-8])|7(?:[0159]\\d|2[12]|3[1-7]|4[2-46]|6[13569]|7[13-6]|8[1-59])|8(?:[0159]\\d|2[3-578]|3[2356]|[6-8][1-5])|9(?:[0159]\\d|[238][1-5]|4[12]|6[1-8]|7[1-6]))\\d{2,7}"],["3[2-9]\\d{7,8}|(?:31|43)\\d{8}",[9,10]],["80(?:0\\d{3}|3)\\d{3}",[6,9]],["(?:0878\\d{3}|89(?:2\\d|3[04]|4(?:[0-4]|[5-9]\\d\\d)|5[0-4]))\\d\\d|(?:1(?:44|6[346])|89(?:38|5[5-9]|9))\\d{6}",[6,8,9,10]],["1(?:78\\d|99)\\d{6}",[9,10]],["3[2-8]\\d{9,10}",[11,12]],0,0,["55\\d{8}",[10]],["84(?:[08]\\d{3}|[17])\\d{3}",[6,9]]]],JE:["44","00","1534\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([0-24-8]\\d{5})$|0|180020","1534$1",0,0,[["1534[0-24-8]\\d{5}"],["7(?:(?:(?:50|82)9|937)\\d|7(?:00[378]|97\\d))\\d{5}"],["80(?:07(?:35|81)|8901)\\d{4}"],["(?:8(?:4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|90(?:066[59]|1810|71(?:07|55)))\\d{4}"],["701511\\d{4}"],0,["(?:3(?:0(?:07(?:35|81)|8901)|3\\d{4}|4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|55\\d{4})\\d{4}"],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}"],["56\\d{8}"]]],JM:["1","011","(?:[58]\\d\\d|658|900)\\d{7}",[10],0,"1",0,0,0,0,"658|876"],JO:["962","00","(?:(?:[2689]|7\\d)\\d|32|427|53)\\d{6}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2356]|87"],"(0$1)"],["(\\d{3})(\\d{5,6})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["70"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[47]"],"0$1"]],"0"],JP:["81","010","00[1-9]\\d{6,14}|[25-9]\\d{9}|(?:00|[1-9]\\d\\d)\\d{6}",[8,9,10,11,12,13,14,15,16,17],[["(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3",["(?:12|57|99)0"],"0$1"],["(\\d{4})(\\d)(\\d{4})","$1-$2-$3",["1(?:26|3[79]|4[56]|5[4-68]|6[3-5])|499|5(?:76|97)|746|8(?:3[89]|47|51)|9(?:80|9[16])","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:76|97)9|7468|8(?:3(?:8[7-9]|96)|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:769|979[2-69])|7468|8(?:3(?:8[7-9]|96[2457-9])|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["60"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2-$3",["3|4(?:2[09]|7[01])|6[1-9]","3|4(?:2(?:0|9[02-69])|7(?:0[019]|1))|6[1-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["1(?:1|5[45]|77|88|9[69])|2(?:2[1-37]|3[0-269]|4[59]|5|6[24]|7[1-358]|8[1369]|9[0-38])|4(?:[28][1-9]|3[0-57]|[45]|6[248]|7[2-579]|9[29])|5(?:2|3[0459]|4[0-369]|5[29]|8[02389]|9[0-389])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9[2-6])|8(?:2[124589]|3[26-9]|49|51|6|7[0-468]|8[68]|9[019])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9[1-489])","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2(?:[127]|3[014-9])|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9[19])|62|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|8[1-9]|9[29])|5(?:2|3(?:[045]|9[0-8])|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0-2469])|3(?:[29]|60)|49|51|6(?:[0-24]|36|5[0-3589]|7[23]|9[01459])|7[0-468]|8[68])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3[34]|4[0178]))|(?:264|837)[016-9]|2(?:57|93)[015-9]|(?:25[0468]|422|838)[01]|(?:47[59]|59[89]|8(?:6[68]|9))[019]","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2[127]|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3(?:[045]|9(?:[0-58]|6[4-9]|7[0-35689]))|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0169])|3(?:[29]|60|7(?:[017-9]|6[6-8]))|49|51|6(?:[0-24]|36[2-57-9]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|7(?:2[2-468]|3[78])|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:8294|96)[1-3]|2(?:57|93)[015-9]|(?:223|8699)[014-9]|(?:25[0468]|422|838)[01]|(?:48|8292|9[23])[1-9]|(?:47[59]|59[89]|8(?:68|9))[019]"],"0$1"],["(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3",["[14]|[289][2-9]|5[3-9]|7[2-4679]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["800"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[25-9]"],"0$1"]],"0",0,"(000[2569]\\d{4,6})$|(?:(?:003768)0?)|0","$1"],KE:["254","000","(?:[17]\\d\\d|900)\\d{6}|(?:2|80)0\\d{6,7}|[4-6]\\d{6,8}",[7,8,9,10],[["(\\d{2})(\\d{5,7})","$1 $2",["[24-6]"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[17]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0"],KG:["996","00","8\\d{9}|[235-9]\\d{8}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["3(?:1[346]|[24-79])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-79]|88"],"0$1"],["(\\d{3})(\\d{3})(\\d)(\\d{2,3})","$1 $2 $3 $4",["8"],"0$1"]],"0"],KH:["855","00[14-9]","1\\d{9}|[1-9]\\d{7,8}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],KI:["686","00","(?:[37]\\d|6[0-79])\\d{6}|(?:[2-48]\\d|50)\\d{3}",[5,8],0,"0"],KM:["269","00","[3478]\\d{6}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[3478]"]]]],KN:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","869$1",0,"869"],KP:["850","00|99","85\\d{6}|(?:19\\d|[2-7])\\d{7}",[8,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"]],"0"],KR:["82","00(?:[125689]|3(?:[46]5|91)|7(?:00|27|3|55|6[126]))","00[1-9]\\d{8,11}|(?:[12]|5\\d{3})\\d{7}|[13-6]\\d{9}|(?:[1-6]\\d|80)\\d{7}|[3-6]\\d{4,5}|(?:00|7)0\\d{8}",[5,6,8,9,10,11,12,13,14],[["(\\d{2})(\\d{3,4})","$1-$2",["(?:3[1-3]|[46][1-4]|5[1-5])1"],"0$1"],["(\\d{4})(\\d{4})","$1-$2",["1"]],["(\\d)(\\d{3,4})(\\d{4})","$1-$2-$3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[36]0|8"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1-$2-$3",["[1346]|5[1-5]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{2})(\\d{5})(\\d{4})","$1-$2-$3",["5"],"0$1"]],"0",0,"0(8(?:[1-46-8]|5\\d\\d))?"],KW:["965","00","18\\d{5}|(?:[2569]\\d|41)\\d{6}",[7,8],[["(\\d{4})(\\d{3,4})","$1 $2",["[169]|2(?:[235]|4[1-35-9])|52"]],["(\\d{3})(\\d{5})","$1 $2",["[245]"]]]],KY:["1","011","(?:345|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","345$1",0,"345"],KZ:["7","810","(?:33622|8\\d{8})\\d{5}|[78]\\d{9}",[10,14],0,"8",0,0,0,0,"33622|7",0,"8~10"],LA:["856","00","[23]\\d{9}|3\\d{8}|(?:[235-8]\\d|41)\\d{6}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2[13]|3[14]|[4-8]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["3"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[23]"],"0$1"]],"0"],LB:["961","00","[27-9]\\d{7}|[13-9]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[13-69]|7(?:[2-57]|62|8[0-6]|9[04-9])|8[02-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27-9]"]]],"0"],LC:["1","011","(?:[58]\\d\\d|758|900)\\d{7}",[10],0,"1",0,"([2-8]\\d{6})$|1","758$1",0,"758"],LI:["423","00","[68]\\d{8}|(?:[2378]\\d|90)\\d{5}",[7,9],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2379]|8(?:0[09]|7)","[2379]|8(?:0(?:02|9)|7)"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["69"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]],"0",0,"(1001)|0"],LK:["94","00","[1-9]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[1-689]"],"0$1"]],"0"],LR:["231","00","(?:[2457]\\d|33|88)\\d{7}|(?:2\\d|[4-6])\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["4[67]|[56]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-578]"],"0$1"]],"0"],LS:["266","00","(?:[256]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2568]"]]]],LT:["370","00","(?:[3469]\\d|52|[78]0)\\d{6}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["52[0-7]"],"(0-$1)",1],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[7-9]"],"0 $1",1],["(\\d{2})(\\d{6})","$1 $2",["37|4(?:[15]|6[1-8])"],"(0-$1)",1],["(\\d{3})(\\d{5})","$1 $2",["[3-6]"],"(0-$1)",1]],"0",0,"[08]"],LU:["352","00","35[013-9]\\d{4,8}|6\\d{8}|35\\d{2,4}|(?:[2457-9]\\d|3[0-46-9])\\d{2,9}",[4,5,6,7,8,9,10,11],[["(\\d{2})(\\d{3})","$1 $2",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["20[2-689]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4",["2(?:[0367]|4[3-8])"]],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["80[01]|90[015]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["20"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4 $5",["2(?:[0367]|4[3-8])"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,5})","$1 $2 $3 $4",["[3-57]|8[13-9]|9(?:0[89]|[2-579])|(?:2|80)[2-9]"]]],0,0,"(15(?:0[06]|1[12]|[35]5|4[04]|6[26]|77|88|99)\\d)"],LV:["371","00","(?:[268]\\d|78|90)\\d{6}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2679]|8[01]"]]]],LY:["218","00","[2-9]\\d{8}",[9],[["(\\d{2})(\\d{7})","$1-$2",["[2-9]"],"0$1"]],"0"],MA:["212","00","[5-8]\\d{8}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5[45]"],"0$1"],["(\\d{4})(\\d{5})","$1-$2",["5(?:2[2-46-9]|3[3-9]|9)|8(?:0[89]|92)"],"0$1"],["(\\d{2})(\\d{7})","$1-$2",["8"],"0$1"],["(\\d{3})(\\d{6})","$1-$2",["[5-7]"],"0$1"]],"0",0,0,0,0,0,[["5(?:2(?:[0-25-79]\\d|3[1-578]|4[02-46-8]|8[0235-7])|3(?:[0-47]\\d|5[02-9]|6[02-8]|8[014-9]|9[3-9])|(?:4[067]|5[03])\\d)\\d{5}"],["(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[0167]\\d|2[0-8]|5[0-5]|8[0-7]))\\d{6}"],["80[0-7]\\d{6}"],["89\\d{7}"],0,0,0,0,["(?:592(?:4[0-2]|93)|80[89]\\d\\d)\\d{4}"]]],MC:["377","00","(?:[3489]|
16\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["4"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[389]"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["6
vendor: 18,815 bytes, line 1
1"],"0$1"]],"0"],MD:["373","00","(?:[235-7]\\d|[89]0)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["22|3"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[25-7]"],"0$1"]],"0"],ME:["382","00","(?:20|[3-79]\\d)\\d{6}|80\\d{6,7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"0$1"]],"0"],MF:["590","00","(?:590\\d|7090)\\d{5}|(?:69|80|9\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["590(?:0[079]|[14]3|[27][79]|3[03-7]|5[0-268]|87)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],MG:["261","00","[23]\\d{8}",[9],[["(\\d{2})(\\d{2})(\\d{3})(\\d{2})","$1 $2 $3 $4",["[23]"],"0$1"]],"0",0,"([24-9]\\d{6})$|0","20$1"],MH:["692","011","329\\d{4}|(?:[256]\\d|45)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1-$2",["[2-6]"]]],"1"],MK:["389","00","[2-578]\\d{7}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2|34[47]|4(?:[37]7|5[47]|64)"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[347]"],"0$1"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["[58]"],"0$1"]],"0"],ML:["223","00","[24-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-9]"]]]],MM:["95","00","1\\d{5,7}|95\\d{6}|(?:[4-7]|9[0-46-9])\\d{6,8}|(?:2|8\\d)\\d{5,8}",[6,7,8,9,10],[["(\\d)(\\d{2})(\\d{3})","$1 $2 $3",["16|2"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["4(?:[2-46]|5[3-5])|5|6(?:[1-689]|7[235-7])|7(?:[0-4]|5[2-7])|8[1-5]|(?:60|86)[23]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[12]|452|678|86","[12]|452|6788|86"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[4-7]|8[1-35]"],"0$1"],["(\\d)(\\d{3})(\\d{4,6})","$1 $2 $3",["9(?:2[0-4]|[35-9]|4[137-9])"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["92"],"0$1"],["(\\d)(\\d{5})(\\d{4})","$1 $2 $3",["9"],"0$1"]],"0"],MN:["976","001","[12]\\d{7,9}|[5-9]\\d{7}",[8,9,10],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[12]1"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[5-9]"]],["(\\d{3})(\\d{5,6})","$1 $2",["[12]2[1-3]"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["[12](?:27|3[2-8]|4[2-68]|5[1-4689])","[12](?:27|3[2-8]|4[2-68]|5[1-4689])[0-3]"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["[12]"],"0$1"]],"0"],MO:["853","00","0800\\d{3}|(?:28|[68]\\d)\\d{6}",[7,8],[["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{4})(\\d{4})","$1 $2",["[268]"]]]],MP:["1","011","[58]\\d{9}|(?:67|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","670$1",0,"670"],MQ:["596","00","(?:596\\d|7091)\\d{5}|(?:69|[89]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-79]|8(?:0[6-9]|[36])"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],MR:["222","00","(?:[2-4]\\d\\d|800)\\d{5}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-48]"]]]],MS:["1","011","(?:[58]\\d\\d|664|900)\\d{7}",[10],0,"1",0,"([34]\\d{6})$|1","664$1",0,"664"],MT:["356","00","3550\\d{4}|(?:[2579]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2357-9]"]]]],MU:["230","0(?:0|[24-7]0|3[03])","(?:[57]|8\\d\\d)\\d{7}|[2-468]\\d{6}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[2-46]|8[013]"]],["(\\d{4})(\\d{4})","$1 $2",["[57]"]],["(\\d{5})(\\d{5})","$1 $2",["8"]]],0,0,0,0,0,0,0,"020"],MV:["960","0(?:0|19)","(?:800|9[0-57-9]\\d)\\d{7}|[34679]\\d{6}",[7,10],[["(\\d{3})(\\d{4})","$1-$2",["[34679]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"]]],0,0,0,0,0,0,0,"00"],MW:["265","00","(?:[1289]\\d|31|77)\\d{7}|1\\d{6}",[7,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["1[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[137-9]"],"0$1"]],"0"],MX:["52","0[09]","[2-9]\\d{9}",[10],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["33|5[56]|81"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2-9]"]]],0,0,0,0,0,0,0,"00"],MY:["60","00","1\\d{8,9}|(?:3\\d|[4-9])\\d{7}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1-$2 $3",["[4-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1-$2 $3",["1(?:[02469]|[378][1-9]|53)|8","1(?:[02469]|[37][1-9]|53|8(?:[1-46-9]|5[7-9]))|8"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2 $3",["3"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3-$4",["1(?:[367]|80)"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2 $3",["15"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2 $3",["1"],"0$1"]],"0"],MZ:["258","00","(?:2|8\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2|8[2-79]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],NA:["264","00","[68]\\d{7,8}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["87"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],NC:["687","00","(?:050|[2-57-9]\\d\\d)\\d{3}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1.$2.$3",["[02-57-9]"]]]],NE:["227","00","[027-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["08"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[089]|2[013]|7[0467]"]]]],NF:["672","00","[13]\\d{5}",[6],[["(\\d{2})(\\d{4})","$1 $2",["1[0-3]"]],["(\\d)(\\d{5})","$1 $2",["[13]"]]],0,0,"([0-258]\\d{4})$","3$1"],NG:["234","009","(?:20|9\\d)\\d{8}|[78]\\d{9,13}",[10,11,12,13,14],[["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[7-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["20[129]"],"0$1"],["(\\d{4})(\\d{2})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[78]"],"0$1"],["(\\d{3})(\\d{5})(\\d{5,6})","$1 $2 $3",["[78]"],"0$1"]],"0"],NI:["505","00","(?:1800|[25-8]\\d{3})\\d{4}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[125-8]"]]]],NL:["31","00","(?:[124-7]\\d\\d|3(?:[02-9]\\d|1[0-8]))\\d{6}|8\\d{6,9}|9\\d{6,10}|1\\d{4,5}",[5,6,7,8,9,10,11],[["(\\d{3})(\\d{4,7})","$1 $2",["[89]0"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["66"],"0$1"],["(\\d)(\\d{8})","$1 $2",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["1[16-8]|2[259]|3[124]|4[17-9]|5[124679]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-578]|91"],"0$1"],["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3",["9"],"0$1"]],"0"],NO:["47","00","(?:0|[2-9]\\d{3})\\d{4}",[5,8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]"]]],0,0,0,0,0,"[02-689]|7[0-8]"],NP:["977","00","(?:1\\d|9)\\d{9}|[1-9]\\d{7}",[8,10,11],[["(\\d)(\\d{7})","$1-$2",["1[2-6]"],"0$1"],["(\\d{2})(\\d{6})","$1-$2",["1[01]|[2-8]|9(?:[1-59]|[67][2-6])"],"0$1"],["(\\d{3})(\\d{7})","$1-$2",["9"]]],"0"],NR:["674","00","(?:222|444|(?:55|8\\d)\\d|666|777|999)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[24-9]"]]]],NU:["683","00","(?:[4-7]|888\\d)\\d{3}",[4,7],[["(\\d{3})(\\d{4})","$1 $2",["8"]]]],NZ:["64","0(?:0|161)","[1289]\\d{9}|50\\d{5}(?:\\d{2,3})?|[27-9]\\d{7,8}|(?:[34]\\d|6[0-35-9])\\d{6}|8\\d{4,6}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,8})","$1 $2",["8[1-79]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["50[036-8]|8|90","50(?:[0367]|88)|8|90"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["24|[346]|7[2-57-9]|9[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:10|74)|[589]"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["1|2[028]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,5})","$1 $2 $3",["2(?:[169]|7[0-35-9])|7"],"0$1"]],"0",0,0,0,0,0,0,"00"],OM:["968","00","(?:1505|[279]\\d{3}|500)\\d{4}|800\\d{5,6}",[7,8,9],[["(\\d{3})(\\d{4,6})","$1 $2",["[58]"]],["(\\d{2})(\\d{6})","$1 $2",["2"]],["(\\d{4})(\\d{4})","$1 $2",["[179]"]]]],PA:["507","00","(?:00800|8\\d{3})\\d{6}|[68]\\d{7}|[1-57-9]\\d{6}",[7,8,10,11],[["(\\d{3})(\\d{4})","$1-$2",["[1-57-9]"]],["(\\d{4})(\\d{4})","$1-$2",["[68]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]]],PE:["51","00|19(?:1[124]|77|90)00","(?:[14-8]|9\\d)\\d{7}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["80"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["1"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[4-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"]]],"0",0,0,0,0,0,0,"00"," Anexo "],PF:["689","00","4\\d{5}(?:\\d{2})?|8\\d{7,8}",[6,8,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["44"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4|8[7-9]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],PG:["675","00|140[1-3]","(?:180|[78]\\d{3})\\d{4}|(?:[2-589]\\d|64)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["18|[2-69]|85"]],["(\\d{4})(\\d{4})","$1 $2",["[78]"]]],0,0,0,0,0,0,0,"00"],PH:["63","00","(?:[2-7]|9\\d)\\d{8}|2\\d{5}|(?:1800|8)\\d{7,9}",[6,8,9,10,11,12,13],[["(\\d)(\\d{5})","$1 $2",["2"],"(0$1)"],["(\\d{4})(\\d{4,6})","$1 $2",["3(?:23|39|46)|4(?:2[3-6]|[35]9|4[26]|76)|544|88[245]|(?:52|64|86)2","3(?:230|397|461)|4(?:2(?:35|[46]4|51)|396|4(?:22|63)|59[347]|76[15])|5(?:221|446)|642[23]|8(?:622|8(?:[24]2|5[13]))"],"(0$1)"],["(\\d{5})(\\d{4})","$1 $2",["346|4(?:27|9[35])|883","3469|4(?:279|9(?:30|56))|8834"],"(0$1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|8[2-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{4})(\\d{1,2})(\\d{3})(\\d{4})","$1 $2 $3 $4",["1"]]],"0"],PK:["92","00","122\\d{6}|[24-8]\\d{10,11}|9(?:[013-9]\\d{8,10}|2(?:[01]\\d\\d|2(?:[06-8]\\d|1[01]))\\d{7})|(?:[2-8]\\d{3}|92(?:[0-7]\\d|8[1-9]))\\d{6}|[24-9]\\d{8}|[89]\\d{7}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,7})","$1 $2 $3",["[89]0"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["1"]],["(\\d{3})(\\d{6,7})","$1 $2",["2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:2[2-8]|3[27-9]|4[2-6]|6[3569]|9[25-8])","9(?:2[3-8]|98)|(?:2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:22|3[27-9]|4[2-6]|6[3569]|9[25-7]))[2-9]"],"(0$1)"],["(\\d{2})(\\d{7,8})","$1 $2",["(?:2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)[2-9]"],"(0$1)"],["(\\d{5})(\\d{5})","$1 $2",["58"],"(0$1)"],["(\\d{3})(\\d{7})","$1 $2",["3"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[24-9]"],"(0$1)"]],"0"],PL:["48","00","(?:6|8\\d\\d)\\d{7}|[1-9]\\d{6}(?:\\d{2})?|[26]\\d{5}",[6,7,8,9,10],[["(\\d{5})","$1",["19"]],["(\\d{3})(\\d{3})","$1 $2",["11|20|64"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])1","(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])19"]],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["64"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["21|39|45|5[0137]|6[0469]|7[02389]|8(?:0[14]|8)"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[2-8]|[2-7]|8[1-79]|9[145]"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["8"]]]],PM:["508","00","[45]\\d{5}|(?:708|8\\d\\d)\\d{6}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[45]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],PR:["1","011","(?:[589]\\d\\d|787)\\d{7}",[10],0,"1",0,0,0,0,"787|939"],PS:["970","00","[2489]2\\d{6}|(?:1\\d|5)\\d{8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2489]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["5"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],PT:["351","00","1693\\d{5}|(?:[26-9]\\d|30)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["2[12]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["16|[236-9]"]]]],PW:["680","01[12]","(?:[24-8]\\d\\d|345|900)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],PY:["595","00","59\\d{4,6}|9\\d{5,10}|(?:[2-46-8]\\d|5[0-8])\\d{4,7}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3,6})","$1 $2",["[2-9]0"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["[26]1|3[289]|4[1246-8]|7[1-3]|8[1-36]"],"(0$1)"],["(\\d{3})(\\d{4,5})","$1 $2",["2[279]|3[13-5]|4[359]|5|6(?:[34]|7[1-46-8])|7[46-8]|85"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2[14-68]|3[26-9]|4[1246-8]|6(?:1|75)|7[1-35]|8[1-36]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["87"]],["(\\d{3})(\\d{6})","$1 $2",["9(?:[5-79]|8[1-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["9"]]],"0"],QA:["974","00","800\\d{4}|(?:2|800)\\d{6}|(?:0080|[3-7])\\d{7}",[7,8,9,11],[["(\\d{3})(\\d{4})","$1 $2",["2[136]|8"]],["(\\d{4})(\\d{4})","$1 $2",["[3-7]"]]]],RE:["262","00","709\\d{6}|(?:26|[689]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[26-9]"],"0$1"]],"0",0,0,0,0,0,[["26(?:2\\d\\d|3(?:0\\d|1[0-6]))\\d{4}"],["(?:69(?:2\\d\\d|3(?:[06][0-6]|1[0-3]|2[0-2]|3[0-39]|4\\d|5[0-5]|7[0-37]|8[0-8]|9[0-479]))|7092[0-3])\\d{4}"],["80\\d{7}"],["89[1-37-9]\\d{6}"],0,0,0,0,["9(?:399[0-3]|479[0-6]|76(?:2[278]|3[0-37]))\\d{4}"],["8(?:1[019]|2[0156]|84|90)\\d{6}"]]],RO:["40","00","(?:[236-8]\\d|90)\\d{7}|[23]\\d{5}",[6,9],[["(\\d{3})(\\d{3})","$1 $2",["2[3-6]","2[3-6]\\d9"],"0$1"],["(\\d{2})(\\d{4})","$1 $2",["219|31"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[23]1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[236-9]"],"0$1"]],"0",0,0,0,0,0,0,0," int "],RS:["381","00","38[02-9]\\d{6,9}|6\\d{7,9}|90\\d{4,8}|38\\d{5,6}|(?:7\\d\\d|800)\\d{3,9}|(?:[12]\\d|3[0-79])\\d{5,10}",[6,7,8,9,10,11,12],[["(\\d{3})(\\d{3,9})","$1 $2",["(?:2[389]|39)0|[7-9]"],"0$1"],["(\\d{2})(\\d{5,10})","$1 $2",["[1-36]"],"0$1"]],"0"],RU:["7","810","8\\d{13}|[347-9]\\d{9}",[10,14],[["(\\d{4})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-8]|2[1-9])","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:1[23]|[2-9]2))","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:13[03-69]|62[013-9]))|72[1-57-9]2"],"8 ($1)",1],["(\\d{5})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-68]|2[1-9])","7(?:1(?:[06][3-6]|[18]|2[35]|[3-5][3-5])|2(?:[13][3-5]|[24-689]|7[457]))","7(?:1(?:0(?:[356]|4[023])|[18]|2(?:3[013-9]|5)|3[45]|43[013-79]|5(?:3[1-8]|4[1-7]|5)|6(?:3[0-35-9]|[4-6]))|2(?:1(?:3[178]|[45])|[24-689]|3[35]|7[457]))|7(?:14|23)4[0-8]|71(?:33|45)[1-79]"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[349]|8(?:[02-7]|1[1-8])"],"8 ($1)",1],["(\\d{4})(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3 $4",["8"],"8 ($1)"]],"8",0,0,0,0,0,[["336(?:[013-9]\\d|2[013-9])\\d{5}|(?:3(?:0[12]|4[1-35-79]|5[1-3]|65|8[1-58]|9[0145])|4(?:01|1[1356]|2[13467]|7[1-5]|8[1-7]|9[1-689])|8(?:1[1-8]|2[01]|3[13-6]|4[0-8]|5[15-7]|6[0-35-79]|7[1-37-9]))\\d{7}",[10]],["9\\d{9}",[10]],["8(?:0[04]|108\\d{3})\\d{7}"],["80[39]\\d{7}",[10]],["808\\d{7}",[10]]],"8~10"],RW:["250","00","(?:06|[27]\\d\\d|[89]00)\\d{6}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[7-9]"],"0$1"]],"0"],SA:["966","00","(?:[15]\\d|800|92)\\d{7}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["9"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]],"0"],SB:["677","0[01]","[6-9]\\d{6}|[1-6]\\d{4}",[5,7],[["(\\d{2})(\\d{5})","$1 $2",["6[89]|7|8[4-9]|9(?:[1-8]|9[0-8])"]]]],SC:["248","010|0[0-2]","(?:[2489]\\d|64)\\d{5}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[246]|9[57]"]]],0,0,0,0,0,0,0,"00"],SD:["249","00","[19]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[19]"],"0$1"]],"0"],SE:["46","00","(?:[26]\\d\\d|9)\\d{9}|[1-9]\\d{8}|[1-689]\\d{7}|[1-4689]\\d{6}|2\\d{5}",[6,7,8,9,10,12],[["(\\d{2})(\\d{2,3})(\\d{2})","$1-$2 $3",["20"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{4})","$1-$2",["9(?:00|39|44|9)"],"0$1",0,"$1 $2"],["(\\d{2})(\\d{3})(\\d{2})","$1-$2 $3",["[12][136]|3[356]|4[0246]|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3"],["(\\d)(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2,3})(\\d{2})","$1-$2 $3",["1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[125689]|4[02-57]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{2,3})(\\d{3})","$1-$2 $3",["9(?:00|39|44)"],"0$1",0,"$1 $2 $3"],["(\\d{2})(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["1[13689]|2[0136]|3[1356]|4[0246]|54|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3 $4"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["10|7"],"0$1",0,"$1 $2 $3 $4"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1-$2 $3 $4",["[13-5]|2(?:[247-9]|5[0138])|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{3})","$1-$2 $3 $4",["9"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4 $5",["[26]"],"0$1",0,"$1 $2 $3 $4 $5"]],"0"],SG:["65","0[0-3]\\d","(?:(?:1\\d|8)\\d\\d|7000)\\d{7}|[3689]\\d{7}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["[369]|8(?:0[1-9]|[1-9])"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]],["(\\d{4})(\\d{4})(\\d{3})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],SH:["290","00","(?:[256]\\d|8)\\d{3}",[4,5],0,0,0,0,0,0,"[256]"],SI:["386","00|10(?:22|66|88|99)","[1-7]\\d{7}|8\\d{4,7}|90\\d{4,6}",[5,6,7,8],[["(\\d{2})(\\d{3,6})","$1 $2",["8[09]|9"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["59|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37][01]|4[0139]|51|6"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-57]"],"(0$1)"]],"0",0,0,0,0,0,0,"00"],SJ:["47","00","0\\d{4}|(?:[489]\\d|79)\\d{6}",[5,8],0,0,0,0,0,0,"79"],SK:["421","00","[2-689]\\d{8}|[2-59]\\d{6}|[2-5]\\d{5}",[6,7,9],[["(\\d)(\\d{2})(\\d{3,4})","$1 $2 $3",["21"],"0$1"],["(\\d{2})(\\d{2})(\\d{2,3})","$1 $2 $3",["[3-5][1-8]1","[3-5][1-8]1[67]"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1/$2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[689]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1/$2 $3 $4",["[3-5]"],"0$1"]],"0"],SL:["232","00","(?:[237-9]\\d|66)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[236-9]"],"(0$1)"]],"0"],SM:["378","00","(?:0549|[5-7]\\d)\\d{6}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]"]],["(\\d{4})(\\d{6})","$1 $2",["0"]]],0,0,"([89]\\d{5})$","0549$1"],SN:["221","00","(?:[378]\\d|93)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[379]"]]]],SO:["252","00","[346-9]\\d{8}|[12679]\\d{7}|[1-5]\\d{6}|[1348]\\d{5}",[6,7,8,9],[["(\\d{2})(\\d{4})","$1 $2",["8[125]"]],["(\\d{6})","$1",["[134]"]],["(\\d)(\\d{6})","$1 $2",["[15]|2[0-79]|3[0-46-8]|4[0-7]"]],["(\\d)(\\d{7})","$1 $2",["(?:2|90)4|[67]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[348]|64|79|90"]],["(\\d{2})(\\d{5,7})","$1 $2",["1|28|6[0-35-9]|7[67]|9[2-9]"]]],"0"],SR:["597","00","(?:[2-5]|[6-8]\\d|90)\\d{5}",[6,7],[["(\\d{2})(\\d{2})(\\d{2})","$1-$2-$3",["56"]],["(\\d{3})(\\d{3})","$1-$2",["[2-5]"]],["(\\d{3})(\\d{4})","$1-$2",["[6-9]"]]]],SS:["211","00","[19]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[19]"],"0$1"]],"0"],ST:["239","00","(?:22|9\\d)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[29]"]]]],SV:["503","00","
1[267]\\d{7}|(?:80\\d|900)\\d{4}(?:\\d{4})?",[7,8,11],[["(\\d{3})(\\d{4})","$1 $2",["[89]"]],["(\\d{4})(\\d{4})","$1 $2",["[267]"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[89]"]]]],SX:["1","011","7215\\d{6}|(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"(5\\d{6})$|1","721$1",0,"721"],SY:["963","00","[1-359]\\d{8}|[1-5]\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-4]|5[1-3]"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[59]"],"0$1",1]],"0"],SZ:["268","00","0800\\d{4}|(?:[237]\\d|900)\\d{6}",[8,9],[["(\\d{4})(\\d{4})","$1 $2",["[0237]"]],["(\\d{5})(\\d{4})","$1 $2",["9"]]]],TA:["290","00","8\\d{3}",[4],0,0,0,0,0,0,"8"],TC:["1","011","(?:[58]\\d\\d|649|900)\\d{7}",[10],0,"1",0,"([2-479]\\d{6})$|1","649$1",0,"649"],TD:["235","00|16","(?:22|30|[689]\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[236-9]"]]],0,0,0,0,0,0,0,"00"],TG:["228","00","[279]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[279]"]]]],TH:["66","00[1-9]","(?:001800|[2-57]|[689]\\d)\\d{7}|1\\d{7,9}",[8,9,10,13],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[13-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],TJ:["992","810","[0-57-9]\\d{8}",[9],[["(\\d{6})(\\d)(\\d{2})","$1 $2 $3",["331","3317"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["44[02-479]|[34]7"]],["(\\d{4})(\\d)(\\d{4})","$1 $2 $3",["3(?:[1245]|3[12])"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[0-57-9]"]]],0,0,0,0,0,0,0,"8~10"],TK:["690","00","[2-47]\\d{3,6}",[4,5,6,7]],TL:["670","00","7\\d{7}|(?:[2-47]\\d|[89]0)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[2-489]|70"]],["(\\d{4})(\\d{4})","$1 $2",["7"]]]],TM:["993","810","(?:[1-6]\\d|71)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["12"],"(8 $1)"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-5]"],"(8 $1)"],["(\\d{2})(\\d{6})","$1 $2",["[67]"],"8 $1"]],"8",0,0,0,0,0,0,"8~10"],TN:["216","00","[2-57-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-57-9]"]]]],TO:["676","00","(?:0800|(?:[5-8]\\d\\d|999)\\d)\\d{3}|[2-8]\\d{4}",[5,7],[["(\\d{2})(\\d{3})","$1-$2",["[2-4]|50|6[09]|7[0-24-69]|8[05]"]],["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[5-9]"]]]],TR:["90","00","4\\d{6}|8\\d{11,12}|(?:[2-58]\\d\\d|900)\\d{7}",[7,10,12,13],[["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["512|8[01589]|90"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5(?:[0-59]|61)","5(?:[0-59]|61[06])","5(?:[0-59]|61[06]1)"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24][1-8]|3[1-9]"],"(0$1)",1],["(\\d{3})(\\d{3})(\\d{6,7})","$1 $2 $3",["80"],"0$1",1]],"0"],TT:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-46-8]\\d{6})$|1","868$1",0,"868"],TV:["688","00","(?:2|7\\d\\d|90)\\d{4}",[5,6,7],[["(\\d{2})(\\d{3})","$1 $2",["2"]],["(\\d{2})(\\d{4})","$1 $2",["90"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],TW:["886","0(?:0[25-79]|19)","[2-689]\\d{8}|7\\d{9,10}|[2-8]\\d{7}|2\\d{6}",[7,8,9,10,11],[["(\\d{2})(\\d)(\\d{4})","$1 $2 $3",["202"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[258]0"],"0$1"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["[23568]|4(?:0[02-48]|[1-47-9])|7[1-9]","[23568]|4(?:0[2-48]|[1-47-9])|(?:400|7)[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,5})","$1 $2 $3",["7"],"0$1"]],"0",0,0,0,0,0,0,0,"#"],TZ:["255","00[056]","(?:[25-8]\\d|41|90)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[24]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["5"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[67]"],"0$1"]],"0"],UA:["380","00","[89]\\d{9}|[3-9]\\d{8}",[9,10],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6[12][29]|(?:3[1-8]|4[136-8]|5[12457]|6[49])2|(?:56|65)[24]","6[12][29]|(?:35|4[1378]|5[12457]|6[49])2|(?:56|65)[24]|(?:3[1-46-8]|46)2[013-9]"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6[0135689]|7[4-6])|6(?:[12][3-7]|[459])","3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6(?:[015689]|3[02389])|7[4-6])|6(?:[12][3-7]|[459])"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|89|9[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0",0,0,0,0,0,0,"0~0"],UG:["256","00[057]","800\\d{6}|(?:[29]0|[347]\\d)\\d{7}",[9],[["(\\d{4})(\\d{5})","$1 $2",["202","2024"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[27-9]|4(?:6[45]|[7-9])"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[34]"],"0$1"]],"0"],US:["1","011","[2-9]\\d{9}|3\\d{6}",[10],[["(\\d{3})(\\d{4})","$1-$2",["310"],0,1],["(\\d{3})(\\d{3})(\\d{4})","($1) $2-$3",["[2-9]"],0,1,"$1-$2-$3"]],"1",0,0,0,0,0,[["3052(?:0[0-8]|[1-9]\\d)\\d{4}|(?:2742|305[3-9])\\d{6}|(?:472|983)[2-47-9]\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-57-9]|3[1459]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-47-9]|1[02-9]|2[013-79]|3[0-24679]|4[167]|5[0-2]|6[01349]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-57-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|3[016]|4[0156]|5[01679]|6[0-279]|78|8[0-269])|7(?:0[1-46-8]|1[2-9]|2[04-8]|3[0-247]|4[0378]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[0168]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-3589]|8[04-69]))[2-9]\\d{6}"],[""],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}"],0,0,0,["305209\\d{4}"]]],UY:["598","0(?:0|1[3-9]\\d)","0004\\d{2,9}|[1249]\\d{7}|2\\d{3,4}|(?:[49]\\d|80)\\d{5}",[4,5,6,7,8,9,10,11,12,13],[["(\\d{4,5})","$1",["21"]],["(\\d{3})(\\d{3,4})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[49]0|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[124]"]],["(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3 $4",["0"]]],"0",0,0,0,0,0,0,"00"," int. "],UZ:["998","00","(?:20|33|[5-9]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[235-9]"]]]],VA:["39","00","0\\d{5,10}|3[0-8]\\d{7,10}|55\\d{8}|8\\d{5}(?:\\d{2,4})?|(?:1\\d|39)\\d{7,8}",[6,7,8,9,10,11,12],0,0,0,0,0,0,"06698"],VC:["1","011","(?:[58]\\d\\d|784|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","784$1",0,"784"],VE:["58","00","[68]00\\d{7}|(?:[24]\\d|[59]0)\\d{8}",[10],[["(\\d{3})(\\d{7})","$1-$2",["[24-689]"],"0$1"]],"0"],VG:["1","011","(?:284|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-578]\\d{6})$|1","284$1",0,"284"],VI:["1","011","[58]\\d{9}|(?:34|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","340$1",0,"340"],VN:["84","00","[12]\\d{9}|[135-9]\\d{8}|[16]\\d{7}|[16-8]\\d{6}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["80"],"0$1",1],["(\\d{4})(\\d{4,6})","$1 $2",["1"],0,1],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["6"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[357-9]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["2[48]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["2"],"0$1",1]],"0"],VU:["678","00","[57-9]\\d{6}|(?:[238]\\d|48)\\d{3}",[5,7],[["(\\d{3})(\\d{4})","$1 $2",["[57-9]"]]]],WF:["681","00","(?:40|72|8\\d{4})\\d{4}|[89]\\d{5}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[47-9]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],WS:["685","0","(?:[2-6]|8\\d{5})\\d{4}|[78]\\d{6}|[68]\\d{5}",[5,6,7,10],[["(\\d{5})","$1",["[2-5]|6[1-9]"]],["(\\d{3})(\\d{3,7})","$1 $2",["[68]"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],XK:["383","00","2\\d{7,8}|3\\d{7,11}|(?:4\\d\\d|[89]00)\\d{5}",[8,9,10,11,12],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2|39"],"0$1"],["(\\d{2})(\\d{7,10})","$1 $2",["3"],"0$1"]],"0"],YE:["967","00","(?:1|7\\d)\\d{7}|[1-7]\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-6]|7(?:[24-6]|8[0-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"],"0$1"]],"0"],YT:["262","00","7093\\d{5}|(?:80|9\\d)\\d{7}|(?:26|63)9\\d{6}",[9],0,"0",0,0,0,0,0,[["269(?:0[0-467]|15|5[0-4]|6\\d|[78]0)\\d{4}"],["(?:639(?:0[0-79]|1[019]|[267]\\d|3[09]|40|5[05-9]|9[04-79])|7093[5-7])\\d{4}"],["80\\d{7}"],0,0,0,0,0,["9(?:(?:39|47)8[01]|769\\d)\\d{4}"]]],ZA:["27","00","[1-79]\\d{8}|8\\d{4,9}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,4})","$1 $2",["8[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["8[1-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["860"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],ZM:["260","00","800\\d{6}|(?:21|[579]\\d|63)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[28]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[579]"],"0$1"]],"0"],ZW:["263","00","2(?:[0-57-9]\\d{6,8}|6[0-24-9]\\d{6,7})|[38]\\d{9}|[35-8]\\d{8}|[3-6]\\d{7}|[1-689]\\d{6}|[1-3569]\\d{5}|[1356]\\d{4}",[5,6,7,8,9,10],[["(\\d{3})(\\d{3,5})","$1 $2",["2(?:0[45]|2[278]|[49]8)|3(?:[09]8|17)|6(?:[29]8|37|75)|[23][78]|(?:33|5[15]|6[68])[78]"],"0$1"],["(\\d)(\\d{3})(\\d{2,4})","$1 $2 $3",["[49]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["80"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["24|8[13-59]|(?:2[05-79]|39|5[45]|6[15-8])2","2(?:02[014]|4|[56]20|[79]2)|392|5(?:42|525)|6(?:[16-8]21|52[013])|8[13-59]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:1[39]|2[0157]|[378]|[56][14])|3(?:12|29)","2(?:1[39]|2[0157]|[378]|[56][14])|3(?:123|29)"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["1|2(?:0[0-36-9]|12|29|[56])|3(?:1[0-689]|[24-6])|5(?:[0236-9]|1[2-4])|6(?:[013-59]|7[0-46-9])|(?:33|55|6[68])[0-69]|(?:29|3[09]|62)[0-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["29[013-9]|39|54"],"0$1"],["(\\d{4})(\\d{3,5})","$1 $2",["(?:25|54)8","258|5483"],"0$1"]],"0"]},nonGeographic:{800:["800",0,"(?:00|[1-9]\\d)\\d{6}",[8],[["(\\d{4})(\\d{4})","$1 $2",["\\d"]]],0,0,0,0,0,0,[0,0,["(?:00|[1-9]\\d)\\d{6}"]]],808:["808",0,"[1-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[1-9]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,0,["[1-9]\\d{7}"]]],870:["870",0,"7\\d{11}|[235-7]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-7]"]]],0,0,0,0,0,0,[0,["(?:[356]|774[45])\\d{8}|7[6-8]\\d{7}"],0,0,0,0,0,0,["2\\d{8}",[9]]]],878:["878",0,"10\\d{10}",[12],[["(\\d{2})(\\d{5})(\\d{5})","$1 $2 $3",["1"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["10\\d{10}"]]],881:["881",0,"6\\d{9}|[0-36-9]\\d{8}",[9,10],[["(\\d)(\\d{3})(\\d{5})","$1 $2 $3",["[0-37-9]"]],["(\\d)(\\d{3})(\\d{5,6})","$1 $2 $3",["6"]]],0,0,0,0,0,0,[0,["6\\d{9}|[0-36-9]\\d{8}"]]],882:["882",0,"[13]\\d{6}(?:\\d{2,5})?|[19]\\d{7}|(?:[25]\\d\\d|4)\\d{7}(?:\\d{2})?",[7,8,9,10,11,12],[["(\\d{2})(\\d{5})","$1 $2",["16|342"]],["(\\d{2})(\\d{6})","$1 $2",["49"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["1[36]|9"]],["(\\d{2})(\\d{4})(\\d{3})","$1 $2 $3",["3[23]"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["16"]],["(\\d{2})(\\d{4})(\\d{4}
1)","$1 $2 $3",["10|23|3(?:[15]|4[57])|4|51"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["34"]],["(\\d{2})(\\d{4,5})(\\d{5})","$1 $2 $3",["[1-35]"]]],0,0,0,0,0,0,[0,["342\\d{4}|(?:337|49)\\d{6}|(?:3(?:2|47|7\\d{3})|50\\d{3})\\d{7}",[7,8,9,10,12]],0,0,0,["348[57]\\d{7}",[11]],0,0,["1(?:3(?:0[0347]|[13][0139]|2[035]|4[013568]|6[0459]|7[06]|8[15-8]|9[0689])\\d{4}|6\\d{5,10})|(?:345\\d|9[89])\\d{6}|(?:10|2(?:3|85\\d)|3(?:[15]|[69]\\d\\d)|4[15-8]|51)\\d{8}"]]],883:["883",0,"(?:[1-4]\\d|51)\\d{6,10}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,8})","$1 $2 $3",["[14]|2[24-689]|3[02-689]|51[24-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["510"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["21"]],["(\\d{4})(\\d{4})(\\d{4})","$1 $2 $3",["51[13]"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[235]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["(?:2(?:00\\d\\d|10)|(?:370[1-9]|51\\d0)\\d)\\d{7}|51(?:00\\d{5}|[24-9]0\\d{4,7})|(?:1[0-79]|2[24-689]|3[02-689]|4[0-4])0\\d{5,9}"]]],888:["888",0,"\\d{11}",[11],[["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3"]],0,0,0,0,0,0,[0,0,0,0,0,0,["\\d{11}"]]],979:["979",0,"[1359]\\d{8}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[1359]"]]],0,0,0,0,0,0,[0,0,0,["[1359]\\d{8}"]]]}};function g(e,t){var n=Array.prototype.slice.call(t);return n.push(f),e.apply(this,n)}function m(e,t){e=e.split("-"),t=t.split("-");for(var n=e[0].split("."),r=t[0].split("."),i=0;i<3;i++){var a=Number(n[i]),o=Number(r[i]);if(a>o)return 1;if(o>a)return -1;if(!isNaN(a)&&isNaN(o))return 1;if(isNaN(a)&&!isNaN(o))return -1}return e[1]&&t[1]?e[1]>t[1]?1:e[1]<t[1]?-1:0:!e[1]&&t[1]?1:e[1]&&!t[1]?-1:0}var y={}.constructor;function b(e){return null!=e&&e.constructor===y}function w(e){return(w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function x(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function C(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,function(e){var t=function(e,t){if("object"!=w(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=w(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==w(t)?t:t+""}(r.key),r)}}function E(e,t,n){return t&&C(e.prototype,t),n&&C(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var k=" ext. ",S=/^\d+$/,I=E(function e(t){x(this,e),$(t),this.metadata=t,M.call(this,t)},[{key:"getCountries",value:function(){return Object.keys(this.metadata.countries).filter(function(e){return"001"!==e})}},{key:"getCountryMetadata",value:function(e){return this.metadata.countries[e]}},{key:"nonGeographic",value:function(){if(!this.v1&&!this.v2&&!this.v3)return this.metadata.nonGeographic||this.metadata.nonGeographical}},{key:"hasCountry",value:function(e){return void 0!==this.getCountryMetadata(e)}},{key:"hasCallingCode",value:function(e){if(this.getCountryCodesForCallingCode(e))return!0;if(this.nonGeographic()){if(this.nonGeographic()[e])return!0}else{var t=this.countryCallingCodes()[e];if(t&&1===t.length&&"001"===t[0])return!0}}},{key:"isNonGeographicCallingCode",value:function(e){return this.nonGeographic()?!!this.nonGeographic()[e]:!this.getCountryCodesForCallingCode(e)}},{key:"country",value:function(e){return this.selectNumberingPlan(e)}},{key:"selectNumberingPlan",value:function(e,t){if(e&&S.test(e)&&(t=e,e=null),e&&"001"!==e){if(!this.hasCountry(e))throw Error("Unknown country: ".concat(e));this.numberingPlan=new A(this.getCountryMetadata(e),this)}else if(t){if(!this.hasCallingCode(t))throw Error("Unknown calling code: ".concat(t));this.numberingPlan=new A(this.getNumberingPlanMetadata(t),this)}else this.numberingPlan=void 0;return this}},{key:"getCountryCodesForCallingCode",value:function(e){var t=this.countryCallingCodes()[e];if(t){if(1===t.length&&3===t[0].length)return;return t}}},{key:"getCountryCodeForCallingCode",value:function(e){var t=this.getCountryCodesForCallingCode(e);if(t)return t[0]}},{key:"getNumberingPlanMetadata",value:function(e){var t=this.getCountryCodeForCallingCode(e);if(t)return this.getCountryMetadata(t);if(this.nonGeographic()){var n=this.nonGeographic()[e];if(n)return n}else{var r=this.countryCallingCodes()[e];if(r&&1===r.length&&"001"===r[0])return this.metadata.countries["001"]}}},{key:"countryCallingCode",value:function(){return this.numberingPlan.callingCode()}},{key:"IDDPrefix",value:function(){return this.numberingPlan.IDDPrefix()}},{key:"defaultIDDPrefix",value:function(){return this.numberingPlan.defaultIDDPrefix()}},{key:"nationalNumberPattern",value:function(){return this.numberingPlan.nationalNumberPattern()}},{key:"possibleLengths",value:function(){return this.numberingPlan.possibleLengths()}},{key:"formats",value:function(){return this.numberingPlan.formats()}},{key:"nationalPrefixForParsing",value:function(){return this.numberingPlan.nationalPrefixForParsing()}},{key:"nationalPrefixTransformRule",value:function(){return this.numberingPlan.nationalPrefixTransformRule()}},{key:"leadingDigits",value:function(){return this.numberingPlan.leadingDigits()}},{key:"hasTypes",value:function(){return this.numberingPlan.hasTypes()}},{key:"type",value:function(e){return this.numberingPlan.type(e)}},{key:"ext",value:function(){return this.numberingPlan.ext()}},{key:"countryCallingCodes",value:function(){return this.v1?this.metadata.country_phone_code_to_countries:this.metadata.country_calling_codes}},{key:"chooseCountryByCountryCallingCode",value:function(e){return this.selectNumberingPlan(e)}},{key:"hasSelectedNumberingPlan",value:function(){return void 0!==this.numberingPlan}}]),A=E(function e(t,n){x(this,e),this.globalMetadataObject=n,this.metadata=t,M.call(this,n.metadata)},[{key:"callingCode",value:function(){return this.metadata[0]}},{key:"getDefaultCountryMetadataForRegion",value:function(){return this.globalMetadataObject.getNumberingPlanMetadata(this.callingCode())}},{key:"IDDPrefix",value:function(){if(!this.v1&&!this.v2)return this.metadata[1]}},{key:"defaultIDDPrefix",value:function(){if(!this.v1&&!this.v2)return this.metadata[12]}},{key:"nationalNumberPattern",value:function(){return this.v1||this.v2?this.metadata[1]:this.metadata[2]}},{key:"possibleLengths",value:function(){if(!this.v1)return this.metadata[this.v2?2:3]}},{key:"_getFormats",value:function(e){return e[this.v1?2:this.v2?3:4]}},{key:"formats",value:function(){var e=this;return(this._getFormats(this.metadata)||this._getFormats(this.getDefaultCountryMetadataForRegion())||[]).map(function(t){return new T(t,e)})}},{key:"nationalPrefix",value:function(){return this.metadata[this.v1?3:this.v2?4:5]}},{key:"_getNationalPrefixFormattingRule",value:function(e){return e[this.v1?4:this.v2?5:6]}},{key:"nationalPrefixFormattingRule",value:function(){return this._getNationalPrefixFormattingRule(this.metadata)||this._getNationalPrefixFormattingRule(this.getDefaultCountryMetadataForRegion())}},{key:"_nationalPrefixForParsing",value:function(){return this.metadata[this.v1?5:this.v2?6:7]}},{key:"nationalPrefixForParsing",value:function(){return this._nationalPrefixForParsing()||this.nationalPrefix()}},{key:"nationalPrefixTransformRule",value:function(){return this.metadata[this.v1?6:this.v2?7:8]}},{key:"_getNationalPrefixIsOptionalWhenFormatting",value:function(){return!!this.metadata[this.v1?7:this.v2?8:9]}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return this._getNationalPrefixIsOptionalWhenFormatting(this.metadata)||this._getNationalPrefixIsOptionalWhenFormatting(this.getDefaultCountryMetadataForRegion())}},{key:"leadingDigits",value:function(){return this.metadata[this.v1?8:this.v2?9:10]}},{key:"types",value:function(){return this.metadata[this.v1?9:this.v2?10:11]}},{key:"hasTypes",value:function(){return(!this.types()||0!==this.types().length)&&!!this.types()}},{key:"type",value:function(e){if(this.hasTypes()&&P(this.types(),e))return new j(P(this.t
1ypes(),e),this)}},{key:"ext",value:function(){return this.v1||this.v2?k:this.metadata[13]||k}}]),T=E(function e(t,n){x(this,e),this._format=t,this.metadata=n},[{key:"pattern",value:function(){return this._format[0]}},{key:"format",value:function(){return this._format[1]}},{key:"leadingDigitsPatterns",value:function(){return this._format[2]||[]}},{key:"nationalPrefixFormattingRule",value:function(){return this._format[3]||this.metadata.nationalPrefixFormattingRule()}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return!!this._format[4]||this.metadata.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"nationalPrefixIsMandatoryWhenFormattingInNationalFormat",value:function(){return this.usesNationalPrefix()&&!this.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"usesNationalPrefix",value:function(){return!(!this.nationalPrefixFormattingRule()||_.test(this.nationalPrefixFormattingRule()))}},{key:"internationalFormat",value:function(){return this._format[5]||this.format()}}]),_=/^\(?\$1\)?$/,j=E(function e(t,n){x(this,e),this.type=t,this.metadata=n},[{key:"pattern",value:function(){return this.metadata.v1?this.type:this.t
1ype[0]}},{key:"possibleLengths",value:function(){if(!this.metadata.v1)return this.type[1]||this.metadata.possibleLengths()}}]);function P(e,t){switch(t){case"FIXED_LINE":return e[0];case"MOBILE":return e[1];case"TOLL_FREE":return e[2];case"PREMIUM_RATE":return e[3];case"PERSONAL_NUMBER":return e[4];case"VOICEMAIL":return e[5];case"UAN":return e[6];case"PAGER":return e[7];case"VOIP":return e[8];case"SHARED_COST":return e[9]}}function $(e){if(!e)throw Error("[libphonenumber-js] `metadata` argument not passed. Check your arguments.");if(!b(e)||!b(e.countries))throw Error("[libphonenumber-js] `metadata` argument was passed but it's not a valid metadata. Must be an object having `.countries` child object property. Got ".concat(b(e)?"an object of shape: { "+Object.keys(e).join(", ")+" }":"a "+N(e)+": "+e,"."))}var N=function(e){return w(e)};function O(e,t){if((t=new I(t)).hasCountry(e))return t.selectNumberingPlan(e).countryCallingCode();throw Error("Unknown country: ".concat(e))}function M(e){var t=e.version;"number"==typeof t?(this.v1=1===t,this.v2=2===t,this.v3=3===t,this.v4=4===t):t?-1===m(t,"1.2.0")?this.v2=!0:-1===m(t,"1.7.35")?this.v3=!0:this.v4=!0:this.v1=!0}function R(e){return new I(e).getCountries()}function L(){return g(O,arguments)}function D(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function F(e,t,n){return function e(t,n,r,i){n&&(i=new I(i.metadata)).selectNumberingPlan(n);
1var a=i.type(r),o=a&&a.possibleLengths()||i.possibleLengths();if(!o)return"IS_POSSIBLE";if("FIXED_LINE_OR_MOBILE"===r){if(!i.type("FIXED_LINE"))return e(t,n,"MOBILE",i);var s=i.type("MOBILE");s&&(o=function(e,t){for(var n,r=e.slice(),i=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return D(e,void 0);var n=({}).toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?D(e,t):void 0}}(e))){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(t);!(n=i()).done;){var a=n.value;0>e.indexOf(a)&&r.push(a)}return r.sort(function(e,t){return e-t})}(o,s.possibleLengths()))}else if(r&&!a)return"INVALID_LENGTH";var l=t.length,c=o[0];return c===l?"IS_POSSIBLE":c>l?"TOO_SHORT":o[o.length-1]<l?"TOO_LONG":o.indexOf(l,1)>=0?"IS_POSSIBLE":"INVALID_LENGTH"}(e,t,void 0,n)}function U(e,t,n){return"IS_POSSIBLE"===F(e,t,n)}function B(e,t){return e=e||"",RegExp("^(?:"+t+")$").test(e)}function z(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}e.s(["getCountryCallingCode",()=>L],422749);var W=["MOBILE","PREMIUM_RATE","TOLL_FREE","SHARED_COST","VOIP","PERSONAL_NUMBER","PAGER","UAN","VOICEMAIL"];function q(e,t,n){if(t=t||{},e.country||e.countryCallingCode){(n=new I(n)).selectNumberingPlan(e.country,e.countryCallingCode);var r=t.v2?e.nationalNumber:e.phone;if(B(r,n.nationalNumberPattern())){if(H(r,"FIXED_LINE",n))return n.type("MOBILE")&&""===n.type("MOBILE").pattern()||!n.type("MOBILE")||H(r,"MOBILE",n)?"FIXED_LINE_OR_MOBILE":"FIXED_LINE";for(var i,a=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return z(e,void 0);var n=({}).toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?z(e,t):void 0}}(e))){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(W);!(i=a()).done;){var o=i.value;if(H(r,o,n))return o}}}}function H(e,t,n){return!(!(t=n.type(t))||!t.pattern()||t.possibleLengths()&&0>t.possibleLengths().indexOf(e.length))&&B(e,t.pattern())}var V="0-90-9٠-٩۰-۹",G="".concat("-‐-―−ー-").concat("//").concat("..").concat("  ­​⁠ ").concat("()()[]\\[\\]").concat("~⁓∼~"),K="++",Y=RegExp("(["+V+"])");function Z(e,t,n,r){if(t){var i=new I(r);i.selectNumberingPlan(t,n);var a=new RegExp(i.IDDPrefix());if(0===e.search(a)){var o=(e=e.slice(e.match(a)[0].length)).match(Y);if(!o||null==o[1]||!(o[1].length>0)||"0"!==o[1])return e}}}function J(e,t){if(e&&t.numberingPlan.nationalPrefixForParsing()){var n=RegExp("^(?:"+t.numberingPlan.nationalPrefixForParsing()+")"),r=n.exec(e);if(r){var i,a,o,s=r.length-1,l=s>0&&r[s];if(t.nationalPrefixTransformRule()&&l)i=e.replace(n,t.nationalPrefixTransformRule()),s>1&&(a=r[1]);else{var c=r[0];i=e.slice(c.length),l&&(a=r[1])}if(l){var d=e.indexOf(r[1]);e.slice(0,d)===t.numberingPlan.nationalPrefix()&&(o=t.numberingPlan.nationalPrefix())}else o=r[0];return{nationalNumber:i,nationalPrefix:o,carrierCode:a}}}return{nationalNumber:e}}function Q(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function X(e,t){var n=t.countries,r=t.metadata;r=new I(r);for(var i,a=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Q(e,void 0);var n=({}).toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Q(e,t):void 0}}(e))){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(n);!(i=a()).done;){var o=i.value;if(r.selectNumberingPlan(o),r.leadingDigits()){if(e&&0===e.search(r.leadingDigits()))return o}else if(q({phone:e,country:o},void 0,r.metadata))return o}}function ee(e,t){var n=t.nationalNumber,r=t.metadata,i=r.getCountryCodesForCallingCode(e);if(i)return 1===i.length?i[0]:X(n,{countries:i,metadata:r.metadata})}function et(e,t,n){var r,i,a,o=J(e,n),s=o.carrierCode,l=o.nationalNumber;if(l!==e){if(r=e,i=l,!(!B(r,(a=n).nationalNumberPattern())||B(i,a.nationalNumberPattern()))||n.numberingPlan.possibleLengths()&&(t||(t=ee(n.numberingPlan.callingCode(),{nationalNumber:l,metadata:n})),!function(e,t,n){switch(F(e,t,n)){case"TOO_SHORT":case"INVALID_LENGTH":return!1;default:return!0}}
1(l,t,n)))return{nationalNumber:e}}return{nationalNumber:l,carrierCode:s}}function en(e,t,n,r,i){var a=t||n?O(t||n,i):r;if(0===e.indexOf(a)){(i=new I(i)).selectNumberingPlan(t||n,a);var o=e.slice(a.length),s=et(o,t,i).nationalNumber,l=et(e,t,i).nationalNumber;if(!B(l,i.nationalNumberPattern())&&B(s,i.nationalNumberPattern())||"TOO_LONG"===F(l,t,i))return{countryCallingCode:a,number:o}}return{number:e}}function er(e,t,n,r,i){if(!e)return{};if("+"!==e[0]){var a,o=Z(e,t||n,r,i);if(o&&o!==e)a=!0,e="+"+o;else{if(t||n||r){var s=en(e,t,n,r,i),l=s.countryCallingCode,c=s.number;if(l)return{countryCallingCodeSource:"FROM_NUMBER_WITHOUT_PLUS_SIGN",countryCallingCode:l,number:c}}return{number:e}}}if("0"===e[1])return{};i=new I(i);for(var d=2;d-1<=3&&d<=e.length;){var u=e.slice(1,d);if(i.hasCallingCode(u))return i.selectNumberingPlan(u),{countryCallingCodeSource:a?"FROM_NUMBER_WITH_IDD":"FROM_NUMBER_WITH_PLUS_SIGN",countryCallingCode:u,number:e.slice(d)};d++}return{}}function ei(e){return e.replace(RegExp("[".concat(G,"]+"),"g")," ").trim()}var ea=/(\$\d)/;function eo(e,t,n){var r=n.useInternationalFormat,i=n.withNationalPrefix;n.carrierCode,n.metadata;var a=e.replace(new RegExp(t.pattern()),r?t.internationalFormat():i&&t.nationalPrefixFormattingRule()?t.format().replace(ea,t.nationalPrefixFormattingRule()):t.format());return r?ei(a):a}var es=/^[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?$/,el=function(e){return"([".concat(V,"]{1,").concat(e,"})")};function ec(e){var t="[  \\t,]*",n="[:\\..]?[  \\t,-]*",r="[  \\t]*";return";ext="+el("20")+"|"+(t+"(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)"+n+el("20"))+"#?|"+(t+"(?:[xx##~~]|int|int)"+n+el("9"))+"#?|"+("[- ]+"+el("6"))+"#|"+(r+"(?:,{2}|;)"+n+el("15"))+"#?|"+(r+"(?:,)+"+n+el("9"))+"#?"}var ed="["+K+"]{0,1}(?:["+G+"]*["+V+"]){3,}["+G+V+"]*",eu=RegExp("^["+K+"]{0,1}(?:["+G+"]*["+V+"]){1,2}$","i"),eh=RegExp("^["+V+"]{2}$|^"+(ed+"(?:"+ec())+")?$","i"),ep={formatExtension:function(e,t,n){return"".concat(e).concat(n.ext()).concat(t)}};function ef(e,t,n,r,i){var a=function(e,t){for(var n=e,r=function(e){if(e.leadingDigitsPatterns().length>0){var n=e.leadingDigitsPatterns()[e.leadingDigitsPatterns().length-1];if(0!==t.search(n))return!1}return B(t,e.pattern())},i=0;i<n.length;){if(r(n[i]))return n[i];i++}}(r.formats(),e);return a?eo(e,a,{useInternationalFormat:"INTERNATIONAL"===n,withNationalPrefix:!a.nationalPrefixIsOptionalWhenFormattingInNationalFormat()||!i||!1!==i.nationalPrefix,carrierCode:t,metadata:r}):e}function eg(e){return(eg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function em(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ey(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?em(Object(n),!0).forEach(function(t){var r,i,a;r=e,i=t,a=n[t],(i=ev(i))in r?Object.defineProperty(r,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[i]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):em(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ev(e){var t=function(e,t){if("object"!=eg(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=eg(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==eg(t)?t:t+""}var eb=function(){var e,t;return e=function e(t,n,r){if(!(this instanceof e))throw TypeError("Cannot call a class as a function");if(!t)throw TypeError("First argument is required");if("string"!=typeof t)throw TypeError("First argument must be a string");if("+"===t[0]&&!n)throw TypeError("`metadata` argument not passed");if(b(n)&&b(n.countries)){r=n;var i=t;if(!ew.test(i))throw Error('Invalid `number` argument passed: must consist of a "+" followed by digits');var a=er(i,void 0,void 0,void 0,r),o=a.countryCallingCode;if(n=a.number,t=o,!n)throw Error("Invalid `number` argument passed: too short")}if(!n)throw TypeError("`nationalNumber` argument is required");if("string"!=typeof n)throw TypeError("`nationalNumber` argument must be a string");$(r);var s=function(e,t){var n,r,i=new I(t);return/^[A-Z]{2}$/.test(e)?(n=e,i.selectNumberingPlan(n),r=i.countryCallingCode()):r=e,{country:n,countryCallingCode:r}}(t,r),l=s.country,c=s.countryCallingCode;this.country=l,this.countryCallingCode=c,this.nationalNumber=n,this.number="+"+this.countryCallingCode+this.nationalNumber,this.getMetadata=function(){return r}},t=[{key:"setExt",value:function(e){this.ext=e}},{key:"getPossibleCountries",value:function(){var e,t,n,r;
1return this.country?[this.country]:(e=this.countryCallingCode,t=this.nationalNumber,(r=new I(n=this.getMetadata()).getCountryCodesForCallingCode(e))?r.filter(function(e){var r,i,a;return r=t,i=e,(a=new I(n)).selectNumberingPlan(i),a.numberingPlan.possibleLengths().indexOf(r.length)>=0}):[])}},{key:"isPossible",value:function(){return function(e,t,n){if(void 0===t&&(t={}),n=new I(n),t.v2){if(!e.countryCallingCode)throw Error("Invalid phone number object passed");n.selectNumberingPlan(e.countryCallingCode)}else{if(!e.phone)return!1;if(e.country){if(!n.hasCountry(e.country))throw Error("Unknown country: ".concat(e.country));n.selectNumberingPlan(e.country)}else{if(!e.countryCallingCode)throw Error("Invalid phone number object passed");n.selectNumberingPlan(e.countryCallingCode)}}if(n.possibleLengths())return U(e.phone||e.nationalNumber,e.country,n);if(e.countryCallingCode&&n.isNonGeographicCallingCode(e.countryCallingCode))return!0;throw Error('Missing "possibleLengths" in metadata. Perhaps the metadata has been generated before v1.0.18.')}(this,{v2:!0},this.getMetadata())}},{key:"isValid",value:function(){var e,t;return(e=e={v2:!0},(t=new I(t=this.getMetadata())).selectNumberingPlan(this.country,this.countryCallingCode),t.hasTypes())?void 0!==q(this,e,t.metadata):B(e.v2?this.nationalNumber:this.phone,t.nationalNumberPattern())}},{key:"isNonGeographic",value:function(){return new I(this.getMetadata()).isNonGeographicCallingCode(this.countryCallingCode)}},{key:"isEqual",value:function(e){return this.number===e.number&&this.ext===e.ext}},{key:"getType",value:function(){return q(this,{v2:!0},this.getMetadata())}},{key:"format",value:function(e,t){return function(e,t,n,r){if(n=n?function(){for(var e=1,t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];for(;e<n.length;){if(n[e])for(var i in n[e])n[0][i]=n[e][i];e++}return n[0]}({},ep,n):ep,r=new I(r),e.country&&"001"!==e.country){if(!r.hasCountry(e.country))throw Error("Unknown country: ".concat(e.country));r.selectNumberingPlan(e.country)}else{if(!e.countryCallingCode)return e.phone||"";r.selectNumberingPlan(e.countryCallingCode)}var i,a,o,s,l,c,d,u,h,p,f,g,m,y=r.countryCallingCode(),b=n.v2?e.nationalNumber:e.phone;switch(t){case"NATIONAL":if(!b)return"";return i=m=ef(b,e.carrierCode,"NATIONAL",r,n),a=e.ext,o=r,s=n.formatExtension,a?s(i,a,o):i;case"INTERNATIONAL":if(!b)return"+".concat(y);return m=ef(b,null,"INTERNATIONAL",r,n),l=m="+".concat(y," ").concat(m),c=e.ext,d=r,u=n.formatExtension,c?u(l,c,d):l;case"E.164":return"+".concat(y).concat(b);case"RFC3966":var w={number:"+".concat(y).concat(b),ext:e.ext},x=w.number,C=w.ext;if(!x)return"";if("+"!==x[0])throw Error('"formatRFC3966()" expects "number" to be in E.164 format.');return"tel:".concat(x).concat(C?";ext="+C:"");case"IDD":if(!n.fromCountry)return;return h=function(e,t,n,r,i){if(O(r,i.metadata)===n){var a,o,s=ef(e,t,"NATIONAL",i);return"1"===n?n+" "+s:s}var l=(a=void 0,((o=new I(i.metadata)).selectNumberingPlan(r,a),o.defaultIDDPrefix())?o.defaultIDDPrefix():es.test(o.IDDPrefix())?o.IDDPrefix():void 0);if(l)return"".concat(l," ").concat(n," ").concat(ef(e,null,"INTERNATIONAL",i))}(b,e.carrierCode,y,n.fromCountry,r),p=e.ext,f=r,g=n.formatExtension,p?g(h,p,f):h;default:throw Error('Unknown "format" argument passed to "formatNumber()": "'.concat(t,'"'))}}(this,e,t?ey(ey({},t),{},{v2:!0}):{v2:!0},this.getMetadata())}},{key:"formatNational",value:function(e){return this.format("NATIONAL",e)}},{key:"formatInternational",value:function(e){return this.format("INTERNATIONAL",e)}},{key:"getURI",value:function(e){return this.format("RFC3966",e)}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ev(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(),ew=/^\+\d+$/;function ex(e){return(ex="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var eC=function(){var e,t;return e=function e(t){var n=t.onCountryChange,r=t.onCallingCodeChange;if(!(this instanceof e))throw TypeError("Cannot call a class as a function");this.onCountryChange=n,this.onCallingCodeChange=r},t=[{key:"reset",value:function(e){var t=e.country,n=e.callingCode;this.international=!1,this.missingPlus=!1,this.IDDPrefix=void 0,this.callingCode=void 0,this.digits="",this.resetNationalSignificantNumber(),this.initCountryAndCallingCode(t,n)}},{key:"resetNationalSignificantNumber",value:function(){this.nationalSignificantNumber=this.getNationalDigits(),this.nationalSignificantNumberIsModified=!1,this.nationalPrefix=void 0,this.carrierCode=void 0,this.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix=void 0}},{key:"update",value:function(e){for(var t=0,n=Object.keys(e);t<n.length;t++){var r=n[t];this[r]=e[r]}}},{key:"initCountryAndCallingCode",value:function(e,t){this.setCountry(e),this.setCallingCode(t)}},{key:"setCountry",value:function(e){this.country=e,this.onCountryChange(e)}},{key:"setCallingCode",value:function(e){this.callingCode=e,this.onCallingCodeChange(e,this.country)}},{key:"startInternationalNumber",value:function(e,t){this.international=!0,this.initCountryAndCallingCode(e,t)}},{key:"appendDigits",value:function(e){this.digits+=e}},{key:"appendNationalSignificantNumberDigits",value:function(e){this.nationalSignificantNumber+=e}},{key:"getNationalDigits",value:function(){return this.international?this.digits.slice((this.IDDPrefix?this.IDDPrefix.length:0)+(this.callingCode?this.callingCode.length:0)):this.digits}},{key:"getDigitsWithoutInternationalPrefix",value:function(){return this.international&&this.IDDPrefix?this.digits.slice(this.IDDPrefix.length):this.digits}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,function(e){var t=function(e,t){if("object"!=ex(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=ex(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ex(t)?t:t+""}(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}();function eE(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var ek=/x/;function eS(e,t){if(t<1)return"";for(var n="";t>1;)1&t&&(n+=e),t>>=1,e+=e;return n+e}function eI(e,t){return")"===e[t]&&t++,function(e){for(var t=[],n=0;n<e.length;)"("===e[n]?t.push(n):")"===e[n]&&t.pop(),n++;var r=0,i="";t.push(e.length);for(var a=0;a<t.length;a++){var o=t[a];i+=e.slice(r,o),r=o+1}return i}(e.slice(0,t))}function eA(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var eT={0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9","0":"0","1":"1","2":"2","3":"3","4":"4","5":"5","6":"6","7":"7","8":"8","9":"9","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9"};function e_(e){for(var t,n="",r=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return eA(e,void 0);var n=({}).toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?eA(e,t):void 0}}(e))){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(e.split(""));!(t=r()).done;){var i=eT[t.value];i&&(n+=i)}return n}
1function ej(e,t,n){var r,i,a=n.metadata,o=n.useNationalPrefixFormattingRule,s=n.getSeparatorAfterNationalPrefix,l=eo(e.nationalSignificantNumber,t,{carrierCode:e.carrierCode,useInternationalFormat:e.international,withNationalPrefix:o,metadata:a});if(!o&&(e.nationalPrefix?l=e.nationalPrefix+s(t)+l:e.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix&&(l=e.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix+" "+l)),r=l,i=e,e_(r)===i.getNationalDigits())return l}function eP(e){return(eP="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var e$=function(){var e,t;return e=function e(){if(!(this instanceof e))throw TypeError("Cannot call a class as a function")},t=[{key:"parse",value:function(e){if(this.context=[{or:!0,instructions:[]}],this.parsePattern(e),1!==this.context.length)throw Error("Non-finalized contexts left when pattern parse ended");var t=this.context[0],n=t.branches,r=t.instructions;if(n)return{op:"|",args:n.concat([eM(r)])};if(0===r.length)throw Error("Pattern is required");return 1===r.length?r[0]:r}},{key:"startContext",value:function(e){this.context.push(e)}},{key:"endContext",value:function(){this.context.pop()}},{key:"getContext",value:function(){return this.context[this.context.length-1]}},{key:"parsePattern",value:function(e){if(!e)throw Error("Pattern is required");var t=e.match(eO);if(!t){if(eN.test(e))throw Error("Illegal characters found in a pattern: ".concat(e));this.getContext().instructions=this.getContext().instructions.concat(e.split(""));return}var n=t[1],r=e.slice(0,t.index),i=e.slice(t.index+n.length);switch(n){case"(?:":r&&this.parsePattern(r),this.startContext({or:!0,instructions:[],branches:[]});break;case")":if(!this.getContext().or)throw Error('")" operator must be preceded by "(?:" operator');if(r&&this.parsePattern(r),0===this.getContext().instructions.length)throw Error('No instructions found after "|" operator in an "or" group');var a=this.getContext().branches;a.push(eM(this.getContext().instructions)),this.endContext(),this.getContext().instructions.push({op:"|",args:a});break;case"|":if(!this.getContext().or)throw Error('"|" operator can only be used inside "or" groups');if(r&&this.parsePattern(r),!this.getContext().branches)if(1===this.context.length)this.getContext().branches=[];else throw Error('"branches" not found in an "or" group context');this.getContext().branches.push(eM(this.getContext().instructions)),this.getContext().instructions=[];break;case"[":r&&this.parsePattern(r),this.startContext({oneOfSet:!0});break;case"]":if(!this.getContext().oneOfSet)throw Error('"]" operator must be preceded by "[" operator');this.endContext(),this.getContext().instructions.push({op:"[]",args:function(e){for(var t=[],n=0;n<e.length;){if("-"===e[n]){if(0===n||n===e.length-1)throw Error("Couldn't parse a one-of set pattern: ".concat(e));for(var r=e[n-1].charCodeAt(0)+1,i=e[n+1].charCodeAt(0)-1,a=r;a<=i;)t.push(String.fromCharCode(a)),a++}else t.push(e[n]);n++}return t}(r)});break;default:throw Error("Unknown operator: ".concat(n))}i&&this.parsePattern(i)}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,function(e){var t=function(e,t){if("object"!=eP(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=eP(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==eP(t)?t:t+""}(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(),eN=/[\(\)\[\]\?\:\|]/,eO=RegExp("(\\||\\(\\?\\:|\\)|\\[|\\])");function eM(e){return 1===e.length?e[0]:e}function eR(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return eL(e,void 0);var n=({}).toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?eL(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function eL(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function eD(e){return(eD="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var eF=function(){var e,t;return e=function e(t){if(!(this instanceof e))throw TypeError("Cannot call a class as a function");this.matchTree=new e$().parse(t)},t=[{key:"match",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.allowOverflow;
1if(!e)throw Error("String is required");var r=function e(t,n,r){if("string"==typeof n){var i=t.join("");return 0===n.indexOf(i)?t.length===n.length?{match:!0,matchedChars:t}:{partialMatch:!0}:0===i.indexOf(n)?r&&t.length>n.length?{overflow:!0}:{match:!0,matchedChars:t.slice(0,n.length)}:void 0}if(Array.isArray(n)){for(var a=t.slice(),o=0;o<n.length;){var s=e(a,n[o],r&&o===n.length-1);if(!s)return;if(s.overflow)return s;if(s.match){if(0===(a=a.slice(s.matchedChars.length)).length)if(o===n.length-1)return{match:!0,matchedChars:t};else return{partialMatch:!0}}else if(s.partialMatch)return{partialMatch:!0};else throw Error("Unsupported match result:\n".concat(JSON.stringify(s,null,2)));o++}return r?{overflow:!0}:{match:!0,matchedChars:t.slice(0,t.length-a.length)}}switch(n.op){case"|":for(var l,c,d=eR(n.args);!(c=d()).done;){var u=e(t,c.value,r);if(u)if(u.overflow)return u;else if(u.match)return{match:!0,matchedChars:u.matchedChars};else if(u.partialMatch)l=!0;else throw Error("Unsupported match result:\n".concat(JSON.stringify(u,null,2)))}if(l)return{partialMatch:!0};return;case"[]":for(var h,p=eR(n.args);!(h=p()).done;){var f=h.value;if(t[0]===f){if(1===t.length)return{match:!0,matchedChars:t};if(r)return{overflow:!0};return{match:!0,matchedChars:[f]}}}return;default:throw Error("Unsupported instruction tree: ".concat(n))}}(e.split(""),this.matchTree,!0);if(r&&r.match&&delete r.matchedChars,!r||!r.overflow||n)return r}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,function(e){var t=function(e,t){if("object"!=eD(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=eD(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==eD(t)?t:t+""}(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}();function eU(e){return(eU="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function eB(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return ez(e,void 0);var n=({}).toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ez(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function ez(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var eW=eS("9",15),eq=/[- ]/,eH=RegExp("["+G+"]*\\$1["+G+"]*(\\$\\d["+G+"]*)*$"),eV=function(){var e,t;return e=function e(t){t.state;var n=t.metadata;if(!(this instanceof e))throw TypeError("Cannot call a class as a function");this.metadata=n,this.resetFormat()},t=[{key:"resetFormat",value:function(){this.chosenFormat=void 0,this.template=void 0,this.nationalNumberTemplate=void 0,this.populatedNationalNumberTemplate=void 0,this.populatedNationalNumberTemplatePosition=-1}},{key:"reset",value:function(e,t){this.resetFormat(),e?(this.isNANP="1"===e.callingCode(),this.matchingFormats=e.formats(),t.nationalSignificantNumber&&this.narrowDownMatchingFormats(t)):(this.isNANP=void 0,this.matchingFormats=[])}},{key:"format",value:function(e,t){var n=this;if(r=t.nationalSignificantNumber,"IS_POSSIBLE"===F(r,t.country,this.metadata))for(var r,i,a=eB(this.matchingFormats);!(i=a()).done;){var o=i.value,s=function(e,t,n){var r=n.metadata,i=n.shouldTryNationalPrefixFormattingRule,a=n.getSeparatorAfterNationalPrefix;if(new RegExp("^(?:".concat(t.pattern(),")$")).test(e.nationalSignificantNumber))return function(e,t,n){var r=n.metadata,i=n.shouldTryNationalPrefixFormattingRule,a=n.getSeparatorAfterNationalPrefix;if(e.nationalSignificantNumber,e.international,e.nationalPrefix,e.carrierCode,i(t)){var o=ej(e,t,{useNationalPrefixFormattingRule:!0,getSeparatorAfterNationalPrefix:a,metadata:r});if(o)return o}return ej(e,t,{useNationalPrefixFormattingRule:!1,getSeparatorAfterNationalPrefix:a,metadata:r})}(e,t,{metadata:r,shouldTryNationalPrefixFormattingRule:i,getSeparatorAfterNationalPrefix:a})}(t,o,{metadata:this.metadata,shouldTryNationalPrefixFormattingRule:function(e){return n.shouldTryNationalPrefixFormattingRule(e,{international:t.international,nationalPrefix:t.nationalPrefix})},getSeparatorAfterNationalPrefix:function(e){return n.getSeparatorAfterNationalPrefix(e)}});if(s)return this.resetFormat(),this.chosenFormat=o,this.setNationalNumberTemplate(s.replace(/\d/g,"x"),t),this.populatedNationalNumberTemplate=s,this.populatedNationalNumberTemplatePosition=this.template.lastIndexOf("x"),s}return this.formatNationalNumberWithNextDigits(e,t)}},{key:"formatNationalNumberWithNextDigits",value:function(e,t){var n=this.chosenFormat,r=this.chooseFormat(t);if(r)if(r===n)return this.formatNextNationalNumberDigits(e);else return this.formatNextNationalNumberDigits(t.getNationalDigits())}},{key:"narrowDownMatchingFormats",value:function(e){var t=this,n=e.nationalSignificantNumber,r=e.nationalPrefix,i=e.international,a=n.length-3;a<0&&(a=0),this.matchingFormats=this.matchingFormats.filter(function(e){return t.formatSuits(e,i,r)&&t.formatMatches(e,n,a)}),this.chosenFormat&&-1===this.matchingFormats.indexOf(this.chosenFormat)&&this.resetFormat()}},{key:"formatSuits",value:function(e,t,n){return!(n&&!e.usesNationalPrefix()&&!e.nationalPrefixIsOptionalWhenFormattingInNationalFormat()||!t&&!n&&e.nationalPrefixIsMandatoryWhenFormattingInNationalFormat())}},{key:"formatMatches",value:function(e,t,n){var r=e.leadingDigitsPatterns().length;if(0===r)return!0;n=Math.min(n,r-1);var i=e.leadingDigitsPatterns()[n];if(t.length<3)try{return void 0!==new eF(i).match(t,{allowOverflow:!0})}catch(e){return console.error(e),!0}return new RegExp("^(".concat(i,")")).test(t)}},{key:"getFormatFormat",value:function(e,t){return t?e.internationalFormat():e.format()}},{key:"chooseFormat",value:function(e){for(var t,n,r,i=this,a=eB(this.matchingFormats.slice());!(r=a()).done&&0!==(t=r.value,n=i.chosenFormat===t?0:eH.test(i.getFormatFormat(t,e.international))?i.createTemplateForFormat(t,e)?(i.chosenFormat=t,0):(i.matchingFormats=i.matchingFormats.filter(function(e){return e!==t}),1):1);)if(1===n)continue;return this.chosenFormat||this.resetFormat(),this.chosenFormat}},{key:"createTemplateForFormat",value:function(e,t){if(!(e.pattern().indexOf("|")>=0)){var n=this.getTemplateForFormat(e,t);if(n)return this.setNationalNumberTemplate(n,t),!0}}},{key:"getSeparatorAfterNationalPrefix",value:function(e){return this.isNANP||e&&e.nationalPrefixFormattingRule()&&eq.test(e.nationalPrefixFormattingRule())?" ":""}},{key:"getInternationalPrefixBeforeCountryCallingCode",value:function(e,t){var n=e.IDDPrefix,r=e.missingPlus;return n?t&&!1===t.spacing?n:n+" ":r?"":"+"}},{key:"getTemplate",value:function(e){if(this.template){for(var t=-1,n=0,r=e.international?this.getInternationalPrefixBeforeCountryCallingCode(e,{spacing:!1}):"";n<r.length+e.getDigitsWithoutInternationalPrefix().length;)t=this.template.indexOf("x",t+1),n++;return eI(this.template,t+1)}}},{key:"setNationalNumberTemplate",value:function(e,t){this.nationalNumberTemplate=e,this.populatedNationalNumberTemplate=e,this.populatedNationalNumberTemplatePosition=-1,t.international?this.template=this.getInternationalPrefixBeforeCountryCallingCode(t).replace(/[\d\+]/g,"x")+eS("x",t.callingCode.length)+" "+e:this.template=e}},{key:"getTemplateForFormat",value:function(e,t){var n,r=t.nationalSignificantNumber,i=t.international,a=t.nationalPrefix,o=t.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix,s=e.pattern();s=s.replace(/\[([^\[\]])*\]/g,"\\d").replace(/\d(?=[^,}][^,}])/g,"\\d");var l=eW.match(s)[0];if(!(r.length>l.length)){var c=RegExp("^"+s+"$"),d=r.replace(/\d/g,"9");c.test(d)&&(l=d);var u=this.getFormatFormat(e,i);if(this.shouldTryNationalPrefixFormattingRule(e,{international:i,nationalPrefix:a})){var h=u.replace(ea,e.nationalPrefixFormattingRule());if(e_(e.nationalPrefixFormattingRule())===(a||"")+e_("$1")&&(u=h,n=!0,a))for(var p=a.length;p>0;)u=u.replace(/\d/,"x"),p--}var f=l.replace(new RegExp(s),u).replace(/9/g,"x");return!n&&(o?f=eS("x",o.length)+" "+f:a&&(f=eS("x",a.length)+this.getSeparatorAfterNationalPrefix(e)+f)),i&&(f=ei(f)),f}}},{key:"formatNextNationalNumberDigits",value:function(e){var t=function(e,t,n){for(var r,i=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return eE(e,void 0);var n=({}).toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?eE(e,t):void 0}}(e))){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(n.split(""));!(r=i()).done;){var a=r.value;if(0>e.slice(t+1).search(ek))return;t=e.search(ek),e=e.replace(ek,a)}return[e,t]}(this.populatedNationalNumberTemplate,this.populatedNationalNumberTemplatePosition,e);return t?(this.populatedNationalNumberTemplate=t[0],this.populatedNationalNumberTemplatePosition=t[1],eI(this.populatedNationalNumberTemplate,this.populatedNationalNumberTemplatePosition+1)):void this.resetFormat()}},{key:"shouldTryNationalPrefixFormattingRule",value:function(e,t){var n=t.international,r=t.nationalPrefix;if(e.nationalPrefixFormattingRule()){var i=e.usesNationalPrefix();if(i&&r||!i&&!n)return!0}}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,function(e){var t=function(e,t){if("object"!=eU(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=eU(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==eU(t)?t:t+""}(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}();function eG(e){return(eG="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function eK(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a,o,s=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}
1finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return eY(e,t);var n=({}).toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?eY(e,t):void 0}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function eY(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var eZ=RegExp("^["+G+V+"]+$","i"),eJ="(?:["+K+"]["+G+V+"]*|["+G+V+"]+)",eQ=RegExp("[^"+G+V+"]+.*$"),eX=/[^\d\[\]]/,e0=function(){var e,t;return e=function e(t){var n=t.defaultCountry,r=t.defaultCallingCode,i=t.metadata,a=t.onNationalSignificantNumberChange;if(!(this instanceof e))throw TypeError("Cannot call a class as a function");this.defaultCountry=n,this.defaultCallingCode=r,this.metadata=i,this.onNationalSignificantNumberChange=a},t=[{key:"input",value:function(e,t){var n,r,i,a,o,s=eK((i=(r=eK("+"===(n=function(e){var t,n=e.search(eJ);if(!(n<0))return"+"===(e=e.slice(n))[0]&&(t=!0,e=e.slice(1)),e=e.replace(eQ,""),t&&(e="+"+e),e}(e)||"")[0]?[n.slice(1),!0]:[n],2))[0],a=r[1],eZ.test(i)||(i=""),[i,a]),2),l=s[0],c=s[1],d=e_(l);return c&&!t.digits&&(t.startInternationalNumber(void 0,void 0),d||(o=!0)),d&&this.inputDigits(d,t),{digits:d,justLeadingPlus:o}}},{key:"inputDigits",value:function(e,t){var n=t.digits,r=n.length<3&&n.length+e.length>=3;if(t.appendDigits(e),r&&this.extractIddPrefix(t),this.isWaitingForCountryCallingCode(t)){if(!this.extractCountryCallingCode(t))return}else t.appendNationalSignificantNumberDigits(e);t.international||this.hasExtractedNationalSignificantNumber||this.extractNationalSignificantNumber(t.getNationalDigits(),function(e){return t.update(e)})}},{key:"isWaitingForCountryCallingCode",value:function(e){var t=e.international,n=e.callingCode;return t&&!n}},{key:"extractCountryCallingCode",value:function(e){var t=er("+"+e.getDigitsWithoutInternationalPrefix(),e.country,this.defaultCountry,this.defaultCallingCode,this.metadata.metadata),n=t.countryCallingCode,r=t.number;if(n)return e.setCallingCode(n),e.update({nationalSignificantNumber:r}),!0}},{key:"reset",value:function(e){if(e){this.hasSelectedNumberingPlan=!0;var t=e._nationalPrefixForParsing();this.couldPossiblyExtractAnotherNationalSignificantNumber=t&&eX.test(t)}else this.hasSelectedNumberingPlan=void 0,this.couldPossiblyExtractAnotherNationalSignificantNumber=void 0}},{key:"extractNationalSignificantNumber",value:function(e,t){if(this.hasSelectedNumberingPlan){var n=J(e,this.metadata),r=n.nationalPrefix,i=n.nationalNumber,a=n.carrierCode;if(i!==e)return this.onExtractedNationalNumber(r,a,i,e,t),!0}}},{key:"extractAnotherNationalSignificantNumber",value:function(e,t,n){if(!this.hasExtractedNationalSignificantNumber)return this.extractNationalSignificantNumber(e,n);if(this.couldPossiblyExtractAnotherNationalSignificantNumber){var r=J(e,this.metadata),i=r.nationalPrefix,a=r.nationalNumber,o=r.carrierCode;if(a!==t)return this.onExtractedNationalNumber(i,o,a,e,n),!0}}},{key:"onExtractedNationalNumber",value:function(e,t,n,r,i){var a,o=!1,s=r.lastIndexOf(n);if(s<0||s!==r.length-n.length)o=!0;else{var l=r.slice(0,s);l&&l!==e&&(a=l)}i({nationalPrefix:e,carrierCode:t,nationalSignificantNumber:n,nationalSignificantNumberIsModified:o,prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix:a}),this.hasExtractedNationalSignificantNumber=!0,this.onNationalSignificantNumberChange()}},{key:"reExtractNationalSignificantNumber",value:function(e){return!!this.extractAnotherNationalSignificantNumber(e.getNationalDigits(),e.nationalSignificantNumber,function(t){return e.update(t)})||(this.extractIddPrefix(e)||this.fixMissingPlus(e)?(this.extractCallingCodeAndNationalSignificantNumber(e),!0):void 0)}},{key:"extractIddPrefix",value:function(e){var t=e.international,n=e.IDDPrefix,r=e.digits;if(e.nationalSignificantNumber,!t&&!n){var i=Z(r,this.defaultCountry,this.defaultCallingCode,this.metadata.metadata);if(void 0!==i&&i!==r)return e.update({IDDPrefix:r.slice(0,r.length-i.length)}),this.startInternationalNumber(e,{country:void 0,callingCode:void 0}),!0}}},{key:"fixMissingPlus",value:function(e){if(!e.international){var t=en(e.digits,e.country,this.defaultCountry,this.defaultCallingCode,this.metadata.metadata).countryCallingCode;if(t)return e.update({missingPlus:!0}),this.startInternationalNumber(e,{country:e.country,callingCode:t}),!0}}},{key:"startInternationalNumber",value:function(e,t){var n=t.country,r
1=t.callingCode;e.startInternationalNumber(n,r),e.nationalSignificantNumber&&(e.resetNationalSignificantNumber(),this.onNationalSignificantNumberChange(),this.hasExtractedNationalSignificantNumber=void 0)}},{key:"extractCallingCodeAndNationalSignificantNumber",value:function(e){this.extractCountryCallingCode(e)&&this.extractNationalSignificantNumber(e.getNationalDigits(),function(t){return e.update(t)})}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,function(e){var t=function(e,t){if("object"!=eG(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=eG(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==eG(t)?t:t+""}(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}();function e1(e){return(e1="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function e2(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var e3=function(){var e,t;return e=function e(t,n){if(!(this instanceof e))throw TypeError("Cannot call a class as a function");this.metadata=new I(n);var r,i=function(e){if(Array.isArray(e))return e}(r=this.getCountryAndCallingCode(t))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a,o,s=[],l=!0,c=!1;try{a=(n=n.call(e)).next,!1;for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}(r,2)||function(e,t){if(e){if("string"==typeof e)return e2(e,2);var n=({}).toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?e2(e,t):void 0}}(r,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),a=i[0],o=i[1];this.defaultCountry=a,this.defaultCallingCode=o,this.reset()},t=[{key:"getCountryAndCallingCode",value:function(e){var t,n;return e&&(b(e)?(t=e.defaultCountry,n=e.defaultCallingCode):t=e),t&&!this.metadata.hasCountry(t)&&(t=void 0),[t,n]}},{key:"input",value:function(e){var t=this.parser.input(e,this.state),n=t.digits;if(t.justLeadingPlus)this.formattedOutput="+";else if(n){if(this.determineTheCountryIfNeeded(),this.state.nationalSignificantNumber&&this.formatter.narrowDownMatchingFormats(this.state),this.metadata.hasSelectedNumberingPlan()&&(r=this.formatter.format(n,this.state)),void 0===r&&this.parser.reExtractNationalSignificantNumber(this.state)){this.determineTheCountryIfNeeded();var r,i=this.state.getNationalDigits();i&&(r=this.formatter.format(i,this.state))}this.formattedOutput=r?this.getFullNumber(r):this.getNonFormattedNumber()}return this.formattedOutput}},{key:"reset",value:function(){var e=this;return this.state=new eC({onCountryChange:function(t){e.country=t},onCallingCodeChange:function(t,n){e.metadata.selectNumberingPlan(n,t),e.formatter.reset(e.metadata.numberingPlan,e.state),e.parser.reset(e.metadata.numberingPlan)}}),this.formatter=new eV({state:this.state,metadata:this.metadata}),this.parser=new e0({defaultCountry:this.defaultCountry,defaultCallingCode:this.defaultCallingCode,metadata:this.metadata,state:this.state,onNationalSignificantNumberChange:function(){e.determineTheCountryIfNeeded(),e.formatter.reset(e.metadata.numberingPlan,e.state)}}),this.state.reset({country:this.defaultCountry,callingCode:this.defaultCallingCode}),this.formattedOutput="",this}},{key:"isInternational",value:function(){return this.state.international}},{key:"getCallingCode",value:function(){if(this.isInternational())return this.state.callingCode}},{key:"getCountryCallingCode",value:function(){return this.getCallingCode()}},{key:"getCountry",value:function(){if(this.state.digits)return this._getCountry()}},{key:"_getCountry",value:function(){return this.state.country}},{key:"determineTheCountryIfNeeded",value:function(){(!this.state.country||this.isCountryCallingCodeAmbiguous())&&this.determineTheCountry()}},{key:"getFullNumber",value:function(e){var t=this;if(this.isInternational()){var n=function(e){return t.formatter.getInternationalPrefixBeforeCountryCallingCode(t.state,{spacing:!!e})+e},r=this.state.callingCode;return n(r?e?"".concat(r," ").concat(e):r:"".concat(this.state.getDigitsWithoutInternationalPrefix()))}return e}},{key:"getNonFormattedNationalNumberWithPrefix",value:function(){var e=this.state,t=e.nationalSignificantNumber,n=e.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix,r=e.nationalPrefix,i=t,a=n||r;return a&&(i=a+i),i}},{key:"getNonFormattedNumber",value:function(){var e=this.state.nationalSignificantNumberIsModified;return this.getFullNumber(e?this.state.getNationalDigits():this.getNon
1FormattedNationalNumberWithPrefix())}},{key:"getNonFormattedTemplate",value:function(){var e=this.getNonFormattedNumber();if(e)return e.replace(/[\+\d]/g,"x")}},{key:"isCountryCallingCodeAmbiguous",value:function(){var e=this.state.callingCode,t=this.metadata.getCountryCodesForCallingCode(e);return t&&t.length>1}},{key:"determineTheCountry",value:function(){this.state.setCountry(ee(this.isInternational()?this.state.callingCode:this.defaultCallingCode,{nationalNumber:this.state.nationalSignificantNumber,metadata:this.metadata}))}},{key:"getNumberValue",value:function(){var e=this.state,t=e.digits,n=e.callingCode,r=e.country,i=e.nationalSignificantNumber;if(t){if(this.isInternational())if(n)return"+"+n+i;else return"+"+t;else if(r||n)return"+"+(r?this.metadata.countryCallingCode():n)+i}}},{key:"getNumber",value:function(){var e=this.state,t=e.nationalSignificantNumber,n=e.carrierCode,r=e.callingCode,i=this._getCountry();if(t&&(i||r)){if(i&&i===this.defaultCountry){var a=new I(this.metadata.metadata);a.selectNumberingPlan(i);var o=a.numberingPlan.callingCode(),s=this.metadata.getCountryCodesForCallingCode(o);if(s.length>1){var l=X(t,{countries:s,metadata:this.metadata.metadata});l&&(i=l)}}var c=new eb(i||r,t,this.metadata.metadata);return n&&(c.carrierCode=n),c}}},{key:"isPossible",value:function(){var e=this.getNumber();return!!e&&e.isPossible()}},{key:"isValid",value:function(){var e=this.getNumber();return!!e&&e.isValid()}},{key:"getNationalNumber",value:function(){return this.state.nationalSignificantNumber}},{key:"getChars",value:function(){return(this.state.international?"+":"")+this.state.digits}},{key:"getTemplate",value:function(){return this.formatter.getTemplate(this.state)||this.getNonFormattedTemplate()||""}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,function(e){var t=function(e,t){if("object"!=e1(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=e1(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==e1(t)?t:t+""}(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}();function e5(e){return e3.call(this,e,f)}function e4(e){return(e4="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function e6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function e8(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function e9(e){return(e9="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}e5.prototype=Object.create(e3.prototype,{}),e5.prototype.constructor=e5;function e7(e){var t="function"==typeof Map?new Map:void 0;return(e7=function(e){if(null===e||!function(e){try{return -1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(te())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var i=new(e.bind.apply(e,r));return n&&tt(i,n.prototype),i}(e,arguments,tn(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),tt(n,e)})(e)}function te(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(te=function(){return!!e})()}function tt(e,t){return(tt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}
1function tn(e){return(tn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var tr=function(e){function t(e){var n,r,i;if(!(this instanceof t))throw TypeError("Cannot call a class as a function");return r=t,i=[e],r=tn(r),Object.setPrototypeOf(n=function(e,t){if(t&&("object"==e9(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");var n=e;if(void 0===n)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(this,te()?Reflect.construct(r,i||[],tn(this).constructor):r.apply(this,i)),t.prototype),n.name=n.constructor.name,n}if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&tt(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t}(e7(Error)),ti=RegExp("(?:"+ec()+")$","i");function ta(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function to(e){for(var t,n="",r=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return ta(e,void 0);var n=({}).toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ta(e,t):void 0}}(e))){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(e.split(""));!(t=r()).done;){var i=t.value;n+=function(e,t,n){if("+"===e){if(t)return;return"+"}return eT[e]}(i,n)||""}return n}var ts="(["+V+"]|[\\-\\.\\(\\)]?)",tl=RegExp("^\\+"+ts+"*["+V+"]"+ts+"*$","g"),tc=RegExp("^("+("["+V+"]+((\\-)*[")+V+"])*\\.)*[a-zA-Z]+((\\-)*["+V+"])*\\.?$","g"),td="tel:",tu=";phone-context=",th=RegExp("["+K+V+"]"),tp=RegExp("[^"+V+"#]+$");function tf(e){return(tf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function tg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function tm(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?tg(Object(n),!0).forEach(function(t){var r,i,a;r=e,i=t,a=n[t],(i=function(e){var t=function(e,t){if("object"!=tf(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=tf(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==tf(t)?t:t+""}(i))in r?Object.defineProperty(r,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[i]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tg(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ty(e){return(ty="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function tv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function tb(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?tv(Object(n),!0).forEach(function(t){var r,i,a;r=e,i=t,a=n[t],(i=function(e){var t=function(e,t){if("object"!=ty(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=ty(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ty(t)?t:t+""}(i))in r?Object.defineProperty(r,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[i]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tv(Object(n)).forEac
1h(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function tw(e){return(tw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function tx(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function tC(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?tx(Object(n),!0).forEach(function(t){var r,i,a;r=e,i=t,a=n[t],(i=function(e){var t=function(e,t){if("object"!=tw(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=tw(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==tw(t)?t:t+""}(i))in r?Object.defineProperty(r,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[i]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tx(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function tE(){var e=function(e){var t,n,r,i,a=function(e){if(Array.isArray(e))return e}(t=Array.prototype.slice.call(e))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a,o,s=[],l=!0,c=!1;try{a=(n=n.call(e)).next,!1;for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}(t,4)||function(e,t){if(e){if("string"==typeof e)return e8(e,4);var n=({}).toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?e8(e,t):void 0}}(t,4)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),o=a[0],s=a[1],l=a[2],c=a[3];if("string"==typeof o)n=o;else throw TypeError("A text for parsing must be a string.");if(s&&"string"!=typeof s)if(b(s))l?(r=s,i=l):i=s;else throw Error("Invalid second argument: ".concat(s));else c?(r=l,i=c):(r=void 0,i=l),s&&(r=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?e6(Object(n),!0).forEach(function(t){var r,i,a;r=e,i=t,a=n[t],(i=function(e){var t=function(e,t){if("object"!=e4(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=e4(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==e4(t)?t:t+""}(i))in r?Object.defineProperty(r,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[i]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):e6(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({defaultCountry:s},r));return{text:n,options:r,metadata:i}}(arguments),t=e.text,n=e.options,r=e.metadata,i=function(e,t,n){var r,i;t&&t.defaultCountry&&(r=t.defaultCountry,!n.countries.hasOwnProperty(r))&&(t=tb(tb({},t),{},{defaultCountry:void 0}));try{return i=t,function(e,t,n){if(t=t||{},n=new I(n),t.defaultCountry&&!n.hasCountry(t.defaultCountry)){if(t.v2)throw new tr("INVALID_COUNTRY");throw Error("Unknown country: ".concat(t.defaultCountry))}var r,i,a,o,s=function(e,t,n){var r=function(e,t){var n=t.extractFormattedPhoneNumber,r=function(e){var t=e.indexOf(tu);if(t<0)return null;var n=t+tu.length;if(n>=e.length)return"";var r=e.indexOf(";",n);return r>=0?e.substring(n,r):e.substring(n)}(e);if(!(null===r||0!==r.length&&(tl.test(r)||tc.test(r))))throw new tr("NOT_A_NUMBER");if(null===r)i=n(e)||"";else{i="","+"===r.charAt(0)&&(i+=r);var i,a,o=e.indexOf(td);a=o>=0?o+td.length:0;var s=e.indexOf(tu);
1i+=e.substring(a,s)}var l=i.indexOf(";isub=");if(l>0&&(i=i.substring(0,l)),""!==i)return i}(e,{extractFormattedPhoneNumber:function(e){if(e){if(e.length>250){if(t)throw new tr("TOO_LONG");return}if(!1===n)return e;var r=e.search(th);return r<0?void 0:e.slice(r).replace(tp,"")}}});if(!r)return{};if(!(r.length>=2&&eh.test(r)))return eu.test(r)?{error:"TOO_SHORT"}:{};var i=function(e){var t=e.search(ti);if(t<0)return{};for(var n=e.slice(0,t),r=e.match(ti),i=1;i<r.length;){if(r[i])return{number:n,ext:r[i]};i++}}(r);return i.ext?i:{number:r}}(e,t.v2,t.extract),l=s.number,c=s.ext,d=s.error;if(!l){if(t.v2){if("TOO_SHORT"===d)throw new tr("TOO_SHORT");throw new tr("NOT_A_NUMBER")}return{}}var u=function(e,t,n,r){var i,a=er(to(e),void 0,t,n,r.metadata),o=a.countryCallingCodeSource,s=a.countryCallingCode,l=a.number;if(s)r.selectNumberingPlan(s);else{if(!l||!t&&!n)return{};r.selectNumberingPlan(t,n),t&&(i=t),s=n||O(t,r.metadata)}if(!l)return{countryCallingCodeSource:o,countryCallingCode:s};var c=et(to(l),i,r),d=c.nationalNumber,u=c.carrierCode,h=ee(s,{nationalNumber:d,metadata:r});return h&&(i=h,"001"===h||r.selectNumberingPlan(i)),{country:i,countryCallingCode:s,countryCallingCodeSource:o,nationalNumber:d,carrierCode:u}}(l,t.defaultCountry,t.defaultCallingCode,n),h=u.country,p=u.nationalNumber,f=u.countryCallingCode,g=u.countryCallingCodeSource,m=u.carrierCode;if(!n.hasSelectedNumberingPlan()){if(t.v2)throw new tr("INVALID_COUNTRY");return{}}if(!p||p.length<2){if(t.v2)throw new tr("TOO_SHORT");return{}}if(p.length>17){if(t.v2)throw new tr("TOO_LONG");return{}}if(t.v2){var y=new eb(f,p,n.metadata);return h&&(y.country=h),m&&(y.carrierCode=m),c&&(y.ext=c),y.__countryCallingCodeSource=g,y}var b=(t.extended?!!n.hasSelectedNumberingPlan():!!h)&&B(p,n.nationalNumberPattern());return t.extended?{country:h,countryCallingCode:f,carrierCode:m,valid:b,possible:!!b||!!(!0===t.extended&&n.possibleLengths()&&U(p,h,n)),phone:p,ext:c}:b?(r=h,i=p,a=c,o={country:r,phone:i},a&&(o.ext=a),o):{}}(e,tm(tm({},i),{},{v2:!0}),n)}catch(e){if(e instanceof tr);else throw e}}(t,n=tC(tC({},n),{},{extract:!1}),r);return i&&i.isPossible()||!1}function tk(e,t,n){if(t[e])return new eb(e,t[e],n)}let tS=(e,t)=>(function(){return g(tE,arguments)})(String(e),t),tI=(e,t)=>"+".concat(L(t)," ").concat(e),tA=e=>"*".concat(e.replaceAll("-","").slice(-4)),tT=e=>new e5(e),t_=(function(){return g(R,arguments)})().map(e=>({code:e,callCode:L(e)})),tj=e=>{var t;let n=null==(t=function(){return g(tk,arguments)}(e,p))?void 0:t.formatInternational();return null==n?void 0:n.substring(n.indexOf(" ")+1)},tP=e=>{let t=new e5;t.input(e);let n=t.getCountry()||"US",r=t.getCallingCode()||"1";return{countryCode:n,phone:e.replace("+"+r,"")}}},540151,e=>{"use strict";function t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}e.s(["_",()=>t])},214068,650838,e=>{"use strict";e.s(["$",()=>ee,"A",()=>V,"B",()=>eH,"C",()=>eV,"D",()=>eG,"E",()=>eK,"F",()=>F,"G",()=>O,"H",()=>ez,"I",()=>eW,"J",()=>eq,"K",()=>eg,"L",()=>ew,"M",()=>J,"N",()=>en,"O",()=>eA,"P",()=>M,"Q",()=>el,"R",()=>eU,"S",()=>eQ,"T",()=>eY,"U",()=>eZ,"V",()=>eJ,"W",()=>G,"X",()=>K,"Y",()=>Y,"Z",()=>Z,"_",()=>X,"a",()=>ef,"a0",()=>eT,"a1",()=>er,"a2",()=>eB,"a3",()=>ec,"a4",()=>Q,"a5",()=>eE,"a6",()=>ey,"a7",()=>et,"a8",()=>eX,"a9",()=>e0,"aa",()=>N,"ab",()=>q,"ac",()=>B,"ad",()=>eD,"ae",()=>eF,"af",()=>eP,"ag",()=>ej,"ah",()=>e_,"ai",()=>z,"aj",()=>W,"ak",()=>ed,"al",()=>eu,"b",()=>eh,"c",()=>ea,"d",()=>eo,"e",()=>ei,"f",()=>D,"g",()=>es,"h",()=>U,"i",()=>eI,"j",()=>ek,"k",()=>eL,"l",()=>eR,"m",()=>eM,"n",()=>eO,"o",()=>eS,"p",()=>ep,"q",()=>eN,"r",()=>e$,"s",()=>ex,"t",()=>eb,"u",()=>em,"v",()=>ev,"w",()=>eC,"x",()=>L,"y",()=>R,"z",()=>H],214068),e.s(["F",()=>S,"c",()=>function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{fetch:r=globalThis.fetch,Headers:i=globalThis.Headers,AbortController:a=globalThis.AbortController}=t;async function o(e){let t=e.error&&"AbortError"===e.error.name&&!e.options.timeout||!1;if(!1!==e.options.retry&&!t){let t;
1t="number"==typeof e.options.retry?e.options.retry:+!A(e.options.method);let n=e.response&&e.response.status||500;if(t>0&&(Array.isArray(e.options.retryStatusCodes)?e.options.retryStatusCodes.includes(n):P.has(n))){let n="function"==typeof e.options.retryDelay?e.options.retryDelay(e):e.options.retryDelay||0;return n>0&&await new Promise(e=>setTimeout(e,n)),l(e.request,{...e.options,retry:t-1})}}let n=function(e){var t,n,r,i,a;let o=(null==(t=e.error)?void 0:t.message)||(null==(n=e.error)?void 0:n.toString())||"",s=(null==(r=e.request)?void 0:r.method)||(null==(i=e.options)?void 0:i.method)||"GET",l=(null==(a=e.request)?void 0:a.url)||String(e.request)||"/",c="[".concat(s,"] ").concat(JSON.stringify(l)),d=e.response?"".concat(e.response.status," ").concat(e.response.statusText):"<no response>",u=new S("".concat(c,": ").concat(d).concat(o?" ".concat(o):""),e.error?{cause:e.error}:void 0);for(let t of["request","options","response"])Object.defineProperty(u,t,{get:()=>e[t]});for(let[t,n]of[["data","_data"],["status","status"],["statusCode","status"],["statusText","statusText"],["statusMessage","statusText"]])Object.defineProperty(u,t,{get:()=>e.response&&e.response[n]});return u}(e);throw Error.captureStackTrace&&Error.captureStackTrace(n,l),n}let l=async function(e){let l,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},d={request:e,options:function(e,t,n,r){var i;let a,o=function(e,t,n){if(!t)return new n(e);let r=new n(t);if(e)for(let[t,i]of Symbol.iterator in e||Array.isArray(e)?e:new n(e))r.set(t,i);return r}(null!=(i=null==t?void 0:t.headers)?i:null==e?void 0:e.headers,null==n?void 0:n.headers,r);return((null==n?void 0:n.query)||(null==n?void 0:n.params)||(null==t?void 0:t.params)||(null==t?void 0:t.query))&&(a={...null==n?void 0:n.params,...null==n?void 0:n.query,...null==t?void 0:t.params,...null==t?void 0:t.query}),{...n,...t,query:a,params:a,headers:o}}(e,c,t.defaults,i),response:void 0,error:void 0};if(d.options.method&&(d.options.method=d.options.method.toUpperCase()),d.options.onRequest&&await j(d,d.options.onRequest),"string"==typeof d.request&&(d.options.baseURL&&(d.request=function(e,t){var n;if(!(n=t)||"/"===n||x(e))return e;let r=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;if(!t)return(C(e)?e.slice(0,-1):e)||"/";if(!C(e,!0))return e||"/";let n=e,r="",i=e.indexOf("#");-1!==i&&(n=e.slice(0,i),r=e.slice(i));let[a,...o]=n.split("?");return((a.endsWith("/")?a.slice(0,-1):a)||"/")+(o.length>0?"?".concat(o.join("?")):"")+r}(t);return e.startsWith(r)?e:function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];let i=e||"";for(let e of n.filter(e=>e&&"/"!==e))if(i){let t=e.replace(w,"");i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;if(!t)return e.endsWith("/")?e:e+"/";if(C(e,!0))return e||"/";let n=e,r="",i=e.indexOf("#");if(-1!==i&&(n=e.slice(0,i),r=e.slice(i),!n))return r;let[a,...o]=n.split("?");return a+"/"+(o.length>0?"?".concat(o.join("?")):"")+r}(i)+t}else i=e;return i}(r,e)}(d.request,d.options.baseURL)),d.options.query&&(d.request=function(e,t){let n=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1?arguments[1]:void 0,r=t.match(/^[\s\0]*(blob:|data:|javascript:|vbscript:)(.*)/i);if(r){let[,e,t=""]=r;return{protocol:e.toLowerCase(),pathname:t,href:e+t,auth:"",host:"",search:"",hash:""}}if(!x(t,{acceptRelative:!0}))return n?e(n+t):k(t);let[,i="",a,o=""]=t.replace(/\\/g,"/").match(/^[\s\0]*([\w+.-]{2,}:)?\/\/([^/@]+@)?(.*)/)||[],[,s="",l=""]=o.match(/([^#/?]*)(.*)?/)||[];"file:"===i&&(l=l.replace(/\/(?=[A-Za-z]:)/,""));let{pathname:c,search:d,hash:u}=k(l);return{protocol:i.toLowerCase(),auth:a?a.slice(0,Math.max(0,a.length-1)):"",host:s,pathname:c,search:d,hash:u,[E]:!i}}(e),r={...function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=Object.create(null);for(let n of("?"===e[0]&&(e=e.slice(1)),e.split("&"))){let e=n.match(/([^=]+)=?(.*)/)||[];if(e.length<2)continue;let r=f(e[1].replace(s," "));if("__proto__"===r||"constructor"===r)continue;let i=f((e[2]||"").replace(s," "));void 0===t[r]?t[r]=i:Array.isArray(t[r])?t[r].push(i):t[r]=[t[r],i]}return t}(n.search),...t};return n.search=Object.keys(r).filter(e=>void 0!==r[e]).map(e=>{var t;return(("number"==typeof(t=r[e])||"boolean"==typeof t)&&(t=String(t)),t)?Array.isArray(t)?t.map(t=>"".concat(p(e),"=").concat(h(t))).join("&"):"".concat(p(e),"=").concat(h(t)):p(e)}
1).filter(Boolean).join("&"),function(e){let t=e.pathname||"",n=e.search?(e.search.startsWith("?")?"":"?")+e.search:"",r=e.hash||"",i=e.auth?e.auth+"@":"",a=e.host||"";return(e.protocol||e[E]?(e.protocol||"")+"//":"")+i+a+t+n+r}(n)}(d.request,d.options.query),delete d.options.query),"query"in d.options&&delete d.options.query,"params"in d.options&&delete d.options.params),d.options.body&&A(d.options.method)&&(!function(e){if(void 0===e)return!1;let t=typeof e;return"string"===t||"number"===t||"boolean"===t||null===t||"object"===t&&(!!Array.isArray(e)||!e.buffer&&(e.constructor&&"Object"===e.constructor.name||"function"==typeof e.toJSON))}(d.options.body)?("pipeTo"in d.options.body&&"function"==typeof d.options.body.pipeTo||"function"==typeof d.options.body.pipe)&&!("duplex"in d.options)&&(d.options.duplex="half"):(d.options.body="string"==typeof d.options.body?d.options.body:JSON.stringify(d.options.body),d.options.headers=new i(d.options.headers||{}),d.options.headers.has("content-type")||d.options.headers.set("content-type","application/json"),d.options.headers.has("accept")||d.options.headers.set("accept","application/json"))),!d.options.signal&&d.options.timeout){let e=new a;l=setTimeout(()=>{let t=Error("[TimeoutError]: The operation was aborted due to timeout");t.name="TimeoutError",t.code=23,e.abort(t)},d.options.timeout),d.options.signal=e.signal}try{d.response=await r(d.request,d.options)}catch(e){return d.error=e,d.options.onRequestError&&await j(d,d.options.onRequestError),await o(d)}finally{l&&clearTimeout(l)}if((d.response.body||d.response._bodyInit)&&!$.has(d.response.status)&&"HEAD"!==d.options.method){let e=(d.options.parseResponse?"json":d.options.responseType)||function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(!e)return"json";let t=e.split(";").shift()||"";return _.test(t)?"json":T.has(t)||t.startsWith("text/")?"text":"blob"}(d.response.headers.get("content-type")||"");switch(e){case"json":{let e=await d.response.text(),t=d.options.parseResponse||n.default;d.response._data=t(e);break}case"stream":d.response._data=d.response.body||d.response._bodyInit;break;default:d.response._data=await d.response[e]()}}return(d.options.onResponse&&await j(d,d.options.onResponse),!d.options.ignoreResponseError&&d.response.status>=400&&d.response.status<600)?(d.options.onResponseError&&await j(d,d.options.onResponseError),await o(d)):d.response},c=async function(e,t){return(await l(e,t))._data};return c.raw=l,c.native=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return r(...t)},c.create=function(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e({...t,...r,defaults:{...t.defaults,...r.defaults,...n}})},c}],650838);var t,n=e.i(322066);e.i(540151);let r=/#/g,i=/&/g,a=/\//g,o=/=/g,s=/\+/g,l=/%5e/gi,c=/%60/gi,d=/%7c/gi,u=/%20/gi;function h(e){return encodeURI(""+("string"==typeof e?e:JSON.stringify(e))).replace(d,"|").replace(s,"%2B").replace(u,"+").replace(r,"%23").replace(i,"%26").replace(c,"`").replace(l,"^").replace(a,"%2F")}function p(e){return h(e).replace(o,"%3D")}function f(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";try{return decodeURIComponent(""+e)}catch(t){return""+e}}let g=/^[\s\w\0+.-]{2,}:([/\\]{1,2})/,m=/^[\s\w\0+.-]{2,}:([/\\]{2})?/,y=/^([/\\]\s*){2,}[^/\\]/,b=/\/$|\/\?|\/#/,w=/^\.?\//;function x(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return("boolean"==typeof t&&(t={acceptRelative:t}),t.strict)?g.test(e):m.test(e)||!!t.acceptRelative&&y.test(e)}function C(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;return t?b.test(e):e.endsWith("/")}let E=Symbol.for("ufo:protocolRelative");function k(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",[t="",n="",r=""]=(e.match(/([^#?]*)(\?[^#]*)?(#.*)?/)||[]).splice(1);return{pathname:t,search:n,hash:r}}class S extends Error{constructor(e,t){super(e,t),this.name="FetchError",(null==t?void 0:t.cause)&&!this.cause&&(this.cause=t.cause)}}let I=new Set(Object.freeze(["PATCH","POST","PUT","DELETE"]));function A(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"GET";return I.has(e.toUpperCase())}let T=new Set(["image/svg","application/xml","application/xhtml","application/html"]),_=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;async function j(e,t){if(t)if(Array.isArray(t))for(let n of t)await n(e);else await t(e)}let P=new Set([408,409,425,429,500,502,503,504]),$=new Set([101,204,205,304]);
1class N extends Error{toString(){return"".concat(this.type).concat(this.privyErrorCode?"-".concat(this.privyErrorCode):"",": ").concat(this.message).concat(this.cause?" [cause: ".concat(this.cause,"]"):"")}constructor(e,t,n){super(e),t instanceof Error&&(this.cause=t),this.privyErrorCode=n}}class O extends N{constructor(e,t,n,r,i,a){super(n,r,i),this.type=e,this.status=t,this.data=a}}class M extends N{constructor(e,t,n){super(e,t,n),this.type="client_error"}}class R extends M{constructor(){super("Request timed out",void 0,"client_request_timeout")}}class L extends N{constructor(e,t,n){super(e,t,n),this.type="connector_error"}}let D=e=>{if(e instanceof N)return e;if(!(e instanceof S))return F(e);if(!e.response)return new O("api_error",null,e.message,e);let{type:t,message:n,error:r,code:i}=e.data;return new O(t||"ApiError",e.response.status,n||r,e,i,e.data)},F=e=>e instanceof N?e:e instanceof Error?new M(e.message,e):new M("Internal error: ".concat(e));var U=((t={}).OAUTH_ACCOUNT_SUSPENDED="oauth_account_suspended",t.MISSING_OR_INVALID_PRIVY_APP_ID="missing_or_invalid_privy_app_id",t.MISSING_OR_INVALID_PRIVY_ACCOUNT_ID="missing_or_invalid_privy_account_id",t.MISSING_OR_INVALID_TOKEN="missing_or_invalid_token",t.INVALID_DATA="invalid_data",t.INVALID_CAPTCHA="invalid_captcha",t.LINKED_TO_ANOTHER_USER="linked_to_another_user",t.CANNOT_LINK_MORE_OF_TYPE="cannot_link_more_of_type",t.FAILED_TO_LINK_ACCOUNT="failed_to_link_account",t.FAILED_TO_UPDATE_ACCOUNT="failed_to_update_account",t.USER_EXITED_UPDATE_FLOW="exited_update_flow",t.ALLOWLIST_REJECTED="allowlist_rejected",t.OAUTH_USER_DENIED="oauth_user_denied",t.OAUTH_UNEXPECTED="oauth_unexpected",t.UNKNOWN_AUTH_ERROR="unknown_auth_error",t.USER_EXITED_AUTH_FLOW="exited_auth_flow",t.USER_EXITED_LINK_FLOW="exited_link_flow",t.USER_EXITED_SET_PASSWORD_FLOW="user_exited_set_password_flow",t.MUST_BE_AUTHENTICATED="must_be_authenticated",t.UNKNOWN_CONNECT_WALLET_ERROR="unknown_connect_wallet_error",t.GENERIC_CONNECT_WALLET_ERROR="generic_connect_wallet_error",t.CLIENT_REQUEST_TIMEOUT="client_request_timeout",t.INVALID_CREDENTIALS="invalid_credentials",t.MISSING_MFA_CREDENTIALS="missing_or_invalid_mfa",t.UNKNOWN_MFA_ERROR="unknown_mfa_error",t.EMBEDDED_WALLET_ALREADY_EXISTS="embedded_wallet_already_exists",t.EMBEDDED_WALLET_NOT_FOUND="embedded_wallet_not_found",t.EMBEDDED_WALLET_CREATE_ERROR="embedded_wallet_create_error",t.UNKNOWN_EMBEDDED_WALLET_ERROR="unknown_embedded_wallet_error",t.EMBEDDED_WALLET_PASSWORD_UNCONFIRMED="embedded_wallet_password_unconfirmed",t.EMBEDDED_WALLET_PASSWORD_ALREADY_EXISTS="embedded_wallet_password_already_exists",t.EMBEDDED_WALLET_RECOVERY_ALREADY_EXISTS="embedded_wallet_recovery_already_exists",t.TRANSACTION_FAILURE="transaction_failure",t.UNSUPPORTED_CHAIN_ID="unsupported_chain_id",t.NOT_SUPPORTED="not_supported",t.CAPTCHA_TIMEOUT="captcha_timeout",t.INVALID_MESSAGE="invalid_message",t.UNABLE_TO_SIGN="unable_to_sign",t.CAPTCHA_FAILURE="captcha_failure",t.CAPTCHA_DISABLED="captcha_disabled",t.SESSION_STORAGE_UNAVAILABLE="session_storage_unavailable",t.TOO_MANY_REQUESTS="too_many_requests",t.USER_LIMIT_REACHED="max_accounts_reached",t.DISALLOWED_LOGIN_METHOD="disallowed_login_method",t.DISALLOWED_PLUS_EMAIL="disallowed_plus_email",t.PASSKEY_NOT_ALLOWED="passkey_not_allowed",t.USER_DOES_NOT_EXIST="user_does_not_exist",t.INSUFFICIENT_BALANCE="insufficient_balance",t.ACCOUNT_TRANSFER_REQUIRED="account_transfer_required",t.BUFFER_NOT_DEFINED="buffer_not_defined",t.UNSUPPORTED_WALLET_TYPE="unsupported_wallet_type",t);class B extends M{constructor(){super("Method called before `ready`. Ensure you wait until `ready` is true before calling.")}}class z extends M{constructor(e="Embedded wallet error",t){super(e,t,"unknown_embedded_wallet_error")}}class W extends M{constructor(e="User must be authenticated"){super(e,void 0,"must_be_authenticated")}}class q extends M{constructor(e){super("This application is in development mode and must be upgraded to production to log in new users.",e,"max_accounts_reached")}}let H="/api/v1/sessions",V="/api/v1/sessions/logout",G="/api/v1/siwe/init",K="/api/v1/siwe/authenticate",Y="/api/v1/siwe/link",Z="/api/v1/siwe/link_smart_wallet",J="/api/v1/siwe/unlink",Q="/api/v1/siwe/transfer",X="/api/v1/siws/init",ee="/api/v1/siws/authenticate",et="/api/v1/siws/link",en="/api/v1/siws/unlink",er="/api/v1/siws/transfer",ei="/api/v1/farcaster/init",ea="/api/v1/farcaster/authenticate",eo="/api/v1/farcaster/link",es="/api/v1/farcaster/status",el="/api/v1/farcaster/unlink",ec="/api/v1/farcaster/transfer",ed="api/v2/farcaster/init",eu="api/v2/farcaster/authenticate",eh="/api/v1/passwordless/init",ep="/api/v1/passwordless/authenticate",ef="/api/v1/passwordless/link",eg="/api/v1/passwordless/unlink",em="/api/v1/passwordless/update",ey="/api/v1/passwordless/transfer",ev="/api/v1/passwordless_sms/init",eb="/api/v1/passwordless_sms/link",ew="/api/v1/passwordless_sms/unlink",ex="/api/v1/passwordless_sms/authenticate",eC="/api/v1/passwordless_sms/update",eE="/api/v1/passwordless_sms/transfer",ek="/api/v1/oauth/init",eS="/api/v1/oauth/authenticate",eI="/api/v1/oauth/link",eA="/api/v1/oauth/unlink",eT="/api/v1/oauth/transfer",e_="/api/v1/recovery/oauth/init",ej="/api/v1/recovery/oauth/init_icloud",eP="/api/v1/recovery/oauth/authenticate",e$="/api/v1/passkeys/link/init",eN="/api/v1/passkeys/authenticate/init",eO="/api/v1/passkeys/register/init",eM="/api/v1/passkeys/link",eR="/api/v1/passkeys/authenticate",eL="/api/v1/passkeys/register",eD="/api/v1/telegram/authenticate",eF="/api/v1/telegram/link",eU="/api/v1/telegram/unlink",eB="/api/v1/telegram/transfer",ez="/api/v1/mfa/passwordless_sms/init",eW="/api/v1/mfa/passkeys/init",eq="/api/v1/users/me/accept_terms",eH="/api/v1/analytics_events",eV="/api/v1/custom_jwt_account/authenticate",eG="/api/v1/custom_jwt_account/link",eK="/api/v1/guest/authenticate",eY="/api/v1/plugins/moonpay_on_ramp/sign",eZ="/api/v1/funding/coinbase_on_ramp/init",eJ="/api/v1/funding/coinbase_on_ramp/status",eQ="/api/v1/wallets/revoke",eX="/api/v1/users/me",e0="/api/v1/scan/transaction"},269638,475254,618348,643531,174886,878894,343432,270756,373884,626912,778917,466261,252754,37727,452074,826707,95740,263488,688511,e=>{"use strict";e.s(["CheckCircle",()=>o],269638),e.s(["default",()=>a],475254);var t=e.i(271645);let n=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];
1return t.filter((e,t,n)=>!!e&&n.indexOf(e)===t).join(" ")};var r={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let i=(0,t.forwardRef)((e,i)=>{let{color:a="currentColor",size:o=24,strokeWidth:s=2,absoluteStrokeWidth:l,className:c="",children:d,iconNode:u,...h}=e;return(0,t.createElement)("svg",{ref:i,...r,width:o,height:o,stroke:a,strokeWidth:l?24*Number(s)/Number(o):s,className:n("lucide",c),...h},[...u.map(e=>{let[n,r]=e;return(0,t.createElement)(n,r)}),...Array.isArray(d)?d:[d]])}),a=(e,r)=>{let a=(0,t.forwardRef)((a,o)=>{let{className:s,...l}=a;return(0,t.createElement)(i,{ref:o,iconNode:r,className:n("lucide-".concat(e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),s),...l})});return a.displayName="".concat(e),a},o=a("CircleCheckBig",[["path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14",key:"g774vq"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);e.s(["HelpCircle",()=>s],618348);let s=a("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);e.s(["Check",()=>l],643531);let l=a("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["Copy",()=>c],174886);let c=a("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);e.s(["AlertTriangle",()=>d],878894);let d=a("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);e.s(["Phone",()=>u],343432);let u=a("Phone",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]]);e.s(["Lock",()=>h],270756);let h=a("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);e.s(["XCircle",()=>p],373884);let p=a("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);e.s(["FileCheck",()=>f],626912);let f=a("FileCheck",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m9 15 2 2 4-4",key:"1grp1n"}]]);e.s(["ExternalLink",()=>g],778917);let g=a("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);e.s(["ArrowRightLeft",()=>m],466261);let m=a("ArrowRightLeft",[["path",{d:"m16 3 4 4-4 4",key:"1x1c3m"}],["path",{d:"M20 7H4",key:"zbl0bi"}],["path",{d:"m8 21-4-4 4-4",key:"h9nckh"}],["path",{d:"M4 17h16",key:"g4d7ey"}]]);e.s(["Wallet",()=>y],252754);let y=a("Wallet",[["path",{d:"M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1",key:"18etb6"}],["path",{d:"M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4",key:"xoc0q4"}]]);e.s(["X",()=>b],37727);let b=a("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);e.s(["FingerprintIcon",()=>w],452074);let w=a("Fingerprint",[["path",{d:"M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4",key:"1nerag"}],["path",{d:"M14 13.12c0 2.38 0 6.38-1 8.88",key:"o46ks0"}],["path",{d:"M17.29 21.02c.12-.6.43-2.3.5-3.02",key:"ptglia"}],["path",{d:"M2 12a10 10 0 0 1 18-6",key:"ydlgp0"}],["path",{d:"M2 16h.01",key:"1gqxmh"}],["path",{d:"M21.8 16c.2-2 .131-5.354 0-6",key:"drycrb"}],["path",{d:"M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2",key:"1tidbn"}],["path",{d:"M8.65 22c.21-.66.45-1.32.57-2",key:"13wd9y"}],["path",{d:"M9 6.8a6 6 0 0 1 9 5.2v2",key:"1fr1j5"}]]);e.s(["Smartphone",()=>x],826707);let x=a("Smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]]);e.s(["UserCircle",()=>C],95740);let C=a("CircleUser",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}],["path",{d:"M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662",key:"154egf"}]]);e.s(["Mail",()=>E],263488);let E=a("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);e.s(["Edit",()=>k],688511);let k=a("SquarePen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a2.121 2.121 0 1 1 3 3L12 15l-4 1 1-4Z",key:"1lpok0"}]])},487350,111674,e=>{"use strict";e.s(["P",()=>C,"a",()=>b,"b",()=>c,"c",()=>w,"d",()=>d,"e",()=>p,"f",()=>m,"g",()=>x,"h",()=>f,"i",()=>o,"j",()=>y,"l",()=>h,"u",()=>E],487350);var t=e.i(823838),n=e.i(271645);e.s(["I",()=>i,"n",()=>r,"u",()=>
1a],111674);let r=()=>{throw Error("You need to wrap your application with the <PrivyProvider> initialized with your app id.")},i=(0,n.createContext)({setAuthenticated:r,setUser:r,setIsNewUser:r,isNewUserThisSession:!1,walletConnectionStatus:null,setWalletConnectionStatus:r,connectors:[],rpcConfig:{rpcUrls:{}},showFiatPrices:!0,chains:[],clientAnalyticsId:null,pendingTransaction:null,client:null,privy:null,appId:"notAdded",onCustomAuthAuthenticated:r,hideWalletUIs:{current:!1},nativeTokenSymbolForChainId:r,initializeWalletProxy:r,getAuthMeta:r,getAuthFlow:r,closePrivyModal:r,openPrivyModal:r,connectWallet:r,initLoginWithWallet:r,loginWithWallet:r,initLoginWithFarcaster:r,loginWithFarcaster:r,loginWithCode:r,initLoginWithEmail:r,initLoginWithSms:r,initUpdateEmail:r,initUpdatePhone:r,resendEmailCode:r,resendSmsCode:r,initLoginWithHeadlessOAuth:r,loginWithHeadlessOAuth:r,crossAppAuthFlow:r,initLoginWithOAuth:r,loginWithOAuth:r,passkeyAuthState:{status:"initial"},setPasskeyAuthState:r,initSignupWithPasskey:r,signupWithPasskey:r,initLoginWithPasskey:r,loginWithPasskey:r,initLinkWithPasskey:r,linkWithPasskey:r,refreshSessionAndUser:r,walletProxy:null,createAnalyticsEvent:r,acceptTerms:r,getUsdTokenPrice:r,getUsdPriceForSol:r,getSplTokenMetadata:r,recoverEmbeddedWallet:r,updateWallets:r,fundWallet:r,openModal:r,setReadyToTrue:r,requestFarcasterSignerStatus:r,initLoginWithTelegram:r,loginWithTelegram:r,generateSiweMessage:r,generateSiweMessageForSmartWallet:r,loginWithSiwe:r,linkWithSiwe:r,linkSmartWallet:r,delegateWallet:r,revokeDelegatedWallets:r,connectCoinbaseSmartWallet:r,connectBaseAccount:r,initiateAccountTransfer:r,emailOtpState:{status:"initial"},setEmailOtpState:r,smsOtpState:{status:"initial"},setSmsOtpState:r,siweState:{status:"initial"},setSiweState:r,oAuthState:{status:"initial"},setOAuthState:r,telegramAuthState:{status:"initial"},setTelegramAuthState:r,isHeadlessOAuthLoading:!1,isHeadlessSigning:r,inProgressAuthFlowRef:{current:null},inProgressLoginOrLinkMethodRef:{current:null},baseAccountSdk:void 0,setBaseAccountSdk:r}),a=()=>(0,n.useContext)(i);function o(e){return"string"==typeof e&&/^custom:[a-zA-Z0-9_-]+$/i.test(e)}function s(e){return e?new Date(1e3*e):null}function l(e,t){return e.slice().sort((e,t)=>{var n,r,i,a;return(null!=(i=null==(n=e.firstVerifiedAt)?void 0:n.getTime())?i:0)-(null!=(a=null==(r=t.firstVerifiedAt)?void 0:r.getTime())?a:0)}).find(e=>e.type===t)}let c=e=>{var t;return e&&null!=(t=d(e).find(e=>0===e.walletIndex))?t:null},d=e=>e?u(e,"ethereum"):[],u=(e,t)=>
1e.linkedAccounts.filter(e=>"wallet"===e.type&&"privy"===e.walletClientType&&!e.imported&&e.chainType===t),h=e=>{var t;return e&&null!=(t=(e=>e?u(e,"solana"):[])(e).find(e=>0===e.walletIndex))?t:null},p=e=>{var t;return(null!=(t=null==e?void 0:e.linkedAccounts)?t:[]).filter(e=>"wallet"===e.type&&"privy"===e.walletClientType&&e.imported&&"ethereum"===e.chainType)},f=e=>{var t;return(null!=(t=null==e?void 0:e.linkedAccounts)?t:[]).filter(e=>"wallet"===e.type&&e.imported&&"privy"===e.walletClientType&&"solana"===e.chainType)},g=(e,n)=>e===n||!(!e.startsWith("0x")||!n.startsWith("0x"))&&(0,t.getAddress)(e)===(0,t.getAddress)(n),m=(e,t)=>(null==e?void 0:e.linkedAccounts.find(e=>"wallet"===e.type&&"privy"===e.walletClientType&&g(e.address,t)))||null,y=(e,t)=>e.find(e=>g(e.address,t))||null,b=e=>{var t;return null!=(t=c(e))?t:h(e)};function w(e){var t;if(!e)return null;let n=function(e){let t=[];for(let n of e){let e=n.type;switch(n.type){case"wallet":let r={id:n.id,address:n.address,type:n.type,imported:n.imported,delegated:n.delegated,firstVerifiedAt:s(n.first_verified_at),latestVerifiedAt:s(n.latest_verified_at),chainType:n.chain_type,walletClientType:n.wallet_client_type,connectorType:n.connector_type,recoveryMethod:n.recovery_method,walletIndex:n.wallet_index,publicKey:n.public_key};t.push(r);break;case"smart_wallet":let i={address:n.address,type:n.type,firstVerifiedAt:s(n.first_verified_at),latestVerifiedAt:s(n.latest_verified_at),smartWalletType:n.smart_wallet_type,smartWalletVersion:n.smart_wallet_version};t.push(i);break;case"cross_app":let a={type:n.type,subject:n.subject,embeddedWallets:n.embedded_wallets,smartWallets:n.smart_wallets,providerApp:{id:n.provider_app_id},firstVerifiedAt:s(n.first_verified_at),latestVerifiedAt:s(n.latest_verified_at)};t.push(a);break;case"email":let l={address:n.address,type:n.type,firstVerifiedAt:s(n.first_verified_at),latestVerifiedAt:s(n.latest_verified_at)};t.push(l);break;case"phone":let c={number:n.phoneNumber,type:n.type,firstVerifiedAt:s(n.first_verified_at),latestVerifiedAt:s(n.latest_verified_at)};t.push(c);break;case"google_oauth":let d={subject:n.subject,email:n.email,name:n.name,type:n.type,firstVerifiedAt:s(n.first_verified_at),latestVerifiedAt:s(n.latest_verified_at)};t.push(d);break;case"spotify_oauth":let u={subject:n.subject,email:n.email,name:n.name,type:n.type,firstVerifiedAt:s(n.first_verified_at),latestVerifiedAt:s(n.latest_verified_at)};t.push(u);break;case"instagram_oauth":let h={subject:n.subject,username:n.username,type:n.type,firstVerifiedAt:s(n.first_verified_at),latestVerifiedAt:s(n.latest_verified_at)};t.push(h);break;case"twitter_oauth":let p={subject:n.subject,username:n.username,name:n.name,type:n.type,profilePictureUrl:n.profile_picture_url,firstVerifiedAt:s(n.first_verified_at),latestVerifiedAt:s(n.latest_verified_at)};t.push(p);break;case"discord_oauth":let f={subject:n.subject,username:n.username,email:n.email,type:n.type,firstVerifiedAt:s(n.first_verified_at),latestVerifiedAt:s(n.latest_verified_at)};t.push(f);break;case"github_oauth":let g={subject:n.subject,username:n.username,name:n.name,email:n.email,type:n.type,firstVerifiedAt:s(n.first_verified_at),latestVerifiedAt:s(n.latest_verified_at)};t.push(g);break;case"tiktok_oauth":let m={subject:n.subject,username:n.username,name:n.name,type:n.type,firstVerifiedAt:s(n.first_verified_at),latestVerifiedAt:s(n.latest_verified_at)};t.push(m);break;case"line_oauth":let y={subject:n.subject,name:n.name,email:n.email,profilePictureUrl:n.profile_picture_url,type:n.type,firstVerifiedAt:s(n.first_verified_at),latestVerifiedAt:s(n.latest_verified_at)};t.push(y);break;case"twitch_oauth":let b={subject:n.subject,username:n.username,type:n.type,firstVerifiedAt:s(n.first_verified_at),latestVerifiedAt:s(n.latest_verified_at)};t.push(b);break;case"linkedin_oauth":let w={subject:n.subject,name:n.name,email:n.email,vanityName:n.vanity_name,type:n.type,firstVerifiedAt:s(n.first_verified_at),latestVerifiedAt:s(n.latest_verified_at)};t.push(w);break;case"apple_oauth":let x={subject:n.subject,email:n.email,type:n.type,firstVerifiedAt:s(n.first_verified_at),latestVerifiedAt:s(n.latest_verified_at)};t.push(x);break;case"custom_auth":t.push({type:n.type,customUserId:n.custom_user_id,firstVerifiedAt:s(n.first_verified_at),latestVerifiedAt:s(n.latest_verified_at)});break;case"farcaster":let C={type:n.type,fid:n.fid,ownerAddress:n.owner_address,displayName:n.display_name,username:n.username,bio:n.bio,pfp:n.profile_picture_url,url:n.homepage_url,firstVerifiedAt:s(n.first_verified_at),latestVerifiedAt:s(n.latest_verified_at),signerPublicKey:n.signer_public_key};t.push(C);break;case"passkey":let E={type:n.type,enrolledInMfa:n.enrolled_in_mfa,credentialId:n.credential_id,publicKey:n.public_key,authenticatorName:n.authenticator_name,createdWithDevice:n.created_with_device,createdWithOs:n.created_with_os,createdWithBrowser:n.created_with_browser,firstVerifiedAt:s(n.first_verified_at),latestVerifiedAt:s(n.latest_verified_at)};t.push(E);break;case"telegram":let k={type:n.type,telegramUserId:n.telegram_user_id,firstName:n.first_name,lastName:n.last_name,username:n.username,photoUrl:n.photo_url,firstVerifiedAt:s(n.first_verified_at),latestVerifiedAt:s(n.latest_verified_at)};t.push(k);break;default:if(o(n.type)){let e={type:n.type,subject:n.subject,name:n.name,username:n.username,email:n.email,profilePictureUrl:n.profile_picture_url,firstVerifiedAt:s(n.first_verified_at),latestVerifiedAt:s(n.latest_verified_at)};t.push(e);break}console.warn("Unrecognized account type: ".concat(e,". Please consider upgrading the Privy SDK."))}}return t}(e.linked_accounts),r=l(n,"wallet"),i=l(n,"smart_wallet"),a=l(n,"email"),c=l(n,"phone"),d=l(n,"google_oauth"),u=l(n,"twitter_oauth"),h=l(n,"discord_oauth"),p=l(n,"github_oauth"),f=l(n,"spotify_oauth"),g=l(n,"instagram_oauth"),m=l(n,"tiktok_oauth"),y=l(n,"line_oauth"),b=l(n,"twitch_oauth"),w=l(n,"linkedin_oauth"),x=l(n,"apple_oauth"),C=l(n,"farcaster"),E=l(n,"telegram"),k=e.mfa_methods.map(e=>{let{type:t,verified_at:n}=e;return{type:t,verifiedAt:s(n)}});return{id:e.id,createdAt:s(e.created_at),linkedAccounts:n,email:a&&{address:null==a?void 0:a.address},phone:c&&{number:null==c?void 0:c.number},wallet:r&&{id:r.id,address:r.address,chainType:r.chainType,walletClientType:r.walletClientType,connectorType:r.connectorType,recoveryMethod:r.re
1coveryMethod,imported:r.imported,delegated:r.delegated,walletIndex:r.walletIndex,publicKey:r.publicKey},smartWallet:i&&{address:i.address,smartWalletType:i.smartWalletType,smartWalletVersion:i.smartWalletVersion},google:d&&{subject:d.subject,email:d.email,name:d.name},twitter:u&&{subject:u.subject,username:u.username,name:u.name,profilePictureUrl:u.profilePictureUrl},discord:h&&{subject:h.subject,username:h.username,email:h.email},github:p&&{subject:p.subject,username:p.username,name:p.name,email:p.email},spotify:f&&{subject:f.subject,email:f.email,name:f.name},instagram:g&&{subject:g.subject,username:g.username},tiktok:m&&{subject:m.subject,username:m.username,name:m.name},line:y&&{subject:y.subject,name:y.name,email:y.email,profilePictureUrl:y.profilePictureUrl},twitch:b&&{subject:b.subject,username:b.username},linkedin:w&&{subject:w.subject,name:w.name,email:w.email,vanityName:w.vanityName},apple:x&&{subject:x.subject,email:x.email},farcaster:C&&{fid:C.fid,ownerAddress:C.ownerAddress,displayName:C.displayName,username:C.username,bio:C.bio,pfp:C.pfp,url:C.url,signerPublicKey:C.signerPublicKey},telegram:E&&{telegramUserId:E.telegramUserId,firstName:E.firstName,lastName:E.lastName,username:E.username,photoUrl:E.photoUrl},delegatedWallets:[],mfaMethods:k.map(e=>e.type),hasAcceptedTerms:null!=(t=e.has_accepted_terms)&&t,isGuest:e.is_guest,customMetadata:e.custom_metadata}}let x=e=>!!e.id&&"privy-v2"===e.recoveryMethod,C=(0,n.createContext)({ready:!1,authenticated:!1,user:null,walletConnectors:null,connectWallet:r,login:r,connectOrCreateWallet:r,linkEmail:r,linkPhone:r,linkFarcaster:r,linkWallet:r,startCrossAppAuthFlow:r,linkGoogle:r,linkTwitter:r,linkTwitch:r,linkDiscord:r,linkGithub:r,linkSpotify:r,linkInstagram:r,linkTelegram:r,linkTiktok:r,linkLine:r,linkLinkedIn:r,linkApple:r,linkPasskey:r,updateEmail:r,updatePhone:r,logout:r,getAccessToken:r,unlinkEmail:r,unlinkPhone:r,unlinkWallet:r,unlinkGoogle:r,unlinkTwitter:r,unlinkTwitch:r,unlinkDiscord:r,unlinkGithub:r,unlinkSpotify:r,unlinkInstagram:r,unlinkTiktok:r,unlinkLine:r,unlinkLinkedIn:r,unlinkApple:r,unlinkCrossAppAccount:r,unlinkFarcaster:r,unlinkTelegram:r,unlinkPasskey:r,signMessage:r,signTypedData:r,enrollInMfa:r,initEnrollmentWithSms:r,initEnrollmentWithTotp:r,initEnrollmentWithPasskey:r,promptMfa:r,init:r,submitEnrollmentWithSms:r,submitEnrollmentWithTotp:r,submitEnrollmentWithPasskey:r,unenroll:r,submit:r,cancel:r,sendTransaction:r,signTransaction:r,exportWallet:r,setWalletPassword:r,setWalletRecovery:r,requestFarcasterSignerFromWarpcast:r,getFarcasterSignerPublicKey:r,signFarcasterMessage:r,signMessageWithCrossAppWallet:r,signTypedDataWithCrossAppWallet:r,sendTransactionWithCrossAppWallet:r,signTransactionWithCrossAppWallet:r,isModalOpen:!1,mfaMethods:[]}),E=()=>(0,n.useContext)(C)},934537,e=>{"use strict";e.s(["default",()=>n],934537);var t=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRen
1dering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,n=function(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}(function(e){return t.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&91>e.charCodeAt(2)})},982357,(e,t,n)=>{t.exports=function(e,t,n,r){var i=n?n.call(r,e,t):void 0;if(void 0!==i)return!!i;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var a=Object.keys(e),o=Object.keys(t);if(a.length!==o.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),l=0;l<a.length;l++){var c=a[l];if(!s(c))return!1;var d=e[c],u=t[c];if(!1===(i=n?n.call(r,d,u,c):void 0)||void 0===i&&d!==u)return!1}return!0}},997053,722262,166953,57159,911347,599509,e=>{"use strict";e.s(["createGlobalStyle",()=>tm,"css",()=>th,"keyframes",()=>ty,"styled",()=>tf],997053);var t,n=e.i(247167),r=function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};Object.create;function i(e,t,n){if(n||2==arguments.length)for(var r,i=0,a=t.length;i<a;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}Object.create,"function"==typeof SuppressedError&&SuppressedError,e.i(934537);var a=e.i(271645),o=e.i(982357),s="-ms-",l="-moz-",c="-webkit-",d="comm",u="rule",h="decl",p="@keyframes",f=Math.abs,g=String.fromCharCode,m=Object.assign;function y(e,t){return(e=t.exec(e))?e[0]:e}function b(e,t,n){return e.replace(t,n)}function w(e,t,n){return e.indexOf(t,n)}function x(e,t){return 0|e.charCodeAt(t)}function C(e,t,n){return e.slice(t,n)}function E(e){return e.length}function k(e,t){return t.push(e),e}function S(e,t){return e.filter(function(e){return!y(e,t)})}var I=1,A=1,T=0,_=0,j=0,P="";function $(e,t,n,r,i,a,o,s){return{value:e,root:t,parent:n,type:r,props:i,children:a,line:I,column:A,length:o,return:"",siblings:s}}function N(e,t){return m($("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function O(e){for(;e.root;)e=N(e.root,{children:[e]});k(e,e.siblings)}function M(){return j=_<T?x(P,_++):0,A++,10===j&&(A=1,I++),j}function R(){return x(P,_)}function L(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function D(e){var t,n;return(t=_-1,n=function e(t){for(;M();)switch(j){case t:return _;case 34:case 39:34!==t&&39!==t&&e(j);break;case 40:41===t&&e(t);break;case 92:M()}return _}(91===e?e+2:40===e?e+1:e),C(P,t,n)).trim()}function F(e,t){for(var n="",r=0;r<e.length;r++)n+=t(e[r],r,e,t)||"";return n}function U(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case h:return e.return=e.return||e.value;case d:return"";case p:return e.return=e.value+"{"+F(e.children,r)+"}";case u:if(!E(e.value=e.props.join(",")))return""}return E(n=F(e.children,r))?e.return=e.value+"{"+n+"}":""}function B(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case h:e.return=function e(t,n,r){var i;switch(i=n,45^x(t,0)?(((i<<2^x(t,0))<<2^x(t,1))<<2^x(t,2))<<2^x(t,3):0){case 5103:return c+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return c+t+t;case 4789:return l+t+t;
vendor: 12,025 bytes, line 1
1case 5349:case 4246:case 4810:case 6968:case 2756:return c+t+l+t+s+t+t;case 5936:switch(x(t,n+11)){case 114:return c+t+s+b(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return c+t+s+b(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return c+t+s+b(t,/[svh]\w+-[tblr]{2}/,"lr")+t}case 6828:case 4268:case 2903:return c+t+s+t+t;case 6165:return c+t+s+"flex-"+t+t;case 5187:return c+t+b(t,/(\w+).+(:[^]+)/,c+"box-$1$2"+s+"flex-$1$2")+t;case 5443:return c+t+s+"flex-item-"+b(t,/flex-|-self/g,"")+(y(t,/flex-|baseline/)?"":s+"grid-row-"+b(t,/flex-|-self/g,""))+t;case 4675:return c+t+s+"flex-line-pack"+b(t,/align-content|flex-|-self/g,"")+t;case 5548:return c+t+s+b(t,"shrink","negative")+t;case 5292:return c+t+s+b(t,"basis","preferred-size")+t;case 6060:return c+"box-"+b(t,"-grow","")+c+t+s+b(t,"grow","positive")+t;case 4554:return c+b(t,/([^-])(transform)/g,"$1"+c+"$2")+t;case 6187:return b(b(b(t,/(zoom-|grab)/,c+"$1"),/(image-set)/,c+"$1"),t,"")+t;case 5495:case 3959:return b(t,/(image-set\([^]*)/,c+"$1$`$1");case 4968:return b(b(t,/(.+:)(flex-)?(.*)/,c+"box-pack:$3"+s+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+c+t+t;case 4200:if(!y(t,/flex-|baseline/))return s+"grid-column-align"+C(t,n)+t;break;case 2592:case 3360:return s+b(t,"template-","")+t;case 4384:case 3616:if(r&&r.some(function(e,t){return n=t,y(e.props,/grid-\w+-end/)}))return~w(t+(r=r[n].value),"span",0)?t:s+b(t,"-start","")+t+s+"grid-row-span:"+(~w(r,"span",0)?y(r,/\d+/):y(r,/\d+/)-y(t,/\d+/))+";";return s+b(t,"-start","")+t;case 4896:case 4128:return r&&r.some(function(e){return y(e.props,/grid-\w+-start/)})?t:s+b(b(t,"-end","-span"),"span ","")+t;case 4095:case 3583:case 4068:case 2532:return b(t,/(.+)-inline(.+)/,c+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(E(t)-1-n>6)switch(x(t,n+1)){case 109:if(45!==x(t,n+4))break;case 102:return b(t,/(.+:)(.+)-([^]+)/,"$1"+c+"$2-$3$1"+l+(108==x(t,n+3)?"$3":"$2-$3"))+t;case 115:return~w(t,"stretch",0)?e(b(t,"stretch","fill-available"),n,r)+t:t}break;case 5152:case 5920:return b(t,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(e,n,r,i,a,o,l){return s+n+":"+r+l+(i?s+n+"-span:"+(a?o:o-r)+l:"")+t});case 4949:if(121===x(t,n+6))return b(t,":",":"+c)+t;break;case 6444:switch(x(t,45===x(t,14)?18:11)){case 120:return b(t,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+c+(45===x(t,14)?"inline-":"")+"box$3$1"+c+"$2$3$1"+s+"$2box$3")+t;case 100:return b(t,":",":"+s)+t}break;case 5719:case 2647:case 2135:case 3927:case 2391:return b(t,"scroll-","scroll-snap-")+t}return t}(e.value,e.length,n);return;case p:return F([N(e,{value:b(e.value,"@","@"+c)})],r);case u:if(e.length){var i,a;return i=n=e.props,a=function(t){switch(y(t,r=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":O(N(e,{props:[b(t,/:(read-\w+)/,":"+l+"$1")]})),O(N(e,{props:[t]})),m(e,{props:S(n,r)});break;case"::placeholder":O(N(e,{props:[b(t,/:(plac\w+)/,":"+c+"input-$1")]})),O(N(e,{props:[b(t,/:(plac\w+)/,":"+l+"$1")]})),O(N(e,{props:[b(t,/:(plac\w+)/,s+"input-$1")]})),O(N(e,{props:[t]})),m(e,{props:S(n,r)})}return""},i.map(a).join("")}}}function z(e,t,n,r,i,a,o,s,l,c,d,h){for(var p=i-1,g=0===i?a:[""],m=g.length,y=0,w=0,x=0;y<r;++y)for(var E=0,k=C(e,p+1,p=f(w=o[y])),S=e;E<m;++E)(S=(w>0?g[E]+" "+k:b(k,/&\f/g,g[E])).trim())&&(l[x++]=S);return $(e,t,n,0===i?u:s,l,c,d,h)}function W(e,t,n,r,i){return $(e,t,n,h,C(e,0,r),C(e,r+1,-1),r,i)}var q={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},H=void 0!==n.default&&void 0!==n.default.env&&(n.default.env.REACT_APP_SC_ATTR||n.default.env.SC_ATTR)||"data-styled",V="active",G="data-styled-version",K="6.1.19",Y="/*!sc*/\n",Z="undefined"!=typeof window&&"undefined"!=typeof document,J=!!("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:void 0!==n.default&&void 0!==n.default.env&&void 0!==n.default.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==n.default.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==n.default.env.REACT_APP_SC_DISABLE_SPEEDY&&n.default.env.REACT_APP_SC_DISABLE_SPEEDY:void 0!==n.default&&void 0!==n.default.env&&void 0!==n.default.env.SC_DISABLE_SPEEDY&&""!==n.default.env.SC_DISABLE_SPEEDY&&"false"!==n.default.env.SC_DISABLE_SPEEDY&&n.default.env.SC_DISABLE_SPEEDY),Q={},X=Object.freeze([]),ee=Object.freeze({});function et(e,t,n){return void 0===n&&(n=ee),e.theme!==n.theme&&e.theme||t||n.theme}var en=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),er=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,ei=/(^-|-$)/g;function ea(e){return e.replace(er,"-").replace(ei,"")}var eo=/(a)(d)/gi,es=function(e){return String.fromCharCode(e+(e>25?39:97))};function el(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=es(t%52)+n;return(es(t%52)+n).replace(eo,"$1-$2")}var ec,ed=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},eu=function(e){return ed(5381,e)};function eh(e){return el(eu(e)>>>0)}function ep(e){return"string"==typeof e}var ef="function"==typeof Symbol&&Symbol.for,eg=ef?Symbol.for("react.memo"):60115,em=ef?Symbol.for("react.forward_ref"):60112,ey={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},ev={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},eb={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},ew=((ec={})[em]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},ec[eg]=eb,ec);function ex(e){return("type"in e&&e.type.$$typeof)===eg?eb:"$$typeof"in e?ew[e.$$typeof]:ey}var eC=Object.defineProperty,eE=Object.getOwnPropertyNames,ek=Object.getOwnPropertySymbols,eS=Object.getOwnPropertyDescriptor,eI=Object.getPrototypeOf,eA=Object.prototype;function eT(e){return"function"==typeof e}function e_(e){return"object"==typeof e&&"styledComponentId"in e}function ej(e,t){return e&&t?"".concat(e," ").concat(t):e||t||""}function eP(e,t){if(0===e.length)return"";for(var n=e[0],r=1;r<e.length;r++)n+=t?t+e[r]:e[r];return n}function e$(e){return null!==e&&"object"==typeof e&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function eN(e,t){Object.defineProperty(e,"toString",{value:t})}function eO(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(e," for more information.").concat(t.length>0?" Args: ".concat(t.join(", ")):""))}var eM=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}return e.prototype.indexOfGroup=function(e){for(var t=0,n=0;n<e;n++)t+=this.groupSizes[n];return t},e.prototype.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,i=r;e>=i;)if((i<<=1)<0)throw eO(16,"".concat(e));this.groupSizes=new Uint32Array(i),this.groupSizes.set(n),this.length=i;for(var a=r;a<i;a++)this.groupSizes[a]=0}for(var o=this.indexOfGroup(e+1),s=(a=0,t.length);a<s;a++)this.tag.insertRule(o,t[a])&&(this.groupSizes[e]++,o++)},e.prototype.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],n=this.indexOfGroup(e),r=n+t;this.groupSizes[e]=0;for(var i=n;i<r;i++)this.tag.deleteRule(n)}},e.prototype.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),i=r+n,a=r;a<i;a++)t+="".concat(this.tag.getRule(a)).concat(Y);return t},e}(),eR=new Map,eL=new Map,eD=1,eF=function(e){if(eR.has(e))return eR.get(e);for(;eL.has(eD);)eD++;var t=eD++;return eR.set(e,t),eL.set(t,e),t},eU=function(e,t){eD=t+1,eR.set(e,t),eL.set(t,e)},eB="style[".concat(H,"][").concat(G,'="').concat(K,'"]'),ez=new RegExp("^".concat(H,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),eW=function(e,t,n){for(var r,i=n.split(","),a=0,o=i.length;a<o;a++)(r=i[a])&&e.registerName(t,r)},eq=function(e,t){for(var n,r=(null!=(n=t.textContent)?n:"").split(Y),i=[],a=0,o=r.length;a<o;a++){var s=r[a].trim();if(s){var l=s.match(ez);if(l){var c=0|parseInt(l[1],10),d=l[2];0!==c&&(eU(d,c),eW(e,d,l[3]),e.getTag().insertRules(c,i)),i.length=0}else i.push(s)}}},eH=function(e){for(var t=document.querySelectorAll(eB),n=0,r=t.length;n<r;n++){var i=t[n];i&&i.getAttribute(H)!==V&&(eq(e,i),i.parentNode&&i.parentNode.removeChild(i))}};function eV(){return"undefined"!=typeof __webpack_nonce__?__webpack_nonce__:null}var eG=function(e){var t,n=document.head,r=e||n,i=document.createElement("style"),a=(t=Array.from(r.querySelectorAll("style[".concat(H,"]"))))[t.length-1],o=void 0!==a?a.nextSibling:null;i.setAttribute(H,V),i.setAttribute(G,K);var s=eV();return s&&i.setAttribute("nonce",s),r.insertBefore(i,o),i},eK=function(){function e(e){this.element=eG(e),this.element.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n<r;n++){var i=t[n];if(i.ownerNode===e)return i}throw eO(17)}(this.element),this.length=0}return e.prototype.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}},e.prototype.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},e.prototype.getRule=function(e){var t=this.sheet.cssRules[e];return t&&t.cssText?t.cssText:""},e}(),eY=function(){function e(e){this.element=eG(e),this.nodes=this.element.childNodes,this.length=0}return e.prototype.insertRule=function(e,t){if(e<=this.length&&e>=0){var n=document.createTextNode(t);return this.element.insertBefore(n,this.nodes[e]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},e.prototype.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),eZ=function(){function e(e){this.rules=[],this.length=0}return e.prototype.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},e.prototype.deleteRule=function(e){this.rules.splice(e,1),this.length--},e.prototype.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),eJ=Z,eQ={isServer:!Z,useCSSOMInjection:!J},eX=function(){function e(e,t,n){void 0===e&&(e=ee),void 0===t&&(t={});var i=this;this.options=r(r({},eQ),e),this.gs=t,this.names=new Map(n),this.server=!!e.isServer,!this.server&&Z&&eJ&&(eJ=!1,eH(this)),eN(this,function(){for(var e=i.getTag(),t=e.length,n="",r=0;r<t;r++)!function(t){var r=eL.get(t);if(void 0===r)return;var a=i.names.get(r),o=e.getGroup(t);
1if(void 0!==a&&a.size&&0!==o.length){var s="".concat(H,".g").concat(t,'[id="').concat(r,'"]'),l="";void 0!==a&&a.forEach(function(e){e.length>0&&(l+="".concat(e,","))}),n+="".concat(o).concat(s,'{content:"').concat(l,'"}').concat(Y)}}(r);return n})}return e.registerId=function(e){return eF(e)},e.prototype.rehydrate=function(){!this.server&&Z&&eH(this)},e.prototype.reconstructWithOptions=function(t,n){return void 0===n&&(n=!0),new e(r(r({},this.options),t),this.gs,n&&this.names||void 0)},e.prototype.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},e.prototype.getTag=function(){var e,t,n;return this.tag||(this.tag=(t=(e=this.options).useCSSOMInjection,n=e.target,new eM(e.isServer?new eZ(n):t?new eK(n):new eY(n))))},e.prototype.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},e.prototype.registerName=function(e,t){if(eF(e),this.names.has(e))this.names.get(e).add(t);else{var n=new Set;n.add(t),this.names.set(e,n)}},e.prototype.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(eF(e),n)},e.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},e.prototype.clearRules=function(e){this.getTag().clearGroup(eF(e)),this.clearNames(e)},e.prototype.clearTag=function(){this.tag=void 0},e}(),e0=/&/g,e1=/^\s*\/\/.*$/gm;function e2(e){var t,n,r,i=void 0===e?ee:e,a=i.options,o=void 0===a?ee:a,s=i.plugins,l=void 0===s?X:s,c=function(e,r,i){return i.startsWith(n)&&i.endsWith(n)&&i.replaceAll(n,"").length>0?".".concat(t):e},h=l.slice();h.push(function(e){e.type===u&&e.value.includes("&")&&(e.props[0]=e.props[0].replace(e0,n).replace(r,c))}),o.prefix&&h.push(B),h.push(U);var p=function(e,i,a,s){void 0===i&&(i=""),void 0===a&&(a=""),void 0===s&&(s="&"),t=s,n=i,r=RegExp("\\".concat(n,"\\b"),"g");var l,c,u,p,m,y,S=e.replace(e1,""),N=(m=function e(t,n,r,i,a,o,s,l,c){for(var u,h,p,m,y=0,S=0,T=s,N=0,O=0,F=0,U=1,B=1,q=1,H=0,V="",G=a,K=o,Y=i,Z=V;B;)switch(F=H,H=M()){case 40:if(108!=F&&58==x(Z,T-1)){-1!=w(Z+=b(D(H),"&","&\f"),"&\f",f(y?l[y-1]:0))&&(q=-1);break}case 34:case 39:case 91:Z+=D(H);break;case 9:case 10:case 13:case 32:Z+=function(e){for(;j=R();)if(j<33)M();else break;return L(e)>2||L(j)>3?"":" "}(F);break;case 92:Z+=function(e,t){for(var n;--t&&M()&&!(j<48)&&!(j>102)&&(!(j>57)||!(j<65))&&(!(j>70)||!(j<97)););return n=_+(t<6&&32==R()&&32==M()),C(P,e,n)}(_-1,7);continue;case 47:switch(R()){case 42:case 47:k((u=function(e,t){for(;M();)if(e+j===57)break;else if(e+j===84&&47===R())break;return"/*"+C(P,t,_-1)+"*"+g(47===e?e:M())}(M(),_),h=n,p=r,m=c,$(u,h,p,d,g(j),C(u,2,-2),0,m)),c);break;default:Z+="/"}break;case 123*U:l[y++]=E(Z)*q;case 125*U:case 59:case 0:switch(H){case 0:case 125:B=0;case 59+S:-1==q&&(Z=b(Z,/\f/g,"")),O>0&&E(Z)-T&&k(O>32?W(Z+";",i,r,T-1,c):W(b(Z," ","")+";",i,r,T-2,c),c);break;case 59:Z+=";";default:if(k(Y=z(Z,n,r,y,S,a,l,V,G=[],K=[],T,o),o),123===H)if(0===S)e(Z,n,Y,Y,G,o,T,l,K);else switch(99===N&&110===x(Z,3)?100:N){case 100:case 108:case 109:case 115:e(t,Y,Y,i&&k(z(t,Y,Y,0,0,a,l,V,a,G=[],T,K),K),a,K,T,l,i?G:K);break;default:e(Z,Y,Y,Y,[""],K,0,l,K)}}y=S=O=0,U=q=1,V=Z="",T=s;break;case 58:T=1+E(Z),O=F;default:if(U<1){if(123==H)--U;else if(125==H&&0==U++&&125==(j=_>0?x(P,--_):0,A--,10===j&&(A=1,I--),j))continue}switch(Z+=g(H),H*U){case 38:q=S>0?1:(Z+="\f",-1);break;case 44:l[y++]=(E(Z)-1)*q,q=1;break;case 64:45===R()&&(Z+=D(M())),N=R(),S=T=E(V=Z+=function(e){for(;!L(R());)M();return C(P,e,_)}(_)),H++;break;case 45:45===F&&2==E(Z)&&(U=0)}}return o}("",null,null,null,[""],(p=u=a||i?"".concat(a," ").concat(i," { ").concat(S," }"):S,I=A=1,T=E(P=p),_=0,u=[]),0,[0],u),P="",m);o.namespace&&(N=function e(t,n){return t.map(function(t){return"rule"===t.type&&(t.value="".concat(n," ").concat(t.value),t.value=t.value.replaceAll(",",",".concat(n," ")),t.props=t.props.map(function(e){return"".concat(n," ").concat(e)})),Array.isArray(t.children)&&"@keyframes"!==t.type&&(t.children=e(t.children,n)),t})}(N,o.namespace));var O=[];return F(N,(c=(l=h.concat((y=function(e){return O.push(e)},function(e){!e.root&&(e=e.return)&&y(e)}))).length,function(e,t,n,r){for(var i="",a=0;a<c;a++)i+=l[a](e,t,n,r)||"";return i})),O};return p.hash=l.length?l.reduce(function(e,t){return t.name||eO(15),ed(e,t.name)},5381).toString():"",p}var e3=new eX,e5=e2(),e4=a.default.createContext({shouldForwardProp:void 0,styleSheet:e3,stylis:e5}),e6=(e4.Consumer,a.default.createContext(void 0));function e8(){return(0,a.useContext)(e4)}function e9(e){var t=(0,a.useState)(e.stylisPlugins),n=t[0],r=t[1],i=e8().styleSheet,s=(0,a.useMemo)(function(){var t=i;return e.sheet?t=e.sheet:e.target&&(t=t.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t},[e.disableCSSOMInjection,e.sheet,e.target,i]),l=(0,a.useMemo)(function(){return e2({options:{namespace:e.namespace,prefix:e.enableVendorPrefixes},plugins:n})},[e.enableVendorPrefixes,e.namespace,n]);(0,a.useEffect)(function(){(0,o.default)(n,e.stylisPlugins)||r(e.stylisPlugins)},[e.stylisPlugins]);var c=(0,a.useMemo)(function(){return{shouldForwardProp:e.shouldForwardProp,styleSheet:s,stylis:l}},[e.shouldForwardProp,s,l]);return a.default.createElement(e4.Provider,{value:c},a.default.createElement(e6.Provider,{value:l},e.children))}var e7=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=e5);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,"@keyframes"))},this.name=e,this.id="sc-keyframes-".concat(e),this.rules=t,eN(this,function(){throw eO(12,String(n.name))})}return e.prototype.getName=function(e){return void 0===e&&(e=e5),this.name+e.hash},e}();function te(e){for(var t="",n=0;n<e.length;n++){var r=e[n];if(1===n&&"-"===r&&"-"===e[0])return e;r>="A"&&r<="Z"?t+="-"+r.toLowerCase():t+=r}return t.startsWith("ms-")?"-"+t:t}var tt=function(e){return null==e||!1===e||""===e},tn=function(e){var t=[];for(var n in e){var r=e[n];e.hasOwnProperty(n)&&!tt(r)&&(Array.isArray(r)&&r.isCss||eT(r)?t.push("".concat(te(n),":"),r,";"):e$(r)?t.push.apply(t,i(i(["".concat(n," {")],tn(r),!1),["}"],!1)):t.push("".concat(te(n),": ").concat(null==r||"boolean"==typeof r||""===r?"":"number"!=typeof r||0===r||n in q||n.startsWith("--")?String(r).trim():"".concat(r,"px"),";")))}return t};function tr(e,t,n,r){if(tt(e))return[];if(e_(e))return[".".concat(e.styledComponentId)];if(eT(e))return!eT(e)||e.prototype&&e.prototype.isReactComponent||!t?[e]:tr(e(t),t,n,r);return e instanceof e7?n?(e.inject(n,r),[e.getName(r)]):[e]:e$(e)?tn(e):Array.isArray(e)?Array.prototype.concat.apply(X,e.map(function(e){return tr(e,t,n,r)})):[e.toString()]}function ti(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(eT(n)&&!e_(n))return!1}return!0}var ta=eu(K),to=function(){function e(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic=(void 0===n||n.isStatic)&&ti(e),this.componentId=t,this.baseHash=ed(ta,t),this.baseStyle=n,eX.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,n){var r=this.baseStyle?this.baseStyle.generateAndInjectStyles(e,t,n
vendor: 4,134 bytes, line 1
1):"";if(this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(this.componentId,this.staticRulesId))r=ej(r,this.staticRulesId);else{var i=eP(tr(this.rules,e,t,n)),a=el(ed(this.baseHash,i)>>>0);if(!t.hasNameForId(this.componentId,a)){var o=n(i,".".concat(a),void 0,this.componentId);t.insertRules(this.componentId,a,o)}r=ej(r,a),this.staticRulesId=a}else{for(var s=ed(this.baseHash,n.hash),l="",c=0;c<this.rules.length;c++){var d=this.rules[c];if("string"==typeof d)l+=d;else if(d){var u=eP(tr(d,e,t,n));s=ed(s,u+c),l+=u}}if(l){var h=el(s>>>0);t.hasNameForId(this.componentId,h)||t.insertRules(this.componentId,h,n(l,".".concat(h),void 0,this.componentId)),r=ej(r,h)}}return r},e}(),ts=a.default.createContext(void 0);ts.Consumer;var tl={};function tc(e,t,n){var i,o,s,l,c=e_(e),d=!ep(e),u=t.attrs,h=void 0===u?X:u,p=t.componentId,f=void 0===p?(i=t.displayName,o=t.parentComponentId,tl[s="string"!=typeof i?"sc":ea(i)]=(tl[s]||0)+1,l="".concat(s,"-").concat(eh(K+s+tl[s])),o?"".concat(o,"-").concat(l):l):p,g=t.displayName,m=void 0===g?ep(e)?"styled.".concat(e):"Styled(".concat(e.displayName||e.name||"Component",")"):g,y=t.displayName&&t.componentId?"".concat(ea(t.displayName),"-").concat(t.componentId):t.componentId||f,b=c&&e.attrs?e.attrs.concat(h).filter(Boolean):h,w=t.shouldForwardProp;if(c&&e.shouldForwardProp){var x=e.shouldForwardProp;if(t.shouldForwardProp){var C=t.shouldForwardProp;w=function(e,t){return x(e,t)&&C(e,t)}}else w=x}var E=new to(n,y,c?e.componentStyle:void 0);function k(e,t){return function(e,t,n){var i,o=e.attrs,s=e.componentStyle,l=e.defaultProps,c=e.foldedComponentIds,d=e.styledComponentId,u=e.target,h=a.default.useContext(ts),p=e8(),f=e.shouldForwardProp||p.shouldForwardProp,g=et(t,h,l)||ee,m=function(e,t,n){for(var i,a=r(r({},t),{className:void 0,theme:n}),o=0;o<e.length;o+=1){var s=eT(i=e[o])?i(a):i;for(var l in s)a[l]="className"===l?ej(a[l],s[l]):"style"===l?r(r({},a[l]),s[l]):s[l]}return t.className&&(a.className=ej(a.className,t.className)),a}(o,t,g),y=m.as||u,b={};for(var w in m)void 0===m[w]||"$"===w[0]||"as"===w||"theme"===w&&m.theme===g||("forwardedAs"===w?b.as=m.forwardedAs:f&&!f(w,y)||(b[w]=m[w]));var x=(i=e8(),s.generateAndInjectStyles(m,i.styleSheet,i.stylis)),C=ej(c,d);return x&&(C+=" "+x),m.className&&(C+=" "+m.className),b[ep(y)&&!en.has(y)?"class":"className"]=C,n&&(b.ref=n),(0,a.createElement)(y,b)}(S,e,t)}k.displayName=m;var S=a.default.forwardRef(k);return S.attrs=b,S.componentStyle=E,S.displayName=m,S.shouldForwardProp=w,S.foldedComponentIds=c?ej(e.foldedComponentIds,e.styledComponentId):"",S.styledComponentId=y,S.target=c?e.target:e,Object.defineProperty(S,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=c?function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=0;r<t.length;r++)!function e(t,n,r){if(void 0===r&&(r=!1),!r&&!e$(t)&&!Array.isArray(t))return n;if(Array.isArray(n))for(var i=0;i<n.length;i++)t[i]=e(t[i],n[i]);else if(e$(n))for(var i in n)t[i]=e(t[i],n[i]);return t}(e,t[r],!0);return e}({},e.defaultProps,t):t}}),eN(S,function(){return".".concat(S.styledComponentId)}),d&&function e(t,n,r){if("string"!=typeof n){if(eA){var i=eI(n);i&&i!==eA&&e(t,i,r)}var a=eE(n);ek&&(a=a.concat(ek(n)));for(var o=ex(t),s=ex(n),l=0;l<a.length;++l){var c=a[l];if(!(c in ev||r&&r[c]||s&&c in s||o&&c in o)){var d=eS(n,c);try{eC(t,c,d)}catch(e){}}}}return t}(S,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),S}function td(e,t){for(var n=[e[0]],r=0,i=t.length;r<i;r+=1)n.push(t[r],e[r+1]);return n}var tu=function(e){return Object.assign(e,{isCss:!0})};function th(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return eT(e)||e$(e)?tu(tr(td(X,i([e],t,!0)))):0===t.length&&1===e.length&&"string"==typeof e[0]?tr(e):tu(tr(td(e,t)))}var tp=function(e){return function e(t,n,a){if(void 0===a&&(a=ee),!n)throw eO(1,n);var o=function(e){for(var r=[],o=1;o<arguments.length;o++)r[o-1]=arguments[o];return t(n,a,th.apply(void 0,i([e],r,!1)))};return o.attrs=function(i){return e(t,n,r(r({}
1,a),{attrs:Array.prototype.concat(a.attrs,i).filter(Boolean)}))},o.withConfig=function(i){return e(t,n,r(r({},a),i))},o}(tc,e)},tf=tp;en.forEach(function(e){tf[e]=tp(e)});var tg=function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=ti(e),eX.registerId(this.componentId+1)}return e.prototype.createStyles=function(e,t,n,r){var i=r(eP(tr(this.rules,t,n,r)),""),a=this.componentId+e;n.insertRules(a,a,i)},e.prototype.removeStyles=function(e,t){t.clearRules(this.componentId+e)},e.prototype.renderStyles=function(e,t,n,r){e>2&&eX.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,r)},e}();function tm(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var o=th.apply(void 0,i([e],t,!1)),s="sc-global-".concat(eh(JSON.stringify(o))),l=new tg(o,s),c=function(e){var t=e8(),n=a.default.useContext(ts),r=a.default.useRef(t.styleSheet.allocateGSInstance(s)).current;return t.styleSheet.server&&d(r,e,t.styleSheet,n,t.stylis),a.default.useLayoutEffect(function(){if(!t.styleSheet.server)return d(r,e,t.styleSheet,n,t.stylis),function(){return l.removeStyles(r,t.styleSheet)}},[r,e,t.styleSheet,n,t.stylis]),null};function d(e,t,n,i,a){if(l.isStatic)l.renderStyles(e,Q,n,a);else{var o=r(r({},t),{theme:et(t,i,c.defaultProps)});l.renderStyles(e,o,n,a)}}return a.default.memo(c)}function ty(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=eP(th.apply(void 0,i([e],t,!1)));return new e7(eh(r),r)}!function(){function e(){var e=this;this._emitSheetCSS=function(){var t=e.instance.toString();if(!t)return"";var n=eV(),r=eP([n&&'nonce="'.concat(n,'"'),"".concat(H,'="true"'),"".concat(G,'="').concat(K,'"')].filter(Boolean)," ");return"<style ".concat(r,">").concat(t,"</style>")},this.getStyleTags=function(){if(e.sealed)throw eO(2);return e._emitSheetCSS()}
1,this.getStyleElement=function(){if(e.sealed)throw eO(2);var t,n=e.instance.toString();if(!n)return[];var i=((t={})[H]="",t[G]=K,t.dangerouslySetInnerHTML={__html:n},t),o=eV();return o&&(i.nonce=o),[a.default.createElement("style",r({},i,{key:"sc-0-0"}))]},this.seal=function(){e.sealed=!0},this.instance=new eX({isServer:!0}),this.sealed=!1}e.prototype.collectStyles=function(e){if(this.sealed)throw eO(2);return a.default.createElement(e9,{sheet:this.instance},e)},e.prototype.interleaveWithNodeStream=function(e){throw eO(3)}}(),e.s(["constructURL",()=>tv],722262);let tv=e=>{let{origin:t,path:n,query:r={},hash:i={}}=e,a=new URL(n,t.endsWith("/")?t:"".concat(t,"/"));for(let[e,t]of Object.entries(r))void 0!==t&&a.searchParams.set(e,t);let o=Object.entries(i);if(o.length>0){let e=new URLSearchParams;for(let[t,n]of o)void 0!==n&&e.append(t,n);a.hash=e.toString()}return a.href};function tb(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name}function tw(e,t){return!!Array.isArray(t)&&(0===t.length||(e?t.every(e=>"string"==typeof e):t.every(e=>Number.isSafeInteger(e))))}function tx(e,t){if("string"!=typeof t)throw Error("".concat(e,": string expected"));return!0}function tC(e){if(!Number.isSafeInteger(e))throw Error("invalid integer: ".concat(e))}function tE(e){if(!Array.isArray(e))throw Error("array expected")}function tk(e,t){if(!tw(!0,t))throw Error("".concat(e,": array of strings expected"))}function tS(e,t){if(!tw(!1,t))throw Error("".concat(e,": array of numbers expected"))}function tI(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];let r=e=>e,i=(e,t)=>n=>e(t(n));return{encode:t.map(e=>e.encode).reduceRight(i,r),decode:t.map(e=>e.decode).reduce(i,r)}}function tA(e){let t="string"==typeof e?e.split(""):e,n=t.length;tk("alphabet",t);let r=new Map(t.map((e,t)=>[e,t]));return{encode:r=>(tE(r),r.map(r=>{if(!Number.isSafeInteger(r)||r<0||r>=n)throw Error('alphabet.encode: digit index outside alphabet "'.concat(r,'". Allowed: ').concat(e));return t[r]})),decode:t=>(tE(t),t.map(t=>{tx("alphabet.decode",t);let n=r.get(t);if(void 0===n)throw Error('Unknown letter: "'.concat(t,'". Allowed: ').concat(e));return n}))}}function tT(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return tx("join",e),{encode:t=>(tk("join.decode",t),t.join(e)),decode:t=>(tx("join.decode",t),t.split(e))}}function t_(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"=";return tC(e),tx("padding",t),{encode(n){for(tk("padding.encode",n);n.length*e%8;)n.push(t);return n},decode(n){tk("padding.decode",n);let r=n.length;if(r*e%8)throw Error("padding: invalid, string should have whole number of bytes");for(;r>0&&n[r-1]===t;r--)if((r-1)*e%8==0)throw Error("padding: invalid, string has too much padding");return n.slice(0,r)}}}function tj(e,t,n){if(t<2)throw Error("convertRadix: invalid from=".concat(t,", base cannot be less than 2"));if(n<2)throw Error("convertRadix: invalid to=".concat(n,", base cannot be less than 2"));if(tE(e),!e.length)return[];let r=0,i=[],a=Array.from(e,e=>{if(tC(e),e<0||e>=t)throw Error("invalid integer: ".concat(e));return e}),o=a.length;for(;;){let e=0,s=!0;for(let i=r;i<o;i++){let o=a[i],l=t*e,c=l+o;if(!Number.isSafeInteger(c)||l/t!==e||c-o!==l)throw Error("convertRadix: carry overflow");let d=c/n;e=c%n;let u=Math.floor(d);if(a[i]=u,!Number.isSafeInteger(u)||u*n+e!==c)throw Error("convertRadix: carry overflow");s&&(u?s=!1:r=i)}if(i.push(e),s)break}for(let t=0;t<e.length-1&&0===e[t];t++)i.push(0);return i.reverse()}e.s(["base32",()=>tR,"base64",()=>tL],166953);let tP=(e,t)=>0===t?e:tP(t,e%t),t$=(e,t)=>e+(t-tP(e,t)),tN=(()=>{let e=[];for(let t=0;t<40;t++)e.push(2**t);return e})();function tO(e,t,n,r){if(tE(e),t<=0||t>32)throw Error("convertRadix2: wrong from=".concat(t));if(n<=0||n>32)throw Error("convertRadix2: wrong to=".concat(n));if(t$(t,n)>32)throw Error("convertRadix2: carry overflow from=".concat(t," to=").concat(n," carryBits=").concat(t$(t,n)));let i=0,a=0,o=tN[t],s=tN[n]-1,l=[];for(let r of e){if(tC(r),r>=o)throw Error("convertRadix2: invalid data word=".concat(r," from=").concat(t));if(i=i<<t|r,a+t>32)throw Error("convertRadix2: carry overflow pos=".concat(a," from=").concat(t));for(a+=t;a>=n;a-=n)l.push((i>>a-n&s)>>>0);let e=tN[a];if(void 0===e)throw Error("invalid carry");i&=e-1}if(i=i<<n-a&s,!r&&a>=t)throw Error("Excess padding");if(!r&&i>0)throw Error("Non-zero padding: ".concat(i));return r&&a>0&&l.push(i>>>0),l}function tM(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(tC(e),e<=0||e>32)throw Error("radix2: bits should be in (0..32]");if(t$(8,e)>32||t$(e,8)>32)throw Error("radix2: carry overflow");return{encode:n=>{if(!tb(n))throw Error("radix2.encode input should be Uint8Array");return tO(Array.from(n),8,e,!t)},decode:n=>(tS("radix2.decode",n),Uint8Array.from(tO(n,e,8,t)))}}let tR=tI(tM(5),tA("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"),t_(5),tT("")),tL="function"==typeof Uint8Array.from([]).toBase64&&"function"==typeof Uint8Array.fromBase64?{encode:e=>((function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(!tb(e))throw Error("Uint8Array expected");if(n.length>0&&!n.includes(e.length))throw Error("Uint8Array expected of length "+n+", got length="+e.length)})(e),e.toBase64()),decode:e=>((e,t)=>{if(tx("base64",e),e.length>0&&!(t?/^[A-Za-z0-9=_-]+$/:/^[A-Za-z0-9=+/]+$/).test(e))throw Error("invalid base64");return Uint8Array.fromBase64(e,{alphabet:t?"base64url":"base64",lastChunkHandling:"strict"})})(e,!1)}:tI(tM(6),tA("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
1+/"),t_(6),tT("")),tD=((t=58,tC(58)),tI(tA("qpzry9x8gf2tvdw0s3jn54khce6mua7l"),tT("")));"function"==typeof Uint8Array.from([]).toHex&&"function"==typeof Uint8Array.fromHex||(e=>{if("string"!=typeof e||e.length%2!=0)throw TypeError("hex.decode: expected string, got ".concat(typeof e," with length ").concat(e.length));return e.toLowerCase()}),e.s(["createWalletClient",()=>nE],57159);var tF=e.i(363625),tU=e.i(975948),tB=e.i(675107);async function tz(e,t){let{chain:n}=t,{id:r,name:i,nativeCurrency:a,rpcUrls:o,blockExplorers:s}=n;await e.request({method:"wallet_addEthereumChain",params:[{chainId:(0,tB.numberToHex)(r),chainName:i,nativeCurrency:a,rpcUrls:o.default.http,blockExplorerUrls:s?Object.values(s).map(e=>{let{url:t}=e;return t}):void 0}]},{dedupe:!0,retryCount:0})}var tW=e.i(289169),tq=e.i(888794),tH=e.i(823838);async function tV(e){var t;return(null==(t=e.account)?void 0:t.type)==="local"?[e.account.address]:(await e.request({method:"eth_accounts"},{dedupe:!0})).map(e=>(0,tH.checksumAddress)(e))}var tG=e.i(509916),tK=e.i(189991);async function tY(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{account:n=e.account,chainId:r}=t,i=n?(0,tK.parseAccount)(n):void 0,a=r?[null==i?void 0:i.address,[(0,tB.numberToHex)(r)]]:[null==i?void 0:i.address],o=await e.request({method:"wallet_getCapabilities",params:a}),s={};for(let[e,t]of Object.entries(o))for(let[n,r]of(s[Number(e)]={},Object.entries(t)))"addSubAccount"===n&&(n="unstable_addSubAccount"),s[Number(e)][n]=r;return"number"==typeof r?s[r]:s}async function tZ(e){return await e.request({method:"wallet_getPermissions"},{dedupe:!0})}var tJ=e.i(829897),tQ=e.i(368941);async function tX(e){return(await e.request({method:"eth_requestAccounts"},{dedupe:!0,retryCount:0})).map(e=>(0,tH.getAddress)(e))}async function t0(e,t){return e.request({method:"wallet_requestPermissions",params:[t]},{retryCount:0})}var t1=e.i(460841),t2=e.i(763448);async function t3(e,t){var n,r;let{chain:i=e.chain}=t,a=null!=(r=t.timeout)?r:Math.max((null!=(n=null==i?void 0:i.blockTime)?n:0)*3,5e3),o=await (0,t1.sendCalls)(e,t);return await (0,t2.waitForCallsStatus)(e,{...t,id:o.id,timeout:a})}var t5=e.i(638291),t4=e.i(738977),t6=e.i(611573),t8=e.i(569934),t9=e.i(393702),t7=e.i(290392),ne=e.i(942305),nt=e.i(10725),nn=e.i(264404),nr=e.i(190521),ni=e.i(467125),na=e.i(976677),no=e.i(353464),ns=e.i(948789);let nl=new na.LruMap(128);async function nc(e,t){var n,r,i,a,o,s;let{account:l=e.account,chain:c=e.chain,accessList:d,authorizationList:u,blobs:h,data:p,gas:f,gasPrice:g,maxFeePerBlobGas:m,maxFeePerGas:y,maxPriorityFeePerGas:b,nonce:w,pollingInterval:x,throwOnReceiptRevert:C,type:E,value:k,...S}=t,I=null!=(r=t.timeout)?r:Math.max((null!=(n=null==c?void 0:c.blockTime)?n:0)*3,5e3);if(void 0===l)throw new t6.AccountNotFoundError({docsPath:"/docs/actions/wallet/sendTransactionSync"});let A=l?(0,tK.parseAccount)(l):null;try{(0,no.assertRequest)(t);let n=await (async()=>t.to?t.to:null!==t.to&&u&&u.length>0?await (0,t7.recoverAuthorizationAddress)({authorization:u[0]}).catch(()=>{throw new t8.BaseError("`to` is required. Could not infer from `authorizationList`.")}):void 0)();if((null==A?void 0:A.type)==="json-rpc"||null===A){let t;null!==c&&(t=await (0,ni.getAction)(e,tU.getChainId,"getChainId")({}),(0,ne.assertCurrentChain)({currentChainId:t,chain:c}));let r=null==(o=e.chain)||null==(a=o.formatters)||null==(i=a.transactionRequest)?void 0:i.format,s=(r||nr.formatTransactionRequest)({...(0,nn.extract)(S,{format:r}),accessList:d,account:A,authorizationList:u,blobs:h,chainId:t,data:p,gas:f,gasPrice:g,maxFeePerBlobGas:m,maxFeePerGas:y,maxPriorityFeePerGas:b,nonce:w,to:n,type:E,value:k},"sendTransaction"),l=nl.get(e.uid),T=l?"wallet_sendTransaction":"eth_sendTransaction",_=await (async()=>{try{return await e.request({method:T,params:[s]},{retryCount:0})}catch(t){if(!1===l)throw t;if("InvalidInputRpcError"===t.name||"InvalidParamsRpcError"===t.name||"MethodNotFoundRpcError"===t.name||"MethodNotSupportedRpcError"===t.name)return await e.request({method:"wallet_sendTransaction",params:[s]},{retryCount:0}).then(t=>(nl.set(e.uid,!0),t)).catch(n=>{if("MethodNotFoundRpcError"===n.name||"MethodNotSupportedRpcError"===n.name)throw nl.set(e.uid,!1),t;throw n});throw t}})(),j=await (0,ni.getAction)(e,ns.waitForTransactionReceipt,"waitForTransactionReceipt")({checkReplacement:!1,hash:_,pollingInterval:x,timeout:I});if(C&&"reverted"===j.status)throw new t9.TransactionReceiptRevertedError({receipt:j});return j}if((null==A?void 0:A.type)==="local"){let t=await (0,ni.getAction)(e,tQ.prepareTransactionRequest,"prepareTransactionRequest")({account:A,accessList:d,authorizationList:u,blobs:h,chain:c,data:p,gas:f,gasPrice:g,maxFeePerBlobGas:m,maxFeePerGas:y,maxPriorityFeePerGas:b,nonce:w,nonceManager:A.nonceManager,parameters:[...tQ.defaultParameters,"sidecars"],type:E,value:k,...S,to:n}),r=null==c||null==(s=c.serializers)?void 0:s.transaction,i=await A.signTransaction(t,{serializer:r});return await (0,ni.getAction)(e,t4.sendRawTransactionSync,"sendRawTransactionSync")({serializedTransaction:i,throwOnReceiptRevert:C})}if((null==A?void 0:A.type)==="smart")throw new t6.AccountTypeNotSupportedError({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"});throw new t6.AccountTypeNotSupportedError({docsPath:"/docs/actions/wallet/sendTransactionSync",type:null==A?void 0:A.type})}catch(e){if(e instanceof t6.AccountTypeNotSupportedError)throw e;throw(0,nt.getTransactionError)(e,{...t,account:A,chain:t.chain||void 0})}}
1async function nd(e,t){let{id:n}=t;await e.request({method:"wallet_showCallsStatus",params:[n]})}async function nu(e,t){let{account:n=e.account}=t;if(!n)throw new t6.AccountNotFoundError({docsPath:"/docs/eip7702/signAuthorization"});let r=(0,tK.parseAccount)(n);if(!r.signAuthorization)throw new t6.AccountTypeNotSupportedError({docsPath:"/docs/eip7702/signAuthorization",metaMessages:["The `signAuthorization` Action does not support JSON-RPC Accounts."],type:r.type});let i=await (0,tJ.prepareAuthorization)(e,t);return r.signAuthorization(i)}async function nh(e,t){let{account:n=e.account,message:r}=t;if(!n)throw new t6.AccountNotFoundError({docsPath:"/docs/actions/wallet/signMessage"});let i=(0,tK.parseAccount)(n);if(i.signMessage)return i.signMessage({message:r});let a="string"==typeof r?(0,tB.stringToHex)(r):r.raw instanceof Uint8Array?(0,tB.toHex)(r.raw):r.raw;return e.request({method:"personal_sign",params:[a,i.address]},{retryCount:0})}async function np(e,t){var n,r,i,a;let{account:o=e.account,chain:s=e.chain,...l}=t;if(!o)throw new t6.AccountNotFoundError({docsPath:"/docs/actions/wallet/signTransaction"});let c=(0,tK.parseAccount)(o);(0,no.assertRequest)({account:c,...t});let d=await (0,ni.getAction)(e,tU.getChainId,"getChainId")({});null!==s&&(0,ne.assertCurrentChain)({currentChainId:d,chain:s});let u=(null==s?void 0:s.formatters)||(null==(n=e.chain)?void 0:n.formatters),h=(null==u||null==(r=u.transactionRequest)?void 0:r.format)||nr.formatTransactionRequest;return c.signTransaction?c.signTransaction({...l,chainId:d},{serializer:null==(a=e.chain)||null==(i=a.serializers)?void 0:i.transaction}):await e.request({method:"eth_signTransaction",params:[{...h({...l,account:c},"signTransaction"),chainId:(0,tB.numberToHex)(d),from:c.address}]},{retryCount:0})}var nf=e.i(643506);async function ng(e,t){let{account:n=e.account,domain:r,message:i,primaryType:a}=t;if(!n)throw new t6.AccountNotFoundError({docsPath:"/docs/actions/wallet/signTypedData"});let o=(0,tK.parseAccount)(n),s={EIP712Domain:(0,nf.getTypesForEIP712Domain)({domain:r}),...t.types};if((0,nf.validateTypedData)({domain:r,message:i,primaryType:a,types:s}),o.signTypedData)return o.signTypedData({domain:r,message:i,primaryType:a,types:s});let l=(0,nf.serializeTypedData)({domain:r,message:i,primaryType:a,types:s});return e.request({method:"eth_signTypedData_v4",params:[o.address,l]},{retryCount:0})}async function nm(e,t){let{id:n}=t;await e.request({method:"wallet_switchEthereumChain",params:[{chainId:(0,tB.numberToHex)(n)}]},{retryCount:0})}async function ny(e,t){return await e.request({method:"wallet_watchAsset",params:t},{retryCount:0})}var nv=e.i(656679),nb=e.i(807749);async function nw(e,t){return nw.internal(e,tq.sendTransaction,"sendTransaction",t)}async function nx(e,t){return nw.internal(e,nc,"sendTransactionSync",t)}function nC(e){return{addChain:t=>tz(e,t),deployContract:t=>(function(e,t){let{abi:n,args:r,bytecode:i,...a}=t,o=(0,tW.encodeDeployData)({abi:n,args:r,bytecode:i}
1);return(0,tq.sendTransaction)(e,{...a,...a.authorizationList?{to:null}:{},data:o})})(e,t),getAddresses:()=>tV(e),getCallsStatus:t=>(0,tG.getCallsStatus)(e,t),getCapabilities:t=>tY(e,t),getChainId:()=>(0,tU.getChainId)(e),getPermissions:()=>tZ(e),prepareAuthorization:t=>(0,tJ.prepareAuthorization)(e,t),prepareTransactionRequest:t=>(0,tQ.prepareTransactionRequest)(e,t),requestAddresses:()=>tX(e),requestPermissions:t=>t0(e,t),sendCalls:t=>(0,t1.sendCalls)(e,t),sendCallsSync:t=>t3(e,t),sendRawTransaction:t=>(0,t5.sendRawTransaction)(e,t),sendRawTransactionSync:t=>(0,t4.sendRawTransactionSync)(e,t),sendTransaction:t=>(0,tq.sendTransaction)(e,t),sendTransactionSync:t=>nc(e,t),showCallsStatus:t=>nd(e,t),signAuthorization:t=>nu(e,t),signMessage:t=>nh(e,t),signTransaction:t=>np(e,t),signTypedData:t=>ng(e,t),switchChain:t=>nm(e,t),waitForCallsStatus:t=>(0,t2.waitForCallsStatus)(e,t),watchAsset:t=>ny(e,t),writeContract:t=>nw(e,t),writeContractSync:t=>nx(e,t)}}function nE(e){let{key:t="wallet",name:n="Wallet Client",transport:r}=e;return(0,tF.createClient)({...e,key:t,name:n,transport:r,type:"walletClient"}).extend(nC)}(nw||(nw={})).internal=async function(e,t,n,r){let{abi:i,account:a=e.account,address:o,args:s,dataSuffix:l,functionName:c,...d}=r;if(void 0===a)throw new t6.AccountNotFoundError({docsPath:"/docs/contract/writeContract"});let u=a?(0,tK.parseAccount)(a):null,h=(0,nv.encodeFunctionData)({abi:i,args:s,functionName:c});try{return await (0,ni.getAction)(e,t,n)({data:"".concat(h).concat(l?l.replace("0x",""):""),to:o,account:u,...d})}catch(e){throw(0,nb.getContractError)(e,{abi:i,address:o,args:s,docsPath:"/docs/contract/writeContract",functionName:c,sender:null==u?void 0:u.address})}},e.s(["custom",()=>nS],911347);var nk=e.i(695331);function nS(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{key:n="custom",methods:r,name:i="Custom Provider",retryDelay:a}=t;return o=>{var s;let{retryCount:l}=o;return(0,nk.createTransport)({key:n,methods:r,name:i,request:e.request.bind(e),retryCount:null!=(s=t.retryCount)?s:l,retryDelay:a,type:"custom"})}}e.s(["parseEther",()=>nT],599509);var nI=e.i(855723),nA=e.i(668375);function nT(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"wei";return(0,nA.parseUnits)(e,nI.etherUnits[t])}},442690,e=>{"use strict";function t(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw TypeError("attempted to use private field on non-instance");return e}e.s(["ConnectedStandardSolanaWallet",()=>o]);var n=0;function r(e){return"__private_"+n+++"_"+e}var i=r("_wallet"),a=r("_account");class o{get standardWallet(){return t(this,i)[i]}get address(){return t(this,a)[a].address}async disconnect(){var e;if(!(null==(e=t(this,i)[i].features["standard:disconnect"])?void 0:e.disconnect))throw Error("Wallet does not support disconnect");await t(this,i)[i].features["standard:disconnect"].disconnect()}async signMessage(){for(var e,n=arguments.length,r=Array(n),o=0;o<n;o++)r[o]=arguments[o];if(!(null==(e=t(this,i)[i].features["solana:signMessage"])?void 0:e.signMessage))throw Error("Wallet does not support signMessage");let s=await t(this,i)[i].features["solana:signMessage"].signMessage(...r.map(e=>({...e,account:t(this,a)[a]})));return 1===r.length?s[0]:[...s]}async signTransaction(){for(var e,n=arguments.length,r=Array(n),o=0;o<n;o++)r[o]=arguments[o];if(!(null==(e=t(this,i)[i].features["solana:signTransaction"])?void 0:e.signTransaction))throw Error("Wallet does not support signTransaction");let s=await t(this,i)[i].features["solana:signTransaction"].signTransaction(...r.map(e=>({...e,account:t(this,a)[a]})));return 1===r.length?s[0]:[...s]}async signAndSendTransaction(){for(var e,n=arguments.length,r=Array(n),o=0;o<n;o++)r[o]=arguments[o];if(!(null==(e=t(this,i)[i].features["solana:signAndSendTransaction"])?void 0:e.signAndSendTransaction))throw Error("Wallet does not support signAndSendTransaction");let s=await t(this,i)[i].features["solana:signAndSendTransaction"].signAndSendTransaction(...r.map(e=>({...e,account:t(this,a)[a]})));return 1===r.length?s[0]:[...s]}async signAndSendAllTransactions(e){var n;if(!(null==(n=t(this,i)[i].features["solana:signAndSendTransaction"])?void 0:n.signAndSendTransaction))throw Error("Wallet does not support signAndSendTransaction");return[...await t(this,i)[i].features["solana:signAndSendTransaction"].signAndSendTransaction(...e.map(e=>({...e,account:t(this,a)[a]})))]}constructor({wallet:e,account:n}){Object.defineProperty(this,i,{writable:!0,value:void 0}),Object.defineProperty(this,a,{writable:!0,value:void 0}),t(this,i)[i]=e,t(this,a)[a]=n}}},922773,e=>{"use strict";e.s(["addToDefaultChains",()=>n]);var t=e.i(877225);function n(e){let n=e.filter(e=>!t.DEFAULT_SUPPORTED_CHAIN_IDS.has(e.id));return t.DEFAULT_SUPPORTED_CHAINS.concat(n)}},825158,e=>{"use strict";e.s(["formatTokenAmount",()=>
1a,"formatWalletAddress",()=>r,"formatWeiAmount",()=>i]);var t=e.i(285973),n=e.i(644616);function r(e){return e?"".concat(e.slice(0,5),"…").concat(e.slice(-4)):""}function i(e){let{wei:n,precision:r=3}=e;return parseFloat((0,t.formatEther)(n)).toFixed(r).replace(/0+$/,"").replace(/\.$/,"")}function a(e){let{amount:t,decimals:r}=e;return(0,n.formatUnits)(BigInt(t),r)}},597011,214909,e=>{"use strict";e.s(["UsdcAddressMap",()=>p],597011);var t=e.i(435528),n=e.i(331191),r=e.i(47258),i=e.i(853317),a=e.i(975477),o=e.i(83319),s=e.i(301325),l=e.i(744645),c=e.i(141628),d=e.i(707213),u=e.i(554952),h=e.i(991120);let p={[h.mainnet.id]:"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",[u.sepolia.id]:"0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238",[d.optimism.id]:"0x0b2c639c533813f4aa9d7837caf62653d097ff85",[c.optimismSepolia.id]:"0x5fd84259d66Cd46123540766Be93DFE6D43130D7",[l.polygon.id]:"0x3c499c542cef5e3811e1192ce70d8cc03d5c3359",[s.polygonAmoy.id]:"0x41e94eb019c0762f9bfcf9fb1e58725bfb0e7582",[o.base.id]:"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",[a.baseSepolia.id]:"0x036CbD53842c5426634e7929541eC2318f3dCF7e",[i.avalanche.id]:"0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E",[r.avalancheFuji.id]:"0x5425890298aed601595a70ab815c96711a31bc65",[n.arbitrum.id]:"0xaf88d065e77c8cC2239327C5EDb3A432268e5831",[t.arbitrumSepolia.id]:"0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d"};e.s(["getCoinbaseOnRampUrl",()=>b,"isSupportedChainIdForCoinbaseOnramp",()=>w,"toCoinbaseAssetId",()=>x],214909);let f=new Set([h.mainnet.id,o.base.id,d.optimism.id,l.polygon.id,n.arbitrum.id,i.avalanche.id]),g=new Set([h.mainnet.id,o.base.id,l.polygon.id,d.optimism.id,n.arbitrum.id,i.avalanche.id]),m={buy:"CARD",send:"CRYPTO_ACCOUNT"},y={USDC:"2b92315d-eab7-5bef-84fa-089a131333f5",ETH:"d85dce9b-5b73-5c3c-8978-522ce1d1c1b4",BTC:"5b71fc48-3dd3-540c-809b-f8c94d0e68b5",SOL:"4f039497-3af8-5bb3-951c-6df9afa9be1c",POL:"026bcc1e-9163-591c-a709-34dd18b2e7a1"};function b(e){let{appId:t,input:n,amount:r,blockchain:i,asset:a,experience:o}=e,s=new URL("https://pay.coinbase.com/buy/select-asset");return s.searchParams.set("appId",n.app_id),s.searchParams.set("sessionToken",n.session_token),s.searchParams.set("endPartnerName","privy:".concat(t)),s.searchParams.set("defaultExperience",o),s.searchParams.set("presetCryptoAmount",r.startsWith(".")?"0".concat(r):r),s.searchParams.set("defaultNetwork",i),s.searchParams.set("defaultPaymentMethod",m[o]),s.searchParams.set("defaultAsset",y[a]),s.searchParams.set("partnerUserId",n.partner_user_id),{url:s}}h.mainnet.id,o.base.id,d.optimism.id,l.polygon.id,n.arbitrum.id,i.avalanche.id;let w=(e,t)=>{switch(t){case"native-currency":return f.has(e);case"USDC":return g.has(e);default:return console.warn("Unknown asset passed to Coinbase Onramp"),!1}};function x(e,t){return"USDC"===t?"USDC":e===l.polygon.id?"POL":"ETH"}},830260,(e,t,n)=>{"use strict";var r,i=(r=[{name:"lowercase",re:/[a-z]/,length:26},{name:"uppercase",re:/[A-Z]/,length:26},{name:"numbers",re:/[0-9]/,length:10},{name:"symbols",re:/[^a-zA-Z0-9]/,length:33}],function(e){return r.reduce(function(t,n){return t+(n.re.test(e)?n.length:0)},0)});t.exports=function(e){var t;return e?(t=i(e),Math.round(e.length*Math.log(t)/Math.LN2)):0}},828821,123287,896354,993556,974935,170230,935759,442346,846455,530448,518139,705630,393573,298282,555340,180022,403392,e=>{"use strict";e.s(["toObjectKeys",()=>t],828821);let t=function(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];return e.reduce((e,n)=>({...e,[n]:t}),{})};function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}e.s(["default",()=>a],123287);var r=/^\s+/,i=/\s+$/;function a(e,t){if(t=t||{},(e=e||"")instanceof a)return e;if(!(this instanceof a))return new a(e,t);var o,s,l,c,d,u,h,p,f,g,m,y,b,w,x,C,k,A,_,P,O=(s={r:0,g:0,b:0},l=1,c=null,d=null,u=null,h=!1,p=!1,"string"==typeof(o=e)&&(o=function(e){e=e.replace(r,"").replace(i,"").toLowerCase();var t,n=!1;if(E[e])e=E[e],n=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};return(t=$.rgb.exec(e))?{r:t[1],g:t[2],b:t[3]}:(t=$.rgba.exec(e))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=$.hsl.exec(e))?{h:t[1],s:t[2],l:t[3]}:(t=$.hsla.exec(e))?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=$.hsv.exec(e))?{h:t[1],s:t[2],v:t[3]}:(t=$.hsva.exec(e))?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=$.hex8.exec(e))?{r:T(t[1]),g:T(t[2]),b:T(t[3]),a:T(t[4])/255,format:n?"name":"hex8"}:(t=$.hex6.exec(e))?{r:T(t[1]),g:T(t[2]),b:T(t[3]),format:n?"name":"hex"}:(t=$.hex4.exec(e))?{r:T(t[1]+""+t[1]),g:T(t[2]+""+t[2]),b:T(t[3]+""+t[3]),a:T(t[4]+""+t[4])/255,format:n?"name":"hex8"}:!!(t=$.hex3.exec(e))&&{r:T(t[1]+""+t[1]),g:T(t[2]+""+t[2]),b:T(t[3]+""+t[3]),format:n?"name":"hex"}}(o)),"object"==n(o)&&(N(o.r)&&N(o.g)&&N(o.b)?(f=o.r,g=o.g,m=o.b,s={r:255*I(f,255),g:255*I(g,255),b:255*I(m,255)},h=!0,p="%"===String(o.r).substr(-1)?"prgb":"rgb"):N(o.h)&&N(o.s)&&N(o.v)?(c=j(o.s),d=j(o.v),y=o.h,b=c,w=d,y=6*I(y,360),b=I(b,100),w=I(w,100),x=Math.floor(y),C=y-x,k=w*(1-b),A=w*(1-C*b),_=w*(1-(1-C)*b),s={r:255*[w,A,k,k,_,w][P=x%6],g:255*[_,w,w,A,k,k][P],b:255*[k,k,_,w,w,A][P]},h=!0,p="hsv"):N(o.h)&&N(o.s)&&N(o.l)&&(c=j(o.s),u=j(o.l),s=function(e,t,n){var r,i,a;function o(e,t,n){return(n<0&&(n+=1),n>1&&(n-=1),n<1/6)?e+(t-e)*6*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=I(e,360),t=I(t,100),n=I(n,100),0===t)r=i=a=n;else{var s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;r=o(l,s,e+1/3),i=o(l,s,e),a=o(l,s,e-1/3)}return{r:255*r,g:255*i,b:255*a}}(o.h,c,u),h=!0,p="hsl"),o.hasOwnProperty("a")&&(l=o.a)),l=S(l),{ok:h,format:o.format||p,r:Math.min(255,Math.max(s.r,0)),g:Math.min(255,Math.max(s.g,0)),b:Math.min(255,Math.max(s.b,0)),a:l});this._originalInput=e,this._r=O.r,this._g=O.g,this._b=O.b,this._a=O.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||O.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=O.ok}function o(e,t,n){e=I(e,255);var r,i,a=Math.max(e,t=I(t,255),n=I(n,255)),o=Math.min(e,t,n),s=(a+o)/2;if(a==o)r=i=0;else{var l=a-o;switch(i=s>.5?l/(2-a-o):l/(a+o),a){case e:r=(t-n)/l+6*(t<n);break;case t:r=(n-e)/l+2;break;case n:r=(e-t)/l+4}r/=6}return{h:r,s:i,l:s}}function s(e,t,n){e=I(e,255);var r,i=Math.max(e,t=I(t,255),n=I(n,255)),a=Math.min(e,t,n),o=i-a;if(i==a)r=0;else{switch(i){case e:r=(t-n)/o+6*(t<n);break;case t:r=(n-e)/o+2;break;case n:r=(e-t)/o+4}r/=6}return{h:r,s:0===i?0:o/i,v:i}}function l(e,t,n,r){var i=[_(Math.round(e).toString(16)),_(Math.round(t).toString(16)),_(Math.round(n).toString(16))];return r&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function c(e,t,n,r){return[_(P(r)),_(Math.round(e).toString(16)),_(Math.round(t).toString(16)),_(Math.round(n).toString(16))].join("")}function d(e,t){t=0===t?0:t||10;var n=a(e).toHsl();return n.s-=t/100,n.s=A(n.s),a(n)}function u(e,t){t=0===t?0:t||10;var n=a(e).toHsl();return n.s+=t/100,n.s=A(n.s),a(n)}function h(e){return a(e).desaturate(100)}function p(e,t){t=0===t?0:t||10;var n=a(e).toHsl();return n.l+=t/100,n.l=A(n.l),a(n)}function f(e,t){t=0===t?0:t||10;var n=a(e).toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(-(t/100*255)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(-(t/100*255)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(-(t/100*255)))),a(n)}function g(e,t){t=0===t?0:t||10;var n=a(e).toHsl();return n.l-=t/100,n.l=A(n.l),a(n)}function m(e,t){var n=a(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,a(n)}function y(e){var t=a(e).toHsl();return t.h=(t.h+180)%360,a(t)}function b(e,t){if(isNaN(t)||t<=0)throw Error("Argument to polyad must be a positive number");for(var n=a(e).toHsl(),r=[a(e)],i=360/t,o=1;o<t;o++)r.push(a({h:(n.h+o*i)%360,s:n.s,l:n.l}));return r}function w(e){var t=a(e).toHsl(),n=t.h;return[a(e),a({h:(n+72)%360,s:t.s,l:t.l}),a({h:(n+216)%360,s:t.s,l:t.l})]}function x(e,t,n){t=t||6,n=n||30;var r=a(e).toHsl(),i=360/n,o=[a(e)];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,o.push(a(r));return o}
1function C(e,t){t=t||6;for(var n=a(e).toHsv(),r=n.h,i=n.s,o=n.v,s=[],l=1/t;t--;)s.push(a({h:r,s:i,v:o})),o=(o+l)%1;return s}a.prototype={isDark:function(){return 128>this.getBrightness()},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,r=this.toRgb();return e=r.r/255,t=r.g/255,.2126*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.0722*((n=r.b/255)<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=S(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=s(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=s(this._r,this._g,this._b),t=Math.round(360*e.h),n=Math.round(100*e.s),r=Math.round(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=o(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=o(this._r,this._g,this._b),t=Math.round(360*e.h),n=Math.round(100*e.s),r=Math.round(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return l(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){var t,n,r,i,a,o;return t=this._r,n=this._g,r=this._b,i=this._a,a=e,o=[_(Math.round(t).toString(16)),_(Math.round(n).toString(16)),_(Math.round(r).toString(16)),_(P(i))],a&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(100*I(this._r,255))+"%",g:Math.round(100*I(this._g,255))+"%",b:Math.round(100*I(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+Math.round(100*I(this._r,255))+"%, "+Math.round(100*I(this._g,255))+"%, "+Math.round(100*I(this._b,255))+"%)":"rgba("+Math.round(100*I(this._r,255))+"%, "+Math.round(100*I(this._g,255))+"%, "+Math.round(100*I(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(k[l(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+c(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var i=a(e);n="#"+c(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return!t&&r&&("hex"===e||"hex6"===e||"hex3"===e||"hex4"===e||"hex8"===e||"name"===e)?"name"===e&&0===this._a?this.toName():this.toRgbString():("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),("hex"===e||"hex6"===e)&&(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString())},clone:function(){return a(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(p,arguments)},brighten:function(){return this._applyModification(f,arguments)},darken:function(){return this._applyModification(g,arguments)},desaturate:function(){return this._applyModification(d,arguments)},saturate:function(){return this._applyModification(u,arguments)},greyscale:function(){return this._applyModification(h,arguments)},spin:function(){return this._applyModification(m,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(x,arguments)},complement:function(){return this._applyCombination(y,arguments)},monochromatic:function(){return this._applyCombination(C,arguments)},splitcomplement:function(){return this._applyCombination(w,arguments)},triad:function(){return this._applyCombination(b,[3])},tetrad:function(){return this._applyCombination(b,[4])}},a.fromRatio=function(e,t){if("object"==n(e)){var r={};for(var i in e)e.hasOwnProperty(i)&&("a"===i?r[i]=e[i]:r[i]=j(e[i]));e=r}return a(e,t)},a.equals=function(e,t){return!!e&&!!t&&a(e).toRgbString()==a(t).toRgbString()},a.random=function(){return a.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},a.mix=function(e,t,n){n=0===n?0:n||50;var r=a(e).toRgb(),i=a(t).toRgb(),o=n/100;return a({r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a})},a.readability=function(e,t){var n=a(e),r=a(t);return(Math.max(n.getLuminance(),r.getLuminance())+.05)/(Math.min(n.getLuminance(),r.getLuminance())+.05)},a.isReadable=function(e,t,n){var r,i,o,s,l,c=a.readability(e,t);switch(l=!1,(i=((r=(r=n)||{level:"AA",size:"small"}).level||"AA").toUpperCase(),o=(r.size||"small").toLowerCase(),"AA"!==i&&"AAA"!==i&&(i="AA"),"small"!==o&&"large"!==o&&(o="small"),s={level:i,size:o}).level+s.size){case"AAsmall":case"AAAlarge":l=c>=4.5;break;case"AAlarge":l=c>=3;break;case"AAAsmall":l=c>=7}return l},a.mostReadable=function(e,t,n){var r,i,o,s,l=null,c=0;i=(n=n||{}).includeFallbackColors,o=n.level,s=n.size;
vendor: 1,583 bytes, line 1
1for(var d=0;d<t.length;d++)(r=a.readability(e,t[d]))>c&&(c=r,l=a(t[d]));return a.isReadable(e,l,{level:o,size:s})||!i?l:(n.includeFallbackColors=!1,a.mostReadable(e,["#fff","#000"],n))};var E=a.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee9
10",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},k=a.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(E);function S(e){return(isNaN(e=parseFloat(e))||e<0||e>1)&&(e=1),e}function I(e,t){"string"==typeof(n=e)&&-1!=n.indexOf(".")&&1===parseFloat(n)&&(e="100%");var n,r,i="string"==typeof(r=e)&&-1!=r.indexOf("%");return(e=Math.min(t,Math.max(0,parseFloat(e))),i&&(e=parseInt(e*t,10)/100),1e-6>Math.abs(e-t))?1:e%t/parseFloat(t)}function A(e){return Math.min(1,Math.max(0,e))}function T(e){return parseInt(e,16)}function _(e){return 1==e.length?"0"+e:""+e}function j(e){return e<=1&&(e=100*e+"%"),e}function P(e){return Math.round(255*parseFloat(e)).toString(16)}var $=function(){var e="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)",t="[\\s|\\(]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")\\s*\\)?",n="[\\s|\\(]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")\\s*\\)?";return{CSS_UNIT:new RegExp(e),rgb:RegExp("rgb"+t),rgba:RegExp("rgba"+n),hsl:RegExp("hsl"+t),hsla:RegExp("hsla"+n),hsv:RegExp("hsv"+t),hsva:RegExp("hsva"
1+n),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function N(e){return!!$.CSS_UNIT.exec(e)}e.s(["default",()=>M],896354);var O=e.i(271645);let M=O.forwardRef(function(e,t){let{title:n,titleId:r,...i}=e;return O.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":r},i),n?O.createElement("title",{id:r},n):null,O.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M17.982 18.725A7.488 7.488 0 0 0 12 15.75a7.488 7.488 0 0 0-5.982 2.975m11.963 0a9 9 0 1 0-11.963 0m11.963 0A8.966 8.966 0 0 1 12 21a8.966 8.966 0 0 1-5.982-2.275M15 9.75a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}))});e.s(["default",()=>R],993556);let R=O.forwardRef(function(e,t){let{title:n,titleId:r,...i}=e;return O.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":r},i),n?O.createElement("title",{id:r},n):null,O.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 19.5 3 12m0 0 7.5-7.5M3 12h18"}))});e.s(["default",()=>L],974935);let L=O.forwardRef(function(e,t){let{title:n,titleId:r,...i}=e;return O.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":r},i),n?O.createElement("title",{id:r},n):null,O.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 5.25h.008v.008H12v-.008Z"}))});e.s(["default",()=>D],170230);let D=O.forwardRef(function(e,t){let{title:n,titleId:r,...i}=e;return O.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":r},i),n?O.createElement("title",{id:r},n):null,O.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"}))});e.s(["default",()=>F],935759);let F=O.forwardRef(function(e,t){let{title:n,titleId:r,...i}=e;return O.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":r},i),n?O.createElement("title",{id:r},n):null,O.createElement("path",{fillRule:"evenodd",d:"M16.704 4.153a.75.75 0 0 1 .143 1.052l-8 10.5a.75.75 0 0 1-1.127.075l-4.5-4.5a.75.75 0 0 1 1.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 0 1 1.05-.143Z",clipRule:"evenodd"}))});e.s(["default",()=>U],442346);let U=O.forwardRef(function(e,t){let{title:n,titleId:r,...i}=e;return O.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":r},i),n?O.createElement("title",{id:r},n):null,O.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21.75 6.75v10.5a2.25 2.25 0 0 1-2.25 2.25h-15a2.25 2.25 0 0 1-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0 0 19.5 4.5h-15a2.25 2.25 0 0 0-2.25 2.25m19.5 0v.243a2.25 2.25 0 0 1-1.07 1.916l-7.5 4.615a2.25 2.25 0 0 1-2.36 0L3.32 8.91a2.25 2.25 0 0 1-1.07-1.916V6.75"}))});e.s(["default",()=>B],846455);let B=O.forwardRef(function(e,t){let{title:n,titleId:r,...i}=e;return O.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":r},i),n?O.createElement("title",{id:r},n):null,O.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 6.75c0 8.284 6.716 15 15 15h2.25a2.25 2.25 0 0 0 2.25-2.25v-1.372c0-.516-.351-.966-.852-1.091l-4.423-1.106c-.44-.11-.902.055-1.173.417l-.97 1.293c-.282.376-.769.542-1.21.38a12.035 12.035 0 0 1-7.143-7.143c-.162-.441.004-.928.38-1.21l1.293-.97c.363-.271.527-.734.417-1.173L6.963 3.102a1.125 1.125 0 0 0-1.091-.852H4.5A2.25 2.25 0 0 0 2.25 4.5v2.25Z"}))});e.s(["default",()=>z],530448);let z=O.forwardRef(function(e,t){let{title:n,titleId:r,...i}=e;return O.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":r},i),n?O.createElement("title",{id:r},n):null,O.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126ZM12 15.75h.007v.008H12v-.008Z"}))});e.s(["default",()=>W],518139);let W=O.forwardRef(function(e,t){let{title:n,titleId:r,...i}=e;return O.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":r},i),n?O.createElement("title",{id:r},n):null,O.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 12a2.25 2.25 0 0 0-2.25-2.25H15a3 3 0 1 1-6 0H5.25A2.25 2.25 0 0 0 3 12m18 0v6a2.25 2.25 0 0 1-2.25 2.25H5.25A2.25 2.25 0 0 1 3 18v-6m18 0V9M3 12V9m18 0a2.25 2.25 0 0 0-2.25-2.25H5.25A2.25 2.25 0 0 0 3 9m18 0V6a2.25 2.25 0 0 0-2.25-2.25H5.25A2.25 2.25 0 0 0 3 6v3"}))});e.s(["default",()=>q],705630);let q=O.forwardRef(function(e,t){let{title:n,titleId:r,...i}=e;return O.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":r},i),n?O.createElement("title",{id:r},n):null,O.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m9-.75
1a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 3.75h.008v.008H12v-.008Z"}))});e.s(["default",()=>H],393573);let H=O.forwardRef(function(e,t){let{title:n,titleId:r,...i}=e;return O.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":r},i),n?O.createElement("title",{id:r},n):null,O.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.5 8.25V6a2.25 2.25 0 0 0-2.25-2.25H6A2.25 2.25 0 0 0 3.75 6v8.25A2.25 2.25 0 0 0 6 16.5h2.25m8.25-8.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-7.5A2.25 2.25 0 0 1 8.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 0 0-2.25 2.25v6"}))});function V(e){return crypto.getRandomValues(new Uint8Array(e))}function G(){let[e]=V(1);return e}function K(){let[e,t]=V(2);return(e<<8)+t}function Y(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"-";if("number"!=typeof e||e<1)throw Error("Invalid argument: length argument must be a number greater than or equal to 1");if(!Array.isArray(t)||t.length<2)throw Error("Invalid argument: wordlist argument must be an array with length greater than or equal to 2");if("string"!=typeof n)throw Error("Invalid argument: sep argument must be a string");return(function(e,t,n){if("number"!=typeof e||e<1)throw Error("Invalid argument: length must be a number greater than or equal to 1");!1;if("number"!=typeof n||n>65536)throw Error("Invalid argument: end must be a number less than or equal to ".concat(65536));if(n-t<2)throw Error("Invalid range: range must contain at least two values");let r=[];for(let i=0;i<e;i++)r[i]=t+function(e){if("number"!=typeof e||e<2||e>65536)throw Error("Invalid number: number must be at least two and at most ".concat(65536));let t=e>256,n=t?K:G,r=e*Math.floor((t?65536:256)/e);for(;;){let t=n();if(t<r)return t%e}}(n-t);return r})(e,0,t.length).reduce((e,r,i)=>{let a=t[r];return e+(0===i?a:n+a)},"")}e.s(["generatePassphrase",()=>Y],298282),e.s(["DEFAULT_WORDLIST",()=>Z],555340);let Z=Object.freeze(Object.freeze(["abacus","abdomen","abdominal","abide","abiding","ability","ablaze","able","abnormal","abrasion","abrasive","abreast","abridge","abroad","abruptly","absence","absentee","absently","absinthe","absolute","absolve","abstain","abstract","absurd","accent","acclaim","acclimate","accompany","account","accuracy","accurate","accustom","acetone","achiness","aching","acid","acorn","acquaint","acquire","acre","acrobat","acronym","acting","action","activate","activator","active","activism","activist","activity","actress","acts","acutely","acuteness","aeration","aerobics","aerosol","aerospace","afar","affair","affected","affecting","affection","affidavit","affiliate","affirm","affix","afflicted","affluent","afford","affront","aflame","afloat","aflutter","afoot","afraid","afterglow","afterlife","aftermath","aftermost","afternoon","aged","ageless","agency","agenda","agent","aggregate","aghast","agile","agility","aging","agnostic","agonize","agonizing","agony","agreeable","agreeably","agreed","agreeing","agreement","aground","ahead","ahoy","aide","aids","aim","ajar","alabaster","alarm","albatross","album","alfalfa","algebra","algorithm","alias","alibi","alienable","alienate","aliens","alike","alive","alkaline","alkalize","almanac","almighty","almost","aloe","aloft","aloha","alone","alongside","aloof","alphabet","alright","although","altitude","alto","aluminum","alumni","always","amaretto","amaze","amazingly","amber","ambiance","ambiguity","ambiguous","ambition","ambitious","ambulance","ambush","amendable","amendment","amends","amenity","amiable","amicably","amid","am
1igo","amino","amiss","ammonia","ammonium","amnesty","amniotic","among","amount","amperage","ample","amplifier","amplify","amply","amuck","amulet","amusable","amused","amusement","amuser","amusing","anaconda","anaerobic","anagram","anatomist","anatomy","anchor","anchovy","ancient","android","anemia","anemic","aneurism","anew","angelfish","angelic","anger","angled","angler","angles","angling","angrily","angriness","anguished","angular","animal","animate","animating","animation","animator","anime","animosity","ankle","annex","annotate","announcer","annoying","annually","annuity","anointer","another","answering","antacid","antarctic","anteater","antelope","antennae","anthem","anthill","anthology","antibody","antics","antidote","antihero","antiquely","antiques","antiquity","antirust","antitoxic","antitrust","antiviral","antivirus","antler","antonym","antsy","anvil","anybody","anyhow","anymore","anyone","anyplace","anything","anytime","anyway","anywhere","aorta","apache","apostle","appealing","appear","appease","appeasing","appendage","appendix","appetite","appetizer","applaud","applause","apple","appliance","applicant","applied","apply","appointee","appraisal","appraiser","apprehend","approach","approval","approve","apricot","april","apron","aptitude","aptly","aqua","aqueduct","arbitrary","arbitrate","ardently","area","arena","arguable","arguably","argue","arise","armadillo","armband","armchair","armed","armful","armhole","arming","armless","armoire","armored","armory","armrest","army","aroma","arose","around","arousal","arrange","array","arrest","arrival","arrive","arrogance","arrogant","arson","art","ascend","ascension","ascent","ascertain","ashamed","ashen","ashes","ashy","aside","askew","asleep","asparagus","aspect","aspirate","aspire","aspirin","astonish","astound","astride","astrology","astronaut","astronomy","astute","atlantic","atlas","atom","atonable","atop","atrium","atrocious","atrophy","attach","attain","attempt","attendant","attendee","attention","attentive","attest","attic","attire","attitude","attractor","attribute","atypical","auction","audacious","audacity","audible","audibly","audience","audio","audition","augmented","august","authentic","author","autism","autistic","autograph","automaker","automated","automatic","autopilot","available","avalanche","avatar","avenge","avenging","avenue","average","aversion","avert","aviation","aviator","avid","avoid","await","awaken","award","aware","awhile","awkward","awning","awoke","awry","axis","babble","babbling","babied","baboon","backache","backboard","backboned","backdrop","backed","backer","backfield","backfire","backhand","backing","backlands","backlash","backless","backlight","backlit","backlog","backpack","backpedal","backrest","backroom","backshift","backside","backslid","backspace","backspin","backstab","backstage","backtalk","backtrack","backup","backward","backwash","backwater","backyard","bacon","bacteria","bacterium","badass","badge","badland","badly","badness","baffle","baffling","bagel","bagful","baggage","bagged","baggie","bagginess","bagging","baggy","bagpipe","baguette","baked","bakery","bakeshop","baking","balance","balancing","balcony","balmy","balsamic","bamboo","banana","banish","banister","banjo","bankable","bankbook","banked","banker","banking","banknote","bankroll","banner","bannister","banshee","banter","barbecue","barbed","barbell","barber","barcode","barge","bargraph","barista","baritone","barley","barmaid","barman","barn","barometer","barrack","barracuda","barrel","barrette","barricade","barrier","barstool","bartender","barterer","bash","basically","basics","basil","basin","basis","basket","batboy","batch","bath","baton","bats","battalion","battered","battering","battery","batting","battle","bauble","bazooka","blabber","bladder","blade","blah","blame","blaming","blanching","blandness","blank","blaspheme","blasphemy","blast","blatancy","blatantly","blazer","blazing","bleach","bleak","bleep","blemish","blend","bless","blighted","blimp","bling","blinked","blinker","blinking","blinks","blip","blissful","blitz","blizzard","bloated","bloating","blob","blog","bloomers","blooming","blooper","blot","blouse","blubber","bluff","bluish","blunderer","blunt","blurb","blurred","blurry","blurt","blush","blustery","boaster","boastful","boasting","boat","bobbed","bobbing","bobble","bobcat","bobsled","bobtail","bodacious","body","bogged","boggle","bogus","boil","bok","bolster","bolt","bonanza","bonded","bonding","bondless","boned","bonehead","boneless","bonelike","boney","bonfire","bonnet","bonsai","bonus","bony","boogeyman","boogieman","book","boondocks","booted","booth","bootie","booting","bootlace","bootleg","boots","boozy","borax","boring","borough","borrower","borrowing","boss","botanical","botanist","botany","botch","both","bottle","bottling","bottom","bounce","bouncing","bouncy","bounding","boundless","bountiful","bovine","boxcar","boxer","boxing","boxlike","boxy","breach","breath","breeches","breeching","breeder","breeding","breeze","breezy","brethren","brewery","brewing","briar","bribe","brick","bride","bridged","brigade","bright","brilliant","brim","bring","brink","brisket","briskly","briskness","bristle","brittle","broadband","broadcast","broaden","broadly","broadness","broadside","broadways","broiler","broiling","broken","broker","bronchial","bronco","bronze","bronzing","brook","broom","brought","browbeat","brownnose","browse","browsing","bruising","brunch","brunette","brunt","brush","brussels","brute","brutishly","bubble","bubbling","bubbly","buccaneer","bucked","bucket","buckle","buckshot","buckskin","bucktooth","buckwheat","buddhism","buddhist","budding","buddy","budget","buffalo","buffed","buffer","buffing","buffoon","buggy","bulb","bulge","bulginess","bulgur","bulk","bulldog","bulldozer","bullfight","bullfrog","bullhorn","bullion","bullish","bullpen","bullring","bullseye","bullwhip","bully","bunch","bundle","bungee","bunion","bunkbed","bunkhouse","bunkmate","bunny","bunt","busboy","bush","busily","busload","bust","busybody","buzz","cabana","cabbage","cabbie","cabdriver","cable","caboose","cache","cackle","cacti","cactus","caddie","caddy","cadet","cadillac","cadmium","cage","cahoots","cake","calamari","calamity","calcium","calculate","calculus","caliber","calibrate","calm","caloric","calorie","calzone","camcorder","cameo","camera","camisole","camper","campfire","camping","campsite","campus","canal","canary","cancel","candied","candle","candy","cane","canine","canister","cannabis","canned","canning","cannon","cannot","canola","canon","canopener","canopy","canteen","canyon","capable","capably","capacity","cape","capillary","capital","capitol","capped","capricorn","capsize","capsule","caption","captivate","captive","captivity","capture","caramel","carat","caravan","carbon","cardboard","carded","cardiac","cardigan","cardinal","cardstock","carefully","caregiver","careless","caress","caretaker","cargo","caring","carless","carload","carmaker","carnage","carnation","carnival","carnivore","carol","carpenter","carpentry","carpool","carport","carried","carrot","carrousel","carry","cartel","cartload","carton","cartoon","cartridge","cartwheel","carve","carving","carwash","cascade","case","cash","casing","casino","casket","cassette","casually","casualty","catacomb","catalog","catalyst","catalyze","catapult","cataract","catatonic","catcall","catchable","catcher","catching","catchy","caterer","catering","catfight","catfish","cathedral","cathouse","catlike","catnap","catnip","catsup","cattail","cattishly","cattle","catty","catwalk","caucasian","caucus","causal","causation","cause","causing","cauterize","caution","cautious","cavalier","cavalry","caviar","cavity","cedar","celery","celestial","celibacy","celibate","celtic","cement","census","ceramics","ceremony","certainly","certainty","certified","certify","cesarean","cesspool","chafe","chaffing","chain","chair","chalice","challenge","chamber","chamomile","champion","chance","change","channel","chant","chaos","chaperone","chaplain","chapped","chaps","chapter","character","charbroil","charcoal","charger","charging","chariot","charity","charm","charred","charter","charting","chase","chasing","chaste","chastise","chastity","chatroom","chatter","chatting","chatty","cheating","cheddar","cheek","cheer","cheese","cheesy","chef","chemicals","chemist","chemo","cherisher","cherub","chess","chest","chevron","chevy","chewable","chewer","chewing","chewy","chief","chihuahua","childcare","childhood","childish","childless","childlike","chili","chill","chimp","chip","chirping","chirpy","chitchat","chivalry","chive","chloride","chlorine","choice","chokehold","choking","chomp","chooser","choosing","choosy","chop","chosen","chowder","chowtime","chrome","chubby","chuck","chug","chummy","chump","chunk","churn","chute","cider","cilantro","cinch","cinema","cinnamon","circle","circling","circular","circulate","circus","citable","citadel","citation","citizen","citric","citrus","city","civic","civil","clad","claim","clambake","clammy","clamor","clamp","clamshell","clang","clanking","clapped","clapper","clapping","clarify","clarinet","clarity","clash","clasp","class","clatter","clause","clavicle","claw","clay","clean","clear","cleat","cleaver","cleft","clench","clergyman","clerical","clerk","clever","clicker","client","climate","climatic","cling","clinic","clinking","clip","clique","cloak","clobber","clock","clone","cloning","closable","closure","clothes","clothing","cloud","clover","clubbed","clubbing","clubhouse","clump","clumsily","clumsy","clunky","clustered","clutch","clutter","coach","coagulant","coastal","coaster","coasting","coastland","co
1astline","coat","coauthor","cobalt","cobbler","cobweb","cocoa","coconut","cod","coeditor","coerce","coexist","coffee","cofounder","cognition","cognitive","cogwheel","coherence","coherent","cohesive","coil","coke","cola","cold","coleslaw","coliseum","collage","collapse","collar","collected","collector","collide","collie","collision","colonial","colonist","colonize","colony","colossal","colt","coma","come","comfort","comfy","comic","coming","comma","commence","commend","comment","commerce","commode","commodity","commodore","common","commotion","commute","commuting","compacted","compacter","compactly","compactor","companion","company","compare","compel","compile","comply","component","composed","composer","composite","compost","composure","compound","compress","comprised","computer","computing","comrade","concave","conceal","conceded","concept","concerned","concert","conch","concierge","concise","conclude","concrete","concur","condense","condiment","condition","condone","conducive","conductor","conduit","cone","confess","confetti","confidant","confident","confider","confiding","configure","confined","confining","confirm","conflict","conform","confound","confront","confused","confusing","confusion","congenial","congested","congrats","congress","conical","conjoined","conjure","conjuror","connected","connector","consensus","consent","console","consoling","consonant","constable","constant","constrain","constrict","construct","consult","consumer","consuming","contact","container","contempt","contend","contented","contently","contents","contest","context","contort","contour","contrite","control","contusion","convene","convent","copartner","cope","copied","copier","copilot","coping","copious","copper","copy","coral","cork","cornball","cornbread","corncob","cornea","corned","corner","cornfield","cornflake","cornhusk","cornmeal","cornstalk","corny","coronary","coroner","corporal","corporate","corral","correct","corridor","corrode","corroding","corrosive","corsage","corset","cortex","cosigner","cosmetics","cosmic","cosmos","cosponsor","cost","cottage","cotton","couch","cough","could","countable","countdown","counting","countless","country","county","courier","covenant","cover","coveted","coveting","coyness","cozily","coziness","cozy","crabbing","crabgrass","crablike","crabmeat","cradle","cradling","crafter","craftily","craftsman","craftwork","crafty","cramp","cranberry","crane","cranial","cranium","crank","crate","crave","craving","crawfish","crawlers","crawling","crayfish","crayon","crazed","crazily","craziness","crazy","creamed","creamer","creamlike","crease","creasing","creatable","create","creation","creative","creature","credible","credibly","credit","creed","creme","creole","crepe","crept","crescent","crested","cresting","crestless","crevice","crewless","crewman","crewmate","crib","cricket","cried","crier","crimp","crimson","cringe","cringing","crinkle","crinkly","crisped","crisping","crisply","crispness","crispy","criteria","critter","croak","crock","crook","croon","crop","cross","crouch","crouton","crowbar","crowd","crown","crucial","crudely","crudeness","cruelly","cruelness","cruelty","crumb","crummiest","crummy","crumpet","crumpled","cruncher","crunching","crunchy","crusader","crushable","crushed","crusher","crushing","crust","crux","crying","cryptic","crystal","cubbyhole","cube","cubical","cubicle","cucumber","cuddle","cuddly","cufflink","culinary","culminate","culpable","culprit","cultivate","cultural","culture","cupbearer","cupcake","cupid","cupped","cupping","curable","curator","curdle","cure","curfew","curing","curled","curler","curliness","curling","curly","curry","curse","cursive","cursor","curtain","curtly","curtsy","curvature","curve","curvy","cushy","cusp","cussed","custard","custodian","custody","customary","customer","customize","customs","cut","cycle","cyclic","cycling","cyclist","cylinder","cymbal","cytoplasm","cytoplast","dab","dad","daffodil","dagger","daily","daintily","dainty","dairy","daisy","dallying","dance","dancing","dandelion","dander","dandruff","dandy","danger","dangle","dangling","daredevil","dares","daringly","darkened","darkening","darkish","darkness","darkroom","darling","darn","dart","darwinism","dash","dastardly","data","datebook","dating","daughter","daunting","dawdler","dawn","daybed","daybreak","daycare","daydream","daylight","daylong","dayroom","daytime","dazzler","dazzling","deacon","deafening","deafness","dealer","dealing","dealmaker","dealt","dean","debatable","debate","debating","debit","debrief","debtless","debtor","debug","debunk","decade","decaf","decal","decathlon","decay","deceased","deceit","deceiver","deceiving","december","decency","decent","deception","deceptive","decibel","decidable","decimal","decimeter","decipher","deck","declared","decline","decode","decompose","decorated","decorator","decoy","decrease","decree","dedicate","dedicator","deduce","deduct","deed","deem","deepen","deeply","deepness","deface","defacing","defame","default","defeat","defection","defective","defendant","defender","defense","defensive","deferral","deferred","defiance","defiant","defile","defiling","define","definite","deflate","deflation","deflator","deflected","deflector","defog","deforest","defraud","defrost","deftly","defuse","defy","degraded","degrading","degrease","degree","dehydrate","deity","dejected","delay","delegate","delegator","delete","deletion","delicacy","delicate","delicious","delighted","delirious","delirium","deliverer","delivery","delouse","delta","deluge","delusion","deluxe","demanding","demeaning","demeanor","demise","democracy","democrat","demote","demotion","demystify","denatured","deniable","denial","denim","denote","dense","density","dental","dentist","denture","deny","deodorant","deodorize","departed","departure","depict","deplete","depletion","deplored","deploy","deport","depose","depraved","depravity","deprecate","depress","deprive","depth","deputize","deputy","derail","deranged","derby","derived","desecrate","deserve","deserving","designate","designed","designer","designing","deskbound","desktop","deskwork","desolate","despair","despise","despite","destiny","destitute","destruct","detached","detail","detection","detective","detector","detention","detergent","detest","detonate","detonator","detoxify","detract","deuce","devalue","deviancy","deviant","deviate","deviation","deviator","device","devious","devotedly","devotee","devotion","devourer","devouring","devoutly","dexterity","dexterous","diabetes","diabetic","diabolic","diagnoses","diagnosis","diagram","dial","diameter","diaper","diaphragm","diary","dice","dicing","dictate","dictation","dictator","difficult","diffused","diffuser","diffusion","diffusive","dig","dilation","diligence","diligent","dill","dilute","dime","diminish","dimly","dimmed","dimmer","dimness","dimple","diner","dingbat","dinghy","dinginess","dingo","dingy","dining","dinner","diocese","dioxide","diploma","dipped","dipper","dipping","directed","direction","directive","directly","directory","direness","dirtiness","disabled","disagree","disallow","disarm","disarray","disaster","disband","disbelief","disburse","discard","discern","discharge","disclose","discolor","discount","discourse","discover","discuss","disdain","disengage","disfigure","disgrace","dis
1h","disinfect","disjoin","disk","dislike","disliking","dislocate","dislodge","disloyal","dismantle","dismay","dismiss","dismount","disobey","disorder","disown","disparate","disparity","dispatch","dispense","dispersal","dispersed","disperser","displace","display","displease","disposal","dispose","disprove","dispute","disregard","disrupt","dissuade","distance","distant","distaste","distill","distinct","distort","distract","distress","district","distrust","ditch","ditto","ditzy","dividable","divided","dividend","dividers","dividing","divinely","diving","divinity","divisible","divisibly","division","divisive","divorcee","dizziness","dizzy","doable","docile","dock","doctrine","document","dodge","dodgy","doily","doing","dole","dollar","dollhouse","dollop","dolly","dolphin","domain","domelike","domestic","dominion","dominoes","donated","donation","donator","donor","donut","doodle","doorbell","doorframe","doorknob","doorman","doormat","doornail","doorpost","doorstep","doorstop","doorway","doozy","dork","dormitory","dorsal","dosage","dose","dotted","doubling","douche","dove","down","dowry","doze","drab","dragging","dragonfly","dragonish","dragster","drainable","drainage","drained","drainer","drainpipe","dramatic","dramatize","drank","drapery","drastic","draw","dreaded","dreadful","dreadlock","dreamboat","dreamily","dreamland","dreamless","dreamlike","dreamt","dreamy","drearily","dreary","drench","dress","drew","dribble","dried","drier","drift","driller","drilling","drinkable","drinking","dripping","drippy","drivable","driven","driver","driveway","driving","drizzle","drizzly","drone","drool","droop","drop-down","dropbox","dropkick","droplet","dropout","dropper","drove","drown","drowsily","drudge","drum","dry","dubbed","dubiously","duchess","duckbill","ducking","duckling","ducktail","ducky","duct","dude","duffel","dugout","duh","duke","duller","dullness","duly","dumping","dumpling","dumpster","duo","dupe","duplex","duplicate","duplicity","durable","durably","duration","duress","during","dusk","dust","dutiful","duty","duvet","dwarf","dweeb","dwelled","dweller","dwelling","dwindle","dwindling","dynamic","dynamite","dynasty","dyslexia","dyslexic","each","eagle","earache","eardrum","earflap","earful","earlobe","early","earmark","earmuff","earphone","earpiece","earplugs","earring","earshot","earthen","earthlike","earthling","earthly","earthworm","earthy","earwig","easeful","easel","easiest","easily","easiness","easing","eastbound","eastcoast","easter","eastward","eatable","eaten","eatery","eating","eats","ebay","ebony","ebook","ecard","eccentric","echo","eclair","eclipse","ecologist","ecology","economic","economist","economy","ecosphere","ecosystem","edge","edginess","edging","edgy","edition","editor","educated","education","educator","eel","effective","effects","efficient","effort","eggbeater","egging","eggnog","eggplant","eggshell","egomaniac","egotism","egotistic","either","eject","elaborate","elastic","elated","elbow","eldercare","elderly","eldest","electable","election","elective","elephant","elevate","elevating","elevation","elevator","eleven","elf","eligible","eligibly","eliminate","elite","elitism","elixir","elk","ellipse","elliptic","elm","elongated","elope","eloquence","eloquent","elsewhere","elude","elusive","elves","email","embargo","embark","embassy","embattled","embellish","ember","embezzle","emblaze","emblem","embody","embolism","emboss","embroider","emcee","emerald","emergency","emission","emit","emote","emoticon","emotion","empathic","empathy","emperor","emphases","emphasis","emphasize","emphatic","empirical","employed","employee","employer","emporium","empower","emptier","emptiness","empty","emu","enable","enactment","enamel","enchanted","enchilada","encircle","enclose","enclosure","encode","encore","encounter","encourage","encroach","encrust","encrypt","endanger","endeared","endearing","ended","ending","endless","endnote","endocrine","endorphin","endorse","endowment","endpoint","endurable","endurance","enduring","energetic","energize","energy","enforced","enforcer","engaged","engaging","engine","engorge","engraved","engraver","engraving","engross","engulf","enhance","enigmatic","enjoyable","enjoyably","enjoyer","enjoying","enjoyment","enlarged","enlarging","enlighten","enlisted","enquirer","enrage","enrich","enroll","enslave","ensnare","ensure","entail","entangled","entering","entertain","enticing","entire","entitle","entity","entomb","entourage","entrap","entree","entrench","entrust","entryway","entwine","enunciate","envelope","enviable","enviably","envious","envision","envoy","envy","enzyme","epic","epidemic","epidermal","epidermis","epidural","epilepsy","epileptic","epilogue","epiphany","episode","equal","equate","equation","equator","equinox","equipment","equity","equivocal","eradicate","erasable","erased","eraser","erasure","ergonomic","errand","errant","erratic","error","erupt","escalate","escalator","escapable","escapade","escapist","escargot","eskimo","esophagus","espionage","espresso","esquire","essay","essence","essential","establish","estate","esteemed","estimate","estimator","estranged","estrogen","etching","eternal","eternity","ethanol","ether","ethically","ethics","eup
1hemism","evacuate","evacuee","evade","evaluate","evaluator","evaporate","evasion","evasive","even","everglade","evergreen","everybody","everyday","everyone","evict","evidence","evident","evil","evoke","evolution","evolve","exact","exalted","example","excavate","excavator","exceeding","exception","excess","exchange","excitable","exciting","exclaim","exclude","excluding","exclusion","exclusive","excretion","excretory","excursion","excusable","excusably","excuse","exemplary","exemplify","exemption","exerciser","exert","exes","exfoliate","exhale","exhaust","exhume","exile","existing","exit","exodus","exonerate","exorcism","exorcist","expand","expanse","expansion","expansive","expectant","expedited","expediter","expel","expend","expenses","expensive","expert","expire","expiring","explain","expletive","explicit","explode","exploit","explore","exploring","exponent","exporter","exposable","expose","exposure","express","expulsion","exquisite","extended","extending","extent","extenuate","exterior","external","extinct","extortion","extradite","extras","extrovert","extrude","extruding","exuberant","fable","fabric","fabulous","facebook","facecloth","facedown","faceless","facelift","faceplate","faceted","facial","facility","facing","facsimile","faction","factoid","factor","factsheet","factual","faculty","fade","fading","failing","falcon","fall","false","falsify","fame","familiar","family","famine","famished","fanatic","fancied","fanciness","fancy","fanfare","fang","fanning","fantasize","fantastic","fantasy","fascism","fastball","faster","fasting","fastness","faucet","favorable","favorably","favored","favoring","favorite","fax","feast","federal","fedora","feeble","feed","feel","feisty","feline","felt-tip","feminine","feminism","feminist","feminize","femur","fence","fencing","fender","ferment","fernlike","ferocious","ferocity","ferret","ferris","ferry","fervor","fester","festival","festive","festivity","fetal","fetch","fever","fiber","fiction","fiddle","fiddling","fidelity","fidgeting","fidgety","fifteen","fifth","fiftieth","fifty","figment","figure","figurine","filing","filled","filler","filling","film","filter","filth","filtrate","finale","finalist","finalize","finally","finance","financial","finch","fineness","finer","finicky","finished","finisher","finishing","finite","finless","finlike","fiscally","fit","five","flaccid","flagman","flagpole","flagship","flagstick","flagstone","flail","flakily","flaky","flame","flammable","flanked","flanking","flannels","flap","flaring","flashback","flashbulb","flashcard","flashily","flashing","flashy","flask","flatbed","flatfoot","flatly","flatness","flatten","flattered","flatterer","flattery","flattop","flatware","flatworm","flavored","flavorful","flavoring","flaxseed","fled","fleshed","fleshy","flick","flier","flight","flinch","fling","flint","flip","flirt","float","flock","flogging","flop","floral","florist","floss","flounder","flyable","flyaway","flyer","flying","flyover","flypaper","foam","foe","fog","foil","folic","folk","follicle","follow","fondling","fondly","fondness","fondue","font","food","fool","footage","football","footbath","footboard","footer","footgear","foothill","foothold","footing","footless","footman","footnote","footpad","footpath","footprint","footrest","footsie","footsore","footwear","footwork","fossil","foster","founder","founding","fountain","fox","foyer","fraction","fracture","fragile","fragility","fragment","fragrance","fragrant","frail","frame","framing","frantic","fraternal","frayed","fraying","frays","freckled","freckles","freebase","freebee","freebie","freedom","freefall","freehand","freeing","freeload","freely","freemason","freeness","freestyle","freeware","freeway","freewill","freezable","freezing","freight","french","frenzied","frenzy","frequency","frequent","fresh","fretful","fretted","friction","friday","fridge","fried","friend","frighten","frightful","frigidity","frigidly","frill","fringe","frisbee","frisk","fritter","frivolous","frolic","from","front","frostbite","frosted","frostily","frosting","frostlike","frosty","froth","frown","frozen","fructose","frugality","frugally","fruit","frustrate","frying","gab","gaffe","gag","gainfully","gaining","gains","gala","gallantly","galleria","gallery","galley","gallon","gallows","gallstone","galore","galvanize","gambling","game","gaming","gamma","gander","gangly","gangrene","gangway","gap","garage","garbage","garden","gargle","garland","garlic","garment","garnet","garnish","garter","gas","gatherer","gathering","gating","gauging","gauntlet","gauze","gave","gawk","gazing","gear","gecko","geek","geiger","gem","gender","generic","generous","genetics","genre","gentile","gentleman","gently","gents","geography","geologic","geologist","geology","geometric","geometry","geranium","gerbil","geriatric","germicide","germinate","germless","germproof","gestate","gestation","gesture","getaway","getting","getup","giant","gibberish","giblet","giddily","gi
1ddiness","giddy","gift","gigabyte","gigahertz","gigantic","giggle","giggling","giggly","gigolo","gilled","gills","gimmick","girdle","giveaway","given","giver","giving","gizmo","gizzard","glacial","glacier","glade","gladiator","gladly","glamorous","glamour","glance","glancing","glandular","glare","glaring","glass","glaucoma","glazing","gleaming","gleeful","glider","gliding","glimmer","glimpse","glisten","glitch","glitter","glitzy","gloater","gloating","gloomily","gloomy","glorified","glorifier","glorify","glorious","glory","gloss","glove","glowing","glowworm","glucose","glue","gluten","glutinous","glutton","gnarly","gnat","goal","goatskin","goes","goggles","going","goldfish","goldmine","goldsmith","golf","goliath","gonad","gondola","gone","gong","good","gooey","goofball","goofiness","goofy","google","goon","gopher","gore","gorged","gorgeous","gory","gosling","gossip","gothic","gotten","gout","gown","grab","graceful","graceless","gracious","gradation","graded","grader","gradient","grading","gradually","graduate","graffiti","grafted","grafting","grain","granddad","grandkid","grandly","grandma","grandpa","grandson","granite","granny","granola","grant","granular","grape","graph","grapple","grappling","grasp","grass","gratified","gratify","grating","gratitude","gratuity","gravel","graveness","graves","graveyard","gravitate","gravity","gravy","gray","grazing","greasily","greedily","greedless","greedy","green","greeter","greeting","grew","greyhound","grid","grief","grievance","grieving","grievous","grill","grimace","grimacing","grime","griminess","grimy","grinch","grinning","grip","gristle","grit","groggily","groggy","groin","groom","groove","grooving","groovy","grope","ground","grouped","grout","grove","grower","growing","growl","grub","grudge","grudging","grueling","gruffly","grumble","grumbling","grumbly","grumpily","grunge","grunt","guacamole","guidable","guidance","guide","guiding","guileless","guise","gulf","gullible","gully","gulp","gumball","gumdrop","gumminess","gumming","gummy","gurgle","gurgling","guru","gush","gusto","gusty","gutless","guts","gutter","guy","guzzler","gyration","habitable","habitant","habitat","habitual","hacked","hacker","hacking","hacksaw","had","haggler","haiku","half","halogen","halt","halved","halves","hamburger","hamlet","hammock","hamper","hamster","hamstring","handbag","handball","handbook","handbrake","handcart","handclap","handclasp","handcraft","handcuff","handed","handful","handgrip","handgun","handheld","handiness","handiwork","handlebar","handled","handler","handling","handmade","handoff","handpick","handprint","handrail","handsaw","handset","handsfree","handshake","handstand","handwash","handwork","handwoven","handwrite","handyman","hangnail","hangout","hangover","hangup","hankering","hankie","hanky","haphazard","happening","happier","happiest","happily","happiness","happy","harbor","hardcopy","hardcore","hardcover","harddisk","hardened","hardener","hardening","hardhat","hardhead","hardiness","hardly","hardness","hardship","hardware","hardwired","hardwood","hardy","harmful","harmless","harmonica","harmonics","harmonize","harmony","harness","harpist","harsh","harvest","hash","hassle","haste","hastily","hastiness","hasty","hatbox","hatchback","hatchery","hatchet","hatching","hatchling","hate","hatless","hatred","haunt","haven","hazard","hazelnut","hazily","haziness","hazing","hazy","headache","headband","headboard","headcount","headdress","headed","header","headfirst","headgear","heading","headlamp","headless","headlock","headphone","headpiece","headrest","headroom","headscarf","headset","headsman","headstand","headstone","headway","headwear","heap","heat","heave","heavily","heaviness","heaving","hedge","hedging","heftiness","hefty","helium","helmet","helper","helpful","helping","helpless","helpline","hemlock","hemstitch","hence","henchman","henna","herald","herbal","herbicide","herbs","heritage","hermit","heroics","heroism","herring","herself","hertz","hesitancy","hesitant","hesitate","hexagon","hexagram","hubcap","huddle","huddling","huff","hug","hula","hulk","hull","human","humble","humbling","humbly","humid","humiliate","humility","humming","hummus","humongous","humorist","humorless","humorous","humpback","humped","humvee","hunchback","hundredth","hunger","hungr
1ily","hungry","hunk","hunter","hunting","huntress","huntsman","hurdle","hurled","hurler","hurling","hurray","hurricane","hurried","hurry","hurt","husband","hush","husked","huskiness","hut","hybrid","hydrant","hydrated","hydration","hydrogen","hydroxide","hyperlink","hypertext","hyphen","hypnoses","hypnosis","hypnotic","hypnotism","hypnotist","hypnotize","hypocrisy","hypocrite","ibuprofen","ice","iciness","icing","icky","icon","icy","idealism","idealist","idealize","ideally","idealness","identical","identify","identity","ideology","idiocy","idiom","idly","igloo","ignition","ignore","iguana","illicitly","illusion","illusive","image","imaginary","imagines","imaging","imbecile","imitate","imitation","immature","immerse","immersion","imminent","immobile","immodest","immorally","immortal","immovable","immovably","immunity","immunize","impaired","impale","impart","impatient","impeach","impeding","impending","imperfect","imperial","impish","implant","implement","implicate","implicit","implode","implosion","implosive","imply","impolite","important","importer","impose","imposing","impotence","impotency","impotent","impound","imprecise","imprint","imprison","impromptu","improper","improve","improving","improvise","imprudent","impulse","impulsive","impure","impurity","iodine","iodize","ion","ipad","iphone","ipod","irate","irk","iron","irregular","irrigate","irritable","irritably","irritant","irritate","islamic","islamist","isolated","isolating","isolation","isotope","issue","issuing","italicize","italics","item","itinerary","itunes","ivory","ivy","jab","jackal","jacket","jackknife","jackpot","jailbird","jailbreak","jailer","jailhouse","jalapeno","jam","janitor","january","jargon","jarring","jasmine","jaundice","jaunt","java","jawed","jawless","jawline","jaws","jaybird","jaywalker","jazz","jeep","jeeringly","jellied","jelly","jersey","jester","jet","jiffy","jigsaw","jimmy","jingle","jingling","jinx","jitters","jittery","job","jockey","jockstrap","jogger","jogging","john","joining","jokester","jokingly","jolliness","jolly","jolt","jot","jovial","joyfully","joylessly","joyous","joyride","joystick","jubilance","jubilant","judge","judgingly","judicial","judiciary","judo","juggle","juggling","jugular","juice","juiciness","juicy","jujitsu","jukebox","july","jumble","jumbo","jump","junction","juncture","june","junior","juniper","junkie","junkman","
1junkyard","jurist","juror","jury","justice","justifier","justify","justly","justness","juvenile","kabob","kangaroo","karaoke","karate","karma","kebab","keenly","keenness","keep","keg","kelp","kennel","kept","kerchief","kerosene","kettle","kick","kiln","kilobyte","kilogram","kilometer","kilowatt","kilt","kimono","kindle","kindling","kindly","kindness","kindred","kinetic","kinfolk","king","kinship","kinsman","kinswoman","kissable","kisser","kissing","kitchen","kite","kitten","kitty","kiwi","kleenex","knapsack","knee","knelt","knickers","knoll","koala","kooky","kosher","krypton","kudos","kung","labored","laborer","laboring","laborious","labrador","ladder","ladies","ladle","ladybug","ladylike","lagged","lagging","lagoon","lair","lake","lance","landed","landfall","landfill","landing","landlady","landless","landline","landlord","landmark","landmass","landmine","landowner","landscape","landside","landslide","language","lankiness","lanky","lantern","lapdog","lapel","lapped","lapping","laptop","lard","large","lark","lash","lasso","last","latch","late","lather","latitude","latrine","latter","latticed","launch","launder","laundry","laurel","lavender","lavish","laxative","lazily","laziness","lazy","lecturer","left","legacy","legal","legend","legged","leggings","legible","legibly","legislate","lego","legroom","legume","legwarmer","legwork","lemon","lend","length","lens","lent","leotard","lesser","letdown","lethargic","lethargy","letter","lettuce","level","leverage","levers","levitate","levitator","liability","liable","liberty","librarian","library","licking","licorice","lid","life","lifter","lifting","liftoff","ligament","likely","likeness","likewise","liking","lilac","lilly","lily","limb","limeade","limelight","limes","limit","limping","limpness","line","lingo","linguini","linguist","lining","linked","linoleum","linseed","lint","lion","lip","liquefy","liqueur","liquid","lisp","list","litigate","litigator","litmus","litter","little","livable","lived","lively","liver","livestock","lividly","living","lizard","lubricant","lubricate","lucid","luckily","luckiness","luckless","lucrative","ludicrous","lugged","lukewarm","lullaby","lumber","luminance","luminous","lumpiness","lumping","lumpish","lunacy","lunar","lunchbox","luncheon","lunchroom","lunchtime","lung","lurch","lure","luridness","lurk","lushly","lushness","luster","lustfully","lustily","lustiness","lustrous","lusty","luxurious","luxury","lying","lyrically","lyricism","lyricist","lyrics","macarena","macaroni","macaw","mace","machine","machinist","magazine","magenta","maggot","magical","magician","magma","magnesium","magnetic","magnetism","magnetize","magnifier","magnify","magnitude","magnolia","mahogany","maimed","majestic","majesty","majorette","majority","makeover","maker","makeshift","making","malformed","malt","mama","mammal","mammary","mammogram","manager","managing","manatee","mandarin","mandate","mandatory","mandolin","manger","mangle","mango","mangy","manhandle","manhole","manhood","manhunt","manicotti","manicure","manifesto","manila","mankind","manlike","manliness","manly","manmade","manned","mannish","manor","manpower","mantis","mantra","manual","many","map","marathon","marauding","marbled","marbles","marbling","march","mardi","margarine","margarita","margin","marigold","marina","marine","marital","maritime","marlin","marmalade","maroon","married","marrow","marry","marshland","marshy","marsupial","marvelous","marxism","mascot","masculine","mashed","mashing","massager","masses","massive","mastiff","matador","matchbook","matchbox","matcher","matching","matchless","material","maternal","maternity","math","mating","matriarch","matrimony","matrix","matron","matted","matter","maturely","maturing","maturity","mauve","maverick","maximize","maximum","maybe","mayday","mayflower","moaner","moaning","mobile","mobility","mobilize","mobster","mocha","mocker","mockup","modified","modify","modular","modulator","module","moisten","moistness","moisture","molar","molasse
1s","mold","molecular","molecule","molehill","mollusk","mom","monastery","monday","monetary","monetize","moneybags","moneyless","moneywise","mongoose","mongrel","monitor","monkhood","monogamy","monogram","monologue","monopoly","monorail","monotone","monotype","monoxide","monsieur","monsoon","monstrous","monthly","monument","moocher","moodiness","moody","mooing","moonbeam","mooned","moonlight","moonlike","moonlit","moonrise","moonscape","moonshine","moonstone","moonwalk","mop","morale","morality","morally","morbidity","morbidly","morphine","morphing","morse","mortality","mortally","mortician","mortified","mortify","mortuary","mosaic","mossy","most","mothball","mothproof","motion","motivate","motivator","motive","motocross","motor","motto","mountable","mountain","mounted","mounting","mourner","mournful","mouse","mousiness","moustache","mousy","mouth","movable","move","movie","moving","mower","mowing","much","muck","mud","mug","mulberry","mulch","mule","mulled","mullets","multiple","multiply","multitask","multitude","mumble","mumbling","mumbo","mummified","mummify","mummy","mumps","munchkin","mundane","municipal","muppet","mural","murkiness","murky","murmuring","muscular","museum","mushily","mushiness","mushroom","mushy","music","musket","muskiness","musky","mustang","mustard","muster","mustiness","musty","mutable","mutate","mutation","mute","mutilated","mutilator","mutiny","mutt","mutual","muzzle","myself","myspace","mystified","mystify","myth","nacho","nag","nail","name","naming","nanny","nanometer","nape","napkin","napped","napping","nappy","narrow","nastily","nastiness","national","native","nativity","natural","nature","naturist","nautical","navigate","navigator","navy","nearby","nearest","nearly","nearness","neatly","neatness","nebula","nebulizer","nectar","negate","negation","negative","neglector","negligee","negligent","negotiate","nemeses","nemesis","neon","nephew","nerd","nervous","nervy","nest","net","neurology","neuron","neurosis","neurotic","neuter","neutron","never","next","nibble","nickname","nicotine","niece","nifty","nimble","nimbly","nineteen","ninetieth","ninja","nintendo","ninth","nuclear","nuclei","nucleus","nugget","nullify","number","numbing","numbly","numbness","numeral","numerate","numerator","numeric","numerous","nuptials","nursery","nursing","nurture","nutcase","nutlike","nutmeg","nutrient","nutshell","nuttiness","nutty","nuzzle","nylon","oaf","oak","oasis","oat","obedience","obedient","obituary","object","obligate","obliged","oblivion","oblivious","oblong","obnoxious","oboe","obscure","obscurity","observant","observer","observing","obsessed","obsession","obsessive","obsolete","obstacle","obstinate","obstruct","obtain","obtrusive","obtuse","obvious","occultist","occupancy","occupant","occupier","occupy","ocean","ocelot","octagon","octane","october","octopus","ogle","oil","oink","ointment","okay","old","olive","olympics","omega","omen","ominous","omission","omit","omnivore","onboard","oncoming","ongoing","onion","online","onlooker","only","onscreen","onset","onshore","onslaught","onstage","onto","onward","onyx","oops","ooze","oozy","opacity","opal","open","operable","operate","operating","operation","operative","operator","opium","opossum","opponent","oppose","opposing","opposite","oppressed","oppressor","opt","opulently","osmosis","other","otter","ouch","ought","ounce","outage","outback","outbid","outboard","outbound","outbreak","outburst","outcast","outclass","outcome","outdated","outdoors","outer","outfield","outfit","outflank","outgoing","outgrow","outhouse","outing","outlast","outlet","outline","outlook","outlying","outmatch","outmost","outnumber","outplayed","outpost","outpour","output","outrage","outrank","outreach","outright","outscore","outsell","outshine","outshoot","outsider","outskirts","outsmart","outsource","outspoken","outtakes","outthink","outward","outweigh","outwit","oval","ovary","oven","overact","overall","overarch","overbid","overbill","overbite","overblown","overboard","overbook","overbuilt","overcast","overcoat","overcome","overcook","overcrowd","overdraft","overdrawn","overdress","overdrive","overdue","overeager","overeater","overexert","overfed","overfeed","overfill","overflow","overfull","overgrown","overhand","overhang","overhaul","overhead","overhear","overheat","overhung","overjoyed","overkill","overlabor","overlaid","overlap","overlay","overload","overlook","overlord","overlying","overnight","overpass","overpay","overplant","overplay","overpower","overprice","overrate","overreach","overreact","override","overripe","overrule","overrun","overshoot","overshot","oversight","oversized","oversleep","oversold","overspend","overstate","overstay","overstep","overstock","overstuff","oversweet","overtake","overthrow","overtime","overtly","overtone","overture","overturn","overuse","overvalue","overview","overwrite","owl","oxford","oxidant","oxidation","oxidize","oxidizing","oxygen","oxymoron","oyster","ozone","paced","pacemaker","pacific","pacifier","pacifism","pacifist","pacify","padded","padding","paddle","paddling","padlock","pagan","pager","paging","pajamas","palace","palatable","palm","palpable","palpitate","paltry","pampered","pamperer","pampers","pamphlet","panama","pancake","pancreas","panda","pandemic","pang","panhandle","panic","panning","panorama","panoramic","panther","pantomime","pantry","pants","pantyhose","paparazzi","papaya","paper","paprika","papyrus","parabola","parachute","parade","paradox","paragraph","parakeet","paralegal","paralyses","paralysis","paralyze","paramedic","parameter","paramount","parasail","parasite","parasitic","parcel","parched","parchment","pardon","parish","parka","parking","parkway","parlor","parmesan","parole","parrot","parsley","parsnip","partake","parted","parting","partition","partly","partner","partridge","party","passable","passably","passage","passcode","passenger","passerby","passing","passion","passive","passivism","passover","passport","password","pasta","pasted","pastel","pastime","pastor","pastram
1i","pasture","pasty","patchwork","patchy","paternal","paternity","path","patience","patient","patio","patriarch","patriot","patrol","patronage","patronize","pauper","pavement","paver","pavestone","pavilion","paving","pawing","payable","payback","paycheck","payday","payee","payer","paying","payment","payphone","payroll","pebble","pebbly","pecan","pectin","peculiar","peddling","pediatric","pedicure","pedigree","pedometer","pegboard","pelican","pellet","pelt","pelvis","penalize","penalty","pencil","pendant","pending","penholder","penknife","pennant","penniless","penny","penpal","pension","pentagon","pentagram","pep","perceive","percent","perch","percolate","perennial","perfected","perfectly","perfume","periscope","perish","perjurer","perjury","perkiness","perky","perm","peroxide","perpetual","perplexed","persecute","persevere","persuaded","persuader","pesky","peso","pessimism","pessimist","pester","pesticide","petal","petite","petition","petri","petroleum","petted","petticoat","pettiness","petty","petunia","phantom","phobia","phoenix","phonebook","phoney","phonics","phoniness","phony","phosphate","photo","phrase","phrasing","placard","placate","placidly","plank","planner","plant","plasma","plaster","plastic","plated","platform","plating","platinum","platonic","platter","platypus","plausible","plausibly","playable","playback","player","playful","playgroup","playhouse","playing","playlist","playmaker","playmate","playoff","playpen","playroom","playset","plaything","playtime","plaza","pleading","pleat","pledge","plentiful","plenty","plethora","plexiglas","pliable","plod","plop","plot","plow","ploy","pluck","plug","plunder","plunging","plural","plus","plutonium","plywood","poach","pod","poem","poet","pogo","pointed","pointer","pointing","pointless","pointy","poise","poison","poker","poking","polar","police","policy","polio","polish","politely","polka","polo","polyester","polygon","polygraph","polymer","poncho","pond","pony","popcorn","pope","poplar","popper","poppy","popsicle","populace","popular","populate","porcupine","pork","porous","porridge","portable","portal","portfolio","porthole","portion","portly","portside","poser","posh","posing","possible","possibly","possum","postage","postal","postbox","postcard","posted","poster","posting","postnasal","posture","postwar","pouch","pounce","pouncing","pound","pouring","pout","powdered","powdering","powdery","power","powwow","pox","praising","prance","prancing","pranker","prankish","prankster","prayer","praying","preacher","preaching","preachy","preamble","precinct","precise","precision","precook","precut","predator","predefine","predict","preface","prefix","preflight","preformed","pregame","pregnancy","pregnant","preheated","prelaunch","prelaw","prelude","premiere","premises","premium","prenatal","preoccupy","preorder","prepaid","prepay","preplan","preppy","preschool","prescribe","preseason","preset","preshow","president","presoak","press","presume","presuming","preteen","pretended","pretender","pretense","pretext","pretty","pretzel","prevail","prevalent","prevent","preview","previous","prewar","prewashed","prideful","pried","primal","primarily","primary","primate","primer","primp","princess","print","prior","prism","prison","prissy","pristine","privacy","private","privatize","prize","proactive","probable","probably","probation","probe","probing","probiotic","problem","procedure","process","proclaim","procreate","procurer","prodigal","prodigy","produce","product","profane","profanity","professed","professor","profile","profound","profusely","progeny","prognosis","program","progress","projector","prologue","prolonged","promenade","prominent","promoter","promotion","prompter","promptly","prone","prong","pronounce","pronto","proofing","proofread","proofs","propeller","properly","property","proponent","proposal","propose","props","prorate","protector","protegee","proton","prototype","protozoan","protract","protrude","proud","provable","proved","proven","provided","provider","providing","province","proving","provoke","provoking","provolone","prowess","prowler","prowling","proximity","proxy","prozac","prude","prudishly","prune","pruning","pry","psychic","public","publisher","pucker","pueblo","pug","pull","pulmonary","pulp","pulsate","pulse","pulverize","puma","pumice","pummel","punch","punctual","punctuate","punctured","pungent","punisher","punk","pupil","puppet","puppy","purchase","pureblood","purebred","purely","pureness","purgatory","purge","purging","purifier","purify","purist","puritan","purity","purple","purplish","purposely","purr","purse","pursuable","pursuant","pursuit","purveyor","pushcart","pushchair","pusher","pushiness","pushing","pushover","pushpin","pushup","pushy","putdown","putt","puzzle","puzzling","pyramid","pyromania","python","quack","quadrant","quail","quaintly","quake","quaking","qualified","qualifier","qualify","quality","qualm","quantum","quarrel","quarry","quartered","quarterly","quarters","quartet","quench","query","quicken","quickly","quickness","quicksand","quickstep","quiet","quill","quilt","quintet","quintuple","quirk","quit","quiver","quizzical","quotable","quotation","quote","rabid","race","racing","racism","rack","racoon","radar","radial","radiance","radiantly","radiated","radiation","radiator","radio","radish","raffle","raft","rage","ragged","raging","ragweed","raider","railcar","railing","railroad","railway","raisin","rake","raking","rally","ramble","rambling","ramp","ramrod","ranch","rancidity","random","ranged","ranger","ranging","ranked","ranking","ransack","ranting","rants","rare","rarity","rascal","rash","rasping","ravage","raven","ravine","raving","ravioli","ravishing","reabsorb","reach","reacquire","reaction","reactive","reactor","reaffirm","ream","reanalyze","reappear","reapply","reappoint","reapprove","rearrange","rearview","reason","reassign","reassure","reattach","reawake","rebalance","rebate","rebel","rebirth","reboot","reborn","rebound","rebuff","rebuild","rebuilt","reburial","rebuttal","recall","recant","recapture","recast","recede","recent","recess","recharger","recipient","recital","recite","reckless","reclaim","recliner","reclining","recluse","reclusive","recognize","recoil","recollect","recolor","reconcile","reconfirm","reconvene","recopy","record","recount","recoup","recovery","recreate","rectal","rectangle","rectified","rectify","re
1cycled","recycler","recycling","reemerge","reenact","reenter","reentry","reexamine","referable","referee","reference","refill","refinance","refined","refinery","refining","refinish","reflected","reflector","reflex","reflux","refocus","refold","reforest","reformat","reformed","reformer","reformist","refract","refrain","refreeze","refresh","refried","refueling","refund","refurbish","refurnish","refusal","refuse","refusing","refutable","refute","regain","regalia","regally","reggae","regime","region","register","registrar","registry","regress","regretful","regroup","regular","regulate","regulator","rehab","reheat","rehire","rehydrate","reimburse","reissue","reiterate","rejoice","rejoicing","rejoin","rekindle","relapse","relapsing","relatable","related","relation","relative","relax","relay","relearn","release","relenting","reliable","reliably","reliance","reliant","relic","relieve","relieving","relight","relish","relive","reload","relocate","relock","reluctant","rely","remake","remark","remarry","rematch","remedial","remedy","remember","reminder","remindful","remission","remix","remnant","remodeler","remold","remorse","remote","removable","removal","removed","remover","removing","rename","renderer","rendering","rendition","renegade","renewable","renewably","renewal","renewed","renounce","renovate","renovator","rentable","rental","rented","renter","reoccupy","reoccur","reopen","reorder","repackage","repacking","repaint","repair","repave","repaying","repayment","repeal","repeated","repeater","repent","rephrase","replace","replay","replica","reply","reporter","repose","repossess","repost","repressed","reprimand","reprint","reprise","reproach","reprocess","reproduce","reprogram","reps","reptile","reptilian","repugnant","repulsion","repulsive","repurpose","reputable","reputably","request","require","requisite","reroute","rerun","resale","resample","rescuer","reseal","research","reselect","reseller","resemble","resend","resent","reset","reshape","reshoot","reshuffle","residence","residency","resident","residual","residue","resigned","resilient","resistant","resisting","resize","resolute","resolved","resonant","resonate","resort","resource","respect","resubmit","result","resume","resupply","resurface","resurrect","retail","retainer","retaining","retake","retaliate","retention","rethink","retinal","retired","retiree","retiring","retold","retool","retorted","retouch","retrace","retract","retrain","retread","retreat","retrial","retrieval","retriever","retry","return","retying","retype","reunion","reunite","reusable","reuse","reveal","reveler","revenge","revenue","reverb","revered","reverence","reverend","reversal","reverse","reversing","reversion","revert","revisable","revise","revision","revisit","revivable","revival","reviver","reviving","revocable","revoke","revolt","revolver","revolving","reward","rewash","rewind","rewire","reword","rework","rewrap","rewrite","rhyme","ribbon","ribcage","rice","riches","richly","richness","rickety","ricotta","riddance","ridden","ride","riding","rifling","rift","rigging","rigid","rigor","rimless","rimmed","rind","rink","rinse","rinsing","riot","ripcord","ripeness","ripening","ripping","ripple","rippling","riptide","rise","rising","risk","risotto","ritalin","ritzy","rival","riverbank","riverbed","riverboat","riverside","riveter","riveting","roamer","roaming","roast","robbing","robe","robin","robotics","robust","rockband","rocker","rocket","rockfish","rockiness","rocking","rocklike","rockslide","rockstar","rocky","rogue","roman","romp","rope","roping","roster","rosy","rotten","rotting","rotunda","roulette","rounding","roundish","roundness","roundup","roundworm","routine","routing","rover","roving","royal","rubbed","rubber","rubbing","rubble","rubdown","ruby","ruckus","rudder","rug","ruined","rule","rumble","rumbling","rummage","rumor","runaround","rundown","runner","running","runny","runt","runway","rupture","rural","ruse","rush","rust","rut","sabbath","sabotage","sacrament","sacred","sacrifice","sadden","saddlebag","saddled","saddling","sadly","sadness","safari","safeguard","safehouse","safely","safeness","saffron","saga","sage","sagging","saggy","said","saint","sake","salad","salami","salaried","salary","saline","salon","saloon","salsa","salt","salutary","salute","salvage","salvaging","salvation","same","sample","sampling","sanction","sanctity","sanctuary","sandal","sandbag","sandbank","sandbar","sandblast","sandbox","sanded","sandfish","sanding","sandlot","sandpaper","sandpit","sandstone","sandstorm","sandworm","sandy","sanitary","sanitizer","sank","santa","sapling","sappiness","sappy","
1sarcasm","sarcastic","sardine","sash","sasquatch","sassy","satchel","satiable","satin","satirical","satisfied","satisfy","saturate","saturday","sauciness","saucy","sauna","savage","savanna","saved","savings","savior","savor","saxophone","say","scabbed","scabby","scalded","scalding","scale","scaling","scallion","scallop","scalping","scam","scandal","scanner","scanning","scant","scapegoat","scarce","scarcity","scarecrow","scared","scarf","scarily","scariness","scarring","scary","scavenger","scenic","schedule","schematic","scheme","scheming","schilling","schnapps","scholar","science","scientist","scion","scoff","scolding","scone","scoop","scooter","scope","scorch","scorebook","scorecard","scored","scoreless","scorer","scoring","scorn","scorpion","scotch","scoundrel","scoured","scouring","scouting","scouts","scowling","scrabble","scraggly","scrambled","scrambler","scrap","scratch","scrawny","screen","scribble","scribe","scribing","scrimmage","script","scroll","scrooge","scrounger","scrubbed","scrubber","scruffy","scrunch","scrutiny","scuba","scuff","sculptor","sculpture","scurvy","scuttle","secluded","secluding","seclusion","second","secrecy","secret","sectional","sector","secular","securely","security","sedan","sedate","sedation","sedative","sediment","seduce","seducing","segment","seismic","seizing","seldom","selected","selection","selective","selector","self","seltzer","semantic","semester","semicolon","semifinal","seminar","semisoft","semisweet","senate","senator","send","senior","senorita","sensation","sensitive","sensitize","sensually","sensuous","sepia","september","septic","septum","sequel","sequence","sequester","series","sermon","serotonin","serpent","serrated","serve","service","serving","sesame","sessions","setback","setting","settle","settling","setup","sevenfold","seventeen","seventh","seventy","severity","shabby","shack","
1shaded","shadily","shadiness","shading","shadow","shady","shaft","shakable","shakily","shakiness","shaking","shaky","shale","shallot","shallow","shame","shampoo","shamrock","shank","shanty","shape","shaping","share","sharpener","sharper","sharpie","sharply","sharpness","shawl","sheath","shed","sheep","sheet","shelf","shell","shelter","shelve","shelving","sherry","shield","shifter","shifting","shiftless","shifty","shimmer","shimmy","shindig","shine","shingle","shininess","shining","shiny","ship","shirt","shivering","shock","shone","shoplift","shopper","shopping","shoptalk","shore","shortage","shortcake","shortcut","shorten","shorter","shorthand","shortlist","shortly","shortness","shorts","shortwave","shorty","shout","shove","showbiz","showcase","showdown","shower","showgirl","showing","showman","shown","showoff","showpiece","showplace","showroom","showy","shrank","shrapnel","shredder","shredding","shrewdly","shriek","shrill","shrimp","shrine","shrink","shrivel","shrouded","shrubbery","shrubs","shrug","shrunk","shucking","shudder","shuffle","shuffling","shun","shush","shut","shy","siamese","siberian","sibling","siding","sierra","siesta","sift","sighing","silenced","silencer","silent","silica","silicon","silk","silliness","silly","silo","silt","silver","similarly","simile","simmering","simple","simplify","simply","sincere","sincerity","singer","singing","single","singular","sinister","sinless","sinner","sinuous","sip","siren","sister","sitcom","sitter","sitting","situated","situation","sixfold","sixteen","sixth","sixties","sixtieth","sixtyfold","sizable","sizably","size","sizing","sizzle","sizzling","skater","skating","skedaddle","skeletal","skeleton","skeptic","sketch","skewed","skewer","skid","skied","skier","skies","skiing","skilled","skillet","skillful","skimmed","skimmer","skimming","skimpily","skincare","skinhead","skinless","skinning","skinny","skintight","skipper","skipping","skirmish","skirt","skittle","skydiver","skylight","skyline","skype","skyrocket","skyward","slab","slacked","slacker","slacking","slackness","slacks","slain","slam","slander","slang","slapping","slapstick","slashed","slashing","slate","slather","slaw","sled","sleek","sleep","sleet","sleeve","slept","sliceable","sliced","slicer","slicing","slick","slider","slideshow","sliding","slighted","slighting","slightly","slimness","slimy","slinging","slingshot","slinky","slip","slit","sliver","slobbery","slogan","sloped","sloping","sloppily","sloppy","slot","slouching","slouchy","sludge","slug","slum","slurp","slush","sly","small","smartly","smartness","smasher","smashing","smashup","smell","smelting","smile","smilingly","smirk","smite","smith","smitten","smock","smog","smoked","smokeless","smokiness","smoking","smoky","smolder","smooth","smother","smudge","smudgy","smuggler","smuggling","smugly","smugness","snack","snagged","snaking","snap","snare","snarl","snazzy","sneak","sneer","sneeze","sneezing","snide","sniff","snippet","snipping","snitch","snooper","snooze","snore","snoring","snorkel","snort","snout","snowbird","snowboard","snowbound","snowcap","snowdrift","snowdrop","snowfall","snowfield","snowflake","snowiness","snowless","snowman","snowplow","snowshoe","snowstorm","snowsuit","snowy","snub","snuff","snuggle","snugly","snugness","speak","spearfish","spearhead","spearman","spearmint","species","specimen","specked","speckled","specks","spectacle","spectator","spectrum","speculate","speech","speed","spellbind","speller","spelling","spendable","spender","spending","spent","spew","sphere","spherical","sphinx","spider","spied","spiffy","spill","spilt","spinach","spinal","spindle","spinner","spinning","spinout","spinster","spiny","spiral","spirited","spiritism","spirits","spiritual","splashed","splashing","splashy","splatter","spleen","splendid","splendor","splice","splicing","splinter","splotchy","splurge","spoilage","spoiled","spoiler","spoiling","spoils","spoken","spokesman","sponge","spongy","sponsor","spoof","spookily","spooky","spool","spoon","spore","sporting","sports","sporty","spotless","spotlight","spotted","spotter","spotting","spotty","spousal","spouse","spout","sprain","sprang","sprawl","spray","spree","sprig","spring","sprinkled","sprinkler","sprint","sprite","sprout","spruce","sprung","spry","spud","spur","sputter","spyglass","squabble","squad","squall","squander","squash","squatted","squatter","squatting","squeak","squealer","squealing","squeamish","squeegee","squeeze","squeezing","squid","squiggle","squiggly","squint","squire","squirt","squishier","squishy","stability","stabilize","stable","stack","stadium","staff","stage","staging","stagnant","stagnate","stainable","stained","staining","stainless","stalemate","staleness","stalling","stallion","stamina","stammer","stamp","stand","stank","staple","stapling","starboard","starch","stardom","stardust","starfish","stargazer","staring","stark","starless","starlet","starlight","starlit","starring","starry","starship","starter","starting","startle","startling","startup","starved","starving","stash","state","static","statistic","statue","stature","status","statute","statutory","staunch","stays","steadfast","steadier","steadily","steadying","steam","steed","steep","steerable","steering","steersman","stegosaur","stellar","stem","stench","stencil","step","stereo","sterile","sterility","sterilize","sterling","sternness","
1sternum","stew","stick","stiffen","stiffly","stiffness","stifle","stifling","stillness","stilt","stimulant","stimulate","stimuli","stimulus","stinger","stingily","stinging","stingray","stingy","stinking","stinky","stipend","stipulate","stir","stitch","stock","stoic","stoke","stole","stomp","stonewall","stoneware","stonework","stoning","stony","stood","stooge","stool","stoop","stoplight","stoppable","stoppage","stopped","stopper","stopping","stopwatch","storable","storage","storeroom","storewide","storm","stout","stove","stowaway","stowing","straddle","straggler","strained","strainer","straining","strangely","stranger","strangle","strategic","strategy","stratus","straw","stray","streak","stream","street","strength","strenuous","strep","stress","stretch","strewn","stricken","strict","stride","strife","strike","striking","strive","striving","strobe","strode","stroller","strongbox","strongly","strongman","struck","structure","strudel","struggle","strum","strung","strut","stubbed","stubble","stubbly","stubborn","stucco","stuck","student","studied","studio","study","stuffed","stuffing","stuffy","stumble","stumbling","stump","stung","stunned","stunner","stunning","stunt","stupor","sturdily","sturdy","styling","stylishly","stylist","stylized","stylus","suave","subarctic","subatomic","subdivide","subdued","subduing","subfloor","subgroup","subheader","subject","sublease","sublet","sublevel","sublime","submarine","submerge","submersed","submitter","subpanel","subpar","subplot","subprime","subscribe","subscript","subsector","subside","subsiding","subsidize","subsidy","subsoil","subsonic","substance","subsystem","subtext","subtitle","subtly","subtotal","subtract","subtype","suburb","subway","subwoofer","subzero","succulent","such","suction","sudden","sudoku","suds","sufferer","suffering","suffice","suffix","suffocate","suffrage","sugar","suggest","suing","suitable","suitably","suitcase","suitor","sulfate","sulfide","sulfite","sulfur","sulk","sullen","sulphate","sulphuric","sultry","superbowl","superglue","superhero","superior","superjet","superman","supermom","supernova","supervise","supper","supplier","supply","support","supremacy","supreme","surcharge","surely","sureness","surface","surfacing","surfboard","surfer","surgery","surgical","surging","surname","surpass","surplus","surprise","surreal","surrender","surrogate","surround","survey","survival","survive","surviving","survivor","sushi","suspect","suspend","suspense","sustained","sustainer","swab","swaddling","swagger","swampland","swan","swapping","swarm","sway","swear","sweat","sweep","swell","swept","swerve","swifter","swiftly","swiftness","swimmable","swimmer","swimming","swimsuit","swimwear","swinger","swinging","swipe","swirl","switch","swivel","swizzle","swooned","swoop","swoosh","swore","sworn","swung","sycamore","sympathy","symphonic","symphony","symptom","synapse","syndrome","synergy","synopses","synopsis","synthesis","synthetic","syrup","system","t-shirt","tabasco","tabby","tableful","tables","tablet","tableware","tabloid","tackiness","tacking","tackle","tackling","tacky","taco","tactful","tactical","tactics","tactile","tactless","tadpole","taekwondo","tag","tainted","take","taking","talcum","talisman","tall","talon","tamale","tameness","tamer","tamper","tank","tanned","tannery","tanning","tantrum","tapeless","tapered","tapering","tapestry","tapioca","tapping","taps","tarantula","target","tarmac","tarnish","tarot","tartar","tartly","tartness","task","tassel","taste","tastiness","tasting","tasty","tattered","tattle","tattling","tattoo","taunt","tavern","thank","that","thaw","theater","theatrics","thee","theft","theme","theology","theorize","thermal","thermos","thesaurus","these","thesis","thespian","thicken","thicket","thickness","thieving","thievish","thigh","thimble","thing","think","thinly","thinner","thinness","thinning","thirstily","thirsting","thirsty","thirteen","thirty","thong","thorn","those","thousand","thrash","thread","threaten","threefold","thrift","thrill","thrive","thriving","throat","throbbing","throng","throttle","throwaway","throwback","thrower","throwing","thud","thumb","thumping","thursday","thus","thwarting","thyself","tiara","tibia","tidal","tidbit","tidiness","tidings","tidy","tiger","tighten","tightly","tightness","tightrope","tightwad","tigress","tile","tiling","till","tilt","timid","timing","timothy","tinderbox","tinfoil","tingle","t
1ingling","tingly","tinker","tinkling","tinsel","tinsmith","tint","tinwork","tiny","tipoff","tipped","tipper","tipping","tiptoeing","tiptop","tiring","tissue","trace","tracing","track","traction","tractor","trade","trading","tradition","traffic","tragedy","trailing","trailside","train","traitor","trance","tranquil","transfer","transform","translate","transpire","transport","transpose","trapdoor","trapeze","trapezoid","trapped","trapper","trapping","traps","trash","travel","traverse","travesty","tray","treachery","treading","treadmill","treason","treat","treble","tree","trekker","tremble","trembling","tremor","trench","trend","trespass","triage","trial","triangle","tribesman","tribunal","tribune","tributary","tribute","triceps","trickery","trickily","tricking","trickle","trickster","tricky","tricolor","tricycle","trident","tried","trifle","trifocals","trillion","trilogy","trimester","trimmer","trimming","trimness","trinity","trio","tripod","tripping","triumph","trivial","trodden","trolling","trombone","trophy","tropical","tropics","trouble","troubling","trough","trousers","trout","trowel","truce","truck","truffle","trump","trunks","trustable","trustee","trustful","trusting","trustless","truth","try","tubby","tubeless","tubular","tucking","tuesday","tug","tuition","tulip","tumble","tumbling","tummy","turban","turbine","turbofan","turbojet","turbulent","turf","turkey","turmoil","turret","turtle","tusk","tutor","tutu","tux","tweak","tweed","tweet","tweezers","twelve","twentieth","twenty","twerp","twice","twiddle","twiddling","twig","twilight","twine","twins","twirl","twistable","twisted","twister","twisting","twisty","twitch","twitter","tycoon","tying","tyke","udder","ultimate","ultimatum","ultra","umbilical","umbrella","umpire","unabashed","unable","unadorned","unadvised","unafraid","unaired","unaligned","unaltered","unarmored","unashamed","unaudited","unawake","unaware","unbaked","unbalance","unbeaten","unbend","unbent","unbiased","unbitten","unblended","unblessed","unblock","unbolted","unbounded","unboxed","unbraided","unbridle","unbroken","unbuckled","unbundle","unburned","unbutton","uncanny","uncapped","uncaring","uncertain","unchain","unchanged","uncharted","uncheck","uncivil","unclad","unclaimed","unclamped","unclasp","uncle","unclip","uncloak","unclog","unclothed","uncoated","uncoiled","uncolored","uncombed","uncommon","uncooked","uncork","uncorrupt","uncounted","uncouple","uncouth","uncover","uncross","uncrown","uncrushed","uncured","uncurious","uncurled","uncut","undamaged","undated","undaunted","undead","undecided","undefined","underage","underarm","undercoat","undercook","undercut","underdog","underdone","underfed","underfeed","underfoot","undergo","undergrad","underhand","underline","underling","undermine","undermost","underpaid","underpass","underpay","underrate","undertake","undertone","undertook","undertow","underuse","underwear","underwent","underwire","undesired","undiluted","undivided","undocked","undoing","undone","undrafted","undress","undrilled","undusted","undying","unearned","unearth","unease","uneasily","uneasy","uneatable","uneaten","unedited","unelected","unending","unengaged","unenvied","unequal","unethical","uneven","unexpired","unexposed","unfailing","unfair","unfasten","unfazed","unfeeling","unfiled","unfilled","unfitted","unfitting","unfixable","unfixed","unflawed","unfocused","unfold","unfounded","unframed","unfreeze","unfrosted","unfrozen","unfunded","unglazed","ungloved","unglue","ungodly","ungraded","ungreased","unguarded","unguided","unhappily","unhappy","unharmed","unhealthy","unheard","unhearing","unheated","unhelpful","unhidden","unhinge","unhitched","unholy","unhook","unicorn","unicycle","unified","unifier","uniformed","uniformly","unify","unimpeded","uninjured","uninstall","uninsured","uninvited","union","uniquely","unisexual","unison","unissued","unit","universal","universe","unjustly","unkempt","unkind","unknotted","unknowing","unknown","unlaced","unlatch","unlawful","unleaded","unlearned","unleash","unless","unleveled","unlighted","unlikable","unlimited","unlined","unlinked","unlisted","unlit","unlivable","unloaded","unloader","unlocked","unlocking","unlovable","unloved","unlovely","unloving","unluckily","unlucky","unmade","unmanaged","unmanned","unmapped","unmarked","unmasked","unmasking","unmatched","unmindful","unmixable","unmixed","unmolded","unmoral","unmovable","unmoved","unmoving","unnamable","unnamed","unnatural","unneeded","unnerve","unnerving","unnoticed","unopened","unopposed","unpack","unpadded","unpaid","unpainted","unpaired","unpaved","unpeeled","unpicked","unpiloted","unpinned","unplanned","unplanted","unpleased","unpledged","unplowed","unplug","unpopular","unproven","unquote","unranked","unrated","unraveled","unreached","unread","unreal","unreeling","unrefined","unrelated","unrented","unrest","unretired","unrevised","unrigged","unripe","unrivaled","unroasted","unrobed","unroll","unruffled","unruly","unrushed","unsaddle","unsafe","unsaid","unsalted","unsaved","unsavory","unscathed","unscented","unscrew","unsealed","unseated","unsecured","unseeing","unseemly","unseen","unselect","unselfish","unsent","unsettled","unshackle","unshaken","unshaved","unshaven","unsheathe","unshipped","unsightly","unsigned","unskilled","unsliced","unsmooth","unsnap","unsocial","unsoiled","unsold","unsolved","unsorted","unspoiled","unspoken","unstable","unstaffed","unstamped","unsteady","unsterile","unstirred","unstitch","unstopped","unstuck","unstuffed","unstylish","unsubtle","unsubtly","unsuited","unsure","unsworn","untagged","untainted","untaken","untamed","untangled","untapped","untaxed","unthawed","unthread","untidy","untie","until","untimed","untimely","untitled","untoasted","untold","untouched","untracked","untrained","untreated","untried","untrimmed","untrue","untruth","unturned","untwist","untying","unus
1able","unused","unusual","unvalued","unvaried","unvarying","unveiled","unveiling","unvented","unviable","unvisited","unvocal","unwanted","unwarlike","unwary","unwashed","unwatched","unweave","unwed","unwelcome","unwell","unwieldy","unwilling","unwind","unwired","unwitting","unwomanly","unworldly","unworn","unworried","unworthy","unwound","unwoven","unwrapped","unwritten","unzip","upbeat","upchuck","upcoming","upcountry","update","upfront","upgrade","upheaval","upheld","uphill","uphold","uplifted","uplifting","upload","upon","upper","upright","uprising","upriver","uproar","uproot","upscale","upside","upstage","upstairs","upstart","upstate","upstream","upstroke","upswing","uptake","uptight","uptown","upturned","upward","upwind","uranium","urban","urchin","urethane","urgency","urgent","urging","urologist","urology","usable","usage","useable","used","uselessly","user","usher","usual","utensil","utility","utilize","utmost","utopia","utter","vacancy","vacant","vacate","vacation","vagabond","vagrancy","vagrantly","vaguely","vagueness","valiant","valid","valium","valley","valuables","value","vanilla","vanish","vanity","vanquish","vantage","vaporizer","variable","variably","varied","variety","various","varmint","varnish","varsity","varying","vascular","vaseline","vastly","vastness","veal","vegan","veggie","vehicular","velcro","velocity","velvet","vendetta","vending","vendor","veneering","vengeful","venomous","ventricle","venture","venue","venus","verbalize","verbally","verbose","verdict","verify","verse","version","versus","vertebrae","vertical","vertigo","very","vessel","vest","veteran","veto","vexingly","viability","viable","vibes","vice","vicinity","victory","video","viewable","viewer","viewing","viewless","viewpoint","vigorous","village","villain","vindicate","vineyard","vintage","violate","violation","violator","violet","violin","viper","viral","virtual","virtuous","virus","visa","viscosity","viscous","viselike","visible","visibly","vision","visiting","visitor","visor","vista","vitality","vitalize","vitally","vitamins","vivacious","vividly","vividness","vixen","vocalist","vocalize","vocally","vocation","voice","voicing","void","volatile","volley","voltage","volumes","voter","voting","voucher","vowed","vowel","voyage","wackiness","wad","wafer","waffle","waged","wager","wages","waggle","wagon","wake","waking","walk","walmart","walnut","walrus","waltz","wand","wannabe","wanted","wanting","wasabi","washable","washbasin","washboard","washbowl","washcloth","washday","washed","washer","washhouse","washing","washout","washroom","washstand","washtub","wasp","wasting","watch","water","waviness","waving","wavy","whacking","whacky","wham","wharf","wheat","whenever","whiff","whimsical","whinny","whiny","whisking","whoever","whole","whomever","whoopee","whooping","whoops","why","wick","widely","widen","widget","widow","width","wieldable","wielder","wife","wifi","wikipedia","wildcard","wildcat","wilder","wildfire","wildfowl","wildland","wildlife","wildly","wildness","willed","willfully","willing","willow","willpower","wilt","wimp","wince","wincing","wind","wing","winking","winner","winnings","winter","wipe","wired","wireless","wiring","wiry","wisdom","wise","wish","wisplike","wispy","wistful","wizard","wobble","wobbling","wobbly","wok","wolf","wolverine","womanhood","womankind","womanless","womanlike","womanly","womb","woof","wooing","wool","woozy","word","work","worried","worrier","worrisome","worry","worsening","worshiper","worst","wound","woven","wow","wrangle","wrath","wreath","wreckage","wrecker","wrecking","wrench","wriggle","wriggly","wrinkle","wrinkly","wrist","writing","written","wrongdoer","wronged","wrongful","wrongly","wrongness","wrought","xbox","xerox","yahoo","yam","yanking","yapping","yard","yarn","yeah","yearbook","yearling","yearly","yearning","yeast","yelling","yelp","yen","yesterday","yiddish","yield","yin","yippee","yo-yo","yodel","yoga","yogurt","yonder","yoyo","yummy","zap","zealous","zebra","zen","zeppelin","zero","zestfully","zesty","zigzagged","zipfile","zipping","zippy","zips","zit","zodiac","zombie","zone","zoning","zookeeper","zoologist","zoology","zoom"]).filter(e=>!e.includes("-")));e.s(["default",()=>J],180022);let J=O.forwardRef(function(e,t){let{title:n,titleId:r,...i}=e;return O.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":r},i),n?O.createElement("title",{id:r},n):null,O.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.5 10.5V6.75a4.5 4.5 0 1 0-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 0 0 2.25-2.25v-6.75a2.25 2.25 0 0 0-2.25-2.25H6.75a2.25 2.25 0 0 0-2.25 2.25v6.75a2.25 2.25 0 0 0 2.25 2.25Z"}))});e.s(["default",()=>Q],403392);let Q=O.forwardRef(function(e,t){let{title:n,titleId:r,...i}=e;return O.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":r},i),n?O.createElement("title",{id:r},n):null,O.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L10.582 16.07a4.5 4.5 0 0 1-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 0 1 1.13-1.897l8.932-8.931Zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0 1 15.75 21H5.25A2.25 2.25 0 0 1 3 18.75V8.25A2.25 2.25 0 0 1 5.25 6H10"}))})},738750,(e,t,n)=>{t.exports=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}},87201,(e,t,n)=>{let r,i=[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];n.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},n.getSymbolTotalCodewords=function(e){return i[e]},n.getBCHDigit=function(e){let t=0;for(;0!==e;)t++,e>>>=1;return t},n.setToSJISFunction=function(e){if("function"!=typeof e)throw Error('"toSJISFunc" is not a valid function.');r=e},n.isKanjiModeEnabled=function(){return void 0!==r},n.toSJIS=function(e){return r(e)}},473133,(e,t,n)=>{n.L={bit:1},n.M={bit:0},n.Q={bit:3},n.H={bit:2},n.isValid=function(e){return e&&void 0!==e.bit&&e.bit>=0&&e.bit<4},n.from=function(e,t){if(n.isValid(e))return e;try{if("string"!=typeof e)throw Error("Param is not a string");switch(e.toLowerCase()){case"l":case"low":return n.L;case"m":case"medium":return n.M;case"q":case"quartile":return n.Q;case"h":case"high":return n.H;default:throw Error("Unknown EC Level: "+e)}}catch(e){return t}}},173666,(e,t,n)=>{function r(){this.buffer=[],this.length=0}r.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 n=0;n<t;n++)this.putBit((e>>>t-n-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++}},t.exports=r},811421,(e,t,n)=>{function r(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)}r.prototype.set=function(e,t,n,r){let i=e*this.size+t;this.data[i]=n,r&&(this.reservedBit[i]=!0)},r.prototype.get=function(e,t){return this.data[e*this.size+t]},r.prototype.xor=function(e,t,n){this.data[e*this.size+t]^=n},r.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},t.exports=r},720637,(e,t,n)=>{let r=e.r(87201).getSymbolSize;n.getRowColCoords=function(e){if(1===e)return[];let t=Math.floor(e/7)+2,n=r(e),i=145===n?26:2*Math.ceil((n-13)/(2*t-2)),a=[n-7];for(let e=1;e<t-1;e++)a[e]=a[e-1]-i;return a.push(6),a.reverse()},n.getPositions=function(e){let t=[],r=n.getRowColCoords(e),i=r.length;for(let e=0;e<i;e++)for(let n=0;n<i;n++)(0!==e||0!==n)&&(0!==e||n!==i-1)&&(e!==i-1||0!==n)&&t.push([r[e],r[n]]);return t}},814002,(e,t,n)=>{let r=e.r(87201).getSymbolSize;n.getPositions=function(e){let t=r(e);return[[0,0],[t-7,0],[0,t-7]]}},237692,(e,t,n)=>{n.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};let r={N1:3,N2:3,N3:40,N4:10};n.isValid=function(e){return null!=e&&""!==e&&!isNaN(e)&&e>=0&&e<=7},n.from=function(e){return n.isValid(e)?parseInt(e,10):void 0},n.getPenaltyN1=function(e){let t=e.size,n=0,i=0,a=0,o=null,s=null;for(let l=0;l<t;l++){i=a=0,o=s=null;for(let c=0;c<t;c++){let t=e.get(l,c);t===o?i++:(i>=5&&(n+=r.N1+(i-5)),o=t,i=1),(t=e.get(c,l))===s?a++:(a>=5&&(n+=r.N1+(a-5)),s=t,a=1)}i>=5&&(n+=r.N1+(i-5)),a>=5&&(n+=r.N1+(a-5))}return n},n.getPenaltyN2=function(e){let t=e.size,n=0;for(let r=0;r<t-1;r++)for(let i=0;i<t-1;i++){let t=e.get(r,i)+e.get(r,i+1)+e.get(r+1,i)+e.get(r+1,i+1);(4===t||0===t)&&n++}return n*r.N2},n.getPenaltyN3=function(e){let t=e.size,n=0,i=0,a=0;for(let r=0;r<t;r++){i=a=0;for(let o=0;o<t;o++)i=i<<1&2047|e.get(r,o),o>=10&&(1488===i||93===i)&&n++,a=a<<1&2047|e.get(o,r),o>=10&&(1488===a||93===a)&&n++}return n*r.N3},n.getPenaltyN4=function(e){let t=0,n=e.data.length;for(let r=0;r<n;r++)t+=e.data[r];return Math.abs(Math.ceil(100*t/n/5)-10)*r.N4},n.applyMask=function(e,t){let r=t.size;
1for(let i=0;i<r;i++)for(let a=0;a<r;a++)t.isReserved(a,i)||t.xor(a,i,function(e,t,r){switch(e){case n.Patterns.PATTERN000:return(t+r)%2==0;case n.Patterns.PATTERN001:return t%2==0;case n.Patterns.PATTERN010:return r%3==0;case n.Patterns.PATTERN011:return(t+r)%3==0;case n.Patterns.PATTERN100:return(Math.floor(t/2)+Math.floor(r/3))%2==0;case n.Patterns.PATTERN101:return t*r%2+t*r%3==0;case n.Patterns.PATTERN110:return(t*r%2+t*r%3)%2==0;case n.Patterns.PATTERN111:return(t*r%3+(t+r)%2)%2==0;default:throw Error("bad maskPattern:"+e)}}(e,a,i))},n.getBestMask=function(e,t){let r=Object.keys(n.Patterns).length,i=0,a=1/0;for(let o=0;o<r;o++){t(o),n.applyMask(o,e);let r=n.getPenaltyN1(e)+n.getPenaltyN2(e)+n.getPenaltyN3(e)+n.getPenaltyN4(e);n.applyMask(o,e),r<a&&(a=r,i=o)}return i}},848125,(e,t,n)=>{let r=e.r(473133),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],a=[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];n.getBlocksCount=function(e,t){switch(t){case r.L:return i[(e-1)*4+0];case r.M:return i[(e-1)*4+1];case r.Q:return i[(e-1)*4+2];case r.H:return i[(e-1)*4+3];default:return}},n.getTotalCodewordsCount=function(e,t){switch(t){case r.L:return a[(e-1)*4+0];case r.M:return a[(e-1)*4+1];case r.Q:return a[(e-1)*4+2];case r.H:return a[(e-1)*4+3];default:return}}},654232,(e,t,n)=>{let r=new Uint8Array(512),i=new Uint8Array(256);!function(){let e=1;for(let t=0;t<255;t++)r[t]=e,i[e]=t,256&(e<<=1)&&(e^=285);for(let e=255;e<512;e++)r[e]=r[e-255]}(),n.log=function(e){if(e<1)throw Error("log("+e+")");return i[e]},n.exp=function(e){return r[e]},n.mul=function(e,t){return 0===e||0===t?0:r[i[e]+i[t]]}},950677,(e,t,n)=>{let r=e.r(654232);n.mul=function(e,t){let n=new Uint8Array(e.length+t.length-1);for(let i=0;i<e.length;i++)for(let a=0;a<t.length;a++)n[i+a]^=r.mul(e[i],t[a]);return n},n.mod=function(e,t){let n=new Uint8Array(e);for(;n.length-t.length>=0;){let e=n[0];for(let i=0;i<t.length;i++)n[i]^=r.mul(t[i],e);let i=0;for(;i<n.length&&0===n[i];)i++;n=n.slice(i)}return n},n.generateECPolynomial=function(e){let t=new Uint8Array([1]);for(let i=0;i<e;i++)t=n.mul(t,new Uint8Array([1,r.exp(i)]));return t}},962458,(e,t,n)=>{let r=e.r(950677);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=r.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 n=r.mod(t,this.genPoly),i=this.degree-n.length;if(i>0){let e=new Uint8Array(this.degree);return e.set(n,i),e}return n},t.exports=i},67483,(e,t,n)=>{n.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}},396592,(e,t,n)=>{let r="[0-9]+",i="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+",a="(?:(?![A-Z0-9 $%*+\\-./:]|"+(i=i.replace(/u/g,"\\u"))+")(?:.|[\r\n]))+";n.KANJI=RegExp(i,"g"),n.BYTE_KANJI=RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),n.BYTE=RegExp(a,"g"),n.NUMERIC=RegExp(r,"g"),n.ALPHANUMERIC=RegExp("[A-Z $%*+\\-./:]+","g");let o=RegExp("^"+i+"$"),s=RegExp("^"+r+"$"),l=RegExp("^[A-Z0-9 $%*+\\-./:]+$");n.testKanji=function(e){return o.test(e)},n.testNumeric=function(e){return s.test(e)},n.testAlphanumeric=function(e){return l.test(e)}},150882,(e,t,n)=>{let r=e.r(67483),i=e.r(396592);n.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},n.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},n.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},n.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},n.MIXED={bit:-1},n.getCharCountIndicator=function(e,t){if(!e.ccBits)throw Error("Invalid mode: "+e);if(!r.isValid(t))throw Error("Invalid version: "+t);return t>=1&&t<10?e.ccBits[0]:t<27?e.ccBits[1]:e.ccBits[2]},n.getBestModeForData=function(e){return i.testNumeric(e)?n.NUMERIC:i.testAlphanumeric(e)?n.ALPHANUMERIC:i.testKanji(e)?n.KANJI:n.BYTE},n.toString=function(e){if(e&&e.id)return e.id;throw Error("Invalid mode")},n.isValid=function(e){return e&&e.bit&&e.ccBits},n.from=function(e,t){if(n.isValid(e))return e;try{if("string"!=typeof e)throw Error("Param is not a string");switch(e.toLowerCase()){case"numeric":return n.NUMERIC;case"alphanumeric":return n.ALPHANUMERIC;case"kanji":return n.KANJI;case"byte":return n.BYTE;default:throw Error("Unknown mode: "+e)}}catch(e){return t}}},93547,(e,t,n)=>{let r=e.r(87201),i=e.r(848125),a=e.r(473133),o=e.r(150882),s=e.r(67483),l=r.getBCHDigit
vendor: 9,655 bytes, line 1
1(7973);function c(e,t){return o.getCharCountIndicator(e,t)+4}n.from=function(e,t){return s.isValid(e)?parseInt(e,10):t},n.getCapacity=function(e,t,n){if(!s.isValid(e))throw Error("Invalid QR Code version");void 0===n&&(n=o.BYTE);let a=(r.getSymbolTotalCodewords(e)-i.getTotalCodewordsCount(e,t))*8;if(n===o.MIXED)return a;let l=a-c(n,e);switch(n){case o.NUMERIC:return Math.floor(l/10*3);case o.ALPHANUMERIC:return Math.floor(l/11*2);case o.KANJI:return Math.floor(l/13);case o.BYTE:default:return Math.floor(l/8)}},n.getBestVersionForData=function(e,t){let r,i=a.from(t,a.M);if(Array.isArray(e)){if(e.length>1){for(let t=1;t<=40;t++)if(function(e,t){let n=0;return e.forEach(function(e){let r=c(e.mode,t);n+=r+e.getBitsLength()}),n}(e,t)<=n.getCapacity(t,i,o.MIXED))return t;return}if(0===e.length)return 1;r=e[0]}else r=e;return function(e,t,r){for(let i=1;i<=40;i++)if(t<=n.getCapacity(i,r,e))return i}(r.mode,r.getLength(),i)},n.getEncodedBits=function(e){if(!s.isValid(e)||e<7)throw Error("Invalid QR Code version");let t=e<<12;for(;r.getBCHDigit(t)-l>=0;)t^=7973<<r.getBCHDigit(t)-l;return e<<12|t}},857655,(e,t,n)=>{let r=e.r(87201),i=r.getBCHDigit(1335);n.getEncodedBits=function(e,t){let n=e.bit<<3|t,a=n<<10;for(;r.getBCHDigit(a)-i>=0;)a^=1335<<r.getBCHDigit(a)-i;return(n<<10|a)^21522}},494097,(e,t,n)=>{let r=e.r(150882);function i(e){this.mode=r.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,n;for(t=0;t+3<=this.data.length;t+=3)n=parseInt(this.data.substr(t,3),10),e.put(n,10);let r=this.data.length-t;r>0&&(n=parseInt(this.data.substr(t),10),e.put(n,3*r+1))},t.exports=i},112553,(e,t,n)=>{let r=e.r(150882),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 a(e){this.mode=r.ALPHANUMERIC,this.data=e}a.getBitsLength=function(e){return 11*Math.floor(e/2)+e%2*6},a.prototype.getLength=function(){return this.data.length},a.prototype.getBitsLength=function(){return a.getBitsLength(this.data.length)},a.prototype.write=function(e){let t;for(t=0;t+2<=this.data.length;t+=2){let n=45*i.indexOf(this.data[t]);n+=i.indexOf(this.data[t+1]),e.put(n,11)}this.data.length%2&&e.put(i.indexOf(this.data[t]),6)},t.exports=a},882257,(e,t,n)=>{let r=e.r(150882);function i(e){this.mode=r.BYTE,"string"==typeof e?this.data=new TextEncoder().encode(e):this.data=new Uint8Array(e)}i.getBitsLength=function(e){return 8*e},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){for(let t=0,n=this.data.length;t<n;t++)e.put(this.data[t],8)},t.exports=i},422644,(e,t,n)=>{let r=e.r(150882),i=e.r(87201);function a(e){this.mode=r.KANJI,this.data=e}a.getBitsLength=function(e){return 13*e},a.prototype.getLength=function(){return this.data.length},a.prototype.getBitsLength=function(){return a.getBitsLength(this.data.length)},a.prototype.write=function(e){let t;for(t=0;t<this.data.length;t++){let n=i.toSJIS(this.data[t]);if(n>=33088&&n<=40956)n-=33088;else if(n>=57408&&n<=60351)n-=49472;else throw Error("Invalid SJIS character: "+this.data[t]+"\nMake sure your charset is UTF-8");n=(n>>>8&255)*192+(255&n),e.put(n,13)}},t.exports=a},297930,(e,t,n)=>{let r=e.r(150882),i=e.r(494097),a=e.r(112553),o=e.r(882257),s=e.r(422644),l=e.r(396592),c=e.r(87201),d=e.r(245953);function u(e){return unescape(encodeURIComponent(e)).length}function h(e,t,n){let r,i=[];for(;null!==(r=e.exec(n));)i.push({data:r[0],index:r.index,mode:t,length:r[0].length});return i}function p(e){let t,n,i=h(l.NUMERIC,r.NUMERIC,e),a=h(l.ALPHANUMERIC,r.ALPHANUMERIC,e);return c.isKanjiModeEnabled()?(t=h(l.BYTE,r.BYTE,e),n=h(l.KANJI,r.KANJI,e)):(t=h(l.BYTE_KANJI,r.BYTE,e),n=[]),i.concat(a,t,n).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 r.NUMERIC:return i.getBitsLength(e);case r.ALPHANUMERIC:return a.getBitsLength(e);case r.KANJI:return s.getBitsLength(e);case r.BYTE:return o.getBitsLength(e)}}function g(e,t){let n,l=r.getBestModeForData(e);if((n=r.from(t,l))!==r.BYTE&&n.bit<l.bit)throw Error('"'+e+'" cannot be encoded with mode '+r.toString(n)+".\n Suggested mode is: "+r.toString(l));switch(n===r.KANJI&&!c.isKanjiModeEnabled()&&(n=r.BYTE),n){case r.NUMERIC:return new i(e);case r.ALPHANUMERIC:return new a(e);case r.KANJI:return new s(e);case r.BYTE:return new o(e)}}n.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},[])},n.fromString=function(e,t){let i=function(e,t){let n={},i={start:{}},a=["start"];for(let o=0;o<e.length;o++){let s=e[o],l=[];for(let e=0;e<s.length;e++){let c=s[e],d=""+o+e;l.push(d),n[d]={node:c,lastCount:0},i[d]={};for(let e=0;e<a.length;e++){let o=a[e];n[o]&&n[o].node.mode===c.mode?(i[o][d]=f(n[o].lastCount+c.length,c.mode)-f(n[o].lastCount,c.mode),n[o].lastCount+=c.length):(n[o]&&(n[o].lastCount=c.length),i[o][d]=f(c.length,c.mode)+4+r.getCharCountIndicator(c.mode,t))}}a=l}for(let e=0;e<a.length;e++)i[a[e]].end=0;return{map:i,table:n}}(function(e){let t=[];for(let n=0;n<e.length;n++){let i=e[n];switch(i.mode){case r.NUMERIC:t.push([i,{data:i.data,mode:r.ALPHANUMERIC,length:i.length},{data:i.data,mode:r.BYTE,length:i.length}]);break;case r.ALPHANUMERIC:t.push([i,{data:i.data,mode:r.BYTE,length:i.length}]);break;case r.KANJI:t.push([i,{data:i.data,mode:r.BYTE,length:u(i.data)}]);break;case r.BYTE:t.push([{data:i.data,mode:r.BYTE,length:u(i.data)}])}}return t}(p(e,c.isKanjiModeEnabled())),t),a=d.find_path(i.map,"start","end"),o=[];for(let e=1;e<a.length-1;e++)o.push(i.table[a[e]].node);return n.fromArray(o.reduce(function(e,t){let n=e.length-1>=0?e[e.length-1]:null;return n&&n.mode===t.mode?e[e.length-1].data+=t.data:e.push(t),e},[]))},n.rawSplit=function(e){return n.fromArray(p(e,c.isKanjiModeEnabled()))}},30671,(e,t,n)=>{let r=e.r(87201),i=e.r(473133),a=e.r(173666),o=e.r(811421),s=e.r(720637),l=e.r(814002),c=e.r(237692),d=e.r(848125),u=e.r(962458),h=e.r(93547),p=e.r(857655),f=e.r(150882),g=e.r(297930);function m(e,t,n){let r,i,a=e.size,o=p.getEncodedBits(t,n);for(r=0;r<15;r++)i=(o>>r&1)==1,r<6?e.set(r,8,i,!0):r<8?e.set(r+1,8,i,!0):e.set(a-15+r,8,i,!0),r<8?e.set(8,a-r-1,i,!0):r<9?e.set(8,15-r-1+1,i,!0):e.set(8,15-r-1,i,!0);e.set(a-8,8,1,!0)}n.create=function(e,t){let n,p;if(void 0===e||""===e)throw Error("No input text");let y=i.M;return void 0!==t&&(y=i.from(t.errorCorrectionLevel,i.M),n=h.from(t.version),p=c.from(t.maskPattern),t.toSJISFunc&&r.setToSJISFunction(t.toSJISFunc)),function(e,t,n,i){let p;if(Array.isArray(e))p=g.fromArray(e);else if("string"==typeof e){let r=t;if(!r){let t=g.rawSplit(e);r=h.getBestVersionForData(t,n)}p=g.fromString(e,r||40)}else throw Error("Invalid data");let y=h.getBestVersionForData(p,n);if(!y)throw Error("The amount of data is too big to be stored in a QR Code");if(t){if(t<y)throw Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+y+".\n")}else t=y;let b=function(e,t,n){let i=new a;n.forEach(function(t){i.put(t.mode.bit,4),i.put(t.getLength(),f.getCharCountIndicator(t.mode,e)),t.write(i)});let o=(r.getSymbolTotalCodewords(e)-d.getTotalCodewordsCount(e,t))*8;for(i.getLengthInBits()+4<=o&&i.put(0,4);i.getLengthInBits()%8!=0;)i.putBit(0);let s=(o-i.getLengthInBits())/8;for(let e=0;e<s;e++)i.put(e%2?17:236,8);return function(e,t,n){let i,a,o=r.getSymbolTotalCodewords(t),s=o-d.getTotalCodewordsCount(t,n),l=d.getBlocksCount(t,n),c=o%l,h=l-c,p=Math.floor(o/l),f=Math.floor(s/l),g=f+1,m=p-f,y=new u(m),b=0,w=Array(l),x=Array(l),C=0,E=new Uint8Array(e.buffer);for(let e=0;e<l;e++){let t=e<h?f:g;w[e]=E.slice(b,b+t),x[e]=y.encode(w[e]),b+=t,C=Math.max(C,t)}let k=new Uint8Array(o),S=0;for(i=0;i<C;i++)for(a=0;a<l;a++)i<w[a].length&&(k[S++]=w[a][i]);for(i=0;i<m;i++)for(a=0;a<l;a++)k[S++]=x[a][i];return k}(i,e,t)}(t,n,p),w=new o(r.getSymbolSize(t));!function(e,t){let n=e.size,r=l.getPositions(t);for(let t=0;t<r.length;t++){let i=r[t][0],a=r[t][1];for(let t=-1;t<=7;t++)if(!(i+t<=-1)&&!(n<=i+t))for(let r=-1;r<=7;r++)a+r<=-1||n<=a+r||(t>=0&&t<=6&&(0===r||6===r)||r>=0&&r<=6&&(0===t||6===t)||t>=2&&t<=4&&r>=2&&r<=4?e.set(i+t,a+r,!0,!0):e.set(i+t,a+r,!1,!0))}}(w,t);let x=w.size;for(let e=8;e<x-8;e++){let t=e%2==0;w.set(e,6,t,!0),w.set(6,e,t,!0)}return!function(e,t){let n=s.getPositions(t);for(let t=0;t<n.length;t++){let r=n[t][0],i=n[t][1];for(let t=-2;t<=2;t++)for(let n=-2;n<=2;n++)-2===t||2===t||-2===n||2===n||0===t&&0===n?e.set(r+t,i+n,!0,!0):e.set(r+t,i+n,!1,!0)}}(w,t),m(w,n,0),t>=7&&function(e,t){let n,r,i,a=e.size,o=h.getEncodedBits(t);for(let t=0;t<18;t++)n=Math.floor(t/3),r=t%3+a-8-3,i=(o>>t&1)==1,e.set(n,r,i,!0),e.set(r,n,i,!0)}(w,t),!function(e,t){let n=e.size,r=-1,i=n-1,a=7,o=0;for(let s=n-1;s>0;s-=2)for(6===s&&s--;;){for(let n=0;n<2;n++)if(!e.isReserved(i,s-n)){let r=!1;o<t.length&&(r=(t[o]>>>a&1)==1),e.set(i,s-n,r),-1==--a&&(o++,a=7)}if((i+=r)<0||n<=i){i-=r,r=-r;break}}}(w,b),isNaN(i)&&(i=c.getBestMask(w,m.bind(null,w,n))),c.applyMask(i,w),m(w,n,i),{modules:w,version:t,errorCorrectionLevel:n,maskPattern:i,segments:p}}(e,n,y,p)}},125950,(e,t,n)=>{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("");
1if(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 n=parseInt(t.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:255&n,hex:"#"+t.slice(0,6).join("")}}n.getOptions=function(e){e||(e={}),e.color||(e.color={});let t=void 0===e.margin||null===e.margin||e.margin<0?4:e.margin,n=e.width&&e.width>=21?e.width:void 0,i=e.scale||4;return{width:n,scale:n?4:i,margin:t,color:{dark:r(e.color.dark||"#000000ff"),light:r(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}},n.getScale=function(e,t){return t.width&&t.width>=e+2*t.margin?t.width/(e+2*t.margin):t.scale},n.getImageWidth=function(e,t){let r=n.getScale(e,t);return Math.floor((e+2*t.margin)*r)},n.qrToImageData=function(e,t,r){let i=t.modules.size,a=t.modules.data,o=n.getScale(i,r),s=Math.floor((i+2*r.margin)*o),l=r.margin*o,c=[r.color.light,r.color.dark];for(let t=0;t<s;t++)for(let n=0;n<s;n++){let d=(t*s+n)*4,u=r.color.light;t>=l&&n>=l&&t<s-l&&n<s-l&&(u=c[+!!a[Math.floor((t-l)/o)*i+Math.floor((n-l)/o)]]),e[d++]=u.r,e[d++]=u.g,e[d++]=u.b,e[d]=u.a}}},563037,(e,t,n)=>{let r=e.r(125950);n.render=function(e,t,n){var i;let a=n,o=t;void 0!==a||t&&t.getContext||(a=t,t=void 0),t||(o=function(){try{return document.createElement("canvas")}catch(e){throw Error("You need to specify a canvas element")}}()),a=r.getOptions(a);let s=r.getImageWidth(e.modules.size,a),l=o.getContext("2d"),c=l.createImageData(s,s);return r.qrToImageData(c.data,e,a),i=o,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),o},n.renderToDataURL=function(e,t,r){let i=r;void 0!==i||t&&t.getContext||(i=t,t=void 0),i||(i={});let a=n.render(e,t,i),o=i.type||"image/png",s=i.rendererOpts||{};return a.toDataURL(o,s.quality)}},310891,(e,t,n)=>{let r=e.r(125950);function i(e,t){let n=e.a/255,r=t+'="'+e.hex+'"';return n<1?r+" "+t+'-opacity="'+n.toFixed(2).slice(1)+'"':r}function a(e,t,n){let r=e+t;return void 0!==n&&(r+=" "+n),r}n.render=function(e,t,n){let o=r.getOptions(t),s=e.modules.size,l=e.modules.data,c=s+2*o.margin,d=o.color.light.a?"<path "+i(o.color.light,"fill")+' d="M0 0h'+c+"v"+c+'H0z"/>':"",u="<path "+i(o.color.dark,"stroke")+' d="'+function(e,t,n){let r="",i=0,o=!1,s=0;for(let l=0;l<e.length;l++){let c=Math.floor(l%t),d=Math.floor(l/t);c||o||(o=!0),e[l]?(s++,l>0&&c>0&&e[l-1]||(r+=o?a("M",c+n,.5+d+n):a("m",i,0),i=0,o=!1),c+1<t&&e[l+1]||(r+=a("h",s),s=0)):i++}return r}(l,s,o.margin)+'"/>',h='<svg xmlns="http://www.w3.org/2000/svg" '+(o.width?'width="'+o.width+'" height="'+o.width+'" ':"")+('viewBox="0 0 '+c+" ")+c+'" shape-rendering="crispEdges">'+d+u+"</svg>\n";return"function"==typeof n&&n(null,h),h}},973134,(e,t,n)=>{let r=e.r(738750),i=e.r(30671),a=e.r(563037),o=e.r(310891);function s(e,t,n,a,o){let s=[].slice.call(arguments,1),l=s.length,c="function"==typeof s[l-1];if(!c&&!r())throw Error("Callback required as last argument");if(c){if(l<2)throw Error("Too few arguments provided");2===l?(o=n,n=t,t=a=void 0):3===l&&(t.getContext&&void 0===o?(o=a,a=void 0):(o=a,a=n,n=t,t=void 0))}else{if(l<1)throw Error("Too few arguments provided");return 1===l?(n=t,t=a=void 0):2!==l||t.getContext||(a=n,n=t,t=void 0),new Promise(function(r,o){try{let o=i.create(n,a);r(e(o,t,a))}catch(e){o(e)}})}try{let r=i.create(n,a);o(null,e(r,t,a))}catch(e){o(e)}}n.create=i.create,n.toCanvas=s.bind(null,a.render),n.toDataURL=s.bind(null,a.renderToDataURL),n.toString=s.bind(null,function(e,t,n){return o.render(e,n)})},352618,(e,t,n)=>{function r(e){return(0x100000000+e).toString(16).substring(1)}t.exports={normalizeInput:function(e){let t;if(e instanceof Uint8Array)t=e;else if("string"==typeof e)t=new TextEncoder().encode(e);else throw Error("Input must be an string, Buffer or Uint8Array");return t},toHex:function(e){return Array.prototype.map.call(e,function(e){return(e<16?"0":"")+e.toString(16)}).join("")},debugPrint:function(e,t,n){let i="\n"+e+" = ";for(let a=0;a<t.length;a+=2){if(32===n)i+=r(t[a]).toUpperCase(),i+=" ",i+=r(t[a+1]).toUpperCase();else if(64===n)i+=r(t[a+1]).toUpperCase(),i+=r(t[a]).toUpperCase();else throw Error("Invalid size "+n);a%6==4?i+="\n"+Array(e.length+4).join(" "):a<t.length-2&&(i+=" ")}console.log(i)},testSpeed:function(e,t,n){let r=new Date().getTime(),i=new Uint8Array(t);for(let e=0;e<t;e++)i[e]=e%256;let a=new Date().getTime();console.log("Generated random input in "+(a-r)+"ms"),r=a;for(let a=0;a<n;a++){let n=e(i),a=new Date().getTime(),o=a-r;r=a,console.log("Hashed in "+o+"ms: "+n.substring(0,20)+"..."),console.log(Math.round(t/1048576/(o/1e3)*100)/100+" MB PER SECOND")}}}},453832,(e,t,n)=>{let r=e.r(352618);function i(e,t,n){let r=e[t]+e[n],i=e[t+1]+e[n+1];r>=0x100000000&&i++,e[t]=r,e[t+1]=i}function a(e,t,n,r){let i=e[t]+n;n<0&&(i+=0x100000000);let a=e[t+1]+r;i>
1=0x100000000&&a++,e[t]=i,e[t+1]=a}function o(e,t){return e[t]^e[t+1]<<8^e[t+2]<<16^e[t+3]<<24}function s(e,t,n,r,o,s){let l=u[o],c=u[o+1],h=u[s],p=u[s+1];i(d,e,t),a(d,e,l,c);let f=d[r]^d[e],g=d[r+1]^d[e+1];d[r]=g,d[r+1]=f,i(d,n,r),f=d[t]^d[n],g=d[t+1]^d[n+1],d[t]=f>>>24^g<<8,d[t+1]=g>>>24^f<<8,i(d,e,t),a(d,e,h,p),f=d[r]^d[e],g=d[r+1]^d[e+1],d[r]=f>>>16^g<<16,d[r+1]=g>>>16^f<<16,i(d,n,r),f=d[t]^d[n],g=d[t+1]^d[n+1],d[t]=g>>>31^f<<1,d[t+1]=f>>>31^g<<1}let l=new Uint32Array([0xf3bcc908,0x6a09e667,0x84caa73b,0xbb67ae85,0xfe94f82b,0x3c6ef372,0x5f1d36f1,0xa54ff53a,0xade682d1,0x510e527f,0x2b3e6c1f,0x9b05688c,0xfb41bd6b,0x1f83d9ab,0x137e2179,0x5be0cd19]),c=new Uint8Array([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3].map(function(e){return 2*e})),d=new Uint32Array(32),u=new Uint32Array(32);function h(e,t){let n=0;for(n=0;n<16;n++)d[n]=e.h[n],d[n+16]=l[n];for(d[24]=d[24]^e.t,d[25]=d[25]^e.t/0x100000000,t&&(d[28]=~d[28],d[29]=~d[29]),n=0;n<32;n++)u[n]=o(e.b,4*n);for(n=0;n<12;n++)s(0,8,16,24,c[16*n+0],c[16*n+1]),s(2,10,18,26,c[16*n+2],c[16*n+3]),s(4,12,20,28,c[16*n+4],c[16*n+5]),s(6,14,22,30,c[16*n+6],c[16*n+7]),s(0,10,20,30,c[16*n+8],c[16*n+9]),s(2,12,22,24,c[16*n+10],c[16*n+11]),s(4,14,16,26,c[16*n+12],c[16*n+13]),s(6,8,18,28,c[16*n+14],c[16*n+15]);for(n=0;n<16;n++)e.h[n]=e.h[n]^d[n]^d[n+16]}let p=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);function f(e,t,n,r){if(0===e||e>64)throw Error("Illegal output length, expected 0 < length <= 64");if(t&&t.length>64)throw Error("Illegal key, expected Uint8Array with 0 < length <= 64");if(n&&16!==n.length)throw Error("Illegal salt, expected Uint8Array with length is 16");if(r&&16!==r.length)throw Error("Illegal personal, expected Uint8Array with length is 16");let i={b:new Uint8Array(128),h:new Uint32Array(16),t:0,c:0,outlen:e};p.fill(0),p[0]=e,t&&(p[1]=t.length),p[2]=1,p[3]=1,n&&p.set(n,32),r&&p.set(r,48);for(let e=0;e<16;e++)i.h[e]=l[e]^o(p,4*e);return t&&(g(i,t),i.c=128),i}function g(e,t){for(let n=0;n<t.length;n++)128===e.c&&(e.t+=e.c,h(e,!1),e.c=0),e.b[e.c++]=t[n]}function m(e){for(e.t+=e.c;e.c<128;)e.b[e.c++]=0;h(e,!0);let t=new Uint8Array(e.outlen);for(let n=0;n<e.outlen;n++)t[n]=e.h[n>>2]>>8*(3&n);return t}function y(e,t,n,i,a){n=n||64,e=r.normalizeInput(e),i&&(i=r.normalizeInput(i)),a&&(a=r.normalizeInput(a));let o=f(n,t,i,a);return g(o,e),m(o)}t.exports={blake2b:y,blake2bHex:function(e,t,n,i,a){let o=y(e,t,n,i,a);return r.toHex(o)},blake2bInit:f,blake2bUpdate:g,blake2bFinal:m}},758443,(e,t,n)=>{let r=e.r(352618);function i(e,t,n,r,i,o){l[e]=l[e]+l[t]+i,l[r]=a(l[r]^l[e],16),l[n]=l[n]+l[r],l[t]=a(l[t]^l[n],12),l[e]=l[e]+l[t]+o,l[r]=a(l[r]^l[e],8),l[n]=l[n]+l[r],l[t]=a(l[t]^l[n],7)}function a(e,t){return e>>>t^e<<32-t}
1let o=new Uint32Array([0x6a09e667,0xbb67ae85,0x3c6ef372,0xa54ff53a,0x510e527f,0x9b05688c,0x1f83d9ab,0x5be0cd19]),s=new Uint8Array([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0]),l=new Uint32Array(16),c=new Uint32Array(16);function d(e,t){let n=0;for(n=0;n<8;n++)l[n]=e.h[n],l[n+8]=o[n];for(l[12]^=e.t,l[13]^=e.t/0x100000000,t&&(l[14]=~l[14]),n=0;n<16;n++){var r,a;c[n]=(r=e.b)[a=4*n]^r[a+1]<<8^r[a+2]<<16^r[a+3]<<24}for(n=0;n<10;n++)i(0,4,8,12,c[s[16*n+0]],c[s[16*n+1]]),i(1,5,9,13,c[s[16*n+2]],c[s[16*n+3]]),i(2,6,10,14,c[s[16*n+4]],c[s[16*n+5]]),i(3,7,11,15,c[s[16*n+6]],c[s[16*n+7]]),i(0,5,10,15,c[s[16*n+8]],c[s[16*n+9]]),i(1,6,11,12,c[s[16*n+10]],c[s[16*n+11]]),i(2,7,8,13,c[s[16*n+12]],c[s[16*n+13]]),i(3,4,9,14,c[s[16*n+14]],c[s[16*n+15]]);for(n=0;n<8;n++)e.h[n]^=l[n]^l[n+8]}function u(e,t){if(!(e>0&&e<=32))throw Error("Incorrect output length, should be in [1, 32]");let n=t?t.length:0;if(t&&!(n>0&&n<=32))throw Error("Incorrect key length, should be in [1, 32]");let r={h:new Uint32Array(o),b:new Uint8Array(64),c:0,t:0,outlen:e};return r.h[0]^=0x1010000^n<<8^e,n>0&&(h(r,t),r.c=64),r}function h(e,t){for(let n=0;n<t.length;n++)64===e.c&&(e.t+=e.c,d(e,!1),e.c=0),e.b[e.c++]=t[n]}function p(e){for(e.t+=e.c;e.c<64;)e.b[e.c++]=0;d(e,!0);let t=new Uint8Array(e.outlen);for(let n=0;n<e.outlen;n++)t[n]=e.h[n>>2]>>8*(3&n)&255;return t}function f(e,t,n){n=n||32,e=r.normalizeInput(e);let i=u(n,t);return h(i,e),p(i)}t.exports={blake2s:f,blake2sHex:function(e,t,n){let i=f(e,t,n);return r.toHex(i)},blake2sInit:u,blake2sUpdate:h,blake2sFinal:p}},5625,(e,t,n)=>{let r=e.r(453832),i=e.r(758443);t.exports={blake2b:r.blake2b,blake2bHex:r.blake2bHex,blake2bInit:r.blake2bInit,blake2bUpdate:r.blake2bUpdate,blake2bFinal:r.blake2bFinal,blake2s:i.blake2s,blake2sHex:i.blake2sHex,blake2sInit:i.blake2sInit,blake2sUpdate:i.blake2sUpdate,blake2sFinal:i.blake2sFinal}},177001,328175,133041,24111,679392,561686,851757,982946,249221,337025,39875,586177,521292,393794,844735,48493,866299,803959,477350,545223,229663,825262,382910,886330,e=>{"use strict";e.s(["default",()=>n],177001);var t=e.i(271645);let n=t.forwardRef(function(e,n){let{title:r,titleId:i,...a}=e;return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":i},a),r?t.createElement("title",{id:i},r):null,t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99"}))});e.s(["default",()=>r],328175);let r=t.forwardRef(function(e,n){let{title:r,titleId:i,...a}=e;return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":i},a),r?t.createElement("title",{id:i},r):null,t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178Z"}),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}))});e.s(["default",()=>i],133041);let i=t.forwardRef(function(e,n){let{title:r,titleId:i,...a}=e;return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":i},a),r?t.createElement("title",{id:i},r):null,t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.98 8.223A10.477 10.477 0 0 0 1.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.451 10.451 0 0 1 12 4.5c4.756 0 8.773 3.162 10.065 7.498a10.522 10.522 0 0 1-4.293 5.774M6.228 6.228 3 3m3.228 3.228 3.65 3.65m7.894 7.894L21 21m-3.228-3.228-3.65-3.65m0 0a3 3 0 1 0-4.243-4.243m4.242 4.242L9.88 9.88"}))});e.s(["default",()=>a],24111);let a=t.forwardRef(function(e,n){let{title:r,titleId:i,...a}=e;return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":i},a),r?t.createElement("title",{id:i},r):null,t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 5.25a3 3 0 0 1 3 3m3 0a6 6 0 0 1-7.029 5.912c-.563-.097-1.159.026-1.563.43L10.5 17.25H8.25v2.25H6v2.25H2.25v-2.818c0-.597.237-1.17.659-1.591l6.499-6.499c.404-.404.527-1 .43-1.563A6 6 0 1 1 21.75 8.25Z"}))});e.s(["default",()=>o],679392);let o=t.forwardRef(function(e,n){let{title:r,titleId:i,...a}=e;return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"
1currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":i},a),r?t.createElement("title",{id:i},r):null,t.createElement("path",{fillRule:"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm13.36-1.814a.75.75 0 1 0-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 0 0-1.06 1.06l2.25 2.25a.75.75 0 0 0 1.14-.094l3.75-5.25Z",clipRule:"evenodd"}))});e.s(["default",()=>s],561686);let s=t.forwardRef(function(e,n){let{title:r,titleId:i,...a}=e;return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":i},a),r?t.createElement("title",{id:i},r):null,t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5M16.5 12 12 16.5m0 0L7.5 12m4.5 4.5V3"}))});e.s(["default",()=>l],851757);let l=t.forwardRef(function(e,n){let{title:r,titleId:i,...a}=e;return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":i},a),r?t.createElement("title",{id:i},r):null,t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.35 3.836c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 0 0 .75-.75 2.25 2.25 0 0 0-.1-.664m-5.8 0A2.251 2.251 0 0 1 13.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m8.9-4.414c.376.023.75.05 1.124.08 1.131.094 1.976 1.057 1.976 2.192V16.5A2.25 2.25 0 0 1 18 18.75h-2.25m-7.5-10.5H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V18.75m-7.5-10.5h6.375c.621 0 1.125.504 1.125 1.125v9.375m-8.25-3 1.5 1.5 3-3.75"}))});e.s(["default",()=>c],982946);let c=t.forwardRef(function(e,n){let{title:r,titleId:i,...a}=e;return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":i},a),r?t.createElement("title",{id:i},r):null,t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 17.25v3.375c0 .621-.504 1.125-1.125 1.125h-9.75a1.125 1.125 0 0 1-1.125-1.125V7.875c0-.621.504-1.125 1.125-1.125H6.75a9.06 9.06 0 0 1 1.5.124m7.5 10.376h3.375c.621 0 1.125-.504 1.125-1.125V11.25c0-4.46-3.243-8.161-7.5-8.876a9.06 9.06 0 0 0-1.5-.124H9.375c-.621 0-1.125.504-1.125 1.125v3.5m7.5 10.375H9.375a1.125 1.125 0 0 1-1.125-1.125v-9.25m12 6.625v-1.875a3.375 3.375 0 0 0-3.375-3.375h-1.5a1.125 1.125 0 0 1-1.125-1.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H9.75"}))});e.s(["default",()=>d],249221);let d=t.forwardRef(function(e,n){let{title:r,titleId:i,...a}=e;return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":i},a),r?t.createElement("title",{id:i},r):null,t.createElement("path",{fillRule:"evenodd",d:"M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25Zm-1.72 6.97a.75.75 0 1 0-1.06 1.06L10.94 12l-1.72 1.72a.75.75 0 1 0 1.06 1.06L12 13.06l1.72 1.72a.75.75 0 1 0 1.06-1.06L13.06 12l1.72-1.72a.75.75 0 1 0-1.06-1.06L12 10.94l-1.72-1.72Z",clipRule:"evenodd"}))});e.s(["default",()=>u],337025);let u=t.forwardRef(function(e,n){let{title:r,titleId:i,...a}=e;return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":i},a),r?t.createElement("title",{id:i},r):null,t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12.75 11.25 15 15 9.75m-3-7.036A11.959 11.959 0 0 1 3.598 6 11.99 11.99 0 0 0 3 9.749c0 5.592 3.824 10.29 9 11.623 5.176-1.332 9-6.03 9-11.622 0-1.31-.21-2.571-.598-3.751h-.152c-3.196 0-6.1-1.248-8.25-3.285Z"}))});e.s(["MagnifyingGlassIcon",()=>h],39875);let h=t.forwardRef(function(e,n){let{title:r,titleId:i,...a}=e;return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":i},a),r?t.createElement("title",{id:i},r):null,t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"}))});e.s(["BoltIcon",()=>p],586177);let p=t.forwardRef(function(e,n){let{title:r,titleId:i,...a}=e;return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":i},a),r?t.createElement("title",{id:i},r):null,t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m3.75 13.5 10.5-11.25L12 10.5h8.25L9.75 21.75 12 13.5H3.75Z"}))});e.s(["ArrowRightIcon",()=>f],521292);let f=t.forwardRef(function(e,n){let{title:r,titleId:i,...a}=e;return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":i},a),r?t.createElement("title",{id:i},r):null,t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 4.5 21 12m0 0-7.5 7.5M21 12H3"}))});e.s(["ChevronDownIcon",()=>g],844735),e.s(["default",()=>g],393794);let g=t.forwardRef(function(e,n){let{title:r,titleId:i,...a}=e;return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":i},a),r?t.createElement("title",{id:i},r):null,t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"}))});e.s(["useVirtualizer",()=>N],48493);var m=e.i(174080),y=e.i(247167);function b(e,t,n){var r;let i,a=null!=(r=n.initialDeps)?r:[];function o(){var r,o,s,l;let c,d;n.key&&(null==(r=n.debug)?void 0:r.call(n))&&(c=Date.now());let u=e();if(!(u.length!==a.length||u.some((e,t)=>a[t]!==e)))return i;if(a=u,n.key&&(null==(o=n.debug)?void 0:o.call(n))&&(d=Date.now()),i=t(...u),n.key&&(null==(s=n.debug)?void 0:s.call(n))){let e=Math.round((Date.now()-c)*100)/100,t=Math.round((Date.now()-d)*100)/100,r=t/16,i=(e,t)=>{for(e=String(e);e.length<t;)e=" "+e;return e};console.info("%c⏱ ".concat(i(t,5)," /").concat(i(e,5)," ms"),"\n            font-size: .6rem;\n            font-weight: bold;\n            color: hsl(".concat(Math.max(0,Math.min(120-120*r,120)),"deg 100% 31%);"),null==n?void 0:n.key)}return null==(l=null==n?void 0:n.onChange)||l.call(n,i),i}return o.updateDeps=e=>{a=e},o}function w(e,t){if(void 0!==e)return e;throw Error("Unexpected undefined".concat(t?": ".concat(t):""))}let x=e=>{let{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},C=e=>e,E=e=>{let t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),r=[];for(let e=t;e<=n;e++)r.push(e);return r},k=(e,t)=>{let n=e.scrollElement;if(!n)return;let r=e.targetWindow;if(!r)return;let i=e=>{let{width:n,height:r}=e;t({width:Math.round(n),height:Math.round(r)})};if(i(x(n)),!r.ResizeObserver)return()=>{};let a=new r.ResizeObserver(t=>{let r=()=>{let e=t[0];if(null==e?void 0:e.borderBoxSize){let t=e.borderBoxSize[0];if(t)return void i({width:t.inlineSize,height:t.blockSize})}i(x(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(r):r()});return a.observe(n,{box:"border-box"}),()=>{a.unobserve(n)}},S={passive:!0},I="undefined"==typeof window||"onscrollend"in window,A=(e,t)=>
1{let n=e.scrollElement;if(!n)return;let r=e.targetWindow;if(!r)return;let i=0,a=e.options.useScrollendEvent&&I?()=>void 0:((e,t,n)=>{let r;return function(){for(var i=arguments.length,a=Array(i),o=0;o<i;o++)a[o]=arguments[o];e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,a),n)}})(r,()=>{t(i,!1)},e.options.isScrollingResetDelay),o=r=>()=>{let{horizontal:o,isRtl:s}=e.options;i=o?n.scrollLeft*(s&&-1||1):n.scrollTop,a(),t(i,r)},s=o(!0),l=o(!1);l(),n.addEventListener("scroll",s,S);let c=e.options.useScrollendEvent&&I;return c&&n.addEventListener("scrollend",l,S),()=>{n.removeEventListener("scroll",s),c&&n.removeEventListener("scrollend",l)}},T=(e,t,n)=>{if(null==t?void 0:t.borderBoxSize){let e=t.borderBoxSize[0];if(e)return Math.round(e[n.options.horizontal?"inlineSize":"blockSize"])}return e[n.options.horizontal?"offsetWidth":"offsetHeight"]},_=(e,t,n)=>{var r,i;let{adjustments:a=0,behavior:o}=t;null==(i=null==(r=n.scrollElement)?void 0:r.scrollTo)||i.call(r,{[n.options.horizontal?"left":"top"]:e+a,behavior:o})};class j{constructor(e){var t=this;this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let e=null,t=()=>e||(this.targetWindow&&this.targetWindow.ResizeObserver?e=new this.targetWindow.ResizeObserver(e=>{e.forEach(e=>{let t=()=>{this._measureElement(e.target,e)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(t):t()})}):null);return{disconnect:()=>{var n;null==(n=t())||n.disconnect(),e=null},observe:e=>{var n;return null==(n=t())?void 0:n.observe(e,{box:"border-box"})},unobserve:e=>{var n;return null==(n=t())?void 0:n.unobserve(e)}}})(),this.range=null,this.setOptions=e=>{Object.entries(e).forEach(t=>{let[n,r]=t;void 0===r&&delete e[n]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:C,rangeExtractor:E,onChange:()=>{},measureElement:T,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...e}},this.notify=e=>{var t,n;null==(n=(t=this.options).onChange)||n.call(t,this,e)},this.maybeNotify=b(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var e,t;let n=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==n){if(this.cleanup(),!n)return void this.maybeNotify();this.scrollElement=n,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=null!=(t=null==(e=this.scrollElement)?void 0:e.window)?t:null,this.elementsCache.forEach(e=>{this.observer.observe(e)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,e=>{this.scrollRect=e,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(e,t)=>{this.scrollAdjustments=0,this.scrollDirection=t?this.getScrollOffset()<e?"forward":"backward":null,this.scrollOffset=e,this.isScrolling=t,this.maybeNotify()}))}}
1,this.getSize=()=>{var e;return this.options.enabled?(this.scrollRect=null!=(e=this.scrollRect)?e:this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0)},this.getScrollOffset=()=>{var e;return this.options.enabled?(this.scrollOffset=null!=(e=this.scrollOffset)?e:"function"==typeof this.options.initialOffset?this.options.initialOffset():this.options.initialOffset,this.scrollOffset):(this.scrollOffset=null,0)},this.getFurthestMeasurement=(e,t)=>{let n=new Map,r=new Map;for(let i=t-1;i>=0;i--){let t=e[i];if(n.has(t.lane))continue;let a=r.get(t.lane);if(null==a||t.end>a.end?r.set(t.lane,t):t.end<a.end&&n.set(t.lane,!0),n.size===this.options.lanes)break}return r.size===this.options.lanes?Array.from(r.values()).sort((e,t)=>e.end===t.end?e.index-t.index:e.end-t.end)[0]:void 0},this.getMeasurementOptions=b(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(e,t,n,r,i)=>(this.pendingMeasuredCacheIndexes=[],{count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i}),{key:!1}),this.getMeasurements=b(()=>[this.getMeasurementOptions(),this.itemSizeCache],(e,t)=>{let{count:n,paddingStart:r,scrollMargin:i,getItemKey:a,enabled:o}=e;if(!o)return this.measurementsCache=[],this.itemSizeCache.clear(),[];0===this.measurementsCache.length&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(e=>{this.itemSizeCache.set(e.key,e.size)}));let s=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];let l=this.measurementsCache.slice(0,s);for(let e=s;e<n;e++){let n=a(e),o=1===this.options.lanes?l[e-1]:this.getFurthestMeasurement(l,e),s=o?o.end+this.options.gap:r+i,c=t.get(n),d="number"==typeof c?c:this.options.estimateSize(e),u=s+d,h=o?o.lane:e%this.options.lanes;l[e]={index:e,start:s,size:d,end:u,key:n,lane:h}}return this.measurementsCache=l,l},{key:!1,debug:()=>this.options.debug}),this.calculateRange=b(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,t,n,r)=>this.range=e.length>0&&t>0?function(e){let{measurements:t,outerSize:n,scrollOffset:r,lanes:i}=e,a=t.length-1;if(t.length<=i)return{startIndex:0,endIndex:a};let o=P(0,a,e=>t[e].start,r),s=o;if(1===i)for(;s<a&&t[s].end<r+n;)s++;else if(i>1){let e=Array(i).fill(0);for(;s<a&&e.some(e=>e<r+n);){let n=t[s];e[n.lane]=n.end,s++}let l=Array(i).fill(r+n);for(;o>=0&&l.some(e=>e>=r);){let e=t[o];l[e.lane]=e.start,o--}o=Math.max(0,o-o%i),s=Math.min(a,s+(i-1-s%i))}return{startIndex:o,endIndex:s}}({measurements:e,outerSize:t,scrollOffset:n,lanes:r}):null,{key:!1,debug:()=>this.options.debug}
1),this.getVirtualIndexes=b(()=>{let e=null,t=null,n=this.calculateRange();return n&&(e=n.startIndex,t=n.endIndex),this.maybeNotify.updateDeps([this.isScrolling,e,t]),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,t]},(e,t,n,r,i)=>null===r||null===i?[]:e({startIndex:r,endIndex:i,overscan:t,count:n}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{let t=this.options.indexAttribute,n=e.getAttribute(t);return n?parseInt(n,10):(console.warn("Missing attribute name '".concat(t,"={index}' on measured element.")),-1)},this._measureElement=(e,t)=>{let n=this.indexFromElement(e),r=this.measurementsCache[n];if(!r)return;let i=r.key,a=this.elementsCache.get(i);a!==e&&(a&&this.observer.unobserve(a),this.observer.observe(e),this.elementsCache.set(i,e)),e.isConnected&&this.resizeItem(n,this.options.measureElement(e,t,this))},this.resizeItem=(e,t)=>{var n;let r=this.measurementsCache[e];if(!r)return;let i=t-(null!=(n=this.itemSizeCache.get(r.key))?n:r.size);0!==i&&((void 0!==this.shouldAdjustScrollPositionOnItemSizeChange?this.shouldAdjustScrollPositionOnItemSizeChange(r,i,this):r.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=i,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(r.index),this.itemSizeCache=new Map(this.itemSizeCache.set(r.key,t)),this.notify(!1))},this.measureElement=e=>{if(!e)return void this.elementsCache.forEach((e,t)=>{e.isConnected||(this.observer.unobserve(e),this.elementsCache.delete(t))});this._measureElement(e,void 0)},this.getVirtualItems=b(()=>
1[this.getVirtualIndexes(),this.getMeasurements()],(e,t)=>{let n=[];for(let r=0,i=e.length;r<i;r++){let i=t[e[r]];n.push(i)}return n},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{let t=this.getMeasurements();if(0!==t.length)return w(t[P(0,t.length-1,e=>w(t[e]).start,e)])},this.getOffsetForAlignment=function(e,n){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=t.getSize(),a=t.getScrollOffset();return"auto"===n&&(n=e>=a+i?"end":"start"),"center"===n?e+=(r-i)/2:"end"===n&&(e-=i),Math.max(Math.min(t.getTotalSize()+t.options.scrollMargin-i,e),0)},this.getOffsetForIndex=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"auto";e=Math.max(0,Math.min(e,t.options.count-1));let r=t.measurementsCache[e];if(!r)return;let i=t.getSize(),a=t.getScrollOffset();if("auto"===n)if(r.end>=a+i-t.options.scrollPaddingEnd)n="end";else{if(!(r.start<=a+t.options.scrollPaddingStart))return[a,n];n="start"}let o="end"===n?r.end+t.options.scrollPaddingEnd:r.start-t.options.scrollPaddingStart;return[t.getOffsetForAlignment(o,n,r.size),n]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=function(e){let{align:n="start",behavior:r}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"smooth"===r&&t.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),t._scrollToOffset(t.getOffsetForAlignment(e,n),{adjustments:void 0,behavior:r})},this.scrollToIndex=function(e){let{align:n="auto",behavior:r}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"smooth"===r&&t.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),e=Math.max(0,Math.min(e,t.options.count-1));let i=0,a=n=>{if(!t.targetWindow)return;let i=t.getOffsetForIndex(e,n);if(!i)return void console.warn("Failed to get offset for index:",e);let[a,s]=i;t._scrollToOffset(a,{adjustments:void 0,behavior:r}),t.targetWindow.requestAnimationFrame(()=>{let n=t.getScrollOffset(),r=t.getOffsetForIndex(e,s);if(!r)return void console.warn("Failed to get offset for index:",e);1.01>Math.abs(r[0]-n)||o(s)})},o=n=>{t.targetWindow&&(++i<10?t.targetWindow.requestAnimationFrame(()=>a(n)):console.warn("Failed to scroll to index ".concat(e," after ").concat(10," attempts.")))};a(n)},this.scrollBy=function(e){let{behavior:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"smooth"===n&&t.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),t._scrollToOffset(t.getScrollOffset()+e,{adju
1stments:void 0,behavior:n})},this.getTotalSize=()=>{var e,t;let n,r=this.getMeasurements();if(0===r.length)n=this.options.paddingStart;else if(1===this.options.lanes)n=null!=(t=null==(e=r[r.length-1])?void 0:e.end)?t:0;else{let e=Array(this.options.lanes).fill(null),t=r.length-1;for(;t>=0&&e.some(e=>null===e);){let n=r[t];null===e[n.lane]&&(e[n.lane]=n.end),t--}n=Math.max(...e.filter(e=>null!==e))}return Math.max(n-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(e,t)=>{let{adjustments:n,behavior:r}=t;this.options.scrollToFn(e,{behavior:r,adjustments:n},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(e)}}let P=(e,t,n,r)=>{for(;e<=t;){let i=(e+t)/2|0,a=n(i);if(a<r)e=i+1;else{if(!(a>r))return i;t=i-1}}return e>0?e-1:0},$="undefined"!=typeof document?t.useLayoutEffect:t.useEffect;function N(e){return function(e){let n=t.useReducer(()=>({}),{})[1],r={...e,onChange:(t,r)=>{var i;r?(0,m.flushSync)(n):n(),null==(i=e.onChange)||i.call(e,t,r)}},[i]=t.useState(()=>new j(r));return i.setOptions(r),$(()=>i._didMount(),[]),$(()=>i._willUpdate()),i}({observeElementRect:k,observeElementOffset:A,scrollToFn:_,...e})}e.s(["default",()=>O],866299);let O=t.forwardRef(function(e,n){let{title:r,titleId:i,...a}=e;return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":i},a),r?t.createElement("title",{id:i},r):null,t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 12.75 6 6 9-13.5"}))});e.s(["create",()=>D],803959);let M=e=>{let t,n=new Set,r=(e,r)=>{let i="function"==typeof e?e(t):e;if(!Object.is(i,t)){let e=t;t=(null!=r?r:"object"!=typeof i||null===i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e))},o=t=e(r,i,a);return a},R=e=>e,L=e=>{let n=(e=>e?M(e):M)(e),r=e=>(function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:R,r=t.default.useSyncExternalStore(e.subscribe,t.default.useCallback(()=>n(e.getState()),[e,n]),t.default.useCallback(()=>n(e.getInitialState()),[e,n]));return t.default.useDebugValue(r),r})(n,e);return Object.assign(r,n),r},D=e=>e?L(e):L;e.s(["EthereumProvider",()=>uI,"OPTIONAL_EVENTS",()=>uu,"OPTIONAL_METHODS",()=>uc],477350);var F=e.i(219298),U=e.i(467034),B=e.i(277945),z=e.i(648512),W=e.i(36610),q=e.i(275221);let H="2.31.0",V={getDocsUrl:e=>{let{docsBaseUrl:t,docsPath:n="",docsSlug:r}=e;return n?"".concat(null!=t?t:"https://viem.sh").concat(n).concat(r?"#".concat(r):""):void 0},version:"viem@".concat(H)};class G extends Error{walk(e){return function e(t,n){return(null==n?void 0:n(t))?t:t&&"object"==typeof t&&"cause"in t&&void 0!==t.cause?e(t.cause,n):n?null:t}(this,e)}constructor(e,t={}){var n,r;let i=(()=>{var e;return t.cause instanceof G?t.cause.details:(null==(e=t.cause)?void 0:e.message)?t.cause.message:t.details})(),a=t.cause instanceof G&&t.cause.docsPath||t.docsPath,o=null==(n=V.getDocsUrl)?void 0:n.call(V,{...t,docsPath:a});super([e||"An error occurred.","",...t.metaMessages?[...t.metaMessages,""]:[],...o?["Docs: ".concat(o)]:[],...i?["Details: ".concat(i)]:[],...V.version?["Version: ".concat(V.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=i,this.docsPath=a,this.metaMessages=t.metaMessages,this.name=null!=(r=t.name)?r:this.name,this.shortMessage=e,this.version=H}}function K(e){let{strict:t=!0}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return!!e&&"string"==typeof e&&(t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x"))}class Y extends G{constructor({size:e,targetSize:t,type:n}){super("".concat(n.charAt(0).toUpperCase()).concat(n.slice(1).toLowerCase()," size (").concat(e,") exceeds padding size (").concat(t,")."),{name:"SizeExceedsPaddingSizeError"})}}function Z(e){let{dir:t,size:n=32}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e?function(e){let{dir:t,size:n=32}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null===n)return e;let r=e.replace("0x","");if(r.length>2*n)throw new Y({size:Math.ceil(r.length/2),targetSize:n,type:"hex"});return"0x".concat(r["right"===t?"padEnd":"padStart"](2*n,"0"))}(e,{dir:t,size:n}):function(e){let{dir:t,size:n=32}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null===n)return e;if(e.length>n)throw new Y({size:e.length,targetSize:n,type:"bytes"});let r=new Uint8Array(n);for(let i=0;i<n;i++){let a="right"===t;r[a?i:n-i-1]=e[a?i:e.length-i-1]}return r}(e,{dir:t,size:n})}class J extends G{constructor({max:e,min:t,signed:n,size:r,value:i}
1){super('Number "'.concat(i,'" is not in safe ').concat(r?"".concat(8*r,"-bit ").concat(n?"signed":"unsigned"," "):"","integer range ").concat(e?"(".concat(t," to ").concat(e,")"):"(above ".concat(t,")")),{name:"IntegerOutOfRangeError"})}}class Q extends G{constructor({givenSize:e,maxSize:t}){super("Size cannot exceed ".concat(t," bytes. Given size: ").concat(e," bytes."),{name:"SizeOverflowError"})}}function X(e){return K(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}function ee(e,t){let{size:n}=t;if(X(e)>n)throw new Q({givenSize:X(e),maxSize:n})}function et(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{signed:n}=t;t.size&&ee(e,{size:t.size});let r=BigInt(e);if(!n)return r;let i=(e.length-2)/2;return r<=(1n<<8n*BigInt(i)-1n)-1n?r:r-BigInt("0x".concat("f".padStart(2*i,"f")))-1n}let en=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function er(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"number"==typeof e||"bigint"==typeof e?ea(e,t):"string"==typeof e?function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return ei(eo.encode(e),t)}(e,t):"boolean"==typeof e?function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="0x".concat(Number(e));return"number"==typeof t.size?(ee(n,{size:t.size}),Z(n,{size:t.size})):n}(e,t):ei(e,t)}function ei(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="";for(let t=0;t<e.length;t++)n+=en[e[t]];let r="0x".concat(n);return"number"==typeof t.size?(ee(r,{size:t.size}),Z(r,{dir:"right",size:t.size})):r}function ea(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{signed:r,size:i}=n,a=BigInt(e);i?t=r?(1n<<8n*BigInt(i)-1n)-1n:2n**(8n*BigInt(i))-1n:"number"==typeof e&&(t=BigInt(Number.MAX_SAFE_INTEGER));let o="bigint"==typeof t&&r?-t-1n:0;if(t&&a>t||a<o){let n="bigint"==typeof e?"n":"";throw new J({max:t?"".concat(t).concat(n):void 0,min:"".concat(o).concat(n),signed:r,size:i,value:"".concat(e).concat(n)})}let s="0x".concat((r&&a<0?(1n<<BigInt(8*i))+BigInt(a):a).toString(16));return i?Z(s,{size:i}):s}let eo=new TextEncoder,es=new TextEncoder,el={zero:48,nine:57,A:65,F:70,a:97,f:102};function ec(e){return e>=el.zero&&e<=el.nine?e-el.zero:e>=el.A&&e<=el.F?e-(el.A-10):e>=el.a&&e<=el.f?e-(el.a-10):void 0}function ed(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e;t.size&&(ee(n,{size:t.size}),n=Z(n,{dir:"right",size:t.size}));let r=n.slice(2);r.length%2&&(r="0".concat(r));let i=r.length/2,a=new Uint8Array(i);for(let e=0,t=0;e<i;e++){let n=ec(r.charCodeAt(t++)),i=ec(r.charCodeAt(t++));if(void 0===n||void 0===i)throw new G('Invalid byte sequence ("'.concat(r[t-2]).concat(r[t-1],'" in "').concat(r,'").'));a[e]=16*n+i}return a}function eu(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=es.encode(e);return"number"==typeof t.size?(ee(n,{size:t.size}),Z(n,{dir:"right",size:t.size})):n}var eh=e.i(145535);function ep(e,t){let n=(0,eh.keccak_256)(K(e,{strict:!1})?function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"number"==typeof e||"bigint"==typeof e?ed(ea(e,t)):"boolean"==typeof e?function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=new Uint8Array(1);return(n[0]=Number(e),"number"==typeof t.size)?(ee(n,{size:t.size}),Z(n,{size:t.size})):n}(e,t):K(e)?ed(e,t):eu(e,t)}(e):e);return"bytes"===(t||"hex")?n:er(n)}class ef extends Map{get(e){let t=super.get(e);return super.has(e)&&void 0!==t&&(this.delete(e),super.set(e,t)),t}set(e,t){if(super.set(e,t),this.maxSize&&this.size>this.maxSize){let e=this.keys().next().value;e&&this.delete(e)}return this}constructor(e){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=e}}let eg=new ef(8192);async function em(t){let{hash:n,signature:r}=t,i=K(n)?n:er(n),{secp256k1:a}=await e.A(647740),o=(()=>{if("object"==typeof r&&"r"in r&&"s"in r){let{r:e,s:t,v:n,yParity:i}=r,o=ey(Number(null!=i?i:n));return new a.Signature(et(e),et(t)).addRecoveryBit(o)}let e=K(r)?r:er(r);if(65!==X(e))throw Error("invalid signature length");let t=ey(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Number(et(e,t))}("0x".concat(e.slice(130))));return a.Signature.fromCompact(e.substring(2,130)).addRecoveryBit(t)}
1)().recoverPublicKey(i.substring(2)).toHex(!1);return"0x".concat(o)}function ey(e){if(0===e||1===e)return e;if(27===e)return 0;if(28===e)return 1;throw Error("Invalid yParityOrV value")}async function ev(e){let{hash:t,signature:n}=e;var r=await em({hash:t,signature:n});let i=ep("0x".concat(r.substring(4))).substring(26);return function(e,t){if(eg.has("".concat(e,".").concat(void 0)))return eg.get("".concat(e,".").concat(void 0));let n=t?"".concat(t).concat(e.toLowerCase()):e.substring(2).toLowerCase(),r=ep(eu(n),"bytes"),i=(t?n.substring("".concat(t,"0x").length):n).split("");for(let e=0;e<40;e+=2)r[e>>1]>>4>=8&&i[e]&&(i[e]=i[e].toUpperCase()),(15&r[e>>1])>=8&&i[e+1]&&(i[e+1]=i[e+1].toUpperCase());let a="0x".concat(i.join(""));return eg.set("".concat(e,".").concat(t),a),a}("0x".concat(i))}var eb=e.i(103476);function ew(e){return"".concat(e<0?"-":"","0x").concat(Math.abs(e).toString(16).padStart(2,"0"))}class ex{constructor(e,t){this.type=e,this.data=t}}class eC extends Error{constructor(e){super(e),Object.setPrototypeOf(this,Object.create(eC.prototype)),Object.defineProperty(this,"name",{configurable:!0,enumerable:!1,value:eC.name})}}function eE(e,t,n){let r=Math.floor(n/0x100000000);e.setUint32(t,r),e.setUint32(t+4,n)}function ek(e,t){return 0x100000000*e.getInt32(t)+e.getUint32(t+4)}let eS={type:-1,encode:function(e){return e instanceof Date?function(e){let{sec:t,nsec:n}=e;if(t>=0&&n>=0&&t<=0x3ffffffff)if(0===n&&t<=0xffffffff){let e=new Uint8Array(4);return new DataView(e.buffer).setUint32(0,t),e}else{let e=t/0x100000000,r=new Uint8Array(8),i=new DataView(r.buffer);return i.setUint32(0,n<<2|3&e),i.setUint32(4,0|t),r}{let e=new Uint8Array(12),r=new DataView(e.buffer);return r.setUint32(0,n),eE(r,4,t),e}}(function(e){let t=e.getTime(),n=Math.floor(t/1e3),r=(t-1e3*n)*1e6,i=Math.floor(r/1e9);return{sec:n+i,nsec:r-1e9*i}}(e)):null},decode:function(e){let t=function(e){let t=new DataView(e.buffer,e.byteOffset,e.byteLength);switch(e.byteLength){case 4:return{sec:t.getUint32(0),nsec:0};case 8:{let e=t.getUint32(0);return{sec:(3&e)*0x100000000+t.getUint32(4),nsec:e>>>2}}case 12:return{sec:ek(t,4),nsec:t.getUint32(0)};default:throw new eC("Unrecognized data size for timestamp (expected 4, 8, or 12): ".concat(e.length))}}(e);return new Date(1e3*t.sec+t.nsec/1e6)}};class eI{register(e){let{type:t,encode:n,decode:r}=e;if(t>=0)this.encoders[t]=n,this.decoders[t]=r;else{let e=-1-t;this.builtInEncoders[e]=n,this.builtInDecoders[e]=r}}tryToEncode(e,t){for(let n=0;n<this.builtInEncoders.length;n++){let r=this.builtInEncoders[n];if(null!=r){let i=r(e,t);if(null!=i)return new ex(-1-n,i)}}for(let n=0;n<this.encoders.length;n++){let r=this.encoders[n];if(null!=r){let i=r(e,t);if(null!=i)return new ex(n,i)}}return e instanceof ex?e:null}decode(e,t,n){let r=t<0?this.builtInDecoders[-1-t]:this.decoders[t];return r?r(e,t,n):new ex(t,e)}constructor(){this.builtInEncoders=[],this.builtInDecoders=[],this.encoders=[],this.decoders=[],this.register(eS)}}eI.defaultCodec=new eI;let eA=new TextEncoder;function eT(e,t,n){let r=t,i=r+n,a=[],o="";for(;r<i;){let t=e[r++];if((128&t)==0)a.push(t);else if((224&t)==192){let n=63&e[r++];a.push((31&t)<<6|n)}else if((240&t)==224){let n=63&e[r++],i=63&e[r++];a.push((31&t)<<12|n<<6|i)}else if((248&t)==240){let n=63&e[r++],i=(7&t)<<18|n<<12|(63&e[r++])<<6|63&e[r++];i>65535&&(i-=65536,a.push(i>>>10&1023|55296),i=56320|1023&i),a.push(i)}else a.push(t);a.length>=4096&&(o+=String.fromCharCode(...a),a.length=0)}return a.length>0&&(o+=String.fromCharCode(...a)),o}let e_=new TextDecoder;function ej(e){return e instanceof Uint8Array?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e instanceof ArrayBuffer||"undefined"!=typeof SharedArrayBuffer&&e instanceof SharedArrayBuffer?new Uint8Array(e):Uint8Array.from(e)}let eP="array",e$="map_key",eN="map_value",eO=e=>{if("string"==typeof e||"number"==typeof e)return e;throw new eC("The type of key must be string or number but "+typeof e)};class eM{get length(){return this.stackHeadPosition+1}top(){return this.stack[this.stackHeadPosition]}pushArrayState(e){let t=this.getUninitializedStateFromPool();t.type=eP,t.position=0,t.size=e,t.array=Array(e)}pushMapState(e){let t=this.getUninitializedStateFromPool();t.type=e$,t.readCount=0,t.size=e,t.map={}}getUninitializedStateFromPool(){return this.stackHeadPosition++,this.stackHeadPosition===this.stack.length&&this.stack.push({type:void 0,size:0,array:void 0,position:0,readCount:0,map:void 0,key:null}),this.stack[this.stackHeadPosition]}release(e){if(this.stack[this.stackHeadPosition]!==e)throw Error("Invalid stack state. Released state is not on top of the stack.");e.type===eP&&(e.size=0,e.array=void 0,e.position=0,e.type=void 0),(e.type===e$||e.type===eN)&&(e.size=0,e.map=void 0,e.readCount=0,e.type=void 0),this.stackHeadPosition--}reset(){this.stack.length=0,this.stackHeadPosition=-1}constructor(){this.stack=[],this.stackHeadPosition=-1}}let eR=new DataView(new ArrayBuffer(0)),eL=new Uint8Array(eR.buffer);try{eR.getInt8(0)}catch(e){if(!(e instanceof RangeError))throw Error("This module is not supported in the current JavaScript engine because DataView does not throw RangeError on out-of-bounds access")}let eD=RangeError("Insufficient data"),eF=new class{canBeCached(e){return e>0&&e<=this.maxKeyLength}
1find(e,t,n){let r=this.caches[n-1];e:for(let i of r){let r=i.bytes;for(let i=0;i<n;i++)if(r[i]!==e[t+i])continue e;return i.str}return null}store(e,t){let n=this.caches[e.length-1],r={bytes:e,str:t};n.length>=this.maxLengthPerKey?n[Math.random()*n.length|0]=r:n.push(r)}decode(e,t,n){let r=this.find(e,t,n);if(null!=r)return this.hit++,r;this.miss++;let i=eT(e,t,n),a=Uint8Array.prototype.slice.call(e,t,t+n);return this.store(a,i),i}constructor(e=16,t=16){this.hit=0,this.miss=0,this.maxKeyLength=e,this.maxLengthPerKey=t,this.caches=[];for(let e=0;e<this.maxKeyLength;e++)this.caches.push([])}};class eU{clone(){return new eU({extensionCodec:this.extensionCodec,context:this.context,useBigInt64:this.useBigInt64,rawStrings:this.rawStrings,maxStrLength:this.maxStrLength,maxBinLength:this.maxBinLength,maxArrayLength:this.maxArrayLength,maxMapLength:this.maxMapLength,maxExtLength:this.maxExtLength,keyDecoder:this.keyDecoder})}reinitializeState(){this.totalPos=0,this.headByte=-1,this.stack.reset()}setBuffer(e){let t=ej(e);this.bytes=t,this.view=new DataView(t.buffer,t.byteOffset,t.byteLength),this.pos=0}appendBuffer(e){if(-1!==this.headByte||this.hasRemaining(1)){let t=this.bytes.subarray(this.pos),n=ej(e),r=new Uint8Array(t.length+n.length);r.set(t),r.set(n,t.length),this.setBuffer(r)}else this.setBuffer(e)}hasRemaining(e){return this.view.byteLength-this.pos>=e}createExtraByteError(e){let{view:t,pos:n}=this;return RangeError("Extra ".concat(t.byteLength-n," of ").concat(t.byteLength," byte(s) found at buffer[").concat(e,"]"))}decode(e){if(this.entered)return this.clone().decode(e);try{this.entered=!0,this.reinitializeState(),this.setBuffer(e);let t=this.doDecodeSync();if(this.hasRemaining(1))throw this.createExtraByteError(this.pos);return t}finally{this.entered=!1}}*decodeMulti(e){if(this.entered){let t=this.clone();yield*t.decodeMulti(e);return}try{for(this.entered=!0,this.reinitializeState(),this.setBuffer(e);this.hasRemaining(1);)yield this.doDecodeSync()}finally{this.entered=!1}}async decodeAsync(e){if(this.entered)return this.clone().decodeAsync(e);try{let t;this.entered=!0;let n=!1;for await(let r of e){if(n)throw this.entered=!1,this.createExtraByteError(this.totalPos);this.appendBuffer(r);try{t=this.doDecodeSync(),n=!0}catch(e){if(!(e instanceof RangeError))throw e}this.totalPos+=this.pos}if(n){if(this.hasRemaining(1))throw this.createExtraByteError(this.totalPos);return t}let{headByte:r,pos:i,totalPos:a}=this;throw RangeError("Insufficient data in parsing ".concat(ew(r)," at ").concat(a," (").concat(i," in the current buffer)"))}finally{this.entered=!1}}decodeArrayStream(e){return this.decodeMultiAsync(e,!0)}decodeStream(e){return this.decodeMultiAsync(e,!1)}async *decodeMultiAsync(e,t){if(this.entered){let n=this.clone();yield*n.decodeMultiAsync(e,t);return}try{this.entered=!0;let n=t,r=-1;for await(let i of e){if(t&&0===r)throw this.createExtraByteError(this.totalPos);this.appendBuffer(i),n&&(r=this.readArraySize(),n=!1,this.complete());try{for(;yield this.doDecodeSync(),0!=--r;);}catch(e){if(!(e instanceof RangeError))throw e}this.totalPos+=this.pos}}finally{this.entered=!1}}doDecodeSync(){t:for(;;){let e,t=this.readHeadByte();if(t>=224)e=t-256;else if(t<192)if(t<128)e=t;else if(t<144){let n=t-128;if(0!==n){this.pushMapState(n),this.complete();continue}e={}}else if(t<160){let n=t-144;if(0!==n){this.pushArrayState(n),this.complete();continue}e=[]}else{let n=t-160;e=this.decodeString(n,0)}else if(192===t)e=null;else if(194===t)e=!1;else if(195===t)e=!0;else if(202===t)e=this.readF32();else if(203===t)e=this.readF64();else if(204===t)e=this.readU8();else if(205===t)e=this.readU16();else if(206===t)e=this.readU32();else if(207===t)e=this.useBigInt64?this.readU64AsBigInt():this.readU64();else if(208===t)e=this.readI8();else if(209===t)e=this.readI16();else if(210===t)e=this.readI32();else if(211===t)e=this.useBigInt64?this.readI64AsBigInt():this.readI64();else if(217===t){let t=this.lookU8();e=this.decodeString(t,1)}else if(218===t){let t=this.lookU16();e=this.decodeString(t,2)}else if(219===t){let t=this.lookU32();e=this.decodeString(t,4)}else if(220===t){let t=this.readU16();if(0!==t){this.pushArrayState(t),this.complete();continue}e=[]}else if(221===t){let t=this.readU32();if(0!==t){this.pushArrayState(t),this.complete();continue}e=[]}else if(222===t){let t=this.readU16();if(0!==t){this.pushMapState(t),this.complete();continue}e={}}else if(223===t){let t=this.readU32();if(0!==t){this.pushMapState(t),this.complete();continue}e={}}else if(196===t){let t=this.lookU8();e=this.decodeBinary(t,1)}else if(197===t){let t=this.lookU16();e=this.decodeBinary(t,2)}else if(198===t){let t=this.lookU32();e=this.decodeBinary(t,4)}else if(212===t)e=this.decodeExtension(1,0);else if(213===t)e=this.decodeExtension(2,0);else if(214===t)e=this.decodeExtension(4,0);else if(215===t)e=this.decodeExtension(8,0);else if(216===t)e=this.decodeExtension(16,0);else if(199===t){let t=this.lookU8();e=this.decodeExtension(t,1)}else if(200===t){let t=this.lookU16();e=this.decodeExtension(t,2)}else if(201===t){let t=this.lookU32();e=this.decodeExtension(t,4)}else throw new eC("Unrecognized type byte: ".concat(ew(t)));this.complete();let n=this.stack;for(;n.length>0;){let t=n.top();if(t.type===eP)if(t.array[t.position]=e,t.position++,t.position===t.size)e=t.array,n.release(t);else continue t;else if(t.type===e$){if("__proto__"===e)throw new eC("The key __proto__ is not allowed");t.key=this.mapKeyConverter(e),t.type=eN;continue t}else if(t.map[t.key]=e,t.readCount++,t.readCount===t.size)e=t.map,n.release(t);else{t.key=null,t.type=e$;continue t}}return e}}readHeadByte(){return -1===this.headByte&&(this.headByte=this.readU8()),this.headByte}complete(){this.headByte=-1}readArraySize(){let e=this.readHeadByte();switch(e){case 220:return this.readU16();case 221:return this.readU32();default:if(e<160)return e-144;throw new eC("Unrecognized array type byte: ".concat(ew(e)))}}pushMapState(e){if(e>this.maxMapLength)throw new eC("Max length exceeded: map length (".concat(e,") > maxMapLengthLength (").concat(this.maxMapLength,")"));this.stack.pushMapState(e)}pushArrayState(e){if(e>this.maxArrayLength)throw new eC("Max length exceeded: array length (".concat(e,") > maxArrayLength (").concat(this.maxArrayLength,")"));this.stack.pushArrayState(e)}decodeString(e,t){return!this.rawStrings||this.stateIsMapKey()?this.decodeUtf8String(e,t):this.decodeBinary(e,t)}decodeUtf8String(e,t){var n;let r;if(e>this.maxStrLength)throw new eC("Max length exceeded: UTF-8 byte length (".concat(e,") > maxStrLength (").concat(this.maxStrLength,")"));if(this.bytes.byteLength<this.pos+t+e)throw eD;let i=this.pos+t;return r=this.stateIsMapKey()&&(null==(n=this.keyDecoder)?void 0:n.canBeCached(e))?this.keyDecoder.decode(this.bytes,i,e):function(e,t,n){if(!(n>200))return eT(e,t,n);let r=e.subarray(t,t+n);return e_.decode(r)}(this.bytes,i,e),this.pos+=t+e,r}stateIsMapKey(){return this.stack.length>0&&this.stack.top().type===e$}decodeBinary(e,t){if(e>this.maxBinLength)throw new eC("Max length exceeded: bin length (".concat(e,") > maxBinLength (").concat(this.maxBinLength,")"));if(!this.hasRemaining(e+t))throw eD;let n=this.pos+t,r=this.bytes.subarray(n,n+e);return this.pos+=t+e,r}decodeExtension(e,t){if(e>this.maxExtLength)throw new eC("Max length exceeded: ext length (".concat(e,") > maxExtLength (").concat(this.maxExtLength,")"));let n=this.view.getInt8(this.pos+t),r=this.decodeBinary(e,t+1);return this.extensionCodec.decode(r,n,this.context)}lookU8(){return this.view.getUint8(this.pos)}lookU16(){return this.view.getUint16(this.pos)}lookU32(){return this.view.getUint32(this.pos)}readU8(){let e=this.view.getUint8(this.pos);return this.pos++,e}readI8(){let e=this.view.getInt8(this.pos);return this.pos++,e}readU16(){let e=this.view.getUint16(this.pos);return this.pos+=2,e}readI16(){let e=this.view.getInt16(this.pos);return this.pos+=2,e}readU32(){let e=this.view.getUint32(this.pos);return this.pos+=4,e}readI32(){let e=this.view.getInt32(this.pos);return this.pos+=4,e}readU64(){var e,t;let n=(e=this.view,t=this.pos,0x100000000*e.getUint32(t)+e.getUint32(t+4));return this.pos+=8,n}readI64(){let e=ek(this.view,this.pos);return this.pos+=8,e}readU64AsBigInt(){let e=this.view.getBigUint64(this.pos);return this.pos+=8,e}readI64AsBigInt(){let e=this.view.getBigInt64(this.pos);return this.pos+=8,e}readF32(){let e=this.view.getFloat32(this.pos);return this.pos+=4,e}readF64(){let e=this.view.getFloat64(this.pos);return this.pos+=8,e}constructor(e){var t,n,r,i,a,o,s,l,c;this.totalPos=0,this.pos=0,this.view=eR,this.bytes=eL,this.headByte=-1,this.stack=new eM,this.entered=!1,this.extensionCodec=null!=(t=null==e?void 0:e.extensionCodec)?t:eI.defaultCodec,this.context=null==e?void 0:e.context,this.useBigInt64=null!=(n=null==e?void 0:e.useBigInt64)&&n,this.rawStrings=null!=(r=null==e?void 0:e.rawStrings)&&r,this.maxStrLength=null!=(i=null==e?void 0:e.maxStrLength)?i:0xffffffff,this.maxBinLength=null!=(a=null==e?void 0:e.maxBinLength)?a:0xffffffff,this.maxArrayLength=null!=(o=null==e?void 0:e.maxArrayLength)?o:0xffffffff,this.maxMapLength=null!=(s=null==e?void 0:e.maxMapLength)?s:0xffffffff,this.maxExtLength=null!=(l=null==e?void 0:e.maxExtLength)?l:0xffffffff,this.keyDecoder=(null==e?void 0:e.keyDecoder)!==void 0?e.keyDecoder:eF,this.mapKeyConverter=null!=(c=null==e?void 0:e.mapKeyConverter)?c:eO}}class eB{clone(){return new eB({extensionCodec:this.extensionCodec,context:this.context,useBigInt64:this.useBigInt64,maxDepth:this.maxDepth,initialBufferSize:this.initialBufferSize,sortKeys:this.sortKeys,forceFloat32:this.forceFloat32,ignoreUndefined:this.ignoreUndefined,forceIntegerToFloat:this.forceIntegerToFloat})}reinitializeState(){this.pos=0}encodeSharedRef(e){if(this.entered)return this.clone().encodeSharedRef(e);try{return this.entered=!0,this.reinitializeState(),this.doEncode(e,1),this.bytes.subarray(0,this.pos)}finally{this.entered=!1}}encode(e){if(this.entered)return this.clone().encode(e);try{return this.entered=!0,this.reinitializeState(),this.doEncode(e,1),this.bytes.slice(0,this.pos)}finally{this.entered=!1}}doEncode(e,t){if(t>this.maxDepth)throw Error("Too deep objects in depth ".concat(t));null==e?this.encodeNil():"boolean"==typeof e?this.encodeBoolean(e):"number"==typeof e?this.forceIntegerToFloat?this.encodeNumberAsFloat(e):this.encodeNumber(e):"str
1ing"==typeof e?this.encodeString(e):this.useBigInt64&&"bigint"==typeof e?this.encodeBigInt64(e):this.encodeObject(e,t)}ensureBufferSizeToWrite(e){let t=this.pos+e;this.view.byteLength<t&&this.resizeBuffer(2*t)}resizeBuffer(e){let t=new ArrayBuffer(e),n=new Uint8Array(t),r=new DataView(t);n.set(this.bytes),this.view=r,this.bytes=n}encodeNil(){this.writeU8(192)}encodeBoolean(e){!1===e?this.writeU8(194):this.writeU8(195)}encodeNumber(e){!this.forceIntegerToFloat&&Number.isSafeInteger(e)?e>=0?e<128?this.writeU8(e):e<256?(this.writeU8(204),this.writeU8(e)):e<65536?(this.writeU8(205),this.writeU16(e)):e<0x100000000?(this.writeU8(206),this.writeU32(e)):this.useBigInt64?this.encodeNumberAsFloat(e):(this.writeU8(207),this.writeU64(e)):e>=-32?this.writeU8(224|e+32):e>=-128?(this.writeU8(208),this.writeI8(e)):e>=-32768?(this.writeU8(209),this.writeI16(e)):e>=-0x80000000?(this.writeU8(210),this.writeI32(e)):this.useBigInt64?this.encodeNumberAsFloat(e):(this.writeU8(211),this.writeI64(e)):this.encodeNumberAsFloat(e)}encodeNumberAsFloat(e){this.forceFloat32?(this.writeU8(202),this.writeF32(e)):(this.writeU8(203),this.writeF64(e))}encodeBigInt64(e){e>=BigInt(0)?(this.writeU8(207),this.writeBigUint64(e)):(this.writeU8(211),this.writeBigInt64(e))}writeStringHeader(e){if(e<32)this.writeU8(160+e);else if(e<256)this.writeU8(217),this.writeU8(e);else if(e<65536)this.writeU8(218),this.writeU16(e);else if(e<0x100000000)this.writeU8(219),this.writeU32(e);else throw Error("Too long string: ".concat(e," bytes in UTF-8"))}encodeString(e){let t=function(e){let t=e.length,n=0,r=0;for(;r<t;){let i=e.charCodeAt(r++);if((0xffffff80&i)==0){n++;continue}if((0xfffff800&i)==0)n+=2;else{if(i>=55296&&i<=56319&&r<t){let t=e.charCodeAt(r);(64512&t)==56320&&(++r,i=((1023&i)<<10)+(1023&t)+65536)}(0xffff0000&i)==0?n+=3:n+=4}}return n}(e);this.ensureBufferSizeToWrite(5+t),this.writeStringHeader(t),function(e,t,n){if(e.length>50)eA.encodeInto(e,t.subarray(n));else!function(e,t,n){let r=e.length,i=n,a=0;for(;a<r;){let n=e.charCodeAt(a++);if((0xffffff80&n)==0){t[i++]=n;continue}if((0xfffff800&n)==0)t[i++]=n>>6&31|192;else{if(n>=55296&&n<=56319&&a<r){let t=e.charCodeAt(a);(64512&t)==56320&&(++a,n=((1023&n)<<10)+(1023&t)+65536)}(0xffff0000&n)==0?t[i++]=n>>12&15|224:(t[i++]=n>>18&7|240,t[i++]=n>>12&63|128),t[i++]=n>>6&63|128}t[i++]=63&n|128}}(e,t,n)}(e,this.bytes,this.pos),this.pos+=t}encodeObject(e,t){let n=this.extensionCodec.tryToEncode(e,this.context);if(null!=n)this.encodeExtension(n);else if(Array.isArray(e))this.encodeArray(e,t);else if(ArrayBuffer.isView(e))this.encodeBinary(e);else if("object"==typeof e)this.encodeMap(e,t);else throw Error("Unrecognized object: ".concat(Object.prototype.toString.apply(e)))}encodeBinary(e){let t=e.byteLength;if(t<256)this.writeU8(196),this.writeU8(t);else if(t<65536)this.writeU8(197),this.writeU16(t);else if(t<0x100000000)this.writeU8(198),this.writeU32(t);else throw Error("Too large binary: ".concat(t));let n=ej(e);this.writeU8a(n)}encodeArray(e,t){let n=e.length;if(n<16)this.writeU8(144+n);else if(n<65536)this.writeU8(220),this.writeU16(n);else if(n<0x100000000)this.writeU8(221),this.writeU32(n);else throw Error("Too large array: ".concat(n));for(let n of e)this.doEncode(n,t+1)}countWithoutUndefined(e,t){let n=0;for(let r of t)void 0!==e[r]&&n++;return n}encodeMap(e,t){let n=Object.keys(e);this.sortKeys&&n.sort();let r=this.ignoreUndefined?this.countWithoutUndefined(e,n):n.length;if(r<16)this.writeU8(128+r);else if(r<65536)this.writeU8(222),this.writeU16(r);else if(r<0x100000000)this.writeU8(223),this.writeU32(r);else throw Error("Too large map object: ".concat(r));for(let r of n){let n=e[r];this.ignoreUndefined&&void 0===n||(this.encodeString(r),this.doEncode(n,t+1))}}encodeExtension(e){if("function"==typeof e.data){let t=e.data(this.pos+6),n=t.length;if(n>=0x100000000)throw Error("Too large extension object: ".concat(n));this.writeU8(201),this.writeU32(n),this.writeI8(e.type),this.writeU8a(t);return}let t=e.data.length;if(1===t)this.writeU8(212);else if(2===t)this.writeU8(213);else if(4===t)this.writeU8(214);else if(8===t)this.writeU8(215);else if(16===t)this.writeU8(216);else if(t<256)this.writeU8(199),this.writeU8(t);else if(t<65536)this.writeU8(200),this.writeU16(t);else if(t<0x100000000)this.writeU8(201),this.writeU32(t);else throw Error("Too large extension object: ".concat(t));this.writeI8(e.type),this.writeU8a(e.data)}writeU8(e){this.ensureBufferSizeToWrite(1),this.view.setUint8(this.pos,e),this.pos++}writeU8a(e){let t=e.length;this.ensureBufferSizeToWrite(t),this.bytes.set(e,this.pos),this.pos+=t}writeI8(e){this.ensureBufferSizeToWrite(1),this.view.setInt8(this.pos,e),this.pos++}writeU16(e){this.ensureBufferSizeToWrite(2),this.view.setUint16(this.pos,e),this.pos+=2}writeI16(e){this.ensureBufferSizeToWrite(2),this.view.setInt16(this.pos,e),this.pos+=2}writeU32(e){this.ensureBufferSizeToWrite(4),this.view.setUint32(this.pos,e),this.pos+=4}writeI32(e){this.ensureBufferSizeToWrite(4),this.view.setInt32(this.pos,e),this.pos+=4}writeF32(e){this.ensureBufferSizeToWrite(4),this.view.setFloat32(this.pos,e),this.pos+=4}writeF64(e){this.ensureBufferSizeToWrite(8),this.view.setFloat64(this.pos,e),this.pos+=8}writeU64(e){var t,n;this.ensureBufferSizeToWrite(8),t=this.view,n=this.pos,t.setUint32(n,e/0x100000000),t.setUint32(n+4,e),this.pos+=8}writeI64(e){this.ensureBufferSizeToWrite(8),eE(this.view,this.pos,e),this.pos+=8}writeBigUint64(e){this.ensureBufferSizeToWrite(8),this.view.setBigUint64(this.pos,e),this.pos+=8}writeBigInt64(e){this.ensureBufferSizeToWrite(8),this.view.setBigInt64(this.pos,e),this.pos+=8}constructor(e){var t,n,r,i,a,o,s,l;this.entered=!1,this.extensionCodec=null!=(t=null==e?void 0:e.extensionCodec)?t:eI.defaultCodec,this.context=null==e?void 0:e.context,this.useBigInt64=null!=(n=null==e?void 0:e.useBigInt64)&&n,this.maxDepth=null!=(r=null==e?void 0:e.maxDepth)?r:100,this.initialBufferSize=null!=(i=null==e?void 0:e.initialBufferSize)?i:2048,this.sortKeys=null!=(a=null==e?void 0:e.sortKeys)&&a,this.forceFloat32=null!=(o=null==e?void 0:e.forceFloat32)&&o,this.ignoreUndefined=null!=(s=null==e?void 0:e.ignoreUndefined)&&s,this.forceIntegerToFloat=null!=(l=null==e?void 0:e.forceIntegerToFloat)&&l,this.pos=0,this.view=new DataView(new ArrayBuffer(this.initialBufferSize)),this.bytes=new Uint8Array(this.view.buffer)}}var ez=e.i(166953),eW=e.i(121609);function eq(e){return null!=globalThis.Buffer?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e}function eH(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return null!=globalThis.Buffer&&null!=globalThis.Buffer.allocUnsafe?eq(globalThis.Buffer.allocUnsafe(e)):new Uint8Array(e)}function eV(e,t){t||(t=e.reduce((e,t)=>
1e+t.length,0));let n=eH(t),r=0;for(let t of e)n.set(t,r),r+=t.length;return eq(n)}var eG=e.i(18531);function eK(e,t,n,r){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:n},decoder:{decode:r}}}let eY=eK("utf8","u",e=>"u"+new TextDecoder("utf8").decode(e),e=>new TextEncoder().encode(e.substring(1))),eZ=eK("ascii","a",e=>{let t="a";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return t},e=>{let t=eH((e=e.substring(1)).length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}),eJ={utf8:eY,"utf-8":eY,hex:eG.bases.base16,latin1:eZ,ascii:eZ,binary:eZ,...eG.bases};function eQ(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"utf8",n=eJ[t];if(!n)throw Error('Unsupported encoding "'.concat(t,'"'));return("utf8"===t||"utf-8"===t)&&null!=globalThis.Buffer&&null!=globalThis.Buffer.from?eq(globalThis.Buffer.from(e,"utf-8")):n.decoder.decode("".concat(n.prefix).concat(e))}function eX(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"utf8",n=eJ[t];if(!n)throw Error('Unsupported encoding "'.concat(t,'"'));return("utf8"===t||"utf-8"===t)&&null!=globalThis.Buffer&&null!=globalThis.Buffer.from?globalThis.Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString("utf8"):n.encoder.encode(e).substring(1)}var e0=e.i(281223),e1=e.i(5625);function e2(e){let[t,n]=e.split(":");return{namespace:t,reference:n}}function e3(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=[];return Object.keys(e).forEach(r=>{if(t.length&&!t.includes(r))return;let i=e[r];n.push(...i.accounts)}),n}function e5(e,t){return e.includes(":")?[e]:t.chains||[]}var e4=Object.defineProperty,e6=Object.defineProperties,e8=Object.getOwnPropertyDescriptors,e9=Object.getOwnPropertySymbols,e7=Object.prototype.hasOwnProperty,te=Object.prototype.propertyIsEnumerable,tt=(e,t,n)=>t in e?e4(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,tn=(e,t)=>{for(var n in t||(t={}))e7.call(t,n)&&tt(e,n,t[n]);if(e9)for(var n of e9(t))te.call(t,n)&&tt(e,n,t[n]);return e},tr=(e,t,n)=>tt(e,"symbol"!=typeof t?t+"":t,n);let ti={reactNative:"react-native",node:"node",browser:"browser",unknown:"unknown"};function ta(){return"u">typeof y.default&&"u">typeof y.default.versions&&"u">typeof y.default.versions.node}function to(){return!(0,W.getDocument)()&&!!(0,W.getNavigator)()&&"ReactNative"===navigator.product}function ts(){return!ta()&&!!(0,W.getNavigator)()&&!!(0,W.getDocument)()}function tl(){return to()?ti.reactNative:ta()?ti.node:ts()?ti.browser:ti.unknown}function tc(){var t;try{return to()&&"u">typeof(null==e.g?void 0:e.g.Application)?null==(t=e.g.Application)?void 0:t.applicationId:void 0}catch(e){return}}function td(){return(0,q.getWindowMetadata)()||{name:"",description:"",url:"",icons:[""]}}function tu(t,n,r){let i=function(){if(tl()===ti.reactNative&&"u">typeof(null==e.g?void 0:e.g.Platform)){let{OS:t,Version:n}=e.g.Platform;return[t,n].join("-")}let t=(0,B.detect)();if(null===t)return"unknown";let n=t.os?t.os.replace(" ","").toLowerCase():"unknown";return"browser"===t.type?[n,t.name,t.version].join("-"):[n,t.version].join("-")}(),a=function(){var e;let t=tl();return t===ti.browser?[t,(null==(e=(0,W.getLocation)())?void 0:e.host)||"unknown"].join(":"):t}();return[[t,n].join("-"),["js",r].join("-"),i,a].join("/")}function th(e,t){return e.filter(e=>t.includes(e)).length===e.length}function tp(e){return Object.fromEntries(e.entries())}function tf(e){return new Map(Object.entries(e))}function tg(){let e,t,n,r,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:z.FIVE_MINUTES,a=arguments.length>1?arguments[1]:void 0,o=(0,z.toMiliseconds)(i||z.FIVE_MINUTES);return{resolve:t=>{n&&e&&(clearTimeout(n),e(t),r=Promise.resolve(t))},reject:e=>{n&&t&&(clearTimeout(n),t(e))},done:()=>new Promise((i,s)=>{if(r)return i(r);n=setTimeout(()=>{let e=Error(a);r=Promise.reject(e),s(e)},o),e=i,t=s})}}function tm(e,t,n){return new Promise(async(r,i)=>{let a=setTimeout(()=>i(Error(n)),t);try{let t=await e;r(t)}catch(e){i(e)}clearTimeout(a)})}function ty(e,t){if("string"==typeof t&&t.startsWith("".concat(e,":")))return t;if("topic"===e.toLowerCase()){if("string"!=typeof t)throw Error('Value must be "string" for expirer target type: topic');return"topic:".concat(t)}if("id"===e.toLowerCase()){if("number"!=typeof t)throw Error('Value must be "number" for expirer target type: id');return"id:".concat(t)}throw Error("Unknown expirer target type: ".concat(e))}function tv(e){let[t,n]=e.split(":"),r={id:void 0,topic:void 0};if("topic"===t&&"string"==typeof n)r.topic=n;else if("id"===t&&Number.isInteger(Number(n)))r.id=Number(n);else throw Error("Invalid target, expected id:number or topic:string, got ".concat(t,":").concat(n));return r}function tb(e,t){return(0,z.fromMiliseconds)((t||Date.now())+(0,z.toMiliseconds)(e))}function tw(e){return Date.now()>=(0,z.toMiliseconds)(e)}function tx(e,t){return"".concat(e).concat(t?":".concat(t):"")}function tC(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return[...new Set([...e,...t])]}async function tE(t){var n,r;let{id:i,topic:a,wcDeepLink:o}=t;try{if(!o)return;let t="string"==typeof o?JSON.parse(o):o,s=null==t?void 0:t.href;if("string"!=typeof s)return;let l=function(e,t,n){let r="requestId=".concat(t,"&sessionTopic=").concat(n);e.endsWith("/")&&(e=e.slice(0,-1));let i="".concat(e);
1if(e.startsWith("https://t.me")){let t=e.includes("?")?"&startapp=":"?startapp=";i="".concat(i).concat(t).concat(function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=U.Buffer.from(e).toString("base64");return t?n.replace(/[=]/g,""):n}(r,!0))}else i="".concat(i,"/wc?").concat(r);return i}(s,i,a),c=tl();if(c===ti.browser){let e;if(!(null!=(n=(0,W.getDocument)())&&n.hasFocus()))return void console.warn("Document does not have focus, skipping deeplink.");r=l,e="_self",!function(){try{return window.self!==window.top}catch(e){return!1}}()?("u">typeof window&&(window.TelegramWebviewProxy||window.Telegram||window.TelegramWebviewProxyProto)||r.startsWith("https://")||r.startsWith("http://"))&&(e="_blank"):e="_top",window.open(r,e,"noreferrer noopener")}else c===ti.reactNative&&"u">typeof(null==e.g?void 0:e.g.Linking)&&await e.g.Linking.openURL(l)}catch(e){console.error(e)}}async function tk(e,t){let n="";try{if(ts()&&(n=localStorage.getItem(t)))return n;n=await e.getItem(t)}catch(e){console.error(e)}return n}function tS(e,t){if(!e.includes(t))return null;let n=e.split(/([&,?,=])/),r=n.indexOf(t);return n[r+2]}function tI(){return"u">typeof crypto&&null!=crypto&&crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/gu,e=>{let t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})}function tA(){return"u">typeof y.default&&"true"===y.default.env.IS_VITEST}function tT(e){return U.Buffer.from(e,"base64").toString("utf-8")}
1class t_{add(e){if(!this.set.has(e)){if(this.set.size>=this.limit){let e=this.set.values().next().value;e&&this.set.delete(e)}this.set.add(e)}}has(e){return this.set.has(e)}constructor({limit:e}){tr(this,"limit"),tr(this,"set"),this.limit=e,this.set=new Set}}let tj=BigInt(0x100000000-1),tP=BigInt(32);function t$(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t?{h:Number(e&tj),l:Number(e>>tP&tj)}:{h:0|Number(e>>tP&tj),l:0|Number(e&tj)}}function tN(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.length,r=new Uint32Array(n),i=new Uint32Array(n);for(let a=0;a<n;a++){let{h:n,l:o}=t$(e[a],t);[r[a],i[a]]=[n,o]}return[r,i]}let tO=(e,t,n)=>e>>>n,tM=(e,t,n)=>e<<32-n|t>>>n,tR=(e,t,n)=>e>>>n|t<<32-n,tL=(e,t,n)=>e<<32-n|t>>>n,tD=(e,t,n)=>e<<64-n|t>>>n-32,tF=(e,t,n)=>e>>>n-32|t<<64-n;function tU(e,t,n,r){let i=(t>>>0)+(r>>>0);return{h:e+n+(i/0x100000000|0)|0,l:0|i}}let tB=(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0),tz=(e,t,n,r)=>t+n+r+(e/0x100000000|0)|0,tW=(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0),tq=(e,t,n,r,i)=>t+n+r+i+(e/0x100000000|0)|0,tH=(e,t,n,r,i)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(i>>>0),tV=(e,t,n,r,i,a)=>t+n+r+i+a+(e/0x100000000|0)|0,tG="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0;function tK(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name}function tY(e){if(!Number.isSafeInteger(e)||e<0)throw Error("positive integer expected, got "+e)}function tZ(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(!tK(e))throw Error("Uint8Array expected");if(n.length>0&&!n.includes(e.length))throw Error("Uint8Array expected of length "+n+", got length="+e.length)}function tJ(e){if("function"!=typeof e||"function"!=typeof e.create)throw Error("Hash should be wrapped by utils.createHasher");tY(e.outputLen),tY(e.blockLen)}function tQ(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];if(e.destroyed)throw Error("Hash instance has been destroyed");if(t&&e.finished)throw Error("Hash#digest() has already been called")}function tX(e,t){tZ(e);let n=t.outputLen;if(e.length<n)throw Error("digestInto() expects output buffer of length at least "+n)}function t0(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function t1(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];for(let e=0;e<t.length;e++)t[e].fill(0)}function t2(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function t3(e,t){return e<<32-t|e>>>t}let t5=68===new Uint8Array(new Uint32Array([0x11223344]).buffer)[0];function t4(e){return e<<24&0xff000000|e<<8&0xff0000|e>>>8&65280|e>>>24&255}let t6=t5?e=>e:e=>t4(e),t8=t5?e=>e:function(e){for(let t=0;t<e.length;t++)e[t]=t4(e[t]);return e},t9="function"==typeof Uint8Array.from([]).toHex&&"function"==typeof Uint8Array.fromHex,t7=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function ne(e){if(tZ(e),t9)return e.toHex();let t="";for(let n=0;n<e.length;n++)t+=t7[e[n]];return t}let nt={_0:48,_9:57,A:65,F:70,a:97,f:102};function nn(e){return e>=nt._0&&e<=nt._9?e-nt._0:e>=nt.A&&e<=nt.F?e-(nt.A-10):e>=nt.a&&e<=nt.f?e-(nt.a-10):void 0}function nr(e){if("string"!=typeof e)throw Error("hex string expected, got "+typeof e);if(t9)return Uint8Array.fromHex(e);let t=e.length,n=t/2;if(t%2)throw Error("hex string expected, got unpadded hex of length "+t);let r=new Uint8Array(n);for(let t=0,i=0;t<n;t++,i+=2){let n=nn(e.charCodeAt(i)),a=nn(e.charCodeAt(i+1));if(void 0===n||void 0===a)throw Error('hex string expected, got non-hex character "'+(e[i]+e[i+1])+'" at index '+i);r[t]=16*n+a}return r}function ni(e){return"string"==typeof e&&(e=function(e){if("string"!=typeof e)throw Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}(e)),tZ(e),e}function na(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];let r=0;for(let e=0;e<t.length;e++){let n=t[e];tZ(n),r+=n.length}let i=new Uint8Array(r);for(let e=0,n=0;e<t.length;e++){let r=t[e];i.set(r,n),n+=r.length}return i}class no{}function ns(e){let t=t=>e().update(ni(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function nl(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:32;if(tG&&"function"==typeof tG.getRandomValues)return tG.getRandomValues(new Uint8Array(e));if(tG&&"function"==typeof tG.randomBytes)return Uint8Array.from(tG.randomBytes(e));throw Error("crypto.getRandomValues must be defined")}let nc=BigInt(0),nd=BigInt(1),nu=BigInt(2),nh=BigInt(7),np=BigInt(256),nf=BigInt(113),ng=[],nm=[],ny=[];for(let e=0,t=nd,n=1,r=0;e<24;e++){[n,r]=[r,(2*n+3*r)%5],ng.push(2*(5*r+n)),nm.push((e+1)*(e+2)/2%64);let i=nc;for(let e=0;e<7;e++)(t=(t<<nd^(t>>nh)*nf)%np)&nu&&(i^=nd<<(nd<<BigInt(e))-nd);ny.push(i)}let nv=tN(ny,!0),nb=nv[0],nw=nv[1],nx=(e,t,n)=>n>
132?((e,t,n)=>t<<n-32|e>>>64-n)(e,t,n):((e,t,n)=>e<<n|t>>>32-n)(e,t,n),nC=(e,t,n)=>n>32?((e,t,n)=>e<<n-32|t>>>64-n)(e,t,n):((e,t,n)=>t<<n|e>>>32-n)(e,t,n);class nE extends no{clone(){return this._cloneInto()}keccak(){t8(this.state32),function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:24,n=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let t=0;t<10;t++)n[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){let r=(t+8)%10,i=(t+2)%10,a=n[i],o=n[i+1],s=nx(a,o,1)^n[r],l=nC(a,o,1)^n[r+1];for(let n=0;n<50;n+=10)e[t+n]^=s,e[t+n+1]^=l}let t=e[2],i=e[3];for(let n=0;n<24;n++){let r=nm[n],a=nx(t,i,r),o=nC(t,i,r),s=ng[n];t=e[s],i=e[s+1],e[s]=a,e[s+1]=o}for(let t=0;t<50;t+=10){for(let r=0;r<10;r++)n[r]=e[t+r];for(let r=0;r<10;r++)e[t+r]^=~n[(r+2)%10]&n[(r+4)%10]}e[0]^=nb[r],e[1]^=nw[r]}t1(n)}(this.state32,this.rounds),t8(this.state32),this.posOut=0,this.pos=0}update(e){tQ(this),tZ(e=ni(e));let{blockLen:t,state:n}=this,r=e.length;for(let i=0;i<r;){let a=Math.min(t-this.pos,r-i);for(let t=0;t<a;t++)n[this.pos++]^=e[i++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;let{state:e,suffix:t,pos:n,blockLen:r}=this;e[n]^=t,(128&t)!=0&&n===r-1&&this.keccak(),e[r-1]^=128,this.keccak()}writeInto(e){tQ(this,!1),tZ(e),this.finish();let t=this.state,{blockLen:n}=this;for(let r=0,i=e.length;r<i;){this.posOut>=n&&this.keccak();let a=Math.min(n-this.posOut,i-r);e.set(t.subarray(this.posOut,this.posOut+a),r),this.posOut+=a,r+=a}return e}xofInto(e){if(!this.enableXOF)throw Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return tY(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(tX(e,this),this.finished)throw Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,t1(this.state)}_cloneInto(e){let{blockLen:t,suffix:n,outputLen:r,rounds:i,enableXOF:a}=this;return e||(e=new nE(t,n,r,a,i)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=i,e.suffix=n,e.outputLen=r,e.enableXOF=a,e.destroyed=this.destroyed,e}constructor(e,t,n,r=!1,i=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=e,this.suffix=t,this.outputLen=n,this.enableXOF=r,this.rounds=i,tY(n),!(0<e&&e<200))throw Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=t0(this.state)}}let nk=ns(()=>new nE(136,1,32));class nS extends no{update(e){tQ(this),tZ(e=ni(e));let{view:t,buffer:n,blockLen:r}=this,i=e.length;for(let a=0;a<i;){let o=Math.min(r-this.pos,i-a);if(o===r){let t=t2(e);for(;r<=i-a;a+=r)this.process(t,a);continue}n.set(e.subarray(a,a+o),this.pos),this.pos+=o,a+=o,this.pos===r&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){tQ(this),tX(e,this),this.finished=!0;let{buffer:t,view:n,blockLen:r,isLE:i}=this,{pos:a}=this;t[a++]=128,t1(this.buffer.subarray(a)),this.padOffset>r-a&&(this.process(n,0),a=0);for(let e=a;e<r;e++)t[e]=0;(function(e,t,n,r){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,n,r);let i=BigInt(32),a=BigInt(0xffffffff),o=Number(n>>i&a),s=Number(n&a),l=4*!!r,c=4*!r;e.setUint32(t+l,o,r),e.setUint32(t+c,s,r)})(n,r-8,BigInt(8*this.length),i),this.process(n,0);let o=t2(e),s=this.outputLen;if(s%4)throw Error("_sha2: outputLen should be aligned to 32bit");let l=s/4,c=this.get();if(l>c.length)throw Error("_sha2: outputLen bigger than state");for(let e=0;e<l;e++)o.setUint32(4*e,c[e],i)}digest(){let{buffer:e,outputLen:t}=this;this.digestInto(e);let n=e.slice(0,t);return this.destroy(),n}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());let{blockLen:t,buffer:n,length:r,finished:i,destroyed:a,pos:o}=this;return e.destroyed=a,e.finished=i,e.length=r,e.pos=o,r%t&&e.buffer.set(n),e}clone(){return this._cloneInto()}constructor(e,t,n,r){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=r,this.buffer=new Uint8Array(e),this.view=t2(this.buffer)}}
1let nI=Uint32Array.from([0x6a09e667,0xbb67ae85,0x3c6ef372,0xa54ff53a,0x510e527f,0x9b05688c,0x1f83d9ab,0x5be0cd19]),nA=Uint32Array.from([0xcbbb9d5d,0xc1059ed8,0x629a292a,0x367cd507,0x9159015a,0x3070dd17,0x152fecd8,0xf70e5939,0x67332667,0xffc00b31,0x8eb44a87,0x68581511,0xdb0c2e0d,0x64f98fa7,0x47b5481d,0xbefa4fa4]),nT=Uint32Array.from([0x6a09e667,0xf3bcc908,0xbb67ae85,0x84caa73b,0x3c6ef372,0xfe94f82b,0xa54ff53a,0x5f1d36f1,0x510e527f,0xade682d1,0x9b05688c,0x2b3e6c1f,0x1f83d9ab,0xfb41bd6b,0x5be0cd19,0x137e2179]),n_=Uint32Array.from([0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5,0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5,0xd807aa98,0x12835b01,0x243185be,0x550c7dc3,0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174,0xe49b69c1,0xefbe4786,0xfc19dc6,0x240ca1cc,0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da,0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7,0xc6e00bf3,0xd5a79147,0x6ca6351,0x14292967,0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13,0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85,0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3,0xd192e819,0xd6990624,0xf40e3585,0x106aa070,0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5,0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3,0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208,0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2]),nj=new Uint32Array(64);class nP extends nS{get(){let{A:e,B:t,C:n,D:r,E:i,F:a,G:o,H:s}=this;return[e,t,n,r,i,a,o,s]}set(e,t,n,r,i,a,o,s){this.A=0|e,this.B=0|t,this.C=0|n,this.D=0|r,this.E=0|i,this.F=0|a,this.G=0|o,this.H=0|s}process(e,t){for(let n=0;n<16;n++,t+=4)nj[n]=e.getUint32(t,!1);for(let e=16;e<64;e++){let t=nj[e-15],n=nj[e-2],r=t3(t,7)^t3(t,18)^t>>>3,i=t3(n,17)^t3(n,19)^n>>>10;nj[e]=i+nj[e-7]+r+nj[e-16]|0}let{A:n,B:r,C:i,D:a,E:o,F:s,G:l,H:c}=this;for(let e=0;e<64;e++){var d,u,h,p;let t=c+(t3(o,6)^t3(o,11)^t3(o,25))+((d=o)&s^~d&l)+n_[e]+nj[e]|0,f=(t3(n,2)^t3(n,13)^t3(n,22))+((u=n)&(h=r)^u&(p=i)^h&p)|0;c=l,l=s,s=o,o=a+t|0,a=i,i=r,r=n,n=t+f|0}n=n+this.A|0,r=r+this.B|0,i=i+this.C|0,a=a+this.D|0,o=o+this.E|0,s=s+this.F|0,l=l+this.G|0,c=c+this.H|0,this.set(n,r,i,a,o,s,l,c)}roundClean(){t1(nj)}destroy(){this.set(0,0,0,0,0,0,0,0),t1(this.buffer)}constructor(e=32){super(64,e,8,!1),this.A=0|nI[0],this.B=0|nI[1],this.C=0|nI[2],this.D=0|nI[3],this.E=0|nI[4],this.F=0|nI[5],this.G=0|nI[6],this.H=0|nI[7]}}let n$=tN(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e3585
15771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(e=>BigInt(e))),nN=n$[0],nO=n$[1],nM=new Uint32Array(80),nR=new Uint32Array(80);class nL extends nS{get(){let{Ah:e,Al:t,Bh:n,Bl:r,Ch:i,Cl:a,Dh:o,Dl:s,Eh:l,El:c,Fh:d,Fl:u,Gh:h,Gl:p,Hh:f,Hl:g}=this;return[e,t,n,r,i,a,o,s,l,c,d,u,h,p,f,g]}set(e,t,n,r,i,a,o,s,l,c,d,u,h,p,f,g){this.Ah=0|e,this.Al=0|t,this.Bh=0|n,this.Bl=0|r,this.Ch=0|i,this.Cl=0|a,this.Dh=0|o,this.Dl=0|s,this.Eh=0|l,this.El=0|c,this.Fh=0|d,this.Fl=0|u,this.Gh=0|h,this.Gl=0|p,this.Hh=0|f,this.Hl=0|g}process(e,t){for(let n=0;n<16;n++,t+=4)nM[n]=e.getUint32(t),nR[n]=e.getUint32(t+=4);for(let e=16;e<80;e++){let t=0|nM[e-15],n=0|nR[e-15],r=tR(t,n,1)^tR(t,n,8)^tO(t,n,7),i=tL(t,n,1)^tL(t,n,8)^tM(t,n,7),a=0|nM[e-2],o=0|nR[e-2],s=tR(a,o,19)^tD(a,o,61)^tO(a,o,6),l=tW(i,tL(a,o,19)^tF(a,o,61)^tM(a,o,6),nR[e-7],nR[e-16]),c=tq(l,r,s,nM[e-7],nM[e-16]);nM[e]=0|c,nR[e]=0|l}let{Ah:n,Al:r,Bh:i,Bl:a,Ch:o,Cl:s,Dh:l,Dl:c,Eh:d,El:u,Fh:h,Fl:p,Gh:f,Gl:g,Hh:m,Hl:y}=this;for(let e=0;e<80;e++){let t=tR(d,u,14)^tR(d,u,18)^tD(d,u,41),b=tL(d,u,14)^tL(d,u,18)^tF(d,u,41),w=d&h^~d&f,x=tH(y,b,u&p^~u&g,nO[e],nR[e]),C=tV(x,m,t,w,nN[e],nM[e]),E=0|x,k=tR(n,r,28)^tD(n,r,34)^tD(n,r,39),S=tL(n,r,28)^tF(n,r,34)^tF(n,r,39),I=n&i^n&o^i&o,A=r&a^r&s^a&s;m=0|f,y=0|g,f=0|h,g=0|p,h=0|d,p=0|u,({h:d,l:u}=tU(0|l,0|c,0|C,0|E)),l=0|o,c=0|s,o=0|i,s=0|a,i=0|n,a=0|r;let T=tB(E,S,A);n=tz(T,C,k,I),r=0|T}({h:n,l:r}=tU(0|this.Ah,0|this.Al,0|n,0|r)),({h:i,l:a}=tU(0|this.Bh,0|this.Bl,0|i,0|a)),({h:o,l:s}=tU(0|this.Ch,0|this.Cl,0|o,0|s)),({h:l,l:c}=tU(0|this.Dh,0|this.Dl,0|l,0|c)),({h:d,l:u}=tU(0|this.Eh,0|this.El,0|d,0|u)),({h:h,l:p}=tU(0|this.Fh,0|this.Fl,0|h,0|p)),({h:f,l:g}=tU(0|this.Gh,0|this.Gl,0|f,0|g)),({h:m,l:y}=tU(0|this.Hh,0|this.Hl,0|m,0|y)),this.set(n,r,i,a,o,s,l,c,d,u,h,p,f,g,m,y)}roundClean(){t1(nM,nR)}destroy(){t1(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}constructor(e=64){super(128,e,16,!1),this.Ah=0|nT[0],this.Al=0|nT[1],this.Bh=0|nT[2],this.Bl=0|nT[3],this.Ch=0|nT[4],this.Cl=0|nT[5],this.Dh=0|nT[6],this.Dl=0|nT[7],this.Eh=0|nT[8],this.El=0|nT[9],this.Fh=0|nT[10],this.Fl=0|nT[11],this.Gh=0|nT[12],this.Gl=0|nT[13],this.Hh=0|nT[14],this.Hl=0|nT[15]}}class nD extends nL{constructor(){super(48),this.Ah=0|nA[0],this.Al=0|nA[1],this.Bh=0|nA[2],this.Bl=0|nA[3],this.Ch=0|nA[4],this.Cl=0|nA[5],this.Dh=0|nA[6],this.Dl=0|nA[7],this.Eh=0|nA[8],this.El=0|nA[9],this.Fh=0|nA[10],this.Fl=0|nA[11],this.Gh=0|nA[12],this.Gl=0|nA[13],this.Hh=0|nA[14],this.Hl=0|nA[15]}}let nF=Uint32Array.from([0x22312194,0xfc2bf72c,0x9f555fa3,0xc84c64c2,0x2393b86b,0x6f53b151,0x96387719,0x5940eabd,0x96283ee2,0xa88effe3,0xbe5e1e25,0x53863992,0x2b0199fc,0x2c85b8aa,0xeb72ddc,0x81c52ca2]);class nU extends nL{constructor(){super(32),this.Ah=0|nF[0],this.Al=0|nF[1],this.Bh=0|nF[2],this.Bl=0|nF[3],this.Ch=0|nF[4],this.Cl=0|nF[5],this.Dh=0|nF[6],this.Dl=0|nF[7],this.Eh=0|nF[8],this.El=0|nF[9],this.Fh=0|nF[10],this.Fl=0|nF[11],this.Gh=0|nF[12],this.Gl=0|nF[13],this.Hh=0|nF[14],this.Hl=0|nF[15]}}let nB=ns(()=>new nP),nz=ns(()=>new nL),nW=ns(()=>new nD),nq=ns(()=>new nU),nH=Uint8Array.from([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9]),nV=Uint32Array.from([0xf3bcc908,0x6a09e66
17,0x84caa73b,0xbb67ae85,0xfe94f82b,0x3c6ef372,0x5f1d36f1,0xa54ff53a,0xade682d1,0x510e527f,0x2b3e6c1f,0x9b05688c,0xfb41bd6b,0x1f83d9ab,0x137e2179,0x5be0cd19]),nG=new Uint32Array(32);function nK(e,t,n,r,i,a){let o=i[a],s=i[a+1],l=nG[2*e],c=nG[2*e+1],d=nG[2*t],u=nG[2*t+1],h=nG[2*n],p=nG[2*n+1],f=nG[2*r],g=nG[2*r+1],m=tB(l,d,o);c=tz(m,c,u,s),l=0|m,({Dh:g,Dl:f}={Dh:g^c,Dl:f^l}),({Dh:g,Dl:f}={Dh:f,Dl:g}),({h:p,l:h}=tU(p,h,g,f)),({Bh:u,Bl:d}={Bh:u^p,Bl:d^h}),({Bh:u,Bl:d}={Bh:tR(u,d,24),Bl:tL(u,d,24)}),nG[2*e]=l,nG[2*e+1]=c,nG[2*t]=d,nG[2*t+1]=u,nG[2*n]=h,nG[2*n+1]=p,nG[2*r]=f,nG[2*r+1]=g}function nY(e,t,n,r,i,a){let o=i[a],s=i[a+1],l=nG[2*e],c=nG[2*e+1],d=nG[2*t],u=nG[2*t+1],h=nG[2*n],p=nG[2*n+1],f=nG[2*r],g=nG[2*r+1],m=tB(l,d,o);c=tz(m,c,u,s),l=0|m,({Dh:g,Dl:f}={Dh:g^c,Dl:f^l}),({Dh:g,Dl:f}={Dh:tR(g,f,16),Dl:tL(g,f,16)}),({h:p,l:h}=tU(p,h,g,f)),({Bh:u,Bl:d}={Bh:u^p,Bl:d^h}),({Bh:u,Bl:d}={Bh:tD(u,d,63),Bl:tF(u,d,63)}),nG[2*e]=l,nG[2*e+1]=c,nG[2*t]=d,nG[2*t+1]=u,nG[2*n]=h,nG[2*n+1]=p,nG[2*r]=f,nG[2*r+1]=g}class nZ extends no{update(e){tQ(this),tZ(e=ni(e));let{blockLen:t,buffer:n,buffer32:r}=this,i=e.length,a=e.byteOffset,o=e.buffer;for(let s=0;s<i;){this.pos===t&&(t8(r),this.compress(r,0,!1),t8(r),this.pos=0);let l=Math.min(t-this.pos,i-s),c=a+s;if(l===t&&!(c%4)&&s+l<i){let e=new Uint32Array(o,c,Math.floor((i-s)/4));t8(e);for(let n=0;s+t<i;n+=r.length,s+=t)this.length+=t,this.compress(e,n,!1);t8(e);continue}n.set(e.subarray(s,s+l),this.pos),this.pos+=l,this.length+=l,s+=l}return this}digestInto(e){tQ(this),tX(e,this);let{pos:t,buffer32:n}=this;this.finished=!0,t1(this.buffer.subarray(t)),t8(n),this.compress(n,0,!0),t8(n);let r=t0(e);this.get().forEach((e,t)=>r[t]=t6(e))}digest(){let{buffer:e,outputLen:t}=this;this.digestInto(e);let n=e.slice(0,t);return this.destroy(),n}_cloneInto(e){let{buffer:t,length:n,finished:r,destroyed:i,outputLen:a,pos:o}=this;return e||(e=new this.constructor({dkLen:a})),e.set(...this.get()),e.buffer.set(t),e.destroyed=i,e.finished=r,e.length=n,e.pos=o,e.outputLen=a,e}clone(){return this._cloneInto()}constructor(e,t){super(),this.finished=!1,this.destroyed=!1,this.length=0,this.pos=0,tY(e),tY(t),this.blockLen=e,this.outputLen=t,this.buffer=new Uint8Array(e),this.buffer32=t0(this.buffer)}}class nJ extends nZ{get(){let{v0l:e,v0h:t,v1l:n,v1h:r,v2l:i,v2h:a,v3l:o,v3h:s,v4l:l,v4h:c,v5l:d,v5h:u,v6l:h,v6h:p,v7l:f,v7h:g}=this;return[e,t,n,r,i,a,o,s,l,c,d,u,h,p,f,g]}set(e,t,n,r,i,a,o,s,l,c,d,u,h,p,f,g){this.v0l=0|e,this.v0h=0|t,this.v1l=0|n,this.v1h=0|r,this.v2l=0|i,this.v2h=0|a,this.v3l=0|o,this.v3h=0|s,this.v4l=0|l,this.v4h=0|c,this.v5l=0|d,this.v5h=0|u,this.v6l=0|h,this.v6h=0|p,this.v7l=0|f,this.v7h=0|g}compress(e,t,n){this.get().forEach((e,t)=>nG[t]=e),nG.set(nV,16);let{h:r,l:i}=t$(BigInt(this.length));nG[24]=nV[8]^i,nG[25]=nV[9]^r,n&&(nG[28]=~nG[28],nG[29]=~nG[29]);let a=0;for(let n=0;n<12;n++)nK(0,4,8,12,e,t+2*nH[a++]),nY(0,4,8,12,e,t+2*nH[a++]),nK(1,5,9,13,e,t+2*nH[a++]),nY(1,5,9,13,e,t+2*nH[a++]),nK(2,6,10,14,e,t+2*nH[a++]),nY(2,6,10,14,e,t+2*nH[a++]),nK(3,7,11,15,e,t+2*nH[a++]),nY(3,7,11,15,e,t+2*nH[a++]),nK(0,5,10,15,e,t+2*nH[a++]),nY(0,5,10,15,e,t+2*nH[a++]),nK(1,6,11,12,e,t+2*nH[a++]),nY(1,6,11,12,e,t+2*nH[a++]),nK(2,7,8,13,e,t+2*nH[a++]),nY(2,7,8,13,e,t+2*nH[a++]),nK(3,4,9,14,e,t+2*nH[a++]),nY(3,4,9,14,e,t+2*nH[a++]);this.v0l^=nG[0]^nG[16],this.v0h^=nG[1]^nG[17],this.v1l^=nG[2]^nG[18],this.v1h^=nG[3]^nG[19],this.v2l^=nG[4]^nG[20],this.v2h^=nG[5]^nG[21],this.v3l^=nG[6]^nG[22],this.v3h^=nG[7]^nG[23],this.v4l^=nG[8]^nG[24],this.v4h^=nG[9]^nG[25],this.v5l^=nG[10]^nG[26],this.v5h^=nG[11]^nG[27],this.v6l^=nG[12]^nG[28],this.v6h^=nG[13]^nG[29],this.v7l^=nG[14]^nG[30],this.v7h^=nG[15]^nG[31],t1(nG)}destroy(){this.destroyed=!0,t1(this.buffer32),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}constructor(e={}){let t=void 0===e.dkLen?64:e.dkLen;super(128,t),this.v0l=0|nV[0],this.v0h=0|nV[1],this.v1l=0|nV[2],this.v1h=0|nV[3],this.v2l=0|nV[4],this.v2h=0|nV[5],this.v3l=0|nV[6],this.v3h=0|nV[7],this.v4l=0|nV[8],this.v4h=0|nV[9],this.v5l=0|nV[10],this.v5h=0|nV[11],this.v6l=0|nV[12],this.v6h=0|nV[13],this.v7l=0|nV[14],this.v7h=0|nV[15],function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0;if(tY(n),e<0||e>n)throw Error("outputLen bigger than keyLen");let{key:a,salt:o,personalization:s}=t;if(void 0!==a&&(a.length<1||a.length>n))throw Error("key length must be undefined or 1.."+n);if(void 0!==o&&o.length!==r)throw Error("salt must be undefined or "+r);if(void 0!==s&&s.length!==i)throw Error("personalization must be undefined or "+i)}(t,e,64,16,16);let{key:n,personalization:r,salt:i}=e,a=0;if(void 0!==n&&(a=(n=ni(n)).length),this.v0l^=this.outputLen|a<<8|0x1010000,void 0!==i){let e=t0(i=ni(i));this.v4l^=t6(e[0]),this.v4h^=t6(e[1]),this.v5l^=t6(e[2]),this.v5h^=t6(e[3])}if(void 0!==r){let e=t0(r=ni(r));this.v6l^=t6(e[0]),this.v6h^=t6(e[1]),this.v7l^=t6(e[2]),this.v7h^=t6(e[3])}if(void 0!==n){let e=new Uint8Array(this.blockLen);e.set(n),this.update(e)}}}let nQ=function(e){let t=(t,n)=>e(n).update(ni(t)).digest(),n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=t=>e(t),t}(e=>
1new nJ(e));function nX(e){let t="\x19Ethereum Signed Message:\n".concat(e.length),n=new TextEncoder().encode(t+e);return"0x"+U.Buffer.from(nk(n)).toString("hex")}async function n0(e,t,n,r,i,a){switch(n.t){case"eip191":return await n1(e,t,n.s);case"eip1271":return await n2(e,t,n.s,r,i,a);default:throw Error("verifySignature failed: Attempted to verify CacaoSignature with unknown type: ".concat(n.t))}}async function n1(e,t,n){return(await ev({hash:nX(t),signature:n})).toLowerCase()===e.toLowerCase()}async function n2(e,t,n,r,i,a){let o=e2(r);if(!o.namespace||!o.reference)throw Error("isValidEip1271Signature failed: chainId must be in CAIP-2 format, received: ".concat(r));try{let o="0x1626ba7e",s=n.substring(2),l=(s.length/2).toString(16).padStart(64,"0"),c=(t.startsWith("0x")?t:nX(t)).substring(2),d=o+c+"0000000000000000000000000000000000000000000000000000000000000040"+l+s,u=await fetch("".concat(a||"https://rpc.walletconnect.org/v1","/?chainId=").concat(r,"&projectId=").concat(i),{headers:{"Content-Type":"application/json"},method:"POST",body:JSON.stringify({id:Date.now()+Math.floor(1e3*Math.random()),jsonrpc:"2.0",method:"eth_call",params:[{to:e,data:d},"latest"]})}),{result:h}=await u.json();return!!h&&h.slice(0,o.length).toLowerCase()===o.toLowerCase()}catch(e){return console.error("isValidEip1271Signature: ",e),!1}}function n3(e){let t=new Uint8Array(nB(function(e){if(e instanceof Uint8Array)return e;if(Array.isArray(e))return new Uint8Array(e);if("object"==typeof e&&null!=e&&e.data)return new Uint8Array(Object.values(e.data));if("object"==typeof e&&e)return new Uint8Array(Object.values(e));throw Error("getNearUint8ArrayFromBytes: Unexpected result type from bytes array")}(e)));return eb.default.encode(t)}function n5(e){var t;let n=(t=U.Buffer.from(e,"base64"),new eU(void 0).decode(t)).txn;if(!n)throw Error("Invalid signed transaction: missing 'txn' field");let r=new eB(void 0).encodeSharedRef(n),i=U.Buffer.from("TX"),a=nq(U.Buffer.concat([i,U.Buffer.from(r)]));return ez.base32.encode(a).replace(/=+$/,"")}function n4(e){let t=[],n=BigInt(e);for(;n>=BigInt(128);)t.push(Number(n&BigInt(127)|BigInt(128))),n>>=BigInt(7);return t.push(Number(n)),U.Buffer.from(t)}var n6=Object.defineProperty,n8=Object.defineProperties,n9=Object.getOwnPropertyDescriptors,n7=Object.getOwnPropertySymbols,re=Object.prototype.hasOwnProperty,rt=Object.prototype.propertyIsEnumerable,rn=(e,t,n)=>t in e?n6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;let rr=e=>null==e?void 0:e.split(":"),ri=e=>{let t=e&&rr(e);if(t)return t[2]+":"+t[3]},ra=e=>{let t=e&&rr(e);if(t)return t.pop()};async function ro(e){let{cacao:t,projectId:n}=e,{s:r,p:i}=t,a=rs(i,i.iss),o=ra(i.iss);return await n0(o,a,r,ri(i.iss),n)}let rs=(e,t)=>{let n="".concat(e.domain," wants you to sign in with your Ethereum account:"),r=ra(t);if(!e.aud&&!e.uri)throw Error("Either `aud` or `uri` is required to construct the message");let i=e.statement||void 0,a="URI: ".concat(e.aud||e.uri),o="Version: ".concat(e.version),s="Chain ID: ".concat((e=>{let t=e&&rr(e);if(t)return e.includes("did:pkh:")?t[3]:t[1]})(t)),l="Nonce: ".concat(e.nonce),c="Issued At: ".concat(e.iat),d=e.exp?"Expiration Time: ".concat(e.exp):void 0,u=e.nbf?"Not Before: ".concat(e.nbf):void 0,h=e.requestId?"Request ID: ".concat(e.requestId):void 0,p=e.resources?"Resources:".concat(e.resources.map(e=>"\n- ".concat(e)).join("")):void 0,f=rp(e.resources);return f&&(i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;rl(t);let n="I further authorize the stated URI to perform the following actions on my behalf: ";if(e.includes(n))return e;let r=[],i=0;Object.keys(t.att).forEach(e=>{let n=Object.keys(t.att[e]).map(e=>({ability:e.split("/")[0],action:e.split("/")[1]}));n.sort((e,t)=>e.action.localeCompare(t.action));let a={};n.forEach(e=>{a[e.ability]||(a[e.ability]=[]),a[e.ability].push(e.action)});let o=Object.keys(a).map(t=>(i++,"(".concat(i,") '").concat(t,"': '").concat(a[t].join("', '"),"' for '").concat(e,"'.")));r.push(o.join(", ").replace(".,","."))});let a=r.join(" "),o="".concat(n).concat(a);return"".concat(e?e+" ":"").concat(o)}(i,rd(f))),[n,r,"",i,"",a,o,s,l,c,d,u,h,p].filter(e=>null!=e).join("\n")};function rl(e){if(!e)throw Error("No recap provided, value is undefined");if(!e.att)throw Error("No `att` property found");let t=Object.keys(e.att);if(!(null!=t&&t.length))throw Error("No resources found in `att` property");t.forEach(t=>{let n=e.att[t];if(Array.isArray(n)||"object"!=typeof n)throw Error("Resource must be an object: ".concat(t));if(!Object.keys(n).length)throw Error("Resource object is empty: ".concat(t));
1Object.keys(n).forEach(e=>{let t=n[e];if(!Array.isArray(t))throw Error("Ability limits ".concat(e," must be an array of objects, found: ").concat(t));if(!t.length)throw Error("Value of ".concat(e," is empty array, must be an array with objects"));t.forEach(t=>{if("object"!=typeof t)throw Error("Ability limits (".concat(e,") must be an array of objects, found: ").concat(t))})})})}function rc(e){return rl(e),"urn:recap:".concat(U.Buffer.from(JSON.stringify(e)).toString("base64").replace(/=/g,""))}function rd(e){var t;let n=(t=e.replace("urn:recap:",""),JSON.parse(U.Buffer.from(t,"base64").toString("utf-8")));return rl(n),n}function ru(e){var t;let n=rd(e);rl(n);let r=null==(t=n.att)?void 0:t.eip155;return r?Object.keys(r).map(e=>e.split("/")[1]):[]}function rh(e){let t=rd(e);rl(t);let n=[];return Object.values(t.att).forEach(e=>{Object.values(e).forEach(e=>{var t;null!=(t=null==e?void 0:e[0])&&t.chains&&n.push(e[0].chains)})}),[...new Set(n.flat())]}function rp(e){if(!e)return;let t=null==e?void 0:e[e.length-1];return t&&t.includes("urn:recap:")?t:void 0}function rf(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name}function rg(e){if("boolean"!=typeof e)throw Error("boolean expected, not ".concat(e))}function rm(e){if(!Number.isSafeInteger(e)||e<0)throw Error("positive integer expected, got "+e)}function ry(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(!rf(e))throw Error("Uint8Array expected");if(n.length>0&&!n.includes(e.length))throw Error("Uint8Array expected of length "+n+", got length="+e.length)}function rv(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];if(e.destroyed)throw Error("Hash instance has been destroyed");if(t&&e.finished)throw Error("Hash#digest() has already been called")}function rb(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function rw(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];for(let e=0;e<t.length;e++)t[e].fill(0)}let rx=68===new Uint8Array(new Uint32Array([0x11223344]).buffer)[0];function rC(e){if("string"==typeof e)e=function(e){if("string"!=typeof e)throw Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}(e);else if(rf(e))e=rS(e);else throw Error("Uint8Array expected, got "+typeof e);return e}function rE(e,t){let n=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(void 0===t)return new Uint8Array(e);if(t.length!==e)throw Error("invalid output length, expected "+e+", got: "+t.length);if(n&&t.byteOffset%4!=0)throw Error("invalid output, must be aligned");return t}function rk(e,t,n,r){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,n,r);let i=BigInt(32),a=BigInt(0xffffffff),o=Number(n>>i&a),s=Number(n&a),l=4*!!r,c=4*!r;e.setUint32(t+l,o,r),e.setUint32(t+c,s,r)}function rS(e){return Uint8Array.from(e)}let rI=e=>Uint8Array.from(e.split("").map(e=>e.charCodeAt(0))),rA=rI("expand 16-byte k"),rT=rI("expand 32-byte k"),r_=rb(rA),rj=rb(rT);function rP(e,t){return e<<t|e>>>32-t}function r$(e){return e.byteOffset%4==0}let rN=0x100000000-1,rO=new Uint32Array,rM=(e,t)=>255&e[t++]|(255&e[t++])<<8;class rR{process(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],{h:r,r:i}=this,a=i[0],o=i[1],s=i[2],l=i[3],c=i[4],d=i[5],u=i[6],h=i[7],p=i[8],f=i[9],g=rM(e,t+0),m=rM(e,t+2),y=rM(e,t+4),b=rM(e,t+6),w=rM(e,t+8),x=rM(e,t+10),C=rM(e,t+12),E=rM(e,t+14),k=r[0]+(8191&g),S=r[1]+((g>>>13|m<<3)&8191),I=r[2]+((m>>>10|y<<6)&8191),A=r[3]+((y>>>7|b<<9)&8191),T=r[4]+((b>>>4|w<<12)&8191),_=r[5]+(w>>>1&8191),j=r[6]+((w>>>14|x<<2)&8191),P=r[7]+((x>>>11|C<<5)&8191),$=r[8]+((C>>>8|E<<8)&8191),N=r[9]+(E>>>5|2048*!n),O=0,M=0+k*a+5*f*S+5*p*I+5*h*A+5*u*T;O=M>>>13,M&=8191,M+=5*d*_+5*c*j+5*l*P+5*s*$+5*o*N,O+=M>>>13,M&=8191;let R=O+k*o+S*a+5*f*I+5*p*A+5*h*T;O=R>>>13,R&=8191,R+=5*u*_+5*d*j+5*c*P+5*l*$+5*s*N,O+=R>>>13,R&=8191;let L=O+k*s+S*o+I*a+5*f*A+5*p*T;O=L>>>13,L&=8191,L+=5*h*_+5*u*j+5*d*P+5*c*$+5*l*N,O+=L>>>13,L&=8191;let D=O+k*l+S*s+I*o+A*a+5*f*T;O=D>>>13,D&=8191,D+=5*p*_+5*h*j+5*u*P+5*d*$+5*c*N,O+=D>>>13,D&=8191;let F=O+k*c+S*l+I*s+A*o+T*a;O=F>>>13,F&=8191,F+=5*f*_+5*p*j+5*h*P+5*u*$+5*d*N,O+=F>>>13,F&=8191;let U=O+k*d+S*c+I*l+A*s+T*o;O=U>>>13,U&=8191,U+=_*a+5*f*j+5*p*P+5*h*$+5*u*N,O+=U>>>13,U&=8191;let B=O+k*u+S*d+I*c+A*l+T*s;O=B>>>13,B&=8191,B+=_*o+j*a+5*f*P+5*p*$+5*h*N,O+=B>>>13,B&=8191;let z=O+k*h+S*u+I*d+A*c+T*l;O=z>>>13,z&=8191,z+=_*s+j*o+P*a+5*f*$+5*p*N,O+=z>>>13,z&=8191;let W=O+k*p+S*h+I*u+A*d+T*c;O=W>>>13,W&=8191,W+=_*l+j*s+P*o+$*a+5*f*N,O+=W>>>13,W&=8191;let q=O+k*f+S*p+I*h+A*u+T*d;O=q>>>13,q&=8191,q+=_*c+j*l+P*s+$*o+N*a,O+=q>>>13,q&=8191,M=8191&(O=(O=(O<<2)+O|0)+M|0),O>>>=13,R+=O,r[0]=M,r[1]=R,r[2]=L,r[3]=D,r[4]=F,r[5]=U,r[6]=B,r[7]=z,r[8]=W,r[9]=q}finalize(){let{h:e,pad:t}=this,n=new Uint16Array(10),r=e[1]>>>13;e[1]&=8191;for(let t=2;t<10;t++)e[t]+=r,r=e[t]>>>13,e[t]&=8191;e[0]+=5*r,r=e[0]>>>13,e[0]&=8191,e[1]+=r,r=e[1]>>>13,e[1]&=8191,e[2]+=r,n[0]=e[0]+5,r=n[0]>>>13,n[0]&=8191;for(let t=1;t<10;t++)n[t]=e[t]+r,r=n[t]>>>13,n[t]&=8191;n[9]-=8192;let i=(1^r)-1;for(let e=0;e<10;e++)n[e]&=i;i=~i;for(let t=0;t<10;t++)e[t]=e[t]&i|n[t];e[0]=(e[0]|e[1]<<13)&65535,e[1]=(e[1]>>>3|e[2]<<10)&65535,e[2]=(e[2]>>>6|e[3]<<7)&65535,e[3]=(e[3]>>>9|e[4]<<4)&65535,e[4]=(e[4]>>>12|e[5]<<1|e[6]<<14)&65535,e[5]=(e[6]>>>2|e[7]<<11)&65535,e[6]=(e[7]>>>5|e[8]<<8)&65535,e[7]=(e[8]>>>8|e[9]<<5)&65535;let a=e[0]+t[0];e[0]=65535&a;for(let n=1;n<8;n++)a=(e[n]+t[n]|0)+(a>>>16)|0,e[n]=65535&a;rw(n)}update(e){rv(this),ry(e=rC(e));let{buffer:t,blockLen:n}=this,r=e.length;for(let i=0;i<r;){let a=Math.min(n-this.pos,r-i);if(a===n){for(;n<=r-i;i+=n)this.process(e,i);continue}t.set(e.subarray(i,i+a),this.pos),this.pos+=a,i+=a,this.pos===n&&(this.process(t,0,!1),this.pos=0)}return this}destroy(){rw(this.h,this.r,this.buffer,this.pad)}digestInto(e){rv(this),function(e,t){ry(e);let n=t.outputLen;if(e.length<n)throw Error("digestInto() expects output buffer of length at least "+n)}(e,this),this.finished=!0;let{buffer:t,h:n}=this,{pos:r}=this;if(r){for(t[r++]=1;r<16;r++)t[r]=0;this.process(t,0,!0)}this.finalize();let i=0;for(let t=0;t<8;t++)e[i++]=n[t]>>>0,e[i++]=n[t]>>>8;return e}digest(){let{buffer:e,outputLen:t}=this;this.digestInto(e);let n=e.slice(0,t);return this.destroy(),n}constructor(e){this.blockLen=16,this.outputLen=16,this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.pos=0,this.finished=!1,ry(e=rC(e),32);let t=rM(e,0),n=rM(e,2),r=rM(e,4),i=rM(e,6),a=rM(e,8),o=rM(e,10),s=rM(e,12),l=rM(e,14);this.r[0]=8191&t,this.r[1]=(t>>>13|n<<3)&8191,this.r[2]=(n>>>10|r<<6)&7939,this.r[3]=(r>>>7|i<<9)&8191,this.r[4]=(i>>>4|a<<12)&255,this.r[5]=a>>>1&8190,this.r[6]=(a>>>14|o<<2)&8191,this.r[7]=(o>>>11|s<<5)&8065,this.r[8]=(s>>>8|l<<8)&8191,this.r[9]=l>>>5&127;for(let t=0;t<8;t++)this.pad[t]=rM(e,16+2*t)}}let rL=function(e){let t=(t,n)=>e(n).update(rC(t)).digest(),n=e(new Uint8Array(32));return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=t=>e(t),t}(e=>
1new rR(e)),rD=function(e,t){let{allowShortKeys:n,extendNonceFn:r,counterLength:i,counterRight:a,rounds:o}=function(e,t){if(null==t||"object"!=typeof t)throw Error("options must be defined");return Object.assign(e,t)}({allowShortKeys:!1,counterLength:8,counterRight:!1,rounds:20},t);if("function"!=typeof e)throw Error("core must be a function");return rm(i),rm(o),rg(a),rg(n),function(t,s,l,c){let d=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;ry(t),ry(s),ry(l);let u=l.length;if(void 0===c&&(c=new Uint8Array(u)),ry(c),rm(d),d<0||d>=rN)throw Error("arx: counter overflow");if(c.length<u)throw Error("arx: output (".concat(c.length,") is shorter than data (").concat(u,")"));let h=[],p=t.length,f,g;if(32===p)h.push(f=rS(t)),g=rj;else if(16===p&&n)(f=new Uint8Array(32)).set(t),f.set(t,16),g=r_,h.push(f);else throw Error("arx: invalid 32-byte key, got length=".concat(p));r$(s)||h.push(s=rS(s));let m=rb(f);if(r){if(24!==s.length)throw Error("arx: extended nonce must be 24 bytes");r(g,m,rb(s.subarray(0,16)),m),s=s.subarray(16)}let y=16-i;if(y!==s.length)throw Error("arx: nonce must be ".concat(y," or 16 bytes"));if(12!==y){let e=new Uint8Array(12);e.set(s,a?0:12-s.length),s=e,h.push(s)}return function(e,t,n,r,i,a,o,s){let l=i.length,c=new Uint8Array(64),d=rb(c),u=r$(i)&&r$(a),h=u?rb(i):rO,p=u?rb(a):rO;for(let f=0;f<l;o++){if(e(t,n,r,d,o,s),o>=rN)throw Error("arx: counter overflow");let g=Math.min(64,l-f);if(u&&64===g){let e=f/4;if(f%4!=0)throw Error("arx: invalid block position");for(let t=0,n;t<16;t++)p[n=e+t]=h[n]^d[t];f+=64;continue}for(let e=0,t;e<g;e++)a[t=f+e]=i[t]^c[e];f+=g}}(e,g,m,rb(s),l,c,d,o),rw(...h),c}}(function(e,t,n,r,i){let a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:20,o=e[0],s=e[1],l=e[2],c=e[3],d=t[0],u=t[1],h=t[2],p=t[3],f=t[4],g=t[5],m=t[6],y=t[7],b=n[0],w=n[1],x=n[2],C=o,E=s,k=l,S=c,I=d,A=u,T=h,_=p,j=f,P=g,$=m,N=y,O=i,M=b,R=w,L=x;for(let e=0;e<a;e+=2)j=j+(O=rP(O^(C=C+I|0),16))|0,C=C+(I=rP(I^j,12))|0,j=j+(O=rP(O^C,8))|0,I=rP(I^j,7),P=P+(M=rP(M^(E=E+A|0),16))|0,E=E+(A=rP(A^P,12))|0,P=P+(M=rP(M^E,8))|0,A=rP(A^P,7),$=$+(R=rP(R^(k=k+T|0),16))|0,k=k+(T=rP(T^$,12))|0,$=$+(R=rP(R^k,8))|0,T=rP(T^$,7),N=N+(L=rP(L^(S=S+_|0),16))|0,S=S+(_=rP(_^N,12))|0,N=N+(L=rP(L^S,8))|0,_=rP(_^N,7),$=$+(L=rP(L^(C=C+A|0),16))|0,C=C+(A=rP(A^$,12))|0,$=$+(L=rP(L^C,8))|0,A=rP(A^$,7),N=N+(O=rP(O^(E=E+T|0),16))|0,E=E+(T=rP(T^N,12))|0,N=N+(O=rP(O^E,8))|0,T=rP(T^N,7),j=j+(M=rP(M^(k=k+_|0),16))|0,k=k+(_=rP(_^j,12))|0,j=j+(M=rP(M^k,8))|0,_=rP(_^j,7),P=P+(R=rP(R^(S=S+I|0),16))|0,S=S+(I=rP(I^P,12))|0,P=P+(R=rP(R^S,8))|0,I=rP(I^P,7);let D=0;r[D++]=o+C|0,r[D++]=s+E|0,r[D++]=l+k|0,r[D++]=c+S|0,r[D++]=d+I|0,r[D++]=u+A|0,r[D++]=h+T|0,r[D++]=p+_|0,r[D++]=f+j|0,r[D++]=g+P|0,r[D++]=m+$|0,r[D++]=y+N|0,r[D++]=i+O|0,r[D++]=b+M|0,r[D++]=w+R|0,r[D++]=x+L|0},{counterRight:!1,counterLength:4,allowShortKeys:!1}),rF=new Uint8Array(16),rU=(e,t)=>{e.update(t);let n=t.length%16;n&&e.update(rF.subarray(n))},rB=new Uint8Array(32);function rz(e,t,n,r,i){let a=e(t,n,rB),o=rL.create(a);i&&rU(o,i),rU(o,r);let s=function(e,t,n){rg(n);let r=new Uint8Array(16),i=new DataView(r.buffer,r.byteOffset,r.byteLength);return rk(i,0,BigInt(t),n),rk(i,8,BigInt(e),n),r}(r.length,i?i.length:0,!0);o.update(s);let l=o.digest();return rw(a,s),l}let rW=((e,t)=>{function n(n){for(var r=arguments.length,i=Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];if(ry(n),!rx)throw Error("Non little-endian hardware is not yet supported");if(void 0!==e.nonceLength){let t=i[0];if(!t)throw Error("nonce / iv required");e.varSizeNonce?ry(t):ry(t,e.nonceLength)}let o=e.tagLength;o&&void 0!==i[1]&&ry(i[1]);let s=t(n,...i),l=(e,t)=>
1{if(void 0!==t){if(2!==e)throw Error("cipher output not supported");ry(t)}},c=!1;return{encrypt(e,t){if(c)throw Error("cannot encrypt() twice with same key + nonce");return c=!0,ry(e),l(s.encrypt.length,t),s.encrypt(e,t)},decrypt(e,t){if(ry(e),o&&e.length<o)throw Error("invalid ciphertext length: smaller than tagLength="+o);return l(s.decrypt.length,t),s.decrypt(e,t)}}}return Object.assign(n,e),n})({blockSize:64,nonceLength:12,tagLength:16},(e=>(t,n,r)=>({encrypt(i,a){let o=i.length;(a=rE(o+16,a,!1)).set(i);let s=a.subarray(0,-16);e(t,n,s,s,1);let l=rz(e,t,n,s,r);return a.set(l,o),rw(l),a},decrypt(i,a){a=rE(i.length-16,a,!1);let o=i.subarray(0,-16),s=i.subarray(-16),l=rz(e,t,n,o,r);if(!function(e,t){if(e.length!==t.length)return!1;let n=0;for(let r=0;r<e.length;r++)n|=e[r]^t[r];return 0===n}(s,l))throw Error("invalid tag");return a.set(i.subarray(0,-16)),e(t,n,a,a,1),rw(l),a}}))(rD));class rq extends no{update(e){return tQ(this),this.iHash.update(e),this}digestInto(e){tQ(this),tZ(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){let e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));let{oHash:t,iHash:n,finished:r,destroyed:i,blockLen:a,outputLen:o}=this;return e.finished=r,e.destroyed=i,e.blockLen=a,e.outputLen=o,e.oHash=t._cloneInto(e.oHash),e.iHash=n._cloneInto(e.iHash),e}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}constructor(e,t){super(),this.finished=!1,this.destroyed=!1,tJ(e);let n=ni(t);if(this.iHash=e.create(),"function"!=typeof this.iHash.update)throw Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let r=this.blockLen,i=new Uint8Array(r);i.set(n.length>r?e.create().update(n).digest():n);for(let e=0;e<i.length;e++)i[e]^=54;this.iHash.update(i),this.oHash=e.create();for(let e=0;e<i.length;e++)i[e]^=106;this.oHash.update(i),t1(i)}}let rH=(e,t,n)=>new rq(e,t).update(n).digest();rH.create=(e,t)=>new rq(e,t);let rV=Uint8Array.from([0]),rG=Uint8Array.of(),rK=BigInt(0),rY=BigInt(1);function rZ(e,t){if("boolean"!=typeof t)throw Error(e+" boolean expected, got "+t)}function rJ(e){let t=e.toString(16);return 1&t.length?"0"+t:t}function rQ(e){if("string"!=typeof e)throw Error("hex string expected, got "+typeof e);return""===e?rK:BigInt("0x"+e)}function rX(e){return tZ(e),rQ(ne(Uint8Array.from(e).reverse()))}function r0(e,t){return nr(e.toString(16).padStart(2*t,"0"))}function r1(e,t){return r0(e,t).reverse()}function r2(e,t,n){let r;if("string"==typeof t)try{r=nr(t)}catch(t){throw Error(e+" must be hex string or Uint8Array, cause: "+t)}else if(tK(t))r=Uint8Array.from(t);else throw Error(e+" must be hex string or Uint8Array");let i=r.length;if("number"==typeof n&&i!==n)throw Error(e+" of length "+n+" expected, got "+i);return r}let r3=e=>"bigint"==typeof e&&rK<=e;function r5(e,t,n,r){if(!(r3(t)&&r3(n)&&r3(r))||!(n<=t)||!(t<r))throw Error("expected valid "+e+": "+n+" <= n < "+r+", got "+t)}let r4=e=>(rY<<BigInt(e))-rY;function r6(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!e||"object"!=typeof e)throw Error("expected valid options object");function r(t,n,r){let i=e[t];if(r&&void 0===i)return;let a=typeof i;if(a!==n||null===i)throw Error('param "'.concat(t,'" is invalid: expected ').concat(n,", got ").concat(a))}Object.entries(t).forEach(e=>{let[t,n]=e;return r(t,n,!1)}),Object.entries(n).forEach(e=>{let[t,n]=e;return r(t,n,!0)})}function r8(e){let t=new WeakMap;return function(n){for(var r=arguments.length,i=Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];let o=t.get(n);if(void 0!==o)return o;let s=e(n,...i);return t.set(n,s),s}}let r9=BigInt(0),r7=BigInt(1),ie=BigInt(2),it=BigInt(3),ir=BigInt(4),ii=BigInt(5),ia=BigInt(8);function io(e,t){let n=e%t;return n>=r9?n:t+n}function is(e,t,n){let r=e;for(;t-- >r9;)r*=r,r%=n;return r}function il(e,t){if(e===r9)throw Error("invert: expected non-zero number");if(t<=r9)throw Error("invert: expected positive modulus, got "+t);let n=io(e,t),r=t,i=r9,a=r7;for(;n!==r9;){let e=r/n,t=r%n,o=i-a*e;r=n,n=t,i=a,a=o}if(r!==r7)throw Error("invert: does not exist");return io(i,t)}function ic(e,t){let n=(e.ORDER+r7)/ir,r=e.pow(t,n);if(!e.eql(e.sqr(r),t))throw Error("Cannot find square root");return r}function id(e,t){let n=(e.ORDER-ii)/ia,r=e.mul(t,ie),i=e.pow(r,n),a=e.mul(t,i),o=e.mul(e.mul(a,ie),i),s=e.mul(a,e.sub(o,e.ONE));if(!e.eql(e.sqr(s),t))throw Error("Cannot find square root");return s}let iu=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function ih(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=Array(t.length).fill(n?e.ZERO:void 0),i=t.reduce((t,n,i)=>e.is0(n)?t:(r[i]=t,e.mul(t,n)),e.ONE),a=e.inv(i);return t.reduceRight((t,n,i)=>e.is0(n)?t:(r[i]=e.mul(t,r[i]),e.mul(t,n)),a),r}function ip(e,t){let n=(e.ORDER-r7)/ie,r=e.pow(t,n),i=e.eql(r,e.ONE),a=e.eql(r,e.ZERO),o=e.eql(r,e.neg(e.ONE));if(!i&&!a&&!o)throw Error("invalid Legendre symbol result");return i?1:a?0:-1}function ig(e,t){let n,r,i,a=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(e<=r9)throw Error("invalid field: expected ORDER > 0, got "+e);if("object"==typeof t&&null!=t){if(o.sqrt||a)throw Error("cannot specify opts in two arguments");
1t.BITS&&(n=t.BITS),t.sqrt&&(r=t.sqrt),"boolean"==typeof t.isLE&&(a=t.isLE)}else"number"==typeof t&&(n=t),o.sqrt&&(r=o.sqrt);let{nBitLength:s,nByteLength:l}=function(e,t){void 0!==t&&tY(t);let n=void 0!==t?t:e.toString(2).length,r=Math.ceil(n/8);return{nBitLength:n,nByteLength:r}}(e,n);if(l>2048)throw Error("invalid field: expected ORDER of <= 2048 bytes");let c=Object.freeze({ORDER:e,isLE:a,BITS:s,BYTES:l,MASK:r4(s),ZERO:r9,ONE:r7,create:t=>io(t,e),isValid:t=>{if("bigint"!=typeof t)throw Error("invalid field element: expected bigint, got "+typeof t);return r9<=t&&t<e},is0:e=>e===r9,isValidNot0:e=>!c.is0(e)&&c.isValid(e),isOdd:e=>(e&r7)===r7,neg:t=>io(-t,e),eql:(e,t)=>e===t,sqr:t=>io(t*t,e),add:(t,n)=>io(t+n,e),sub:(t,n)=>io(t-n,e),mul:(t,n)=>io(t*n,e),pow:(e,t)=>(function(e,t,n){if(n<r9)throw Error("invalid exponent, negatives unsupported");if(n===r9)return e.ONE;if(n===r7)return t;let r=e.ONE,i=t;for(;n>r9;)n&r7&&(r=e.mul(r,i)),i=e.sqr(i),n>>=r7;return r})(c,e,t),div:(t,n)=>io(t*il(n,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>il(t,e),sqrt:r||(t=>(i||(i=e%ir===it?ic:e%ia===ii?id:function(e){if(e<BigInt(3))throw Error("sqrt is not defined for small field");let t=e-r7,n=0;for(;t%ie===r9;)t/=ie,n++;let r=ie,i=ig(e);for(;1===ip(i,r);)if(r++>1e3)throw Error("Cannot find square root: probably non-prime P");if(1===n)return ic;let a=i.pow(r,t),o=(t+r7)/ie;return function(e,r){if(e.is0(r))return r;if(1!==ip(e,r))throw Error("Cannot find square root");let i=n,s=e.mul(e.ONE,a),l=e.pow(r,t),c=e.pow(r,o);for(;!e.eql(l,e.ONE);){if(e.is0(l))return e.ZERO;let t=1,n=e.sqr(l);for(;!e.eql(n,e.ONE);)if(t++,n=e.sqr(n),t===i)throw Error("Cannot find square root");let r=r7<<BigInt(i-t-1),a=e.pow(s,r);i=t,s=e.sqr(a),l=e.mul(l,s),c=e.mul(c,a)}return c}}(e)),i(c,t))),toBytes:e=>a?r1(e,l):r0(e,l),fromBytes:e=>{if(e.length!==l)throw Error("Field.fromBytes: expected "+l+" bytes, got "+e.length);return a?rX(e):rQ(ne(e))},invertBatch:e=>ih(c,e),cmov:(e,t,n)=>n?t:e});return Object.freeze(c)}function im(e){if("bigint"!=typeof e)throw Error("field order must be bigint");return Math.ceil(e.toString(2).length/8)}function iy(e){let t=im(e);return t+Math.ceil(t/2)}let iv=BigInt(0),ib=BigInt(1);function iw(e,t){let n=t.negate();return e?n:t}function ix(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw Error("invalid window size, expected [1.."+t+"], got W="+e)}function iC(e,t){ix(e,t);let n=Math.ceil(t/e)+1,r=2**(e-1),i=2**e;return{windows:n,windowSize:r,mask:r4(e),maxNumber:i,shiftBy:BigInt(e)}}function iE(e,t,n){let{windowSize:r,mask:i,maxNumber:a,shiftBy:o}=n,s=Number(e&i),l=e>>o;s>r&&(s-=a,l+=ib);let c=t*r;return{nextN:l,offset:c+Math.abs(s)-1,isZero:0===s,isNeg:s<0,isNegF:t%2!=0,offsetF:c}}let ik=new WeakMap,iS=new WeakMap;function iI(e){return iS.get(e)||1}function iA(e){if(e!==iv)throw Error("invalid wNAF")}function iT(e,t){if(!t)return ig(e);if(t.ORDER!==e)throw Error("Field.ORDER must match order: Fp == p, Fn == n");return r6(t,iu.reduce((e,t)=>(e[t]="function",e),{ORDER:"bigint",MASK:"bigint",BYTES:"number",BITS:"number"})),t}BigInt(0),BigInt(1),BigInt(2),BigInt(8);let i_=BigInt(0),ij=BigInt(1),iP=BigInt(2);BigInt(0);let i$=BigInt(1),iN=BigInt(2),iO=BigInt(3),iM=BigInt(5),iR=BigInt(8),iL={p:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed"),n:BigInt("0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed"),h:iR,a:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec"),d:BigInt("0x52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3"),Gx:BigInt("0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a"),Gy:BigInt("0x6666666666666666666666666666666666666666666666666666666666666658")};function iD(e){return e[0]&=248,e[31]&=127,e[31]|=64,e}let iF=(()=>{let e=iL.p;return function(e){let{P:t,type:n,adjustScalarBytes:r,powPminus2:i,randomBytes:a}=(r6(e,{adjustScalarBytes:"function",powPminus2:"function"}),Object.freeze({...e})),o="x25519"===n;if(!o&&"x448"!==n)throw Error("invalid type");let s=a||nl,l=o?255:448,c=o?32:56,d=BigInt(o?9:5),u=BigInt(o?121665:39081),h=o?iP**BigInt(254):iP**BigInt(447),p=h+(o?BigInt(8)*iP**BigInt(251)-ij:BigInt(4)*iP**BigInt(445)-ij)+ij,f=e=>io(e,t),g=r1(f(d),c);function m(e,n){let a=function(e,n){r5("u",e,i_,t),r5("scalar",n,h,p);let r=ij,a=i_,o=e,s=ij,c=i_;for(let t=BigInt(l-1);t>=i_;t--){let i=n>>t&ij;c^=i,({x_2:r,x_3:o}=b(c,r,o)),({x_2:a,x_3:s}=b(c,a,s)),c=i;let l=r+a,d=f(l*l),h=r-a,p=f(h*h),g=d-p,m=o+s,y=f((o-s)*l),w=f(m*h),x=y+w,C=y-w;o=f(x*x),s=f(e*f(C*C)),r=f(d*p),a=f(g*(d+f(u*g)))}return{x_2:r,x_3:o}=b(c,r,o),{x_2:a,x_3:s}=b(c,a,s),f(r*i(a))}(function(e){let t=r2("u coordinate",e,c);return o&&(t[31]&=127),f(rX(t))}(n),rX(r(r2("scalar",e,c))));if(a===i_)throw Error("invalid private or public key received");return r1(f(a),c)}function y(e){return m(e,g)}function b(e,t,n){let r=f(e*(t-n));return{x_2:t=f(t-r),x_3:n=f(n+r)}}return{scalarMult:m,scalarMultBase:y,getSharedSecret:(e,t)=>m(e,t),getPublicKey:e=>y(e),utils:{randomPrivateKey:()=>s(c)},GuBytes:g.slice()}}({P:e,type:"x25519",powPminus2:t=>
1{let{pow_p_5_8:n,b2:r}=function(e){let t=BigInt(10),n=BigInt(20),r=BigInt(40),i=BigInt(80),a=iL.p,o=e*e%a*e%a,s=is(o,iN,a)*o%a,l=is(s,i$,a)*e%a,c=is(l,iM,a)*l%a,d=is(c,t,a)*c%a,u=is(d,n,a)*d%a,h=is(u,r,a)*u%a,p=is(h,i,a)*h%a,f=is(p,i,a)*h%a,g=is(f,t,a)*c%a;return{pow_p_5_8:is(g,iN,a)*e%a,b2:o}}(t);return io(is(n,iO,e)*r,e)},adjustScalarBytes:iD})})();function iU(e){void 0!==e.lowS&&rZ("lowS",e.lowS),void 0!==e.prehash&&rZ("prehash",e.prehash)}let iB={Err:class extends Error{constructor(e=""){super(e)}},_tlv:{encode:(e,t)=>{let{Err:n}=iB;if(e<0||e>256)throw new n("tlv.encode: wrong tag");if(1&t.length)throw new n("tlv.encode: unpadded data");let r=t.length/2,i=rJ(r);if(i.length/2&128)throw new n("tlv.encode: long form length too big");let a=r>127?rJ(i.length/2|128):"";return rJ(e)+a+i+t},decode(e,t){let{Err:n}=iB,r=0;if(e<0||e>256)throw new n("tlv.encode: wrong tag");if(t.length<2||t[r++]!==e)throw new n("tlv.decode: wrong tlv");let i=t[r++],a=0;if(128&i){let e=127&i;if(!e)throw new n("tlv.decode(long): indefinite length not supported");if(e>4)throw new n("tlv.decode(long): byte length is too big");let o=t.subarray(r,r+e);if(o.length!==e)throw new n("tlv.decode: length bytes not complete");if(0===o[0])throw new n("tlv.decode(long): zero leftmost byte");for(let e of o)a=a<<8|e;if(r+=e,a<128)throw new n("tlv.decode(long): not minimal encoding")}else a=i;let o=t.subarray(r,r+a);if(o.length!==a)throw new n("tlv.decode: wrong value length");return{v:o,l:t.subarray(r+a)}}},_int:{encode(e){let{Err:t}=iB;if(e<iz)throw new t("integer: negative integers are not allowed");let n=rJ(e);if(8&Number.parseInt(n[0],16)&&(n="00"+n),1&n.length)throw new t("unexpected DER parsing assertion: unpadded hex");return n},decode(e){let{Err:t}=iB;if(128&e[0])throw new t("invalid signature integer: negative");if(0===e[0]&&!(128&e[1]))throw new t("invalid signature integer: unnecessary leading zero");return rQ(ne(e))}},toSig(e){let{Err:t,_int:n,_tlv:r}=iB,i=r2("signature",e),{v:a,l:o}=r.decode(48,i);if(o.length)throw new t("invalid signature: left bytes after parsing");let{v:s,l:l}=r.decode(2,a),{v:c,l:d}=r.decode(2,l);if(d.length)throw new t("invalid signature: left bytes after parsing");return{r:n.decode(s),s:n.decode(c)}},hexFromSig(e){let{_tlv:t,_int:n}=iB,r=t.encode(2,n.encode(e.r)),i=t.encode(2,n.encode(e.s));return t.encode(48,r+i)}},iz=BigInt(0),iW=BigInt(1),iq=BigInt(2),iH=BigInt(3),iV=BigInt(4);function iG(e,t,n){let{BYTES:r}=e;return function(i){let a;if("bigint"==typeof i)a=i;else{let n=r2("private key",i);if(t){if(!t.includes(2*n.length))throw Error("invalid private key");let e=new Uint8Array(r);e.set(n,e.length-n.length),n=e}try{a=e.fromBytes(n)}catch(e){throw Error("invalid private key: expected ui8a of size ".concat(r,", got ").concat(typeof i))}}if(n&&(a=e.create(a)),!e.isValidNot0(a))throw Error("invalid private key: out of range [1..N-1]");return a}}function iK(e){return Uint8Array.of(e?2:3)}function iY(e,t){let n=t=>(function(e){let{CURVE:t,curveOpts:n,ecdsaOpts:r}=function(e){let{CURVE:t,curveOpts:n}=function(e){let t={a:e.a,b:e.b,p:e.Fp.ORDER,n:e.n,h:e.h,Gx:e.Gx,Gy:e.Gy},n={Fp:e.Fp,Fn:ig(t.n,e.nBitLength),allowedPrivateKeyLengths:e.allowedPrivateKeyLengths,allowInfinityPoint:e.allowInfinityPoint,endo:e.endo,wrapPrivateKey:e.wrapPrivateKey,isTorsionFree:e.isTorsionFree,clearCofactor:e.clearCofactor,fromBytes:e.fromBytes,toBytes:e.toBytes};return{CURVE:t,curveOpts:n}}(e);return{CURVE:t,curveOpts:n,ecdsaOpts:{hash:e.hash,hmac:e.hmac,randomBytes:e.randomBytes,lowS:e.lowS,bits2int:e.bits2int,bits2int_modN:e.bits2int_modN}}}(e),i=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};r6(t,{hash:"function"},{hmac:"function",lowS:"boolean",randomBytes:"function",bits2int:"function",bits2int_modN:"function"});let r=t.randomBytes||nl,i=t.hmac||function(e){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return rH(t.hash,e,na(...r))},{Fp:a,Fn:o}=e,{ORDER:s,BITS:l}=o;function c(e,t){if(!o.isValidNot0(t))throw Error("invalid signature ".concat(e,": out of range 1..CURVE.n"))}
1class d{static fromCompact(e){let t=o.BYTES,n=r2("compactSignature",e,2*t);return new d(o.fromBytes(n.subarray(0,t)),o.fromBytes(n.subarray(t,2*t)))}static fromDER(e){let{r:t,s:n}=iB.toSig(r2("DER",e));return new d(t,n)}assertValidity(){}addRecoveryBit(e){return new d(this.r,this.s,e)}recoverPublicKey(t){let n=a.ORDER,{r:r,s:i,recovery:l}=this;if(null==l||![0,1,2,3].includes(l))throw Error("recovery id invalid");if(s*iq<n&&l>1)throw Error("recovery id is ambiguous for h>1 curve");let c=2===l||3===l?r+s:r;if(!a.isValid(c))throw Error("recovery id 2 or 3 invalid");let d=a.toBytes(c),u=e.fromHex(na(iK((1&l)==0),d)),h=o.inv(c),p=f(r2("msgHash",t)),g=o.create(-p*h),m=o.create(i*h),y=e.BASE.multiplyUnsafe(g).add(u.multiplyUnsafe(m));if(y.is0())throw Error("point at infinify");return y.assertValidity(),y}hasHighS(){return this.s>s>>iW}normalizeS(){return this.hasHighS()?new d(this.r,o.neg(this.s),this.recovery):this}toBytes(e){if("compact"===e)return na(o.toBytes(this.r),o.toBytes(this.s));if("der"===e)return nr(iB.hexFromSig(this));throw Error("invalid format")}toDERRawBytes(){return this.toBytes("der")}toDERHex(){return ne(this.toBytes("der"))}toCompactRawBytes(){return this.toBytes("compact")}toCompactHex(){return ne(this.toBytes("compact"))}constructor(e,t,n){c("r",e),c("s",t),this.r=e,this.s=t,null!=n&&(this.recovery=n),Object.freeze(this)}}let u=iG(o,n.allowedPrivateKeyLengths,n.wrapPrivateKey);function h(t){if("bigint"==typeof t)return!1;if(t instanceof e)return!0;let r=r2("key",t).length,i=a.BYTES,s=i+1;if(!(n.allowedPrivateKeyLengths||o.BYTES===s))return r===s||r===2*i+1}let p=t.bits2int||function(e){if(e.length>8192)throw Error("input is too large");let t=rQ(ne(e)),n=8*e.length-l;return n>0?t>>BigInt(n):t},f=t.bits2int_modN||function(e){return o.create(p(e))},g=r4(l);function m(e){return r5("num < 2^"+l,e,iz,g),o.toBytes(e)}let y={lowS:t.lowS,prehash:!1},b={lowS:t.lowS,prehash:!1};return e.BASE.precompute(8),Object.freeze({getPublicKey:function(t){let n=!(arguments.length>1)||void 0===arguments[1]||arguments[1];return e.fromPrivateKey(t).toBytes(n)},getSharedSecret:function(t,n){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(!0===h(t))throw Error("first arg must be private key");if(!1===h(n))throw Error("second arg must be public key");return e.fromHex(n).multiply(u(t)).toBytes(r)},sign:function(n,l){let c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:y,{seed:h,k2sig:g}=function(n,i){let l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:y;if(["recovered","canonical"].some(e=>e in l))throw Error("sign() legacy options not supported");let{hash:c}=t,{lowS:h,prehash:g,extraEntropy:b}=l;null==h&&(h=!0),n=r2("msgHash",n),iU(l),g&&(n=r2("prehashed msgHash",c(n)));let w=f(n),x=u(i),C=[m(x),m(w)];if(null!=b&&!1!==b){let e=!0===b?r(a.BYTES):b;C.push(r2("extraEntropy",e))}return{seed:na(...C),k2sig:function(t){var n;let r=p(t);if(!o.isValidNot0(r))return;let i=o.inv(r),a=e.BASE.multiply(r).toAffine(),l=o.create(a.x);if(l===iz)return;let c=o.create(i*o.create(w+l*x));if(c===iz)return;let u=2*(a.x!==l)|Number(a.y&iW),f=c;return h&&c>s>>iW&&(f=(n=c)>s>>iW?o.neg(n):n,u^=1),new d(l,f,u)}}}(n,l,c);return(function(e,t,n){if("number"!=typeof e||e<2)throw Error("hashLen must be a number");if("number"!=typeof t||t<2)throw Error("qByteLen must be a number");if("function"!=typeof n)throw Error("hmacFn must be a function");let r=e=>new Uint8Array(e),i=e=>Uint8Array.of(e),a=r(e),o=r(e),s=0,l=()=>{a.fill(1),o.fill(0),s=0},c=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return n(o,a,...t)},d=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r(0);o=c(i(0),e),a=c(),0!==e.length&&(o=c(i(1),e),a=c())},u=()=>{if(s++>=1e3)throw Error("drbg: tried 1000 values");let e=0,n=[];for(;e<t;){let t=(a=c()).slice();n.push(t),e+=a.length}return na(...n)};return(e,t)=>{let n;for(l(),d(e);!(n=t(u()));)d();return l(),n}})(t.hash.outputLen,o.BYTES,i)(h,g)},verify:function(n,r,i){let a,s,l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:b;r=r2("msgHash",r),i=r2("publicKey",i),iU(l);let{lowS:c,prehash:u,format:h}=l;if("strict"in l)throw Error("options.strict was renamed to lowS");if(void 0!==h&&!["compact","der","js"].includes(h))throw Error('format must be "compact", "der" or "js"');
1let p="string"==typeof n||tK(n),g=!p&&!h&&"object"==typeof n&&null!==n&&"bigint"==typeof n.r&&"bigint"==typeof n.s;if(!p&&!g)throw Error("invalid signature, expected Uint8Array, hex string or Signature instance");try{if(g)if(void 0===h||"js"===h)a=new d(n.r,n.s);else throw Error("invalid format");if(p){try{"compact"!==h&&(a=d.fromDER(n))}catch(e){if(!(e instanceof iB.Err))throw e}a||"der"===h||(a=d.fromCompact(n))}s=e.fromHex(i)}catch(e){return!1}if(!a||c&&a.hasHighS())return!1;u&&(r=t.hash(r));let{r:m,s:y}=a,w=f(r),x=o.inv(y),C=o.create(w*x),E=o.create(m*x),k=e.BASE.multiplyUnsafe(C).add(s.multiplyUnsafe(E));return!k.is0()&&o.create(k.x)===m},utils:{isValidPrivateKey(e){try{return u(e),!0}catch(e){return!1}},normPrivateKeyToScalar:u,randomPrivateKey:()=>(function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=e.length,i=im(t),a=iy(t);if(r<16||r<a||r>1024)throw Error("expected "+a+"-1024 bytes of input, got "+r);let o=io(n?rX(e):rQ(ne(e)),t-r7)+r7;return n?r1(o,i):r0(o,i)})(r(iy(s)),s),precompute(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.BASE;return n.precompute(t,!1)}},Point:e,Signature:d})}(function(e){var t,n,r;let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{Fp:a,Fn:o}=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!t||"object"!=typeof t)throw Error("expected valid ".concat(e," CURVE object"));for(let e of["p","n","h"]){let n=t[e];if(!("bigint"==typeof n&&n>iv))throw Error("CURVE.".concat(e," must be positive bigint"))}let r=iT(t.p,n.Fp),i=iT(t.n,n.Fn);for(let n of["Gx","Gy","a","weierstrass"===e?"b":"d"])if(!r.isValid(t[n]))throw Error("CURVE.".concat(n," must be valid field element of CURVE.Fp"));return{Fp:r,Fn:i}}("weierstrass",e,i),{h:s,n:l}=e;r6(i,{},{allowInfinityPoint:"boolean",clearCofactor:"function",isTorsionFree:"function",fromBytes:"function",toBytes:"function",endo:"object",wrapPrivateKey:"boolean"});let{endo:c}=i;if(c&&(!a.is0(e.a)||"bigint"!=typeof c.beta||"function"!=typeof c.splitScalar))throw Error('invalid endo: expected "beta": bigint and "splitScalar": function');function d(){if(!a.isOdd)throw Error("compression is not supported: Field does not have .isOdd()")}let u=i.toBytes||function(e,t,n){let{x:r,y:i}=t.toAffine(),o=a.toBytes(r);return(rZ("isCompressed",n),n)?(d(),na(iK(!a.isOdd(i)),o)):na(Uint8Array.of(4),o,a.toBytes(i))},h=i.fromBytes||function(e){tZ(e);let t=a.BYTES,n=t+1,r=2*t+1,i=e.length,o=e[0],s=e.subarray(1);if(i===n&&(2===o||3===o)){let e,t=a.fromBytes(s);if(!a.isValid(t))throw Error("bad point: is not on curve, wrong x");let n=p(t);try{e=a.sqrt(n)}catch(e){throw Error("bad point: is not on curve, sqrt error"+(e instanceof Error?": "+e.message:""))}return d(),(1&o)==1!==a.isOdd(e)&&(e=a.neg(e)),{x:t,y:e}}if(i===r&&4===o){let e=a.fromBytes(s.subarray(0*t,+t)),n=a.fromBytes(s.subarray(+t,2*t));if(!f(e,n))throw Error("bad point: is not on curve");return{x:e,y:n}}throw Error("bad point: got length ".concat(i,", expected compressed=").concat(n," or uncompressed=").concat(r))},p=(t=e.a,n=e.b,function(e){let r=a.sqr(e),i=a.mul(r,e);return a.add(a.add(i,a.mul(e,t)),n)});function f(e,t){let n=a.sqr(t),r=p(e);return a.eql(n,r)}if(!f(e.Gx,e.Gy))throw Error("bad curve params: generator point");let g=a.mul(a.pow(e.a,iH),iV),m=a.mul(a.sqr(e.b),BigInt(27));if(a.is0(a.add(g,m)))throw Error("bad curve params: a or b");function y(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!a.isValid(t)||n&&a.is0(t))throw Error("bad point coordinate ".concat(e));return t}function b(e){if(!(e instanceof E))throw Error("ProjectivePoint expected")}let w=r8((e,t)=>{let{px:n,py:r,pz:i}=e;if(a.eql(i,a.ONE))return{x:n,y:r};let o=e.is0();null==t&&(t=o?a.ONE:a.inv(i));let s=a.mul(n,t),l=a.mul(r,t),c=a.mul(i,t);if(o)return{x:a.ZERO,y:a.ZERO};if(!a.eql(c,a.ONE))throw Error("invZ was invalid");return{x:s,y:l}}),x=r8(e=>{if(e.is0()){if(i.allowInfinityPoint&&!a.is0(e.py))return;throw Error("bad point: ZERO")}let{x:t,y:n}=e.toAffine();if(!a.isValid(t)||!a.isValid(n))throw Error("bad point: x or y not field elements");if(!f(t,n))throw Error("bad point: equation left != right");
vendor: 6,072 bytes, line 1
1if(!e.isTorsionFree())throw Error("bad point: not in prime-order subgroup");return!0});function C(e,t,n,r,i){return n=new E(a.mul(n.px,e),n.py,n.pz),t=iw(r,t),n=iw(i,n),t.add(n)}class E{static fromAffine(e){let{x:t,y:n}=e||{};if(!e||!a.isValid(t)||!a.isValid(n))throw Error("invalid affine point");if(e instanceof E)throw Error("projective point not allowed");return a.is0(t)&&a.is0(n)?E.ZERO:new E(t,n,a.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(e){let t=ih(E.Fp,e.map(e=>e.pz));return e.map((e,n)=>e.toAffine(t[n])).map(E.fromAffine)}static fromBytes(e){return tZ(e),E.fromHex(e)}static fromHex(e){let t=E.fromAffine(h(r2("pointHex",e)));return t.assertValidity(),t}static fromPrivateKey(e){let t=iG(o,i.allowedPrivateKeyLengths,i.wrapPrivateKey);return E.BASE.multiply(t(e))}static msm(e,t){return function(e,t,n,r){(function(e,t){if(!Array.isArray(e))throw Error("array expected");e.forEach((e,n)=>{if(!(e instanceof t))throw Error("invalid point at index "+n)})})(n,e),function(e,t){if(!Array.isArray(e))throw Error("array of scalars expected");e.forEach((e,n)=>{if(!t.isValid(e))throw Error("invalid scalar at index "+n)})}(r,t);let i=n.length,a=r.length;if(i!==a)throw Error("arrays of points and scalars must have equal length");let o=e.ZERO,s=function(e){let t;for(t=0;e>rK;e>>=rY,t+=1);return t}(BigInt(i)),l=1;s>12?l=s-3:s>4?l=s-2:s>0&&(l=2);let c=r4(l),d=Array(Number(c)+1).fill(o),u=Math.floor((t.BITS-1)/l)*l,h=o;for(let e=u;e>=0;e-=l){d.fill(o);for(let t=0;t<a;t++){let i=Number(r[t]>>BigInt(e)&c);d[i]=d[i].add(n[t])}let t=o;for(let e=d.length-1,n=o;e>0;e--)n=n.add(d[e]),t=t.add(n);if(h=h.add(t),0!==e)for(let e=0;e<l;e++)h=h.double()}return h}(E,o,e,t)}precompute(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8,t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];return S.setWindowSize(this,e),t||this.multiply(iH),this}_setWindowSize(e){this.precompute(e)}assertValidity(){x(this)}hasEvenY(){let{y:e}=this.toAffine();if(!a.isOdd)throw Error("Field doesn't support isOdd");return!a.isOdd(e)}equals(e){b(e);let{px:t,py:n,pz:r}=this,{px:i,py:o,pz:s}=e,l=a.eql(a.mul(t,s),a.mul(i,r)),c=a.eql(a.mul(n,s),a.mul(o,r));return l&&c}negate(){return new E(this.px,a.neg(this.py),this.pz)}double(){let{a:t,b:n}=e,r=a.mul(n,iH),{px:i,py:o,pz:s}=this,l=a.ZERO,c=a.ZERO,d=a.ZERO,u=a.mul(i,i),h=a.mul(o,o),p=a.mul(s,s),f=a.mul(i,o);return f=a.add(f,f),d=a.mul(i,s),d=a.add(d,d),l=a.mul(t,d),c=a.mul(r,p),c=a.add(l,c),l=a.sub(h,c),c=a.add(h,c),c=a.mul(l,c),l=a.mul(f,l),d=a.mul(r,d),p=a.mul(t,p),f=a.sub(u,p),f=a.mul(t,f),f=a.add(f,d),d=a.add(u,u),u=a.add(d,u),u=a.add(u,p),u=a.mul(u,f),c=a.add(c,u),p=a.mul(o,s),p=a.add(p,p),u=a.mul(p,f),l=a.sub(l,u),d=a.mul(p,h),d=a.add(d,d),new E(l,c,d=a.add(d,d))}add(t){b(t);let{px:n,py:r,pz:i}=this,{px:o,py:s,pz:l}=t,c=a.ZERO,d=a.ZERO,u=a.ZERO,h=e.a,p=a.mul(e.b,iH),f=a.mul(n,o),g=a.mul(r,s),m=a.mul(i,l),y=a.add(n,r),w=a.add(o,s);y=a.mul(y,w),w=a.add(f,g),y=a.sub(y,w),w=a.add(n,i);let x=a.add(o,l);return w=a.mul(w,x),x=a.add(f,m),w=a.sub(w,x),x=a.add(r,i),c=a.add(s,l),x=a.mul(x,c),c=a.add(g,m),x=a.sub(x,c),u=a.mul(h,w),c=a.mul(p,m),u=a.add(c,u),c=a.sub(g,u),u=a.add(g,u),d=a.mul(c,u),g=a.add(f,f),g=a.add(g,f),m=a.mul(h,m),w=a.mul(p,w),g=a.add(g,m),m=a.sub(f,m),m=a.mul(h,m),w=a.add(w,m),f=a.mul(g,w),d=a.add(d,f),f=a.mul(x,w),c=a.mul(y,c),c=a.sub(c,f),f=a.mul(y,g),u=a.mul(x,u),new E(c,d,u=a.add(u,f))}subtract(e){return this.add(e.negate())}is0(){return this.equals(E.ZERO)}multiply(e){let t,n,{endo:r}=i;if(!o.isValidNot0(e))throw Error("invalid scalar: out of range");let a=e=>S.wNAFCached(this,e,E.normalizeZ);if(r){let{k1neg:i,k1:o,k2neg:s,k2:l}=r.splitScalar(e),{p:c,f:d}=a(o),{p:u,f:h}=a(l);n=d.add(h),t=C(r.beta,c,u,i,s)}else{let{p:r,f:i}=a(e);t=r,n=i}return E.normalizeZ([t,n])[0]}multiplyUnsafe(e){let{endo:t}=i;if(!o.isValid(e))throw Error("invalid scalar: out of range");if(e===iz||this.is0())return E.ZERO;if(e===iW)return this;if(S.hasPrecomputes(this))return this.multiply(e);if(!t)return S.wNAFCachedUnsafe(this,e);{let{k1neg:n,k1:r,k2neg:i,k2:a}=t.splitScalar(e),{p1:o,p2:s}=function(e,t,n,r){let i=t,a=e.ZERO,o=e.ZERO;for(;n>iv||r>iv;)n&ib&&(a=a.add(i)),r&ib&&(o=o.add(i)),i=i.double(),n>>=ib,r>>=ib;return{p1:a,p2:o}}(E,this,r,a);return C(t.beta,o,s,n,i)}}multiplyAndAddUnsafe(e,t,n){let r=this.multiplyUnsafe(t).add(e.multiplyUnsafe(n));return r.is0()?void 0:r}toAffine(e){return w(this,e)}isTorsionFree(){let{isTorsionFree:e}=i;return s===iW||(e?e(E,this):S.wNAFCachedUnsafe(this,l).is0())}clearCofactor(){let{clearCofactor:e}=i;return s===iW?this:e?e(E,this):this.multiplyUnsafe(s)}toBytes(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];return rZ("isCompressed",e),this.assertValidity(),u(E,this,e)}toRawBytes(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];return this.toBytes(e)}toHex(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];return ne(this.toBytes(e))}toString(){return"<Point ".concat(this.is0()?"ZERO":this.toHex(),">")}constructor(e,t,n){this.px=y("x",e),this.py=y("y",t,!0),this.pz=y("z",n),Object.freeze(this)}}E.BASE=new E(e.Gx,e.Gy,a.ONE),E.ZERO=new E(a.ZERO,a.ONE,a.ZERO),E.Fp=a,E.Fn=o;let k=o.BITS,S=(r=i.endo?Math.ceil(k/2):k,{constTimeNegate:iw,hasPrecomputes:e=>1!==iI(e),unsafeLadder(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:E.ZERO,r=e;for(;t>iv;)t&ib&&(n=n.add(r)),r=r.double(),t>>=ib;return n},precomputeWindow(e,t){let{windows:n,windowSize:i}=iC(t,r),a=[],o=e,s=o;for(let e=0;e<n;e++){s=o,a.push(s);for(let e=1;e<i;e++)s=s.add(o),a.push(s);o=s.double()}return a},wNAF(e,t,n){let i=E.ZERO,a=E.BASE,o=iC(e,r);for(let e=0;e<o.windows;e++){let{nextN:r,offset:s,isZero:l,isNeg:c,isNegF:d,offsetF:u}=iE(n,e,o);n=r,l?a=a.add(iw(d,t[u])):i=i.add(iw(c,t[s]))}return iA(n),{p:i,f:a}},wNAFUnsafe(e,t,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:E.ZERO,a=iC(e,r);for(let e=0;e<a.windows&&n!==iv;e++){let{nextN:r,offset:o,isZero:s,isNeg:l}=iE(n,e,a);if(n=r,!s){let e=t[o];i=i.add(l?e.negate():e)}}return iA(n),i}
1,getPrecomputes(e,t,n){let r=ik.get(t);return r||(r=this.precomputeWindow(t,e),1!==e&&("function"==typeof n&&(r=n(r)),ik.set(t,r))),r},wNAFCached(e,t,n){let r=iI(e);return this.wNAF(r,this.getPrecomputes(r,e,n),t)},wNAFCachedUnsafe(e,t,n,r){let i=iI(e);return 1===i?this.unsafeLadder(e,t,r):this.wNAFUnsafe(i,this.getPrecomputes(i,e,n),t,r)},setWindowSize(e,t){ix(t,r),iS.set(e,t),ik.delete(e)}});return E}(t,n),r,n);return Object.assign({},i,{ProjectivePoint:i.Point,CURVE:e})})({...e,hash:t});return{...n(t),create:n}}let iZ={p:BigInt("0xffffffff00000001000000000000000000000000ffffffffffffffffffffffff"),n:BigInt("0xffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551"),h:BigInt(1),a:BigInt("0xffffffff00000001000000000000000000000000fffffffffffffffffffffffc"),b:BigInt("0x5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b"),Gx:BigInt("0x6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296"),Gy:BigInt("0x4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5")},iJ={p:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000ffffffff"),n:BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52973"),h:BigInt(1),a:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000fffffffc"),b:BigInt("0xb3312fa7e23ee7e4988e056be3f82d19181d9c6efe8141120314088f5013875ac656398d8a2ed19d2a85c8edd3ec2aef"),Gx:BigInt("0xaa87ca22be8b05378eb1c71ef320ad746e1d3b628ba79b9859f741e082542a385502f25dbf55296c3a545e3872760ab7"),Gy:BigInt("0x3617de4a96262c6f5d9e98bf9292dc29f8f41dbd289a147ce9da3113b5f0b8c00a60b1ce1d7e819d7a431d7c90ea0e5f")},iQ={p:BigInt("0x1ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),n:BigInt("0x01fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa51868783bf2f966b7fcc0148f709a5d03bb5c9b8899c47aebb6fb71e91386409"),h:BigInt(1),a:BigInt("0x1fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc"),b:BigInt("0x0051953eb9618e1c9a1f929a21a0b68540eea2da725b99b315f3b8b489918ef109e156193951ec7e937b1652c0bd3bb1bf073573df883d2c34f1ef451fd46b503f00"),Gx:BigInt("0x00c6858e06b70404e9cd9e3ecb662395b4429c648139053fb521f828af606b4d3dbaa14b5e77efe75928fe1dc127a2ffa8de3348b3c1856a429bf97e7e31c2e5bd66"),Gy:BigInt("0x011839296a789a3bc0045c8a5fb42c7d1bd998f54449579b446817afbd17273e662c97ee72995ef42640c550b9013fad0761353c7086a272c24088be94769fd16650")},iX=ig(iZ.p),i0=ig(iJ.p),i1=ig(iQ.p),i2=iY({...iZ,Fp:iX,lowS:!1},nB);iY({...iJ,Fp:i0,lowS:!1},nW),iY({...iQ,Fp:i1,lowS:!1,allowedPrivateKeyLengths:[130,131,132]},nz);let i3="base10",i5="base16",i4="base64pad",i6="base64url",i8="utf8";function i9(){return eX(nl(32),i5)}function i7(e){return eX(nB(eQ(e,i5)),i5)}function ae(e){return eX(nB(eQ(e,i8)),i5)}function at(e){return eQ("".concat(e),i3)}function an(e){return Number(eX(e,i3))}function ar(e){return e.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function ai(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),n=(4-t.length%4)%4;return t+"=".repeat(n)}function aa(e){if(2===an(e.type))return eX(eV([e.type,e.sealed]),i4);if(1===an(e.type)){if(typeof e.senderPublicKey>"u")throw Error("Missing sender public key for type 1 envelope");return eX(eV([e.type,e.senderPublicKey,e.iv,e.sealed]),i4)}return eX(eV([e.type,e.iv,e.sealed]),i4)}function ao(e){let t=eQ((e.encoding||i4)===i6?ai(e.encoded):e.encoded,i4),n=t.slice(0,1);if(1===an(n)){let e=t.slice(1,33),r=t.slice(33,45);return{type:n,sealed:t.slice(45),iv:r,senderPublicKey:e}}if(2===an(n))return{type:n,sealed:t.slice(1),iv:nl(12)};let r=t.slice(1,13);return{type:n,sealed:t.slice(13),iv:r}}function as(e){let t=(null==e?void 0:e.type)||0;if(1===t){if(typeof(null==e?void 0:e.senderPublicKey)>"u")throw Error("missing sender public key");if(typeof(null==e?void 0:e.receiverPublicKey)>"u")throw Error("missing receiver public key")}return{type:t,senderPublicKey:null==e?void 0:e.senderPublicKey,receiverPublicKey:null==e?void 0:e.receiverPublicKey}}function al(e){return 1===e.type&&"string"==typeof e.senderPublicKey&&"string"==typeof e.receiverPublicKey}function ac(e){return(null==e?void 0:e.relay)||{protocol:"irn"}}function ad(e){let t=e0.RELAY_JSONRPC[e];if(typeof t>"u")throw Error("Relay Protocol not supported: ".concat(e));return t}function au(e){var t;if(!e.includes("wc:")){let t=tT(e);null!=t&&t.includes("wc:")&&(e=t)}let n=(e=(e=e.includes("wc://")?e.replace("wc://",""):e).includes("wc:")?e.replace("wc:",""):e).indexOf(":"),r=-1!==e.indexOf("?")?e.indexOf("?"):void 0,i=e.substring(0,n),a=e.substring(n+1,r).split("@"),o=new URLSearchParams("u">typeof r?e.substring(r):""),s={};o.forEach((e,t)=>{s[t]=e});let l="string"==typeof s.methods?s.methods.split(","):void 0;return{protocol:i,topic:(t=a[0]).startsWith("//")?t.substring(2):t,version:parseInt(a[1],10),symKey:s.symKey,relay:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"-",n={},r="relay"+t;return Object.keys(e).forEach(t=>{if(t.startsWith(r)){let i=t.replace(r,""),a=e[t];n[i]=a}}),n}(s),methods:l,expiryTimestamp:s.expiryTimestamp?parseInt(s.expiryTimestamp,10):void 0}}function ah(e){let t=new URLSearchParams,n=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"-",n={};return Object.keys(e).forEach(r=>{e[r]&&(n["relay"+t+r]=e[r])}),n}(e.relay);
1Object.keys(n).sort().forEach(e=>{t.set(e,n[e])}),t.set("symKey",e.symKey),e.expiryTimestamp&&t.set("expiryTimestamp",e.expiryTimestamp.toString()),e.methods&&t.set("methods",e.methods.join(","));let r=t.toString();return"".concat(e.protocol,":").concat(e.topic,"@").concat(e.version,"?").concat(r)}function ap(e,t,n){return"".concat(e,"?wc_ev=").concat(n,"&topic=").concat(t)}var af=Object.defineProperty,ag=Object.defineProperties,am=Object.getOwnPropertyDescriptors,ay=Object.getOwnPropertySymbols,av=Object.prototype.hasOwnProperty,ab=Object.prototype.propertyIsEnumerable,aw=(e,t,n)=>t in e?af(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ax=(e,t)=>{for(var n in t||(t={}))av.call(t,n)&&aw(e,n,t[n]);if(ay)for(var n of ay(t))ab.call(t,n)&&aw(e,n,t[n]);return e},aC=(e,t)=>ag(e,am(t));function aE(e){let t=[];return e.forEach(e=>{let[n,r]=e.split(":");t.push("".concat(n,":").concat(r))}),t}function ak(e){return e.includes(":")}function aS(e){return ak(e)?e.split(":")[0]:e}function aI(e){var t,n,r;let i={};if(!aN(e))return i;for(let[a,o]of Object.entries(e)){let e=ak(a)?[a]:o.chains,s=o.methods||[],l=o.events||[],c=aS(a);i[c]=aC(ax({},i[c]),{chains:tC(e,null==(t=i[c])?void 0:t.chains),methods:tC(s,null==(n=i[c])?void 0:n.methods),events:tC(l,null==(r=i[c])?void 0:r.events)})}return i}function aA(e,t){let n=function(e){let t={};return null==e||e.forEach(e=>{var n;let[r,i]=e.split(":");t[r]||(t[r]={accounts:[],chains:[],events:[],methods:[]}),t[r].accounts.push(e),null==(n=t[r].chains)||n.push("".concat(r,":").concat(i))}),t}(t=t.map(e=>e.replace("did:pkh:","")));for(let[t,r]of Object.entries(n))r.methods?r.methods=tC(r.methods,e):r.methods=e,r.events=["chainChanged","accountsChanged"];return n}let aT={INVALID_METHOD:{message:"Invalid method.",code:1001},INVALID_EVENT:{message:"Invalid event.",code:1002},INVALID_UPDATE_REQUEST:{message:"Invalid update request.",code:1003},INVALID_EXTEND_REQUEST:{message:"Invalid extend request.",code:1004},INVALID_SESSION_SETTLE_REQUEST:{message:"Invalid session settle request.",code:1005},UNAUTHORIZED_METHOD:{message:"Unauthorized method.",code:3001},UNAUTHORIZED_EVENT:{message:"Unauthorized event.",code:3002},UNAUTHORIZED_UPDATE_REQUEST:{message:"Unauthorized update request.",code:3003},UNAUTHORIZED_EXTEND_REQUEST:{message:"Unauthorized extend request.",code:3004},USER_REJECTED:{message:"User rejected.",code:5e3},USER_REJECTED_CHAINS:{message:"User rejected chains.",code:5001},USER_REJECTED_METHODS:{message:"User rejected methods.",code:5002},USER_REJECTED_EVENTS:{message:"User rejected events.",code:5003},UNSUPPORTED_CHAINS:{message:"Unsupported chains.",code:5100},UNSUPPORTED_METHODS:{message:"Unsupported methods.",code:5101},UNSUPPORTED_EVENTS:{message:"Unsupported events.",code:5102},UNSUPPORTED_ACCOUNTS:{message:"Unsupported accounts.",code:5103},UNSUPPORTED_NAMESPACE_KEY:{message:"Unsupported namespace key.",code:5104},USER_DISCONNECTED:{message:"User disconnected.",code:6e3},SESSION_SETTLEMENT_FAILED:{message:"Session settlement failed.",code:7e3},WC_METHOD_UNSUPPORTED:{message:"Unsupported wc_ method.",code:10001}},a_={NOT_INITIALIZED:{message:"Not initialized.",code:1},NO_MATCHING_KEY:{message:"No matching key.",code:2},RESTORE_WILL_OVERRIDE:{message:"Restore will override.",code:3},RESUBSCRIBED:{message:"Resubscribed.",code:4},MISSING_OR_INVALID:{message:"Missing or invalid.",code:5},EXPIRED:{message:"Expired.",code:6},UNKNOWN_TYPE:{message:"Unknown type.",code:7},MISMATCHED_TOPIC:{message:"Mismatched topic.",code:8},NON_CONFORMING_NAMESPACES:{message:"Non conforming namespaces.",code:9}};function aj(e,t){let{message:n,code:r}=a_[e];return{message:t?"".concat(n," ").concat(t):n,code:r}}function aP(e,t){let{message:n,code:r}=aT[e];return{message:t?"".concat(n," ").concat(t):n,code:r}}function a$(e,t){return!!Array.isArray(e)&&(!("u">typeof t)||!e.length||e.every(t))}function aN(e){return Object.getPrototypeOf(e)===Object.prototype&&Object.keys(e).length}function aO(e){return typeof e>"u"}function aM(e,t){return!!(t&&aO(e))||"string"==typeof e&&!!e.trim().length}function aR(e,t){return!!(t&&aO(e))||"number"==typeof e&&!isNaN(e)}function aL(e){return!!(aM(e,!1)&&e.includes(":"))&&2===e.split(":").length}function aD(e){let t=!0;return a$(e)?e.length&&(t=e.every(e=>aM(e,!1))):t=!1,t}function aF(e,t){let n=null;
1return Object.values(e).forEach(e=>{var r;let i;if(n)return;let a=(r="".concat(t,", namespace"),i=null,aD(null==e?void 0:e.methods)?aD(null==e?void 0:e.events)||(i=aP("UNSUPPORTED_EVENTS","".concat(r,", events should be an array of strings or empty array for no events"))):i=aP("UNSUPPORTED_METHODS","".concat(r,", methods should be an array of strings or empty array for no methods")),i);a&&(n=a)}),n}function aU(e,t){let n=null;if(e&&aN(e)){let r,i=aF(e,t);i&&(n=i);let a=(r=null,Object.values(e).forEach(e=>{var n,i;let a;if(r)return;let o=(n=null==e?void 0:e.accounts,i="".concat(t," namespace"),a=null,a$(n)?n.forEach(e=>{a||function(e){if(aM(e,!1)&&e.includes(":")){let t=e.split(":");if(3===t.length){let e=t[0]+":"+t[1];return!!t[2]&&aL(e)}}return!1}(e)||(a=aP("UNSUPPORTED_ACCOUNTS","".concat(i,", account ").concat(e,' should be a string and conform to "namespace:chainId:address" format')))}):a=aP("UNSUPPORTED_ACCOUNTS","".concat(i,', accounts should be an array of strings conforming to "namespace:chainId:address" format')),a);o&&(r=o)}),r);a&&(n=a)}else n=aj("MISSING_OR_INVALID","".concat(t,", namespaces should be an object with data"));return n}function aB(e){return aM(e.protocol,!0)}function az(e){return"u">typeof e}function aW(e,t){return!(!aL(t)||!(function(e){let t=[];return Object.values(e).forEach(e=>{t.push(...aE(e.accounts))}),t})(e).includes(t))}function aq(e,t,n){let r=null,i=function(e){let t={};return Object.keys(e).forEach(n=>{var r;n.includes(":")?t[n]=e[n]:null==(r=e[n].chains)||r.forEach(r=>{t[r]={methods:e[n].methods,events:e[n].events}})}),t}(e),a=function(e){let t={};return Object.keys(e).forEach(n=>{if(n.includes(":"))t[n]=e[n];else{let r=aE(e[n].accounts);null==r||r.forEach(r=>{t[r]={accounts:e[n].accounts.filter(e=>e.includes("".concat(r,":"))),methods:e[n].methods,events:e[n].events}})}}),t}(t),o=Object.keys(i),s=Object.keys(a),l=aH(Object.keys(e)),c=aH(Object.keys(t)),d=l.filter(e=>!c.includes(e));return d.length&&(r=aj("NON_CONFORMING_NAMESPACES","".concat(n," namespaces keys don't satisfy requiredNamespaces.\n      Required: ").concat(d.toString(),"\n      Received: ").concat(Object.keys(t).toString()))),th(o,s)||(r=aj("NON_CONFORMING_NAMESPACES","".concat(n," namespaces chains don't satisfy required namespaces.\n      Required: ").concat(o.toString(),"\n      Approved: ").concat(s.toString()))),Object.keys(t).forEach(e=>{if(!e.includes(":")||r)return;let i=aE(t[e].accounts);i.includes(e)||(r=aj("NON_CONFORMING_NAMESPACES","".concat(n," namespaces accounts don't satisfy namespace accounts for ").concat(e,"\n        Required: ").concat(e,"\n        Approved: ").concat(i.toString())))}),o.forEach(e=>{r||(th(i[e].methods,a[e].methods)?th(i[e].events,a[e].events)||(r=aj("NON_CONFORMING_NAMESPACES","".concat(n," namespaces events don't satisfy namespace events for ").concat(e))):r=aj("NON_CONFORMING_NAMESPACES","".concat(n," namespaces methods don't satisfy namespace methods for ").concat(e)))}),r}function aH(e){return[...new Set(e.map(e=>e.includes(":")?e.split(":")[0]:e))]}function aV(){let e=tl();return new Promise(t=>{switch(e){case ti.browser:var n;t(ts()&&(null==(n=navigator)?void 0:n.onLine));break;case ti.reactNative:t(aG());break;case ti.node:default:t(!0)}})}async function aG(){if(to()&&null!=e.g&&e.g.NetInfo){let t=await (null==e.g?void 0:e.g.NetInfo.fetch());return null==t?void 0:t.isConnected}return!0}let aK={};class aY{static get(e){return aK[e]}static set(e,t){aK[e]=t}static delete(e){delete aK[e]}}function aZ(e){return new Uint8Array(e.replace(/^0x/,"").match(/.{1,2}/g).map(e=>parseInt(e,16)))}var aJ=e.i(180476),aQ=e.i(499276),aX=e.i(278662),a0=e.i(241370);e.i(826606);var a1=e.i(81775),a2=Object.defineProperty,a3=(e,t,n)=>((e,t,n)=>t in e?a2(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n);class a5 extends a1.IEvents{constructor(e){super(),this.opts=e,a3(this,"protocol","wc"),a3(this,"version",2)}}var a4=Object.defineProperty;class a6 extends a1.IEvents{constructor(e,t){super(),this.core=e,this.logger=t,((e,t,n)=>((e,t,n)=>t in e?a4(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n))(this,"records",new Map)}}class a8{constructor(e,t){this.logger=e,this.core=t}}class a9 extends a1.IEvents{constructor(e,t){super(),this.relayer=e,this.logger=t}}class a7 extends a1.IEvents{constructor(e){super()}}class oe{constructor(e,t,n,r){this.core=e,this.logger=t,this.name=n}}class ot extends a1.IEvents{constructor(e,t){super(),this.relayer=e,this.logger=t}}class on extends a1.IEvents{constructor(e,t){super(),this.core=e,this.logger=t}}class or{constructor(e,t,n){this.core=e,this.logger=t,this.store=n}}class oi{constructor(e,t){this.projectId=e,this.logger=t}}class oa{constructor(e,t,n){this.core=e,this.logger=t,this.telemetryEnabled=n}}var oo=Object.defineProperty,os=(e,t,n)=>((e,t,n)=>t in e?oo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n);F.default;class ol{constructor(e){this.opts=e,os(this,"protocol","wc"),os(this,"version",2)}}F.EventEmitter;class oc{constructor(e){this.client=e}}var od=e.i(31794),ou=e.i(501365);e.i(424047);var oh=e.i(329193),op=e.i(850967),of=e.i(112324);let og="core",om="".concat("wc","@2:").concat(og,":"),oy={logger:"error"},ov={database:":memory:"},ob="client_ed25519_seed",ow=z.ONE_DAY,ox=z.SIX_HOURS,oC="wss://relay.walletconnect.org",oE={message:"relayer_message",message_ack:"relayer_message_ack",connect:"relayer_connect",disconnect:"relayer_disconnect",error:"relayer_error",connection_stalled:"relayer_connection_stalled",publish:"relayer_publish"},ok={payload:"payload",connect:"connect",disconnect:"disconnect",error:"error"},oS="2.21.7",oI={link_mode:"link_mode",relay:"relay"}
1,oA={inbound:"inbound",outbound:"outbound"},oT="WALLETCONNECT_LINK_MODE_APPS",o_={created:"subscription_created",deleted:"subscription_deleted",sync:"subscription_sync",resubscribed:"subscription_resubscribed"},oj=(z.THIRTY_DAYS,z.FIVE_SECONDS,z.THIRTY_DAYS,{wc_pairingDelete:{req:{ttl:z.ONE_DAY,prompt:!1,tag:1e3},res:{ttl:z.ONE_DAY,prompt:!1,tag:1001}},wc_pairingPing:{req:{ttl:z.THIRTY_SECONDS,prompt:!1,tag:1002},res:{ttl:z.THIRTY_SECONDS,prompt:!1,tag:1003}},unregistered_method:{req:{ttl:z.ONE_DAY,prompt:!1,tag:0},res:{ttl:z.ONE_DAY,prompt:!1,tag:0}}}),oP={create:"pairing_create",expire:"pairing_expire",delete:"pairing_delete",ping:"pairing_ping"},o$={created:"history_created",updated:"history_updated",deleted:"history_deleted",sync:"history_sync"},oN={created:"expirer_created",deleted:"expirer_deleted",expired:"expirer_expired",sync:"expirer_sync"},oO=(z.ONE_DAY,"https://verify.walletconnect.org"),oM="".concat(oO,"/v3"),oR=["https://verify.walletconnect.com",oO],oL={pairing_started:"pairing_started",pairing_uri_validation_success:"pairing_uri_validation_success",pairing_uri_not_expired:"pairing_uri_not_expired",store_new_pairing:"store_new_pairing",subscribing_pairing_topic:"subscribing_pairing_topic",subscribe_pairing_topic_success:"subscribe_pairing_topic_success",existing_pairing:"existing_pairing",pairing_not_expired:"pairing_not_expired",emit_inactive_pairing:"emit_inactive_pairing",emit_session_proposal:"emit_session_proposal"},oD={no_internet_connection:"no_internet_connection",malformed_pairing_uri:"malformed_pairing_uri",active_pairing_already_exists:"active_pairing_already_exists",subscribe_pairing_topic_failure:"subscribe_pairing_topic_failure",pairing_expired:"pairing_expired",proposal_listener_not_found:"proposal_listener_not_found"},oF={session_approve_started:"session_approve_started",session_namespaces_validation_success:"session_namespaces_validation_success",subscribing_session_topic:"subscribing_session_topic",subscribe_session_topic_success:"subscribe_session_topic_success",session_approve_publish_success:"session_approve_publish_success",store_session:"store_session"},oU={no_internet_connection:"no_internet_connection",proposal_expired:"proposal_expired",subscribe_session_topic_failure:"subscribe_session_topic_failure",session_approve_namespace_validation_failure:"session_approve_namespace_validation_failure",proposal_not_found:"proposal_not_found"},oB={authenticated_session_approve_started:"authenticated_session_approve_started",create_authenticated_session_topic:"create_authenticated_session_topic",cacaos_verified:"cacaos_verified",store_authenticated_session:"store_authenticated_session",subscribing_authenticated_session_topic:"subscribing_authenticated_session_topic",subscribe_authenticated_session_topic_success:"subscribe_authenticated_session_topic_success",publishing_authenticated_session_approve:"publishing_authenticated_session_approve"},oz={no_internet_connection:"no_internet_connection",invalid_cacao:"invalid_cacao",subscribe_authenticated_session_topic_failure:"subscribe_authenticated_session_topic_failure",authenticated_session_approve_publish_failure:"authenticated_session_approve_publish_failure",authenticated_session_pending_request_not_found:"authenticated_session_pending_request_not_found"};var oW=function(e,t){if(e.length>=255)throw TypeError("Alphabet too long");for(var n=new Uint8Array(256),r=0;r<n.length;r++)n[r]=255;for(var i=0;i<e.length;i++){var a=e.charAt(i),o=a.charCodeAt(0);if(255!==n[o])throw TypeError(a+" is ambiguous");n[o]=i}var s=e.length,l=e.charAt(0),c=Math.log(s)/Math.log(256),d=Math.log(256)/Math.log(s);function u(e){if("string"!=typeof e)throw TypeError("Expected String");if(0===e.length)return new Uint8Array;var t=0;if(" "!==e[0]){for(var r=0,i=0;e[t]===l;)r++,t++;for(var a=(e.length-t)*c+1>>>0,o=new Uint8Array(a);e[t];){var d=n[e.charCodeAt(t)];if(255===d)return;for(var u=0,h=a-1;(0!==d||u<i)&&-1!==h;h--,u++)d+=s*o[h]>>>0,o[h]=d%256>>>0,d=d/256>>>0;if(0!==d)throw Error("Non-zero carry");i=u,t++}if(" "!==e[t]){for(var p=a-i;p!==a&&0===o[p];)p++;for(var f=new Uint8Array(r+(a-p)),g=r;p!==a;)f[g++]=o[p++];return f}}}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw TypeError("Expected Uint8Array");if(0===t.length)return"";for(var n=0,r=0,i=0,a=t.length;i!==a&&0===t[i];)i++,n++;for(var o=(a-i)*d+1>>>0,c=new Uint8Array(o);i!==a;){for(var u=t[i],h=0,p=o-1;(0!==u||h<r)&&-1!==p;p--,h++)u+=256*c[p]>>>0,c[p]=u%s>>>0,u=u/s>>>0;if(0!==u)throw Error("Non-zero carry");r=h,i++}for(var f=o-r;f!==o&&0===c[f];)f++;for(var g=l.repeat(n);f<o;++f)g+=e.charAt(c[f]);return g},decodeUnsafe:u,decode:function(e){var n=u(e);if(n)return n;throw Error("Non-".concat(t," character"))}}};let oq=e=>{if(e instanceof Uint8Array&&"Uint8Array"===e.constructor.name)return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw Error("Unknown type, must be binary type")};class oH{encode(e){if(e instanceof Uint8Array)return"".concat(this.prefix).concat(this.baseEncode(e));throw Error("Unknown type, must be binary type")}constructor(e,t,n){this.name=e,this.prefix=t,this.baseEncode=n}}class oV{decode(e){if("string"==typeof e){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error("Unable to decode multibase string ".concat(JSON.stringify(e),", ").concat(this.name," decoder only supports input
1s prefixed with ").concat(this.prefix));return this.baseDecode(e.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(e){return oK(this,e)}constructor(e,t,n){if(this.name=e,this.prefix=t,void 0===t.codePointAt(0))throw Error("Invalid prefix character");this.prefixCodePoint=t.codePointAt(0),this.baseDecode=n}}class oG{or(e){return oK(this,e)}decode(e){let t=e[0],n=this.decoders[t];if(n)return n.decode(e);throw RangeError("Unable to decode multibase string ".concat(JSON.stringify(e),", only inputs prefixed with ").concat(Object.keys(this.decoders)," are supported"))}constructor(e){this.decoders=e}}let oK=(e,t)=>new oG({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class oY{encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}constructor(e,t,n,r){this.name=e,this.prefix=t,this.baseEncode=n,this.baseDecode=r,this.encoder=new oH(e,t,n),this.decoder=new oV(e,t,r)}}let oZ=e=>{let{name:t,prefix:n,encode:r,decode:i}=e;return new oY(t,n,r,i)},oJ=e=>{let{prefix:t,name:n,alphabet:r}=e,{encode:i,decode:a}=oW(r,n);return oZ({prefix:t,name:n,encode:i,decode:e=>oq(a(e))})},oQ=e=>{let{name:t,prefix:n,bitsPerChar:r,alphabet:i}=e;return oZ({prefix:n,name:t,encode:e=>((e,t,n)=>{let r="="===t[t.length-1],i=(1<<n)-1,a="",o=0,s=0;for(let r=0;r<e.length;++r)for(s=s<<8|e[r],o+=8;o>n;)o-=n,a+=t[i&s>>o];if(o&&(a+=t[i&s<<n-o]),r)for(;a.length*n&7;)a+="=";return a})(e,i,r),decode:e=>((e,t,n,r)=>{let i={};for(let e=0;e<t.length;++e)i[t[e]]=e;let a=e.length;for(;"="===e[a-1];)--a;let o=new Uint8Array(a*n/8|0),s=0,l=0,c=0;for(let t=0;t<a;++t){let a=i[e[t]];if(void 0===a)throw SyntaxError("Non-".concat(r," character"));l=l<<n|a,(s+=n)>=8&&(s-=8,o[c++]=255&l>>s)}if(s>=n||255&l<<8-s)throw SyntaxError("Unexpected end of data");return o})(e,i,r,t)})};var oX=Object.freeze({__proto__:null,identity:oZ({prefix:"\0",name:"identity",encode:e=>new TextDecoder().decode(e),decode:e=>new TextEncoder().encode(e)})}),o0=Object.freeze({__proto__:null,base2:oQ({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1})}),o1=Object.freeze({__proto__:null,base8:oQ({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3})}),o2=Object.freeze({__proto__:null,base10:oJ({prefix:"9",name:"base10",alphabet:"0123456789"})}),o3=Object.freeze({__proto__:null,base16:oQ({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),base16upper:oQ({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4})});let o5=oQ({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),o4=oQ({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),o6=oQ({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),o8=oQ({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),o9=oQ({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),o7=oQ({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),se=oQ({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5});var st=Object.freeze({__proto__:null,base32:o5,base32upper:o4,base32pad:o6,base32padupper:o8,base32hex:o9,base32hexupper:o7,base32hexpad:se,base32hexpadupper:oQ({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),base32z:oQ({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5})}),sn=Object.freeze({__proto__:null,base36:oJ({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),base36upper:oJ({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"})}),sr=Object.freeze({__proto__:null,base58btc:oJ({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),base58flickr:oJ({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"})});let si=oQ({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
1+/",bitsPerChar:6}),sa=oQ({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6});var so=Object.freeze({__proto__:null,base64:si,base64pad:sa,base64url:oQ({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),base64urlpad:oQ({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6})});let ss=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),sl=ss.reduce((e,t,n)=>(e[n]=t,e),[]),sc=ss.reduce((e,t,n)=>(e[t.codePointAt(0)]=n,e),[]);var sd=Object.freeze({__proto__:null,base256emoji:oZ({prefix:"🚀",name:"base256emoji",encode:function(e){return e.reduce((e,t)=>e+=sl[t],"")},decode:function(e){let t=[];for(let n of e){let e=sc[n.codePointAt(0)];if(void 0===e)throw Error("Non-base256emoji character: ".concat(n));t.push(e)}return new Uint8Array(t)}})});function su(e,t,n){t=t||[],n=n||0;for(var r=n;e>=0x80000000;)t[n++]=255&e|128,e/=128;for(;-128&e;)t[n++]=255&e|128,e>>>=7;return t[n]=0|e,su.bytes=n-r+1,t}var sh={encode:su,encodingLength:function(e){return e<128?1:e<16384?2:e<2097152?3:e<0x10000000?4:e<0x800000000?5:e<0x40000000000?6:e<0x2000000000000?7:e<0x100000000000000?8:e<0x8000000000000000?9:10}};let sp=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return sh.encode(e,t,n),t},sf=e=>sh.encodingLength(e),sg=(e,t)=>{let n=t.byteLength,r=sf(e),i=r+sf(n),a=new Uint8Array(i+n);return sp(e,a,0),sp(n,a,r),a.set(t,i),new sm(e,n,t,a)};class sm{constructor(e,t,n,r){this.code=e,this.size=t,this.digest=n,this.bytes=r}}let sy=e=>{let{name:t,code:n,encode:r}=e;return new sv(t,n,r)};class sv{digest(e){if(e instanceof Uint8Array){let t=this.encode(e);return t instanceof Uint8Array?sg(this.code,t):t.then(e=>sg(this.code,e))}throw Error("Unknown type, must be binary type")}constructor(e,t,n){this.name=e,this.code=t,this.encode=n}}let sb=e=>async t=>new Uint8Array(await crypto.subtle.digest(e,t));var sw=Object.freeze({__proto__:null,sha256:sy({name:"sha2-256",code:18,encode:sb("SHA-256")}),sha512:sy({name:"sha2-512",code:19,encode:sb("SHA-512")})}),sx=Object.freeze({__proto__:null,identity:{code:0,name:"identity",encode:oq,digest:e=>sg(0,oq(e))}});new TextEncoder,new TextDecoder;let sC={...oX,...o0,...o1,...o2,...o3,...st,...sn,...sr,...so,...sd};function sE(e){return null!=globalThis.Buffer?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e}function sk(e,t,n,r){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:n},decoder:{decode:r}}}({...sw,...sx});let sS=sk("utf8","u",e=>"u"+new TextDecoder("utf8").decode(e),e=>new TextEncoder().encode(e.substring(1))),sI=sk("ascii","a",e=>{let t="a";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return t},e=>{let t=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return null!=globalThis.Buffer&&null!=globalThis.Buffer.allocUnsafe?sE(globalThis.Buffer.allocUnsafe(e)):new Uint8Array(e)}((e=e.substring(1)).length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}),sA={utf8:sS,"utf-8":sS,hex:sC.base16,latin1:sI,ascii:sI,binary:sI,...sC};var sT=Object.defineProperty,s_=(e,t,n)=>((e,t,n)=>t in e?sT(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n);
1class sj{get context(){return(0,aX.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}async setKeyChain(e){await this.core.storage.setItem(this.storageKey,tp(e))}async getKeyChain(){let e=await this.core.storage.getItem(this.storageKey);return"u">typeof e?tf(e):void 0}async persist(){await this.setKeyChain(this.keychain)}isInitialized(){if(!this.initialized){let{message:e}=aj("NOT_INITIALIZED",this.name);throw Error(e)}}constructor(e,t){this.core=e,this.logger=t,s_(this,"keychain",new Map),s_(this,"name","keychain"),s_(this,"version","0.3"),s_(this,"initialized",!1),s_(this,"storagePrefix",om),s_(this,"init",async()=>{if(!this.initialized){let e=await this.getKeyChain();"u">typeof e&&(this.keychain=e),this.initialized=!0}}),s_(this,"has",e=>(this.isInitialized(),this.keychain.has(e))),s_(this,"set",async(e,t)=>{this.isInitialized(),this.keychain.set(e,t),await this.persist()}),s_(this,"get",e=>{this.isInitialized();let t=this.keychain.get(e);if(typeof t>"u"){let{message:t}=aj("NO_MATCHING_KEY","".concat(this.name,": ").concat(e));throw Error(t)}return t}),s_(this,"del",async e=>{this.isInitialized(),this.keychain.delete(e),await this.persist()}),this.core=e,this.logger=(0,aX.generateChildLogger)(t,this.name)}}var sP=Object.defineProperty,s$=(e,t,n)=>((e,t,n)=>t in e?sP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n);class sN{get context(){return(0,aX.getLoggerContext)(this.logger)}async setPrivateKey(e,t){return await this.keychain.set(e,t),e}getPrivateKey(e){return this.keychain.get(e)}async getClientSeed(){let e="";try{e=this.keychain.get(ob)}catch(t){e=i9(),await this.keychain.set(ob,e)}return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"utf8",n=sA[t];if(!n)throw Error('Unsupported encoding "'.concat(t,'"'));return("utf8"===t||"utf-8"===t)&&null!=globalThis.Buffer&&null!=globalThis.Buffer.from?sE(globalThis.Buffer.from(e,"utf-8")):n.decoder.decode("".concat(n.prefix).concat(e))}(e,"base16")}getSymKey(e){return this.keychain.get(e)}isInitialized(){if(!this.initialized){let{message:e}=aj("NOT_INITIALIZED",this.name);throw Error(e)}}constructor(e,t,n){this.core=e,this.logger=t,s$(this,"name","crypto"),s$(this,"keychain"),s$(this,"randomSessionIdentifier",i9()),s$(this,"initialized",!1),s$(this,"init",async()=>{this.initialized||(await this.keychain.init(),this.initialized=!0)}),s$(this,"hasKeys",e=>(this.isInitialized(),this.keychain.has(e))),s$(this,"getClientId",async()=>{this.isInitialized();let e=await this.getClientSeed(),t=eW.generateKeyPair(e);return eW.encodeIss(t.publicKey)}),s$(this,"generateKeyPair",()=>{this.isInitialized();let e=function(){let e=iF.utils.randomPrivateKey(),t=iF.getPublicKey(e);return{privateKey:eX(e,i5),publicKey:eX(t,i5)}}();return this.setPrivateKey(e.publicKey,e.privateKey)}),s$(this,"signJWT",async e=>{this.isInitialized();let t=await this.getClientSeed(),n=eW.generateKeyPair(t),r=this.randomSessionIdentifier;return await eW.signJWT(r,e,ow,n)}),s$(this,"generateSharedKey",(e,t,n)=>{this.isInitialized();let r=function(e,t){var n;let r,i=iF.getSharedSecret(eQ(e,i5),eQ(t,i5));return eX((r=void 0,function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:32;tJ(e),tY(r);let i=e.outputLen;if(r>255*i)throw Error("Length should be <= 255*HashLen");let a=Math.ceil(r/i);void 0===n&&(n=rG);let o=new Uint8Array(a*i),s=rH.create(e,t),l=s._cloneInto(),c=new Uint8Array(s.outputLen);for(let e=0;e<a;e++)rV[0]=e+1,l.update(0===e?rG:c).update(n).update(rV).digestInto(c),o.set(c,i*e),s._cloneInto(l);return s.destroy(),l.destroy(),t1(c,rV),o.slice(0,r)}(nB,(n=void 0,tJ(nB),void 0===n&&(n=new Uint8Array(nB.outputLen)),rH(nB,ni(n),ni(i))),r,32)),i5)}(this.getPrivateKey(e),t);return this.setSymKey(r,n)}),s$(this,"setSymKey",async(e,t)=>{this.isInitialized();let n=t||i7(e);return await this.keychain.set(n,e),n}),s$(this,"deleteKeyPair",async e=>{this.isInitialized(),await this.keychain.del(e)}),s$(this,"deleteSymKey",async e=>{this.isInitialized(),await this.keychain.del(e)}),s$(this,"encode",async(e,t,n)=>{this.isInitialized();let r=as(n),i=(0,od.safeJsonStringify)(t);if(2===r.type)return function(e,t){let n=at(2),r=nl(12),i=aa({type:n,sealed:eQ(e,i8),iv:r});return t===i6?ar(i):i}(i,null==n?void 0:n.encoding);
1if(al(r)){let t=r.senderPublicKey,n=r.receiverPublicKey;e=await this.generateSharedKey(t,n)}let a=this.getSymKey(e),{type:o,senderPublicKey:s}=r;return function(e){let t=at("u">typeof e.type?e.type:0);if(1===an(t)&&typeof e.senderPublicKey>"u")throw Error("Missing sender public key for type 1 envelope");let n="u">typeof e.senderPublicKey?eQ(e.senderPublicKey,i5):void 0,r="u">typeof e.iv?eQ(e.iv,i5):nl(12),i=aa({type:t,sealed:rW(eQ(e.symKey,i5),r).encrypt(eQ(e.message,i8)),iv:r,senderPublicKey:n});return e.encoding===i6?ar(i):i}({type:o,symKey:a,message:i,senderPublicKey:s,encoding:null==n?void 0:n.encoding})}),s$(this,"decode",async(e,t,n)=>{this.isInitialized();let r=function(e,t){let n=ao({encoded:e,encoding:null==t?void 0:t.encoding});return as({type:an(n.type),senderPublicKey:"u">typeof n.senderPublicKey?eX(n.senderPublicKey,i5):void 0,receiverPublicKey:null==t?void 0:t.receiverPublicKey})}(t,n);if(2===r.type){let e=function(e,t){let{sealed:n}=ao({encoded:e,encoding:t});return eX(n,i8)}(t,null==n?void 0:n.encoding);return(0,od.safeJsonParse)(e)}if(al(r)){let t=r.receiverPublicKey,n=r.senderPublicKey;e=await this.generateSharedKey(t,n)}try{let r=this.getSymKey(e),i=function(e){let t=eQ(e.symKey,i5),{sealed:n,iv:r}=ao({encoded:e.encoded,encoding:e.encoding}),i=rW(t,r).decrypt(n);if(null===i)throw Error("Failed to decrypt");return eX(i,i8)}({symKey:r,encoded:t,encoding:null==n?void 0:n.encoding});return(0,od.safeJsonParse)(i)}catch(t){this.logger.error("Failed to decode message from topic: '".concat(e,"', clientId: '").concat(await this.getClientId(),"'")),this.logger.error(t)}}),s$(this,"getPayloadType",function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i4;return an(ao({encoded:e,encoding:t}).type)}),s$(this,"getPayloadSenderPublicKey",function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i4,n=ao({encoded:e,encoding:t});return n.senderPublicKey?eX(n.senderPublicKey,i5):void 0}),this.core=e,this.logger=(0,aX.generateChildLogger)(t,this.name),this.keychain=n||new sj(this.core,this.logger)}}var sO=Object.defineProperty,sM=Object.defineProperties,sR=Object.getOwnPropertyDescriptors,sL=Object.getOwnPropertySymbols,sD=Object.prototype.hasOwnProperty,sF=Object.prototype.propertyIsEnumerable,sU=(e,t,n)=>t in e?sO(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,sB=(e,t,n)=>sU(e,"symbol"!=typeof t?t+"":t,n);class sz extends a8{get context(){return(0,aX.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get storageKeyWithoutClientAck(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name+"_withoutClientAck"}async setRelayerMessages(e){await this.core.storage.setItem(this.storageKey,tp(e))}async setRelayerMessagesWithoutClientAck(e){await this.core.storage.setItem(this.storageKeyWithoutClientAck,tp(e))}async getRelayerMessages(){let e=await this.core.storage.getItem(this.storageKey);return"u">typeof e?tf(e):void 0}async getRelayerMessagesWithoutClientAck(){let e=await this.core.storage.getItem(this.storageKeyWithoutClientAck);return"u">typeof e?tf(e):void 0}async persist(){await this.setRelayerMessages(this.messages),await this.setRelayerMessagesWithoutClientAck(this.messagesWithoutClientAck)}isInitialized(){if(!this.initialized){let{message:e}=aj("NOT_INITIALIZED",this.name);throw Error(e)}}constructor(e,t){super(e,t),this.logger=e,this.core=t,sB(this,"messages",new Map),sB(this,"messagesWithoutClientAck",new Map),sB(this,"name","messages"),sB(this,"version","0.3"),sB(this,"initialized",!1),sB(this,"storagePrefix",om),sB(this,"init",async()=>{if(!this.initialized){this.logger.trace("Initialized");try{let e=await this.getRelayerMessages();"u">typeof e&&(this.messages=e);let t=await this.getRelayerMessagesWithoutClientAck();"u">typeof t&&(this.messagesWithoutClientAck=t),this.logger.debug("Successfully Restored records for ".concat(this.name)),this.logger.trace({type:"method",method:"restore",size:this.messages.size})}catch(e){this.logger.debug("Failed to Restore records for ".concat(this.name)),this.logger.error(e)}finally{this.initialized=!0}}}),sB(this,"set",async(e,t,n)=>{this.isInitialized();let r=ae(t),i=this.messages.get(e);if(typeof i>"u"&&(i={}),"u">typeof i[r])return r;if(i[r]=t,this.messages.set(e,i),n===oA.inbound){let n=this.messagesWithoutClientAck.get(e)||{};this.messagesWithoutClientAck.set(e,sM(((e,t)=>{for(var n in t||(t={}))sD.call(t,n)&&sU(e,n,t[n]);if(sL)for(var n of sL(t))sF.call(t,n)&&sU(e,n,t[n]);return e})({},n),sR({[r]:t})))}return await this.persist(),r}),sB(this,"get",e=>{this.isInitialized();let t=this.messages.get(e);return typeof t>"u"&&(t={}),t}),sB(this,"getWithoutAck",e=>{this.isInitialized();let t={};for(let n of e){let e=this.messagesWithoutClientAck.get(n)||{};t[n]=Object.values(e)}return t}),sB(this,"has",(e,t)=>(this.isInitialized(),"u">typeof this.get(e)[ae(t)])),sB(this,"ack",async(e,t)=>{this.isInitialized();let n=this.messagesWithoutClientAck.get(e);if(typeof n>"u")return;let r=ae(t);delete n[r],0===Object.keys(n).length?this.messagesWithoutClientAck.delete(e):this.messagesWithoutClientAck.set(e,n),await this.persist()}),sB(this,"del",async e=>{this.isInitialized(),this.messages.delete(e),this.messagesWithoutClientAck.delete(e),await this.persist()}),this.logger=(0,aX.generateChildLogger)(e,this.name),this.core=t}}var sW=Object.defineProperty,sq=Object.defineProperties,sH=Object.getOwnPropertyDescriptors,sV=Object.getOwnPropertySymbols,sG=Object.prototype.hasOwnProperty,sK=Object.prototype.propertyIsEnumerable,sY=(e,t,n)=>t in e?sW(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,sZ=(e,t)=>{for(var n in t||(t={}))sG.call(t,n)&&sY(e,n,t[n]);if(sV)for(var n of sV(t))sK.call(t,n)&&sY(e,n,t[n]);return e},sJ=(e,t)=>sq(e,sH(t)),sQ=(e,t,n)=>sY(e,"symbol"!=typeof t?t+"":t,n);
1class sX extends a9{get context(){return(0,aX.getLoggerContext)(this.logger)}async rpcPublish(e,t){this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"message",direction:"outgoing",request:e});let n=await this.relayer.request(e);return this.relayer.events.emit(oE.publish,sZ(sZ({},e),t)),this.logger.debug("Successfully Published Payload"),n}removeRequestFromQueue(e){this.queue.delete(e)}checkQueue(){this.queue.forEach(async(e,t)=>{var n;let r=e.attempt+1;this.queue.set(t,sJ(sZ({},e),{attempt:r})),this.logger.warn({},"Publisher: queue->publishing: ".concat(e.request.id,", tag: ").concat(null==(n=e.request.params)?void 0:n.tag,", attempt: ").concat(r)),await this.rpcPublish(e.request,e.opts),this.logger.warn({},"Publisher: queue->published: ".concat(e.request.id))})}registerEventListeners(){this.relayer.core.heartbeat.on(aJ.HEARTBEAT_EVENTS.pulse,()=>{if(this.needsTransportRestart){this.needsTransportRestart=!1,this.relayer.events.emit(oE.connection_stalled);return}this.checkQueue()}),this.relayer.on(oE.message_ack,e=>{this.removeRequestFromQueue(e.id.toString())})}constructor(e,t){super(e,t),this.relayer=e,this.logger=t,sQ(this,"events",new F.EventEmitter),sQ(this,"name","publisher"),sQ(this,"queue",new Map),sQ(this,"publishTimeout",(0,z.toMiliseconds)(z.ONE_MINUTE)),sQ(this,"initialPublishTimeout",(0,z.toMiliseconds)(15*z.ONE_SECOND)),sQ(this,"needsTransportRestart",!1),sQ(this,"publish",async(e,t,n)=>{var r,i,a,o,s;this.logger.debug("Publishing Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:e,message:t,opts:n}});let l=(null==n?void 0:n.ttl)||ox,c=(null==n?void 0:n.prompt)||!1,d=(null==n?void 0:n.tag)||0,u=(null==n?void 0:n.id)||(0,oh.getBigIntRpcId)().toString(),h=ad(ac().protocol),p={id:u,method:(null==n?void 0:n.publishMethod)||h.publish,params:sZ({topic:e,message:t,ttl:l,prompt:c,tag:d,attestation:null==n?void 0:n.attestation},(null==n?void 0:n.tvf)&&{tvf:n.tvf})},f="Failed to publish payload, please try again. id:".concat(u," tag:").concat(d);try{aO(null==(r=p.params)?void 0:r.prompt)&&(null==(i=p.params)||delete i.prompt),aO(null==(a=p.params)?void 0:a.tag)&&(null==(o=p.params)||delete o.tag);let s=new Promise(async e=>{let t=n=>{var r;let{id:i}=n;(null==(r=p.id)?void 0:r.toString())===i.toString()&&(this.removeRequestFromQueue(i),this.relayer.events.removeListener(oE.publish,t),e())};this.relayer.events.on(oE.publish,t);let r=tm(new Promise((e,t)=>{this.rpcPublish(p,n).then(e).catch(e=>{this.logger.warn(e,null==e?void 0:e.message),t(e)})}),this.initialPublishTimeout,"Failed initial publish, retrying.... id:".concat(u," tag:").concat(d));try{await r,this.events.removeListener(oE.publish,t)}catch(e){this.queue.set(u,{request:p,opts:n,attempt:1}),this.logger.warn(e,null==e?void 0:e.message)}});this.logger.trace({type:"method",method:"publish",params:{id:u,topic:e,message:t,opts:n}}),await tm(s,this.publishTimeout,f)}catch(e){if(this.logger.debug("Failed to Publish Payload"),this.logger.error(e),null!=(s=null==n?void 0:n.internal)&&s.throwOnFailedPublish)throw e}finally{this.queue.delete(u)}}),sQ(this,"publishCustom",async e=>{var t,n,r,i,a;this.logger.debug("Publishing custom payload"),this.logger.trace({type:"method",method:"publishCustom",params:e});let{payload:o,opts:s={}}=e,{attestation:l,tvf:c,publishMethod:d,prompt:u,tag:h,ttl:p=z.FIVE_MINUTES}=s,f=s.id||(0,oh.getBigIntRpcId)().toString(),g=ad(ac().protocol),m=d||g.publish,y={id:f,method:m,params:sZ(sJ(sZ({},o),{ttl:p,prompt:u,tag:h,attestation:l}),c)},b="Failed to publish custom payload, please try again. id:".concat(f," tag:").concat(h);try{aO(null==(t=y.params)?void 0:t.prompt)&&(null==(n=y.params)||delete n.prompt),aO(null==(r=y.params)?void 0:r.tag)&&(null==(i=y.params)||delete i.tag);let e=new Promise(async e=>{let t=n=>{var r;let{id:i}=n;(null==(r=y.id)?void 0:r.toString())===i.toString()&&(this.removeRequestFromQueue(i),this.relayer.events.removeListener(oE.publish,t),e())};this.relayer.events.on(oE.publish,t);let n=tm(new Promise((e,t)=>{this.rpcPublish(y,s).then(e).catch(e=>{this.logger.warn(e,null==e?void 0:e.message),t(e)})}),this.initialPublishTimeout,"Failed initial custom payload publish, retrying.... method:".concat(m," id:").concat(f," tag:").concat(h));try{await n,this.events.removeListener(oE.publish,t)}catch(e){this.queue.set(f,{request:y,opts:s,attempt:1}),this.logger.warn(e,null==e?void 0:e.message)}});this.logger.trace({type:"method",method:"publish",params:{id:f,payload:o,opts:s}}),await tm(e,this.publishTimeout,b)}catch(e){if(this.logger.debug("Failed to Publish Payload"),this.logger.error(e),null!=(a=null==s?void 0:s.internal)&&a.throwOnFailedPublish)throw e}finally{this.queue.delete(f)}}),sQ(this,"on",(e,t)=>{this.events.on(e,t)}),sQ(this,"once",(e,t)=>{this.events.once(e,t)}),sQ(this,"off",(e,t)=>{this.events.off(e,t)}),sQ(this,"removeListener",(e,t)=>{this.events.removeListener(e,t)}),this.relayer=e,this.logger=(0,aX.generateChildLogger)(t,this.name),this.registerEventListeners()}}var s0=Object.defineProperty,s1=(e,t,n)=>((e,t,n)=>t in e?s0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n);
1class s2{get topics(){return Array.from(this.map.keys())}constructor(){s1(this,"map",new Map),s1(this,"set",(e,t)=>{let n=this.get(e);this.exists(e,t)||this.map.set(e,[...n,t])}),s1(this,"get",e=>this.map.get(e)||[]),s1(this,"exists",(e,t)=>this.get(e).includes(t)),s1(this,"delete",(e,t)=>{if(typeof t>"u")return void this.map.delete(e);if(!this.map.has(e))return;let n=this.get(e);if(!this.exists(e,t))return;let r=n.filter(e=>e!==t);if(!r.length)return void this.map.delete(e);this.map.set(e,r)}),s1(this,"clear",()=>{this.map.clear()})}}var s3=Object.defineProperty,s5=Object.defineProperties,s4=Object.getOwnPropertyDescriptors,s6=Object.getOwnPropertySymbols,s8=Object.prototype.hasOwnProperty,s9=Object.prototype.propertyIsEnumerable,s7=(e,t,n)=>t in e?s3(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,le=(e,t)=>{for(var n in t||(t={}))s8.call(t,n)&&s7(e,n,t[n]);if(s6)for(var n of s6(t))s9.call(t,n)&&s7(e,n,t[n]);return e},lt=(e,t)=>s5(e,s4(t)),ln=(e,t,n)=>s7(e,"symbol"!=typeof t?t+"":t,n);class lr extends ot{get context(){return(0,aX.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.relayer.core.customStoragePrefix+"//"+this.name}get length(){return this.subscriptions.size}get ids(){return Array.from(this.subscriptions.keys())}get values(){return Array.from(this.subscriptions.values())}get topics(){return this.topicMap.topics}get hasAnyTopics(){return this.topicMap.topics.length>0||this.pending.size>0||this.cached.length>0||this.subscriptions.size>0}hasSubscription(e,t){let n=!1;try{n=this.getSubscription(e).topic===t}catch(e){}return n}reset(){this.cached=[],this.initialized=!0}onDisable(){this.values.length>0&&(this.cached=this.values),this.subscriptions.clear(),this.topicMap.clear()}async unsubscribeByTopic(e,t){let n=this.topicMap.get(e);await Promise.all(n.map(async n=>await this.unsubscribeById(e,n,t)))}async unsubscribeById(e,t,n){this.logger.debug("Unsubscribing Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:t,opts:n}});try{let r=ac(n);await this.restartToComplete({topic:e,id:t,relay:r}),await this.rpcUnsubscribe(e,t,r);let i=aP("USER_DISCONNECTED","".concat(this.name,", ").concat(e));await this.onUnsubscribe(e,t,i),this.logger.debug("Successfully Unsubscribed Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:t,opts:n}})}catch(e){throw this.logger.debug("Failed to Unsubscribe Topic"),this.logger.error(e),e}}async rpcSubscribe(e,t,n){var r,i;
1let a=await this.getSubscriptionId(e);if(null!=(r=null==n?void 0:n.internal)&&r.skipSubscribe)return a;n&&(null==n?void 0:n.transportType)!==oI.relay||await this.restartToComplete({topic:e,id:e,relay:t});let o={method:ad(t.protocol).subscribe,params:{topic:e}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:o});let s=null==(i=null==n?void 0:n.internal)?void 0:i.throwOnFailedPublish;try{if((null==n?void 0:n.transportType)===oI.link_mode)return setTimeout(()=>{(this.relayer.connected||this.relayer.connecting)&&this.relayer.request(o).catch(e=>this.logger.warn(e))},(0,z.toMiliseconds)(z.ONE_SECOND)),a;let t=new Promise(async t=>{let n=r=>{r.topic===e&&(this.events.removeListener(o_.created,n),t(r.id))};this.events.on(o_.created,n);try{let r=await tm(new Promise((e,t)=>{this.relayer.request(o).catch(e=>{this.logger.warn(e,null==e?void 0:e.message),t(e)}).then(e)}),this.initialSubscribeTimeout,"Subscribing to ".concat(e," failed, please try again"));this.events.removeListener(o_.created,n),t(r)}catch(e){}}),r=await tm(t,this.subscribeTimeout,"Subscribing to ".concat(e," failed, please try again"));if(!r&&s)throw Error("Subscribing to ".concat(e," failed, please try again"));return r?a:null}catch(e){if(this.logger.debug("Outgoing Relay Subscribe Payload stalled"),this.relayer.events.emit(oE.connection_stalled),s)throw e}return null}async rpcBatchSubscribe(e){if(!e.length)return;let t={method:ad(e[0].relay.protocol).batchSubscribe,params:{topics:e.map(e=>e.topic)}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:t});try{await await tm(new Promise(e=>{this.relayer.request(t).catch(e=>this.logger.warn(e)).then(e)}),this.subscribeTimeout,"rpcBatchSubscribe failed, please try again")}catch(e){this.relayer.events.emit(oE.connection_stalled)}}async rpcBatchFetchMessages(e){let t;if(!e.length)return;let n={method:ad(e[0].relay.protocol).batchFetchMessages,params:{topics:e.map(e=>e.topic)}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:n});try{t=await await tm(new Promise((e,t)=>{this.relayer.request(n).catch(e=>{this.logger.warn(e),t(e)}).then(e)}),this.subscribeTimeout,"rpcBatchFetchMessages failed, please try again")}catch(e){this.relayer.events.emit(oE.connection_stalled)}return t}rpcUnsubscribe(e,t,n){let r={method:ad(n.protocol).unsubscribe,params:{topic:e,id:t}};return this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:r}),this.relayer.request(r)}onSubscribe(e,t){this.setSubscription(e,lt(le({},t),{id:e})),this.pending.delete(t.topic)}onBatchSubscribe(e){e.length&&e.forEach(e=>{this.setSubscription(e.id,le({},e)),this.pending.delete(e.topic)})}async onUnsubscribe(e,t,n){this.events.removeAllListeners(t),this.hasSubscription(t,e)&&this.deleteSubscription(t,n),await this.relayer.messages.del(e)}async setRelayerSubscriptions(e){await this.relayer.core.storage.setItem(this.storageKey,e)}async getRelayerSubscriptions(){return await this.relayer.core.storage.getItem(this.storageKey)}setSubscription(e,t){this.logger.debug("Setting subscription"),this.logger.trace({type:"method",method:"setSubscription",id:e,subscription:t}),this.addSubscription(e,t)}addSubscription(e,t){this.subscriptions.set(e,le({},t)),this.topicMap.set(t.topic,e),this.events.emit(o_.created,t)}getSubscription(e){this.logger.debug("Getting subscription"),this.logger.trace({type:"method",method:"getSubscription",id:e});let t=this.subscriptions.get(e);if(!t){let{message:t}=aj("NO_MATCHING_KEY","".concat(this.name,": ").concat(e));throw Error(t)}return t}deleteSubscription(e,t){this.logger.debug("Deleting subscription"),this.logger.trace({type:"method",method:"deleteSubscription",id:e,reason:t});let n=this.getSubscription(e);this.subscriptions.delete(e),this.topicMap.delete(n.topic,e),this.events.emit(o_.deleted,lt(le({},n),{reason:t}))}async persist(){await this.setRelayerSubscriptions(this.values),this.events.emit(o_.sync)}
1async onRestart(){if(this.cached.length){let e=[...this.cached],t=Math.ceil(this.cached.length/this.batchSubscribeTopicsLimit);for(let n=0;n<t;n++){let t=e.splice(0,this.batchSubscribeTopicsLimit);await this.batchSubscribe(t)}}this.events.emit(o_.resubscribed)}async restore(){try{let e=await this.getRelayerSubscriptions();if(typeof e>"u"||!e.length)return;if(this.subscriptions.size&&!e.every(e=>{var t;return e.topic===(null==(t=this.subscriptions.get(e.id))?void 0:t.topic)})){let{message:e}=aj("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(e),this.logger.error("".concat(this.name,": ").concat(JSON.stringify(this.values))),Error(e)}this.cached=e,this.logger.debug("Successfully Restored subscriptions for ".concat(this.name)),this.logger.trace({type:"method",method:"restore",subscriptions:this.values})}catch(e){this.logger.debug("Failed to Restore subscriptions for ".concat(this.name)),this.logger.error(e)}}async batchSubscribe(e){e.length&&(await this.rpcBatchSubscribe(e),this.onBatchSubscribe(await Promise.all(e.map(async e=>lt(le({}
1,e),{id:await this.getSubscriptionId(e.topic)})))))}async batchFetchMessages(e){var t;if(!e.length)return;this.logger.trace("Fetching batch messages for ".concat(e.length," subscriptions"));let n=await this.rpcBatchFetchMessages(e);n&&n.messages&&(await (t=(0,z.toMiliseconds)(z.ONE_SECOND),new Promise(e=>setTimeout(e,t))),await this.relayer.handleBatchMessageEvents(n.messages))}async onConnect(){await this.restart(),this.reset()}onDisconnect(){this.onDisable()}isInitialized(){if(!this.initialized){let{message:e}=aj("NOT_INITIALIZED",this.name);throw Error(e)}}async restartToComplete(e){this.relayer.connected||this.relayer.connecting||(this.cached.push(e),await this.relayer.transportOpen())}async getClientId(){return this.clientId||(this.clientId=await this.relayer.core.crypto.getClientId()),this.clientId}async getSubscriptionId(e){return ae(e+await this.getClientId())}constructor(e,t){super(e,t),this.relayer=e,this.logger=t,ln(this,"subscriptions",new Map),ln(this,"topicMap",new s2),ln(this,"events",new F.EventEmitter),ln(this,"name","subscription"),ln(this,"version","0.3"),ln(this,"pending",new Map),ln(this,"cached",[]),ln(this,"initialized",!1),ln(this,"storagePrefix",om),ln(this,"subscribeTimeout",(0,z.toMiliseconds)(z.ONE_MINUTE)),ln(this,"initialSubscribeTimeout",(0,z.toMiliseconds)(15*z.ONE_SECOND)),ln(this,"clientId"),ln(this,"batchSubscribeTopicsLimit",500),ln(this,"init",async()=>{this.initialized||(this.logger.trace("Initialized"),this.registerEventListeners(),await this.restore()),this.initialized=!0}),ln(this,"subscribe",async(e,t)=>{var n;this.isInitialized(),this.logger.debug("Subscribing Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:e,opts:t}});try{let r=ac(t),i={topic:e,relay:r,transportType:null==t?void 0:t.transportType};null!=(n=null==t?void 0:t.internal)&&n.skipSubscribe||this.pending.set(e,i);let a=await this.rpcSubscribe(e,r,t);return"string"==typeof a&&(this.onSubscribe(a,i),this.logger.debug("Successfully Subscribed Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:e,opts:t}})),a}catch(e){throw this.logger.debug("Failed to Subscribe Topic"),this.logger.error(e),e}}),ln(this,"unsubscribe",async(e,t)=>{this.isInitialized(),"u">typeof(null==t?void 0:t.id)?await this.unsubscribeById(e,t.id,t):await this.unsubscribeByTopic(e,t)}),ln(this,"isSubscribed",e=>new Promise(t=>{t(this.topicMap.topics.includes(e))})),ln(this,"isKnownTopic",e=>new Promise(t=>{t(this.topicMap.topics.includes(e)||this.pending.has(e)||this.cached.some(t=>t.topic===e))})),ln(this,"on",(e,t)=>{this.events.on(e,t)}),ln(this,"once",(e,t)=>{this.events.once(e,t)}),ln(this,"off",(e,t)=>{this.events.off(e,t)}),ln(this,"removeListener",(e,t)=>{this.events.removeListener(e,t)}),ln(this,"start",async()=>{await this.onConnect()}),ln(this,"stop",async()=>{await this.onDisconnect()}),ln(this,"restart",async()=>{await this.restore(),await this.onRestart()}),ln(this,"checkPending",async()=>{if(0===this.pending.size&&(!this.initialized||!this.relayer.connected))return;let e=[];this.pending.forEach(t=>{e.push(t)}),await this.batchSubscribe(e)}),ln(this,"registerEventListeners",()=>{this.relayer.core.heartbeat.on(aJ.HEARTBEAT_EVENTS.pulse,async()=>{await this.checkPending()}),this.events.on(o_.created,async e=>{let t=o_.created;this.logger.info("Emitting ".concat(t)),this.logger.debug({type:"event",event:t,data:e}),await this.persist()}),this.events.on(o_.deleted,async e=>{let t=o_.deleted;this.logger.info("Emitting ".concat(t)),this.logger.debug({type:"event",event:t,data:e}),await this.persist()})}),this.relayer=e,this.logger=(0,aX.generateChildLogger)(t,this.name),this.clientId=""}}var li=Object.defineProperty,la=Object.getOwnPropertySymbols,lo=Object.prototype.hasOwnProperty,ls=Object.prototype.propertyIsEnumerable,ll=(e,t,n)=>t in e?li(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,lc=(e,t)=>{for(var n in t||(t={}))lo.call(t,n)&&ll(e,n,t[n]);if(la)for(var n of la(t))ls.call(t,n)&&ll(e,n,t[n]);return e},ld=(e,t,n)=>ll(e,"symbol"!=typeof t?t+"":t,n);
1class lu extends a7{async init(){this.logger.trace("Initialized"),this.registerEventListeners(),await Promise.all([this.messages.init(),this.subscriber.init()]),this.initialized=!0,this.transportOpen().catch(e=>this.logger.warn(e,null==e?void 0:e.message))}get context(){return(0,aX.getLoggerContext)(this.logger)}get connected(){var e,t,n;return(null==(n=null==(t=null==(e=this.provider)?void 0:e.connection)?void 0:t.socket)?void 0:n.readyState)===1}get connecting(){var e,t,n;return(null==(n=null==(t=null==(e=this.provider)?void 0:e.connection)?void 0:t.socket)?void 0:n.readyState)===0||void 0!==this.connectPromise}async publish(e,t,n){this.isInitialized(),await this.publisher.publish(e,t,n),await this.recordMessageEvent({topic:e,message:t,publishedAt:Date.now(),transportType:oI.relay},oA.outbound)}async publishCustom(e){this.isInitialized(),await this.publisher.publishCustom(e)}async subscribe(e,t){var n,r,i;this.isInitialized(),null!=t&&t.transportType&&(null==t?void 0:t.transportType)!=="relay"||await this.toEstablishConnection();let a=typeof(null==(n=null==t?void 0:t.internal)?void 0:n.throwOnFailedPublish)>"u"||(null==(r=null==t?void 0:t.internal)?void 0:r.throwOnFailedPublish),o=(null==(i=this.subscriber.topicMap.get(e))?void 0:i[0])||"",s,l=t=>{t.topic===e&&(this.subscriber.off(o_.created,l),s())};return await Promise.all([new Promise(e=>{s=e,this.subscriber.on(o_.created,l)}),new Promise(async(n,r)=>{o=await this.subscriber.subscribe(e,lc({internal:{throwOnFailedPublish:a}},t)).catch(e=>{a&&r(e)})||o,n()})]),o}async unsubscribe(e,t){this.isInitialized(),await this.subscriber.unsubscribe(e,t)}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async transportDisconnect(){this.provider.disconnect&&(this.hasExperiencedNetworkDisruption||this.connected)?await tm(this.provider.disconnect(),2e3,"provider.disconnect()").catch(()=>this.onProviderDisconnect()):this.onProviderDisconnect()}async transportClose(){this.transportExplicitlyClosed=!0,await this.transportDisconnect()}async transportOpen(e){if(!this.subscriber.hasAnyTopics)return void this.logger.info("Starting WS connection skipped because the client has no topics to work with.");if(this.connectPromise?(this.logger.debug({},"Waiting for existing connection attempt to resolve..."),await this.connectPromise,this.logger.debug({},"Existing connection attempt resolved")):(this.connectPromise=new Promise(async(t,n)=>{await this.connect(e).then(t).catch(n).finally(()=>{this.connectPromise=void 0})}),await this.connectPromise),!this.connected)throw Error("Couldn't establish socket connection to the relay server: ".concat(this.relayUrl))}async restartTransport(e){this.logger.debug({},"Restarting transport..."),this.connectionAttemptInProgress||(this.relayUrl=e||this.relayUrl,await this.confirmOnlineStateOrThrow(),await this.transportClose(),await this.transportOpen())}async confirmOnlineStateOrThrow(){if(!await aV())throw Error("No internet connection detected. Please restart your network and try again.")}async handleBatchMessageEvents(e){if((null==e?void 0:e.length)===0)return void this.logger.trace("Batch message events is empty. Ignoring...");let t=e.sort((e,t)=>e.publishedAt-t.publishedAt);for(let e of(this.logger.debug("Batch of ".concat(t.length," message events sorted")),t))try{await this.onMessageEvent(e)}catch(e){this.logger.warn(e,"Error while processing batch message event: "+(null==e?void 0:e.message))}this.logger.trace("Batch of ".concat(t.length," message events processed"))}async onLinkMessageEvent(e,t){let{topic:n}=e;if(!t.sessionExists){let e=tb(z.FIVE_MINUTES);await this.core.pairing.pairings.set(n,{topic:n,expiry:e,relay:{protocol:"irn"},active:!1})}this.events.emit(oE.message,e),await this.recordMessageEvent(e,oA.inbound)}async connect(e){await this.confirmOnlineStateOrThrow(),e&&e!==this.relayUrl&&(this.relayUrl=e,await this.transportDisconnect()),this.connectionAttemptInProgress=!0,this.transportExplicitlyClosed=!1;let t=1;for(;t<6;){try{if(this.transportExplicitlyClosed)break;this.logger.debug({},"Connecting to ".concat(this.relayUrl,", attempt: ").concat(t,"...")),await this.createProvider(),await new Promise(async(e,t)=>{let n=()=>
1{t(Error("Connection interrupted while trying to connect"))};this.provider.once(ok.disconnect,n),await tm(new Promise((e,t)=>{this.provider.connect().then(e).catch(t)}),this.connectTimeout,"Socket stalled when trying to connect to ".concat(this.relayUrl)).catch(e=>{t(e)}).finally(()=>{this.provider.off(ok.disconnect,n),clearTimeout(this.reconnectTimeout)}),await new Promise(async(e,n)=>{let r=()=>{t(Error("Connection interrupted while trying to subscribe"))};this.provider.once(ok.disconnect,r),await this.subscriber.start().then(e).catch(n).finally(()=>{this.provider.off(ok.disconnect,r)})}),this.hasExperiencedNetworkDisruption=!1,e()})}catch(e){await this.subscriber.stop(),this.logger.warn({},e.message),this.hasExperiencedNetworkDisruption=!0}finally{this.connectionAttemptInProgress=!1}if(this.connected){this.logger.debug({},"Connected to ".concat(this.relayUrl," successfully on attempt: ").concat(t));break}await new Promise(e=>setTimeout(e,(0,z.toMiliseconds)(+t))),t++}}startPingTimeout(){var e,t,n,r,i;if(ta())try{null!=(t=null==(e=this.provider)?void 0:e.connection)&&t.socket&&(null==(i=null==(r=null==(n=this.provider)?void 0:n.connection)?void 0:r.socket)||i.on("ping",()=>{this.resetPingTimeout()})),this.resetPingTimeout()}catch(e){this.logger.warn(e,null==e?void 0:e.message)}}async createProvider(){this.provider.connection&&this.unregisterProviderListeners();let e=await this.core.crypto.signJWT(this.relayUrl);this.provider=new ou.JsonRpcProvider(new of.default(function(e){let{protocol:t,version:n,relayUrl:r,sdkVersion:i,auth:a,projectId:o,useOnCloseEvent:s,bundleId:l,packageName:c}=e,d=r.split("?"),u=tu(t,n,i),h=function(e,t){let n=new URLSearchParams(e);for(let e of Object.keys(t).sort())if(t.hasOwnProperty(e)){let r=t[e];void 0!==r&&n.set(e,r)}return n.toString()}(d[1]||"",{auth:a,ua:u,projectId:o,useOnCloseEvent:s||void 0,packageName:c||void 0,bundleId:l||void 0});return d[0]+"?"+h}({sdkVersion:oS,protocol:this.protocol,version:this.version,relayUrl:this.relayUrl,projectId:this.projectId,auth:e,useOnCloseEvent:!0,bundleId:this.bundleId,packageName:this.packageName}))),this.registerProviderListeners()}async recordMessageEvent(e,t){let{topic:n,message:r}=e;await this.messages.set(n,r,t)}async shouldIgnoreMessageEvent(e){let{topic:t,message:n}=e;if(!n||0===n.length)return this.logger.warn("Ignoring invalid/empty message: ".concat(n)),!0;if(!await this.subscriber.isKnownTopic(t))return this.logger.warn("Ignoring message for unknown topic ".concat(t)),!0;let r=this.messages.has(t,n);return r&&this.logger.warn("Ignoring duplicate message: ".concat(n)),r}async onProviderPayload(e){if(this.logger.debug("Incoming Relay Payload"),this.logger.trace({type:"payload",direction:"incoming",payload:e}),(0,op.isJsonRpcRequest)(e)){if(!e.method.endsWith("_subscription"))return;let t=e.params,{topic:n,message:r,publishedAt:i,attestation:a}=t.data,o={topic:n,message:r,publishedAt:i,transportType:oI.relay,attestation:a};this.logger.debug("Emitting Relayer Payload"),this.logger.trace(lc({type:"event",event:t.id},o)),this.events.emit(t.id,o),await this.acknowledgePayload(e),await this.onMessageEvent(o)}else(0,op.isJsonRpcResponse)(e)&&this.events.emit(oE.message_ack,e)}async onMessageEvent(e){await this.shouldIgnoreMessageEvent(e)||(await this.recordMessageEvent(e,oA.inbound),this.events.emit(oE.message,e))}async acknowledgePayload(e){let t=(0,oh.formatJsonRpcResult)(e.id,!0);await this.provider.connection.send(t)}unregisterProviderListeners(){this.provider.off(ok.payload,this.onPayloadHandler),this.provider.off(ok.connect,this.onConnectHandler),this.provider.off(ok.disconnect,this.onDisconnectHandler),this.provider.off(ok.error,this.onProviderErrorHandler),clearTimeout(this.pingTimeout)}async registerEventListeners(){let t=await aV();(function(t){var n,r,i;switch(tl()){case ti.browser:n=t,!to()&&ts()&&(window.addEventListener("online",()=>n(!0)),window.addEventListener("offline",()=>n(!1)));break;case ti.reactNative:r=t,to()&&null!=e.g&&e.g.NetInfo&&(null==(i=e.g)||i.NetInfo.addEventListener(e=>r(null==e?void 0:e.isConnected)));case ti.node:}})(async e=>{t!==e&&(t=e,e?await this.transportOpen().catch(e=>this.logger.error(e,null==e?void 0:e.message)):(this.hasExperiencedNetworkDisruption=!0,await this.transportDisconnect(),this.transportExplicitlyClosed=!1))}),this.core.heartbeat.on(aJ.HEARTBEAT_EVENTS.pulse,async()=>{var e;if(!this.transportExplicitlyClosed&&!this.connected&&(!(ts()&&(0,W.getDocument)())||
1(null==(e=(0,W.getDocument)())?void 0:e.visibilityState)==="visible"))try{await this.confirmOnlineStateOrThrow(),await this.transportOpen()}catch(e){this.logger.warn(e,null==e?void 0:e.message)}})}async onProviderDisconnect(){clearTimeout(this.pingTimeout),this.events.emit(oE.disconnect),this.connectionAttemptInProgress=!1,!this.reconnectInProgress&&(this.reconnectInProgress=!0,await this.subscriber.stop(),this.subscriber.hasAnyTopics&&(this.transportExplicitlyClosed||(this.reconnectTimeout=setTimeout(async()=>{await this.transportOpen().catch(e=>this.logger.error(e,null==e?void 0:e.message)),this.reconnectTimeout=void 0,this.reconnectInProgress=!1},(0,z.toMiliseconds)(.1)))))}isInitialized(){if(!this.initialized){let{message:e}=aj("NOT_INITIALIZED",this.name);throw Error(e)}}async toEstablishConnection(){if(await this.confirmOnlineStateOrThrow(),!this.connected){if(this.connectPromise)return void await this.connectPromise;await this.connect()}}constructor(t){super(t),ld(this,"protocol","wc"),ld(this,"version",2),ld(this,"core"),ld(this,"logger"),ld(this,"events",new F.EventEmitter),ld(this,"provider"),ld(this,"messages"),ld(this,"subscriber"),ld(this,"publisher"),ld(this,"name","relayer"),ld(this,"transportExplicitlyClosed",!1),ld(this,"initialized",!1),ld(this,"connectionAttemptInProgress",!1),ld(this,"relayUrl"),ld(this,"projectId"),ld(this,"packageName"),ld(this,"bundleId"),ld(this,"hasExperiencedNetworkDisruption",!1),ld(this,"pingTimeout"),ld(this,"heartBeatTimeout",(0,z.toMiliseconds)(z.THIRTY_SECONDS+z.FIVE_SECONDS)),ld(this,"reconnectTimeout"),ld(this,"connectPromise"),ld(this,"reconnectInProgress",!1),ld(this,"requestsInFlight",[]),ld(this,"connectTimeout",(0,z.toMiliseconds)(15*z.ONE_SECOND)),ld(this,"request",async e=>{var t,n;this.logger.debug("Publishing Request Payload");let r=e.id||(0,oh.getBigIntRpcId)().toString();await this.toEstablishConnection();try{this.logger.trace({id:r,method:e.method,topic:null==(t=e.params)?void 0:t.topic},"relayer.request - publishing...");let i="".concat(r,":").concat((null==(n=e.params)?void 0:n.tag)||"");this.requestsInFlight.push(i);let a=await this.provider.request(e);return this.requestsInFlight=this.requestsInFlight.filter(e=>e!==i),a}catch(e){throw this.logger.debug("Failed to Publish Request: ".concat(r)),e}}),ld(this,"resetPingTimeout",()=>{ta()&&(clearTimeout(this.pingTimeout),this.pingTimeout=setTimeout(()=>{var e,t,n,r;try{this.logger.debug({},"pingTimeout: Connection stalled, terminating..."),null==(r=null==(n=null==(t=null==(e=this.provider)?void 0:e.connection)?void 0:t.socket)?void 0:n.terminate)||r.call(n)}catch(e){this.logger.warn(e,null==e?void 0:e.message)}},this.heartBeatTimeout))}),ld(this,"onPayloadHandler",e=>{this.onProviderPayload(e),this.resetPingTimeout()}),ld(this,"onConnectHandler",()=>{this.logger.warn({},"Relayer connected 🛜"),this.startPingTimeout(),this.events.emit(oE.connect)}),ld(this,"onDisconnectHandler",()=>{this.logger.warn({},"Relayer disconnected 🛑"),this.requestsInFlight=[],this.onProviderDisconnect()}),ld(this,"onProviderErrorHandler",e=>{this.logger.fatal("Fatal socket error: ".concat(e.message)),this.events.emit(oE.error,e),this.logger.fatal("Fatal socket error received, closing transport"),this.transportClose()}),ld(this,"registerProviderListeners",()=>{this.provider.on(ok.payload,this.onPayloadHandler),this.provider.on(ok.connect,this.onConnectHandler),this.provider.on(ok.disconnect,this.onDisconnectHandler),this.provider.on(ok.error,this.onProviderErrorHandler)}),this.core=t.core,this.logger="u">typeof t.logger&&"string"!=typeof t.logger?(0,aX.generateChildLogger)(t.logger,this.name):(0,a0.pino)((0,aX.getDefaultLoggerOptions)({level:t.logger||"error"})),this.messages=new sz(this.logger,t.core),this.subscriber=new lr(this,this.logger),this.publisher=new sX(this,this.logger),this.projectId=null==t?void 0:t.projectId,this.relayUrl=(null==t?void 0:t.relayUrl)||oC,to()&&"u">typeof(null==e.g?void 0:e.g.Platform)&&(null==e.g?void 0:e.g.Platform.OS)==="android"?this.packageName=tc():to()&&"u">typeof(null==e.g?void 0:e.g.Platform)&&(null==e.g?void 0:e.g.Platform.OS)==="ios"&&(this.bundleId=tc()),this.provider={}}}function lh(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}
1function lp(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}let lf="[object Arguments]",lg="[object Object]";function lm(){}function ly(e){if(!e||"object"!=typeof e)return!1;let t=Object.getPrototypeOf(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&"[object Object]"===Object.prototype.toString.call(e)}var lv=Object.defineProperty,lb=Object.getOwnPropertySymbols,lw=Object.prototype.hasOwnProperty,lx=Object.prototype.propertyIsEnumerable,lC=(e,t,n)=>t in e?lv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,lE=(e,t)=>{for(var n in t||(t={}))lw.call(t,n)&&lC(e,n,t[n]);if(lb)for(var n of lb(t))lx.call(t,n)&&lC(e,n,t[n]);return e},lk=(e,t,n)=>lC(e,"symbol"!=typeof t?t+"":t,n);class lS extends oe{get context(){return(0,aX.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get length(){return this.map.size}get keys(){return Array.from(this.map.keys())}get values(){return Array.from(this.map.values())}addToRecentlyDeleted(e){this.recentlyDeleted.push(e),this.recentlyDeleted.length>=this.recentlyDeletedLimit&&this.recentlyDeleted.splice(0,this.recentlyDeletedLimit/2)}async setDataStore(e){await this.core.storage.setItem(this.storageKey,e)}async getDataStore(){return await this.core.storage.getItem(this.storageKey)}getData(e){let t=this.map.get(e);if(!t){if(this.recentlyDeleted.includes(e)){let{message:t}=aj("MISSING_OR_INVALID","Record was recently deleted - ".concat(this.name,": ").concat(e));throw this.logger.error(t),Error(t)}let{message:t}=aj("NO_MATCHING_KEY","".concat(this.name,": ").concat(e));throw this.logger.error(t),Error(t)}return t}async persist(){await this.setDataStore(this.values)}async restore(){try{let e=await this.getDataStore();if(typeof e>"u"||!e.length)return;if(this.map.size){let{message:e}=aj("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(e),Error(e)}this.cached=e,this.logger.debug("Successfully Restored value for ".concat(this.name)),this.logger.trace({type:"method",method:"restore",value:this.values})}catch(e){this.logger.debug("Failed to Restore value for ".concat(this.name)),this.logger.error(e)}}isInitialized(){if(!this.initialized){let{message:e}=aj("NOT_INITIALIZED",this.name);throw Error(e)}}constructor(e,t,n,r=om,i){super(e,t,n,r),this.core=e,this.logger=t,this.name=n,lk(this,"map",new Map),lk(this,"version","0.3"),lk(this,"cached",[]),lk(this,"initialized",!1),lk(this,"getKey"),lk(this,"storagePrefix",om),lk(this,"recentlyDeleted",[]),lk(this,"recentlyDeletedLimit",200),lk(this,"init",async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(e=>{this.getKey&&null!==e&&!aO(e)?this.map.set(this.getKey(e),e):function(e){var t;return null==(t=null==e?void 0:e.proposer)?void 0:t.publicKey}(e)?this.map.set(e.id,e):function(e){return null==e?void 0:e.topic}(e)&&this.map.set(e.topic,e)}),this.cached=[],this.initialized=!0)}),lk(this,"set",async(e,t)=>{this.isInitialized(),this.map.has(e)?await this.update(e,t):(this.logger.debug("Setting value"),this.logger.trace({type:"method",method:"set",key:e,value:t}),this.map.set(e,t),await this.persist())}),lk(this,"get",e=>(this.isInitialized(),this.logger.debug("Getting value"),this.logger.trace({type:"method",method:"get",key:e}),this.getData(e))),lk(this,"getAll",e=>(this.isInitialized(),e?this.values.filter(t=>Object.keys(e).every(n=>{var r;return r=t[n],function e(t,n,r,i,a,o,s){let l=s(t,n,r,i,a,o);if(void 0!==l)return l;if(typeof t==typeof n)switch(typeof t){case"bigint":case"string":case"boolean":case"symbol":case"undefined":case"function":return t===n;case"number":return t===n||Object.is(t,n)}return function t(n,r,i,a){if(Object.is(n,r))return!0;let o=lp(n),s=lp(r);if(o===lf&&(o=lg),s===lf&&(s=lg),o!==s)return!1;switch(o){case"[object String]":return n.toString()===r.toString();case"[object Number]":{let e=n.valueOf(),t=r.valueOf();return e===t||Number.isNaN(e)&&Number.isNaN(t)}case"[object Boolean]":case"[object Date]":case"[object Symbol]":return Object.is(n.valueOf(),r.valueOf());case"[object RegExp]":return n.source===r.source&&n.flags===r.flags;case"[object Function]":return n===r}let l=(i=null!=i?i:new Map).get(n),c=i.get(r);if(null!=l&&null!=c)return l===r;i.set(n,r),i.set(r,n);try{switch(o){case"[object Map]":if(n.size!==r.size)return!1;for(let[t,o]of n.entries())if(!r.has(t)||!e(o,r.get(t),t,n,r,i,a))return!1;return!0;case"[object Set]":{if(n.size!==r.size)return!1;let t=Array.from(n.values()),o=Array.from(r.values());for(let s=0;s<t.length;s++){let l=t[s],c=o.findIndex(t=>e(l,t,void 0,n,r,i,a));if(-1===c)return!1;o.splice(c,1)}return!0}case"[object Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":case"[object BigUint64Array
1]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object BigInt64Array]":case"[object Float32Array]":case"[object Float64Array]":if("u">typeof U.Buffer&&U.Buffer.isBuffer(n)!==U.Buffer.isBuffer(r)||n.length!==r.length)return!1;for(let t=0;t<n.length;t++)if(!e(n[t],r[t],t,n,r,i,a))return!1;return!0;case"[object ArrayBuffer]":return n.byteLength===r.byteLength&&t(new Uint8Array(n),new Uint8Array(r),i,a);case"[object DataView]":return n.byteLength===r.byteLength&&n.byteOffset===r.byteOffset&&t(new Uint8Array(n),new Uint8Array(r),i,a);case"[object Error]":return n.name===r.name&&n.message===r.message;case lg:{if(!(t(n.constructor,r.constructor,i,a)||ly(n)&&ly(r)))return!1;let o=[...Object.keys(n),...lh(n)],s=[...Object.keys(r),...lh(r)];if(o.length!==s.length)return!1;for(let t=0;t<o.length;t++){let s=o[t],l=n[s];if(!Object.hasOwn(r,s))return!1;let c=r[s];if(!e(l,c,s,n,r,i,a))return!1}return!0}default:return!1}}finally{i.delete(n),i.delete(r)}}(t,n,o,s)}(r,e[n],void 0,void 0,void 0,void 0,lm)})):this.values)),lk(this,"update",async(e,t)=>{this.isInitialized(),this.logger.debug("Updating value"),this.logger.trace({type:"method",method:"update",key:e,update:t});let n=lE(lE({},this.getData(e)),t);this.map.set(e,n),await this.persist()}),lk(this,"delete",async(e,t)=>{this.isInitialized(),this.map.has(e)&&(this.logger.debug("Deleting value"),this.logger.trace({type:"method",method:"delete",key:e,reason:t}),this.map.delete(e),this.addToRecentlyDeleted(e),await this.persist())}),this.logger=(0,aX.generateChildLogger)(t,this.name),this.storagePrefix=r,this.getKey=i}}var lI=Object.defineProperty,lA=(e,t,n)=>((e,t,n)=>t in e?lI(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n);class lT{get context(){return(0,aX.getLoggerContext)(this.logger)}isInitialized(){if(!this.initialized){let{message:e}=aj("NOT_INITIALIZED",this.name);throw Error(e)}}registerRelayerEvents(){this.core.relayer.on(oE.message,async e=>{let{topic:t,message:n,transportType:r}=e;if(this.pairings.keys.includes(t)&&r!==oI.link_mode&&!this.ignoredPayloadTypes.includes(this.core.crypto.getPayloadType(n)))try{let e=await this.core.crypto.decode(t,n);(0,op.isJsonRpcRequest)(e)?(this.core.history.set(t,e),await this.onRelayEventRequest({topic:t,payload:e})):(0,op.isJsonRpcResponse)(e)&&(await this.core.history.resolve(e),await this.onRelayEventResponse({topic:t,payload:e}),this.core.history.delete(t,e.id)),await this.core.relayer.messages.ack(t,n)}catch(e){this.logger.error(e)}})}registerExpirerEvents(){this.core.expirer.on(oN.expired,async e=>{let{topic:t}=tv(e.target);t&&this.pairings.keys.includes(t)&&(await this.deletePairing(t,!0),this.events.emit(oP.expire,{topic:t}))})}constructor(e,t){this.core=e,this.logger=t,lA(this,"name","pairing"),lA(this,"version","0.3"),lA(this,"events",new F.default),lA(this,"pairings"),lA(this,"initialized",!1),lA(this,"storagePrefix",om),lA(this,"ignoredPayloadTypes",[1]),lA(this,"registeredMethods",[]),lA(this,"init",async()=>{this.initialized||(await this.pairings.init(),await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.initialized=!0,this.logger.trace("Initialized"))}),lA(this,"register",e=>{let{methods:t}=e;this.isInitialized(),this.registeredMethods=[...new Set([...this.registeredMethods,...t])]}),lA(this,"create",async e=>{this.isInitialized();let t=i9(),n=await this.core.crypto.setSymKey(t),r=tb(z.FIVE_MINUTES),i={protocol:"irn"},a={topic:n,expiry:r,relay:i,active:!1,methods:null==e?void 0:e.methods},o=ah({protocol:this.core.protocol,version:this.core.version,topic:n,symKey:t,relay:i,expiryTimestamp:r,methods:null==e?void 0:e.methods});return this.events.emit(oP.create,a),this.core.expirer.set(n,r),await this.pairings.set(n,a),await this.core.relayer.subscribe(n,{transportType:null==e?void 0:e.transportType,internal:null==e?void 0:e.internal}),{topic:n,uri:o}}),lA(this,"pair",async e=>{let t;this.isInitialized();let n=this.core.eventClient.createEvent({properties:{topic:null==e?void 0:e.uri,trace:[oL.pairing_started]}});this.isValidPair(e,n);let{topic:r,symKey:i,relay:a,expiryTimestamp:o,methods:s}=au(e.uri);if(n.props.properties.topic=r,n.addTrace(oL.pairing_uri_validation_success),n.addTrace(oL.pairing_uri_not_expired),this.pairings.keys.includes(r)){if(t=this.pairings.get(r),n.addTrace(oL.existing_pairing),t.active)throw n.setError(oD.active_pairing_already_exists),Error("Pairing already exists: ".concat(r,". Please try again with a new connection URI."));n.addTrace(oL.pairing_not_expired)}let l=o||tb(z.FIVE_MINUTES),c={topic:r,relay:a,expiry:l,active:!1,methods:s};this.core.expirer.set(r,l),await this.pairings.set(r,c),n.addTrace(oL.store_new_pairing),e.activatePairing&&await this.activate({topic:r}),this.events.emit(oP.create,c),n.addTrace(oL.emit_inactive_pairing),this.core.crypto.keychain.has(r)||await this.core.crypto.setSymKey(i,r),n.addTrace(oL.subscribing_pairing_topic);try{await this.core.relayer.confirmOnlineStateOrThrow()}catch(e){n.setError(oD.no_internet_connection)}try{await this.core.relayer.subscribe(r,{relay:a})}catch(e){throw n.setError(oD.subscribe_pairing_topic_failure),e}return n.addTrace(oL.subscribe_pairing_topic_success),c}),lA(this,"activate",async e=>{let{topic:t}=e;this.isInitialized();let n=tb(z.FIVE_MINUTES);this.core.expirer.set(t,n),await this.pairings.update(t,{active:!0,expiry:n})}),lA(this,"ping",async e=>{this.isInitialized(),await this.isValidPing(e),this.logger.warn("ping() is deprecated and will be removed in the next major release.");let{topic:t}=e;if(this.pairings.keys.includes(t)){let e=await this.sendRequest(t,"wc_pairingPing",{}),{done:n,resolve:r,reject:i}=tg();this.events.once(tx("pairing_ping",e),e=>{let{error:t}=e;t?i(t):r()}),await n()}}),lA(this,"updateExpiry",async e=>{let{topic:t,expiry:n}=e;this.isInitialized(),await this.pairings.update(t,{expiry:n})}),lA(this,"updateMetadata",async e=>{let{topic:t,metadata:n}=e;this.isInitialized(),await this.pairings.update(t,{peerMetadata:n})}),lA(this,"getPairings",()=>(this.isInitialized(),this.pairings.values)),lA(this,"disconnect",async e=>{this.isInitialized(),await this.isValidDisconnect(e);let{topic:t}=e;this.pairings.keys.includes(t)&&(await this.sendRequest(t,"wc_pairingDelete",aP("USER_DISCONNECTED")),await this.deletePairing(t))}),lA(this,"formatUriFromPairing",e=>{this.isInitialized();let{topic:t,relay:n,expiry:r,methods:i}=e,a=this.core.crypto.keychain.get(t);return ah({protocol:this.core.protocol,version:this.core.version,topic:t,symKey:a,relay:n,expiryTimestamp:r,methods:i})}),lA(this,"sendRequest",async(e,t,n)=>{let r=(0,oh.formatJsonRpcRequest)(t,n),i=await this.core.crypto.encode(e,r),a=oj[t].req;return this.core.history.set(e,r),this.core.relayer.publish(e,i,a),r.id}),lA(this,"sendResult",async(e,t,n)=>{let r=(0,oh.formatJsonRpcResult)(e,n),i=await this.core.crypto.encode(t,r),a=oj[(await this.core.history.get(t,e)).request.method].res;await this.core.relayer.publish(t,i,a),await this.core.history.resolve(r)}),lA(this,"sendError",async(e,t,n)=>{let r=(0,oh.formatJsonRpcError)(e,n),i=await this.core.crypto.encode(t,r),a=(await this.core.history.get(t,e)).request.method,o=oj[a]?oj[a].res:oj.unregistered_method.res;await this.core.relayer.publish(t,i,o),await this.core.history.resolve(r)}),lA(this,"deletePairing",async(e,t)=>{await this.core.relayer.unsubscribe(e),await Promise.all([this.pairings.delete(e,aP("USER_DISCONNECTED")),this.core.crypto.deleteSymKey(e),t?Promise.resolve():this.core.expirer.del(e)])}),lA(this,"cleanup",async()=>{let e=this.pairings.getAll().filter(e=>tw(e.expiry));await Promise.all(e.map(e=>this.deletePairing(e.topic)))}),lA(this,"onRelayEventRequest",async e=>{let{topic:t,payload:n}=e;switch(n.method){case"wc_pairingPing":return await this.onPairingPingRequest(t,n);case"wc_pairingDelete":return await this.onPairingDeleteRequest(t,n);default:return await this.onUnknownRpcMethodRequest(t,n)}}),lA(this,"onRelayEventResponse",async e=>{let{topic:t,payload:n}=e,r=(await this.core.history.get(t,n.id)).request.method;return"wc_pairingPing"===r?this.onPairingPingResponse(t,n):this.onUnknownRpcMethodResponse(r)}),lA(this,"onPairingPingRequest",async(e,t)=>{let{id:n}=t;try{this.isValidPing({topic:e}),await this.sendResult(n,e,!0),this.events.emit(oP.ping,{id:n,topic:e})}catch(t){await this.sendError(n,e,t),this.logger.error(t)}}),lA(this,"onPairingPingResponse",(e,t)=>{let{id:n}=t;setTimeout(()=>{(0,op.isJsonRpcResult)(t)?this.events.emit(tx("pairing_ping",n),{}):(0,op.isJsonRpcError)(t)&&this.events.emit(tx("pairing_ping",n),{error:t.error})},500)}),lA(this,"onPairingDeleteRequest",async(e,t)=>{let{id:n}=t;try{this.isValidDisconnect({topic:e}),await this.deletePairing(e),this.events.emit(oP.delete,{id:n,topic:e})}catch(t){await this.sendError(n,e,t),this.logger.error(t)}}),lA(this,"onUnknownRpcMethodRequest",async(e,t)=>{let{id:n,method:r}=t;try{if(this.registeredMethods.includes(r))return;let t=aP("WC_METHOD_UNSUPPORTED",r);await this.sendError(n,e,t),this.logger.error(t)}catch(t){await this.sendError(n,e,t),this.logger.error(t)}}),lA(this,"onUnknownRpcMethodResponse",e=>{this.registeredMethods.includes(e)||this.logger.error(aP("WC_METHOD_UNSUPPORTED",e))}),lA(this,"isValidPair",(e,t)=>{var n;if(!az(e)){let{message:n}=aj("MISSING_OR_INVALID","pair() params: ".concat(e));throw t.setError(oD.malformed_pairing_uri),Error(n)}if(!function(e){function t(e){try{return"u">typeof new URL(e)}catch(e){return!1}}try{if(aM(e,!1)){if(t(e))return!0;let n=tT(e);return t(n)}}catch(e){}return!1}(e.uri)){let{message:n}=aj("MISSING_OR_INVALID","pair() uri: ".concat(e.uri));throw t.setError(oD.malformed_pairing_uri),Error(n)}let r=au(null==e?void 0:e.uri);if(!(null!=(n=null==r?void 0:r.relay)&&n.protocol)){let{message:e}=aj("MISSING_OR_INVALID","pair() uri#relay-protocol");throw t.setError(oD.malformed_pairing_uri),Error(e)}if(!(null!=r&&r.symKey)){let{message:e}=aj("MISSING_OR_INVALID","pair() uri#symKey");throw t.setError(oD.malformed_pairing_uri),Error(e)}if(null!=r&&r.expiryTimestamp&&(0,z.toMiliseconds)(null==r?void 0:r.expiryTimestamp)<Date.now()){t.setError(oD.pairing_expired);let{message:e}=aj("EXPIRED","pair() URI has expired. Please try again with a new connection URI.");throw Error(e)}}),lA(this,"isValidPing",async e=>{if(!az(e)){let{message:t}=aj("MISSING_OR_INVALID","ping() params: ".concat(e));throw Error(t)}let{topic:t}=e;await this.isValidPairingTopic(t)}),lA(this,"isValidDisconnect",async e=>{if(!az(e)){let{message:t}=aj("MISSING_OR_INVALID","disconnect() params: ".concat(e));throw Error(t)}let{topic:t}=e;await this.isValidPairingTopic(t)}),lA(this,"isValidPairingTopic",async e=>{if(!aM(e,!1)){let{message:t}=aj("MISSING_OR_INVALID","pairing topic should be a string: ".concat(e));throw Error(t)}if(!this.pairings.keys.includes(e)){let{message:t}=aj("NO_MATCHING_KEY","pairing topic doesn't exist: ".concat(e));throw Error(t)}if(tw(this.pairings.get(e).expiry)){await this.deletePairing(e);let{message:t}=aj("EXPIRED","pairing topic: ".concat(e));throw Error(t)}}),this.core=e,this.logger=(0,aX.generateChildLogger)(t,this.name),this.pairings=new lS(this.core,this.logger,this.name,this.storagePrefix)}}var l_=Object.defineProperty,lj=(e,t,n)=>((e,t,n)=>t in e?l_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n);
1class lP extends a6{get context(){return(0,aX.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get size(){return this.records.size}get keys(){return Array.from(this.records.keys())}get values(){return Array.from(this.records.values())}get pending(){let e=[];return this.values.forEach(t=>{if("u">typeof t.response)return;let n={topic:t.topic,request:(0,oh.formatJsonRpcRequest)(t.request.method,t.request.params,t.id),chainId:t.chainId};return e.push(n)}),e}async setJsonRpcRecords(e){await this.core.storage.setItem(this.storageKey,e)}async getJsonRpcRecords(){return await this.core.storage.getItem(this.storageKey)}getRecord(e){this.isInitialized();let t=this.records.get(e);if(!t){let{message:t}=aj("NO_MATCHING_KEY","".concat(this.name,": ").concat(e));throw Error(t)}return t}async persist(){await this.setJsonRpcRecords(this.values),this.events.emit(o$.sync)}async restore(){try{let e=await this.getJsonRpcRecords();if(typeof e>"u"||!e.length)return;if(this.records.size){let{message:e}=aj("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(e),Error(e)}this.cached=e,this.logger.debug("Successfully Restored records for ".concat(this.name)),this.logger.trace({type:"method",method:"restore",records:this.values})}catch(e){this.logger.debug("Failed to Restore records for ".concat(this.name)),this.logger.error(e)}}registerEventListeners(){this.events.on(o$.created,e=>{let t=o$.created;this.logger.info("Emitting ".concat(t)),this.logger.debug({type:"event",event:t,record:e})}),this.events.on(o$.updated,e=>{let t=o$.updated;this.logger.info("Emitting ".concat(t)),this.logger.debug({type:"event",event:t,record:e})}),this.events.on(o$.deleted,e=>{let t=o$.deleted;this.logger.info("Emitting ".concat(t)),this.logger.debug({type:"event",event:t,record:e})}),this.core.heartbeat.on(aJ.HEARTBEAT_EVENTS.pulse,()=>{this.cleanup()})}cleanup(){try{this.isInitialized();let e=!1;this.records.forEach(t=>{(0,z.toMiliseconds)(t.expiry||0)-Date.now()<=0&&(this.logger.info("Deleting expired history log: ".concat(t.id)),this.records.delete(t.id),this.events.emit(o$.deleted,t,!1),e=!0)}),e&&this.persist()}catch(e){this.logger.warn(e)}}isInitialized(){if(!this.initialized){let{message:e}=aj("NOT_INITIALIZED",this.name);throw Error(e)}}constructor(e,t){super(e,t),this.core=e,this.logger=t,lj(this,"records",new Map),lj(this,"events",new F.EventEmitter),lj(this,"name","history"),lj(this,"version","0.3"),lj(this,"cached",[]),lj(this,"initialized",!1),lj(this,"storagePrefix",om),lj(this,"init",async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(e=>this.records.set(e.id,e)),this.cached=[],this.registerEventListeners(),this.initialized=!0)}),lj(this,"set",(e,t,n)=>{if(this.isInitialized(),this.logger.debug("Setting JSON-RPC request history record"),this.logger.trace({type:"method",method:"set",topic:e,request:t,chainId:n}),this.records.has(t.id))return;let r={id:t.id,topic:e,request:{method:t.method,params:t.params||null},chainId:n,expiry:tb(z.THIRTY_DAYS)};this.records.set(r.id,r),this.persist(),this.events.emit(o$.created,r)}),lj(this,"resolve",async e=>{if(this.isInitialized(),this.logger.debug("Updating JSON-RPC response history record"),this.logger.trace({type:"method",method:"update",response:e}),!this.records.has(e.id))return;let t=await this.getRecord(e.id);typeof t.response>"u"&&(t.response=(0,op.isJsonRpcError)(e)?{error:e.error}:{result:e.result},this.records.set(t.id,t),this.persist(),this.events.emit(o$.updated,t))}),lj(this,"get",async(e,t)=>(this.isInitialized(),this.logger.debug("Getting record"),this.logger.trace({type:"method",method:"get",topic:e,id:t}),await this.getRecord(t))),lj(this,"delete",(e,t)=>{this.isInitialized(),this.logger.debug("Deleting record"),this.logger.trace({type:"method",method:"delete",id:t}),this.values.forEach(n=>{n.topic===e&&("u">typeof t&&n.id!==t||(this.records.delete(n.id),this.events.emit(o$.deleted,n)))}),this.persist()}),lj(this,"exists",async(e,t)=>(this.isInitialized(),!!this.records.has(t)&&(await this.getRecord(t)).topic===e)),lj(this,"on",(e,t)=>{this.events.on(e,t)}),lj(this,"once",(e,t)=>{this.events.once(e,t)}),lj(this,"off",(e,t)=>{this.events.off(e,t)}),lj(this,"removeListener",(e,t)=>{this.events.removeListener(e,t)}),this.logger=(0,aX.generateChildLogger)(t,this.name)}}var l$=Object.defineProperty,lN=(e,t,n)=>((e,t,n)=>t in e?l$(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n);
1class lO extends on{get context(){return(0,aX.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get length(){return this.expirations.size}get keys(){return Array.from(this.expirations.keys())}get values(){return Array.from(this.expirations.values())}formatTarget(e){if("string"==typeof e)return ty("topic",e);if("number"==typeof e)return ty("id",e);let{message:t}=aj("UNKNOWN_TYPE","Target type: ".concat(typeof e));throw Error(t)}async setExpirations(e){await this.core.storage.setItem(this.storageKey,e)}async getExpirations(){return await this.core.storage.getItem(this.storageKey)}async persist(){await this.setExpirations(this.values),this.events.emit(oN.sync)}async restore(){try{let e=await this.getExpirations();if(typeof e>"u"||!e.length)return;if(this.expirations.size){let{message:e}=aj("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(e),Error(e)}this.cached=e,this.logger.debug("Successfully Restored expirations for ".concat(this.name)),this.logger.trace({type:"method",method:"restore",expirations:this.values})}catch(e){this.logger.debug("Failed to Restore expirations for ".concat(this.name)),this.logger.error(e)}}getExpiration(e){let t=this.expirations.get(e);if(!t){let{message:t}=aj("NO_MATCHING_KEY","".concat(this.name,": ").concat(e));throw this.logger.warn(t),Error(t)}return t}checkExpiry(e,t){let{expiry:n}=t;(0,z.toMiliseconds)(n)-Date.now()<=0&&this.expire(e,t)}expire(e,t){this.expirations.delete(e),this.events.emit(oN.expired,{target:e,expiration:t})}checkExpirations(){this.core.relayer.connected&&this.expirations.forEach((e,t)=>this.checkExpiry(t,e))}registerEventListeners(){this.core.heartbeat.on(aJ.HEARTBEAT_EVENTS.pulse,()=>this.checkExpirations()),this.events.on(oN.created,e=>{let t=oN.created;this.logger.info("Emitting ".concat(t)),this.logger.debug({type:"event",event:t,data:e}),this.persist()}),this.events.on(oN.expired,e=>{let t=oN.expired;this.logger.info("Emitting ".concat(t)),this.logger.debug({type:"event",event:t,data:e}),this.persist()}),this.events.on(oN.deleted,e=>{let t=oN.deleted;this.logger.info("Emitting ".concat(t)),this.logger.debug({type:"event",event:t,data:e}),this.persist()})}isInitialized(){if(!this.initialized){let{message:e}=aj("NOT_INITIALIZED",this.name);throw Error(e)}}constructor(e,t){super(e,t),this.core=e,this.logger=t,lN(this,"expirations",new Map),lN(this,"events",new F.EventEmitter),lN(this,"name","expirer"),lN(this,"version","0.3"),lN(this,"cached",[]),lN(this,"initialized",!1),lN(this,"storagePrefix",om),lN(this,"init",async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(e=>this.expirations.set(e.target,e)),this.cached=[],this.registerEventListeners(),this.initialized=!0)}),lN(this,"has",e=>{try{let t=this.formatTarget(e);return"u">typeof this.getExpiration(t)}catch(e){return!1}}),lN(this,"set",(e,t)=>{this.isInitialized();let n=this.formatTarget(e),r={target:n,expiry:t};this.expirations.set(n,r),this.checkExpiry(n,r),this.events.emit(oN.created,{target:n,expiration:r})}),lN(this,"get",e=>{this.isInitialized();let t=this.formatTarget(e);return this.getExpiration(t)}),lN(this,"del",e=>{if(this.isInitialized(),this.has(e)){let t=this.formatTarget(e),n=this.getExpiration(t);this.expirations.delete(t),this.events.emit(oN.deleted,{target:t,expiration:n})}}),lN(this,"on",(e,t)=>{this.events.on(e,t)}),lN(this,"once",(e,t)=>{this.events.once(e,t)}),lN(this,"off",(e,t)=>{this.events.off(e,t)}),lN(this,"removeListener",(e,t)=>{this.events.removeListener(e,t)}),this.logger=(0,aX.generateChildLogger)(t,this.name)}}var lM=Object.defineProperty,lR=(e,t,n)=>((e,t,n)=>t in e?lM(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n);class lL extends or{get storeKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//verify:public:key"}get context(){return(0,aX.getLoggerContext)(this.logger)}startAbortTimer(e){return this.abortController=new AbortController,setTimeout(()=>this.abortController.abort(),(0,z.toMiliseconds)(e))}constructor(e,t,n){super(e,t,n),this.core=e,this.logger=t,this.store=n,lR(this,"name","verify-api"),lR(this,"abortController"),lR(this,"isDevEnv"),lR(this,"verifyUrlV3",oM),lR(this,"storagePrefix",om),lR(this,"version",2),lR(this,"publicKey"),lR(this,"fetchPromise"),lR(this,"init",async()=>{var e;this.isDevEnv||(this.publicKey=await this.store.getItem(this.storeKey),this.publicKey&&(0,z.toMiliseconds)(null==(e=this.publicKey)?void 0:e.expiresAt)<Date.now()&&(this.logger.debug("verify v2 public key expired"),await this.removePublicKey()))}),lR(this,"register",async e=>{if(!ts()||this.isDevEnv)return;let t=window.location.origin,{id:n,decryptedId:r}=e,i="".concat(this.verifyUrlV3,"/attestation?projectId=").concat(this.core.projectId,"&origin=").concat(t,"&id=").concat(n,"&decryptedId=").concat(r);try{let e=(0,W.getDocument)(),t=this.startAbortTimer(5*z.ONE_SECOND),r=await new Promise((r,a)=>{let o=()=>{window.removeEventListener("message",l),e.body.removeChild(s),a("attestation aborted")};this.abortController.signal.addEventListener("abort",o);let s=e.createElement("iframe");s.src=i,s.style.display="none",s.addEventListener("error",o,{signal:this.abortController.signal});let l=i=>{if(i.data&&"string"==typeof i.data)try{let a=JSON.parse(i.data);if("verify_attestation"===a.type){if((0,eW.decodeJWT)(a.attestation).payload.id!==n)return;clearInterval(t),e.body.removeChild(s),this.abortController.signal.removeEventListener("abort",o),window.removeEventListener("message",l),r(null===a.attestation?"":a.attestation)}}catch(e){this.logger.warn(e)}};e.body.appendChild(s),window.addEventListener("message",l,{signal:this.abortController.signal})});return this.logger.debug("jwt attestation",r),r}catch(e){this.logger.warn(e)}return""}),lR(this,"resolve",async e=>{if(this.isDevEnv)return"";let{attestationId:t,hash:n,encryptedId:r}=e;if(""===t)return void this.logger.debug("resolve: attestationId is empty, skipping");if(t){if((0,eW.decodeJWT)(t).payload.id!==r)return;let e=await this.isValidJwtAttestation(t);
1if(e)return e.isVerified?e:void this.logger.warn("resolve: jwt attestation: origin url not verified")}if(!n)return;let i=this.getVerifyUrl(null==e?void 0:e.verifyUrl);return this.fetchAttestation(n,i)}),lR(this,"fetchAttestation",async(e,t)=>{this.logger.debug("resolving attestation: ".concat(e," from url: ").concat(t));let n=this.startAbortTimer(5*z.ONE_SECOND),r=await fetch("".concat(t,"/attestation/").concat(e,"?v2Supported=true"),{signal:this.abortController.signal});return clearTimeout(n),200===r.status?await r.json():void 0}),lR(this,"getVerifyUrl",e=>{let t=e||oO;return oR.includes(t)||(this.logger.info("verify url: ".concat(t,", not included in trusted list, assigning default: ").concat(oO)),t=oO),t}),lR(this,"fetchPublicKey",async()=>{try{this.logger.debug("fetching public key from: ".concat(this.verifyUrlV3));let e=this.startAbortTimer(z.FIVE_SECONDS),t=await fetch("".concat(this.verifyUrlV3,"/public-key"),{signal:this.abortController.signal});return clearTimeout(e),await t.json()}catch(e){this.logger.warn(e)}}),lR(this,"persistPublicKey",async e=>{this.logger.debug("persisting public key to local storage",e),await this.store.setItem(this.storeKey,e),this.publicKey=e}),lR(this,"removePublicKey",async()=>{this.logger.debug("removing verify v2 public key from storage"),await this.store.removeItem(this.storeKey),this.publicKey=void 0}),lR(this,"isValidJwtAttestation",async e=>{let t=await this.getPublicKey();try{if(t)return this.validateAttestation(e,t)}catch(e){this.logger.error(e),this.logger.warn("error validating attestation")}let n=await this.fetchAndPersistPublicKey();try{if(n)return this.validateAttestation(e,n)}catch(e){this.logger.error(e),this.logger.warn("error validating attestation")}}),lR(this,"getPublicKey",async()=>this.publicKey?this.publicKey:await this.fetchAndPersistPublicKey()),lR(this,"fetchAndPersistPublicKey",async()=>{if(this.fetchPromise)return await this.fetchPromise,this.publicKey;this.fetchPromise=new Promise(async e=>{let t=await this.fetchPublicKey();t&&(await this.persistPublicKey(t),e(t))});let e=await this.fetchPromise;return this.fetchPromise=void 0,e}),lR(this,"validateAttestation",(e,t)=>{let n=function(e,t){let[n,r,i]=e.split("."),a=U.Buffer.from(ai(i),"base64");if(64!==a.length)throw Error("Invalid signature length");let o=a.slice(0,32),s=a.slice(32,64),l=nB("".concat(n,".").concat(r)),c=function(e){let t=U.Buffer.from(e.x,"base64"),n=U.Buffer.from(e.y,"base64");return eV([new Uint8Array([4]),t,n])}(t);if(!i2.verify(eV([o,s]),l,c))throw Error("Invalid signature");return(0,eW.decodeJWT)(e).payload}(e,t.publicKey),r={hasExpired:(0,z.toMiliseconds)(n.exp)<Date.now(),payload:n};if(r.hasExpired)throw this.logger.warn("resolve: jwt attestation expired"),Error("JWT attestation expired");return{origin:r.payload.origin,isScam:r.payload.isScam,isVerified:r.payload.isVerified}}),this.logger=(0,aX.generateChildLogger)(t,this.name),this.abortController=new AbortController,this.isDevEnv=tA(),this.init()}}var lD=Object.defineProperty,lF=(e,t,n)=>((e,t,n)=>t in e?lD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n);class lU extends oi{constructor(e,t){super(e,t),this.projectId=e,this.logger=t,lF(this,"context","echo"),lF(this,"registerDeviceToken",async e=>{let{clientId:t,token:n,notificationType:r,enableEncrypted:i=!1}=e,a="".concat("https://echo.walletconnect.com","/").concat(this.projectId,"/clients");await fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({client_id:t,type:r,token:n,always_raw:i})})}),this.logger=(0,aX.generateChildLogger)(t,this.context)}}var lB=Object.defineProperty,lz=Object.getOwnPropertySymbols,lW=Object.prototype.hasOwnProperty,lq=Object.prototype.propertyIsEnumerable,lH=(e,t,n)=>t in e?lB(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,lV=(e,t)=>{for(var n in t||(t={}))lW.call(t,n)&&lH(e,n,t[n]);if(lz)for(var n of lz(t))lq.call(t,n)&&lH(e,n,t[n]);return e},lG=(e,t,n)=>lH(e,"symbol"!=typeof t?t+"":t,n);class lK extends oa{get storageKey(){return this.storagePrefix+this.storageVersion+this.core.customStoragePrefix+"//"+this.context}constructor(e,t,n=!0){super(e,t,n),this.core=e,this.logger=t,lG(this,"context","event-client"),lG(this,"storagePrefix",om),lG(this,"storageVersion",.1),lG(this,"events",new Map),lG(this,"shouldPersist",!1),lG(this,"init",async()=>
1{if(!tA())try{let e={eventId:tI(),timestamp:Date.now(),domain:this.getAppDomain(),props:{event:"INIT",type:"",properties:{client_id:await this.core.crypto.getClientId(),user_agent:tu(this.core.relayer.protocol,this.core.relayer.version,oS)}}};await this.sendEvent([e])}catch(e){this.logger.warn(e)}}),lG(this,"createEvent",e=>{let{event:t="ERROR",type:n="",properties:{topic:r,trace:i}}=e,a=tI(),o=this.core.projectId||"",s=lV({eventId:a,timestamp:Date.now(),props:{event:t,type:n,properties:{topic:r,trace:i}},bundleId:o,domain:this.getAppDomain()},this.setMethods(a));return this.telemetryEnabled&&(this.events.set(a,s),this.shouldPersist=!0),s}),lG(this,"getEvent",e=>{let{eventId:t,topic:n}=e;if(t)return this.events.get(t);let r=Array.from(this.events.values()).find(e=>e.props.properties.topic===n);if(r)return lV(lV({},r),this.setMethods(r.eventId))}),lG(this,"deleteEvent",e=>{let{eventId:t}=e;this.events.delete(t),this.shouldPersist=!0}),lG(this,"setEventListeners",()=>{this.core.heartbeat.on(aJ.HEARTBEAT_EVENTS.pulse,async()=>{this.shouldPersist&&await this.persist(),this.events.forEach(e=>{(0,z.fromMiliseconds)(Date.now())-(0,z.fromMiliseconds)(e.timestamp)>86400&&(this.events.delete(e.eventId),this.shouldPersist=!0)})})}),lG(this,"setMethods",e=>({addTrace:t=>this.addTrace(e,t),setError:t=>this.setError(e,t)})),lG(this,"addTrace",(e,t)=>{let n=this.events.get(e);n&&(n.props.properties.trace.push(t),this.events.set(e,n),this.shouldPersist=!0)}),lG(this,"setError",(e,t)=>{let n=this.events.get(e);n&&(n.props.type=t,n.timestamp=Date.now(),this.events.set(e,n),this.shouldPersist=!0)}),lG(this,"persist",async()=>{await this.core.storage.setItem(this.storageKey,Array.from(this.events.values())),this.shouldPersist=!1}),lG(this,"restore",async()=>{try{let e=await this.core.storage.getItem(this.storageKey)||[];if(!e.length)return;e.forEach(e=>{this.events.set(e.eventId,lV(lV({},e),this.setMethods(e.eventId)))})}catch(e){this.logger.warn(e)}}),lG(this,"submit",async()=>{if(!this.telemetryEnabled||0===this.events.size)return;let e=[];for(let[t,n]of this.events)n.props.type&&e.push(n);if(0!==e.length)try{if((await this.sendEvent(e)).ok)for(let t of e)this.events.delete(t.eventId),this.shouldPersist=!0}catch(e){this.logger.warn(e)}}),lG(this,"sendEvent",async e=>{let t=this.getAppDomain()?"":"&sp=desktop";return await fetch("".concat("https://pulse.walletconnect.org/batch","?projectId=").concat(this.core.projectId,"&st=events_sdk&sv=js-").concat(oS).concat(t),{method:"POST",body:JSON.stringify(e)})}),lG(this,"getAppDomain",()=>td().url),this.logger=(0,aX.generateChildLogger)(t,this.context),this.telemetryEnabled=n,n?this.restore().then(async()=>{await this.submit(),this.setEventListeners()}):this.persist()}}var lY=Object.defineProperty,lZ=Object.getOwnPropertySymbols,lJ=Object.prototype.hasOwnProperty,lQ=Object.prototype.propertyIsEnumerable,lX=(e,t,n)=>t in e?lY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,l0=(e,t)=>{for(var n in t||(t={}))lJ.call(t,n)&&lX(e,n,t[n]);if(lZ)for(var n of lZ(t))lQ.call(t,n)&&lX(e,n,t[n]);return e},l1=(e,t,n)=>lX(e,"symbol"!=typeof t?t+"":t,n);class l2 extends a5{static async init(e){let t=new l2(e);await t.initialize();let n=await t.crypto.getClientId();return await t.storage.setItem("WALLETCONNECT_CLIENT_ID",n),t}get context(){return(0,aX.getLoggerContext)(this.logger)}async start(){this.initialized||await this.initialize()}async getLogsBlob(){var e;return null==(e=this.logChunkController)?void 0:e.logsToBlob({clientId:await this.crypto.getClientId()})}async addLinkModeSupportedApp(e){this.linkModeSupportedApps.includes(e)||(this.linkModeSupportedApps.push(e),await this.storage.setItem(oT,this.linkModeSupportedApps))}async initialize(){this.logger.trace("Initialized");try{await this.crypto.init(),await this.history.init(),await this.expirer.init(),await this.relayer.init(),await this.heartbeat.init(),await this.pairing.init(),this.linkModeSupportedApps=await this.storage.getItem(oT)||[],this.initialized=!0,this.logger.info("Core Initialization Success")}catch(e){throw this.logger.warn("Core Initialization Failure at epoch ".concat(Date.now()),e),this.logger.error(e.message),e}}getGlobalCore(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";try{if(this.isGlobalCoreDisabled())return;let t="_walletConnectCore_".concat(e),n="".concat(t,"_count");return globalThis[n]=(globalThis[n]||0)+1,globalThis[n]>1&&console.warn("WalletConnect Core is already initialized. This is probably a mistake and can lead to unexpected behavior. Init() was called ".concat(globalThis[n]," times.")),globalThis[t]}catch(e){console.warn("Failed to get global WalletConnect core",e);return}}setGlobalCore(e){var t;try{if(this.isGlobalCoreDisabled())return;let n="_walletConnectCore_".concat((null==(t=e.opts)?void 0:t.customStoragePrefix)||"");globalThis[n]=e}catch(e){console.warn("Failed to set global WalletConnect core",e)}}isGlobalCoreDisabled(){try{return"u">typeof y.default&&"true"===y.default.env.DISABLE_GLOBAL_CORE}catch(e){return!0}}constructor(e){var t;super(e),l1(this,"protocol","wc"),l1(this,"version",2),l1(this,"name",og),l1(this,"relayUrl"),l1(this,"projectId"),l1(this,"customStoragePrefix"),l1(this,"events",new F.EventEmitter),l1(this,"logger"),l1(this,"heartbeat"),l1(this,"relayer"),l1(this,"crypto"),l1(this,"storage"),l1(this,"history"),l1(this,"expirer"),l1(this,"pairing"),l1(this,"verify"),l1(this,"echoClient"),l1(this,"linkModeSupportedApps"),l1(this,"eventClient"),l1(this,"initialized",!1),l1(this,"logChunkController"),l1(this,"on",(e,t)=>this.events.on(e,t)),l1(this,"once",(e,t)=>this.events.once(e,t)),l1(this,"off",(e,t)=>this.events.off(e,t)),l1(this,"removeListener",(e,t)=>this.events.removeListener(e,t)),l1(this,"dispatchEnvelope",e=>{let{topic:t,message:n,sessionExists:r}=e;if(!t||!n)return;let i={topic:t,message:n,publishedAt:Date.now(),transportType:oI.link_mode};this.relayer.onLinkMessageEvent(i,{sessionExists:r})});let n=this.getGlobalCore(null==e?void 0:e.customStoragePrefix);if(n)try{return this.customStoragePrefix=n.customStoragePrefix,this.logger=n.logger,this.heartbeat=n.heartbeat,this.crypto=n.crypto,this.history=n.history,this.expirer=n.expirer,this.storage=n.storage,this.relayer=n.relayer,this.pairing=n.pairing,this.verify=n.verify,this.echoClient=n.echoClient,this.linkModeSupportedApps=n.linkModeSupportedApps,this.eventClient=n.eventClient,this.initialized=n.initialized,this.logChunkController=n.logChunkController,n}catch(e){console.warn("Failed to copy global core",e)}this.projectId=null==e?void 0:e.projectId,this.relayUrl=(null==e?void 0:e.relayUrl)||oC,this.customStoragePrefix=null!=e&&e.customStoragePrefix?":".concat(e.customStoragePrefix):"";let r=(0,aX.getDefaultLoggerOptions)({level:"string"==typeof(null==e?void 0:e.logger)&&e.logger?e.logger:oy.logger,name:og}),{logger:i,chunkLoggerController:a}=(0,aX.generatePlatformLogger)({opts:r,maxSizeInBytes:null==e?void 0:e.maxLogBlobSizeInBytes,loggerOverride:null==e?void 0:e.logger});this.logChunkController=a,null!=(t=this.logChunkController)&&t.downloadLogsBlobInBrowser&&(window.downloadLogsBlobInBrowser=async()=>{var e,t;null!=(e=this.logChunkController)&&e.downloadLogsBlobInBrowser&&(null==(t=this.logChunkController)||t.downloadLogsBlobInBrowser({clientId:await this.crypto.getClientId()}))}),this.logger=(0,aX.generateChildLogger)(i,this.name),this.heartbeat=new aJ.HeartBeat,this.crypto=new sN(this,this.logger,null==e?void 0:e.keychain),this.history=new lP(this,this.logger),this.expirer=new lO(this,this.logger),this.storage=null!=e&&e.storage?e.storage:new aQ.default(l0(l0({},ov),null==e?void 0:e.storageOptions)),this.relayer=new lu({core:this,logger:this.logger,relayUrl:this.relayUrl,projectId:this.projectId}),this.pairing=new lT(this,this.logger),this.verify=new lL(this,this.logger,this.storage),this.echoClient=new lU(this.projectId||"",this.logger),this.linkModeSupportedApps=[],this.eventClient=new lK(this,this.logger,null==e?void 0:e.telemetryEnabled),this.setGlobalCore(this)}}let l3="client",l5="".concat("wc","@").concat(2,":").concat(l3,":"),l4={name:l3,logger:"error"},l6="WALLETCONNECT_DEEPLINK_CHOICE",l8=(z.THIRTY_DAYS,"Proposal expired"),l9=z.SEVEN_DAYS,l7={wc_sessionPropose:{req:{ttl:z.FIVE_MINUTES,prompt:!0,tag:1100},res:{ttl:z.FIVE_MINUTES,prompt:!1,tag:1101},reject:{ttl:z.FIVE_MINUTES,prompt:!1,tag:1120},autoReject:{ttl:z.FIVE_MINUTES,prompt:!1,tag:1121}},wc_sessionSettle:{req:{ttl:z.FIVE_MINUTES,prompt:!1,tag:1102},res:{ttl:z.FIVE_MINUTES,prompt:!1,tag:1103}},wc_sessionUpdate:{req:{ttl:z.ONE_DAY,prompt:!1,tag:1104},res:{ttl:z.ONE_DAY,prompt:!1,tag:1105}},wc_sessionExtend:{req:{ttl:z.ONE_DAY,prompt:!1,tag:1106},res:{ttl:z.ONE_DAY,prompt:!1,tag:1107}},wc_sessionRequest:{req:{ttl:z.FIVE_MINUTES,prompt:!0,tag:1108},res:{ttl:z.FIVE_MINUTES,prompt:!1,tag:1109}},wc_sessionEvent:{req:{ttl:z.FIVE_MINUTES,prompt:!0,tag:1110},res:{ttl:z.FIVE_MINUTES,prompt:!1,tag:1111}},wc_sessionDelete:{req:{ttl:z.ONE_DAY,prompt:!1,tag:1112},res:{ttl:z.ONE_DAY,prompt:!1,tag:1113}},wc_sessionPing:{req:{ttl:z.ONE_DAY,prompt:!1,tag:1114},res:{ttl:z.ONE_DAY,prompt:!1,tag:1115}},wc_sessionAuthenticate:{req:{ttl:z.ONE_HOUR,prompt:!0,tag:1116},res:{ttl:z.ONE_HOUR,prompt:!1,tag:1117},reject:{ttl:z.FIVE_MINUTES,prompt:!1,tag:1118},autoReject:{ttl:z.FIVE_MINUTES,prompt:!1,tag:1119}}},ce={min:z.FIVE_MINUTES,max:z.SEVEN_DAYS},ct={idle:"IDLE",active:"ACTIVE"},cn={eth_sendTransaction:{key:""},eth_sendRawTransaction:{key:""},wallet_sendCalls:{key:""},solana_signTransaction:{key:"signature"},solana_signAllTransactions:{key:"transactions"},solana_signAndSendTransaction:{key:"signature"},sui_signAndExecuteTransaction:{key:"digest"},sui_signTransaction:{key:""},hedera_signAndExecuteTransaction:{key:"transactionId"},hedera_executeTransaction:{key:"transactionId"},near_signTransaction:{key:""},near_signTransactions:{key:""},tron_signTransaction:{key:"txID"},xrpl_signTransaction:{key:""},xrpl_signTransactionFor:{key:""},algo_signTxn:{key:""},sendTransfer:{key:"txid"},stacks_stxTransfer:{key:"txId"},polkadot_signTransaction:{key:""}
1,cosmos_signDirect:{key:""}},cr=["wc_sessionPropose","wc_sessionRequest","wc_authRequest","wc_sessionAuthenticate"],ci="".concat("wc","@",1.5,":").concat("auth",":"),ca="".concat(ci,":PUB_KEY");var co=Object.defineProperty,cs=Object.defineProperties,cl=Object.getOwnPropertyDescriptors,cc=Object.getOwnPropertySymbols,cd=Object.prototype.hasOwnProperty,cu=Object.prototype.propertyIsEnumerable,ch=(e,t,n)=>t in e?co(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,cp=(e,t)=>{for(var n in t||(t={}))cd.call(t,n)&&ch(e,n,t[n]);if(cc)for(var n of cc(t))cu.call(t,n)&&ch(e,n,t[n]);return e},cf=(e,t)=>cs(e,cl(t)),cg=(e,t,n)=>ch(e,"symbol"!=typeof t?t+"":t,n);class cm extends oc{async processPendingMessageEvents(){try{let e=this.client.session.keys,t=this.client.core.relayer.messages.getWithoutAck(e);for(let[e,n]of Object.entries(t))for(let t of n)try{await this.onProviderMessageEvent({topic:e,message:t,publishedAt:Date.now()})}catch(n){this.client.logger.warn("Error processing pending message event for topic: ".concat(e,", message: ").concat(t))}}catch(e){this.client.logger.warn("processPendingMessageEvents failed",e)}}isInitialized(){if(!this.initialized){let{message:e}=aj("NOT_INITIALIZED",this.name);throw Error(e)}}async confirmOnlineStateOrThrow(){await this.client.core.relayer.confirmOnlineStateOrThrow()}registerRelayerEvents(){this.client.core.relayer.on(oE.message,e=>{this.onProviderMessageEvent(e)})}async onRelayMessage(e){let{topic:t,message:n,attestation:r,transportType:i}=e,{publicKey:a}=this.client.auth.authKeys.keys.includes(ca)?this.client.auth.authKeys.get(ca):{responseTopic:void 0,publicKey:void 0};try{let e=await this.client.core.crypto.decode(t,n,{receiverPublicKey:a,encoding:i===oI.link_mode?i6:i4});(0,op.isJsonRpcRequest)(e)?(this.client.core.history.set(t,e),await this.onRelayEventRequest({topic:t,payload:e,attestation:r,transportType:i,encryptedId:ae(n)})):(0,op.isJsonRpcResponse)(e)?(await this.client.core.history.resolve(e),await this.onRelayEventResponse({topic:t,payload:e,transportType:i}),this.client.core.history.delete(t,e.id)):await this.onRelayEventUnknownPayload({topic:t,payload:e,transportType:i}),await this.client.core.relayer.messages.ack(t,n)}catch(e){this.client.logger.error(e)}}registerExpirerEvents(){this.client.core.expirer.on(oN.expired,async e=>{let{topic:t,id:n}=tv(e.target);return n&&this.client.pendingRequest.keys.includes(n)?await this.deletePendingSessionRequest(n,aj("EXPIRED"),!0):n&&this.client.auth.requests.keys.includes(n)?await this.deletePendingAuthRequest(n,aj("EXPIRED"),!0):void(t?this.client.session.keys.includes(t)&&(await this.deleteSession({topic:t,expirerHasDeleted:!0}),this.client.events.emit("session_expire",{topic:t})):n&&(await this.deleteProposal(n,!0),this.client.events.emit("proposal_expire",{id:n})))})}registerPairingEvents(){this.client.core.pairing.events.on(oP.create,e=>this.onPairingCreated(e)),this.client.core.pairing.events.on(oP.delete,e=>{this.addToRecentlyDeleted(e.topic,"pairing")})}isValidPairingTopic(e){if(!aM(e,!1)){let{message:t}=aj("MISSING_OR_INVALID","pairing topic should be a string: ".concat(e));throw Error(t)}if(!this.client.core.pairing.pairings.keys.includes(e)){let{message:t}=aj("NO_MATCHING_KEY","pairing topic doesn't exist: ".concat(e));throw Error(t)}if(tw(this.client.core.pairing.pairings.get(e).expiry)){let{message:t}=aj("EXPIRED","pairing topic: ".concat(e));throw Error(t)}}async isValidSessionTopic(e){if(!aM(e,!1)){let{message:t}=aj("MISSING_OR_INVALID","session topic should be a string: ".concat(e));throw Error(t)}if(this.checkRecentlyDeleted(e),!this.client.session.keys.includes(e)){let{message:t}=aj("NO_MATCHING_KEY","session topic doesn't exist: ".concat(e));throw Error(t)}if(tw(this.client.session.get(e).expiry)){await this.deleteSession({topic:e});let{message:t}=aj("EXPIRED","session topic: ".concat(e));throw Error(t)}if(!this.client.core.crypto.keychain.has(e)){let{message:t}=aj("MISSING_OR_INVALID","session topic does not exist in keychain: ".concat(e));throw await this.deleteSession({topic:e}),Error(t)}}async isValidSessionOrPairingTopic(e){if(this.checkRecentlyDeleted(e),this.client.session.keys.includes(e))await this.isValidSessionTopic(e);else if(this.client.core.pairing.pairings.keys.includes(e))this.isValidPairingTopic(e);else if(aM(e,!1)){let{message:t}=aj("NO_MATCHING_KEY","session or pairing topic doesn't exist: ".concat(e));throw Error(t)}else{let{message:t}=aj("MISSING_OR_INVALID","session or pairing topic should be a string: ".concat(e));throw Error(t)}}async isValidProposalId(e){if("number"!=typeof e){let{message:t}=aj("MISSING_OR_INVALID","proposal id should be a number: ".concat(e));throw Error(t)}if(!this.client.proposal.keys.includes(e)){let{message:t}=aj("NO_MATCHING_KEY","proposal id doesn't exist: ".concat(e));throw Error(t)}if(tw(this.client.proposal.get(e).expiryTimestamp)){await this.deleteProposal(e);let{message:t}=aj("EXPIRED","proposal id: ".concat(e));throw Error(t)}}constructor(t){var n;super(t),n=this,cg(this,"name","engine"),cg(this,"events",new F.default),cg(this,"initialized",!1),cg(this,"requestQueue",{state:ct.idle,queue:[]}),cg(this,"sessionRequestQueue",{state:ct.idle,queue:[]}),cg(this,"emittedSessionRequests",new t_({limit:500})),cg(this,"requestQueueDelay",z.ONE_SECOND),cg(this,"expectedPairingMethodMap",new Map),cg(this,"recentlyDeletedMap",new Map),cg(this,"recentlyDeletedLimit",200),cg(this,"relayMessageCache",[]),cg(this,"pendingSessions",new Map),cg(this,"init",async()=>{this.initialized||(await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.registerPairingEvents(),await this.registerLinkModeListeners(),this.client.core.pairing.register({methods:Object.keys(l7)}),this.initialized=!0,setTimeout(async()=>{await this.processPendingMessageEvents(),this.sessionRequestQueue.queue=this.getPendingSessionRequests(),this.processSessionRequestQueue()},(0,z.toMiliseconds)(this.requestQueueDelay)))}),cg(this,"connect",async e=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();let t=cf(cp({},e),{requiredNamespaces:e.requiredNamespaces||{},optionalNamespaces:e.optionalNamespaces||{}});await this.isValidConnect(t),t.optionalNamespaces=function(e,t){var n,r,i,a,o,s;let l=aI(e),c=aI(t),d={};for(let e of Object.keys(l).concat(Object.keys(c)))d[e]={chains:tC(null==(n=l[e])?void 0:n.chains,null==(r=c[e])?void 0:r.chains),methods:tC(null==(i=l[e])?void 0:i.methods,null==(a=c[e])?void 0:a.methods),events:tC(null==(o=l[e])?void 0:o.events,null==(s=c[e])?void 0:s.events)};return d}(t.requiredNamespaces,t.optionalNamespaces),t.requiredNamespaces={};let{pairingTopic:n,requiredNamespaces:r,optionalNamespaces:i,sessionProperties:a,scopedProperties:o,relays:s}=t,l=n,c,d=!1;try{if(l){let e=this.client.core.pairing.pairings.get(l);this.client.logger.warn("connect() with existing pairing topic is deprecated and will be removed in the next major release."),d=e.active}}catch(e){throw this.client.logger.error("connect() -> pairing.get(".concat(l,") failed")),e}if(!l||!d){let{topic:e,uri:t}=await this.client.core.pairing.create({internal:{skipSubscribe:!0}});l=e,c=t}if(!l){let{message:e}=aj("NO_MATCHING_KEY","connect() pairing topic: ".concat(l));throw Error(e)}let u=await this.client.core.crypto.generateKeyPair(),h=l7.wc_sessionPropose.req.ttl||z.FIVE_MINUTES,p=tb(h),f=cf(cp(cp({requiredNamespaces:r,optionalNamespaces:i,relays:null!=s?s:[{protocol:"irn"}],proposer:{publicKey:u,metadata:this.client.metadata},expiryTimestamp:p,pairingTopic:l},a&&{sessionProperties:a}),o&&{scopedProperties:o}),{id:(0,oh.payloadId)()}),g=tx("session_connect",f.id),{reject:m,resolve:y,done:b}=tg(h,l8),w=e=>{let{id:t}=e;t===f.id&&(this.client.events.off("proposal_expire",w),this.pendingSessions.delete(f.id),this.events.emit(g,{error:{message:l8,code:0}}))};return this.client.events.on("proposal_expire",w),this.events.once(g,e=>{let{error:t,session:n}=e;this.client.events.off("proposal_expire",w),t?m(t):n&&y(n)}),await this.sendProposeSession({proposal:f,publishOpts:{internal:{throwOnFailedPublish:!0},tvf:{correlationId:f.id}}}),await this.setProposal(f.id,f),{uri:c,approval:b}}),cg(this,"pair",async e=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();try{return await this.client.core.pairing.pair(e)}catch(e){throw this.client.logger.error("pair() failed"),e}}),cg(this,"approve",async e=>{var t,n,r;let i=this.client.core.eventClient.createEvent({properties:{topic:null==(t=null==e?void 0:e.id)?void 0:t.toString(),trace:[oF.session_approve_started]}});try{this.isInitialized(),await this.confirmOnlineStateOrThrow()}catch(e){throw i.setError(oU.no_internet_connection),e}try{await this.isValidProposalId(null==e?void 0:e.id)}catch(t){throw this.client.logger.error("approve() -> proposal.get(".concat(null==e?void 0:e.id,") failed")),i.setError(oU.proposal_not_found),t}try{await this.isValidApprove(e)}catch(e){throw this.client.logger.error("approve() -> isValidApprove() failed"),i.setError(oU.session_approve_namespace_validation_failure),e}let{id:a,relayProtocol:o,namespaces:s,sessionProperties:l,scopedProperties:c,sessionConfig:d}=e,u=this.client.proposal.get(a);this.client.core.eventClient.deleteEvent({eventId:i.eventId});let{pairingTopic:h,proposer:p,requiredNamespaces:f,optionalNamespaces:g}=u,m=null==(n=this.client.core.eventClient)?void 0:n.getEvent({topic:h});m||(m=null==(r=this.client.core.eventClient)?void 0:r.createEvent({type:oF.session_approve_started,properties:{topic:h,trace:[oF.session_approve_started,oF.session_namespaces_validation_success]}}));let y=await this.client.core.crypto.generateKeyPair(),b=p.publicKey,w=await this.client.core.crypto.generateSharedKey(y,b),x=cp(cp(cp({relay:{protocol:null!=o?o:"irn"},namespaces:s,controller:{publicKey:y,metadata:this.client.metadata},expiry:tb(l9)},l&&{sessionProperties:l}),c&&{scopedProperties:c}),d&&{sessionConfig:d}),C=oI.relay;m.addTrace(oF.subscribing_session_topic);try{await this.client.core.relayer.subscribe(w,{transportType:C,internal:{skipSubscribe:!0}})}catch(e){throw m.setError(oU.subscribe_session_topic_failure),e}m.addTrace(oF.subscribe_session_topic_success);let E=cf(cp({},x),{topic:w,requiredNamespaces:f,optionalNamespaces:g,pairingTopic:h,acknowledged:!1,self:x.controller,peer:{publicKey:p.publicKey,metadata:p.metadata},controller:y,transportType:oI.relay});await this.client.session.set(w,E),m.addTrace(oF.store_session);try{await this.sendApproveSession({sessionTopic:w,proposal:u,pairingProposalResponse:{relay:{protocol:null!=o?o:"irn"},responderPublicKey:y},sessionSettleRequest:x,publishOpts:{internal:{throwOnFailedPublish:!0},tvf:{correlationId:a}}}),m.addTrace(oF.session_approve_publish_success)}catch(e){throw this.client.logger.error(e),this.client.session.delete(w,aP("USER_DISCONNECTED")),await this.client.core.relayer.unsubscribe(w),e}return this.client.core.eventClient.deleteEvent({eventId:m.eventId}),await this.client.core.pairing.updateMetadata({topic:h,metadata:p.metadata}),await this.deleteProposal(a),await this.client.core.pairing.activate({topic:h}),await this.setExpiry(w,tb(l9)),{topic:w,acknowledged:()=>Promise.resolve(this.client.session.get(w))}}),cg(this,"reject",async e=>{let t;this.isInitialized(),await this.confirmOnlineStateOrThrow();try{await this.isValidReject(e)}catch(e){throw this.client.logger.error("reject() -> isValidReject() failed"),e}let{id:n,reason:r}=e;try{t=this.client.proposal.get(n).pairingTopic}catch(e){throw this.client.logger.error("reject() -> proposal.get(".concat(n,") failed")),e}
1t&&await this.sendError({id:n,topic:t,error:r,rpcOpts:l7.wc_sessionPropose.reject}),await this.deleteProposal(n)}),cg(this,"update",async e=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();try{await this.isValidUpdate(e)}catch(e){throw this.client.logger.error("update() -> isValidUpdate() failed"),e}let{topic:t,namespaces:n}=e,{done:r,resolve:i,reject:a}=tg(),o=(0,oh.payloadId)(),s=(0,oh.getBigIntRpcId)().toString(),l=this.client.session.get(t).namespaces;return this.events.once(tx("session_update",o),e=>{let{error:t}=e;t?a(t):i()}),await this.client.session.update(t,{namespaces:n}),await this.sendRequest({topic:t,method:"wc_sessionUpdate",params:{namespaces:n},throwOnFailedPublish:!0,clientRpcId:o,relayRpcId:s}).catch(e=>{this.client.logger.error(e),this.client.session.update(t,{namespaces:l}),a(e)}),{acknowledged:r}}),cg(this,"extend",async e=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();try{await this.isValidExtend(e)}catch(e){throw this.client.logger.error("extend() -> isValidExtend() failed"),e}let{topic:t}=e,n=(0,oh.payloadId)(),{done:r,resolve:i,reject:a}=tg();return this.events.once(tx("session_extend",n),e=>{let{error:t}=e;t?a(t):i()}),await this.setExpiry(t,tb(l9)),this.sendRequest({topic:t,method:"wc_sessionExtend",params:{},clientRpcId:n,throwOnFailedPublish:!0}).catch(e=>{a(e)}),{acknowledged:r}}),cg(this,"request",async e=>{this.isInitialized();try{await this.isValidRequest(e)}catch(e){throw this.client.logger.error("request() -> isValidRequest() failed"),e}let{chainId:t,request:n,topic:r,expiry:i=l7.wc_sessionRequest.req.ttl}=e,a=this.client.session.get(r);(null==a?void 0:a.transportType)===oI.relay&&await this.confirmOnlineStateOrThrow();let o=(0,oh.payloadId)(),s=(0,oh.getBigIntRpcId)().toString(),{done:l,resolve:c,reject:d}=tg(i,"Request expired. Please try again.");this.events.once(tx("session_request",o),e=>{let{error:t,result:n}=e;t?d(t):c(n)});let u="wc_sessionRequest",h=this.getAppLinkIfEnabled(a.peer.metadata,a.transportType);if(h)return await this.sendRequest({clientRpcId:o,relayRpcId:s,topic:r,method:u,params:{request:cf(cp({},n),{expiryTimestamp:tb(i)}),chainId:t},expiry:i,throwOnFailedPublish:!0,appLink:h}).catch(e=>d(e)),this.client.events.emit("session_request_sent",{topic:r,request:n,chainId:t,id:o}),await l();let p={request:cf(cp({},n),{expiryTimestamp:tb(i)}),chainId:t};return await Promise.all([new Promise(async e=>{await this.sendRequest({clientRpcId:o,relayRpcId:s,topic:r,method:u,params:p,expiry:i,throwOnFailedPublish:!0,tvf:this.getTVFParams(o,p)}).catch(e=>d(e)),this.client.events.emit("session_request_sent",{topic:r,request:n,chainId:t,id:o}),e()}),new Promise(async e=>{var t;if(!(null!=(t=a.sessionConfig)&&t.disableDeepLink)){let e=await tk(this.client.core.storage,l6);await tE({id:o,topic:r,wcDeepLink:e})}e()}),l()]).then(e=>e[2])}),cg(this,"respond",async e=>{this.isInitialized(),await this.isValidRespond(e);let{topic:t,response:n}=e,{id:r}=n,i=this.client.session.get(t);i.transportType===oI.relay&&await this.confirmOnlineStateOrThrow();let a=this.getAppLinkIfEnabled(i.peer.metadata,i.transportType);(0,op.isJsonRpcResult)(n)?await this.sendResult({id:r,topic:t,result:n.result,throwOnFailedPublish:!0,appLink:a}):(0,op.isJsonRpcError)(n)&&await this.sendError({id:r,topic:t,error:n.error,appLink:a}),this.cleanupAfterResponse(e)}),cg(this,"ping",async e=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();try{await this.isValidPing(e)}catch(e){throw this.client.logger.error("ping() -> isValidPing() failed"),e}let{topic:t}=e;if(this.client.session.keys.includes(t)){let e=(0,oh.payloadId)(),n=(0,oh.getBigIntRpcId)().toString(),{done:r,resolve:i,reject:a}=tg();this.events.once(tx("session_ping",e),e=>{let{error:t}=e;t?a(t):i()}),await Promise.all([this.sendRequest({topic:t,method:"wc_sessionPing",params:{},throwOnFailedPublish:!0,clientRpcId:e,relayRpcId:n}),r()])}else this.client.core.pairing.pairings.keys.includes(t)&&(this.client.logger.warn("ping() on pairing topic is deprecated and will be removed in the next major release."),await this.client.core.pairing.ping({topic:t}))}),cg(this,"emit",async e=>{this.isInitialized(),await this.confirmOnlineStateOrThrow(),await this.isValidEmit(e);let{topic:t,event:n,chainId:r}=e,i=(0,oh.getBigIntRpcId)().toString(),a=(0,oh.payloadId)();await this.sendRequest({topic:t,method:"wc_sessionEvent",params:{event:n,chainId:r},throwOnFailedPublish:!0,relayRpcId:i,clientRpcId:a})}),cg(this,"disconnect",async e=>{this.isInitialized(),await this.confirmOnlineStateOrThrow(),await this.isValidDisconnect(e);let{topic:t}=e;if(this.client.session.keys.includes(t))await this.sendRequest({topic:t,method:"wc_sessionDelete",params:aP("USER_DISCONNECTED"),throwOnFailedPublish:!0}),await this.deleteSession({topic:t,emitEvent:!1});else if(this.client.core.pairing.pairings.keys.includes(t))await this.client.core.pairing.disconnect({topic:t});else{let{message:e}=aj("MISMATCHED_TOPIC","Session or pairing topic not found: ".concat(t));throw Error(e)}}),cg(this,"find",e=>(this.isInitialized(),this.client.session.getAll().filter(t=>(function(e,t){let{requiredNamespaces:n}=t,r=Object.keys(e.namespaces),i=Object.keys(n),a=!0;return!!th(i,r)&&(r.forEach(t=>{let{accounts:r,methods:i,events:o}=e.namespaces[t],s=aE(r),l=n[t];th(e5(t,l),s)&&th(l.methods,i)&&th(l.events,o)||(a=!1)}),a)})(t,e)))),cg(this,"getPendingSessionRequests",()=>
1this.client.pendingRequest.getAll()),cg(this,"authenticate",async(e,t)=>{var n,r,i;let a;this.isInitialized(),this.isValidAuthenticate(e);let o=t&&this.client.core.linkModeSupportedApps.includes(t)&&(null==(n=this.client.metadata.redirect)?void 0:n.linkMode),s=o?oI.link_mode:oI.relay;s===oI.relay&&await this.confirmOnlineStateOrThrow();let{chains:l,statement:c="",uri:d,domain:u,nonce:h,type:p,exp:f,nbf:g,methods:m=[],expiry:y}=e,b=[...e.resources||[]],{topic:w,uri:x}=await this.client.core.pairing.create({methods:["wc_sessionAuthenticate"],transportType:s});this.client.logger.info({message:"Generated new pairing",pairing:{topic:w,uri:x}});let C=await this.client.core.crypto.generateKeyPair(),E=i7(C);if(await Promise.all([this.client.auth.authKeys.set(ca,{responseTopic:E,publicKey:C}),this.client.auth.pairingTopics.set(E,{topic:E,pairingTopic:w})]),await this.client.core.relayer.subscribe(E,{transportType:s}),this.client.logger.info("sending request to new pairing topic: ".concat(w)),m.length>0){let{namespace:e}=e2(l[0]),t=rc(function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return null==n||n.sort((e,t)=>e.localeCompare(t)),{att:{[e]:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object.assign({},...(t=null==t?void 0:t.sort((e,t)=>e.localeCompare(t))).map(t=>({["".concat(e,"/").concat(t)]:[n]})))}(t,n,r)}}}(e,"request",m));rp(b)&&(r=t,i=b.pop(),t=rc(function(e,t){rl(e),rl(t);let n=Object.keys(e.att).concat(Object.keys(t.att)).sort((e,t)=>e.localeCompare(t)),r={att:{}};return n.forEach(n=>{var i,a;Object.keys((null==(i=e.att)?void 0:i[n])||{}).concat(Object.keys((null==(a=t.att)?void 0:a[n])||{})).sort((e,t)=>e.localeCompare(t)).forEach(i=>{var a,o;r.att[n]=n8(((e,t)=>{for(var n in t||(t={}))re.call(t,n)&&rn(e,n,t[n]);if(n7)for(var n of n7(t))rt.call(t,n)&&rn(e,n,t[n]);return e})({},r.att[n]),n9({[i]:(null==(a=e.att[n])?void 0:a[i])||(null==(o=t.att[n])?void 0:o[i])}))})}),r}(rd(r),rd(i)))),b.push(t)}let k=y&&y>l7.wc_sessionAuthenticate.req.ttl?y:l7.wc_sessionAuthenticate.req.ttl,S={authPayload:{type:null!=p?p:"caip122",chains:l,statement:c,aud:d,domain:u,version:"1",nonce:h,iat:new Date().toISOString(),exp:f,nbf:g,resources:b},requester:{publicKey:C,metadata:this.client.metadata},expiryTimestamp:tb(k)},I={requiredNamespaces:{},optionalNamespaces:{eip155:{chains:l,methods:[...new Set(["personal_sign",...m])],events:["chainChanged","accountsChanged"]}},relays:[{protocol:"irn"}],pairingTopic:w,proposer:{publicKey:C,metadata:this.client.metadata},expiryTimestamp:tb(l7.wc_sessionPropose.req.ttl),id:(0,oh.payloadId)()},{done:A,resolve:T,reject:_}=tg(k,"Request expired"),j=(0,oh.payloadId)(),P=tx("session_connect",I.id),$=tx("session_request",j),N=async e=>{let{error:t,session:n}=e;this.events.off($,O),t?_(t):n&&T({session:n})},O=async e=>{var n,r,i;let a;if(await this.deletePendingAuthRequest(j,{message:"fulfilled",code:0}),e.error){let t=aP("WC_METHOD_UNSUPPORTED","wc_sessionAuthenticate");return e.error.code===t.code?void 0:(this.events.off(P,N),_(e.error.message))}await this.deleteProposal(I.id),this.events.off(P,N);let{cacaos:o,responder:l}=e.result,c=[],d=[];for(let e of o){await ro({cacao:e,projectId:this.client.core.projectId})||(this.client.logger.error(e,"Signature verification failed"),_(aP("SESSION_SETTLEMENT_FAILED","Signature verification failed")));let{p:t}=e,n=rp(t.resources),r=[ri(t.iss)],i=ra(t.iss);if(n){let e=ru(n),t=rh(n);c.push(...e),r.push(...t)}for(let e of r)d.push("".concat(e,":").concat(i))}let u=await this.client.core.crypto.generateSharedKey(C,l.publicKey);c.length>0&&(a={topic:u,acknowledged:!0,self:{publicKey:C,metadata:this.client.metadata},peer:l,controller:l.publicKey,expiry:tb(l9),requiredNamespaces:{},optionalNamespaces:{},relay:{protocol:"irn"},pairingTopic:w,namespaces:aA([...new Set(c)],[...new Set(d)]),transportType:s},await this.client.core.relayer.subscribe(u,{transportType:s}),await this.client.session.set(u,a),w&&await this.client.core.pairing.updateMetadata({topic:w,metadata:l.metadata}),a=this.client.session.get(u)),null!=(n=this.client.metadata.redirect)&&n.linkMode&&null!=(r=l.metadata.redirect)&&r.linkMode&&null!=(i=l.metadata.redirect)&&i.universal&&t&&(this.client.core.addLinkModeSupportedApp(l.metadata.redirect.universal),this.client.session.update(u,{transportType:oI.link_mode})),T({auths:o,session:a})};this.events.once(P,N),this.events.once($,O);try{if(o){let e=(0,oh.formatJsonRpcRequest)("wc_sessionAuthenticate",S,j);this.client.core.history.set(w,e);let n=await this.client.core.crypto.encode("",e,{type:2,encoding:i6});a=ap(t,w,n)}else await Promise.all([this.sendRequest({topic:w,method:"wc_sessionAuthenticate",params:S,expiry:e.expiry,throwOnFailedPublish:!0,clientRpcId:j}),this.sendRequest({topic:w,method:"wc_sessionPropose",params:I,expiry:l7.wc_sessionPropose.req.ttl,throwOnFailedPublish:!0,clientRpcId:I.id})])}catch(e){throw this.events.off(P,N),this.events.off($,O),e}return await this.setProposal(I.id,I),await this.setAuthRequest(j,{request:cf(cp({},S),{verifyContext:{}}),pairingTopic:w,transportType:s}),{uri:null!=a?a:x,response:A}}),cg(this,"approveSessionAuthenticate",async e=>{let t,{id:n,auths:r}=e,i=this.client.core.eventClient.createEvent({properties:{topic:n.toString(),trace:[oB.authenticated_session_approve_started]}});try{this.isInitialized()}catch(e){throw i.setError(oz.no_internet_connection),e}let a=this.getPendingAuthRequest(n);if(!a)throw i.setError(oz.authenticated_session_pending_request_not_found),Error("Could not find pending auth request with id ".concat(n));let o=a.transportType||oI.relay;o===oI.relay&&await this.confirmOnlineStateOrThrow();let s=a.requester.publicKey,l=await this.client.core.crypto.generateKeyPair(),c=i7(s),d={type:1,receiverPublicKey:s,senderPublicKey:l},u=[],h=[];for(let e of r){if(!await ro({cacao:e,projectId:this.client.core.projectId}
1)){i.setError(oz.invalid_cacao);let e=aP("SESSION_SETTLEMENT_FAILED","Signature verification failed");throw await this.sendError({id:n,topic:c,error:e,encodeOpts:d}),Error(e.message)}i.addTrace(oB.cacaos_verified);let{p:t}=e,r=rp(t.resources),a=[ri(t.iss)],o=ra(t.iss);if(r){let e=ru(r),t=rh(r);u.push(...e),a.push(...t)}for(let e of a)h.push("".concat(e,":").concat(o))}let p=await this.client.core.crypto.generateSharedKey(l,s);if(i.addTrace(oB.create_authenticated_session_topic),(null==u?void 0:u.length)>0){t={topic:p,acknowledged:!0,self:{publicKey:l,metadata:this.client.metadata},peer:{publicKey:s,metadata:a.requester.metadata},controller:s,expiry:tb(l9),authentication:r,requiredNamespaces:{},optionalNamespaces:{},relay:{protocol:"irn"},pairingTopic:a.pairingTopic,namespaces:aA([...new Set(u)],[...new Set(h)]),transportType:o},i.addTrace(oB.subscribing_authenticated_session_topic);try{await this.client.core.relayer.subscribe(p,{transportType:o})}catch(e){throw i.setError(oz.subscribe_authenticated_session_topic_failure),e}i.addTrace(oB.subscribe_authenticated_session_topic_success),await this.client.session.set(p,t),i.addTrace(oB.store_authenticated_session),await this.client.core.pairing.updateMetadata({topic:a.pairingTopic,metadata:a.requester.metadata})}i.addTrace(oB.publishing_authenticated_session_approve);try{await this.sendResult({topic:c,id:n,result:{cacaos:r,responder:{publicKey:l,metadata:this.client.metadata}},encodeOpts:d,throwOnFailedPublish:!0,appLink:this.getAppLinkIfEnabled(a.requester.metadata,o)})}catch(e){throw i.setError(oz.authenticated_session_approve_publish_failure),e}return await this.client.auth.requests.delete(n,{message:"fulfilled",code:0}),await this.client.core.pairing.activate({topic:a.pairingTopic}),this.client.core.eventClient.deleteEvent({eventId:i.eventId}),{session:t}}),cg(this,"rejectSessionAuthenticate",async e=>{this.isInitialized();let{id:t,reason:n}=e,r=this.getPendingAuthRequest(t);if(!r)throw Error("Could not find pending auth request with id ".concat(t));r.transportType===oI.relay&&await this.confirmOnlineStateOrThrow();let i=r.requester.publicKey,a=await this.client.core.crypto.generateKeyPair(),o=i7(i);await this.sendError({id:t,topic:o,error:n,encodeOpts:{type:1,receiverPublicKey:i,senderPublicKey:a},rpcOpts:l7.wc_sessionAuthenticate.reject,appLink:this.getAppLinkIfEnabled(r.requester.metadata,r.transportType)}),await this.client.auth.requests.delete(t,{message:"rejected",code:0}),await this.deleteProposal(t)}),cg(this,"formatAuthMessage",e=>{this.isInitialized();let{request:t,iss:n}=e;return rs(t,n)}),cg(this,"processRelayMessageCache",()=>{setTimeout(async()=>{if(0!==this.relayMessageCache.length)for(;this.relayMessageCache.length>0;)try{let e=this.relayMessageCache.shift();e&&await this.onRelayMessage(e)}catch(e){this.client.logger.error(e)}},50)}),cg(this,"cleanupDuplicatePairings",async e=>{if(e.pairingTopic)try{let t=this.client.core.pairing.pairings.get(e.pairingTopic),n=this.client.core.pairing.pairings.getAll().filter(n=>{var r,i;return(null==(r=n.peerMetadata)?void 0:r.url)&&(null==(i=n.peerMetadata)?void 0:i.url)===e.peer.metadata.url&&n.topic&&n.topic!==t.topic});if(0===n.length)return;this.client.logger.info("Cleaning up ".concat(n.length," duplicate pairing(s)")),await Promise.all(n.map(e=>this.client.core.pairing.disconnect({topic:e.topic}))),this.client.logger.info("Duplicate pairings clean up finished")}catch(e){this.client.logger.error(e)}}),cg(this,"deleteSession",async e=>{var t;let{topic:n,expirerHasDeleted:r=!1,emitEvent:i=!0,id:a=0}=e,{self:o}=this.client.session.get(n);await this.client.core.relayer.unsubscribe(n),await this.client.session.delete(n,aP("USER_DISCONNECTED")),this.addToRecentlyDeleted(n,"session"),this.client.core.crypto.keychain.has(o.publicKey)&&await this.client.core.crypto.deleteKeyPair(o.publicKey),this.client.core.crypto.keychain.has(n)&&await this.client.core.crypto.deleteSymKey(n),r||this.client.core.expirer.del(n),this.client.core.storage.removeItem(l6).catch(e=>this.client.logger.warn(e)),this.getPendingSessionRequests().forEac
1h(e=>{e.topic===n&&this.deletePendingSessionRequest(e.id,aP("USER_DISCONNECTED"))}),n===(null==(t=this.sessionRequestQueue.queue[0])?void 0:t.topic)&&(this.sessionRequestQueue.state=ct.idle),i&&this.client.events.emit("session_delete",{id:a,topic:n})}),cg(this,"deleteProposal",async(e,t)=>{if(t)try{let t=this.client.proposal.get(e),n=this.client.core.eventClient.getEvent({topic:t.pairingTopic});null==n||n.setError(oU.proposal_expired)}catch(e){}await Promise.all([this.client.proposal.delete(e,aP("USER_DISCONNECTED")),t?Promise.resolve():this.client.core.expirer.del(e)]),this.addToRecentlyDeleted(e,"proposal")}),cg(this,"deletePendingSessionRequest",async function(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];await Promise.all([n.client.pendingRequest.delete(e,t),r?Promise.resolve():n.client.core.expirer.del(e)]),n.addToRecentlyDeleted(e,"request"),n.sessionRequestQueue.queue=n.sessionRequestQueue.queue.filter(t=>t.id!==e),r&&(n.sessionRequestQueue.state=ct.idle,n.client.events.emit("session_request_expire",{id:e}))}),cg(this,"deletePendingAuthRequest",async function(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];await Promise.all([n.client.auth.requests.delete(e,t),r?Promise.resolve():n.client.core.expirer.del(e)])}),cg(this,"setExpiry",async(e,t)=>{this.client.session.keys.includes(e)&&(this.client.core.expirer.set(e,t),await this.client.session.update(e,{expiry:t}))}),cg(this,"setProposal",async(e,t)=>{this.client.core.expirer.set(e,tb(l7.wc_sessionPropose.req.ttl)),await this.client.proposal.set(e,t)}),cg(this,"setAuthRequest",async(e,t)=>{let{request:n,pairingTopic:r,transportType:i=oI.relay}=t;this.client.core.expirer.set(e,n.expiryTimestamp),await this.client.auth.requests.set(e,{authPayload:n.authPayload,requester:n.requester,expiryTimestamp:n.expiryTimestamp,id:e,pairingTopic:r,verifyContext:n.verifyContext,transportType:i})}),cg(this,"setPendingSessionRequest",async e=>{let{id:t,topic:n,params:r,verifyContext:i}=e,a=r.request.expiryTimestamp||tb(l7.wc_sessionRequest.req.ttl);this.client.core.expirer.set(t,a),await this.client.pendingRequest.set(t,{id:t,topic:n,params:r,verifyContext:i})}),cg(this,"sendRequest",async t=>{let n,r,{topic:i,method:a,params:o,expiry:s,relayRpcId:l,clientRpcId:c,throwOnFailedPublish:d,appLink:u,tvf:h,publishOpts:p={}}=t,f=(0,oh.formatJsonRpcRequest)(a,o,c),g=!!u;try{let e=g?i6:i4;n=await this.client.core.crypto.encode(i,f,{encoding:e})}catch(e){throw await this.cleanup(),this.client.logger.error("sendRequest() -> core.crypto.encode() for topic ".concat(i," failed")),e}if(cr.includes(a)){let e=ae(JSON.stringify(f)),t=ae(n);r=await this.client.core.verify.register({id:t,decryptedId:e})}let m=cp(cp({},l7[a].req),p);if(m.attestation=r,s&&(m.ttl=s),l&&(m.id=l),this.client.core.history.set(i,f),g){let t=ap(u,i,n);await e.g.Linking.openURL(t,this.client.name)}else m.tvf=cf(cp({},h),{correlationId:f.id}),d?(m.internal=cf(cp({},m.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(i,n,m)):this.client.core.relayer.publish(i,n,m).catch(e=>this.client.logger.error(e));return f.id}),cg(this,"sendProposeSession",async e=>{let{proposal:t,publishOpts:n}=e,r=(0,oh.formatJsonRpcRequest)("wc_sessionPropose",t,t.id);this.client.core.history.set(t.pairingTopic,r);let i=await this.client.core.crypto.encode(t.pairingTopic,r,{encoding:i4}),a=ae(JSON.stringify(r)),o=ae(i),s=await this.client.core.verify.register({id:o,decryptedId:a});await this.client.core.relayer.publishCustom({payload:{pairingTopic:t.pairingTopic,sessionProposal:i},opts:cf(cp({},n),{publishMethod:"wc_proposeSession",attestation:s})})}),cg(this,"sendApproveSession",async e=>{let{sessionTopic:t,pairingProposalResponse:n,proposal:r,sessionSettleRequest:i,publishOpts:a}=e,o=(0,oh.formatJsonRpcResult)(r.id,n),s=await this.client.core.crypto.encode(r.pairingTopic,o,{encoding:i4}),l=(0,oh.formatJsonRpcRequest)("wc_sessionSettle",i,null==a?void 0:a.id),c=await this.client.core.crypto.encode(t,l,{encoding:i4});this.client.core.history.set(t,l),await this.client.core.relayer.publishCustom({payload:{sessionTopic:t,pairingTopic:r.pairingTopic,sessionProposalResponse:s,sessionSettlementRequest:c},opts:cf(cp({},a),{publishMethod:"wc_approveSession"})})}),cg(this,"sendResult",async t=>{let n,r,i,{id:a,topic:o,result:s,throwOnFailedPublish:l,encodeOpts:c,appLink:d}=t,u=(0,oh.formatJsonRpcResult)(a,s),h=d&&"u">typeof(null==e.g?void 0:e.g.Linking);try{let e=h?i6:i4;n=await this.client.core.crypto.encode(o,u,cf(cp({},c||{}),{encoding:e}))}catch(e){throw await this.cleanup(),this.client.logger.error("send
1Result() -> core.crypto.encode() for topic ".concat(o," failed")),e}try{let e=(r=await this.client.core.history.get(o,a)).request;try{i=this.getTVFParams(a,e.params,s)}catch(e){this.client.logger.warn("sendResult() -> getTVFParams() failed: ".concat(null==e?void 0:e.message))}}catch(e){throw this.client.logger.error("sendResult() -> history.get(".concat(o,", ").concat(a,") failed")),e}if(h){let t=ap(d,o,n);await e.g.Linking.openURL(t,this.client.name)}else{let e=l7[r.request.method].res;e.tvf=cf(cp({},i),{correlationId:a}),l?(e.internal=cf(cp({},e.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(o,n,e)):this.client.core.relayer.publish(o,n,e).catch(e=>this.client.logger.error(e))}await this.client.core.history.resolve(u)}),cg(this,"sendError",async t=>{let n,r,{id:i,topic:a,error:o,encodeOpts:s,rpcOpts:l,appLink:c}=t,d=(0,oh.formatJsonRpcError)(i,o),u=c&&"u">typeof(null==e.g?void 0:e.g.Linking);try{let e=u?i6:i4;n=await this.client.core.crypto.encode(a,d,cf(cp({},s||{}),{encoding:e}))}catch(e){throw await this.cleanup(),this.client.logger.error("sendError() -> core.crypto.encode() for topic ".concat(a," failed")),e}try{r=await this.client.core.history.get(a,i)}catch(e){throw this.client.logger.error("sendError() -> history.get(".concat(a,", ").concat(i,") failed")),e}if(u){let t=ap(c,a,n);await e.g.Linking.openURL(t,this.client.name)}else{let e=r.request.method,t=l||l7[e].res;this.client.core.relayer.publish(a,n,t)}await this.client.core.history.resolve(d)}),cg(this,"cleanup",async()=>{let e=[],t=[];this.client.session.getAll().forEach(t=>{let n=!1;tw(t.expiry)&&(n=!0),this.client.core.crypto.keychain.has(t.topic)||(n=!0),n&&e.push(t.topic)}),this.client.proposal.getAll().forEach(e=>{tw(e.expiryTimestamp)&&t.push(e.id)}),await Promise.all([...e.map(e=>this.deleteSession({topic:e})),...t.map(e=>this.deleteProposal(e))])}),cg(this,"onProviderMessageEvent",async e=>{!this.initialized||this.relayMessageCache.length>0?this.relayMessageCache.push(e):await this.onRelayMessage(e)}),cg(this,"onRelayEventRequest",async e=>{this.requestQueue.queue.push(e),await this.processRequestsQueue()}),cg(this,"processRequestsQueue",async()=>{if(this.requestQueue.state===ct.active)return void this.client.logger.info("Request queue already active, skipping...");for(this.client.logger.info("Request queue starting with ".concat(this.requestQueue.queue.length," requests"));this.requestQueue.queue.length>0;){this.requestQueue.state=ct.active;let e=this.requestQueue.queue.shift();if(e)try{await this.processRequest(e)}catch(e){this.client.logger.warn(e)}}this.requestQueue.state=ct.idle}),cg(this,"processRequest",async e=>{let{topic:t,payload:n,attestation:r,transportType:i,encryptedId:a}=e,o=n.method;if(!this.shouldIgnorePairingRequest({topic:t,requestMethod:o}))switch(o){case"wc_sessionPropose":return await this.onSessionProposeRequest
1({topic:t,payload:n,attestation:r,encryptedId:a});case"wc_sessionSettle":return await this.onSessionSettleRequest(t,n);case"wc_sessionUpdate":return await this.onSessionUpdateRequest(t,n);case"wc_sessionExtend":return await this.onSessionExtendRequest(t,n);case"wc_sessionPing":return await this.onSessionPingRequest(t,n);case"wc_sessionDelete":return await this.onSessionDeleteRequest(t,n);case"wc_sessionRequest":return await this.onSessionRequest({topic:t,payload:n,attestation:r,encryptedId:a,transportType:i});case"wc_sessionEvent":return await this.onSessionEventRequest(t,n);case"wc_sessionAuthenticate":return await this.onSessionAuthenticateRequest({topic:t,payload:n,attestation:r,encryptedId:a,transportType:i});default:return this.client.logger.info("Unsupported request method ".concat(o))}}),cg(this,"onRelayEventResponse",async e=>{let{topic:t,payload:n,transportType:r}=e,i=(await this.client.core.history.get(t,n.id)).request.method;switch(i){case"wc_sessionPropose":return this.onSessionProposeResponse(t,n,r);case"wc_sessionSettle":return this.onSessionSettleResponse(t,n);case"wc_sessionUpdate":return this.onSessionUpdateResponse(t,n);case"wc_sessionExtend":return this.onSessionExtendResponse(t,n);case"wc_sessionPing":return this.onSessionPingResponse(t,n);case"wc_sessionRequest":return this.onSessionRequestResponse(t,n);case"wc_sessionAuthenticate":return this.onSessionAuthenticateResponse(t,n);default:return this.client.logger.info("Unsupported response method ".concat(i))}}),cg(this,"onRelayEventUnknownPayload",e=>{let{topic:t}=e,{message:n}=aj("MISSING_OR_INVALID","Decoded payload on topic ".concat(t," is not identifiable as a JSON-RPC request or a response."));throw Error(n)}),cg(this,"shouldIgnorePairingRequest",e=>{let{topic:t,requestMethod:n}=e,r=this.expectedPairingMethodMap.get(t);return!(!r||r.includes(n))&&!!(r.includes("wc_sessionAuthenticate")&&this.client.events.listenerCount("session_authenticate")>0)}),cg(this,"onSessionProposeRequest",async e=>{let{topic:t,payload:n,attestation:r,encryptedId:i}=e,{params:a,id:o}=n;try{let e=this.client.core.eventClient.getEvent({topic:t});0===this.client.events.listenerCount("session_proposal")&&(console.warn("No listener for session_proposal event"),null==e||e.setError(oD.proposal_listener_not_found)),this.isValidConnect(cp({},n.params));let s=a.expiryTimestamp||tb(l7.wc_sessionPropose.req.ttl),l=cp({id:o,pairingTopic:t,expiryTimestamp:s,attestation:r,encryptedId:i},a);await this.setProposal(o,l);let c=await this.getVerifyContext({attestationId:r,hash:ae(JSON.stringify(n)),encryptedId:i,metadata:l.proposer.metadata});null==e||e.addTrace(oL.emit_session_proposal),this.client.events.emit("session_proposal",{id:o,params:l,verifyContext:c})}catch(e){await this.sendError({id:o,topic:t,error:e,rpcOpts:l7.wc_sessionPropose.autoReject}),this.client.logger.error(e)}}),cg(this,"onSessionProposeResponse",async(e,t,n)=>{let{id:r}=t;if((0,op.isJsonRpcResult)(t)){let{result:i}=t;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",result:i});let a=this.client.proposal.get(r);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",proposal:a});let o=a.proposer.publicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",selfPublicKey:o});let s=i.responderPublicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",peerPublicKey:s});let l=await this.client.core.crypto.generateSharedKey(o,s);this.pendingSessions.set(r,{sessionTopic:l,pairingTopic:e,proposalId:r,publicKey:o});let c=await this.client.core.relayer.subscribe(l,{transportType:n});this.client.logger.trace({type:"method",method:"onSessionProposeResponse",subscriptionId:c}),await this.client.core.pairing.activate({topic:e})}else if((0,op.isJsonRpcError)(t)){await this.deleteProposal(r);let e=tx("session_connect",r);if(0===this.events.listenerCount(e))throw Error("emitting ".concat(e," without any listeners, 954"));this.events.emit(e,{error:t.error})}}),cg(this,"onSessionSettleRequest",async(e,t)=>{let{id:n,params:r}=t;try{this.isValidSessionSettleRequest(r);let{relay:n,controller:i,expiry:a,namespaces:o,sessionProperties:s,scopedProperties:l,sessionConfig:c}=t.params,d=[...this.pendingSessions.values()].find(t=>t.sessionTopic===e);if(!d)return this.client.logger.error("Pending session not found for topic ".concat(e));let u=this.client.proposal.get(d.proposalId),h=cf(cp(cp(cp({topic:e,relay:n,expiry:a,namespaces:o,acknowledged:!0,pairingTopic:d.pairingTopic,requiredNamespaces:u.requiredNamespaces,optionalNamespaces:u.optionalNamespaces,controller:i.publicKey,self:{publicKey:d.publicKey,metadata:this.client.metadata},peer:{publicKey:i.publicKey,metadata:i.metadata}},s&&{sessionProperties:s}),l&&{scopedProperties:l}),c&&{sessionConfig:c}
1),{transportType:oI.relay});await this.client.session.set(h.topic,h),await this.setExpiry(h.topic,h.expiry),await this.client.core.pairing.updateMetadata({topic:d.pairingTopic,metadata:h.peer.metadata}),this.client.events.emit("session_connect",{session:h}),this.events.emit(tx("session_connect",d.proposalId),{session:h}),this.pendingSessions.delete(d.proposalId),this.deleteProposal(d.proposalId,!1),this.cleanupDuplicatePairings(h),await this.sendResult({id:t.id,topic:e,result:!0})}catch(t){await this.sendError({id:n,topic:e,error:t}),this.client.logger.error(t)}}),cg(this,"onSessionSettleResponse",async(e,t)=>{let{id:n}=t;(0,op.isJsonRpcResult)(t)?(await this.client.session.update(e,{acknowledged:!0}),this.events.emit(tx("session_approve",n),{})):(0,op.isJsonRpcError)(t)&&(await this.client.session.delete(e,aP("USER_DISCONNECTED")),this.events.emit(tx("session_approve",n),{error:t.error}))}),cg(this,"onSessionUpdateRequest",async(e,t)=>{let{params:n,id:r}=t;try{let t="".concat(e,"_session_update"),i=aY.get(t);if(i&&this.isRequestOutOfSync(i,r)){this.client.logger.warn("Discarding out of sync request - ".concat(r)),this.sendError({id:r,topic:e,error:aP("INVALID_UPDATE_REQUEST")});return}this.isValidUpdate(cp({topic:e},n));try{aY.set(t,r),await this.client.session.update(e,{namespaces:n.namespaces}),await this.sendResult({id:r,topic:e,result:!0})}catch(e){throw aY.delete(t),e}this.client.events.emit("session_update",{id:r,topic:e,params:n})}catch(t){await this.sendError({id:r,topic:e,error:t}),this.client.logger.error(t)}}),cg(this,"isRequestOutOfSync",(e,t)=>t.toString().slice(0,-3)<e.toString().slice(0,-3)),cg(this,"onSessionUpdateResponse",(e,t)=>{let{id:n}=t,r=tx("session_update",n);if(0===this.events.listenerCount(r))throw Error("emitting ".concat(r," without any listeners"));(0,op.isJsonRpcResult)(t)?this.events.emit(tx("session_update",n),{}):(0,op.isJsonRpcError)(t)&&this.events.emit(tx("session_update",n),{error:t.error})}),cg(this,"onSessionExtendRequest",async(e,t)=>{let{id:n}=t;try{this.isValidExtend({topic:e}),await this.setExpiry(e,tb(l9)),await this.sendResult({id:n,topic:e,result:!0}),this.client.events.emit("session_extend",{id:n,topic:e})}catch(t){await this.sendError({id:n,topic:e,error:t}),this.client.logger.error(t)}}),cg(this,"onSessionExtendResponse",(e,t)=>{let{id:n}=t,r=tx("session_extend",n);if(0===this.events.listenerCount(r))throw Error("emitting ".concat(r," without any listeners"));(0,op.isJsonRpcResult)(t)?this.events.emit(tx("session_extend",n),{}):(0,op.isJsonRpcError)(t)&&this.events.emit(tx("session_extend",n),{error:t.error})}),cg(this,"onSessionPingRequest",async(e,t)=>{let{id:n}=t;try{this.isValidPing({topic:e}),await this.sendResult({id:n,topic:e,result:!0,throwOnFailedPublish:!0}),this.client.events.emit("session_ping",{id:n,topic:e})}catch(t){await this.sendError({id:n,topic:e,error:t}),this.client.logger.error(t)}}),cg(this,"onSessionPingResponse",(e,t)=>{let{id:n}=t,r=tx("session_ping",n);setTimeout(()=>{if(0===this.events.listenerCount(r))throw Error("emitting ".concat(r," without any listeners 2176"));(0,op.isJsonRpcResult)(t)?this.events.emit(tx("session_ping",n),{}):(0,op.isJsonRpcError)(t)&&this.events.emit(tx("session_ping",n),{error:t.error})},500)}),cg(this,"onSessionDeleteRequest",async(e,t)=>{let{id:n}=t;try{this.isValidDisconnect({topic:e,reason:t.params}),await Promise.all([new Promise(t=>{this.client.core.relayer.once(oE.publish,async()=>{t(await this.deleteSession({topic:e,id:n}))})}),this.sendResult({id:n,topic:e,result:!0}),this.cleanupPendingSentRequestsForTopic({topic:e,error:aP("USER_DISCONNECTED")})]).catch(e=>this.client.logger.error(e))}catch(e){this.client.logger.error(e)}}),cg(this,"onSessionRequest",async e=>{var t,n,r;let{topic:i,payload:a,attestation:o,encryptedId:s,transportType:l}=e,{id:c,params:d}=a;try{await this.isValidRequest(cp({topic:i},d));let e=this.client.session.get(i),a=await this.getVerifyContext({attestationId:o,hash:ae(JSON.stringify((0,oh.formatJsonRpcRequest)("wc_sessionRequest",d,c))),encryptedId:s,metadata:e.peer.metadata,transportType:l}),u={id:c,topic:i,params:d,verifyContext:a};await this.setPendingSessionRequest(u),l===oI.link_mode&&null!=(t=e.peer.metadata.redirect)&&t.universal&&this.client.core.addLinkModeSupportedApp(null==(n=e.peer.metadata.redirect)?void 0:n.universal),null!=(r=this.client.signConfig)&&r.disableRequestQueue?this.emitSessionRequest(u):(this.addSessionRequestToSessionRequestQueue(u),this.processSessionRequestQueue())}
1catch(e){await this.sendError({id:c,topic:i,error:e}),this.client.logger.error(e)}}),cg(this,"onSessionRequestResponse",(e,t)=>{let{id:n}=t,r=tx("session_request",n);if(0===this.events.listenerCount(r))throw Error("emitting ".concat(r," without any listeners"));(0,op.isJsonRpcResult)(t)?this.events.emit(tx("session_request",n),{result:t.result}):(0,op.isJsonRpcError)(t)&&this.events.emit(tx("session_request",n),{error:t.error})}),cg(this,"onSessionEventRequest",async(e,t)=>{let{id:n,params:r}=t;try{let t="".concat(e,"_session_event_").concat(r.event.name),i=aY.get(t);if(i&&this.isRequestOutOfSync(i,n))return void this.client.logger.info("Discarding out of sync request - ".concat(n));this.isValidEmit(cp({topic:e},r)),this.client.events.emit("session_event",{id:n,topic:e,params:r}),aY.set(t,n)}catch(t){await this.sendError({id:n,topic:e,error:t}),this.client.logger.error(t)}}),cg(this,"onSessionAuthenticateResponse",(e,t)=>{let{id:n}=t;this.client.logger.trace({type:"method",method:"onSessionAuthenticateResponse",topic:e,payload:t}),(0,op.isJsonRpcResult)(t)?this.events.emit(tx("session_request",n),{result:t.result}):(0,op.isJsonRpcError)(t)&&this.events.emit(tx("session_request",n),{error:t.error})}),cg(this,"onSessionAuthenticateRequest",async e=>{var t;let{topic:n,payload:r,attestation:i,encryptedId:a,transportType:o}=e;try{let{requester:e,authPayload:s,expiryTimestamp:l}=r.params,c=await this.getVerifyContext({attestationId:i,hash:ae(JSON.stringify(r)),encryptedId:a,metadata:e.metadata,transportType:o}),d={requester:e,pairingTopic:n,id:r.id,authPayload:s,verifyContext:c,expiryTimestamp:l};await this.setAuthRequest(r.id,{request:d,pairingTopic:n,transportType:o}),o===oI.link_mode&&null!=(t=e.metadata.redirect)&&t.universal&&this.client.core.addLinkModeSupportedApp(e.metadata.redirect.universal),this.client.events.emit("session_authenticate",{topic:n,params:r.params,id:r.id,verifyContext:c})}catch(a){this.client.logger.error(a);let e=r.params.requester.publicKey,t=await this.client.core.crypto.generateKeyPair(),i=this.getAppLinkIfEnabled(r.params.requester.metadata,o);await this.sendError({id:r.id,topic:n,error:a,encodeOpts:{type:1,receiverPublicKey:e,senderPublicKey:t},rpcOpts:l7.wc_sessionAuthenticate.autoReject,appLink:i})}}),cg(this,"addSessionRequestToSessionRequestQueue",e=>{this.sessionRequestQueue.queue.push(e)}),cg(this,"cleanupAfterResponse",e=>{this.deletePendingSessionRequest(e.response.id,{message:"fulfilled",code:0}),setTimeout(()=>{this.sessionRequestQueue.state=ct.idle,this.processSessionRequestQueue()},(0,z.toMiliseconds)(this.requestQueueDelay))}),cg(this,"cleanupPendingSentRequestsForTopic",e=>{let{topic:t,error:n}=e,r=this.client.core.history.pending;r.length>0&&r.filter(e=>e.topic===t&&"wc_sessionRequest"===e.request.method).forEach(e=>{let t=tx("session_request",e.request.id);if(0===this.events.listenerCount(t))throw Error("emitting ".concat(t," without any listeners"));this.events.emit(tx("session_request",e.request.id),{error:n})})}),cg(this,"processSessionRequestQueue",()=>{if(this.sessionRequestQueue.state===ct.active)return void this.client.logger.info("session request queue is already active.");let e=this.sessionRequestQueue.queue[0];if(!e)return void this.client.logger.info("session request queue is empty.");try{this.emitSessionRequest(e)}catch(e){this.client.logger.error(e)}}),cg(this,"emitSessionRequest",e=>{if(this.emittedSessionRequests.has(e.id))return void this.client.logger.warn({id:e.id},"Skipping emitting `session_request` event for duplicate request. id: ".concat(e.id));this.sessionRequestQueue.state=ct.active,this.emittedSessionRequests.add(e.id),this.client.events.emit("session_request",e)}),cg(this,"onPairingCreated",e=>{if(e.methods&&this.expectedPairingMethodMap.set(e.topic,e.methods),e.active)return;let t=this.client.proposal.getAll().find(t=>t.pairingTopic===e.topic);
1t&&this.onSessionProposeRequest({topic:e.topic,payload:(0,oh.formatJsonRpcRequest)("wc_sessionPropose",cf(cp({},t),{requiredNamespaces:t.requiredNamespaces,optionalNamespaces:t.optionalNamespaces,relays:t.relays,proposer:t.proposer,sessionProperties:t.sessionProperties,scopedProperties:t.scopedProperties}),t.id),attestation:t.attestation,encryptedId:t.encryptedId})}),cg(this,"isValidConnect",async e=>{if(!az(e)){let{message:t}=aj("MISSING_OR_INVALID","connect() params: ".concat(JSON.stringify(e)));throw Error(t)}let{pairingTopic:t,requiredNamespaces:n,optionalNamespaces:r,sessionProperties:i,scopedProperties:a,relays:o}=e;if(aO(t)||await this.isValidPairingTopic(t),!function(e,t){let n=!1;return t&&!e?n=!0:e&&a$(e)&&e.length&&e.forEach(e=>{n=aB(e)}),n}(o,!0)){let{message:e}=aj("MISSING_OR_INVALID","connect() relays: ".concat(o));throw Error(e)}if(!aO(n)&&0!==aN(n)){let e="requiredNamespaces are deprecated and are automatically assigned to optionalNamespaces";["fatal","error","silent"].includes(this.client.logger.level)?console.warn(e):this.client.logger.warn(e),this.validateNamespaces(n,"requiredNamespaces")}if(aO(r)||0===aN(r)||this.validateNamespaces(r,"optionalNamespaces"),aO(i)||this.validateSessionProps(i,"sessionProperties"),!aO(a)){this.validateSessionProps(a,"scopedProperties");let e=Object.keys(n||{}).concat(Object.keys(r||{}));if(!Object.keys(a).every(t=>e.includes(t.split(":")[0])))throw Error("Scoped properties must be a subset of required/optional namespaces, received: ".concat(JSON.stringify(a),", required/optional namespaces: ").concat(JSON.stringify(e)))}}),cg(this,"validateNamespaces",(e,t)=>{let n=function(e,t,n){let r=null;if(e&&aN(e)){let i,a=aF(e,t);a&&(r=a);let o=(i=null,Object.entries(e).forEach(e=>{var r,a;let o,[s,l]=e;if(i)return;let c=(r=e5(s,l),a="".concat(t," ").concat(n),o=null,a$(r)&&r.length?r.forEach(e=>{o||aL(e)||(o=aP("UNSUPPORTED_CHAINS","".concat(a,", chain ").concat(e,' should be a string and conform to "namespace:chainId" format')))}):aL(s)||(o=aP("UNSUPPORTED_CHAINS","".concat(a,', chains must be defined as "namespace:chainId" e.g. "eip155:1": {...} in the namespace key OR as an array of CAIP-2 chainIds e.g. eip155: { chains: ["eip155:1", "eip155:5"] }'))),o);c&&(i=c)}),i);o&&(r=o)}else r=aj("MISSING_OR_INVALID","".concat(t,", ").concat(n," should be an object with data"));return r}(e,"connect()",t);if(n)throw Error(n.message)}),cg(this,"isValidApprove",async e=>{if(!az(e))throw Error(aj("MISSING_OR_INVALID","approve() params: ".concat(e)).message);let{id:t,namespaces:n,relayProtocol:r,sessionProperties:i,scopedProperties:a}=e;this.checkRecentlyDeleted(t),await this.isValidProposalId(t);let o=this.client.proposal.get(t),s=aU(n,"approve()");if(s)throw Error(s.message);let l=aq(o.requiredNamespaces,n,"approve()");if(l)throw Error(l.message);if(!aM(r,!0)){let{message:e}=aj("MISSING_OR_INVALID","approve() relayProtocol: ".concat(r));throw Error(e)}if(aO(i)||this.validateSessionProps(i,"sessionProperties"),!aO(a)){this.validateSessionProps(a,"scopedProperties");let e=new Set(Object.keys(n));if(!Object.keys(a).every(t=>e.has(t.split(":")[0])))throw Error("Scoped properties must be a subset of approved namespaces, received: ".concat(JSON.stringify(a),", approved namespaces: ").concat(Array.from(e).join(", ")))}}),cg(this,"isValidReject",async e=>{if(!az(e)){let{message:t}=aj("MISSING_OR_INVALID","reject() params: ".concat(e));throw Error(t)}let{id:t,reason:n}=e;if(this.checkRecentlyDeleted(t),await this.isValidProposalId(t),!function(e){return!(!e||"object"!=typeof e||!e.code||!aR(e.code,!1)||!e.message||!aM(e.message,!1))}(n)){let{message:e}=aj("MISSING_OR_INVALID","reject() reason: ".concat(JSON.stringify(n)));throw Error(e)}}),cg(this,"isValidSessionSettleRequest",e=>{if(!az(e)){let{message:t}=aj("MISSING_OR_INVALID","onSessionSettleRequest() params: ".concat(e));throw Error(t)}let{relay:t,controller:n,namespaces:r,expiry:i}=e;if(!aB(t)){let{message:e}=aj("MISSING_OR_INVALID","onSessionSettleRequest() relay protocol should be a string");throw Error(e)}let a=function(e,t){let n=null;return aM(null==e?void 0:e.publicKey,!1)||(n=aj("MISSING_OR_INVALID","".concat(t," controller public key should be a string"))),n}(n,"onSessionSettleRequest()");if(a)throw Error(a.message);let o=aU(r,"onSessionSettleRequest()");if(o)throw Error(o.message);if(tw(i)){let{message:e}=aj("EXPIRED","onSessionSettleRequest()");throw Error(e)}}),cg(this,"isValidUpdate",async e=>{if(!az(e)){let{message:t}
1=aj("MISSING_OR_INVALID","update() params: ".concat(e));throw Error(t)}let{topic:t,namespaces:n}=e;this.checkRecentlyDeleted(t),await this.isValidSessionTopic(t);let r=this.client.session.get(t),i=aU(n,"update()");if(i)throw Error(i.message);let a=aq(r.requiredNamespaces,n,"update()");if(a)throw Error(a.message)}),cg(this,"isValidExtend",async e=>{if(!az(e)){let{message:t}=aj("MISSING_OR_INVALID","extend() params: ".concat(e));throw Error(t)}let{topic:t}=e;this.checkRecentlyDeleted(t),await this.isValidSessionTopic(t)}),cg(this,"isValidRequest",async e=>{if(!az(e)){let{message:t}=aj("MISSING_OR_INVALID","request() params: ".concat(e));throw Error(t)}let{topic:t,request:n,chainId:r,expiry:i}=e;this.checkRecentlyDeleted(t),await this.isValidSessionTopic(t);let{namespaces:a}=this.client.session.get(t);if(!aW(a,r)){let{message:e}=aj("MISSING_OR_INVALID","request() chainId: ".concat(r));throw Error(e)}if(!function(e){return!(aO(e)||!aM(e.method,!1))}(n)){let{message:e}=aj("MISSING_OR_INVALID","request() ".concat(JSON.stringify(n)));throw Error(e)}if(!function(e,t,n){return!!aM(n,!1)&&(function(e,t){let n=[];return Object.values(e).forEach(e=>{aE(e.accounts).includes(t)&&n.push(...e.methods)}),n})(e,t).includes(n)}(a,r,n.method)){let{message:e}=aj("MISSING_OR_INVALID","request() method: ".concat(n.method));throw Error(e)}if(i&&!function(e,t){return aR(e,!1)&&e<=t.max&&e>=t.min}(i,ce)){let{message:e}=aj("MISSING_OR_INVALID","request() expiry: ".concat(i,". Expiry must be a number (in seconds) between ").concat(ce.min," and ").concat(ce.max));throw Error(e)}}),cg(this,"isValidRespond",async e=>{var t;if(!az(e)){let{message:t}=aj("MISSING_OR_INVALID","respond() params: ".concat(e));throw Error(t)}let{topic:n,response:r}=e;try{await this.isValidSessionTopic(n)}catch(n){throw null!=(t=null==e?void 0:e.response)&&t.id&&this.cleanupAfterResponse(e),n}if(!function(e){return!(aO(e)||aO(e.result)&&aO(e.error)||!aR(e.id,!1)||!aM(e.jsonrpc,!1))}(r)){let{message:e}=aj("MISSING_OR_INVALID","respond() response: ".concat(JSON.stringify(r)));throw Error(e)}}),cg(this,"isValidPing",async e=>{if(!az(e)){let{message:t}=aj("MISSING_OR_INVALID","ping() params: ".concat(e));throw Error(t)}let{topic:t}=e;await this.isValidSessionOrPairingTopic(t)}),cg(this,"isValidEmit",async e=>{if(!az(e)){let{message:t}=aj("MISSING_OR_INVALID","emit() params: ".concat(e));throw Error(t)}let{topic:t,event:n,chainId:r}=e;await this.isValidSessionTopic(t);let{namespaces:i}=this.client.session.get(t);if(!aW(i,r)){let{message:e}=aj("MISSING_OR_INVALID","emit() chainId: ".concat(r));throw Error(e)}if(!function(e){return!(aO(e)||!aM(e.name,!1))}(n)||!function(e,t,n){return!!aM(n,!1)&&(function(e,t){let n=[];return Object.values(e).forEach(e=>{aE(e.accounts).includes(t)&&n.push(...e.events)}),n})(e,t).includes(n)}(i,r,n.name)){let{message:e}=aj("MISSING_OR_INVALID","emit() event: ".concat(JSON.stringify(n)));throw Error(e)}}),cg(this,"isValidDisconnect",async e=>{if(!az(e)){let{message:t}=aj("MISSING_OR_INVALID","disconnect() params: ".concat(e));throw Error(t)}let{topic:t}=e;await this.isValidSessionOrPairingTopic(t)}),cg(this,"isValidAuthenticate",e=>{let{chains:t,uri:n,domain:r,nonce:i}=e;if(!Array.isArray(t)||0===t.length)throw Error("chains is required and must be a non-empty array");if(!aM(n,!1))throw Error("uri is required parameter");if(!aM(r,!1))throw Error("domain is required parameter");if(!aM(i,!1))throw Error("nonce is required parameter");if([...new Set(t.map(e=>e2(e).namespace))].length>1)throw Error("Multi-namespace requests are not supported. Please request single namespace only.");let{namespace:a}=e2(t[0]);if("eip155"!==a)throw Error("Only eip155 namespace is supported for authenticated sessions. Please use .connect() for non-eip155 chains.")}),cg(this,"getVerifyContext",async e=>{let{attestationId:t,hash:n,encryptedId:r,metadata:i,transportType:a}=e,o={verified:{verifyUrl:i.verifyUrl||oO,validation:"UNKNOWN",origin:i.url||""}};try{if(a===oI.link_mode){let e=this.getAppLinkIfEnabled(i,a);return o.verified.validation=e&&new URL(e).origin===new URL(i.url).origin?"VALID":"INVALID",o}let e=await this.client.core.verify.resolve({attestationId:t,hash:n,encryptedId:r,verifyUrl:i.verifyUrl});e&&(o.verified.origin=e.origin,o.verified.isScam=e.isScam,o.verified.validation=e.origin===new URL(i.url).origin?"VALID":"INVALID")}catch(e){this.client.logger.warn(e)}return this.client.logger.debug("Verify context: ".concat(JSON.stringify(o))),o}),cg(this,"validateSessionProps",(e,t)=>{Object.values(e).forEach((n,r)=>{if(null==n){let{message:i}=aj("MISSING_OR_INVALID","".concat(t," must contain an existing value for each key. Received: ").concat(n," for key ").concat(Object.keys(e)[r]));throw Error(i)}})}),cg(this,"getPendingAuthRequest",e=>{let t=this.client.auth.requests.get(e);return"object"==typeof t?t:void 0}),cg(this,"addToRecentlyDeleted",(e,t)=>{if(this.recentlyDeletedMap.set(e,t),this.recentlyDeletedMap.size>=this.recentlyDeletedLimit){let e=0,t=this.recentlyDeletedLimit/2;
1for(let n of this.recentlyDeletedMap.keys()){if(e++>=t)break;this.recentlyDeletedMap.delete(n)}}}),cg(this,"checkRecentlyDeleted",e=>{let t=this.recentlyDeletedMap.get(e);if(t){let{message:n}=aj("MISSING_OR_INVALID","Record was recently deleted - ".concat(t,": ").concat(e));throw Error(n)}}),cg(this,"isLinkModeEnabled",(t,n)=>{var r,i,a,o,s,l,c,d,u;return!!t&&n===oI.link_mode&&(null==(i=null==(r=this.client.metadata)?void 0:r.redirect)?void 0:i.linkMode)===!0&&(null==(o=null==(a=this.client.metadata)?void 0:a.redirect)?void 0:o.universal)!==void 0&&(null==(l=null==(s=this.client.metadata)?void 0:s.redirect)?void 0:l.universal)!==""&&(null==(c=null==t?void 0:t.redirect)?void 0:c.universal)!==void 0&&(null==(d=null==t?void 0:t.redirect)?void 0:d.universal)!==""&&(null==(u=null==t?void 0:t.redirect)?void 0:u.linkMode)===!0&&this.client.core.linkModeSupportedApps.includes(t.redirect.universal)&&"u">typeof(null==e.g?void 0:e.g.Linking)}),cg(this,"getAppLinkIfEnabled",(e,t)=>{var n;return this.isLinkModeEnabled(e,t)?null==(n=null==e?void 0:e.redirect)?void 0:n.universal:void 0}),cg(this,"handleLinkModeMessage",e=>{let{url:t}=e;if(!t||!t.includes("wc_ev")||!t.includes("topic"))return;let n=tS(t,"topic")||"",r=decodeURIComponent(tS(t,"wc_ev")||""),i=this.client.session.keys.includes(n);i&&this.client.session.update(n,{transportType:oI.link_mode}),this.client.core.dispatchEnvelope({topic:n,message:r,sessionExists:i})}),cg(this,"registerLinkModeListeners",async()=>{var t;if(tA()||to()&&null!=(t=this.client.metadata.redirect)&&t.linkMode){let t=null==e.g?void 0:e.g.Linking;if("u">typeof t){t.addEventListener("url",this.handleLinkModeMessage,this.client.name);let e=await t.getInitialURL();e&&setTimeout(()=>{this.handleLinkModeMessage({url:e})},50)}}}),cg(this,"getTVFParams",(e,t,n)=>{var r,i,a;if(!(null!=(r=t.request)&&r.method))return{};let o={correlationId:e,rpcMethods:[t.request.method],chainId:t.chainId};try{o.txHashes=this.extractTxHashesFromResult(t.request,n),o.contractAddresses=this.isValidContractData(t.request.params)?[null==(a=null==(i=t.request.params)?void 0:i[0])?void 0:a.to]:[]}catch(e){this.client.logger.warn("Error getting TVF params",e)}return o}),cg(this,"isValidContractData",e=>{var t;if(!e)return!1;try{let n=(null==e?void 0:e.data)||(null==(t=null==e?void 0:e[0])?void 0:t.data);if(!n.startsWith("0x"))return!1;let r=n.slice(2);return!!/^[0-9a-fA-F]*$/.test(r)&&r.length%2==0}catch(e){}return!1}),cg(this,"extractTxHashesFromResult",(e,t)=>{var n;try{if(!t)return[];let r=e.method,i=cn[r];if("sui_signTransaction"===r)return[function(e){let t=new Uint8Array(U.Buffer.from(e,"base64")),n=Array.from("TransactionData::").map(e=>e.charCodeAt(0)),r=new Uint8Array(n.length+t.length);r.set(n),r.set(t,n.length);let i=nQ(r,{dkLen:32});return eb.default.encode(i)}(t.transactionBytes)];if("near_signTransaction"===r)return[n3(t)];if("near_signTransactions"===r)return t.map(e=>n3(e));if("xrpl_signTransactionFor"===r||"xrpl_signTransaction"===r)return[null==(n=t.tx_json)?void 0:n.hash];if("polkadot_signTransaction"===r)return[function(e){let t=Uint8Array.from(U.Buffer.from(e.signature,"hex")),n=function(e){var t,n;let{publicKey:r,signature:i,payload:a}=e,o=aZ(a.method),s=128|parseInt((null==(t=a.version)?void 0:t.toString())||"4"),l=function(e){let t=eb.default.decode(e)[0];return 42===t?0:60===t?2:1}(a.address),c="00"===a.era?new Uint8Array([0]):aZ(a.era);if(1!==c.length&&2!==c.length)throw Error("Invalid era length");let d=parseInt(a.nonce,16),u=new Uint8Array([255&d,d>>8&255]),h=new Uint8Array([0,...r,l,...i,...c,...u,...function(e){if(e<BigInt(1)<<BigInt(6))return new Uint8Array([Number(e<<BigInt(2))]);if(e<BigInt(1)<<BigInt(14)){let t=e<<BigInt(2)|BigInt(1);return new Uint8Array([Number(t&BigInt(255)),Number(t>>BigInt(8)&BigInt(255))])}if(e<BigInt(1)<<BigInt(30)){let t=e<<BigInt(2)|BigInt(2);return new Uint8Array([Number(t&BigInt(255)),Number(t>>BigInt(8)&BigInt(255)),Number(t>>BigInt(16)&BigInt(255)),Number(t>>BigInt(24)&BigInt(255))])}throw Error("BigInt compact encoding not supported > 2^30")}(BigInt("0x".concat((n=a.tip).startsWith("0x")?n.slice(2):n))),...o]);return new Uint8Array([...function(e){if(e<64)return new Uint8Array([e<<2]);if(e<16384){let t=e<<2|1;return new Uint8Array([255&t,t>>8&255])}if(e<0x40000000){let t=e<<2|2;return new Uint8Array([255&t,t>>8&255,t>>16&255,t>>24&255])}throw Error("Compact encoding > 2^30 not supported")}
1(h.length+1),s,...h])}({publicKey:function(e){let t=eb.default.decode(e);if(t.length<33)throw Error("Too short to contain a public key");return t.slice(1,33)}(e.transaction.address),signature:t,payload:e.transaction});var r=U.Buffer.from(n).toString("hex");let i=aZ(r),a=(0,e1.blake2b)(i,void 0,32);return"0x"+U.Buffer.from(a).toString("hex")}({transaction:e.params.transactionPayload,signature:t.signature})];if("algo_signTxn"===r)return a$(t)?t.map(e=>n5(e)):[n5(t)];if("cosmos_signDirect"===r)return[function(e){let t=U.Buffer.from(e.signed.bodyBytes,"base64"),n=U.Buffer.from(e.signed.authInfoBytes,"base64"),r=U.Buffer.from(e.signature.signature,"base64"),i=[];i.push(U.Buffer.from([10])),i.push(n4(t.length)),i.push(t),i.push(U.Buffer.from([18])),i.push(n4(n.length)),i.push(n),i.push(U.Buffer.from([26])),i.push(n4(r.length)),i.push(r);let a=nB(U.Buffer.concat(i));return U.Buffer.from(a).toString("hex").toUpperCase()}(t)];if("string"==typeof t)return[t];let a=t[i.key];if(a$(a))return"solana_signAllTransactions"===r?a.map(e=>(function(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);let r=n[0];if(0===r)throw Error("No signatures found");if(n.length<1+64*r)throw Error("Transaction data too short for claimed signature count");if(n.length<100)throw Error("Transaction too short");let i=U.Buffer.from(e,"base64").slice(1,65);return eb.default.encode(i)})(e)):a;if("string"==typeof a)return[a]}catch(e){this.client.logger.warn("Error extracting tx hashes from result",e)}return[]})}}class cy extends lS{constructor(e,t){super(e,t,"proposal",l5),this.core=e,this.logger=t}}class cv extends lS{constructor(e,t){super(e,t,"session",l5),this.core=e,this.logger=t}}class cb extends lS{constructor(e,t){super(e,t,"request",l5,e=>e.id),this.core=e,this.logger=t}}class cw extends lS{constructor(e,t){super(e,t,"authKeys",ci,()=>ca),this.core=e,this.logger=t}}class cx extends lS{constructor(e,t){super(e,t,"pairingTopics",ci),this.core=e,this.logger=t}}class cC extends lS{constructor(e,t){super(e,t,"requests",ci,e=>e.id),this.core=e,this.logger=t}}var cE=Object.defineProperty,ck=(e,t,n)=>((e,t,n)=>t in e?cE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n);class cS{async init(){await this.authKeys.init(),await this.pairingTopics.init(),await this.requests.init()}constructor(e,t){this.core=e,this.logger=t,ck(this,"authKeys"),ck(this,"pairingTopics"),ck(this,"requests"),this.authKeys=new cw(this.core,this.logger),this.pairingTopics=new cx(this.core,this.logger),this.requests=new cC(this.core,this.logger)}}var cI=Object.defineProperty,cA=(e,t,n)=>((e,t,n)=>t in e?cI(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n);class cT extends ol{static async init(e){let t=new cT(e);return await t.initialize(),t}get context(){return(0,aX.getLoggerContext)(this.logger)}get pairing(){return this.core.pairing.pairings}async initialize(){this.logger.trace("Initialized");try{await this.core.start(),await this.session.init(),await this.proposal.init(),await this.pendingRequest.init(),await this.auth.init(),await this.engine.init(),this.logger.info("SignClient Initialization Success")}catch(e){throw this.logger.info("SignClient Initialization Failure"),this.logger.error(e.message),e}}constructor(e){super(e),cA(this,"protocol","wc"),cA(this,"version",2),cA(this,"name",l4.name),cA(this,"metadata"),cA(this,"core"),cA(this,"logger"),cA(this,"events",new F.EventEmitter),cA(this,"engine"),cA(this,"session"),cA(this,"proposal"),cA(this,"pendingRequest"),cA(this,"auth"),cA(this,"signConfig"),cA(this,"on",(e,t)=>this.events.on(e,t)),cA(this,"once",(e,t)=>this.events.once(e,t)),cA(this,"off",(e,t)=>this.events.off(e,t)),cA(this,"removeListener",(e,t)=>this.events.removeListener(e,t)),cA(this,"removeAllListeners",e=>this.events.removeAllListeners(e)),cA(this,"connect",async e=>{try{return await this.engine.connect(e)}catch(e){throw this.logger.error(e.message),e}}),cA(this,"pair",async e=>{try{return await this.engine.pair(e)}catch(e){throw this.logger.error(e.message),e}}),cA(this,"approve",async e=>{try{return await this.engine.approve(e)}catch(e){throw this.logger.error(e.message),e}}),cA(this,"reject",async e=>{try{return await this.engine.reject(e)}catch(e){throw this.logger.error(e.message),e}}),cA(this,"update",async e=>{try{return await this.engine.update(e)}catch(e){throw this.logger.error(e.message),e}}),cA(this,"extend",async e=>{try{return await this.engine.extend(e)}catch(e){throw this.logger.error(e.message),e}}),cA(this,"request",async e=>{try{return await this.engine.request(e)}catch(e){throw this.logger.error(e.message),e}}),cA(this,"respond",async e=>{try{return await this.engine.respond(e)}catch(e){throw this.logger.error(e.message),e}}),cA(this,"ping",async e=>{try{return await this.engine.ping(e)}catch(e){throw this.logger.error(e.message),e}}),cA(this,"emit",async e=>{try{return await this.engine.emit(e)}catch(e){throw this.logger.error(e.message),e}}),cA(this,"disconnect",async e=>{try{return await this.engine.disconnect(e)}catch(e){throw this.logger.error(e.message),e}}),cA(this,"find",e=>{try{return this.engine.find(e)}catch(e){throw this.logger.error(e.message),e}}),cA(this,"getPendingSessionRequests",()=>{try{return this.engine.getPendingSessionRequests()}catch(e){throw this.logger.error(e.message),e}}),cA(this,"authenticate",async(e,t)=>{try{return await this.engine.authenticate(e,t)}catch(e){throw this.logger.error(e.message),e}}),cA(this,"formatAuthMessage",e=>{try{return this.engine.formatAuthMessage(e)}catch(e){throw this.logger.error(e.message),e}}),cA(this,"approveSessionAuthenticate",async e=>{try{return await this.engine.approveSessionAuthenticate(e)}catch(e){throw this.logger.error(e.message),e}}),cA(this,"rejectSessionAuthenticate",async e=>{try{return await this.engine.rejectSessionAuthenticate(e)}catch(e){throw this.logger.error(e.message),e}}),this.name=(null==e?void 0:e.name)||l4.name,this.metadata=function(e){var t,n;let r=td();try{let i,a;return null!=e&&e.url&&r.url&&new URL(e.url).host!==new URL(r.url).host&&(console.warn("The configured WalletConnect 'metadata.url':".concat(e.url," differs from the actual page url:").concat(r.url,". This is probably unintended and can lead to issues.")),e.url=r.url),null!=(t=null==e?void 0:e.icons)&&t.length&&e.icons.length>0&&(e.icons=e.icons.filter(e=>""!==e)),i=tn(tn({},r),e),a={url:(null==e?void 0:e.url)||r.url,name:(null==e?void 0:e.name)||r.name,description:(null==e?void 0:e.description)||r.description,icons:null!=(n=null==e?void 0:e.icons)&&n.length&&e.icons.length>0?e.icons:r.icons},e6(i,e8(a))}catch(t){return console.warn("Error populating app metadata",t),e||r}}(null==e?void 0:e.metadata),this.signConfig=null==e?void 0:e.signConfig;let t="u">typeof(null==e?void 0:e.logger)&&"string"!=typeof(null==e?void 0:e.logger)?e.logger:(0,a0.pino)((0,aX.getDefaultLoggerOptions)({level:(null==e?void 0:e.logger)||l4.logger}));this.core=(null==e?void 0:e.core)||new l2(e),this.logger=(0,aX.generateChildLogger)(t,this.name),this.session=new cv(this.core,this.logger),this.proposal=new cy(this.core,this.logger),this.pendingRequest=new cb(this.core,this.logger),this.engine=new cm(this),this.auth=new cS(this.core,this.logger)}}var c_=e.i(98418);let cj="error",cP="".concat("wc","@2:").concat("universal_provider",":"),c$="https://rpc.walletconnect.org/v1/",cN="generic",cO="".concat(c$,"bundler"),cM={DEFAULT_CHAIN_CHANGED:"default_chain_changed"};function cR(e){return null==e||"object"!=typeof e&&"function"!=typeof e}function cL(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}
1function cD(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}let cF="[object String]",cU="[object Number]",cB="[object Boolean]",cz="[object Arguments]";function cW(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function cq(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new Map,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0,a=null==i?void 0:i(e,t,n,r);if(null!=a)return a;if(cR(e))return e;if(r.has(e))return r.get(e);if(Array.isArray(e)){let t=Array(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=cq(e[a],a,n,r,i);return Object.hasOwn(e,"index")&&(t.index=e.index),Object.hasOwn(e,"input")&&(t.input=e.input),t}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){let t=new RegExp(e.source,e.flags);return t.lastIndex=e.lastIndex,t}if(e instanceof Map){let t=new Map;for(let[a,o]of(r.set(e,t),e))t.set(a,cq(o,a,n,r,i));return t}if(e instanceof Set){let t=new Set;for(let a of(r.set(e,t),e))t.add(cq(a,void 0,n,r,i));return t}if("u">typeof U.Buffer&&U.Buffer.isBuffer(e))return e.subarray();if(cW(e)){let t=new(Object.getPrototypeOf(e)).constructor(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=cq(e[a],a,n,r,i);return t}if(e instanceof ArrayBuffer||"u">typeof SharedArrayBuffer&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){let t=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return r.set(e,t),cH(t,e,n,r,i),t}if("u">typeof File&&e instanceof File){let t=new File([e],e.name,{type:e.type});return r.set(e,t),cH(t,e,n,r,i),t}if(e instanceof Blob){let t=new Blob([e],{type:e.type});return r.set(e,t),cH(t,e,n,r,i),t}if(e instanceof Error){let t=new e.constructor;return r.set(e,t),t.message=e.message,t.name=e.name,t.stack=e.stack,t.cause=e.cause,cH(t,e,n,r,i),t}if("object"==typeof e&&function(e){switch(cD(e)){case cz:case"[object Array]":case"[object ArrayBuffer]":case"[object DataView]":case cB:case"[object Date]":case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Map]":case cU:case"[object Object]":case"[object RegExp]":case"[object Set]":case cF:case"[object Symbol]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return!0;default:return!1}}(e)){let t=Object.create(Object.getPrototypeOf(e));return r.set(e,t),cH(t,e,n,r,i),t}return e}function cH(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e,r=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0,a=[...Object.keys(t),...cL(t)];for(let o=0;o<a.length;o++){let s=a[o],l=Object.getOwnPropertyDescriptor(e,s);(null==l||l.writable)&&(e[s]=cq(t[s],s,n,r,i))}}function cV(e){var t;return t=(t,n,r,i)=>{let a=void 0;if(null!=a)return a;if("object"==typeof e)switch(Object.prototype.toString.call(e)){case cU:case cF:case cB:{let t=new e.constructor(null==e?void 0:e.valueOf());return cH(t,e),t}case cz:{let t={};return cH(t,e),t.length=e.length,t[Symbol.iterator]=e[Symbol.iterator],t}default:return}},cq(e,void 0,e,new Map,t)}function cG(e){return null!==e&&"object"==typeof e&&"[object Arguments]"===cD(e)}function cK(e){return"object"==typeof e&&null!==e}function cY(){}var cZ=Object.defineProperty,cJ=Object.defineProperties,cQ=Object.getOwnPropertyDescriptors,cX=Object.getOwnPropertySymbols,c0=Object.prototype.hasOwnProperty,c1=Object.prototype.propertyIsEnumerable,c2=(e,t,n)=>t in e?cZ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,c3=(e,t)=>{for(var n in t||(t={}))c0.call(t,n)&&c2(e,n,t[n]);if(cX)for(var n of cX(t))c1.call(t,n)&&c2(e,n,t[n]);return e},c5=(e,t)=>cJ(e,cQ(t));function c4(e,t,n){var r;let i=e2(e);return(null==(r=t.rpcMap)?void 0:r[i.reference])||"".concat(c$,"?chainId=").concat(i.namespace,":").concat(i.reference,"&projectId=").concat(n)}function c6(e){return e.includes(":")?e.split(":")[1]:e}function c8(e){return e.map(e=>"".concat(e.split(":")[0],":").concat(e.split(":")[1]))}function c9(e){return Object.fromEntries(Object.entries(e).filter(e=>{var t,n;let[r,i]=e;return(null==(t=null==i?void 0:i.chains)?void 0:t.length)&&(null==(n=null==i?void 0:i.chains)?void 0:n.length)>0}))}function c7(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];let i=n.slice(0,-1),a=n[n.length-1],o=e;for(let e=0;e<i.length;e++)o=function e(t,n,r,i){if(cR(t)&&(t=Object(t)),null==n||"object"!=typeof n)return t;if(i.has(n))return function(e){if(cR(e))return e;if(Array.isArray(e)||cW(e)||e instanceof ArrayBuffer||"u">typeof SharedArrayBuffer&&e instanceof SharedArrayBuffer)return e.slice(0);let t=Object.getPrototypeOf(e),n=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new n(e);if(e instanceof RegExp){let t=new n(e);return t.lastIndex=e.lastIndex,t}if(e instanceof DataView)return new n(e.buffer.slice(0));if(e instanceof Error){let t=new n(e.message);return t.stack=e.stack,t.name=e.name,t.cause=e.cause,t}return"u">typeof File&&e instanceof File?new n([e],e.name,{type:e.type,lastModified:e.lastModified}):"object"==typeof e?Object.assign(Object.create(t),e):e}(i.get(n));if(i.set(n,t),Array.isArray(n)){var a;n=n.slice();for(let e=0;e<n.length;e++)n[e]=null!=(a=n[e])?a:void 0}let o=[...Object.keys(n),...cL(n)];for(let a=0;a<o.length;a++){let s=o[a],l=n[s],c=t[s];if(cG(l)&&(l={...l}),cG(c)&&(c={...c}),"u">typeof U.Buffer&&U.Buffer.isBuffer(l)&&(l=cV(l)),Array.isArray(l))if("object"==typeof c&&null!=c){let e=[],t=Reflect.ownKeys(c);for(let n=0;n<t.length;n++){let r=t[n];e[r]=c[r]}c=e}else c=[];let d=r(c,l,s,t,n,i);null!=d?t[s]=d:Array.isArray(l)||cK(c)&&cK(l)?t[s]=e(c,l,r,i):null==c&&function(e){if("object"!=typeof e||null==e)return!1;if(null===Object.getPrototypeOf(e))return!0;
1if("[object Object]"!==Object.prototype.toString.call(e)){var t;let n=e[Symbol.toStringTag];return null!=n&&!!(null==(t=Object.getOwnPropertyDescriptor(e,Symbol.toStringTag))?void 0:t.writable)&&e.toString()==="[object ".concat(n,"]")}let n=e;for(;null!==Object.getPrototypeOf(n);)n=Object.getPrototypeOf(n);return Object.getPrototypeOf(e)===n}(l)?t[s]=e({},l,r,i):null==c&&cW(l)?t[s]=cV(l):(void 0===c||void 0!==l)&&(t[s]=l)}return t}(o,i[e],a,new Map);return o}(e,...n,cY)}(c9(de(e)),c9(de(t)))}function de(e){var t,n,r,i,a;let o={};if(!aN(e))return o;for(let[s,l]of Object.entries(e)){let e=ak(s)?[s]:l.chains,c=l.methods||[],d=l.events||[],u=l.rpcMap||{},h=aS(s);o[h]=c5(c3(c3({},o[h]),l),{chains:tC(e,null==(t=o[h])?void 0:t.chains),methods:tC(c,null==(n=o[h])?void 0:n.methods),events:tC(d,null==(r=o[h])?void 0:r.events)}),(aN(u)||aN((null==(i=o[h])?void 0:i.rpcMap)||{}))&&(o[h].rpcMap=c3(c3({},u),null==(a=o[h])?void 0:a.rpcMap))}return o}function dt(e){return e.includes(":")?e.split(":")[2]:e}function dn(e){let t={};for(let[n,r]of Object.entries(e)){let e=r.methods||[],i=r.events||[],a=r.accounts||[],o=ak(n)?[n]:r.chains?r.chains:c8(r.accounts);t[n]={chains:o,methods:e,events:i,accounts:a}}return t}function dr(e){return"number"==typeof e?e:e.includes("0x")?parseInt(e,16):isNaN(Number(e=e.includes(":")?e.split(":")[1]:e))?e:Number(e)}let di={},da=e=>di[e],ds=(e,t)=>{di[e]=t};var dl=Object.defineProperty,dc=Object.getOwnPropertySymbols,dd=Object.prototype.hasOwnProperty,du=Object.prototype.propertyIsEnumerable,dh=(e,t,n)=>t in e?dl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,dp=(e,t)=>{for(var n in t||(t={}))dd.call(t,n)&&dh(e,n,t[n]);if(dc)for(var n of dc(t))du.call(t,n)&&dh(e,n,t[n]);return e};let df="eip155",dg=["atomic","flow-control","paymasterService","sessionKeys","auxiliaryFunds"],dm=e=>e&&e.startsWith("0x")?BigInt(e).toString(10):e,dy=e=>e&&e.startsWith("0x")?e:"0x".concat(BigInt(e).toString(16)),dv=e=>Object.keys(e).filter(e=>dg.includes(e)).reduce((t,n)=>(t[n]=e[n],t),{});var db=Object.defineProperty,dw=(e,t,n)=>((e,t,n)=>t in e?db(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n);class dx{updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;let e=this.namespace.chains[0];if(!e)throw Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(cM.DEFAULT_CHAIN_CHANGED,"".concat(this.name,":").concat(e))}getAccounts(){let e=this.namespace.accounts;return e&&e.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2])||[]}createHttpProviders(){let e={};return this.namespace.chains.forEach(t=>{var n;let r=c6(t);e[r]=this.createHttpProvider(r,null==(n=this.namespace.rpcMap)?void 0:n[t])}),e}getHttpProvider(){let e="".concat(this.name,":").concat(this.chainId),t=this.httpProviders[e];if(typeof t>"u")throw Error("JSON-RPC provider for ".concat(e," not found"));return t}setHttpProvider(e,t){let n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){let n=t||c4(e,this.namespace,this.client.core.projectId);return new ou.JsonRpcProvider(new c_.default(n,da("disableProviderPing")))}constructor(e){dw(this,"name","polkadot"),dw(this,"client"),dw(this,"httpProviders"),dw(this,"events"),dw(this,"namespace"),dw(this,"chainId"),this.namespace=e.namespace,this.events=da("events"),this.client=da("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}}var dC=Object.defineProperty,dE=Object.defineProperties,dk=Object.getOwnPropertyDescriptors,dS=Object.getOwnPropertySymbols,dI=Object.prototype.hasOwnProperty,dA=Object.prototype.propertyIsEnumerable,dT=(e,t,n)=>t in e?dC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,d_=(e,t)=>{for(var n in t||(t={}))dI.call(t,n)&&dT(e,n,t[n]);if(dS)for(var n of dS(t))dA.call(t,n)&&dT(e,n,t[n]);return e},dj=(e,t)=>
1dE(e,dk(t)),dP=(e,t,n)=>dT(e,"symbol"!=typeof t?t+"":t,n);class d${async request(e){switch(e.request.method){case"eth_requestAccounts":case"eth_accounts":return this.getAccounts();case"wallet_switchEthereumChain":return await this.handleSwitchChain(e);case"eth_chainId":return parseInt(this.getDefaultChain());case"wallet_getCapabilities":return await this.getCapabilities(e);case"wallet_getCallsStatus":return await this.getCallStatus(e)}return this.namespace.methods.includes(e.request.method)?await this.client.request(e):this.getHttpProvider().request(e.request)}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(parseInt(e),t),this.chainId=parseInt(e),this.events.emit(cM.DEFAULT_CHAIN_CHANGED,"".concat(this.name,":").concat(e))}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId.toString();if(this.namespace.defaultChain)return this.namespace.defaultChain;let e=this.namespace.chains[0];if(!e)throw Error("ChainId not found");return e.split(":")[1]}createHttpProvider(e,t){let n=t||c4("".concat(this.name,":").concat(e),this.namespace,this.client.core.projectId);return new ou.JsonRpcProvider(new c_.HttpConnection(n,da("disableProviderPing")))}setHttpProvider(e,t){let n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProviders(){let e={};return this.namespace.chains.forEach(t=>{var n;let r=parseInt(c6(t));e[r]=this.createHttpProvider(r,null==(n=this.namespace.rpcMap)?void 0:n[t])}),e}getAccounts(){let e=this.namespace.accounts;return e?[...new Set(e.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}getHttpProvider(){let e=this.chainId,t=this.httpProviders[e];if(typeof t>"u")throw Error("JSON-RPC provider for ".concat(e," not found"));return t}async handleSwitchChain(e){var t,n;let r=e.request.params?null==(t=e.request.params[0])?void 0:t.chainId:"0x0",i=parseInt(r=r.startsWith("0x")?r:"0x".concat(r),16);if(this.isChainApproved(i))this.setDefaultChain("".concat(i));else if(this.namespace.methods.includes("wallet_switchEthereumChain"))await this.client.request({topic:e.topic,request:{method:e.request.method,params:[{chainId:r}]},chainId:null==(n=this.namespace.chains)?void 0:n[0]}),this.setDefaultChain("".concat(i));else throw Error("Failed to switch to chain 'eip155:".concat(i,"'. The chain is not approved or the wallet does not support 'wallet_switchEthereumChain' method."));return null}isChainApproved(e){return this.namespace.chains.includes("".concat(this.name,":").concat(e))}async getCapabilities(e){var t,n,r,i,a;let o,s=null==(n=null==(t=e.request)?void 0:t.params)?void 0:n[0],l=(null==(i=null==(r=e.request)?void 0:r.params)?void 0:i[1])||[];if(!s)throw Error("Missing address parameter in `wallet_getCapabilities` request");let c=this.client.session.get(e.topic),d=(null==(a=null==c?void 0:c.sessionProperties)?void 0:a.capabilities)||{},u="".concat(s).concat(l.join(",")),h=null==d?void 0:d[u];if(h)return h;try{o=((e,t,n)=>{let{sessionProperties:r={},scopedProperties:i={}}=e,a={};if(!aN(i)&&!aN(r))return;let o=dv(r);for(let e of n){let n=dm(e);if(!n)continue;a[dy(n)]=o;let r=null==i?void 0:i["".concat(df,":").concat(n)];if(r){let e=null==r?void 0:r["".concat(df,":").concat(n,":").concat(t)];a[dy(n)]=dp(dp({},a[dy(n)]),dv(e||r))}}for(let[e,t]of Object.entries(a))0===Object.keys(t).length&&delete a[e];return Object.keys(a).length>0?a:void 0})(c,s,l)}catch(e){console.warn("Failed to extract capabilities from session",e)}if(o)return o;let p=await this.client.request(e);try{await this.client.session.update(e.topic,{sessionProperties:dj(d_({},c.sessionProperties||{}),{capabilities:dj(d_({},d||{}),{[u]:p})})})}catch(e){console.warn("Failed to update session with capabilities",e)}return p}async getCallStatus(e){var t,n;let r=this.client.session.get(e.topic),i=null==(t=r.sessionProperties)?void 0:t.bundler_name;if(i){let t=this.getBundlerUrl(e.chainId,i);try{return await this.getUserOperationReceipt(t,e)}catch(e){console.warn("Failed to fetch call status from bundler",e,t)}}let a=null==(n=r.sessionProperties)?void 0:n.bundler_url;if(a)try{return await this.getUserOperationReceipt(a,e)}catch(e){console.warn("Failed to fetch call status from custom bundler",e,a)}if(this.namespace.methods.includes(e.request.method))return await this.client.request(e);throw Error("Fetching call status not approved by the wallet.")}async getUserOperationReceipt(e,t){var n;let r=new URL(e),i=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify((0,oh.formatJsonRpcRequest)("eth_getUserOperationReceipt",[null==(n=t.request.params)?void 0:n[0]]))});if(!i.ok)throw Error("Failed to fetch user operation receipt - ".concat(i.status));return await i.json()}
1getBundlerUrl(e,t){return"".concat(cO,"?projectId=").concat(this.client.core.projectId,"&chainId=").concat(e,"&bundler=").concat(t)}constructor(e){dP(this,"name","eip155"),dP(this,"client"),dP(this,"chainId"),dP(this,"namespace"),dP(this,"httpProviders"),dP(this,"events"),this.namespace=e.namespace,this.events=da("events"),this.client=da("client"),this.httpProviders=this.createHttpProviders(),this.chainId=parseInt(this.getDefaultChain())}}var dN=Object.defineProperty,dO=(e,t,n)=>((e,t,n)=>t in e?dN(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n);class dM{updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(cM.DEFAULT_CHAIN_CHANGED,"".concat(this.name,":").concat(e))}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;let e=this.namespace.chains[0];if(!e)throw Error("ChainId not found");return e.split(":")[1]}getAccounts(){let e=this.namespace.accounts;return e?[...new Set(e.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){let e={};return this.namespace.chains.forEach(t=>{var n;let r=c6(t);e[r]=this.createHttpProvider(r,null==(n=this.namespace.rpcMap)?void 0:n[t])}),e}getHttpProvider(){let e="".concat(this.name,":").concat(this.chainId),t=this.httpProviders[e];if(typeof t>"u")throw Error("JSON-RPC provider for ".concat(e," not found"));return t}setHttpProvider(e,t){let n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){let n=t||c4(e,this.namespace,this.client.core.projectId);return new ou.JsonRpcProvider(new c_.default(n,da("disableProviderPing")))}constructor(e){dO(this,"name","solana"),dO(this,"client"),dO(this,"httpProviders"),dO(this,"events"),dO(this,"namespace"),dO(this,"chainId"),this.namespace=e.namespace,this.events=da("events"),this.client=da("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}}var dR=Object.defineProperty,dL=(e,t,n)=>((e,t,n)=>t in e?dR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n);class dD{updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;let e=this.namespace.chains[0];if(!e)throw Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(cM.DEFAULT_CHAIN_CHANGED,"".concat(this.name,":").concat(this.chainId))}getAccounts(){let e=this.namespace.accounts;return e?[...new Set(e.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){let e={};return this.namespace.chains.forEach(t=>{var n;let r=c6(t);e[r]=this.createHttpProvider(r,null==(n=this.namespace.rpcMap)?void 0:n[t])}),e}getHttpProvider(){let e="".concat(this.name,":").concat(this.chainId),t=this.httpProviders[e];if(typeof t>"u")throw Error("JSON-RPC provider for ".concat(e," not found"));return t}setHttpProvider(e,t){let n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){let n=t||c4(e,this.namespace,this.client.core.projectId);return new ou.JsonRpcProvider(new c_.default(n,da("disableProviderPing")))}constructor(e){dL(this,"name","cosmos"),dL(this,"client"),dL(this,"httpProviders"),dL(this,"events"),dL(this,"namespace"),dL(this,"chainId"),this.namespace=e.namespace,this.events=da("events"),this.client=da("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}}var dF=Object.defineProperty,dU=(e,t,n)=>((e,t,n)=>t in e?dF(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n);class dB{updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){if(!this.httpProviders[e]){let n=t||c4("".concat(this.name,":").concat(e),this.namespace,this.client.core.projectId);this.setHttpProvider(e,n)}this.chainId=e,this.events.emit(cM.DEFAULT_CHAIN_CHANGED,"".concat(this.name,":").concat(this.chainId))}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;let e=this.namespace.chains[0];if(!e)throw Error("ChainId not found");return e.split(":")[1]}getAccounts(){let e=this.namespace.accounts;return e?[...new Set(e.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){let e={};return this.namespace.chains.forEach(t=>{var n;e[t]=this.createHttpProvider(t,null==(n=this.namespace.rpcMap)?void 0:n[t])}),e}getHttpProvider(){let e="".concat(this.name,":").concat(this.chainId),t=this.httpProviders[e];if(typeof t>"u")throw Error("JSON-RPC provider for ".concat(e," not found"));return t}setHttpProvider(e,t){let n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){let n=t||c4(e,this.namespace,this.client.core.projectId);return typeof n>"u"?void 0:new ou.JsonRpcProvider(new c_.default(n,da("disableProviderPing")))}constructor(e){dU(this,"name","algorand"),dU(this,"client"),dU(this,"httpProviders"),dU(this,"events"),dU(this,"namespace"),dU(this,"chainId"),this.namespace=e.namespace,this.events=da("events"),this.client=da("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}}
1var dz=Object.defineProperty,dW=(e,t,n)=>((e,t,n)=>t in e?dz(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n);class dq{updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;let e=this.namespace.chains[0];if(!e)throw Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(cM.DEFAULT_CHAIN_CHANGED,"".concat(this.name,":").concat(this.chainId))}getAccounts(){let e=this.namespace.accounts;return e?[...new Set(e.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){let e={};return this.namespace.chains.forEach(t=>{let n=this.getCardanoRPCUrl(t),r=c6(t);e[r]=this.createHttpProvider(r,n)}),e}getHttpProvider(){let e="".concat(this.name,":").concat(this.chainId),t=this.httpProviders[e];if(typeof t>"u")throw Error("JSON-RPC provider for ".concat(e," not found"));return t}getCardanoRPCUrl(e){let t=this.namespace.rpcMap;if(t)return t[e]}setHttpProvider(e,t){let n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){let n=t||this.getCardanoRPCUrl(e);if(!n)throw Error("No RPC url provided for chainId: ".concat(e));return new ou.JsonRpcProvider(new c_.default(n,da("disableProviderPing")))}constructor(e){dW(this,"name","cip34"),dW(this,"client"),dW(this,"httpProviders"),dW(this,"events"),dW(this,"namespace"),dW(this,"chainId"),this.namespace=e.namespace,this.events=da("events"),this.client=da("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}}var dH=Object.defineProperty,dV=(e,t,n)=>((e,t,n)=>t in e?dH(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n);class dG{updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(cM.DEFAULT_CHAIN_CHANGED,"".concat(this.name,":").concat(e))}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;let e=this.namespace.chains[0];if(!e)throw Error("ChainId not found");return e.split(":")[1]}getAccounts(){let e=this.namespace.accounts;return e?[...new Set(e.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){let e={};return this.namespace.chains.forEach(t=>{var n;let r=c6(t);e[r]=this.createHttpProvider(r,null==(n=this.namespace.rpcMap)?void 0:n[t])}),e}getHttpProvider(){let e="".concat(this.name,":").concat(this.chainId),t=this.httpProviders[e];if(typeof t>"u")throw Error("JSON-RPC provider for ".concat(e," not found"));return t}setHttpProvider(e,t){let n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){let n=t||c4(e,this.namespace,this.client.core.projectId);return new ou.JsonRpcProvider(new c_.default(n,da("disableProviderPing")))}constructor(e){dV(this,"name","elrond"),dV(this,"client"),dV(this,"httpProviders"),dV(this,"events"),dV(this,"namespace"),dV(this,"chainId"),this.namespace=e.namespace,this.events=da("events"),this.client=da("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}}var dK=Object.defineProperty,dY=(e,t,n)=>((e,t,n)=>t in e?dK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n);class dZ{updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(cM.DEFAULT_CHAIN_CHANGED,"".concat(this.name,":").concat(e))}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;let e=this.namespace.chains[0];if(!e)throw Error("ChainId not found");return e.split(":")[1]}getAccounts(){let e=this.namespace.accounts;return e?[...new Set(e.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){let e={};return this.namespace.chains.forEach(t=>{var n;let r=c6(t);e[r]=this.createHttpProvider(r,null==(n=this.namespace.rpcMap)?void 0:n[t])}),e}getHttpProvider(){let e="".concat(this.name,":").concat(this.chainId),t=this.httpProviders[e];if(typeof t>"u")throw Error("JSON-RPC provider for ".concat(e," not found"));return t}setHttpProvider(e,t){let n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){let n=t||c4(e,this.namespace,this.client.core.projectId);return new ou.JsonRpcProvider(new c_.default(n,da("disableProviderPing")))}constructor(e){dY(this,"name","multiversx"),dY(this,"client"),dY(this,"httpProviders"),dY(this,"events"),dY(this,"namespace"),dY(this,"chainId"),this.namespace=e.namespace,this.events=da("events"),this.client=da("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}}var dJ=Object.defineProperty,dQ=(e,t,n)=>((e,t,n)=>t in e?dJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n);class dX{updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;let e=this.namespace.chains[0];if(!e)throw Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){if(this.chainId=e,!this.httpProviders[e]){let n=t||c4("".concat(this.name,":").concat(e),this.namespace);this.setHttpProvider(e,n)}this.events.emit(cM.DEFAULT_CHAIN_CHANGED,"".concat(this.name,":").concat(this.chainId))}getAccounts(){let e=this.namespace.accounts;return e&&e.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2])||[]}createHttpProviders(){let e={};return this.namespace.chains.forEach(t=>{var n;e[t]=this.createHttpProvider(t,null==(n=this.namespace.rpcMap)?void 0:n[t])}),e}getHttpProvider(){let e="".concat(this.name,":").concat(this.chainId),t=this.httpProviders[e];if(typeof t>"u")throw Error("JSON-RPC provider for ".concat(e," not found"));return t}setHttpProvider(e,t){let n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){let n=t||c4(e,this.namespace);return typeof n>"u"?void 0:new ou.JsonRpcProvider(new c_.default(n,da("disableProviderPing")))}constructor(e){dQ(this,"name","near"),dQ(this,"client"),dQ(this,"httpProviders"),dQ(this,"events"),dQ(this,"namespace"),dQ(this,"chainId"),this.namespace=e.namespace,this.events=da("events"),this.client=da("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}}var d0=Object.defineProperty,d1=(e,t,n)=>((e,t,n)=>t in e?d0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n);class d2{updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;let e=this.namespace.chains[0];if(!e)throw Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){if(this.chainId=e,!this.httpProviders[e]){let n=t||c4("".concat(this.name,":").concat(e),this.namespace);this.setHttpProvider(e,n)}this.events.emit(cM.DEFAULT_CHAIN_CHANGED,"".concat(this.name,":").concat(this.chainId))}getAccounts(){let e=this.namespace.accounts;return e&&e.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2])||[]}createHttpProviders(){let e={};return this.namespace.chains.forEach(t=>{e[t]=this.createHttpProvider(t)}),e}getHttpProvider(){let e="".concat(this.name,":").concat(this.chainId),t=this.httpProviders[e];if(typeof t>"u")throw Error("JSON-RPC provider for ".concat(e," not found"));return t}setHttpProvider(e,t){let n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){let n=t||c4(e,this.namespace);return typeof n>"u"?void 0:new ou.JsonRpcProvider(new c_.default(n))}constructor(e){d1(this,"name","tezos"),d1(this,"client"),d1(this,"httpProviders"),d1(this,"events"),d1(this,"namespace"),d1(this,"chainId"),this.namespace=e.namespace,this.events=da("events"),this.client=da("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}}var d3=Object.defineProperty,d5=(e,t,n)=>((e,t,n)=>t in e?d3(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n);class d4{updateNamespace(e){this.namespace.chains=[...new Set((this.namespace.chains||[]).concat(e.chains||[]))],this.namespace.accounts=[...new Set((this.namespace.accounts||[]).concat(e.accounts||[]))],this.namespace.methods=[...new Set((this.namespace.methods||[]).concat(e.methods||[]))],this.namespace.events=[...new Set((this.namespace.events||[]).concat(e.events||[]))],this.httpProviders=this.createHttpProviders()}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider(e.chainId).request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(cM.DEFAULT_CHAIN_CHANGED,"".concat(this.name,":").concat(e))}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;let e=this.namespace.chains[0];if(!e)throw Error("ChainId not found");return e.split(":")[1]}getNamespaceName(){let e=this.namespace.chains[0];if(!e)throw Error("ChainId not found");return e2(e).namespace}getAccounts(){let e=this.namespace.accounts;return e?[...new Set(e.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){var e,t;let n={};return null==(t=null==(e=this.namespace)?void 0:e.accounts)||t.forEach(e
1=>{n[e2(e).reference]=this.createHttpProvider(e)}),n}getHttpProvider(e){let t=this.httpProviders[e];if(typeof t>"u")throw Error("JSON-RPC provider for ".concat(e," not found"));return t}setHttpProvider(e,t){let n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){let n=t||c4(e,this.namespace,this.client.core.projectId);return new ou.JsonRpcProvider(new c_.default(n,da("disableProviderPing")))}constructor(e){d5(this,"name",cN),d5(this,"client"),d5(this,"httpProviders"),d5(this,"events"),d5(this,"namespace"),d5(this,"chainId"),this.namespace=e.namespace,this.events=da("events"),this.client=da("client"),this.chainId=this.getDefaultChain(),this.name=this.getNamespaceName(),this.httpProviders=this.createHttpProviders()}}var d6=Object.defineProperty,d8=Object.defineProperties,d9=Object.getOwnPropertyDescriptors,d7=Object.getOwnPropertySymbols,ue=Object.prototype.hasOwnProperty,ut=Object.prototype.propertyIsEnumerable,un=(e,t,n)=>t in e?d6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ur=(e,t)=>{for(var n in t||(t={}))ue.call(t,n)&&un(e,n,t[n]);if(d7)for(var n of d7(t))ut.call(t,n)&&un(e,n,t[n]);return e},ui=(e,t)=>d8(e,d9(t)),ua=(e,t,n)=>un(e,"symbol"!=typeof t?t+"":t,n);class uo{static async init(e){let t=new uo(e);return await t.initialize(),t}async request(e,t,n){let[r,i]=this.validateChain(t);if(!this.session)throw Error("Please call connect() before request()");return await this.getProvider(r).request({request:ur({},e),chainId:"".concat(r,":").concat(i),topic:this.session.topic,expiry:n})}sendAsync(e,t,n,r){let i=new Date().getTime();this.request(e,n,r).then(e=>t(null,(0,oh.formatJsonRpcResult)(i,e))).catch(e=>t(e,void 0))}async enable(){if(!this.client)throw Error("Sign Client not initialized");return this.session||await this.connect({namespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties,scopedProperties:this.scopedProperties}),await this.requestAccounts()}async disconnect(){var e;if(!this.session)throw Error("Please call connect() before enable()");await this.client.disconnect({topic:null==(e=this.session)?void 0:e.topic,reason:aP("USER_DISCONNECTED")}),await this.cleanup()}async connect(e){if(!this.client)throw Error("Sign Client not initialized");if(this.setNamespaces(e),this.cleanupPendingPairings(),!e.skipPairing)return await this.pair(e.pairingTopic)}async authenticate(e,t){if(!this.client)throw Error("Sign Client not initialized");this.setNamespaces(e),await this.cleanupPendingPairings();let{uri:n,response:r}=await this.client.authenticate(e,t);n&&(this.uri=n,this.events.emit("display_uri",n));let i=await r();if(this.session=i.session,this.session){let e=dn(this.session.namespaces);this.namespaces=c7(this.namespaces,e),await this.persist("namespaces",this.namespaces),this.onConnect()}return i}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}removeListener(e,t){this.events.removeListener(e,t)}off(e,t){this.events.off(e,t)}get isWalletConnect(){return!0}async pair(e){let{uri:t,approval:n}=await this.client.connect({pairingTopic:e,requiredNamespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties,scopedProperties:this.scopedProperties});t&&(this.uri=t,this.events.emit("display_uri",t));let r=await n();this.session=r;let i=dn(r.namespaces);return this.namespaces=c7(this.namespaces,i),await this.persist("namespaces",this.namespaces),await this.persist("optionalNamespaces",this.optionalNamespaces),this.onConnect(),this.session}setDefaultChain(e,t){try{if(!this.session)return;let[n,r]=this.validateChain(e);this.getProvider(n).setDefaultChain(r,t)}catch(e){if(!/Please call connect/.test(e.message))throw e}}async cleanupPendingPairings(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{this.logger.info("Cleaning up inactive pairings...");let t=this.client.pairing.getAll();if(!a$(t))return;for(let n of t)e.deletePairings?this.client.core.expirer.set(n.topic,0):await this.client.core.relayer.subscriber.unsubscribe(n.topic);this.logger.info("Inactive pairings cleared: ".concat(t.length))}catch(e){this.logger.warn("Failed to cleanup pending pairings",e)}}abortPairingAttempt(){this.logger.warn("abortPairingAttempt is deprecated. This is now a no-op.")}async checkStorage(){this.namespaces=await this.getFromStore("namespaces")||{},this.optionalNamespaces=await this.getFromStore("optionalNamespaces")||{},this.session&&this.createProviders()}async initialize(){this.logger.trace("Initialized"),await this.createClient(),await this.checkStorage(),this.registerEventListeners()}async createClient(){var e,t;if(this.client=this.providerOpts.client||await cT.init({core:this.providerOpts.core,logger:this.providerOpts.logger||cj,relayUrl:this.providerOpts.relayUrl||"wss://relay.walletconnect.org",projectId:this.providerOpts.projectId,metadata:this.providerOpts.metadata,storageOptions:this.providerOpts.storageOptions,storage:this.providerOpts.storage,name:this.providerOpts.name,customStoragePrefix:this.providerOpts.customStoragePrefix,telemetryEnabled:this.providerOpts.telemetryEnabled}),this.providerOpts.session)try{this.session=this.client.session.get(this.providerOpts.session.topic)}catch(n){throw this.logger.error("Failed to get session",n),Error("The provided session: ".concat(null==(t=null==(e=this.providerOpts)?void 0:e.session)?void 0:t.topic," doesn't exist in the Sign client"))}else{let e=this.client.session.getAll();this.session=e[0]}this.logger.trace("SignClient Initialized")}createProviders(){if(!this.client)throw Error("Sign Client not initialized");if(!this.session)throw Error("Session not initialized. Please call connect() before enable()");let e=[...new Set(Object.keys(this.session.namespaces).map(e=>aS(e)))];ds("client",this.client),ds("events",this.events),ds("disableProviderPing",this.disableProviderPing),e.forEach(e
1=>{if(!this.session)return;let t=function(e,t){let n=Object.keys(t.namespaces).filter(t=>t.includes(e));if(!n.length)return[];let r=[];return n.forEach(e=>{let n=t.namespaces[e].accounts;r.push(...n)}),r}(e,this.session);if((null==t?void 0:t.length)===0)return;let n=c8(t),r=ui(ur({},c7(this.namespaces,this.optionalNamespaces)[e]),{accounts:t,chains:n});switch(e){case"eip155":this.rpcProviders[e]=new d$({namespace:r});break;case"algorand":this.rpcProviders[e]=new dB({namespace:r});break;case"solana":this.rpcProviders[e]=new dM({namespace:r});break;case"cosmos":this.rpcProviders[e]=new dD({namespace:r});break;case"polkadot":this.rpcProviders[e]=new dx({namespace:r});break;case"cip34":this.rpcProviders[e]=new dq({namespace:r});break;case"elrond":this.rpcProviders[e]=new dG({namespace:r});break;case"multiversx":this.rpcProviders[e]=new dZ({namespace:r});break;case"near":this.rpcProviders[e]=new dX({namespace:r});break;case"tezos":this.rpcProviders[e]=new d2({namespace:r});break;default:this.rpcProviders[e]=new d4({namespace:r})}})}registerEventListeners(){if(typeof this.client>"u")throw Error("Sign Client is not initialized");this.client.on("session_ping",e=>{var t;let{topic:n}=e;n===(null==(t=this.session)?void 0:t.topic)&&this.events.emit("session_ping",e)}),this.client.on("session_event",e=>{var t;let{params:n,topic:r}=e;if(r!==(null==(t=this.session)?void 0:t.topic))return;let{event:i}=n;if("accountsChanged"===i.name){let e=i.data;e&&a$(e)&&this.events.emit("accountsChanged",e.map(dt))}else if("chainChanged"===i.name){let e=n.chainId,t=n.event.data,r=aS(e),i=dr(e)!==dr(t)?"".concat(r,":").concat(dr(t)):e;this.onChainChanged(i)}else this.events.emit(i.name,i.data);this.events.emit("session_event",e)}),this.client.on("session_update",e=>{var t,n;let{topic:r,params:i}=e;if(r!==(null==(t=this.session)?void 0:t.topic))return;let{namespaces:a}=i,o=null==(n=this.client)?void 0:n.session.get(r);this.session=ui(ur({},o),{namespaces:a}),this.onSessionUpdate(),this.events.emit("session_update",{topic:r,params:i})}),this.client.on("session_delete",async e=>{var t;e.topic===(null==(t=this.session)?void 0:t.topic)&&(await this.cleanup(),this.events.emit("session_delete",e),this.events.emit("disconnect",ui(ur({},aP("USER_DISCONNECTED")),{data:e.topic})))}),this.on(cM.DEFAULT_CHAIN_CHANGED,e=>{this.onChainChanged(e,!0)})}getProvider(e){return this.rpcProviders[e]||this.rpcProviders[cN]}onSessionUpdate(){Object.keys(this.rpcProviders).forEach(e=>{var t;this.getProvider(e).updateNamespace(null==(t=this.session)?void 0:t.namespaces[e])})}setNamespaces(e){let{namespaces:t={},optionalNamespaces:n={},sessionProperties:r,scopedProperties:i}=e;this.optionalNamespaces=c7(t,n),this.sessionProperties=r,this.scopedProperties=i}validateChain(e){let[t,n]=(null==e?void 0:e.split(":"))||["",""];if(!this.namespaces||!Object.keys(this.namespaces).length)return[t,n];if(t&&!Object.keys(this.namespaces||{}).map(e=>aS(e)).includes(t))throw Error("Namespace '".concat(t,"' is not configured. Please call connect() first with namespace config."));if(t&&n)return[t,n];let r=aS(Object.keys(this.namespaces)[0]),i=this.rpcProviders[r].getDefaultChain();return[r,i]}async requestAccounts(){let[e]=this.validateChain();return await this.getProvider(e).requestAccounts()}async onChainChanged(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!this.namespaces)return;let[n,r]=this.validateChain(e);if(!r)return;this.updateNamespaceChain(n,r);let i=this.getProvider(n).getDefaultChain();t?(this.events.emit("chainChanged",r),this.emitAccountsChangedOnChainChange({namespace:n,previousChainId:i,newChainId:e})):this.getProvider(n).setDefaultChain(r),await this.persist("namespaces",this.namespaces)}emitAccountsChangedOnChainChange(e){var t,n;let{namespace:r,previousChainId:i,newChainId:a}=e;try{if(i===a)return;let e=null==(n=null==(t=this.session)?void 0:t.namespaces[r])?void 0:n.accounts;if(!e)return;let o=e.filter(e=>e.includes("".concat(a,":"))).map(dt);if(!a$(o))return;this.events.emit("accountsChanged",o)}catch(e){this.logger.warn("Failed to emit accountsChanged on chain change",e)}}updateNamespaceChain(e,t){if(!this.namespaces)return;let n=this.namespaces[e]?e:"".concat(e,":").concat(t);this.namespaces[n]?this.namespaces[n]&&(this.namespaces[n].defaultChain=t):this.namespaces[n]={chains:[],methods:[],events:[],defaultChain:t}}onConnect(){this.createProviders(),this.events.emit("connect",{session:this.session})}async cleanup(){this.namespaces=void 0,this.optionalNamespaces=void 0,this.sessionProperties=void 0,await this.deleteFromStore("namespaces"),await this.deleteFromStore("optionalNamespaces"),await this.deleteFromStore("sessionProperties"),this.session=void 0,this.cleanupPendingPairings({deletePairings:!0}),await this.cleanupStorage()}async persist(e,t){var n;let r=(null==(n=this.session)?void 0:n.topic)||"";await this.client.core.storage.setItem("".concat(cP,"/").concat(e).concat(r),t)}async getFromStore(e){var t;let n=(null==(t=this.session)?void 0:t.topic)||"";return await this.client.core.storage.getItem("".concat(cP,"/").concat(e).concat(n))}async deleteFromStore(e){var t;let n=(null==(t=this.session)?void 0:t.topic)||"";await this.client.core.storage.removeItem("".concat(cP,"/").concat(e).concat(n))}async cleanupStorage(){var e;try{if((null==(e=this.client)?void 0:e.session.length)>0)return;for(let e of(await this.client.core.storage.getKeys()))e.startsWith(cP)&&await this.client.core.storage.removeItem(e)}catch(e){this.logger.warn("Failed to cleanup storage",e)}}constructor(e){ua(this,"client"),ua(this,"namespaces"),ua(this,"optionalNamespaces"),ua(this,"sessionProperties"),ua(this,"scopedProperties"),ua(this,"events",new F.default),ua(this,"rpcProviders",{}),ua(this,"session"),ua(this,"providerOpts"),ua(this,"logger"),ua(this,"uri"),ua(this,"disableProviderPing",!1),this.providerOpts=e,this.logger="u">typeof(null==e?void 0:e.logger)&&"string"!=typeof(null==e?void 0:e.logger)?e.logger:(0,a0.pino)((0,aX.getDefaultLoggerOptions)({level:(null==e?void 0:e.logger)||cj})),this.disableProviderPing=(null==e?void 0:e.disableProviderPing)||!1}}let us="".concat("wc","@2:").concat("ethereum_provider",":"),ul=["eth_sendTransaction","personal_sign"],uc=["eth_accounts","eth_requestAccounts","eth_sendRawTransaction","eth_sign","eth_signTransaction","eth_signTypedData","eth_signTypedData_v3","eth_signTypedData_v4","eth_sendTransaction","personal_sign","wallet_switchEthereumChain","wallet_addEthereumChain","wallet_getPermissions","wallet_requestPermissions","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode","wallet_sendCalls","wallet_getCapabilities","wallet_getCallsStatus","wallet_showCallsStatus"],ud=["chainChanged","accountsChanged"],uu=["chainChanged","accountsChanged","message","disconnect","connect"],uh=async()=>{let{createAppKit:t}=await e.A(156814);return t};var up=Object.defineProperty,uf=Object.defineProperties,ug=Object.getOwnPropertyDescriptors,um=Object.getOwnPropertySymbols,uy=Object.prototype.hasOwnProperty,uv=Object.prototype.propertyIsEnumerable,ub=(e,t,n)=>t in e?up(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,uw=(e,t)=>{for(var n in t||(t={}))uy.call(t,n)&&ub(e,n,t[n]);if(um)for(var n of um(t))uv.call(t,n)&&ub(e,n,t[n]);return e},ux=(e,t)=>uf(e,ug(t)),uC=(e,t,n)=>ub(e,"symbol"!=typeof t?t+"":t,n);function uE(e){return Number(e[0].split(":")[1])}function uk(e){return"0x".concat(e.toString(16))}class uS{static async init(e){let t=new uS;return await t.initialize(e),t}async request(e,t){return await this.signer.request(e,this.formatChainId(this.chainId),t)}sendAsync(e,t,n){this.signer.sendAsync(e,t,this.formatChainId(this.chainId),n)}get connected(){return!!this.signer.client&&this.signer.client.core.relayer.connected}get connecting(){return!!this.signer.client&&this.signer.client.core.relayer.connecting}async enable(){return this.session||await this.connect(),await this.request({method:"eth_requestAccounts"})}async connect(e){var t;if(!this.signer.client)throw Error("Provider not initialized. Call init() first");this.loadConnectOpts(e);let{required:n,optional:r}=function(e){let{chains:t,optionalChains:n,methods:r,optionalMethods:i,events:a,optionalEvents:o,rpcMap:s}=e;if(!a$(t))throw Error("Invalid chains");let l={chains:t,methods:r||ul,events:a||ud,rpcMap:uw({},t.length?{[uE(t)]:s[uE(t)]}:{})},c=null==a?void 0:a.filter(e=>!ud.includes(e)),d=null==r?void 0:r.filter(e=>!ul.includes(e));if(!n&&!o&&!i&&!(null!=c&&c.length)&&!(null!=d&&d.length))return{required:t.length?l:void 0};let u={chains:[...new Set((null==c?void 0:c.length)&&(null==d?void 0:d.length)||!n?l.chains.concat(n||[]):n)],methods:[...new Set(l.methods.concat(null!=i&&i.length?i:uc))],events:[...new Set(l.events.concat(null!=o&&o.length?o:uu))],rpcMap:s};return{required:t.length?l:void 0,optional:n.length?u:void 0}}(this.rpc);try{let t=await new Promise(async(t,i)=>{var a,o;this.rpc.showQrModal&&(null==(a=this.modal)||a.open(),null==(o=this.modal)||o.subscribeState(e=>{e.open||this.signer.session||(this.signer.abortPairingAttempt(),i(Error("Connection request reset. Please try again.")))}));let s=null!=e&&e.scopedProperties?{[this.namespace]:e.scopedProperties}:void 0;await this.signer.connect(ux(uw({namespaces:uw({},n&&{[this.namespace]:n})},r&&{optionalNamespaces:{[this.namespace]:r}}),{pairingTopic:null==e?void 0:e.pairingTopic,scopedProperties:s})).then(e=>{t(e)}).catch(e=>{var t;null==(t=this.modal)||t.showErrorMessage("Unable to connect"),i(Error(e.message))})});if(!t)return;let i=e3(t.namespaces,[this.namespace]);this.setChainIds(this.rpc.chains.length?this.rpc.chains:i),this.setAccounts(i),this.events.emit("connect",{chainId:uk(this.chainId)})}catch(e){throw this.signer.logger.error(e),e}finally{null==(t=this.modal)||t.close()}}async authenticate(e,t){var n;if(!this.signer.client)throw Error("Provider not initialized. Call init() first");this.loadConnectOpts({chains:null==e?void 0:e.chains});try{let n=await new Promise(async(n,r)=>{var i,a;this.rpc.showQrModal&&(null==(i=this.modal)||i.open(),null==(a=this.modal)||a.subscribeState(e=>{e.open||this.signer.session||(this.signer.abortPairingAttempt(),r(Error("Connection request reset. Please try again.")))})),await this.signer.authenticate(ux(uw({},e),{chains:this.rpc.chains}),t).then(e=>{n(e)}).catch(e=>{var t;null==(t=this.modal)||t.showErrorMessage("Unable to connect"),r(Error(e.message))})}),r=n.session;if(r){let e=e3(r.namespaces,[this.namespace]);this.setChainIds(this.rpc.chains.length?this.rpc.chains:e),this.setAccounts(e),this.events.emit("connect",{chainId:uk(this.chainId)})}return n}catch(e){throw this.signer.logger.error(e),e}finally{null==(n=this.modal)||n.close()}}async disconnect(){this.session&&await this.signer.disconnect(),this.reset()}get isWalletConnect(){return!0}get session(){return this.signer.session}registerEventListeners(){this.signer.on("session_event",e=>{let{params:t}=e,{event:n}=t;"accountsChanged"===n.name?(this.accounts=this.parseAccounts(n.data),this.events.emit("accountsChanged",this.accounts)):"chainChanged"===n.name?this.setChainId(this.formatChainId(n.data)):this.events.emit(n.name,n.data),this.events.emit("session_event",e)}),this.signer.on("accountsChanged",e=>{this.accounts=this.parseAccounts(e),this.events.emit("accountsChanged",this.accounts)}),this.signer.on("chainChanged",e=>{let t=parseInt(e);this.chainId=t,this.events.emit("chainChanged",uk(this.chainId)),this.persist()}),this.signer.on("session_update",e=>{this.events.emit("session_update",e)}),this.signer.on("session_delete",e=>{this.reset(),this.events.emit("session_delete",e),this.events.emit("disconnect",ux(uw({},aP("USER_DISCONNECTED")),{data:e.topic,name:"USER_DISCONNECTED"}))}),this.signer.on("display_uri",e=>{this.events.emit("display_uri",e)})}switchEthereumChain(e){this.request({method:"wallet_switchEthereumChain",params:[{chainId:e.toString(16)}]})}isCompatibleChainId(e){return"string"==typeof e&&e.startsWith("".concat(this.namespace,":"))}formatChainId(e){return"".concat(this.namespace,":").concat(e)}parseChainId(e){return Number(e.split(":")[1])}setChainIds(e){let t=e.filter(e=>this.isCompatibleChainId(e)).map(e=>this.parseChainId(e));t.length&&(this.chainId=t[0],this.events.emit("chainChanged",uk(this.chainId)),this.persist())}setChainId(e){if(this.isCompatibleChainId(e)){let t=this.parseChainId(e);this.chainId=t,this.switchEthereumChain(t)}}parseAccountId(e){let[t,n,r]=e.split(":");return{chainId:"".concat(t,":").concat(n),address:r}}setAccounts(e){this.accounts=e.filter(e=>this.parseChainId(this.parseAccountId(e).chainId)===this.chainId).map(e=>this.parseAccountId(e).address),this.events.emit("accountsChanged",this.accounts)}getRpcConfig(e){var t,n;let r=null!=(t=null==e?void 0:e.chains)?t:[],i=null!=(n=null==e?void 0:e.optionalChains)?n:[],a=r.concat(i);if(!a.length)throw Error("No chains specified in either `chains` or `optionalChains`");let o=r.length?(null==e?void 0:e.methods)||ul:[],s=r.length?(null==e?void 0:e.events)||ud:[],l=(null==e?void 0:e.optionalMethods)||[],c=(null==e?void 0:e.optionalEvents)||[],d=(null==e?void 0:e.rpcMap)||this.buildRpcMap(a,e.projectId),u=(null==e?void 0:e.qrModalOptions)||void 0;return{chains:null==r?void 0:r.map(e=>this.formatChainId(e)),optionalChains:i.map(e=>this.formatChainId(e)),methods:o,events:s,optionalMethods:l,optionalEvents:c,rpcMap:d,showQrModal:!!(null!=e&&e.showQrModal),qrModalOptions:u,projectId:e.projectId,metadata:e.metadata}}buildRpcMap(e,t){let n={};
1return e.forEach(e=>{n[e]=this.getRpcUrl(e,t)}),n}async initialize(e){if(this.rpc=this.getRpcConfig(e),this.chainId=this.rpc.chains.length?uE(this.rpc.chains):uE(this.rpc.optionalChains),this.signer=await uo.init({projectId:this.rpc.projectId,metadata:this.rpc.metadata,disableProviderPing:e.disableProviderPing,relayUrl:e.relayUrl,storage:e.storage,storageOptions:e.storageOptions,customStoragePrefix:e.customStoragePrefix,telemetryEnabled:e.telemetryEnabled,logger:e.logger}),this.registerEventListeners(),await this.loadPersistedSession(),this.rpc.showQrModal){let e;try{let t=await uh(),{convertWCMToAppKitOptions:n}=await Promise.resolve().then(function(){return uL}),r=n(ux(uw({},this.rpc.qrModalOptions),{chains:[...new Set([...this.rpc.chains,...this.rpc.optionalChains])],metadata:this.rpc.metadata,projectId:this.rpc.projectId}));if(!r.networks.length)throw Error("No networks found for WalletConnect·");e=t(ux(uw({},r),{universalProvider:this.signer,manualWCControl:!0}))}catch(e){throw console.warn(e),Error("To use QR modal, please install @reown/appkit package")}if(e)try{this.modal=e}catch(e){throw this.signer.logger.error(e),Error("Could not generate WalletConnectModal Instance")}}}loadConnectOpts(e){if(!e)return;let{chains:t,optionalChains:n,rpcMap:r}=e;t&&a$(t)&&(this.rpc.chains=t.map(e=>this.formatChainId(e)),t.forEach(e=>{this.rpc.rpcMap[e]=(null==r?void 0:r[e])||this.getRpcUrl(e)})),n&&a$(n)&&(this.rpc.optionalChains=[],this.rpc.optionalChains=null==n?void 0:n.map(e=>
1this.formatChainId(e)),n.forEach(e=>{this.rpc.rpcMap[e]=(null==r?void 0:r[e])||this.getRpcUrl(e)}))}getRpcUrl(e,t){var n;return(null==(n=this.rpc.rpcMap)?void 0:n[e])||"".concat("https://rpc.walletconnect.org/v1/","?chainId=eip155:").concat(e,"&projectId=").concat(t||this.rpc.projectId)}async loadPersistedSession(){if(this.session)try{let e=await this.signer.client.core.storage.getItem("".concat(this.STORAGE_KEY,"/chainId")),t=this.session.namespaces["".concat(this.namespace,":").concat(e)]?this.session.namespaces["".concat(this.namespace,":").concat(e)]:this.session.namespaces[this.namespace];this.setChainIds(e?[this.formatChainId(e)]:null==t?void 0:t.accounts),this.setAccounts(null==t?void 0:t.accounts)}catch(e){this.signer.logger.error("Failed to load persisted session, clearing state..."),this.signer.logger.error(e),await this.disconnect().catch(e=>this.signer.logger.warn(e))}}reset(){this.chainId=1,this.accounts=[]}persist(){this.session&&this.signer.client.core.storage.setItem("".concat(this.STORAGE_KEY,"/chainId"),this.chainId)}parseAccounts(e){return"string"==typeof e||e instanceof String?[this.parseAccount(e)]:e.map(e=>this.parseAccount(e))}constructor(){uC(this,"events",new F.EventEmitter),uC(this,"namespace","eip155"),uC(this,"accounts",[]),uC(this,"signer"),uC(this,"chainId",1),uC(this,"modal"),uC(this,"rpc"),uC(this,"STORAGE_KEY",us),uC(this,"on",(e,t)=>(this.events.on(e,t),this)),uC(this,"once",(e,t)=>(this.events.once(e,t),this)),uC(this,"removeListener",(e,t)=>(this.events.removeListener(e,t),this)),uC(this,"off",(e,t)=>(this.events.off(e,t),this)),uC(this,"parseAccount",e=>this.isCompatibleChainId(e)?this.parseAccountId(e).address:e),this.signer={},this.rpc={}}}let uI=uS;var uA=Object.defineProperty,uT=Object.defineProperties,u_=Object.getOwnPropertyDescriptors,uj=Object.getOwnPropertySymbols,uP=Object.prototype.hasOwnProperty,u$=Object.prototype.propertyIsEnumerable,uN=(e,t,n)=>t in e?uA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,uO=(e,t)=>{for(var n in t||(t={}))uP.call(t,n)&&uN(e,n,t[n]);if(uj)for(var n of uj(t))u$.call(t,n)&&uN(e,n,t[n]);return e};let uM=e=>{let[t,n]=e.split(":");return uR({id:n,caipNetworkId:e,chainNamespace:t,name:"",nativeCurrency:{name:"",symbol:"",decimals:8},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]}}})};function uR(e){return uO({formatters:void 0,fees:void 0,serializers:void 0},e)}var uL=Object.freeze({__proto__:null,convertWCMToAppKitOptions:function(e){var t,n,r,i,a,o,s;let l=null==(t=e.chains)?void 0:t.map(uM).filter(Boolean);if(0===l.length)throw Error("At least one chain must be specified");let c=l.find(t=>{var n;return t.id===(null==(n=e.defaultChain)?void 0:n.id)}),d={projectId:e.projectId,networks:l,themeMode:e.themeMode,themeVariables:function(e){if(e)return{"--w3m-font-family":e["--wcm-font-family"],"--w3m-accent":e["--wcm-accent-color"],"--w3m-color-mix":e["--wcm-background-color"],"--w3m-z-index":e["--wcm-z-index"]?Number(e["--wcm-z-index"]):void 0,"--w3m-qr-color":e["--wcm-accent-color"],"--w3m-font-size-master":e["--wcm-text-medium-regular-size"],"--w3m-border-radius-master":e["--wcm-container-border-radius"],"--w3m-color-mix-strength":0}}(e.themeVariables),chainImages:e.chainImages,connectorImages:e.walletImages,defaultNetwork:c,metadata:uT(uO({},e.metadata),u_({name:(null==(n=e.metadata)?void 0:n.name)||"WalletConnect",description:(null==(r=e.metadata)?void 0:r.description)||"Connect to WalletConnect-compatible wallets",url:(null==(i=e.metadata)?void 0:i.url)||"https://walletconnect.org",icons:(null==(a=e.metadata)?void 0:a.icons)||["https://walletconnect.org/walletconnect-logo.png"]})),showWallets:!0,featuredWalletIds:"NONE"===e.explorerRecommendedWalletIds?[]:Array.isArray(e.explorerRecommendedWalletIds)?e.explorerRecommendedWalletIds:[],excludeWalletIds:"ALL"===e.explorerExcludedWalletIds?[]:Array.isArray(e.explorerExcludedWalletIds)?e.explorerExcludedWalletIds:[],enableEIP6963:!1,enableInjected:!1,enableCoinbase:!0,enableWalletConnect:!0,features:{email:!1,socials:!1}};if(null!=(o=e.mobileWallets)&&o.length||null!=(s=e.desktopWallets)&&s.length){let t=[...(e.mobileWallets||[]).map(e=>({id:e.id,name:e.name,links:e.links})),...(e.desktopWallets||[]).map(e=>({id:e.id,name:e.name,links:{native:e.links.native,universal:e.links.universal}}))],n=[...d.featuredWalletIds||[],...d.excludeWalletIds||[]],r=t.filter(e=>!n.includes(e.id));r.length&&(d.customWallets=r)}return d},defineChain:uR});e.s(["default",()=>uD],545223);let uD=t.forwardRef(function(e,n){let{title:r,titleId:i,...a}=e;return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":i},a),r?t.createElement("title",{id:i},r):null,t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 8.25h19.5M2.25 9h19.5m-16.5 5.25h6m-6 2.25h3m-3.75 3h15a2.25 2.25 0 0 0 2.25-2.25V6.75A2.25 2.25 0 0 0 19.5 4.5h-15a2.25 2.25 0 0 0-2.25 2.25v10.5A2.25 2.25 0 0 0 4.5 19.5Z"}))});e.s(["default",()=>uF],229663);let uF=t.forwardRef(function(e,n){let{title:r,titleId:i,...a}=e;return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":i},a),r?t.createElement("title",{id:i},r):null,t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 4.875c0-.621.504-1.125 1.125-1.125h4.5c.621 0 1.125.504 1.125 1.125v4.5c0 .621-.504 1.125-1.125 1.125h-4.5A1.125 1.125 0 0 1 3.75 9.375v-4.5ZM3.75 14.625c0-.621.504-1.125 1.125-1.125h4.5c.621 0 1.125.504 1.125 1.125v4.5c0 .621-.504 1.125-1.125 1.125h-4.5a1.
1125 1.125 0 0 1-1.125-1.125v-4.5ZM13.5 4.875c0-.621.504-1.125 1.125-1.125h4.5c.621 0 1.125.504 1.125 1.125v4.5c0 .621-.504 1.125-1.125 1.125h-4.5A1.125 1.125 0 0 1 13.5 9.375v-4.5Z"}),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 6.75h.75v.75h-.75v-.75ZM6.75 16.5h.75v.75h-.75v-.75ZM16.5 6.75h.75v.75h-.75v-.75ZM13.5 13.5h.75v.75h-.75v-.75ZM13.5 19.5h.75v.75h-.75v-.75ZM19.5 13.5h.75v.75h-.75v-.75ZM19.5 19.5h.75v.75h-.75v-.75ZM16.5 16.5h.75v.75h-.75v-.75Z"}))});e.s(["default",()=>uU],825262);let uU=t.forwardRef(function(e,n){let{title:r,titleId:i,...a}=e;return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":i},a),r?t.createElement("title",{id:i},r):null,t.createElement("path",{fillRule:"evenodd",d:"M15.97 2.47a.75.75 0 0 1 1.06 0l4.5 4.5a.75.75 0 0 1 0 1.06l-4.5 4.5a.75.75 0 1 1-1.06-1.06l3.22-3.22H7.5a.75.75 0 0 1 0-1.5h11.69l-3.22-3.22a.75.75 0 0 1 0-1.06Zm-7.94 9a.75.75 0 0 1 0 1.06l-3.22 3.22H16.5a.75.75 0 0 1 0 1.5H4.81l3.22 3.22a.75.75 0 1 1-1.06 1.06l-4.5-4.5a.75.75 0 0 1 0-1.06l4.5-4.5a.75.75 0 0 1 1.06 0Z",clipRule:"evenodd"}))});e.s(["default",()=>uB],382910);let uB=t.forwardRef(function(e,n){let{title:r,titleId:i,...a}=e;return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":i},a),r?t.createElement("title",{id:i},r):null,t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m11.25 11.25.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9-3.75h.008v.008H12V8.25Z"}))});e.s(["default",()=>uz],886330);let uz=t.forwardRef(function(e,n){let{title:r,titleId:i,...a}=e;return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":i},a),r?t.createElement("title",{id:i},r):null,t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 7.5V6.108c0-1.135.845-2.098 1.976-2.192.373-.03.748-.057 1.123-.08M15.75 18H18a2.25 2.25 0 0 0 2.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 0 0-1.123-.08M15.75 18.75v-1.875a3.375 3.375 0 0 0-3.375-3.375h-1.5a1.125 1.125 0 0 1-1.125-1.125v-1.5A3.375 3.375 0 0 0 6.375 7.5H5.25m11.9-3.664A2.251 2.251 0 0 0 15 2.25h-1.5a2.251 2.251 0 0 0-2.15 1.586m5.8 0c.065.21.1.433.1.664v.75h-6V4.5c0-.231.035-.454.1-.664M6.75 7.5H4.875c-.621 0-1.125.504-1.125 1.125v12c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V16.5a9 9 0 0 0-9-9Z"}))})},37046,(e,t,n)=>{"use strict";var r=e.r(271645),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},a=r.useSyncExternalStore,o=r.useRef,s=r.useEffect,l=r.useMemo,c=r.useDebugValue;n.useSyncExternalStoreWithSelector=function(e,t,n,r,d){var u=o(null);if(null===u.current){var h={hasValue:!1,value:null};u.current=h}else h=u.current;var p=a(e,(u=l(function(){function e(e){if(!s){if(s=!0,a=e,e=r(e),void 0!==d&&h.hasValue){var t=h.value;if(d(t,e))return o=t}return o=e}if(t=o,i(a,e))return t;var n=r(e);return void 0!==d&&d(t,n)?(a=e,t):(a=e,o=n)}var a,o,s=!1,l=void 0===n?null:n;return[function(){return e(t())},null===l?void 0:function(){return e(l())}]},[t,n,r,d]))[0],u[1]);return s(function(){h.hasValue=!0,h.value=p},[p]),c(p),p}},384420,(e,t,n)=>{"use strict";t.exports=e.r(37046)},739235,72903,652038,80758,402155,368578,746725,835696,941444,914189,813581,397701,341650,140407,929644,684653,877891,652265,401141,952744,605083,101852,255743,294316,83733,233137,732607,700020,35889,998348,526599,496629,635307,450223,296368,293897,e=>{"use strict";e.s(["a",()=>vy,"e",()=>vd,"f",()=>vu,"i",()=>vc,"p",()=>vp,"u",()=>vb],739235);var t=e.i(214068),n=e.i(435528),r=e.i(331191),i=e.i(47258),a=e.i(853317),o=e.i(975477),s=e.i(83319),l=e.i(301325),c=e.i(744645),d=e.i(141628),u=e.i(707213),h=e.i(554952),p=e.i(991120),f=e.i(271645),g=e.i(487350);e.s(["$",()=>os,"A",()=>oC,"B",()=>sr,"C",()=>oc,"D",()=>oE,"E",()=>sf,"F",()=>se,"G",()=>ok,"H",()=>od,"I",()=>oI,"J",()=>sB,"K",()=>sy,"L",()=>oA,"M",()=>sb,"N",()=>aV,"O",()=>ou,"P",()=>sg,"Q",()=>oo,"R",()=>a1,"S",()=>ol,"T",()=>oP,"U",()=>om,"V",()=>a6,"W",()=>la,"X",()=>oM,"Y",()=>a8,"Z",()=>ot,"_",()=>
1a7,"a",()=>ov,"a$",()=>y_,"a0",()=>oi,"a1",()=>og,"a2",()=>a9,"a3",()=>oe,"a4",()=>on,"a5",()=>or,"a6",()=>a2,"a7",()=>a3,"a8",()=>oa,"a9",()=>o3,"aA",()=>lg,"aB",()=>oG,"aC",()=>sY,"aD",()=>dN,"aE",()=>lD,"aF",()=>gm,"aG",()=>gy,"aH",()=>mC,"aI",()=>mn,"aJ",()=>g9,"aK",()=>g8,"aL",()=>me,"aM",()=>p1,"aN",()=>mp,"aO",()=>dA,"aP",()=>hA,"aQ",()=>a5,"aR",()=>uX,"aS",()=>hI,"aT",()=>hC,"aU",()=>a4,"aV",()=>pG,"aW",()=>mk,"aX",()=>mS,"aY",()=>hW,"aZ",()=>y7,"a_",()=>cH,"aa",()=>lp,"ab",()=>ck,"ac",()=>lC,"ad",()=>lE,"ae",()=>l$,"af",()=>dx,"ag",()=>db,"ah",()=>dC,"ai",()=>dg,"aj",()=>l1,"ak",()=>dE,"al",()=>lN,"am",()=>lz,"an",()=>lt,"ao",()=>lV,"ap",()=>dj,"aq",()=>d_,"ar",()=>dT,"as",()=>lc,"at",()=>cX,"au",()=>lR,"av",()=>c0,"aw",()=>lk,"ax",()=>op,"ay",()=>dS,"az",()=>ln,"b",()=>oj,"b$",()=>uR,"b0",()=>mQ,"b1",()=>yC,"b2",()=>hc,"b3",()=>yL,"b4",()=>gl,"b5",()=>hl,"b6",()=>dP,"b7",()=>d$,"b8",()=>pR,"b9",()=>pM,"bA",()=>o5,"bB",()=>oL,"bC",()=>g7,"bD",()=>pZ,"bE",()=>lu,"bF",()=>dw,"bG",()=>o2,"bH",()=>uD,"bI",()=>ll,"bJ",()=>m8,"bK",()=>p_,"bL",()=>pf,"bM",()=>sG,"bN",()=>y3,"bO",()=>y8,"bP",()=>ss,"bQ",()=>vi,"bR",()=>yl,"bS",()=>mR,"bT",()=>o8,"bU",()=>pP,"bV",()=>mE,"bW",()=>gr,"bX",()=>yY,"bY",()=>o6,"bZ",()=>sF,"b_",()=>gg,"ba",()=>cK,"bb",()=>pL,"bc",()=>pF,"bd",()=>pm,"be",()=>pI,"bf",()=>u1,"bg",()=>oN,"bh",()=>oW,"bi",()=>hK,"bj",()=>hq,"bk",()=>hV,"bl",()=>lZ,"bm",()=>pv,"bn",()=>le,"bo",()=>ph,"bp",()=>pp,"bq",()=>ld,"br",()=>lf,"bs",()=>uY,"bt",()=>uJ,"bu",()=>sc,"bv",()=>oZ,"bw",()=>sd,"bx",()=>yZ,"by",()=>oO,"bz",()=>gp,"c",()=>oy,"c0",()=>o1,"c1",()=>oR,"c2",()=>of,"c3",()=>oz,"c4",()=>oX,"cr",()=>h6,"cv",()=>h3,"cw",()=>h8,"cx",()=>h4,"d",()=>ob,"d1",()=>dq,"d2",()=>dH,"e",()=>o_,"f",()=>aG,"g",()=>ow,"h",()=>o$,"i",()=>oT,"j",()=>oS,"k",()=>ox,"l",()=>sa,"m",()=>sn,"n",()=>sm,"o",()=>a0,"p",()=>oB,"q",()=>oQ,"r",()=>sh,"s",()=>sv,"t",()=>oK,"u",()=>sw,"v",()=>oY,"w",()=>sC,"x",()=>sH,"y",()=>sp,"z",()=>sV],293897);var m=e.i(843476),y=e.i(269638),b=e.i(618348),w=e.i(643531),x=e.i(174886),C=e.i(878894),E=e.i(343432),k=e.i(270756),S=e.i(373884),I=e.i(626912),A=e.i(778917),T=e.i(466261),_=e.i(252754),j=e.i(37727),P=e.i(452074),$=e.i(826707),N=e.i(95740),O=e.i(263488),M=e.i(688511),R=e.i(111674),L=e.i(997053),D=e.i(722262),F=e.i(166953),U=e.i(309682),B=e.i(110163),z=e.i(285973),W=e.i(644616),q=e.i(880841),H=e.i(823838),V=e.i(796516),G=e.i(675107),K=e.i(316819),Y=e.i(249311),Z=e.i(57159),J=e.i(911347),Q=e.i(24335),X=e.i(599509),ee=e.i(656679),et=e.i(450323),en=e.i(180635),er=e.i(442690),ei=e.i(906764),ea=e.i(877225),eo=e.i(922773),es=e.i(403555),el=e.i(825158),ec=e.i(497530),ed=e.i(597011),eu=e.i(209150),eh=e.i(538838),ep=e.i(958747),ef=e.i(214909),eg=e.i(920209),em=e.i(802360),ey=e.i(422749),ev=e.i(828821),eb=t,ew=e.i(123287),ex=e.i(896354),eC=e.i(993556),eE=e.i(974935),ek=e.i(170230),eS=e.i(935759),eI=e.i(442346),eA=e.i(846455),eT=e.i(33750),e_=e.i(530448),ej=e.i(518139),eP=e.i(705630),e$=e.i(393573),eN=e.i(830260),eO=e.i(298282),eM=e.i(555340),eR=e.i(180022),eL=e.i(403392),eD=e.i(199220),eF=e.i(177001),eU=e.i(328175),eB=e.i(133041),ez=e.i(24111),eW=e.i(679392),eq=e.i(561686),eH=e.i(851757),eV=e.i(982946),eG=e.i(249221),eK=e.i(337025),eY=e.i(39875),eZ=e.i(586177),eJ=e.i(521292),eQ=e.i(844735),eX=e.i(48493),e0=e.i(866299),e1=e.i(973134),e2=e.i(595932),e3=e.i(803959),e5=e.i(477350),e4=e.i(545223),e6=e.i(229663),e8=e.i(825262),e9=e.i(382910),e7=e.i(886330),te=e.i(393794),tt=e.i(740382);e.s(["default",()=>tn],72903);let tn=f.forwardRef(function(e,t){let{title:n,titleId:r,...i}=e;return f.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":r},i),n?f.createElement("title",{id:r},n):null,f.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))});e.s(["default",()=>tr],652038);let tr=f.forwardRef(function(e,t){let{title:n,titleId:r,...i}=e;return f.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":r},i),n?f.createElement("title",{id:r},n):null,f.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 21a9.004 9.004 0 0 0 8.716-6.747M12 21a9.004 9.004 0 0 1-8.716-6.747M12 21c2.485 0 4.5-4.03 4.5-9S14.485 3 12 3m0 18c-2.485 0-4.5-4.03-4.5-9S9.515 3 12 3m0 0a8.997 8.997 0 0 1 7.843 4.582M12 3a8.997 8.997 0 0 0-7.843 4.582m15.686 0A11.953 11.953 0 0 1 12 10.5c-2.998 0-5.74-1.1-7.843-2.918m15.686 0A8.959 8.959 0 0 1 21 12c0 .778-.099 1.533-.284 2.253m0 0A17.919 17.919 0 0 1 12 16.5c-3.162 0-6.133-.815-8.716-2.247m0 0A9.015 9.015 0 0 1 3 12c0-1.605.42-3.113 1.157-4.418"}))});var ti=e.i(247167);let ta="undefined"!=typeof document?f.default.useLayoutEffect:()=>{},to=null!=(yh=f.default.useInsertionEffect)?yh:ta,ts=e=>{var t;return null!=(t=null==e?void 0:e.ownerDocument)?t:document},tl=e=>e&&"window"in e&&e.window===e?e:ts(e).defaultView||window;"undefined"!=typeof Element&&Element.prototype;let tc=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable^="false"])',"permission"];function td(e){return e.nativeEvent=e,e.isDefaultPrevented=()=>e.defaultPrevented,e.isPropagationStopped=()=>e.cancelBubble,e.persist=()=>{},e}function tu(e){let t=(0,f.useRef)({isFocused:!1,observer:null});ta(()=>{let e=t.current;return()=>{e.observer&&(e.observer.disconnect(),e.observer=null)}},[]);let n=function(e){let t=(0,f.useRef)(null);return to(()=>{t.current=e},[e]),(0,f.useCallback)(function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];let i=t.current;return null==i?void 0:i(...n)},[])}(t=>{null==e||e(t)});return(0,f.useCallback)(e=>{if(e.target instanceof HTMLButtonElement||e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement||e.target instanceof HTMLSelectElement){t.current.isFocused=!0;let r=e.target;r.addEventListener("focusout",e=>{t.current.isFocused=!1,r.disabled&&n(td(e)),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)},{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&r.disabled){var e;null==(e=t.current.observer)||e.disconnect();
1let n=r===document.activeElement?null:document.activeElement;r.dispatchEvent(new FocusEvent("blur",{relatedTarget:n})),r.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:n}))}}),t.current.observer.observe(r,{attributes:!0,attributeFilter:["disabled"]})}},[n])}function th(e){var t;if("undefined"==typeof window||null==window.navigator)return!1;let n=null==(t=window.navigator.userAgentData)?void 0:t.brands;return Array.isArray(n)&&n.some(t=>e.test(t.brand))||e.test(window.navigator.userAgent)}function tp(e){var t;return"undefined"!=typeof window&&null!=window.navigator&&e.test((null==(t=window.navigator.userAgentData)?void 0:t.platform)||window.navigator.platform)}function tf(e){let t=null;return()=>(null==t&&(t=e()),t)}tc.join(":not([hidden]),"),tc.push('[tabindex]:not([tabindex="-1"]):not([disabled])'),tc.join(':not([hidden]):not([tabindex="-1"]),');let tg=tf(function(){return tp(/^Mac/i)}),tm=tf(function(){return tp(/^iPhone/i)}),ty=tf(function(){return tp(/^iPad/i)||tg()&&navigator.maxTouchPoints>1}),tv=tf(function(){return tm()||ty()});tf(function(){return tg()||tv()}),tf(function(){return th(/AppleWebKit/i)&&!tb()});let tb=tf(function(){return th(/Chrome/i)}),tw=tf(function(){return th(/Android/i)});tf(function(){return th(/Firefox/i)});let tx={prefix:String(Math.round(1e10*Math.random())),current:0};f.default.createContext(tx),f.default.createContext(!1),"undefined"!=typeof window&&window.document&&window.document.createElement,new WeakMap;f.default.useId;let tC=null,tE=new Set,tk=new Map,tS=!1,tI=!1,tA={Tab:!0,Escape:!0};function tT(e,t){for(let n of tE)n(e,t)}function t_(e){tS=!0,e.metaKey||!tg()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key||(tC="keyboard",tT("keyboard",e))}
1function tj(e){tC="pointer",("mousedown"===e.type||"pointerdown"===e.type)&&(tS=!0,tT("pointer",e))}function tP(e){(""===e.pointerType&&e.isTrusted||(tw()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType))&&(tS=!0,tC="virtual")}function t$(e){e.target!==window&&e.target!==document&&e.isTrusted&&(tS||tI||(tC="virtual",tT("virtual",e)),tS=!1,tI=!1)}function tN(){tS=!1,tI=!0}function tO(e){if("undefined"==typeof window||"undefined"==typeof document||tk.get(tl(e)))return;let t=tl(e),n=ts(e),r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){tS=!0,r.apply(this,arguments)},n.addEventListener("keydown",t_,!0),n.addEventListener("keyup",t_,!0),n.addEventListener("click",tP,!0),t.addEventListener("focus",t$,!0),t.addEventListener("blur",tN,!1),"undefined"!=typeof PointerEvent&&(n.addEventListener("pointerdown",tj,!0),n.addEventListener("pointermove",tj,!0),n.addEventListener("pointerup",tj,!0)),t.addEventListener("beforeunload",()=>{tM(e)},{once:!0}),tk.set(t,{focus:r})}let tM=(e,t)=>{let n=tl(e),r=ts(e);t&&r.removeEventListener("DOMContentLoaded",t),tk.has(n)&&(n.HTMLElement.prototype.focus=tk.get(n).focus,r.removeEventListener("keydown",t_,!0),r.removeEventListener("keyup",t_,!0),r.removeEventListener("click",tP,!0),n.removeEventListener("focus",t$,!0),n.removeEventListener("blur",tN,!1),"undefined"!=typeof PointerEvent&&(r.removeEventListener("pointerdown",tj,!0),r.removeEventListener("pointermove",tj,!0),r.removeEventListener("pointerup",tj,!0)),tk.delete(n))};function tR(){return"pointer"!==tC}"undefined"!=typeof document&&function(e){let t,n=ts(void 0);"loading"!==n.readyState?tO(void 0):(t=()=>{tO(e)},n.addEventListener("DOMContentLoaded",t)),()=>tM(e,t)}();let tL=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function tD(e,t){return!!t&&!!e&&e.contains(t)}let tF=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;return e.activeElement};function tU(){let e=(0,f.useRef)(new Map),t=(0,f.useCallback)((t,n,r,i)=>{let a=(null==i?void 0:i.once)?function(){for(var t=arguments.length,n=Array(t),i=0;i<t;i++)n[i]=arguments[i];e.current.delete(r),r(...n)}:r;e.current.set(r,{type:n,eventTarget:t,fn:a,options:i}),t.addEventListener(n,a,i)},[]),n=(0,f.useCallback)((t,n,r,i)=>{var a;let o=(null==(a=e.current.get(r))?void 0:a.fn)||r;t.removeEventListener(n,o,i),e.current.delete(r)},[]),r=(0,f.useCallback)(()=>{e.current.forEach((e,t)=>{n(e.eventTarget,e.type,t,e.options)})},[n]);return(0,f.useEffect)(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}let tB=!1,tz=0;function tW(e){"touch"===e.pointerType&&(tB=!0,setTimeout(()=>{tB=!1},50))}function tq(){if("undefined"!=typeof document)return 0===tz&&"undefined"!=typeof PointerEvent&&document.addEventListener("pointerup",tW),tz++,()=>{--tz>0||"undefined"!=typeof PointerEvent&&document.removeEventListener("pointerup",tW)}}var tH=e.i(174080);e.s(["getActiveElement",()=>tJ,"getOwnerDocument",()=>tY,"getRootNode",()=>tZ,"isActiveElement",()=>tQ],402155),e.s(["env",()=>tK],80758);var tV=Object.defineProperty,tG=(e,t,n)=>(((e,t,n)=>t in e?tV(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),n);let tK=new class{set(e){this.current!==e&&(this.handoffState="pending",this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return"server"===this.current}get isClient(){return"client"===this.current}detect(){return"undefined"==typeof window||"undefined"==typeof document?"server":"client"}handoff(){"pending"===this.handoffState&&(this.handoffState="complete")}get isHandoffComplete(){return"complete"===this.handoffState}constructor(){tG(this,"current",this.detect()),tG(this,"handoffState","pending"),tG(this,"currentId",0)}};function tY(e){var t;return tK.isServer?null:null==e?document:null!=(t=null==e?void 0:e.ownerDocument)?t:document}function tZ(e){var t,n;return tK.isServer?null:null==e?document:null!=(n=null==(t=null==e?void 0:e.getRootNode)?void 0:t.call(e))?n:document}function tJ(e){var t,n;return null!=(n=null==(t=tZ(e))?void 0:t.activeElement)?n:null}function tQ(e){return tJ(e)===e}function tX(e){"function"==typeof queueMicrotask?queueMicrotask(e):Promise.resolve().then(e).catch(e=>setTimeout(()=>{throw e}))}function t0(){let e=[],t={addEventListener:(e,n,r,i)=>(e.addEventListener(n,r,i),t.add(()=>e.removeEventListener(n,r,i))),requestAnimationFrame(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];let i=requestAnimationFrame(...n);return t.add(()=>cancelAnimationFrame(i))},nextFrame(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.requestAnimationFrame(()=>t.requestAnimationFrame(...n))},setTimeout(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];let i=setTimeout(...n);return t.add(()=>clearTimeout(i))},microTask(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];let i={current:!0};return tX(()=>{i.current&&n[0]()}),t.add(()=>{i.current=!1})},style(e,t,n){let r=e.style.getPropertyValue(t);return Object.assign(e.style,{[t]:n}),this.add(()=>{Object.assign(e.style,{[t]:r})})},group(e){let t=t0();return e(t),this.add(()=>t.dispose())},add:t=>(e.includes(t)||e.push(t),()=>{let n=e.indexOf(t);if(n>=0)for(let t of e.splice(n,1))t()}),dispose(){for(let t of e.splice(0))t()}};return t}function t1(){let[e]=(0,f.useState)(t0);return(0,f.useEffect)(()=>()=>
1e.dispose(),[e]),e}e.s(["useDisposables",()=>t1],746725),e.s(["microTask",()=>tX],368578),e.s(["useEvent",()=>t5],914189),e.s(["useLatestValue",()=>t3],941444),e.s(["useIsoMorphicEffect",()=>t2],835696);let t2=(e,t)=>{tK.isServer?(0,f.useEffect)(e,t):(0,f.useLayoutEffect)(e,t)};function t3(e){let t=(0,f.useRef)(e);return t2(()=>{t.current=e},[e]),t}let t5=function(e){let t=t3(e);return f.default.useCallback(function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.current(...n)},[t])};function t4(e){if(null===e)return{width:0,height:0};let{width:t,height:n}=e.getBoundingClientRect();return{width:t,height:n}}var t6=(e=>(e[e.Left=0]="Left",e[e.Right=2]="Right",e))(t6||{});function t8(e){return"object"==typeof e&&null!==e&&"nodeType"in e}function t9(e){return t8(e)&&"tagName"in e}function t7(e){return t9(e)&&"accessKey"in e}function ne(e){return t9(e)&&"tabIndex"in e}function nt(e){return t9(e)&&"style"in e}function nn(e){return t7(e)&&"IFRAME"===e.nodeName}function nr(e){return t7(e)&&"INPUT"===e.nodeName}function ni(e){return t7(e)&&"LABEL"===e.nodeName}function na(e){return t7(e)&&"FIELDSET"===e.nodeName}function no(e){return t7(e)&&"LEGEND"===e.nodeName}function ns(e){return!!t9(e)&&e.matches('a[href],audio[controls],button,details,embed,iframe,img[usemap],input:not([type="hidden"]),label,select,textarea,video[controls]')}function nl(e){let t=e.parentElement,n=null;for(;t&&!na(t);)no(t)&&(n=t),t=t.parentElement;let r=(null==t?void 0:t.getAttribute("disabled"))==="";return!(r&&function(e){if(!e)return!1;let t=e.previousElementSibling;for(;null!==t;){if(no(t))return!1;t=t.previousElementSibling}return!0}(n))&&r}e.s(["hasInlineStyle",()=>nt,"isElement",()=>t9,"isHTMLElement",()=>t7,"isHTMLFieldSetElement",()=>na,"isHTMLIframeElement",()=>nn,"isHTMLInputElement",()=>nr,"isHTMLLabelElement",()=>ni,"isHTMLLegendElement",()=>no,"isHTMLorSVGElement",()=>ne,"isInteractiveElement",()=>ns,"isNode",()=>t8],813581),e.s(["useInertOthers",()=>nO],684653),e.s(["useIsTopLayer",()=>nj],929644),e.s(["ActionTypes",()=>nE,"stackMachines",()=>nI],341650);class nc extends Map{get(e){let t=super.get(e);return void 0===t&&(t=this.factory(e),this.set(e,t)),t}constructor(e){super(),this.factory=e}}var nd=Object.defineProperty,nu=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},nh=(e,t,n)=>(nu(e,t,"read from private field"),n?n.call(e):t.get(e)),np=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},nf=(e,t,n,r)=>(nu(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);class ng{dispose(){this.disposables.dispose()}get state(){return nh(this,yp)}subscribe(e,t){if(tK.isServer)return()=>{};let n={selector:e,callback:t,current:e(nh(this,yp))};return nh(this,yg).add(n),this.disposables.add(()=>{nh(this,yg).delete(n)})}on(e,t){return tK.isServer?()=>{}:(nh(this,yf).get(e).add(t),this.disposables.add(()=>{nh(this,yf).get(e).delete(t)}))}send(e){let t=this.reduce(nh(this,yp),e);if(t!==nh(this,yp)){for(let e of(nf(this,yp,t),nh(this,yg))){let t=e.selector(nh(this,yp));nm(e.current,t)||(e.current=t,e.callback(t))}for(let t of nh(this,yf).get(e.type))t(nh(this,yp),e)}}constructor(e){np(this,yp,{}),np(this,yf,new nc(()=>new Set)),np(this,yg,new Set),((e,t,n)=>((e,t,n)=>t in e?nd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n))(this,"disposables",t0()),nf(this,yp,e),tK.isServer&&this.disposables.microTask(()=>{this.dispose()})}}function nm(e,t){return!!Object.is(e,t)||"object"==typeof e&&null!==e&&"object"==typeof t&&null!==t&&(Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&ny(e[Symbol.iterator](),t[Symbol.iterator]()):e instanceof Map&&t instanceof Map||e instanceof Set&&t instanceof Set?e.size===t.size&&ny(e.entries(),t.entries()):!!(nv(e)&&nv(t))&&ny(Object.entries(e)[Symbol.iterator](),Object.entries(t)[Symbol.iterator]()))}function ny(e,t){for(;;){let n=e.next(),r=t.next();if(n.done&&r.done)return!0;if(n.done||r.done||!Object.is(n.value,r.value))return!1}}function nv(e){if("[object Object]"!==Object.prototype.toString.call(e))return!1;let t=Object.getPrototypeOf(e);return null===t||null===Object.getPrototypeOf(t)}function nb(e){let[t,n]=e(),r=t0();return function(){for(var e=arguments.length,i=Array(e),a=0;a<e;a++)i[a]=arguments[a];t(...i),r.dispose(),r.microTask(n)}}function nw(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];if(e in t){let n=t[e];return"function"==typeof n?n(...r):n}let a=Error('Tried to handle "'.concat(e,'" but there is no handler defined. Only defined handlers are: ').concat(Object.keys(t).map(e=>'"'.concat(e,'"')).join(", "),"."));throw Error.captureStackTrace&&Error.captureStackTrace(a,nw),a}yp=new WeakMap,yf=new WeakMap,yg=new WeakMap,e.s(["match",()=>nw],397701);var nx=Object.defineProperty,nC=(e,t,n)=>(((e,t,n)=>t in e?nx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),n),nE=(e=>(e[e.Push=0]="Push",e[e.Pop=1]="Pop",e))(nE||{});let nk={0(e,t){let n=t.id,r=e.stack,i=e.stack.indexOf(n);if(-1!==i){let t=e.stack.slice();return t.splice(i,1),t.push(n),r=t,{...e,stack:r}}return{...e,stack:[...e.stack,n]}},1(e,t){let n=t.id,r=e.stack.indexOf(n);if(-1===r)return e;let i=e.stack.slice();return i.splice(r,1),{...e,stack:i}}};
1class nS extends ng{static new(){return new nS({stack:[]})}reduce(e,t){return nw(t.type,nk,e,t)}constructor(){super(...arguments),nC(this,"actions",{push:e=>this.send({type:0,id:e}),pop:e=>this.send({type:1,id:e})}),nC(this,"selectors",{isTop:(e,t)=>e.stack[e.stack.length-1]===t,inStack:(e,t)=>e.stack.includes(t)})}}let nI=new nc(()=>nS.new());e.s(["useSlice",()=>nT],140407);var nA=e.i(384420);function nT(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:nm;return(0,nA.useSyncExternalStoreWithSelector)(t5(t=>e.subscribe(n_,t)),t5(()=>e.state),t5(()=>e.state),t5(t),n)}function n_(e){return e}function nj(e,t){let n=(0,f.useId)(),r=nI.get(t),[i,a]=nT(r,(0,f.useCallback)(e=>[r.selectors.isTop(e,n),r.selectors.inStack(e,n)],[r,n]));return t2(()=>{if(e)return r.actions.push(n),()=>r.actions.pop(n)},[r,e,n]),!!e&&(!a||i)}let nP=new Map,n$=new Map;function nN(e){var t;let n=null!=(t=n$.get(e))?t:0;return n$.set(e,n+1),0!==n||(nP.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),e.setAttribute("aria-hidden","true"),e.inert=!0),()=>(function(e){var t;let n=null!=(t=n$.get(e))?t:1;if(1===n?n$.delete(e):n$.set(e,n-1),1!==n)return;let r=nP.get(e);r&&(null===r["aria-hidden"]?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",r["aria-hidden"]),e.inert=r.inert,nP.delete(e))})(e)}function nO(e){let{allowed:t,disallowed:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=nj(e,"inert-others");t2(()=>{var e,i;if(!r)return;let a=t0();for(let t of null!=(e=null==n?void 0:n())?e:[])t&&a.add(nN(t));let o=null!=(i=null==t?void 0:t())?i:[];for(let e of o){if(!e)continue;let t=tY(e);if(!t)continue;let n=e.parentElement;for(;n&&n!==t.body;){for(let e of n.children)o.some(t=>e.contains(t))||a.add(nN(e));n=n.parentElement}}return a.dispose},[r,t,n])}function nM(e,t,n){let r=t3(e=>{let t=e.getBoundingClientRect();0===t.x&&0===t.y&&0===t.width&&0===t.height&&n()});(0,f.useEffect)(()=>{if(!e)return;let n=null===t?null:t7(t)?t:t.current;if(!n)return;let i=t0();if("undefined"!=typeof ResizeObserver){let e=new ResizeObserver(()=>r.current(n));e.observe(n),i.add(()=>e.disconnect())}if("undefined"!=typeof IntersectionObserver){let e=new IntersectionObserver(()=>r.current(n));e.observe(n),i.add(()=>e.disconnect())}return()=>i.dispose()},[t,r,e])}e.s(["useOnDisappear",()=>nM],877891),e.s(["useOutsideClick",()=>n0],952744),e.s(["Focus",()=>nD,"FocusResult",()=>nF,"FocusableMode",()=>nz,"focusElement",()=>nV,"focusFrom",()=>nK,"focusIn",()=>nY,"focusableSelector",()=>nR,"isFocusableElement",()=>nW,"restoreFocusIfNecessary",()=>nq,"sortByDomNode",()=>nG],652265);let nR=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","details>summary","textarea:not([disabled])"].map(e=>"".concat(e,":not([tabindex='-1'])")).join(","),nL=["[data-autofocus]"].map(e=>"".concat(e,":not([tabindex='-1'])")).join(",");var nD=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e[e.AutoFocus=64]="AutoFocus",e))(nD||{}),nF=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(nF||{}),nU=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(nU||{});function nB(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body;return null==e?[]:Array.from(e.querySelectorAll(nR)).sort((e,t)=>Math.sign((e.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER)))}var nz=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(nz||{});function nW(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e!==(null==(t=tY(e))?void 0:t.body)&&nw(n,{0:()=>e.matches(nR),1(){let t=e;for(;null!==t;){if(t.matches(nR))return!0;t=t.parentElement}return!1}})}function nq(e){t0().nextFrame(()=>{let t=tJ(e);t&&ne(t)&&!nW(t,0)&&nV(e)})}var nH=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(nH||{});function nV(e){null==e||e.focus({preventScroll:!0})}function nG(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e=>e;return e.slice().sort((e,n)=>{let r=t(e),i=t(n);if(null===r||null===i)return 0;let a=r.compareDocumentPosition(i);return a&Node.DOCUMENT_POSITION_FOLLOWING?-1:a&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function nK(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null===e?document.body:tZ(e);return nY(nB(n),t,{relativeTo:e})}function nY(e,t){var n,r,i;let{sorted:a=!0,relativeTo:o=null,skipElements:s=[]}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},l=Array.isArray(e)?e.length>0?tZ(e[0]):document:tZ(e),c=Array.isArray(e)?a?nG(e):e:64&t?function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body;return null==e?[]:Array.from(e.querySelectorAll(nL)).sort((e,t)=>
1Math.sign((e.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER)))}(e):nB(e);s.length>0&&c.length>1&&(c=c.filter(e=>!s.some(t=>null!=t&&"current"in t?(null==t?void 0:t.current)===e:t===e))),o=null!=o?o:null==l?void 0:l.activeElement;let d=(()=>{if(5&t)return 1;if(10&t)return -1;throw Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=(()=>{if(1&t)return 0;if(2&t)return Math.max(0,c.indexOf(o))-1;if(4&t)return Math.max(0,c.indexOf(o))+1;if(8&t)return c.length-1;throw Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),h=32&t?{preventScroll:!0}:{},p=0,f=c.length,g;do{if(p>=f||p+f<=0)return 0;let e=u+p;if(16&t)e=(e+f)%f;else{if(e<0)return 3;if(e>=f)return 1}null==(g=c[e])||g.focus(h),p+=d}while(g!==tJ(g))return 6&t&&null!=(i=null==(r=null==(n=g)?void 0:n.matches)?void 0:r.call(n,"textarea,input"))&&i&&g.select(),2}function nZ(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function nJ(){return nZ()||/Android/gi.test(window.navigator.userAgent)}function nQ(e,t,n,r){let i=t3(n);(0,f.useEffect)(()=>{if(e)return document.addEventListener(t,n,r),()=>document.removeEventListener(t,n,r);function n(e){i.current(e)}},[e,t,r])}function nX(e,t,n,r){let i=t3(n);(0,f.useEffect)(()=>{if(e)return window.addEventListener(t,n,r),()=>window.removeEventListener(t,n,r);function n(e){i.current(e)}},[e,t,r])}function n0(e,t,n){let r=t3(n),i=(0,f.useCallback)(function(e,n){if(e.defaultPrevented)return;let i=n(e);if(null!==i&&i.getRootNode().contains(i)&&i.isConnected){for(let n of function e(t){return"function"==typeof t?e(t()):Array.isArray(t)||t instanceof Set?t:[t]}(t))if(null!==n&&(n.contains(i)||e.composed&&e.composedPath().includes(n)))return;return nW(i,nz.Loose)||-1===i.tabIndex||e.preventDefault(),r.current(e,i)}},[r,t]),a=(0,f.useRef)(null);nQ(e,"pointerdown",e=>{var t,n;nJ()||(a.current=(null==(n=null==(t=e.composedPath)?void 0:t.call(e))?void 0:n[0])||e.target)},!0),nQ(e,"pointerup",e=>{if(nJ()||!a.current)return;let t=a.current;return a.current=null,i(e,()=>t)},!0);let o=(0,f.useRef)({x:0,y:0});nQ(e,"touchstart",e=>{o.current.x=e.touches[0].clientX,o.current.y=e.touches[0].clientY},!0),nQ(e,"touchend",e=>{let t={x:e.changedTouches[0].clientX,y:e.changedTouches[0].clientY};if(!(Math.abs(t.x-o.current.x)>=30||Math.abs(t.y-o.current.y)>=30))return i(e,()=>ne(e.target)?e.target:null)},!0),nX(e,"blur",e=>i(e,()=>nn(window.document.activeElement)?window.document.activeElement:null),!0)}function n1(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,f.useMemo)(()=>tY(...t),[...t])}"undefined"!=typeof window&&"undefined"!=typeof document&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{1===e.detail?delete document.documentElement.dataset.headlessuiFocusVisible:0===e.detail&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0)),e.s(["useWindowEvent",()=>nX],401141),e.s(["useOwnerDocument",()=>n1],605083);var n2=(e=>(e[e.Ignore=0]="Ignore",e[e.Select=1]="Select",e[e.Close=2]="Close",e))(n2||{});let n3={Ignore:{kind:0},Select:e=>({kind:1,target:e}),Close:{kind:2}};function n5(e){let t={};for(let n of e)Object.assign(t,n(t));return t}e.s(["useScrollLock",()=>n6],101852);let n4=function(e,t){let n=e(),r=new Set;return{getSnapshot:()=>n,subscribe:e=>(r.add(e),()=>r.delete(e)),dispatch(e){for(var i=arguments.length,a=Array(i>1?i-1:0),o=1;o<i;o++)a[o-1]=arguments[o];let s=t[e].call(n,...a);s&&(n=s,r.forEach(e=>e()))}}}(()=>new Map,{PUSH(e,t){var n;let r=null!=(n=this.get(e))?n:{doc:e,count:0,d:t0(),meta:new Set,computedMeta:{}};return r.count++,r.meta.add(t),r.computedMeta=n5(r.meta),this.set(e,r),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t),n.computedMeta=n5(n.meta)),this},SCROLL_PREVENT(e){let t,n={doc:e.doc,d:e.d,meta:()=>e.computedMeta},r=[nZ()?{before(e){let{doc:t,d:n,meta:r}=e;
1function i(e){for(let t of r().containers)for(let n of t())if(n.contains(e))return!0;return!1}n.microTask(()=>{var e;if("auto"!==window.getComputedStyle(t.documentElement).scrollBehavior){let e=t0();e.style(t.documentElement,"scrollBehavior","auto"),n.add(()=>n.microTask(()=>e.dispose()))}let r=null!=(e=window.scrollY)?e:window.pageYOffset,a=null;n.addEventListener(t,"click",e=>{if(ne(e.target))try{let n=e.target.closest("a");if(!n)return;let{hash:r}=new URL(n.href),o=t.querySelector(r);ne(o)&&!i(o)&&(a=o)}catch(e){}},!0),n.group(e=>{n.addEventListener(t,"touchstart",t=>{if(e.dispose(),ne(t.target)&&nt(t.target))if(i(t.target)){let n=t.target;for(;n.parentElement&&i(n.parentElement);)n=n.parentElement;e.style(n,"overscrollBehavior","contain")}else e.style(t.target,"touchAction","none")})}),n.addEventListener(t,"touchmove",e=>{if(ne(e.target)&&!nr(e.target))if(i(e.target)){let t=e.target;for(;t.parentElement&&""!==t.dataset.headlessuiPortal&&!(t.scrollHeight>t.clientHeight||t.scrollWidth>t.clientWidth);)t=t.parentElement;""===t.dataset.headlessuiPortal&&e.preventDefault()}else e.preventDefault()},{passive:!1}),n.add(()=>{var e;r!==(null!=(e=window.scrollY)?e:window.pageYOffset)&&window.scrollTo(0,r),a&&a.isConnected&&(a.scrollIntoView({block:"nearest"}),a=null)})})}}:{},{before(e){var n;let{doc:r}=e,i=r.documentElement;t=Math.max(0,(null!=(n=r.defaultView)?n:window).innerWidth-i.clientWidth)},after(e){let{doc:n,d:r}=e,i=n.documentElement,a=Math.max(0,i.clientWidth-i.offsetWidth),o=Math.max(0,t-a);r.style(i,"paddingRight","".concat(o,"px"))}},{before(e){let{doc:t,d:n}=e;n.style(t.documentElement,"overflow","hidden")}}];r.forEach(e=>{let{before:t}=e;return null==t?void 0:t(n)}),r.forEach(e=>{let{after:t}=e;return null==t?void 0:t(n)})},SCROLL_ALLOW(e){let{d:t}=e;t.dispose()},TEARDOWN(e){let{doc:t}=e;this.delete(t)}});function n6(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>[document.body];!function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>({containers:[]}),r=(0,f.useSyncExternalStore)(n4.subscribe,n4.getSnapshot,n4.getSnapshot),i=t?r.get(t):void 0;i&&i.count,t2(()=>{if(!(!t||!e))return n4.dispatch("PUSH",t,n),()=>n4.dispatch("POP",t,n)},[e,t])}(nj(e,"scroll-lock"),t,e=>{var t;return{containers:[...null!=(t=e.containers)?t:[],n]}})}function n8(e){return(0,f.useMemo)(()=>e,Object.values(e))}n4.subscribe(()=>{let e=n4.getSnapshot(),t=new Map;for(let[n]of e)t.set(n,n.documentElement.style.overflow);for(let n of e.values()){let e="hidden"===t.get(n.doc),r=0!==n.count;(r&&!e||!r&&e)&&n4.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),0===n.count&&n4.dispatch("TEARDOWN",n)}}),e.s(["useSlot",()=>n8],255743),e.s(["optionalRef",()=>n7,"useSyncRefs",()=>re],294316);let n9=Symbol();function n7(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];return Object.assign(e,{[n9]:t})}function re(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];let r=(0,f.useRef)(t);(0,f.useEffect)(()=>{r.current=t},[t]);let i=t5(e=>{for(let t of r.current)null!=t&&("function"==typeof t?t(e):t.current=e)});return t.every(e=>null==e||(null==e?void 0:e[n9]))?void 0:i}let rt=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function rn(e){var t,n;let r=null!=(t=e.innerText)?t:"",i=e.cloneNode(!0);if(!t7(i))return r;let a=!1;for(let e of i.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))e.remove(),a=!0;let o=a?null!=(n=i.innerText)?n:"":r;return rt.test(o)&&(o=o.replace(rt,"")),o}function rr(e){return[e.screenX,e.screenY]}e.s(["transitionDataAttributes",()=>ra,"useTransition",()=>ro],83733),void 0!==ti.default&&"undefined"!=typeof globalThis&&"undefined"!=typeof Element&&(null==(ym=null==ti.default?void 0:ti.default.env)?void 0:ym.NODE_ENV)==="test"&&void 0===(null==(yy=null==Element?void 0:Element.prototype)?void 0:yy.getAnimations)&&(Element.prototype.getAnimations=function(){return console.warn("Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.\nPlease install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.\n\nExample usage:\n```js\nimport { mockAnimationsApi } from 'jsdom-testing-mocks'\nmockAnimationsApi()\n```"),[]});var ri=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(ri||{});function ra(e){let t={};for(let n in e)!0===e[n]&&(t["data-".concat(n)]="");return t}function ro(e,t,n,r){let[i,a]=(0,f.useState)(n),{hasFlag:o,addFlag:s,removeFlag:l}=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,[t,n]=(0,f.useState)(e),r=(0,f.useCallback)(e=>n(e),[]),i=(0,f.useCallback)(e=>n(t=>t|e),[]),a=(0,f.useCallback)(e=>(t&e)===e,[t]);return{flags:t,setFlag:r,addFlag:i,hasFlag:a,removeFlag:(0,f.useCallback)(e=>n(t=>t&~e),[]),toggleFlag:(0,f.useCallback)(e=>n(t=>t^e),[])}}(e&&i?3:0),c=(0,f.useRef)(!1),d=(0,f.useRef)(!1);return t2(()=>{var i;if(e){if(n&&a(!0),!t){n&&s(3);return}return null==(i=null==r?void 0:r.start)||i.call(r,n),function(e,t){let{prepare:n,run:r,done:i,inFlight:a}=t,o=t0();return function(e,t){let{inFlight:n,prepare:r}=t;if(null!=n&&n.current)return r();let i=e.style.transition;e.style.transition="none",r(),e.offsetHeight,e.style.transition=i}(e,{prepare:n,inFlight:a}),o.nextFrame(()=>{r(),o.requestAnimationFrame(()=>{o.add(function(e,t){var n,r;let i=t0();if(!e)return i.dispose;let a=!1;i.add(()=>{a=!0});let o=null!=(r=null==(n=e.getAnimations)?void 0:n.call(e).filter(e=>e instanceof CSSTransition))?r:[];return 0===o.length?t():Promise.allSettled(o.map(e=>e.finished)).then(()=>{a||t()}),i.dispose}(e,i))})}),o.dispose}(t,{inFlight:c,prepare(){d.current?d.current=!1:d.current=c.current,c.current=!0,d.current||(n?(s(3),l(4)):(s(4),l(2)))},run(){d.current?n?(l(3),s(4)):(l(4),s(3)):n?l(1):s(1)},done(){var e,i,o,s;d.current&&(null!=(s=null==(o=(i=t).getAnimations)?void 0:o.call(i))?s:[]).some(e=>e instanceof CSSTransition&&"finished"!==e.playState)||(c.current=!1,l(7),n||a(!1),null==(e=null==r?void 0:r.end)||e.call(r,n))}})}},[e,n,t,t1()]),e?[i,{closed:o(1),enter:o(2),leave:o(4),transition:o(2)||o(4)}]:[n,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}let rs=Math.min,rl=Math.max,rc=Math.round,rd=Math.floor,ru=e=>({x:e,y:e}
1),rh={left:"right",right:"left",bottom:"top",top:"bottom"},rp={start:"end",end:"start"};function rf(e,t){return"function"==typeof e?e(t):e}function rg(e){return e.split("-")[0]}function rm(e){return e.split("-")[1]}function ry(e){return"x"===e?"y":"x"}function rv(e){return"y"===e?"height":"width"}let rb=new Set(["top","bottom"]);function rw(e){return rb.has(rg(e))?"y":"x"}function rx(e){return e.replace(/start|end/g,e=>rp[e])}let rC=["left","right"],rE=["right","left"],rk=["top","bottom"],rS=["bottom","top"];function rI(e){return e.replace(/left|right|bottom|top/g,e=>rh[e])}function rA(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function rT(e,t,n){let r,{reference:i,floating:a}=e,o=rw(t),s=ry(rw(t)),l=rv(s),c=rg(t),d="y"===o,u=i.x+i.width/2-a.width/2,h=i.y+i.height/2-a.height/2,p=i[l]/2-a[l]/2;switch(c){case"top":r={x:u,y:i.y-a.height};break;case"bottom":r={x:u,y:i.y+i.height};break;case"right":r={x:i.x+i.width,y:h};break;case"left":r={x:i.x-a.width,y:h};break;default:r={x:i.x,y:i.y}}switch(rm(t)){case"start":r[s]-=p*(n&&d?-1:1);break;case"end":r[s]+=p*(n&&d?-1:1)}return r}let r_=async(e,t,n)=>{let{placement:r="bottom",strategy:i="absolute",middleware:a=[],platform:o}=n,s=a.filter(Boolean),l=await (null==o.isRTL?void 0:o.isRTL(t)),c=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:d,y:u}=rT(c,r,l),h=r,p={},f=0;for(let n=0;n<s.length;n++){let{name:a,fn:g}=s[n],{x:m,y:y,data:b,reset:w}=await g({x:d,y:u,initialPlacement:r,placement:h,strategy:i,middlewareData:p,rects:c,platform:o,elements:{reference:e,floating:t}});d=null!=m?m:d,u=null!=y?y:u,p={...p,[a]:{...p[a],...b}},w&&f<=50&&(f++,"object"==typeof w&&(w.placement&&(h=w.placement),w.rects&&(c=!0===w.rects?await o.getElementRects({reference:e,floating:t,strategy:i}):w.rects),{x:d,y:u}=rT(c,h,l)),n=-1)}return{x:d,y:u,placement:h,strategy:i,middlewareData:p}};async function rj(e,t){var n,r;void 0===t&&(t={});let{x:i,y:a,platform:o,rects:s,elements:l,strategy:c}=e,{boundary:d="clippingAncestors",rootBoundary:u="viewport",elementContext:h="floating",altBoundary:p=!1,padding:f=0}=rf(t,e),g="number"!=typeof(r=f)?{top:0,right:0,bottom:0,left:0,...r}:{top:r,right:r,bottom:r,left:r},m=l[p?"floating"===h?"reference":"floating":h],y=rA(await o.getClippingRect({element:null==(n=await (null==o.isElement?void 0:o.isElement(m)))||n?m:m.contextElement||await (null==o.getDocumentElement?void 0:o.getDocumentElement(l.floating)),boundary:d,rootBoundary:u,strategy:c})),b="floating"===h?{x:i,y:a,width:s.floating.width,height:s.floating.height}:s.reference,w=await (null==o.getOffsetParent?void 0:o.getOffsetParent(l.floating)),x=await (null==o.isElement?void 0:o.isElement(w))&&await (null==o.getScale?void 0:o.getScale(w))||{x:1,y:1},C=rA(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:b,offsetParent:w,strategy:c}):b);return{top:(y.top-C.top+g.top)/x.y,bottom:(C.bottom-y.bottom+g.bottom)/x.y,left:(y.left-C.left+g.left)/x.x,right:(C.right-y.right+g.right)/x.x}}let rP=new Set(["left","top"]);async function r$(e,t){let{placement:n,platform:r,elements:i}=e,a=await (null==r.isRTL?void 0:r.isRTL(i.floating)),o=rg(n),s=rm(n),l="y"===rw(n),c=rP.has(o)?-1:1,d=a&&l?-1:1,u=rf(t,e),{mainAxis:h,crossAxis:p,alignmentAxis:f}="number"==typeof u?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return s&&"number"==typeof f&&(p="end"===s?-1*f:f),l?{x:p*d,y:h*c}:{x:h*c,y:p*d}}function rN(){return"undefined"!=typeof window}function rO(e){return rL(e)?(e.nodeName||"").toLowerCase():"#document"}function rM(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function rR(e){var t;return null==(t=(rL(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function rL(e){return!!rN()&&(e instanceof Node||e instanceof rM(e).Node)}function rD(e){return!!rN()&&(e instanceof Element||e instanceof rM(e).Element)}function rF(e){return!!rN()&&(e instanceof HTMLElement||e instanceof rM(e).HTMLElement)}function rU(e){return!!rN()&&"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof rM(e).ShadowRoot)}let rB=new Set(["inline","contents"]);function rz(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=rX(e);
1return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!rB.has(i)}let rW=new Set(["table","td","th"]),rq=[":popover-open",":modal"];function rH(e){return rq.some(t=>{try{return e.matches(t)}catch(e){return!1}})}let rV=["transform","translate","scale","rotate","perspective"],rG=["transform","translate","scale","rotate","perspective","filter"],rK=["paint","layout","strict","content"];function rY(e){let t=rZ(),n=rD(e)?rX(e):e;return rV.some(e=>!!n[e]&&"none"!==n[e])||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||rG.some(e=>(n.willChange||"").includes(e))||rK.some(e=>(n.contain||"").includes(e))}function rZ(){return"undefined"!=typeof CSS&&!!CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")}let rJ=new Set(["html","body","#document"]);function rQ(e){return rJ.has(rO(e))}function rX(e){return rM(e).getComputedStyle(e)}function r0(e){return rD(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function r1(e){if("html"===rO(e))return e;let t=e.assignedSlot||e.parentNode||rU(e)&&e.host||rR(e);return rU(t)?t.host:t}function r2(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);let i=function e(t){let n=r1(t);return rQ(n)?t.ownerDocument?t.ownerDocument.body:t.body:rF(n)&&rz(n)?n:e(n)}(e),a=i===(null==(r=e.ownerDocument)?void 0:r.body),o=rM(i);if(a){let e=r3(o);return t.concat(o,o.visualViewport||[],rz(i)?i:[],e&&n?r2(e):[])}return t.concat(i,r2(i,[],n))}function r3(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function r5(e){let t=rX(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=rF(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=rc(n)!==a||rc(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function r4(e){return rD(e)?e:e.contextElement}function r6(e){let t=r4(e);if(!rF(t))return ru(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=r5(t),o=(a?rc(n.width):n.width)/r,s=(a?rc(n.height):n.height)/i;return o&&Number.isFinite(o)||(o=1),s&&Number.isFinite(s)||(s=1),{x:o,y:s}}let r8=ru(0);function r9(e){let t=rM(e);return rZ()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:r8}function r7(e,t,n,r){var i;void 0===t&&(t=!1),void 0===n&&(n=!1);let a=e.getBoundingClientRect(),o=r4(e),s=ru(1);t&&(r?rD(r)&&(s=r6(r)):s=r6(e));let l=(void 0===(i=n)&&(i=!1),r&&(!i||r===rM(o))&&i)?r9(o):ru(0),c=(a.left+l.x)/s.x,d=(a.top+l.y)/s.y,u=a.width/s.x,h=a.height/s.y;if(o){let e=rM(o),t=r&&rD(r)?rM(r):r,n=e,i=r3(n);for(;i&&r&&t!==n;){let e=r6(i),t=i.getBoundingClientRect(),r=rX(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,d*=e.y,u*=e.x,h*=e.y,c+=a,d+=o,i=r3(n=rM(i))}}return rA({width:u,height:h,x:c,y:d})}function ie(e,t){let n=r0(e).scrollLeft;return t?t.left+n:r7(rR(e)).left+n}function it(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-ie(e,n),y:n.top+t.scrollTop}}let ir=new Set(["absolute","fixed"]);function ii(e,t,n){let r;if("viewport"===t)r=function(e,t){let n=rM(e),r=rR(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,l=0;if(i){a=i.width,o=i.height;let e=rZ();(!e||e&&"fixed"===t)&&(s=i.offsetLeft,l=i.offsetTop)}let c=ie(r);if(c<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=25&&(a-=o)}else c<=25&&(a+=c);return{width:a,height:o,x:s,y:l}}(e,n);else if("document"===t)r=function(e){let t=rR(e),n=r0(e),r=e.ownerDocument.body,i=rl(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=rl(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+ie(e),s=-n.scrollTop;return"rtl"===rX(r).direction&&(o+=rl(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}(rR(e));else if(rD(t))r=function(e,t){let n=r7(e,!0,"fixed"===t),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=rF(e)?r6(e):ru(1),o=e.clientWidth*a.x,s=e.clientHeight*a.y;return{width:o,height:s,x:i*a.x,y:r*a.y}}(t,n);else{let n=r9(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return rA(r)}function ia(e){return"static"===rX(e).position}function io(e,t){if(!rF(e)||"fixed"===rX(e).position)return null;if(t)return t(e);let n=e.offsetParent;return rR(e)===n&&(n=n.ownerDocument.body),n}function is(e,t){var n;let r=rM(e);if(rH(e))return r;if(!rF(e)){let t=r1(e);for(;t&&!rQ(t);){if(rD(t)&&!ia(t))return t;t=r1(t)}return r}let i=io(e,t);for(;i&&(n=i,rW.has(rO(n)))&&ia(i);)i=io(i,t);return i&&rQ(i)&&ia(i)&&!rY(i)?r:i||function(e){let t=r1(e);for(;rF(t)&&!rQ(t);){if(rY(t))return t;if(rH(t))break;t=r1(t)}return null}(e)||r}let il=async function(e){let t=this.getOffsetParent||is,n=this.getDimensions,r=await n(e.floating);return{reference:function(e,t,n){let r=rF(t),i=rR(t),a="fixed"===n,o=r7(e,!0,a,t),s={scrollLeft:0,scrollTop:0},l=ru(0);if(r||!r&&!a)if(("body"!==rO(t)||rz(i))&&(s=r0(t)),r){let e=r7(t,!0,a,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else i&&(l.x=ie(i));a&&!r&&i&&(l.x=ie(i));let c=!i||r||a?ru(0):it(i,s);return{x:o.left+s.scrollLeft-l.x-c.x,y:o.top+s.scrollTop-l.y-c.y,width:o.width,height:o.height}}(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},ic={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a="fixed"===i,o=rR(r),s=!!t&&rH(t.floating);if(r===o||s&&a)return n;let l={scrollLeft:0,scrollTop:0},c=ru(1),d=ru(0),u=rF(r);
1if((u||!u&&!a)&&(("body"!==rO(r)||rz(o))&&(l=r0(r)),rF(r))){let e=r7(r);c=r6(r),d.x=e.x+r.clientLeft,d.y=e.y+r.clientTop}let h=!o||u||a?ru(0):it(o,l);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+d.x+h.x,y:n.y*c.y-l.scrollTop*c.y+d.y+h.y}},getDocumentElement:rR,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[..."clippingAncestors"===n?rH(t)?[]:function(e,t){let n=t.get(e);if(n)return n;let r=r2(e,[],!1).filter(e=>rD(e)&&"body"!==rO(e)),i=null,a="fixed"===rX(e).position,o=a?r1(e):e;for(;rD(o)&&!rQ(o);){let t=rX(o),n=rY(o);n||"fixed"!==t.position||(i=null),(a?!n&&!i:!n&&"static"===t.position&&!!i&&ir.has(i.position)||rz(o)&&!n&&function e(t,n){let r=r1(t);return!(r===n||!rD(r)||rQ(r))&&("fixed"===rX(r).position||e(r,n))}(e,o))?r=r.filter(e=>e!==o):i=t,o=r1(o)}return t.set(e,r),r}(t,this._c):[].concat(n),r],o=a[0],s=a.reduce((e,n)=>{let r=ii(t,n,i);return e.top=rl(r.top,e.top),e.right=rs(r.right,e.right),e.bottom=rs(r.bottom,e.bottom),e.left=rl(r.left,e.left),e},ii(t,o,i));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:is,getElementRects:il,getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){let{width:t,height:n}=r5(e);return{width:t,height:n}},getScale:r6,isElement:rD,isRTL:function(e){return"rtl"===rX(e).direction}};function id(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function iu(e,t,n,r){let i;void 0===r&&(r={});let{ancestorScroll:a=!0,ancestorResize:o=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:c=!1}=r,d=r4(e),u=a||o?[...d?r2(d):[],...r2(t)]:[];u.forEach(e=>{a&&e.addEventListener("scroll",n,{passive:!0}),o&&e.addEventListener("resize",n)});let h=d&&l?function(e,t){let n,r=null,i=rR(e);function a(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return!function o(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),a();let c=e.getBoundingClientRect(),{left:d,top:u,width:h,height:p}=c;if(s||t(),!h||!p)return;let f=rd(u),g=rd(i.clientWidth-(d+h)),m={rootMargin:-f+"px "+-g+"px "+-rd(i.clientHeight-(u+p))+"px "+-rd(d)+"px",threshold:rl(0,rs(1,l))||1},y=!0;function b(t){let r=t[0].intersectionRatio;if(r!==l){if(!y)return o();r?o(!1,r):n=setTimeout(()=>{o(!1,1e-7)},1e3)}1!==r||id(c,e.getBoundingClientRect())||o(),y=!1}try{r=new IntersectionObserver(b,{...m,root:i.ownerDocument})}catch(e){r=new IntersectionObserver(b,m)}r.observe(e)}(!0),a}(d,n):null,p=-1,f=null;s&&(f=new ResizeObserver(e=>{let[r]=e;r&&r.target===d&&f&&(f.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var e;null==(e=f)||e.observe(t)})),n()}),d&&!c&&f.observe(d),f.observe(t));let g=c?r7(e):null;return c&&function t(){let r=r7(e);g&&!id(g,r)&&n(),g=r,i=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach(e=>{a&&e.removeEventListener("scroll",n),o&&e.removeEventListener("resize",n)}),null==h||h(),null==(e=f)||e.disconnect(),f=null,c&&cancelAnimationFrame(i)}}var ih="undefined"!=typeof document?f.useLayoutEffect:function(){};function ip(e,t){let n,r,i;if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if((n=e.length)!==t.length)return!1;for(r=n;0!=r--;)if(!ip(e[r],t[r]))return!1;return!0}if((n=(i=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!({}).hasOwnProperty.call(t,i[r]))return!1;for(r=n;0!=r--;){let n=i[r];if(("_owner"!==n||!e.$$typeof)&&!ip(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function ig(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function im(e,t){let n=ig(e);return Math.round(t*n)/n}function iy(e){let t=f.useRef(e);return ih(()=>{t.current=e}),t}let iv=(e,t)=>({...function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;let{x:i,y:a,placement:o,middlewareData:s}=t,l=await r$(t,e);return o===(null==(n=s.offset)?void 0:n.placement)&&null!=(r=s.arrow)&&r.alignmentOffset?{}:{x:i+l.x,y:a+l.y,data:{...l,placement:o}}}}}(e),options:[e,t]});var ib="undefined"==typeof Element;ib||Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,ib||Element.prototype.getRootNode;let iw={...f},ix=iw.useInsertionEffect||(e=>e());function iC(e){let t=f.useRef(()=>{});return ix(()=>{t.current=e}),f.useCallback(function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)},[])}var iE="undefined"!=typeof document?f.useLayoutEffect:f.useEffect;let ik=!1,iS=0,iI=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+iS++,iA=iw.useId||function(){let[e,t]=f.useState(()=>ik?iI():void 0);return iE(()=>{null==e&&t(iI())},[]),f.useEffect(()=>{ik=!0},[]),e},iT=f.createContext(null),i_=f.createContext(null),ij="active",iP="selected";function i$(e,t,n){let r=new Map,i="item"===n,a=e;if(i&&e){let{[ij]:t,[iP]:n,...r}=e;a=r}return{..."floating"===n&&{tabIndex:-1,"data-floating-ui-focusable":""},...a,...t.map(t=>{let r=t?t[n]:null;return"function"==typeof r?e?r(e):null:r}).concat(e).reduce((e,t)=>
1(t&&Object.entries(t).forEach(t=>{let[n,a]=t;if(!(i&&[ij,iP].includes(n)))if(0===n.indexOf("on")){if(r.has(n)||r.set(n,[]),"function"==typeof a){var o;null==(o=r.get(n))||o.push(a),e[n]=function(){for(var e,t=arguments.length,i=Array(t),a=0;a<t;a++)i[a]=arguments[a];return null==(e=r.get(n))?void 0:e.map(e=>e(...i)).find(e=>void 0!==e)}}}else e[n]=a}),e),{})}}function iN(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}let iO=(0,f.createContext)({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});iO.displayName="FloatingContext";let iM=(0,f.createContext)(null);function iR(e){var t,n,r,i,a,o,s,l,c;let d,u,h,p,g,m,y,b,w,x,{children:C,enabled:E=!0}=e,[k,S]=(0,f.useState)(null),[I,A]=(0,f.useState)(0),T=(0,f.useRef)(null),[_,j]=(0,f.useState)(null);t2(()=>{if(!i)return;let e=new MutationObserver(()=>{let e=window.getComputedStyle(i).maxHeight,t=parseFloat(e);if(isNaN(t))return;let n=parseInt(e);isNaN(n)||t!==n&&(i.style.maxHeight="".concat(Math.ceil(t),"px"))});return e.observe(i,{attributes:!0,attributeFilter:["style"]}),()=>{e.disconnect()}},[i=_]);let P=E&&null!==k&&null!==_,{to:$="bottom",gap:N=0,offset:O=0,padding:M=0,inner:R}=(a=k,o=_,d=iL(null!=(s=null==a?void 0:a.gap)?s:"var(--anchor-gap, 0)",o),u=iL(null!=(l=null==a?void 0:a.offset)?l:"var(--anchor-offset, 0)",o),h=iL(null!=(c=null==a?void 0:a.padding)?c:"var(--anchor-padding, 0)",o),{...a,gap:d,offset:u,padding:h}),[L,D="center"]=$.split(" ");t2(()=>{P&&A(0)},[P]);let{refs:F,floatingStyles:U,context:B}=function(e){void 0===e&&(e={});let{nodeId:t}=e,n=function(e){var t;let{open:n=!1,onOpenChange:r,elements:i}=e,a=iA(),o=f.useRef({}),[s]=f.useState(()=>(function(){let e=new Map;return{emit(t,n){var r;null==(r=e.get(t))||r.forEach(e=>e(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,(null==(r=e.get(t))?void 0:r.filter(e=>e!==n))||[])}}})()),l=null!=((null==(t=f.useContext(iT))?void 0:t.id)||null),[c,d]=f.useState(i.reference),u=iC((e,t,n)=>{o.current.openEvent=e?t:void 0,s.emit("openchange",{open:e,event:t,reason:n,nested:l}),null==r||r(e,t,n)}),h=f.useMemo(()=>({setPositionReference:d}),[]),p=f.useMemo(()=>({reference:c||i.reference||null,floating:i.floating||null,domReference:i.reference}),[c,i.reference,i.floating]);return f.useMemo(()=>({dataRef:o,open:n,onOpenChange:u,elements:p,events:s,floatingId:a,refs:h}),[n,u,p,s,a,h])}({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,i=r.elements,[a,o]=f.useState(null),[s,l]=f.useState(null),c=(null==i?void 0:i.domReference)||a,d=f.useRef(null),u=f.useContext(i_);iE(()=>{c&&(d.current=c)},[c]);let h=function(e){void 0===e&&(e={});let{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[d,u]=f.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=f.useState(r);ip(h,r)||p(r);let[g,m]=f.useState(null),[y,b]=f.useState(null),w=f.useCallback(e=>{e!==k.current&&(k.current=e,m(e))},[]),x=f.useCallback(e=>{e!==S.current&&(S.current=e,b(e))},[]),C=a||g,E=o||y,k=f.useRef(null),S=f.useRef(null),I=f.useRef(d),A=null!=l,T=iy(l),_=iy(i),j=iy(c),P=f.useCallback(()=>{if(!k.current||!S.current)return;let e={placement:t,strategy:n,middleware:h};_.current&&(e.platform=_.current),((e,t,n)=>{let r=new Map,i={platform:ic,...n},a={...i.platform,_c:r};return r_(e,t,{...i,platform:a})})(k.current,S.current,e).then(e=>{let t={...e,isPositioned:!1!==j.current};$.current&&!ip(I.current,t)&&(I.current=t,tH.flushSync(()=>{u(t)}))})},[h,t,n,_,j]);ih(()=>{!1===c&&I.current.isPositioned&&(I.current.isPositioned=!1,u(e=>({...e,isPositioned:!1})))},[c]);let $=f.useRef(!1);ih(()=>($.current=!0,()=>{$.current=!1}),[]),ih(()=>{if(C&&(k.current=C),E&&(S.current=E),C&&E){if(T.current)return T.current(C,E,P);P()}},[C,E,P,T,A]);let N=f.useMemo(()=>({reference:k,floating:S,setReference:w,setFloating:x}),[w,x]),O=f.useMemo(()=>({reference:C,floating:E}),[C,E]),M=f.useMemo(()=>{let e={position:n,left:0,top:0};if(!O.floating)return e;let t=im(O.floating,d.x),r=im(O.floating,d.y);return s?{...e,transform:"translate("+t+"px, "+r+"px)",...ig(O.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,s,O.floating,d.x,d.y]);return f.useMemo(()=>({...d,update:P,refs:N,elements:O,floatingStyles:M}),[d,P,N,O,M])}({...e,elements:{...i,...s&&{reference:s}}}),p=f.useCallback(e=>{let t=rD(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;l(t),h.refs.setReference(t)},[h.refs]),g=f.useCallback(e=>{(rD(e)||null===e)&&(d.current=e,o(e)),(rD(h.refs.reference.current)||null===h.refs.reference.current||null!==e&&!rD(e))&&h.refs.setReference(e)},[h.refs]),m=f.useMemo(()=>({...h.refs,setReference:g,setPositionReference:p,domReference:d}),[h.refs,g,p]),y=f.useMemo(()=>({...h.elements,domReference:c}),[h.elements,c]),b=f.useMemo(()=>({...h,...r,refs:m,elements:y,nodeId:t}),[h,m,y,t,r]);return iE(()=>{r.dataRef.current.floatingContext=b;let e=null==u?void 0:u.nodesRef.current.find(e=>e.id===t);e&&(e.context=b)}),f.useMemo(()=>({...h,context:b,refs:m,elements:y}),[h,m,y,b])}({open:P,placement:"selection"===L?"center"===D?"bottom":"bottom-".concat(D):"center"===D?"".concat(L):"".concat(L,"-").concat(D),strategy:"absolute",transform:!1,middleware:[iv({mainAxis:"selection"===L?0:N,crossAxis:O}),{...{name:"shift",options:t=p={padding:M},async fn(e){let{x:n,y:r,placement:i}=e,{mainAxis:a=!0,crossAxis:o=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=rf(t,e),c={x:n,y:r},d=await rj(e,l),u=rw(rg(i)),h=ry(u),p=c[h],f=c[u];
1if(a){let e="y"===h?"top":"left",t="y"===h?"bottom":"right",n=p+d[e],r=p-d[t];p=rl(n,rs(p,r))}if(o){let e="y"===u?"top":"left",t="y"===u?"bottom":"right",n=f+d[e],r=f-d[t];f=rl(n,rs(f,r))}let g=s.fn({...e,[h]:p,[u]:f});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[h]:a,[u]:o}}}}},options:[p,g]},"selection"!==L&&{...{name:"flip",options:n=m={padding:M},async fn(e){var t,r,i,a,o;let{placement:s,middlewareData:l,rects:c,initialPlacement:d,platform:u,elements:h}=e,{mainAxis:p=!0,crossAxis:f=!0,fallbackPlacements:g,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:b=!0,...w}=rf(n,e);if(null!=(t=l.arrow)&&t.alignmentOffset)return{};let x=rg(s),C=rw(d),E=rg(d)===d,k=await (null==u.isRTL?void 0:u.isRTL(h.floating)),S=g||(E||!b?[rI(d)]:function(e){let t=rI(e);return[rx(e),t,rx(t)]}(d)),I="none"!==y;!g&&I&&S.push(...function(e,t,n,r){let i=rm(e),a=function(e,t,n){switch(e){case"top":case"bottom":if(n)return t?rE:rC;return t?rC:rE;case"left":case"right":return t?rk:rS;default:return[]}}(rg(e),"start"===n,r);return i&&(a=a.map(e=>e+"-"+i),t&&(a=a.concat(a.map(rx)))),a}(d,b,y,k));let A=[d,...S],T=await rj(e,w),_=[],j=(null==(r=l.flip)?void 0:r.overflows)||[];if(p&&_.push(T[x]),f){let e=function(e,t,n){void 0===n&&(n=!1);let r=rm(e),i=ry(rw(e)),a=rv(i),o="x"===i?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[a]>t.floating[a]&&(o=rI(o)),[o,rI(o)]}(s,c,k);_.push(T[e[0]],T[e[1]])}if(j=[...j,{placement:s,overflows:_}],!_.every(e=>e<=0)){let e=((null==(i=l.flip)?void 0:i.index)||0)+1,t=A[e];if(t&&("alignment"!==f||C===rw(t)||j.every(e=>rw(e.placement)!==C||e.overflows[0]>0)))return{data:{index:e,overflows:j},reset:{placement:t}};let n=null==(a=j.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:a.placement;if(!n)switch(m){case"bestFit":{let e=null==(o=j.filter(e=>{if(I){let t=rw(e.placement);return t===C||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:o[0];e&&(n=e);break}case"initialPlacement":n=d}if(s!==n)return{reset:{placement:n}}}return{}}},options:[m,y]},"selection"===L&&R?{name:"inner",options:b={...R,padding:M,overflowRef:T,offset:I,minItemsVisible:4,referenceOverflowThreshold:M,onFallbackChange(e){var t,n;if(!e)return;let r=B.elements.floating;if(!r)return;let i=parseFloat(getComputedStyle(r).scrollPaddingBottom)||0,a=Math.min(4,r.childElementCount),o=0,s=0;for(let e of null!=(n=null==(t=B.elements.floating)?void 0:t.childNodes)?n:[])if(t7(e)){let t=e.offsetTop,n=t+e.clientHeight+i,l=r.scrollTop,c=l+r.clientHeight;if(t>=l&&n<=c)a--;else{s=Math.max(0,Math.min(n,c)-Math.max(t,l)),o=e.clientHeight;break}}a>=1&&A(e=>{let t=o*a-s+i;return e>=t?e:t})}},async fn(e){let{listRef:t,overflowRef:n,onFallbackChange:r,offset:i=0,index:a=0,minItemsVisible:o=4,referenceOverflowThreshold:s=0,scrollRef:l,...c}=rf(b,e),{rects:d,elements:{floating:u}}=e,h=t.current[a],p=(null==l?void 0:l.current)||u,f=u.clientTop||p.clientTop,g=0!==u.clientTop,m=0!==p.clientTop,y=u===p;if(!h)return{};let w={...e,...await iv(-h.offsetTop-u.clientTop-d.reference.height/2-h.offsetHeight/2-i).fn(e)},x=await rj(iN(w,p.scrollHeight+f+u.clientTop),c),C=await rj(w,{...c,elementContext:"reference"}),E=rl(0,x.top),k=w.y+E,S=(p.scrollHeight>p.clientHeight?e=>e:rc)(rl(0,p.scrollHeight+(g&&y||m?2*f:0)-E-rl(0,x.bottom)));if(p.style.maxHeight=S+"px",p.scrollTop=E,r){let e=p.offsetHeight<h.offsetHeight*rs(o,t.current.length)-1||C.top>=-s||C.bottom>=-s;tH.flushSync(()=>r(e))}return n&&(n.current=await rj(iN({...w,y:k},p.offsetHeight+f+u.clientTop),c)),{y:k}}}:null,{...{name:"size",options:r=w={padding:M,apply(e){let{availableWidth:t,availableHeight:n,elements:r}=e;Object.assign(r.floating.style,{overflow:"auto",maxWidth:"".concat(t,"px"),maxHeight:"min(var(--anchor-max-height, 100vh), ".concat(n,"px)")})}},async fn(e){var t,n;let i,a,{placement:o,rects:s,platform:l,elements:c}=e,{apply:d=()=>{},...u}=rf(r,e),h=await rj(e,u),p=rg(o),f=rm(o),g="y"===rw(o),{width:m,height:y}=s.floating;"top"===p||"bottom"===p?(i=p,a=f===(await (null==l.isRTL?void 0:l.isRTL(c.floating))?"start":"end")?"left":"right"):(a=p,i="end"===f?"top":"bottom");let b=y-h.top-h.bottom,w=m-h.left-h.right,x=rs(y-h[i],b),C=rs(m-h[a],w),E=!e.middlewareData.shift,k=x,S=C;if(null!=(t=e.middlewareData.shift)&&t.enabled.x&&(S=w),null!=(n=e.middlewareData.shift)&&n.enabled.y&&(k=b),E&&!f){let e=rl(h.left,0),t=rl(h.right,0),n=rl(h.top,0),r=rl(h.bottom,0);g?S=m-2*(0!==e||0!==t?e+t:rl(h.left,h.right)):k=y-2*(0!==n||0!==r?n+r:rl(h.top,h.bottom))}await d({...e,availableWidth:S,availableHeight:k});let I=await l.getDimensions(c.floating);return m!==I.width||y!==I.height?{reset:{rects:!0}}:{}}},options:[w,x]}
1].filter(Boolean),whileElementsMounted:iu}),[z=L,W=D]=B.placement.split("-");"selection"===L&&(z="selection");let q=(0,f.useMemo)(()=>({anchor:[z,W].filter(Boolean).join(" ")}),[z,W]),{getReferenceProps:H,getFloatingProps:V}=function(e){void 0===e&&(e=[]);let t=e.map(e=>null==e?void 0:e.reference),n=e.map(e=>null==e?void 0:e.floating),r=e.map(e=>null==e?void 0:e.item),i=f.useCallback(t=>i$(t,e,"reference"),t),a=f.useCallback(t=>i$(t,e,"floating"),n),o=f.useCallback(t=>i$(t,e,"item"),r);return f.useMemo(()=>({getReferenceProps:i,getFloatingProps:a,getItemProps:o}),[i,a,o])}([function(e,t){let{open:n,elements:r}=e,{enabled:i=!0,overflowRef:a,scrollRef:o,onChange:s}=t,l=iC(s),c=f.useRef(!1),d=f.useRef(null),u=f.useRef(null);f.useEffect(()=>{if(!i)return;function e(e){if(e.ctrlKey||!t||null==a.current)return;let n=e.deltaY,r=a.current.top>=-.5,i=a.current.bottom>=-.5,o=t.scrollHeight-t.clientHeight,s=n<0?-1:1,c=n<0?"max":"min";!(t.scrollHeight<=t.clientHeight)&&(!r&&n>0||!i&&n<0?(e.preventDefault(),tH.flushSync(()=>{l(e=>e+Math[c](n,o*s))})):/firefox/i.test(function(){let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(e=>{let{brand:t,version:n}=e;return t+"/"+n}).join(" "):navigator.userAgent}())&&(t.scrollTop+=n))}let t=(null==o?void 0:o.current)||r.floating;if(n&&t)return t.addEventListener("wheel",e),requestAnimationFrame(()=>{d.current=t.scrollTop,null!=a.current&&(u.current={...a.current})}),()=>{d.current=null,u.current=null,t.removeEventListener("wheel",e)}},[i,n,r.floating,a,o,l]);let h=f.useMemo(()=>({onKeyDown(){c.current=!0},onWheel(){c.current=!1},onPointerMove(){c.current=!1},onScroll(){let e=(null==o?void 0:o.current)||r.floating;if(a.current&&e&&c.current){if(null!==d.current){let t=e.scrollTop-d.current;(a.current.bottom<-.5&&t<-1||a.current.top<-.5&&t>1)&&tH.flushSync(()=>l(e=>e+t))}requestAnimationFrame(()=>{d.current=e.scrollTop})}}}),[r.floating,l,a,o]);return f.useMemo(()=>i?{floating:h}:{},[i,h])}(B,{overflowRef:T,onChange:A})]),G=t5(e=>{j(e),F.setFloating(e)});return f.createElement(iM.Provider,{value:S},f.createElement(iO.Provider,{value:{setFloating:G,setReference:F.setReference,styles:U,getReferenceProps:H,getFloatingProps:V,slot:q}},C))}function iL(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,r=t1(),i=t5((e,t)=>{if(null==e)return[n,null];if("number"==typeof e)return[e,null];if("string"==typeof e){if(!t)return[n,null];let i=iD(e,t);return[i,n=>{let a=function e(t){let n=/var\((.*)\)/.exec(t);if(n){let t=n[1].indexOf(",");if(-1===t)return[n[1]];let r=n[1].slice(0,t).trim(),i=n[1].slice(t+1).trim();return i?[r,...e(i)]:[r]}return[]}(e);{let o=a.map(e=>window.getComputedStyle(t).getPropertyValue(e));r.requestAnimationFrame(function s(){r.nextFrame(s);let l=!1;for(let[e,n]of a.entries()){let r=window.getComputedStyle(t).getPropertyValue(n);if(o[e]!==r){o[e]=r,l=!0;break}}if(!l)return;let c=iD(e,t);i!==c&&(n(c),i=c)})}return r.dispose}]}return[n,null]}),a=(0,f.useMemo)(()=>i(e,t)[0],[e,t]),[o=a,s]=(0,f.useState)();return t2(()=>{let[n,r]=i(e,t);if(s(n),r)return r(s)},[e,t]),o}function iD(e,t){let n=document.createElement("div");t.appendChild(n),n.style.setProperty("margin-top","0px","important"),n.style.setProperty("margin-top",e,"important");let r=parseFloat(window.getComputedStyle(n).marginTop)||0;return t.removeChild(n),r}iM.displayName="PlacementContext",e.s(["OpenClosedProvider",()=>iz,"ResetOpenClosedProvider",()=>iW,"State",()=>iU,"useOpenClosed",()=>iB],233137);let iF=(0,f.createContext)(null);iF.displayName="OpenClosedContext";var iU=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(iU||{});function iB(){return(0,f.useContext)(iF)}function iz(e){let{value:t,children:n}=e;return f.default.createElement(iF.Provider,{value:t},n)}function iW(e){let{children:t}=e;return f.default.createElement(iF.Provider,{value:null},t)}var iq=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(iq||{});function iH(e,t){let n=t.resolveItems();if(n.length<=0)return null;let r=t.resolveActiveIndex(),i=null!=r?r:-1;switch(e.focus){case 0:for(let e=0;e<n.length;++e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 1:-1===i&&(i=n.length);for(let e=i-1;e>=0;--e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 2:for(let e=i+1;e<n.length;++e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 3:for(let e=n.length-1;e>=0;--e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 4:for(let r=0;r<n.length;++r)if(t.resolveId(n[r],r,n)===e.id)return r;return r;case 5:return null;default:throw Error("Unexpected object: "+e)}}function iV(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return Array.from(new Set(t.flatMap(e=>
1"string"==typeof e?e.split(" "):[]))).filter(Boolean).join(" ")}e.s(["RenderFeatures",()=>iG,"RenderStrategy",()=>iK,"compact",()=>i1,"forwardRefWithAs",()=>i0,"isFragment",()=>i3,"mergeProps",()=>iX,"useRender",()=>iY],700020),e.s(["classNames",()=>iV],732607);var iG=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(iG||{}),iK=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(iK||{});function iY(){let e,t,n=(e=(0,f.useRef)([]),t=(0,f.useCallback)(t=>{for(let n of e.current)null!=n&&("function"==typeof n?n(t):n.current=t)},[]),function(){for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];if(!r.every(e=>null==e))return e.current=r,t});return(0,f.useCallback)(e=>(function(e){let{ourProps:t,theirProps:n,slot:r,defaultTag:i,features:a,visible:o=!0,name:s,mergeRefs:l}=e;l=null!=l?l:iJ;let c=iQ(n,t);if(o)return iZ(c,r,i,s,l);let d=null!=a?a:0;if(2&d){let{static:e=!1,...t}=c;if(e)return iZ(t,r,i,s,l)}if(1&d){let{unmount:e=!0,...t}=c;return nw(+!e,{0:()=>null,1:()=>iZ({...t,hidden:!0,style:{display:"none"}},r,i,s,l)})}return iZ(c,r,i,s,l)})({mergeRefs:n,...e}),[n])}function iZ(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0,{as:a=n,children:o,refName:s="ref",...l}=i2(e,["unmount","static"]),c=void 0!==e.ref?{[s]:e.ref}:{},d="function"==typeof o?o(t):o;"className"in l&&l.className&&"function"==typeof l.className&&(l.className=l.className(t)),l["aria-labelledby"]&&l["aria-labelledby"]===l.id&&(l["aria-labelledby"]=void 0);let u={};if(t){let e=!1,n=[];for(let[r,i]of Object.entries(t))"boolean"==typeof i&&(e=!0),!0===i&&n.push(r.replace(/([A-Z])/g,e=>"-".concat(e.toLowerCase())));if(e)for(let e of(u["data-headlessui-state"]=n.join(" "),n))u["data-".concat(e)]=""}if(i3(a)&&(Object.keys(i1(l)).length>0||Object.keys(i1(u)).length>0))if(!(0,f.isValidElement)(d)||Array.isArray(d)&&d.length>1||i3(d.type)){if(Object.keys(i1(l)).length>0)throw Error(['Passing props on "Fragment"!\n',"The current component <".concat(r,' /> is rendering a "Fragment".'),"However we need to passthrough the following props:",Object.keys(i1(l)).concat(Object.keys(i1(u))).map(e=>"  - ".concat(e)).join("\n"),"\nYou can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(e=>"  - ".concat(e)).join("\n")].join("\n"))}else{var h;let e=d.props,t=null==e?void 0:e.className,n="function"==typeof t?function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];return iV(t(...n),l.className)}:iV(t,l.className),r=iQ(d.props,i1(i2(l,["ref"])));for(let e in u)e in r&&delete u[e];return(0,f.cloneElement)(d,Object.assign({},r,u,c,{ref:i((h=d,f.default.version.split(".")[0]>="19"?h.props.ref:h.ref),c.ref)},n?{className:n}:{}))}return(0,f.createElement)(a,Object.assign({},i2(l,["ref"]),!i3(a)&&c,!i3(a)&&u),d)}function iJ(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.every(e=>null==e)?void 0:e=>{for(let n of t)null!=n&&("function"==typeof n?n(e):n.current=e)}}function iQ(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];if(0===t.length)return{};if(1===t.length)return t[0];let r={},i={};for(let e of t)for(let t in e)t.startsWith("on")&&"function"==typeof e[t]?(null!=i[t]||(i[t]=[]),i[t].push(e[t])):r[t]=e[t];if(r.disabled||r["aria-disabled"])for(let e in i)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(e)&&(i[e]=[e=>{var t;return null==(t=null==e?void 0:e.preventDefault)?void 0:t.call(e)}]);for(let e in i)Object.assign(r,{[e](t){for(var n=arguments.length,r=Array(n>1?n-1:0),a=1;a<n;a++)r[a-1]=arguments[a];for(let n of i[e]){if((t instanceof Event||(null==t?void 0:t.nativeEvent)instanceof Event)&&t.defaultPrevented)return;n(t,...r)}}});return r}function iX(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];if(0===t.length)return{};if(1===t.length)return t[0];let r={},i={};for(let e of t)for(let t in e)t.startsWith("on")&&"function"==typeof e[t]?(null!=i[t]||(i[t]=[]),i[t].push(e[t])):r[t]=e[t];for(let e in i)Object.assign(r,{[e](){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];for(let t of i[e])null==t||t(...n)}});return r}function i0(e){var t;return Object.assign((0,f.forwardRef)(e),{displayName:null!=(t=e.displayName)?t:e.name})}function i1(e){let t=Object.assign({},e);for(let e in t)void 0===t[e]&&delete t[e];return t}function i2(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=Object.assign({},e);for(let e of t)e in n&&delete n[e];return n}function i3(e){return e===f.Fragment||e===Symbol.for("react.fragment")}e.s(["Description",()=>i9,"useDescriptions",()=>i8],35889);let i5=(0,f.createContext)(void 0);function i4(){return(0,f.useContext)(i5)}let i6=(0,f.createContext)(null);function i8(){let[e,t]=(0,f.useState)([]);return[e.length>0?e.join(" "):void 0,(0,f.useMemo)(()=>function(e){let n=t5(e=>(t(t=>[...t,e]),()=>t(t=>{let n=t.slice(),r=n.indexOf(e);return -1!==r&&n.splice(r,1),n}))),r=(0,f.useMemo)(()=>({register:n,slot:e.slot,name:e.name,props:e.props,value:e.value}),[n,e.slot,e.name,e.props,e.value]);return f.default.createElement(i6.Provider,{value:r},e.children)},[t])]}i6.displayName="DescriptionContext";let i9=Object.assign(i0(function(e,t){let n=(0,f.useId)(),r=i4(),{id:i="headlessui-description-".concat(n),...a}=e,o=function e(){let t=(0,f.useContext)(i6);if(null===t){let t=Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,e),t}return t}(),s=re(t);t2(()=>
1o.register(i),[i,o.register]);let l=n8({...o.slot,disabled:r||!1}),c={ref:s,...o.props,id:i};return iY()({ourProps:c,theirProps:a,slot:l,defaultTag:"p",name:o.name||"Description"})}),{});e.s(["Keys",()=>i7],998348);var i7=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(i7||{});let ae=(0,f.createContext)(void 0),at=(0,f.createContext)(null);function an(){let e=(0,f.useContext)(at);if(null===e){let e=Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(e,an),e}return e}function ar(){var e,t,n;let r,{inherit:i=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=r=null!=(n=null==(t=(0,f.useContext)(at))?void 0:t.value)?n:void 0,[o,s]=(0,f.useState)([]),l=i?[a,...o].filter(Boolean):o;return[l.length>0?l.join(" "):void 0,(0,f.useMemo)(()=>function(e){let t=t5(e=>(s(t=>[...t,e]),()=>s(t=>{let n=t.slice(),r=n.indexOf(e);return -1!==r&&n.splice(r,1),n}))),n=(0,f.useMemo)(()=>({register:t,slot:e.slot,name:e.name,props:e.props,value:e.value}),[t,e.slot,e.name,e.props,e.value]);return f.default.createElement(at.Provider,{value:n},e.children)},[s])]}function ai(e){let t=t5(e),n=(0,f.useRef)(!1);(0,f.useEffect)(()=>(n.current=!1,()=>{n.current=!0,tX(()=>{n.current&&t()})}),[t])}at.displayName="LabelContext",Object.assign(i0(function(e,t){var n;let r=(0,f.useId)(),i=an(),a=(0,f.useContext)(ae),o=i4(),{id:s="headlessui-label-".concat(r),htmlFor:l=null!=a?a:null==(n=i.props)?void 0:n.htmlFor,passive:c=!1,...d}=e,u=re(t);t2(()=>i.register(s),[s,i.register]);let h=t5(e=>{let t=e.currentTarget;if(!(e.target!==e.currentTarget&&ns(e.target))&&(ni(t)&&e.preventDefault(),i.props&&"onClick"in i.props&&"function"==typeof i.props.onClick&&i.props.onClick(e),ni(t))){let e=document.getElementById(t.htmlFor);if(e){let t=e.getAttribute("disabled");if("true"===t||""===t)return;let n=e.getAttribute("aria-disabled");if("true"===n||""===n)return;(nr(e)&&("file"===e.type||"radio"===e.type||"checkbox"===e.type)||"radio"===e.role||"checkbox"===e.role||"switch"===e.role)&&e.click(),e.focus({preventScroll:!0})}}}),p=n8({...i.slot,disabled:o||!1}),g={ref:u,...i.props,id:s,htmlFor:l,onClick:h};return c&&("onClick"in g&&(delete g.htmlFor,delete g.onClick),"onClick"in d&&delete d.onClick),iY()({ourProps:g,theirProps:d,slot:p,defaultTag:l?"label":"div",name:i.name||"Label"})}),{}),e.s(["Portal",()=>am,"PortalGroup",()=>ag,"useNestedPortals",()=>ap],635307),e.s(["useOnUnmount",()=>ai],526599),e.s(["ForcePortalRoot",()=>as,"usePortalRoot",()=>ao],496629);let aa=(0,f.createContext)(!1);function ao(){return(0,f.useContext)(aa)}function as(e){return f.default.createElement(aa.Provider,{value:e.force},e.children)}let al=f.Fragment,ac=i0(function(e,t){let{ownerDocument:n=null,...r}=e,i=(0,f.useRef)(null),a=re(n7(e=>{i.current=e}),t),o=n1(i.current),s=function(e){let t=ao(),n=(0,f.useContext)(au),[r,i]=(0,f.useState)(()=>{var r;if(!t&&null!==n)return null!=(r=n.current)?r:null;if(tK.isServer)return null;let i=null==e?void 0:e.getElementById("headlessui-portal-root");if(i)return i;if(null===e)return null;let a=e.createElement("div");return a.setAttribute("id","headlessui-portal-root"),e.body.appendChild(a)});return(0,f.useEffect)(()=>{null!==r&&(null!=e&&e.body.contains(r)||null==e||e.body.appendChild(r))},[r,e]),(0,f.useEffect)(()=>{t||null!==n&&i(n.current)},[n,i,t]),r}(null!=n?n:o),l=(0,f.useContext)(ah),c=t1(),d=iY();return ai(()=>{var e;s&&s.childNodes.length<=0&&(null==(e=s.parentElement)||e.removeChild(s))}),s?(0,tH.createPortal)(f.default.createElement("div",{"data-headlessui-portal":"",ref:e=>{c.dispose(),l&&e&&c.add(l.register(e))}},d({ourProps:{ref:a},theirProps:r,slot:{},defaultTag:al,name:"Portal"})),s):null}),ad=f.Fragment,au=(0,f.createContext)(null),ah=(0,f.createContext)(null);function ap(){let e=(0,f.useContext)(ah),t=(0,f.useRef)([]),n=t5(n=>(t.current.push(n),e&&e.register(n),()=>r(n))),r=t5(n=>{let r=t.current.indexOf(n);-1!==r&&t.current.splice(r,1),e&&e.unregister(n)}),i=(0,f.useMemo)(()=>({register:n,unregister:r,portals:t}),[n,r,t]);return[t,(0,f.useMemo)(()=>function(e){let{children:t}=e;return f.default.createElement(ah.Provider,{value:i},t)},[i])]}let af=i0(function(e,t){let n=re(t),{enabled:r=!0,ownerDocument:i,...a}=e,o=iY();return r?f.default.createElement(ac,{...a,ownerDocument:i,ref:n}):o({ourProps:{ref:n},theirProps:a,slot:{},defaultTag:al,name:"Portal"})}),ag=i0(function(e,t){let{target:n,...r}=e,i={ref:re(t)}
1,a=iY();return f.default.createElement(au.Provider,{value:n},a({ourProps:i,theirProps:r,defaultTag:ad,name:"Popover.Group"}))}),am=Object.assign(af,{Group:ag}),ay={Idle:{kind:"Idle"},Tracked:e=>({kind:"Tracked",position:e}),Moved:{kind:"Moved"}};function av(e){let t=e.getBoundingClientRect();return"".concat(t.x,",").concat(t.y)}var ab=Object.defineProperty,aw=(e,t,n)=>(((e,t,n)=>t in e?ab(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),n),ax=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(ax||{}),aC=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(aC||{}),aE=(e=>(e[e.OpenMenu=0]="OpenMenu",e[e.CloseMenu=1]="CloseMenu",e[e.GoToItem=2]="GoToItem",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.RegisterItems=5]="RegisterItems",e[e.UnregisterItems=6]="UnregisterItems",e[e.SetButtonElement=7]="SetButtonElement",e[e.SetItemsElement=8]="SetItemsElement",e[e.SortItems=9]="SortItems",e[e.MarkButtonAsMoved=10]="MarkButtonAsMoved",e))(aE||{});function ak(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e=>e,n=null!==e.activeItemIndex?e.items[e.activeItemIndex]:null,r=nG(t(e.items.slice()),e=>e.dataRef.current.domRef.current),i=n?r.indexOf(n):null;return -1===i&&(i=null),{items:r,activeItemIndex:i}}let aS={1(e){if(1===e.menuState)return e;let t=e.buttonElement?ay.Tracked(av(e.buttonElement)):e.buttonPositionState;return{...e,activeItemIndex:null,pendingFocus:{focus:iq.Nothing},menuState:1,buttonPositionState:t}},0:(e,t)=>0===e.menuState?e:{...e,__demoMode:!1,pendingFocus:t.focus,menuState:0,buttonPositionState:ay.Idle},2:(e,t)=>{var n,r,i,a,o;if(1===e.menuState)return e;let s={...e,searchQuery:"",activationTrigger:null!=(n=t.trigger)?n:1,__demoMode:!1};if(t.focus===iq.Nothing)return{...s,activeItemIndex:null};if(t.focus===iq.Specific)return{...s,activeItemIndex:e.items.findIndex(e=>e.id===t.id)};if(t.focus===iq.Previous){let n=e.activeItemIndex;if(null!==n){let a=e.items[n].dataRef.current.domRef,o=iH(t,{resolveItems:()=>e.items,resolveActiveIndex:()=>e.activeItemIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});if(null!==o){let t=e.items[o].dataRef.current.domRef;if((null==(r=a.current)?void 0:r.previousElementSibling)===t.current||(null==(i=t.current)?void 0:i.previousElementSibling)===null)return{...s,activeItemIndex:o}}}}else if(t.focus===iq.Next){let n=e.activeItemIndex;if(null!==n){let r=e.items[n].dataRef.current.domRef,i=iH(t,{resolveItems:()=>e.items,resolveActiveIndex:()=>e.activeItemIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});if(null!==i){let t=e.items[i].dataRef.current.domRef;if((null==(a=r.current)?void 0:a.nextElementSibling)===t.current||(null==(o=t.current)?void 0:o.nextElementSibling)===null)return{...s,activeItemIndex:i}}}}let l=ak(e),c=iH(t,{resolveItems:()=>l.items,resolveActiveIndex:()=>l.activeItemIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});return{...s,...l,activeItemIndex:c}},3:(e,t)=>{let n=+(""===e.searchQuery),r=e.searchQuery+t.value.toLowerCase(),i=(null!==e.activeItemIndex?e.items.slice(e.activeItemIndex+n).concat(e.items.slice(0,e.activeItemIndex+n)):e.items).find(e=>{var t;return(null==(t=e.dataRef.current.textValue)?void 0:t.startsWith(r))&&!e.dataRef.current.disabled}),a=i?e.items.indexOf(i):-1;return -1===a||a===e.activeItemIndex?{...e,searchQuery:r}:{...e,searchQuery:r,activeItemIndex:a,activationTrigger:1}},4:e=>""===e.searchQuery?e:{...e,searchQuery:"",searchActiveItemIndex:null},5:(e,t)=>{let n=e.items.concat(t.items.map(e=>e)),r=e.activeItemIndex;return e.pendingFocus.focus!==iq.Nothing&&(r=iH(e.pendingFocus,{resolveItems:()=>n,resolveActiveIndex:()=>e.activeItemIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled})),{...e,items:n,activeItemIndex:r,pendingFocus:{focus:iq.Nothing},pendingShouldSort:!0}},6:(e,t)=>{let n=e.items,r=[],i=new Set(t.items);for(let[e,t]of n.entries())if(i.has(t.id)&&(r.push(e),i.delete(t.id),0===i.size))break;if(r.length>0)for(let e of(n=n.slice(),r.reverse()))n.splice(e,1);return{...e,items:n,activationTrigger:1}},7:(e,t)=>e.buttonElement===t.element?e:{...e,buttonElement:t.element},8:(e,t)=>
1e.itemsElement===t.element?e:{...e,itemsElement:t.element},9:e=>e.pendingShouldSort?{...e,...ak(e),pendingShouldSort:!1}:e,10:e=>"Tracked"!==e.buttonPositionState.kind?e:{...e,buttonPositionState:ay.Moved}};class aI extends ng{static new(e){let{id:t,__demoMode:n=!1}=e;return new aI({id:t,__demoMode:n,menuState:+!n,buttonElement:null,itemsElement:null,items:[],searchQuery:"",activeItemIndex:null,activationTrigger:1,pendingShouldSort:!1,pendingFocus:{focus:iq.Nothing},buttonPositionState:ay.Idle})}reduce(e,t){return nw(t.type,aS,e,t)}constructor(e){super(e),aw(this,"actions",{registerItem:nb(()=>{let e=[],t=new Set;return[(n,r)=>{t.has(r)||(t.add(r),e.push({id:n,dataRef:r}))},()=>(t.clear(),this.send({type:5,items:e.splice(0)}))]}),unregisterItem:nb(()=>{let e=[];return[t=>e.push(t),()=>this.send({type:6,items:e.splice(0)})]})}),aw(this,"selectors",{activeDescendantId(e){var t;let n=e.activeItemIndex,r=e.items;return null===n||null==(t=r[n])?void 0:t.id},isActive(e,t){var n;let r=e.activeItemIndex,i=e.items;return null!==r&&(null==(n=i[r])?void 0:n.id)===t},shouldScrollIntoView(e,t){return!e.__demoMode&&0===e.menuState&&0!==e.activationTrigger&&this.isActive(e,t)},didButtonMove:e=>"Moved"===e.buttonPositionState.kind}),this.on(5,()=>{this.disposables.requestAnimationFrame(()=>{this.send({type:9})})});{let e=this.state.id,t=nI.get(null);this.disposables.add(t.on(nE.Push,n=>{t.selectors.isTop(n,e)||0!==this.state.menuState||this.send({type:1})})),this.on(0,()=>t.actions.push(e)),this.on(1,()=>t.actions.pop(e))}this.disposables.group(e=>{this.on(1,t=>{t.buttonElement&&(e.dispose(),e.add(function(e,t,n){let r=t0();if("Tracked"===t.kind){let i=function(){a!==av(e)&&(r.dispose(),n())},{position:a}=t,o=new ResizeObserver(i);o.observe(e),r.add(()=>o.disconnect()),r.addEventListener(window,"scroll",i,{passive:!0}),r.addEventListener(window,"resize",i)}return()=>r.dispose()}(t.buttonElement,t.buttonPositionState,()=>{this.send({type:10})})))})})}}let aA=(0,f.createContext)(null);function aT(e){let t=(0,f.useContext)(aA);if(null===t){let t=Error("<".concat(e," /> is missing a parent <Menu /> component."));throw Error.captureStackTrace&&Error.captureStackTrace(t,a_),t}return t}function a_(e){let{id:t,__demoMode:n=!1}=e,r=(0,f.useMemo)(()=>aI.new({id:t,__demoMode:n}),[]);return ai(()=>r.dispose()),r}let aj=f.Fragment,aP=iG.RenderStrategy|iG.Static,a$=f.Fragment,aN=i0(function(e,t){let n=(0,f.useId)(),{__demoMode:r=!1,...i}=e,a=a_({id:n,__demoMode:r}),[o,s,l]=nT(a,e=>[e.menuState,e.itemsElement,e.buttonElement]),c=re(t),d=nI.get(null);n0(nT(d,(0,f.useCallback)(e=>d.selectors.isTop(e,n),[d,n])),[l,s],(e,t)=>{var n;a.send({type:aE.CloseMenu}),nW(t,nz.Loose)||(e.preventDefault(),null==(n=a.state.buttonElement)||n.focus())});let u=t5(()=>{a.send({type:aE.CloseMenu})}),h=n8({open:o===ax.Open,close:u}),p=iY();return f.default.createElement(iR,null,f.default.createElement(aA.Provider,{value:a},f.default.createElement(iz,{value:nw(o,{[ax.Open]:iU.Open,[ax.Closed]:iU.Closed})},p({ourProps:{ref:c},theirProps:i,slot:h,defaultTag:aj,name:"Menu"}))))}),aO=i0(function(e,t){var n,r;let i,a=aT("Menu.Button"),o=(0,f.useId)(),{id:s="headlessui-menu-button-".concat(o),disabled:l=!1,autoFocus:c=!1,...d}=e,u=(0,f.useRef)(null),h=(0,f.useContext)(iO).getReferenceProps,p=re(t,u,(0,f.useContext)(iO).setReference,t5(e=>a.send({type:aE.SetButtonElement,element:e}))),g=t5(e=>{switch(e.key){case i7.Space:case i7.Enter:case i7.ArrowDown:e.preventDefault(),e.stopPropagation(),a.send({type:aE.OpenMenu,focus:{focus:iq.First}});break;case i7.ArrowUp:e.preventDefault(),e.stopPropagation(),a.send({type:aE.OpenMenu,focus:{focus:iq.Last}})}}),m=t5(e=>{e.key===i7.Space&&e.preventDefault()}),[y,b,w]=nT(a,e=>[e.menuState,e.buttonElement,e.itemsElement]);!function(e,t){let{trigger:n,action:r,close:i,select:a}=t,o=(0,f.useRef)(null),s=(0,f.useRef)(null),l=(0,f.useRef)(null);nQ(e&&null!==n,"pointerdown",e=>{t8(null==e?void 0:e.target)&&null!=n&&n.contains(e.target)&&(s.current=e.x,l.current=e.y,o.current=e.timeStamp)}),nQ(e&&null!==n,"pointerup",e=>{var t,n;let c=o.current;if(null===c||(o.current=null,!ne(e.target))||5>Math.abs(e.x-(null!=(t=s.current)?t:e.x))&&5>
1Math.abs(e.y-(null!=(n=l.current)?n:e.y)))return;let d=r(e);switch(d.kind){case 0:return;case 1:e.timeStamp-c>200&&(a(d.target),i());break;case 2:i()}},{capture:!0})}(y===ax.Open,{trigger:b,action:(0,f.useCallback)(e=>{if(null!=b&&b.contains(e.target))return n3.Ignore;let t=e.target.closest('[role="menuitem"]:not([data-disabled])');return t7(t)?n3.Select(t):null!=w&&w.contains(e.target)?n3.Ignore:n3.Close},[b,w]),close:(0,f.useCallback)(()=>a.send({type:aE.CloseMenu}),[]),select:(0,f.useCallback)(e=>e.click(),[])});let x=(n=e=>{var t;l||(y===ax.Open?((0,tH.flushSync)(()=>a.send({type:aE.CloseMenu})),null==(t=u.current)||t.focus({preventScroll:!0})):(e.preventDefault(),a.send({type:aE.OpenMenu,focus:{focus:iq.Nothing},trigger:aC.Pointer})))},i=(0,f.useRef)(null),{onPointerDown:t5(e=>{i.current=e.pointerType,nl(e.currentTarget)||"mouse"!==e.pointerType||e.button!==t6.Left||(e.preventDefault(),n(e))}),onClick:t5(e=>{"mouse"!==i.current&&(nl(e.currentTarget)||n(e))})}),{isFocusVisible:C,focusProps:E}=function(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{autoFocus:n=!1,isTextInput:r,within:i}=t,a=(0,f.useRef)({isFocused:!1,isFocusVisible:n||tR()}),[o,s]=(0,f.useState)(!1),[l,c]=(0,f.useState)(()=>a.current.isFocused&&a.current.isFocusVisible),d=(0,f.useCallback)(()=>c(a.current.isFocused&&a.current.isFocusVisible),[]),u=(0,f.useCallback)(e=>{a.current.isFocused=e,s(e),d()},[d]);e={isTextInput:r},tO(),(0,f.useEffect)(()=>{let t=(t,n)=>{(function(e,t,n){let r=ts(null==n?void 0:n.target),i="undefined"!=typeof window?tl(null==n?void 0:n.target).HTMLInputElement:HTMLInputElement,a="undefined"!=typeof window?tl(null==n?void 0:n.target).HTMLTextAreaElement:HTMLTextAreaElement,o="undefined"!=typeof window?tl(null==n?void 0:n.target).HTMLElement:HTMLElement,s="undefined"!=typeof window?tl(null==n?void 0:n.target).KeyboardEvent:KeyboardEvent;return!((e=e||r.activeElement instanceof i&&!tL.has(r.activeElement.type)||r.activeElement instanceof a||r.activeElement instanceof o&&r.activeElement.isContentEditable)&&"keyboard"===t&&n instanceof s&&!tA[n.key])})(!!(null==e?void 0:e.isTextInput),t,n)&&(e=>{a.current.isFocusVisible=e,d()})(tR())};return tE.add(t),()=>{tE.delete(t)}},[]);let{focusProps:h}=function(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:i}=e,a=(0,f.useCallback)(e=>{if(e.target===e.currentTarget)return r&&r(e),i&&i(!1),!0},[r,i]),o=tu(a),s=(0,f.useCallback)(e=>{var t;let r=ts(e.target),a=r?tF(r):tF();e.target===e.currentTarget&&a===(t=e.nativeEvent,t.target)&&(n&&n(e),i&&i(!0),o(e))},[i,n,o]);return{focusProps:{onFocus:!t&&(n||i||r)?s:void 0,onBlur:!t&&(r||i)?a:void 0}}}({isDisabled:i,onFocusChange:u}),{focusWithinProps:p}=function(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:i}=e,a=(0,f.useRef)({isFocusWithin:!1}),{addGlobalListener:o,removeAllGlobalListeners:s}=tU(),l=(0,f.useCallback)(e=>{e.currentTarget.contains(e.target)&&a.current.isFocusWithin&&!e.currentTarget.contains(e.relatedTarget)&&(a.current.isFocusWithin=!1,s(),n&&n(e),i&&i(!1))},[n,i,a,s]),c=tu(l),d=(0,f.useCallback)(e=>{var t;if(!e.currentTarget.contains(e.target))return;let n=ts(e.target),s=tF(n);if(!a.current.isFocusWithin&&s===(t=e.nativeEvent,t.target)){r&&r(e),i&&i(!0),a.current.isFocusWithin=!0,c(e);let t=e.currentTarget;o(n,"focus",e=>{if(a.current.isFocusWithin&&!tD(t,e.target)){let r=new n.defaultView.FocusEvent("blur",{relatedTarget:e.target});Object.defineProperty(r,"target",{value:t}),Object.defineProperty(r,"currentTarget",{value:t}),l(td(r))}},{capture:!0})}},[r,i,c,o,l]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:d,onBlur:l}}}({isDisabled:!i,onFocusWithinChange:u});return{isFocused:o,isFocusVisible:l,focusProps:i?p:h}}({autoFocus:c}),{isHovered:k,hoverProps:S}=function(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:i}=e,[a,o]=(0,f.useState)(!1),s=(0,f.useRef)({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;(0,f.useEffect)(tq,[]);let{addGlobalListener:l,removeAllGlobalListeners:c}=tU(),{hoverProps:d,triggerHoverEnd:u}=(0,f.useMemo)(()=>{let e=(e,t)=>
1{let i=s.target;s.pointerType="",s.target=null,"touch"!==t&&s.isHovered&&i&&(s.isHovered=!1,c(),r&&r({type:"hoverend",target:i,pointerType:t}),n&&n(!1),o(!1))},a={};return"undefined"!=typeof PointerEvent&&(a.onPointerEnter=r=>{tB&&"mouse"===r.pointerType||((r,a)=>{if(s.pointerType=a,i||"touch"===a||s.isHovered||!r.currentTarget.contains(r.target))return;s.isHovered=!0;let c=r.currentTarget;s.target=c,l(ts(r.target),"pointerover",t=>{s.isHovered&&s.target&&!tD(s.target,t.target)&&e(t,t.pointerType)},{capture:!0}),t&&t({type:"hoverstart",target:c,pointerType:a}),n&&n(!0),o(!0)})(r,r.pointerType)},a.onPointerLeave=t=>{!i&&t.currentTarget.contains(t.target)&&e(t,t.pointerType)}),{hoverProps:a,triggerHoverEnd:e}},[t,n,r,i,s,l,c]);return(0,f.useEffect)(()=>{i&&u({currentTarget:s.target},s.pointerType)},[i]),{hoverProps:d,isHovered:a}}({isDisabled:l}),{pressed:I,pressProps:A}=function(){let{disabled:e=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(0,f.useRef)(null),[n,r]=(0,f.useState)(!1),i=t1(),a=t5(()=>{t.current=null,r(!1),i.dispose()}),o=t5(e=>{if(i.dispose(),null===t.current){t.current=e.currentTarget,r(!0);{let n=tY(e.currentTarget);i.addEventListener(n,"pointerup",a,!1),i.addEventListener(n,"pointermove",e=>{if(t.current){var n,i;let a,o;r((a=e.width/2,o=e.height/2,n={top:e.clientY-o,right:e.clientX+a,bottom:e.clientY+o,left:e.clientX-a},i=t.current.getBoundingClientRect(),!(!n||!i||n.right<i.left||n.left>i.right||n.bottom<i.top||n.top>i.bottom)))}},!1),i.addEventListener(n,"pointercancel",a,!1)}}});return{pressed:n,pressProps:e?{}:{onPointerDown:o,onPointerUp:a,onClick:a}}}({disabled:l}),T=n8({open:y===ax.Open,active:I||y===ax.Open,disabled:l,hover:k,focus:C,autofocus:c}),_=iX(h(),{ref:p,id:s,type:(r=u.current,(0,f.useMemo)(()=>{var t;if(e.type)return e.type;let n=null!=(t=e.as)?t:"button";if("string"==typeof n&&"button"===n.toLowerCase()||(null==r?void 0:r.tagName)==="BUTTON"&&!r.hasAttribute("type"))return"button"},[e.type,e.as,r])),"aria-haspopup":"menu","aria-controls":null==w?void 0:w.id,"aria-expanded":y===ax.Open,disabled:l||void 0,autoFocus:c,onKeyDown:g,onKeyUp:m},x,E,S,A);return iY()({ourProps:_,theirProps:d,slot:T,defaultTag:"button",name:"Menu.Button"})}),aM=i0(function(e,t){let n=(0,f.useId)(),{id:r="headlessui-menu-items-".concat(n),anchor:i,portal:a=!1,modal:o=!0,transition:s=!1,...l}=e,c=(0,f.useMemo)(()=>i?"string"==typeof i?{to:i}:i:null,[i]),d=aT("Menu.Items"),[u,h]=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;!1===e&&(e=null),"string"==typeof e&&(e={to:e});let t=(0,f.useContext)(iM),n=(0,f.useMemo)(()=>e,[JSON.stringify(e,(e,t)=>{var n;return null!=(n=null==t?void 0:t.outerHTML)?n:t})]);t2(()=>{null==t||t(null!=n?n:null)},[t,n]);let r=(0,f.useContext)(iO);return(0,f.useMemo)(()=>[r.setFloating,e?r.styles:{}],[r.setFloating,e,r.styles])}(c),p=function(){let{getFloatingProps:e,slot:t}=(0,f.useContext)(iO);return(0,f.useCallback)(function(){for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return Object.assign({},e(...r),{"data-anchor":t.anchor})},[e,t])}(),[g,m]=(0,f.useState)(null),y=re(t,c?u:null,t5(e=>d.send({type:aE.SetItemsElement,element:e})),m),[b,w]=nT(d,e=>[e.menuState,e.buttonElement]),x=n1(w),C=n1(g);c&&(a=!0);let E=iB(),[k,S]=ro(s,g,null!==E?(E&iU.Open)===iU.Open:b===ax.Open);nM(k,w,()=>{d.send({type:aE.CloseMenu})});let I=nT(d,e=>e.__demoMode);n6(!I&&o&&b===ax.Open,C),nO(!I&&o&&b===ax.Open,{allowed:(0,f.useCallback)(()=>[w,g],[w,g])});let A=!nT(d,d.selectors.didButtonMove)&&k;(0,f.useEffect)(()=>{g&&b===ax.Open&&(tQ(g)||g.focus({preventScroll:!0}))},[b,g]),function(e,t){let{container:n,accept:r,walk:i}=t,a=(0,f.useRef)(r),o=(0,f.useRef)(i);(0,f.useEffect)(()=>{a.current=r,o.current=i},[r,i]),t2(()=>{if(!n||!e)return;let t=tY(n);if(!t)return;let r=a.current,i=o.current,s=Object.assign(e=>r(e),{acceptNode:r}),l=t.createTreeWalker(n,NodeFilter.SHOW_ELEMENT,s,!1);for(;l.nextNode();)i(l.currentNode)},[n,e,a,o])}(b===ax.Open,{container:g,accept:e=>"menuitem"===e.getAttribute("role")?NodeFilter.FILTER_REJECT:e.hasAttribute("role")?N
1odeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT,walk(e){e.setAttribute("role","none")}});let T=t1(),_=t5(e=>{var t,n,r;switch(T.dispose(),e.key){case i7.Space:if(""!==d.state.searchQuery)return e.preventDefault(),e.stopPropagation(),d.send({type:aE.Search,value:e.key});case i7.Enter:if(e.preventDefault(),e.stopPropagation(),null!==d.state.activeItemIndex){let{dataRef:e}=d.state.items[d.state.activeItemIndex];null==(n=null==(t=e.current)?void 0:t.domRef.current)||n.click()}d.send({type:aE.CloseMenu}),nq(d.state.buttonElement);break;case i7.ArrowDown:return e.preventDefault(),e.stopPropagation(),d.send({type:aE.GoToItem,focus:iq.Next});case i7.ArrowUp:return e.preventDefault(),e.stopPropagation(),d.send({type:aE.GoToItem,focus:iq.Previous});case i7.Home:case i7.PageUp:return e.preventDefault(),e.stopPropagation(),d.send({type:aE.GoToItem,focus:iq.First});case i7.End:case i7.PageDown:return e.preventDefault(),e.stopPropagation(),d.send({type:aE.GoToItem,focus:iq.Last});case i7.Escape:e.preventDefault(),e.stopPropagation(),(0,tH.flushSync)(()=>d.send({type:aE.CloseMenu})),null==(r=d.state.buttonElement)||r.focus({preventScroll:!0});break;case i7.Tab:e.preventDefault(),e.stopPropagation(),(0,tH.flushSync)(()=>d.send({type:aE.CloseMenu})),nK(d.state.buttonElement,e.shiftKey?nD.Previous:nD.Next);break;default:1===e.key.length&&(d.send({type:aE.Search,value:e.key}),T.setTimeout(()=>d.send({type:aE.ClearSearch}),350))}}),j=t5(e=>{e.key===i7.Space&&e.preventDefault()}),P=n8({open:b===ax.Open}),$=iX(c?p():{},{"aria-activedescendant":nT(d,d.selectors.activeDescendantId),"aria-labelledby":nT(d,e=>{var t;return null==(t=e.buttonElement)?void 0:t.id}),id:r,onKeyDown:_,onKeyUp:j,role:"menu",tabIndex:b===ax.Open?0:void 0,ref:y,style:{...l.style,...h,"--button-width":function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],[r,i]=(0,f.useState)(()=>t4(t));return t2(()=>{if(!t||!e)return;let n=t0();return n.requestAnimationFrame(function e(){n.requestAnimationFrame(e),i(e=>{let n=t4(t);return n.width===e.width&&n.height===e.height?e:n})}),()=>{n.dispose()}},[t,e]),n?{width:"".concat(r.width,"px"),height:"".concat(r.height,"px")}:r}(k,w,!0).width},...ra(S)}),N=iY();return f.default.createElement(am,{enabled:!!a&&(e.static||k),ownerDocument:x},N({ourProps:$,theirProps:l,slot:P,defaultTag:"div",features:aP,visible:A,name:"Menu.Items"}))}),aR=i0(function(e,t){let n,r,i,a=(0,f.useId)(),{id:o="headlessui-menu-item-".concat(a),disabled:s=!1,...l}=e,c=aT("Menu.Item"),d=nT(c,e=>c.selectors.isActive(e,o)),u=(0,f.useRef)(null),h=re(t,u),p=nT(c,e=>c.selectors.shouldScrollIntoView(e,o));t2(()=>{if(p)return t0().requestAnimationFrame(()=>{var e,t;null==(t=null==(e=u.current)?void 0:e.scrollIntoView)||t.call(e,{block:"nearest"})})},[p,u]);let g=(n=(0,f.useRef)(""),r=(0,f.useRef)(""),t5(()=>{let e=u.current;if(!e)return"";let t=e.innerText;if(n.current===t)return r.current;let i=(function(e){let t=e.getAttribute("aria-label");if("string"==typeof t)return t.trim();let n=e.getAttribute("aria-labelledby");if(n){let e=n.split(" ").map(e=>{let t=document.getElementById(e);if(t){let e=t.getAttribute("aria-label");return"string"==typeof e?e.trim():rn(t).trim()}return null}).filter(Boolean);if(e.length>0)return e.join(", ")}return rn(e).trim()})(e).trim().toLowerCase();return n.current=t,r.current=i,i})),m=(0,f.useRef)({disabled:s,domRef:u,get textValue(){return g()}});t2(()=>{m.current.disabled=s},[m,s]),t2(()=>(c.actions.registerItem(o,m),()=>c.actions.unregisterItem(o)),[m,o]);let y=t5(()=>{c.send({type:aE.CloseMenu})}),b=t5(e=>{if(s)return e.preventDefault();c.send({type:aE.CloseMenu}),nq(c.state.buttonElement)}),w=t5(()=>{if(s)return c.send({type:aE.GoToItem,focus:iq.Nothing});c.send({type:aE.GoToItem,focus:iq.Specific,id:o})}),x=(i=(0,f.useRef)([-1,-1]),{wasMoved(e){let t=rr(e);return(i.current[0]!==t[0]||i.current[1]!==t[1])&&(i.current=t,!0)},update(e){i.current=rr(e)}}),C=t5(e=>x.update(e)),E=t5(e=>{x.wasMoved(e)&&(s||d||c.send({type:aE.GoToItem,focus:iq.Specific,id:o,trigger:aC.Pointer}))}),k=t5(e=>{x.wasMoved(e)&&(s||d&&c.state.activationTrigger===aC.Pointer&&c.send({type:aE.GoToItem,focus:iq.Nothing}))}),[S,I]=ar(),[A,T]=i8(),_=n8({active:d,focus:d,disabled:s,close:y}),j=iY();return f.default.createElement(I,null,f.default.createElement(T,null,j({ourProps:{id:o,ref:h,role:"menuitem",tabIndex:!0===s?void 0:-1,"aria-disabled":!0===s||void 0,"aria-labelledby":S,"aria-describedby":A,disabled:void 0,onClick:b,onFocus:w,onPointerEnter:C,onMouseEnter:C,onPointerMove:E,onMouseMove:E,onPointerLeave:k,onMouseLeave:k},theirProps:l,slot:_,defaultTag:a$,name:"Menu.Item"})))}),aL=Object.assign(aN,{Button:aO,Items:aM,Item:aR,Section:i0(function(e,t){let[n,r]=ar(),i=iY();
1return f.default.createElement(r,null,i({ourProps:{ref:t,"aria-labelledby":n,role:"group"},theirProps:e,slot:{},defaultTag:"div",name:"Menu.Section"}))}),Heading:i0(function(e,t){let n=(0,f.useId)(),{id:r="headlessui-menu-heading-".concat(n),...i}=e,a=an();t2(()=>a.register(r),[r,a.register]);let o={id:r,ref:t,role:"presentation",...a.props};return iY()({ourProps:o,theirProps:i,slot:{},defaultTag:"header",name:"Menu.Heading"})}),Separator:i0(function(e,t){return iY()({ourProps:{ref:t,role:"separator"},theirProps:e,slot:{},defaultTag:"div",name:"Menu.Separator"})})});e.s(["ofetch",()=>aW],450223);var aD=e.i(650838);let aF="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:e.g,aU=aF.fetch?function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return aF.fetch(...t)}:()=>Promise.reject(Error("[ofetch] global.fetch is not supported!")),aB=aF.Headers,az=aF.AbortController,aW=(0,aD.c)({fetch:aU,Headers:aB,AbortController:az});e.s(["default",()=>aq],296368);let aq=f.forwardRef(function(e,t){let{title:n,titleId:r,...i}=e;return f.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":r},i),n?f.createElement("title",{id:r},n):null,f.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7.864 4.243A7.5 7.5 0 0 1 19.5 10.5c0 2.92-.556 5.709-1.568 8.268M5.742 6.364A7.465 7.465 0 0 0 4.5 10.5a7.464 7.464 0 0 1-1.15 3.993m1.989 3.559A11.209 11.209 0 0 0 8.25 10.5a3.75 3.75 0 1 1 7.5 0c0 .527-.021 1.049-.064 1.565M12 10.5a14.94 14.94 0 0 1-3.6 9.75m6.633-4.596a18.666 18.666 0 0 1-2.485 5.33"}))});class aH{get(e){let t=localStorage.getItem(e);return null===t?void 0:JSON.parse(t)}put(e,t){void 0!==t?localStorage.setItem(e,JSON.stringify(t)):this.del(e)}del(e){localStorage.removeItem(e)}getKeys(){return Object.entries(localStorage).map(e=>{let[t]=e;return t})}}function aV(){try{let e="privy:__session_storage__test",t=new aH;return t.put(e,"blobby"),t.del(e),!0}catch(e){return!1}}var aG="undefined"!=typeof window&&window.localStorage?new aH:new class{get(e){return this._cache[e]}put(e,t){void 0!==t?this._cache[e]=t:this.del(e)}del(e){delete this._cache[e]}getKeys(){return Object.keys(this._cache)}constructor(){this._cache={}}};function aK(e){var t;return{name:(null==(t=e.metadata)?void 0:t.shortName)||e.name||"",universalLink:e.mobile.universal,deepLink:e.mobile.native}}function aY(e,t){let n=aK(t);if(n.universalLink)return aX(n.universalLink,e)}let aZ="WALLETCONNECT_DEEPLINK_CHOICE";function aJ(e){return e.startsWith("http://")||e.startsWith("https://")}function aQ(e,t){if(aJ(e))return aX(e,t);let n=e;return n.includes("://")||(n=e.replaceAll("/","").replaceAll(":",""),n="".concat(n,"://")),n.endsWith("/")||(n="".concat(n,"/")),{redirect:"".concat(n,"wc?uri=").concat(encodeURIComponent(t)),href:n}}function aX(e,t){if(!aJ(e))return aQ(e,t);let n=e;return n.endsWith("/")||(n="".concat(n,"/")),{redirect:"".concat(n,"wc?uri=").concat(encodeURIComponent(t)),href:n}}function a0(e,t){window.open(e,t,"noreferrer noopener")}class a1{execute(e){return null===this.promise&&(this.promise=(async()=>{try{return await this.fn(e)}finally{this.promise=null}})()),this.promise}constructor(e){this.promise=null,this.fn=e}}let a2="https://auth.privy.io",a3=2e4,a5=1400,a4=2500,a6="3.4.1",a8="privy:token",a9="privy-token",a7="privy:refresh_token",oe="privy-refresh-token",ot="privy:pat",on="privy:id_token",or="privy-id-token",oi="privy-session",oa="privy:caid",oo=e=>"privy:guest:".concat(e),os=e=>"privy:cross-app:".concat(e),ol="privy:state_code",oc="privy:code_verifier",od="privy:headless_oauth",ou="privy:oauth_disable_signup",oh=e=>"privy:wallet:".concat(e),op="privy:connections",of=3e4,og="deprecated";function om(e){return crypto.getRandomValues(new Uint8Array(e))}function oy(){return eD.base64url.encode(om(36))}function ov(){return oy()}async function ob(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"S256";if("S256"!=t)return e;{let t=await async function(e){let t=(new TextEncoder).encode(e);return new Uint8Array(await crypto.subtle.digest("SHA-256",t))}(e);return eD.base64url.encode(t)}}function ow(){let e=aG.get(oc);if(!e)throw new eb.P("Authentication error.");return e}function ox(e){return e.charAt(0).toUpperCase()+e.slice(1)}let oC=e=>{let{style:t,...n}=e;return(0,m.jsxs)("svg",{width:"33",height:"32",viewBox:"0 0 33 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"24px",...t},...n,children:[(0,m.jsx)("rect",{x:"0.5",width:"32",height:"32",rx:"4",fill:"#040507"}
1),(0,m.jsx)("path",{d:"M17.2949 6.37537C18.0156 5.44684 19.4671 4.57877 20.4927 4.46512C20.8178 4.42885 20.8581 4.43127 20.9312 4.50139L20.9967 4.56426L20.9816 4.99225C20.9564 5.65963 20.8682 6.12873 20.6716 6.6341C20.4751 7.13705 20.1198 7.71738 19.8426 7.97852C19.7594 8.06074 19.6007 8.22516 19.4948 8.34848C19.0563 8.84901 18.439 9.20205 17.5973 9.4366C17.2823 9.52606 17.2596 9.52848 16.8917 9.52606C16.4482 9.52365 16.3852 9.51156 16.3524 9.43176C16.3398 9.39791 16.3272 9.18996 16.3222 8.9675L16.3171 8.56127L16.423 8.17922C16.6347 7.41512 16.8791 6.90733 17.2949 6.37537Z",fill:"white"}),(0,m.jsx)("path",{d:"M17.4512 10.2081C18.4163 9.84541 19.7595 9.48754 20.2584 9.46336C20.6616 9.4416 21.2966 9.49238 21.7225 9.57943C22.1383 9.66164 22.4357 9.76078 22.8666 9.96148C23.5571 10.2831 24.1442 10.7135 24.6104 11.2382C24.9582 11.6299 24.9783 11.6807 24.8397 11.8113C24.7944 11.8548 24.6885 11.9249 24.6054 11.9709C24.4542 12.0507 23.8368 12.5464 23.8368 12.5875C23.8368 12.5971 23.736 12.7108 23.6125 12.8341C23.2068 13.25 23.0279 13.5861 22.7683 14.4252C22.7078 14.6186 22.6448 14.8725 22.6272 14.9934C22.5566 15.4577 22.5919 16.125 22.7154 16.7344C22.7885 17.1044 23.0808 17.7306 23.3706 18.1489C23.7763 18.7317 24.3786 19.2491 24.9909 19.5514C25.316 19.7086 25.5 19.8464 25.5 19.9334C25.5 19.96 25.4773 20.0205 25.4521 20.064C25.4244 20.1075 25.3866 20.2164 25.3639 20.3034C25.311 20.521 25.001 21.244 24.807 21.5971C24.0862 22.9052 23.3731 23.8748 22.6095 24.5833C21.8611 25.2725 21.1606 25.582 20.4348 25.5385C19.9359 25.5094 19.4596 25.3934 18.7842 25.1322C18.2248 24.917 18.0081 24.8493 17.7939 24.8203C17.688 24.8058 17.4915 24.7768 17.3604 24.7574C16.9774 24.697 16.7254 24.6921 16.4533 24.7478C15.5461 24.9267 15.5133 24.9364 15.0144 25.1371C14.2231 25.4562 13.8073 25.5578 13.2907 25.5578C12.8875 25.5602 12.696 25.5143 12.2575 25.3087C11.8694 25.125 11.5948 24.9315 11.2546 24.5978C10.9295 24.2811 10.7052 24.0151 10.2642 23.4323C9.18818 22.0081 9.02187 21.7276 8.49519 20.4582C8.28612 19.9546 8.19971 19.7502 8.13026 19.5402C8.07498 19.373 8.03043 19.2023 7.94332 18.8744C7.73164 18.074 7.70896 17.9869 7.70896 17.8709C7.70896 17.8153 7.68628 17.675 7.66108 17.5565C7.44184 16.5917 7.44688 15.0007 7.67116 14.1713C7.82236 13.6127 8.02648 13.088 8.30367 12.5512C8.92863 11.3325 9.71738 10.5539 10.874 10.0123C11.2571 9.8309 11.5444 9.74627 12.0534 9.65922C12.2903 9.62054 12.5523 9.56976 12.6355 9.54799C12.8421 9.49238 13.3184 9.49963 13.6057 9.56008C14.2911 9.71 14.7548 9.84058 15.2059 10.0123C16.0551 10.3411 16.549 10.4789 16.7506 10.4475C16.7692 10.4444 16.7848 10.4418 16.8002 10.4387C16.8815 10.4225 16.9601 10.3929 17.4512 10.2081Z",fill:"white"})]})},oE=e=>{let{style:t,...n}=e;return(0,m.jsxs)("svg",{width:"33",height:"32",viewBox:"0 0 33 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"24px",...t},...n,children:[(0,m.jsx)("rect",{x:"0.5",width:"32",height:"32",rx:"4",fill:"#5462EB"}),(0,m.jsx)("path",{d:"M23.5433 8.87438C22.2479 8.26174 20.8587 7.81038 19.4063 7.55187C19.3799 7.54688 19.3534 7.55934 19.3398 7.58428C19.1612 7.91179 18.9633 8.33905 18.8247 8.67487C17.2625 8.43382 15.7084 8.43382 14.1782 8.67487C14.0396 8.33158 13.8345 7.91179 13.6551 7.58428C13.6414 7.56018 13.615 7.54771 13.5886 7.55187C12.1369 7.80955 10.7478 8.26092 9.45159 8.87438C9.44037 8.87937 9.43075 8.88769 9.42437 8.89849C6.78947 12.9558 6.06766 16.9134 6.42176 20.8219C6.42336 20.841 6.43378 20.8593 6.4482 20.871C8.18663 22.1868 9.87059 22.9857 11.5233 23.5152C11.5497 23.5235 11.5778 23.5135 11.5946 23.491C11.9855 22.9408 12.334 22.3606 12.6328 21.7504C12.6505 21.7147 12.6336 21.6723 12.5976 21.6581C12.0448 21.442 11.5185 21.1785 11.0122 20.8793C10.9721 20.8552 10.9689 20.7961 11.0058 20.7679C11.1123 20.6856 11.2189 20.6 11.3206 20.5135C11.339 20.4977 11.3647 20.4944 11.3863 20.5044C14.7125 22.0696 18.3136 22.0696 21.6006 20.5044C21.6222 20.4936 21.6479 20.4969 21.6671 20.5127C21.7688 20.5991 21.8754 20.6856 21.9827 20.7679C22.0196 20.7961 22.0172 20.8552 21.9771 20.8793C21.4708 21.1843 20.9445 21.442 20.3909 21.6573C20.3548 21.6715 20.3388 21.7147 20.3564 21.7504C20.6617 22.3597 21.0101 22.9399 21.3939 23.4902C21.4099 23.5135 21.4387 23.5235 21.4652 23.5152C23.1259 22.9857 24.8099 22.1868 26.5483 20.871C26.5635 20.8593 26.5731 20.8419 26.5747 20.8228C26.9985 16.3041 25.8649 12.3789 23.5697 8.89931C23.5641 8.88769 23.5545 8.87937 23.5433 8.87438ZM13.1295 18.442C12.1281 18.442 11.303 17.4944 11.303 16.3307C11.303 15.1669 12.1121 14.2193 13.1295 14.2193C14.155 14.2193 14.9721 15.1752 14.9561 16.3307C14.9561 17.4944 14.1469 18.442 13.1295 18.442ZM19.883 18.442C18.8816 18.442 18.0564 17.4944 18.0564 16.3307C18.0564 15.1669 18.8655 14.2193 19.883 14.2193C20.9084 14.2193 21.7255 15.1752 21.7095 16.3307C21.7095 17.4944 20.9084 18.442 19.883 18.442Z",fill:"#F7F7F7"})]})},ok=e=>{let{style:t,...n}=e;return(0,m.jsxs)("svg",{width:"33",height:"32",viewBox:"0 0 33 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"24px",...t},...n,children:[(0,m.jsx)("rect",{x:"0.5",width:"32",height:"32",rx:"4",fill:"black"}),(0,m.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M16.5083 5.62451C10.8896 5.62451 6.34741 10.2078 6.34741 15.878C6.34741 20.4104 9.25774 24.2471 13.2951 25.
1605C13.7999 25.7071 13.9848 25.3844 13.9848 25.1129C13.9848 24.8752 13.9682 24.0604 13.9682 23.2115C11.1417 23.8227 10.5531 21.9892 10.5531 21.9892C10.0988 20.8009 9.42579 20.4954 9.42579 20.4954C8.50068 19.8673 9.49318 19.8673 9.49318 19.8673C10.5194 19.9352 11.0578 20.9198 11.0578 20.9198C11.9661 22.4815 13.4297 22.0402 14.0185 21.7686C14.1025 21.1065 14.3719 20.6482 14.6579 20.3936C12.4035 20.1559 10.0317 19.2732 10.0317 15.3347C10.0317 14.2142 10.4351 13.2976 11.0745 12.5847C10.9736 12.3301 10.6202 11.2774 11.1756 9.86844C11.1756 9.86844 12.0335 9.59678 13.968 10.9209C14.7962 10.6965 15.6503 10.5823 16.5083 10.5814C17.3662 10.5814 18.2408 10.7003 19.0484 10.9209C20.9831 9.59678 21.841 9.86844 21.841 9.86844C22.3963 11.2774 22.0428 12.3301 21.9419 12.5847C22.5981 13.2976 22.9849 14.2142 22.9849 15.3347C22.9849 19.2732 20.6131 20.1388 18.3419 20.3936C18.7121 20.7161 19.0316 21.3271 19.0316 22.2948C19.0316 23.6698 19.0149 24.7733 19.0149 25.1127C19.0149 25.3844 19.2 25.7071 19.7046 25.6052C23.742 24.2469 26.6523 20.4104 26.6523 15.878C26.669 10.2078 22.1102 5.62451 16.5083 5.62451Z",fill:"white"})]})},oS=e=>(0,m.jsxs)("svg",{width:"33",height:"32",viewBox:"0 0 33 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,m.jsx)("rect",{x:"0.5",width:"32",height:"32",rx:"4",fill:"#F1F2F9"}),(0,m.jsx)("path",{d:"M26.1001 16.2273C26.1001 15.5182 26.0365 14.8364 25.9183 14.1818H16.5001V18.05H21.8819C21.6501 19.3 20.9456 20.3591 19.8865 21.0682V23.5773H23.1183C25.0092 21.8364 26.1001 19.2727 26.1001 16.2273Z",fill:"#4285F4"}),(0,m.jsx)("path",{d:"M16.5001 26C19.2001 26 21.4637 25.1046 23.1182 23.5773L19.8864 21.0682C18.991 21.6682 17.8455 22.0227 16.5001 22.0227C13.8955 22.0227 11.691 20.2637 10.9046 17.9H7.56372V20.4909C9.20917 23.7591 12.591 26 16.5001 26Z",fill:"#34A853"}),(0,m.jsx)("path",{d:"M10.9047 17.8999C10.7047 17.2999 10.591 16.659 10.591 15.9999C10.591 15.3408 10.7047 14.6999 10.9047 14.0999V11.509H7.56376C6.86376 12.9025 6.49951 14.4405 6.50012 15.9999C6.50012 17.6136 6.88649 19.1408 7.56376 20.4908L10.9047 17.8999Z",fill:"#FBBC05"}),(0,m.jsx)("path",{d:"M16.5001 9.97726C17.9682 9.97726 19.2864 10.4818 20.3228 11.4727L23.191 8.60454C21.4591 6.99091 19.1955 6 16.5001 6C12.591 6 9.20917 8.2409 7.56372 11.5091L10.9046 14.1C11.691 11.7364 13.8955 9.97726 16.5001 9.97726Z",fill:"#EA4335"})]});function oI(e){return(0,m.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:26,height:26,viewBox:"0 0 140 140",x:"0px",y:"0px",fill:"none",...e,children:[(0,m.jsxs)("defs",{children:[(0,m.jsxs)("linearGradient",{id:"b",children:[(0,m.jsx)("stop",{offset:"0",stopColor:"#3771c8"}),(0,m.jsx)("stop",{stopColor:"#3771c8",offset:".128"}),(0,m.jsx)("stop",{offset:"1",stopColor:"#60f",stopOpacity:"0"})]}),(0,m.jsxs)("linearGradient",{id:"a",children:[(0,m.jsx)("stop",{offset:"0",stopColor:"#fd5"}),(0,m.jsx)("stop",{offset:".1",stopColor:"#fd5"}),(0,m.jsx)("stop",{offset:".5",stopColor:"#ff543e"}),(0,m.jsx)("stop",{offset:"1",stopColor:"#c837ab"})]}),(0,m.jsx)("radialGradient",{id:"c",cx:"158.429",cy:"578.088",r:"65",xlinkHref:"#a",gradientUnits:"userSpaceOnUse",gradientTransform:"matrix(0 -1.98198 1.8439 0 -1031.402 454.004)",fx:"158.429",fy:"578.088"}),(0,m.jsx)("radialGradient",{id:"d",cx:"147.694",cy:"473.455",r:"65",xlinkHref:"#b",gradientUnits:"userSpaceOnUse",gradientTransform:"matrix(.17394 .86872 -3.5818 .71718 1648.348 -458.493)",fx:"147.694",fy:"473.455"})]}),(0,m.jsx)("path",{fill:"url(#c)",d:"M65.03 0C37.888 0 29.95.028 28.407.156c-5.57.463-9.036 1.34-12.812 3.22-2.91 1.445-5.205 3.12-7.47 5.468C4 13.126 1.5 18.394.595 24.656c-.44 3.04-.568 3.66-.594 19.188-.01 5.176 0 11.988 0 21.125 0 27.12.03 35.05.16 36.59.45 5.42 1.3 8.83 3.1 12.56 3.44 7.14 10.01 12.5 17.75 14.5 2.68.69 5.64 1.07 9.44 1.25 1.61.07 18.02.12 34.44.12 16.42 0 32.84-.02 34.41-.1 4.4-.207 6.955-.55 9.78-1.28 7.79-2.01 14.24-7.29 17.75-14.53 1.765-3.64 2.66-7.18 3.065-12.317.088-1.12.125-18.977.125-36.81 0-17.836-.04-35.66-.128-36.78-.41-5.22-1.305-8.73-3.127-12.44-1.495-3.037-3.155-5.305-5.565-7.624C116.9 4 111.64 1.5 105.372.596 102.335.157 101.73.027 86.19 0H65.03z",transform:"translate(1.
1004 1)"}),(0,m.jsx)("path",{fill:"url(#d)",d:"M65.03 0C37.888 0 29.95.028 28.407.156c-5.57.463-9.036 1.34-12.812 3.22-2.91 1.445-5.205 3.12-7.47 5.468C4 13.126 1.5 18.394.595 24.656c-.44 3.04-.568 3.66-.594 19.188-.01 5.176 0 11.988 0 21.125 0 27.12.03 35.05.16 36.59.45 5.42 1.3 8.83 3.1 12.56 3.44 7.14 10.01 12.5 17.75 14.5 2.68.69 5.64 1.07 9.44 1.25 1.61.07 18.02.12 34.44.12 16.42 0 32.84-.02 34.41-.1 4.4-.207 6.955-.55 9.78-1.28 7.79-2.01 14.24-7.29 17.75-14.53 1.765-3.64 2.66-7.18 3.065-12.317.088-1.12.125-18.977.125-36.81 0-17.836-.04-35.66-.128-36.78-.41-5.22-1.305-8.73-3.127-12.44-1.495-3.037-3.155-5.305-5.565-7.624C116.9 4 111.64 1.5 105.372.596 102.335.157 101.73.027 86.19 0H65.03z",transform:"translate(1.004 1)"}),(0,m.jsx)("path",{fill:"#fff",d:"M66.004 18c-13.036 0-14.672.057-19.792.29-5.11.234-8.598 1.043-11.65 2.23-3.157 1.226-5.835 2.866-8.503 5.535-2.67 2.668-4.31 5.346-5.54 8.502-1.19 3.053-2 6.542-2.23 11.65C18.06 51.327 18 52.964 18 66s.058 14.667.29 19.787c.235 5.11 1.044 8.598 2.23 11.65 1.227 3.157 2.867 5.835 5.536 8.503 2.667 2.67 5.345 4.314 8.5 5.54 3.054 1.187 6.543 1.996 11.652 2.23 5.12.233 6.755.29 19.79.29 13.037 0 14.668-.057 19.788-.29 5.11-.234 8.602-1.043 11.656-2.23 3.156-1.226 5.83-2.87 8.497-5.54 2.67-2.668 4.31-5.346 5.54-8.502 1.18-3.053 1.99-6.542 2.23-11.65.23-5.12.29-6.752.29-19.788 0-13.036-.06-14.672-.29-19.792-.24-5.11-1.05-8.598-2.23-11.65-1.23-3.157-2.87-5.835-5.54-8.503-2.67-2.67-5.34-4.31-8.5-5.535-3.06-1.187-6.55-1.996-11.66-2.23-5.12-.233-6.75-.29-19.79-.29zm-4.306 8.65c1.278-.002 2.704 0 4.306 0 12.816 0 14.335.046 19.396.276 4.68.214 7.22.996 8.912 1.653 2.24.87 3.837 1.91 5.516 3.59 1.68 1.68 2.72 3.28 3.592 5.52.657 1.69 1.44 4.23 1.653 8.91.23 5.06.28 6.58.28 19.39s-.05 14.33-.28 19.39c-.214 4.68-.996 7.22-1.653 8.91-.87 2.24-1.912 3.835-3.592 5.514-1.68 1.68-3.275 2.72-5.516 3.59-1.69.66-4.232 1.44-8.912 1.654-5.06.23-6.58.28-19.396.28-12.817 0-14.336-.05-19.396-.28-4.68-.216-7.22-.998-8.913-1.655-2.24-.87-3.84-1.91-5.52-3.59-1.68-1.68-2.72-3.276-3.592-5.517-.657-1.69-1.44-4.23-1.653-8.91-.23-5.06-.276-6.58-.276-19.398s.046-14.33.276-19.39c.214-4.68.996-7.22 1.653-8.912.87-2.24 1.912-3.84 3.592-5.52 1.68-1.68 3.28-2.72 5.52-3.592 1.692-.66 4.233-1.44 8.913-1.655 4.428-.2 6.144-.26 15.09-.27zm29.928 7.97c-3.18 0-5.76 2.577-5.76 5.758 0 3.18 2.58 5.76 5.76 5.76 3.18 0 5.76-2.58 5.76-5.76 0-3.18-2.58-5.76-5.76-5.76zm-25.622 6.73c-13.613 0-24.65 11.037-24.65 24.65 0 13.613 11.037 24.645 24.65 24.645C79.617 90.645 90.65 79.613 90.65 66S79.616 41.35 66.003 41.35zm0 8.65c8.836 0 16 7.163 16 16 0 8.836-7.164 16-16 16-8.837 0-16-7.164-16-16 0-8.837 7.163-16 16-16z"})]})}function oA(e){return(0,m.jsxs)("svg",{width:"33",height:"32",viewBox:"0 0 33 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...e,children:[(0,m.jsx)("rect",{x:"0.5",width:"32",height:"32",rx:"4",fill:"black"}),(0,m.jsx)("rect",{x:"0.5",width:"32",height:"32",rx:"4",fill:"#06C755"}),(0,m.jsx)("rect",{x:"0.5",width:"32",height:"32",rx:"4",fill:"url(#pattern0_1769_69)"}),(0,m.jsxs)("defs",{children:[(0,m.jsx)("pattern",{id:"pattern0_1769_69",patternContentUnits:"objectBoundingBox",width:"1",height:"1",children:(0,m.jsx)("use",{xlinkHref:"#image0_1769_69",transform:"scale(0.003125)"})}),(0,m.jsx)("image",{id:"image0_1769_69",width:"320",height:"320",preserveAspectRatio:"none",xlinkHref:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAUAAAAFACAYAAADNkKWqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAABpkSURBVHgB7d1fbFTXtcfxdWZs45h7g6lClajoetJIRKIqGKmhTSvF5qEvqUqIitM+XEIikYf+QWlVaF+IACVPBamN0ps8NFL5cx+qmioOVXsf+oCJ1Pg2VMKkKlKRSMZVqlalCiaSHf9hZvesMx5jm/k/58w5Z+/vR3KM8cSAPf55rbX32ccTx/Rf3tO/uNiXWygsDnri5UTMgOd5/UZMTozXX3qU/2vAOl4++K+Y4LUR8V97U5KRyUwxM93bOzc5vWNsWhziicU07GYXeoY9I0P+mzljZJBwA6rzv0emM55MGvEuajD29SyM2xyKVgWgBt7cXO+g8YpP+BXdsASBB6AtfiD63dK4ZzJvzj36i3GxSOoDUENvZq57T0Zkf9EPPM+TfgEQGX9kNFY05s31vYtjaa8OUxuAvRPfGDZSOEroAfHRMDSenF74/C/HJIVSFYDBTG+u53ljzHcJPSBR8hqGfpv8st8m5yUlUhGAWu0VTfF58cweAZB0pzKSPZ6GIEx0AJbbXH+5flgApE3igzCRAdj9+5HBTEZ+TPABVkhsECYqAIMV3fmeo
154/4xMAtklcECYmANf9/9efLxaLx1jcAKyW9zu744uPjp6SBIg9AP05X86f8/2cdhdwSt6vBnfFXQ1mJEZa9RVM4TLhBzgnV5TC+z0TTx2VGMVSAVL1AVjmyWTGZJ+MoxrseAXY84ev7aHqA7DMyKBfDV7onhh5RjqsowHY8we/3C1m3mChA8AaOb8d/XmnW+KOtMC6veXjue43qPoA1KOX1N2zbuHZThy0EHkA6ryvKMULnMMHoAkdWSWOtAXWKzoIPwAt0FXiC1pASYQiqwA1/PyPfoF5H4CWeTLdnZFdMztHJyUCkQQg4QcgNBGGYOgBSPgBCF1EIRhqABJ+ACITQQiGFoA6rNQNzoQfgMiEHIKhrAKXt7oQfgAiZaR/sSBvhLU63HYA6iZntroA6KBgi4xmj7Sp7QCc/bjn54QfgA7L6dVl0qa2AjC4tpcbFQGIgV5a2+61wy0vgujJDXrxsgBAnDLFJxc+/6uW7kvcUgByfS+AxPBXhjMmu6OV64ZbaoGLXuENwg9AIvgrw3rAsrSg6QAM5n5GBgUAEkLngeve/nrTd5NsqgUutb6F9wUAkqaFVripCrA09wOABGqhFW44AEvn9TP3A5BczbbCDbXArPoCSA2/Fe5bt/hgI0fqN1QB+nO/o4QfgFTwW+GZj3sa2iBdtwJk4QNAGnVnZUe9U2PqVoCl6g8A0uV2QX5c7zE1K0CqPwBplhGza+7Rc+PV318D1R+ANDPi1cywqhUg1R8AG9SqAqtWgFR/AGxgvMzz1d5XsQKk+gNgk77exY2V9gVWrAAL3u2qiQkAaTM721Px6pCKAeiZDKc8A7BH1lQs6u4KwJ63v7aHqz4AWMVIf+/E3uG1v31XAHqZ7H4BAMtU2hKzehHkwp7+nt7umwIAtqlwSMKqCrC7t5vZHwA76SEJc6szblUAZjzvCQEAS/mBt3/N23cYwz1+AdjLeDLYf3lPf/nt5QDsnfjGsACAzfw2eG6ua/mmbssBWDAFqj8A1jPGW8665QD0l4OHBAAsZ1ZkXWkbDNtfADikfG1wUAH2rMsOCwA4YvbjnmF9XWqBveygAIAjPDHD+rpr6Y0hI0B7+rvWy4bsehlYtyl4CX4v2ycb/N9XuXWfbOjj5Of/Gby+dXtGpguzcqvgv749G7w9tXDD//WMAG3K6X+CADRGBhu7QzBcpgE30LNJtq3PBQGngVYOu3Lgdcq7s/kgFKfmbwSBWX679JqARG3Gk+362mMBBJUM+OH22L1bZbuGnR9625dCLw3KQXjFf3nroz/L1NyN4NfASroQ4ukG6KIULgicpZWdht1j935GtvflZJv/0t/VJzYph+JFPxDf+ugqlSKkO9u9o6toFvvFq3t7YFhEA09DbvcnHpEhP/j017bTQC+F/Nbl3ysF4lU5/+GloFKEWxYKi4NdpRVglkBspy3t7o2f80Nvp5UVXiu2LVW7B+9/PHhbK8OzN8aDUJxaWoiBvTzxcroIkhNYSVtarfD2bRpOzfwuTisrRK0O3/Qrw1/7L8wPLeWZAW/dxMgFv/4bFlhBK72nNw0ReiHSleZX/v4bOX/zj1SGFvGMvEkAWkBnevvuGwra25UzLoSv3Caf8V+QckYmvZ6Jp97nJkjppC2uLmTsu2+YmV6HaVWoCycvfnCOqjC98gRgCmmlp4N7qr1koCpMLQ3AEZaAU0DbXA2979z/Faq9hNKq8KUPRgnCFCEAE47gSx8WTdKDAEwogi/9NAhLrfFFgjChCMCEIfjsQ2ucXARggujevZMDzxB8liIIk4cATADdzvLC5hFWdR1xZSYvI9dO0hYnAAEYI213Twzsl6f9yg/u0fkg+wjjRQDGROd8RzY/RbvrONrieBGAHabX6r7+0Ldod7EK1WA8CMAOoupDLXpA6+Gp01SDHUQAdgBVH5pBNdg5BGDE9LCCn33621R9aIrOBg9cf5WTqiPGWfgROpl7Rka3HCb80DQ9y/F3W48G26MQHSrACGjLe+7hQ07cawPR0yrwwPXXaIkjQAUYMt3UrD+5CT+EpfycGmjwxvJoHAEYIl3lLT1ROYoe4dLn1LUdP12+gRPCQQCGRGc1OvMDoqTPMeaC4ekStEUvZzs5sD84yADohCN+AG7I9smhqdOC9hCAbdDwY96HOBx84CtBW/zce68FG6jRGlrgFulAmvBDnPTeMPoc1B/EaA0B2ALCD0mhz8F3PvsjVohbRAA2qRx+rPQiKcqbpgnB5hGATSD8kFTlEKQdbg4B2CDCD0lHCDaPAGyAPqH00jbCD0mnM8HRLYcEjSEAG/CzT3+LBQ+khl46p8evoT4CsA7dda9HWgFpohvzuWKkPgKwBn0CHeFJhJTS5y7XDtdGAFahbQThh7TTa4e3M76pigCsoHyEPWCD0YcPs0ewCgKwAra7wCb6XH79oW8K7kYArqEtA+EH2+hIR08twmoE4Aq6csbQGLbSE2Q0CHEHAbhEZyRsG4DtdLbNlSJ3EIBLjmzeS+sL6+lz/Min9gpKCEAptb5Pc6IzHEErfIfzAUjrCxfRCpc4H4C0vnARrXCJ0wGoBxzQ+sJV2gq7fpWI0wF47uHDArjsZM7tvYHOBqAufND6wnW6GOLygoizAcjCB1Di8nXvTgYg1R9wh34vuDoLdzIAqf6A1Vw9+s25AKT6A+7mahXoXABS/QGVuVgFOhWAVH9Adfq94dqKsFMBSPUH1PbCZreuDnEmAPUnG9UfUJtr+wKdCcB9m4YEQH0u3QbWiQDUE1+45hdozL77hpw5KcaJAHzs3q0CoDEafo/9pxvfM13igCRUf1PzN2q+P+75ZL2/n0rLDHX69ozcKszWfMyGbB/n4dVw8IHH5fzNS2I76wNQ2984K8Cp+X/Kl68ebygAdR9WHGF94PqrcvbGeN3H6fFhl7b9qOZjzvgf55W//7ZuAOnXJIprUPXzvfNPPwxCsJ7RLYdrzrvenc0HX7tGPlZU9DkRx+4F/VrrD4g4/+2dYH0LHHf7q2HQSHWlj3npg1HptLc+utpQ+CkNhDM1Hqvh85wfpvo4/XWtF/0zD02dlrAdyp9u+Jv2lX/8tub7v9/Ex4qKPiemb89Kp2n4fXWj/Ysh1gdg3O3vdKHzT964TM3/q6nHv/L33/gB/GcJUzOfbw3iWv5a5/2dMl2IJ4SHHJidWx2AwTCXBZBEG7l2sm4QIR5UgCm3zfHjvtNAW8wD118TJE+pgLB7U7TVAejShs400zb4xRjmn6jP9g7K6gB0/YYvaaLD/rDngWif7XNAawOQ+V/66HacOFY8UZ3tYyRrA5D5X/roVqCRaycEyaGFhM2dlMUBOCBIH22D6+3PQ2dtW58TW1kbgEMb3L3VX9odyp9iHrhEr2TKxXwJ4naLA9DaS+H6s1znmWY6D3znsyf8FqxP0kCDKuwj17T93HffsMRtoOc+sZW1AcgMMN10Hvjce6/K6JZDkgZ6LbetJ45vX/+g2MrKFlh/cqalckB15z98h3lgAmi423pyjpUBSPVnD90fqIcrIF79WTsLCmsrQNhBL5Xb+5cT7A+Mma1FhZUB+F8WD21dpPPAQ1OnBPHZQAucHlSA9tHzA5kHxocWOEW4/aWddB7I0VnxsLUCdOKeILCDzgP1iPok7g/UhRrduxgmrbr03hy6xzBucW/GjoqVA
1UgLbK/g1gF/G5WTA/slSTScG721QDP0xkRp2hCeNnbOALkKJBUOPvCVln5Y6VH6ZyIImyTSwI/rSHwXOHFfYCSTHlhx5FN7pRWHp04zD0TbCEDESqvAVm5cVdofeFKAdhCAiN0Jf57XyqBfFx6iuLUm3GFlAOZpjVJF54DnHm7t0AOdB57/8JIAraACRCLopVatruzqqTHMA6Nl6/2tCUAkhs4DW7kNI7fWjJ5+jm1kZQDq1gGkk57/18o8UE+QZh4YnVsEYHoQgOml88DXH/qmtELngTYenZWEfa20wECHaBvc6jzQplZNfxiczD2TiKtAbC0qrLwU7t3ZKUG66Tzw/M0/pubmSBrav9t6VGxFC5wirAja4fWHvpWIgwAgcsXSU7mtDEBtgzhBOP30WLNW54EIz5WZvNjK2hngXxeoAm2greXB+x8XxOeWpQsgytoAnLT4p5ZrdCGglf2BCIet7a+yNgBtLttdpPNAznmMx1u30rEQ1QprA5CVYLvoPPBnn2YeGAeb99VaeyR+WjfEhv1k25Dts6Zy2v2JncE8MIk3R9I5mY1fO91RYXMLbG0A6kqw7iFL0+xIv4G2XP62hE331CXtCPlW6TzwrY+uJu6b8srM+5F87Y5sHpEX/Je42D5KsvpKkCu0wQHbLhEbffiwM/NAvRNePsYW9Nc3/yg2szoAOSfuDpv2Reo80JaKNumoAFNMqx42RNtp36Zh9gdGzPb5n7I6AHUO+O7s+wI76Xxse19OEA2dtdrO+tNg3qQNtpbOAV2aB3bamRsXxXbWB+D//sv+L6LLdB7Y6q01UZ22v2k5iacd1gdgeTsM7KXbfJgHhsuF9lc5cSAqbbD9dB7I0VnhefGDUXGBEwGobTCrweFI6rytfGvNZv5+/V3/Ibibbn1x5bYSTgSgtsFn/zUucRi6d6vETSsjnZVVsq1voOHKScOl1qqrfqxmAmgo5Kt09NaazcwDd2/8XM33//emYYmbfm1yVb52UflpAi81jIrXMzFixAFxHlmu85SLMc0hNZB2b3ykagAq/Wl/5sZ42x9Hnf/wHXnlH/9X52P1yVf9j/V0RAGjn2/9oVfrHDv9dzzWwA+ns/7nJa4rMfRzvu++4Y7eE0QXP7Zc/o64wpkAVBqAnCsHVKeXTbp0e1Gn7grnwr4moB1JPGknSk4F4K9vXmIxBKhC233X7qntVADqXOiVf/xGANzNla0vKzl3Y3Rd4aIKBFZzsfpTzgUgVSCwmn5PuFj9KecCUFEFAnfowoeL1Z9yMgD1J96hqVMCuE73/b3kaPWnnAxApTMPDkmA61764Jy4zNkAVC86/sWH2/SWEfWuALKd0wGoFaDrTwC4izGQ4wGoDk+dZkEEztFVX1cXPlZyPgB1QeSlv7k7BIZ7XF/4WMn5AFR6ATgLInDFl68eF5QQgEsOXH+VVhjWo/VdjQBcok+K5957VQBb6aovre9qBOAKpcM83ToOCG7QuR+rvncjANd4KWgR/imATfb+5SStbwUE4Bq6KqxDYuaBsIXO/d6dzQvuRgBWwDwQttBLPpn7VUcAVqHzQFePCIIdSnM/d+7v0QoCsAb9ycmiCNJIw680ypkRVEcA1nEof4pN0kgVDT0WPRpDADZg5NpJhshIDZ1f83xtDAHYgNJP1BNsj0Hi6dxaNzyjMQRgg7Sd0JkKIYik0vBjxbc5BGATCEEklS7WEX7NIwCbRAgiabTl1cU6NI8AbAEhiKTQxQ427beOAGxROQRZbUNc9LnHXr/2EIBtKIcgq27oNDY6h4MAbJM+AUeuneCyOXQM4RceAjAkugJHCCJq5fDjKo9wEIAh0hBkcQRR0Znfzj/9kPALEQEYMr1umBBE2FjwiAYBGAH9Cb3l8nc4SQaheOujq4RfRAjACOnmVL3bHNUgWnXmxrgffscIv4gQgBE7GzyBj3OkFpqmi2rPXWeTc5QIwA4o7xdklRiN4mCDzvB6JkaMoGMG1m2Scw8flm19OQEq0dEJ8+POIABjsm/TsLywea8fiJ8UQJU21Z9kXNJBBGCMtBo8snlEnvbDEG5jg3M8CMAE2L4+J6NbDlENOkr3+JVOHCf8Oo1FkAS4MpMP9g2yZcY9Z5Z2CRB+8aACTCDmg25gpTd+BGBC6XxQg/DpTUMEoWV0sUNvWK57RBEvAjDhNAgfu/czVISW0BGH3rOXg3STgQBMEVrjdGOxI3kIwBTa/YmdcvD+x/3KcKsgHXRjMzcuSh4CMMXK+wiH/CCkKkwuruxILgLQEtoe7974iF8dPiJIBuZ9yUcAWqa8aKJXl9Aix0fP8Dtw/X+Y9yUcAWgxwjAe7O9L
1DwLQEf1d6+WrfousQcjMMBocZpA+BKCj9DguDUKtEDUUNSDROra4pBMBiIAGoh7KoGE46L/mvMLGscUlvQhAVKQVYRCKfQMy0PtJ/7WG4gCV4gra8j733qty/sNLgnQiANGUcjDq6/I80cVqkVVeOxCAaJuuNusexIMPPO7E4gotrz0IQITK5uuVdWPzgeuvscprEQIQodOK8OTAM1ZdlaJzPp33cX9eu3AiNEKnc7GRayesqJSCs/v8dlf/PYSffQhAREYP/Uwz3du3808/4CADixGAiIze6yStBwFo6D3y7g9Y5bVclwARmvRDME3bZFjocAsBiEilqYLSqk8PMWDW5w4CEJFKQwBS9bmLAITTqPrcRgDCSVzHC0UAIlK6KTpp2NSMMgIQkUrS6TFUfViLAESkklIBMutDJQQgItWfjbcCZIUXtRCAiFScm6Cp+lAPAYjIbF//oD8D7JNOo+pDowhARGZDtrPhp5VeueoDGkEAIjJ6D5FO4Yh6tIIARGSGNnxGoqZV3+Gp03LmxrgAzfID0MuLmJwAIYt6BZhFDrQpTwWIyES1Aqzt7ot+8LHIgXZ1iTHT4gkQqihWgLXS04qPE5oRBk8rQC/j5Y0xgwKEKOwVYNpdRKHLGLklQMjCWgFmdRdRMV5pBpgXIGS53vbuC6z3Evl+/jRzPkTHeFNdRkyeESDC1moLzLYWdIyRya6erEwuFgQI1a3CbFOPL1/F8VP/hTkfOiHjFae7ZmYW8z293QKESWd3B+9/vO7jCD7Epbf39mTQ/fZMPPU+m6ERtkvbflR1LyB7+RArT6YXvjC6MdgI7Xky6a8G5wQIkd5YfN+mYRm6t3RJ3HRhJgg+DT2qPcTJ8+d/+joIwGLRTHmshCACZ/3FjLMsaCBhjHgX9XVG/+NJcVwAwBVLFWAQgAvzhXEBAEf03bMwrq+DAJRdY9PlRAQAq/lZN73DzzwpB2Dwe3JRAMBy3oqsWw7ArGfGBAAs563IuuUAnJu7PemXgdMCABabe/TcePnXywGoc0DdDygAYCnPyJsr386sfKMocloAwFJ+kbdq1LcqABfnFsdogwHYqrd3sXoA0gYDsJW2v+XtL2WZux4k5rgAgGWMeKfW/l7FK4B73h656b+nXwDAAnoDpPlHRx9c+/uZyo/2XhYAsETR8yruc64YgAtzCz8RALBE1mQqFnWVK8BgMcTjyhAA6efJqblHf5Gv9K5M1f/HFGmDAaRexmSrLuxWDUC9XMQfHI4LAKRVjepPZWr/v2yJAZBetaq/4P213kkVCCC16lR/qmYAqmJRvicAkDL1qr/gMfUesPil0UnDggiANGmg+lN1A1AtzheOcUgCgDTQqz4aqf5UQwEY7AvMsCACIPn8ADzeSPW39NjGrZsYuWBEhgUAEqjaNb/VNFYBLn/w7LO0wgCSys+oXc08vqkA1LKSVhhAIhVNw61vWVMtcBmtMIAk0YOc578wukOa1FQFuPyH0QoDSAid+3km+6S0oKUALJWZxWcFAGLWzKrvWi0FoFr44q/GhGuFAcQpmPuNnpIWtTQDXIl5IIBYeN7Ywhd+2VLrW9ZyBVg2P7f4pCdeXgCgQ3Tu17duoe0xXNsBGFwlIpldhCCATggWPSS7a+0tLlv8WOHo/v3IoL8UfYG7yQGIjJHpjJfd0eqix1rtV4BLSqfGyC62xwCIhJ8tmjFhhZ8KrQIsoxIEELql8NNCS0IUegAqQhBAaCIKPxVJACpCEEDbIgw/FdoMcC39C+uwktVhAK3Q1d4ow2/pz4hW78Q3ckaKF4yYnABAA8pbXcJc8KgksgqwTP8B83MLO8R4YwIAdeidKO/pXdwRdfgt/Vmd0zOx95j/Rx4VAKikaI4vfOncMemQjgag6p0Yecb4IUhLDGCZv9jRlS0+O/v5X3W0U+x4ACqdCxZN4Q3/Tx8UAE7TllfPGO1Ey7tWLAFYRksMOMyv+jwxx+e/eO4nEpNYA1CxSgy4J86qb83fIxmYDQIOSEDVt1JiAlAFs0G5fcz/a+0XAFbxTPHle+4pHAvjGKuwJCoAywhCwB7a7haL8r0or+hoVSIDsIwgBNKrNOfTe3acG5eESnQAlhGEQHp4njem7W6Sg68sFQFYpkFYMIvfzXjZJ1gsARJED0L2zMt9vbd/kqQZXz2pCsCVet7+2h6R7H7/k75HAHSeruh6Mpn0NreW1AZgWf/lPf1zc917isZ7gjAEIrYUekWR0+t7F8fSVO1VkvoAXKt3Yu+w8bw9pihDXGoHhMD4VV5GLnrGjPX23p5Me+itZF0ArqTV4ezH2WHxsoN+mT5kjB+InFAN1ODlS4FnpkyxON53T2HcpsBby+oArKTUMncNFo3p12D0f7wN+J+EnL7PiJcrPYoFFtho6XR2Y6aDX3vB6yl/QTEvRZlc37eYtznsKvk3kqxyUwkTXfIAAAAASUVORK5CYII="})]})]})}function oT(e){return(0,m.jsxs)("svg",{width:"33",height:"32",viewBox:"0 0 33 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,m.jsxs)("g",{"clip-path":"url(#clip0_1715_1956)",children:[(0,m.jsx)("rect",{x:"0.5",width:"32",height:"32",rx:"4",fill:"#0977B6"}),(0,m.jsx)("path",{d:"M9.46878 6.82104C10.6699 6.82104 11.6461 7.79742 11.6461 8.999C11.6461 10.2017 10.6699 11.1782 9.46878 11.1782C8.26447 11.1782 7.28967 10.2017 7.28967 8.999C7.28967 7.79742 8.26447 6.82104 9.46878 6.82104ZM7.58908 12.8309H11.3467V24.9207H7.58908V12.8309Z",fill:"white"}),(0,m.jsx)("path",{d:"M13.7032 12.8309H17.3076V14.4827H17.3576C17.8589 13.5322 19.0846 12.53 20.9127 12.53C24.7175 12.53 25.42 15.0341 25.42 18.2891V24.9207H21.6651V19.0415C21.6651 17.6388 21.6394 15.8355 19.7126 15.8355C17.7573 15.8355 17.4579 17.363 17.4579 18.9399V24.9207H13.7032L13.7032 12.8309Z",fill:"white"})]}),(0,m.jsx)("defs",{children:(0,m.jsx)("clipPath",{id:"clip0_1715_1956",children:(0,m.jsx)("rect",{x:"0.5",width:"32",height:"32",rx:"4",fill:"white"})})})]})}function o_(e){return(0,m.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 496 512",...e,children:[(0,m.jsx)("path",{fill:"#1ed760",d:"M248 8C111.1 8 0 119.1 0 256s111.1 248 248 248 248-111.1 248-248S384.9 8 248 8Z"}),(0,m.jsx)("path",{d:"M406.6 231.1c-5.2 0-8.4-1.3-12.9-3.9-71.2-42.5-198.5-52.7-280.9-29.7-3.6 1-8.1 2.6-12.9 2.6-13.2 0-23.3-10.3-23.3-23.6 0-13.6 8.4-21.3 17.4-23.9 35.2-10.3 74.6-15.2 117.5-15.2 73 0 149.5 15.2 205.4 47.8 7.8 4.5 12.9 10.7 12.9 22.6 0 13.6-11 23.3-23.2 23.3zm-31 76.2c-5.2 0-8.7-2.3-12.3-4.2-62.5-37-155.7-51.9-238.6-29.4-4.8 1.3-7.4 2.6-11.9 2.6-10.7 0-19.4-8.7-19.4-19.4s5.2-17.8 15.5-20.7c27.8-7.8 56.2-13.6 97.8-13.6 64.9 0 127.6 16.1 177 45.5 8.1 4.8 11.3 11 11.3 19.7-.1 10.8-8.5 19.5-19.4 19.5zm-26.9 65.6c-4.2 0-6.8-1.3-10.7-3.6-62.4-37.6-135-39.2-206.7-24.5-3.9 1-9 2.6-11.9 2.6-9.7 0-15.8-7.7-15.8-15.8 0-10.3 6.1-15.2 13.6-16.8 81.9-18.1 165.6-16.5 237 26.2 6.1 3.9 9.7 7.4 9.7 16.5s-7.1 15.4-15.2 15.4z"})]})}function oj(e){return(0,m.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg","shape-rendering":"geometricPrecision","text-rendering":"geometricPrecision","image-rendering":"optimizeQuality","fill-rule":"evenodd","clip-rule":"evenodd",viewBox:"0 0 1000 1000",...e,children:(0,m.jsx)("path",{d:"M906.25 0H93.75C42.19 0 0 42.19 0 93.75v812.49c0 51.57 42.19 93.75 93.75 93.75l812.5.01c51.56 0 93.75-42.19 93.75-93.75V93.75C1000 42.19 957.81 0 906.25 0zM684.02 319.72c-32.42-21.13-55.81-54.96-63.11-94.38-1.57-8.51-2.45-17.28-2.45-26.25H515l-.17 414.65c-1.74 46.43-39.96 83.7-86.8 83.7-14.57 0-28.27-3.63-40.35-9.99-27.68-14.57-46.63-43.58-46.63-76.97 0-47.96 39.02-86.98 86.97-86.98 8.95 0 17.54 1.48 25.66 4.01V421.89c-8.41-1.15-16.95-1.86-25.66-1.86-105.01 0-190.43 85.43-190.43 190.45 0 64.42 32.18 121.44 81.3 155.92 30.93 21.72 68.57 34.51 109.14 34.51 105.01 0 190.43-85.43 190.43-190.43V400.21c40.58 29.12 90.3 46.28 143.95 46.28V343.03c-28.89 0-55.8-8.59-78.39-23.31z"})})}function oP(e){return(0,m.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 2400 2800",...e,children:(0,m.jsxs)("g",{children:[(0,m.jsx)("polygon",{fill:"#FFFFFF",points:"2200,1300 1800,1700 1400,1700 1050,2050 1050,1700 600,1700 600,200 2200,200"}),(0,m.jsx)("g",{children:(0,m.jsxs)("g",{id:"Layer_1-2",children:[(0,m.jsx)("path",{fill:"#9146FF",d:"M500,0L0,500v1800h600v500l500-500h400l900-900V0H500z M2200,1300l-400,400h-400l-350,350v-350H600V200h1600V1300z"}),(0,m.jsx)("rect",{x:"1700",y:"550",width:"200",height:"600",fill:"#9146FF"}),(0,m.jsx)("rect",{x:"1150",y:"550",width:"200",height:"600",fill:"#9146FF"})]})})]})})}let o$=e=>(0,m.jsxs)("svg",{width:"33",height:"32",viewBox:"0 0 33 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,m.jsx)("rect",{x:"0.5",width:"32",height:"32",rx:"4",fill:"black"}),(0,m.jsx)("path",{d:"M8.53901 8L14.7164 16.2153L8.5 22.8947H9.89907L15.3415 17.0468L19.7389 22.8947H24.5L17.975 14.2173L23.7612 8H22.3621L17.3499 13.3858L13.3001 8H8.53901ZM10.5964 9.02501H12.7837L22.4422 21.8695H20.255L10.5964 9.02501Z",fill:"#F7F7F7"})]});function oN(){let e=new URL(window.location.href);e.searchParams.delete("privy_oauth_code"),e.searchParams.delete("privy_oauth_provider"),e.searchParams.delete("privy_oauth_state"),aG.del(ol),window.history.replaceState({},"",e)}let oO=e=>{let{address:t,chainId:n,nonce:r}=e;return"".concat(window.location.host," wants you to sign in with your Ethereum account:\n").concat(t,"\n\nBy signing, you are proving you own this wallet and logging in. This does not initiate a transaction or cost any fees.\n\nURI: ").concat(window.location.origin,"\nVersion: 1\nChain ID: ").concat(n,"\nNonce: ").concat(r,"\nIssued At: ").concat((new Date).toISOString(),"\nResources:\n- https://privy.io")};class oM{get meta(){var e,t,n,r;return{connectorType:null==(e=this.wallet)?void 0:e.connectorType,walletClientType:null==(t=this.wallet)?void 0:t.walletClientType,chainId:null==(n=this.wallet)?void 0:n.chainId,address:null==(r=this.wallet)?void 0:r.address,disableSignup:this._meta.disableSignup}}async authenticate(){if(!this.client)throw new eb.P("SiweFlow has no client instance");try{var e,t,n;if(this.preparedMessage&&this.signature)return await this.client.authenticateWithSiweInternal({message:this.preparedMessage,signature:this.signature,chainId:null==(e=this.wallet)?void 0:e.chainId,walletClientType:null==(t=this.wallet)?void 0:t.walletClientType,connectorType:null==(n=this.wallet)?void 0:n.connectorType,mode:this._meta.disableSignup?"no-signup":"login-or-sign-up"});if(!this.wallet)throw new eb.P("SiweFlow has no wallet instance");let{message:r,signature:i}=await this.sign();return await this.client.authenticateWithSiweInternal({message:r,signature:i,chainId:this.wallet.chainId,walletClientType:this.wallet.walletClientType,connectorType:this.wallet.connectorType,mode:this.meta.disableSignup?"no-signup":"login-or-sign-up"})}catch(e){throw(0,eb.f)(e)}}async link(){if(!this.client)throw new eb.P("SiweFlow has no client instance");try{if(!this.wallet)throw new eb.P("SiweFlow has no wallet instance");let{message:e,signature:t}=await this.sign();return await this.client.linkWithSiweInternal({message:e,signature:t,chainId:this.wallet.chainId,walletClientType:this.wallet.walletClientType,connectorType:this.wallet.connectorType})}catch(e){throw(0,eb.f)(e)}}async sign(){if(!this.client)throw new eb.P("SiweFlow has no client instance");if(await this.buildMessage(),!this.preparedMessage)throw new eb.P("Could not prepare SIWE message");if(!this.wallet)throw new eb.P("SiweFlow has no wallet instance");let e=await this.wallet.sign(this.preparedMessage);return{message:this.preparedMessage,signature:e}}async _getNonceOnce(){if(!this.client)throw new eb.P("SiweFlow has no client instance");if(!this.wallet)throw new eb.P("UI SiweFlow has no wallet instance");return await this.client.generateSiweNonce({address:this.wallet.address,captchaToken:this.captchaToken})}async buildMessage(){if(!this.client)throw new eb.P("SiweFlow has no client instance");if(!this.wallet)throw new eb.P("SiweFlow has no wallet instance");let e=this.wallet.address,t=this.wallet.chainId.replace("eip155:","");return this.nonce||(this.nonce=await this.getNonceOnce.execute()),this.preparedMessage=oO({address:e,chainId:t,nonce:this.nonce}),this.preparedMessage}constructor(e,t,n,r=!1,i){this._meta={disableSignup:!1}
1,this.getNonceOnce=new a1(this._getNonceOnce.bind(this)),this.wallet=t,this.captchaToken=n,this.client=e,this._meta.disableSignup=r,this.preparedMessage=null==i?void 0:i.message,this.signature=null==i?void 0:i.signature}}let oR=e=>{let{address:t,nonce:n}=e;return"".concat(window.location.host," wants you to sign in with your Solana account:\n").concat(t,"\n\n").concat("You are proving you own ".concat(t,"."),"\n\nURI: ").concat(window.location.origin,"\nVersion: 1\nChain ID: mainnet\nNonce: ").concat(n,"\nIssued At: ").concat((new Date).toISOString(),"\nResources:\n- https://privy.io")};class oL{get meta(){var e;return{connectorType:this.wallet.connectorType,walletClientType:this.wallet.walletClientType,disableSignup:this._meta.disableSignup,messageType:this._meta.messageType,address:null==(e=this.wallet)?void 0:e.address}}set messageType(e){this._meta.messageType=e}async authenticate(){if(!this.client)throw new eb.P("SiwsFlow has no client instance");try{let{message:e,signature:t}=await this.sign();return await this.client.authenticateWithSiwsInternal({message:e,signature:t,walletClientType:this.wallet.walletClientType,connectorType:this.wallet.connectorType,mode:this.meta.disableSignup?"no-signup":"login-or-sign-up",messageType:this.meta.messageType})}catch(e){throw(0,eb.f)(e)}}async link(){if(!this.client)throw new eb.P("SiwsFlow has no client instance");try{let{message:e,signature:t}=await this.sign();return await this.client.linkWithSiwsInternal({message:e,signature:t,walletClientType:this.wallet.walletClientType,connectorType:this.wallet.connectorType,messageType:this.meta.messageType})}catch(e){throw(0,eb.f)(e)}}async sign(){let e,t;if(!this.client)throw new eb.P("SiwsFlow has no client instance");await this.buildMessage();let n="transaction"===this.meta.messageType;if(!this.preparedMessage)throw new eb.P("Could not prepare SIWS message");if(!n&&!this.wallet.provider.signMessage||n&&!this.wallet.provider.signTransaction)throw new eb.P("Wallet does not support the necessary signing methods");if(n&&this._plugin){let n=await this.wallet.provider.signTransaction({transaction:F.base64.decode(this.preparedMessage)});e=F.base64.encode(n.signedTransaction),t=this._plugin.getSignatureFromTransaction(n.signedTransaction,this.wallet.address)}else{e=this.preparedMessage;let n=await this.wallet.provider.signMessage({message:(new TextEncoder).encode(this.preparedMessage)});t=F.base64.encode(n.signature)}return{message:e,signature:t}}async _getNonceOnce(){if(!this.client)throw new eb.P("SiwsFlow has no client instance");return await this.client.generateSiwsNonce({address:this.wallet.address,captchaToken:this.captchaToken})}async buildMessage(){if(!this.client)throw new eb.P("SiwsFlow has no client instance");let e=this.wallet.address;return this.nonce||(this.nonce=await this.getNonceOnce.execute()),"transaction"===this.meta.messageType&&this._plugin?this.preparedMessage=this._plugin.createSiwsMemoTransaction({address:e,nonce:this.nonce}):this.preparedMessage=oR({address:e,nonce:this.nonce}),this.preparedMessage}constructor(e,t,n,r=!1,i="plain",a){this._meta={disableSignup:!1,messageType:"plain"},this.getNonceOnce=new a1(this._getNonceOnce.bind(this)),this.wallet=e,this.captchaToken=n,this.client=t,this._meta.disableSignup=r,this._meta.messageType=i,this._plugin=a}}let oD=e=>e.isApexWallet?"Apex Wallet":e.isAvalanche?"Core Wallet":e.isBackpack?"Backpack":e.isBifrost?"Bifrost Wallet":e.isBitKeep?"BitKeep":e.isBitski?"Bitski":e.isBlockWallet?"BlockWallet":e.isBraveWallet?"Brave Wallet":e.isClover?"Clover":e.isCoin98?"Coin98 Wallet":e.isCoinbaseWallet?"Coinbase Wallet":e.isDawn?"Dawn Wallet":e.isDefiant?"Defiant":e.isDesig?"Desig Wallet":e.isEnkrypt?"Enkrypt":e.isExodus?"Exodus":e.isFordefi?"Fordefi":e.isFrame?"Frame":e.isFrontier?"Frontier Wallet":e.isGamestop?"GameStop Wallet":e.isHaqqWallet?"HAQQ Wallet":e.isHyperPay?"HyperPay Wallet":e.isImToken?"ImToken":e.isHaloWallet?"Halo Wallet":e.isKuCoinWallet?"KuCoin Wallet":e.isMathWallet?"MathWallet":e.isNovaWallet?"Nova Wallet":e.isOkxWallet||e.isOKExWallet?"OKX Wallet":e.isOneInchIOSWallet||e.isOneInchAndroidWallet?"1inch Wallet":e.isOneKey?"OneKey Wallet":e.isOpera?"Opera":e.isPhantom||"isPhantom"in e?"Phantom":e.isPortal?"Ripio Portal":e.isRabby?"Rabby Wallet":e.isRainbow?"Rainbow":e.isSafePal?"SafePal Wallet":e.isStatus?"Status":e.isSubWallet?"SubWallet":e.isTalisman?"Talisman":e.isTally||e.isTaho?"Taho":e.isTokenPocket?"TokenPocket":e.isTokenary?"Tokenary":e.isTrust||e.isTrustWallet?"Trust Wallet":e.isTTWallet?"TTWallet":e.isXDEFI?"XDEFI Wallet":e.isZeal?"Zeal":e.isZerion?"Zerion":e.isMetaMask?"MetaMask":void 0,oF=(e,t)=>{if(!e.isMetaMask)return!1;if(e.isMetaMask&&!t)return!0;
1if(e.isBraveWallet&&!e._events&&!e._state||"MetaMask"!==oD(e))return!1;if(e.providers){for(let t of e.providers)if(!oF(t))return!1}return!0},oU=()=>{let e=window;if(!e.ethereum)return!1;if(e.ethereum.isCoinbaseWallet)return!0;if(e.ethereum.providers){for(let t of e.ethereum.providers)if(t&&t.isCoinbaseWallet)return!0}return!1},oB=(e,t,n,r)=>{let i=Number(e),a=t.find(e=>e.id===i);if(!a)throw new eb.x("Unsupported chainId ".concat(e),4901);return(0,U.createPublicClient)({transport:(0,B.http)(oz(a,n,r.appId)),chain:a})},oz=(e,t,n)=>{var r,i,a;let o,s=e.id,l=Number(e.id);if(e.rpcUrls.privyWalletOverride&&e.rpcUrls.privyWalletOverride.http[0])o=e.rpcUrls.privyWalletOverride.http[0];else if(t.rpcUrls&&t.rpcUrls[l])o=t.rpcUrls[l];else if(null==(r=e.rpcUrls.privy)?void 0:r.http[0]){let t=new URL(e.rpcUrls.privy.http[0]);t.searchParams.append("privyAppId",n),o=t.toString()}else o=(null==(i=e.rpcUrls.public)?void 0:i.http[0])?e.rpcUrls.public.http[0]:null==(a=e.rpcUrls.default)?void 0:a.http[0];if(!o)throw new eb.x("No RPC url found for ".concat(s));return o},oW=e=>!!String(e).toLowerCase().match(/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/),oq=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:4,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"ethereum";if(!e)return"";let i=2*("ethereum"===r);return t+n+i+3>=e.length?e:"".concat(e.slice(0,i+t),"...").concat(e.slice(e.length-n,e.length))},oH=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:4;return oq(e,t,n,"solana")},oV=e=>new Promise(t=>setTimeout(t,e)),oG=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.delayMs||150,r=t.maxAttempts||270;return new Promise(async(i,a)=>{let o=!1,s=0;for(;!o&&s<r;){var l;if(null==(l=t.abortSignal)?void 0:l.aborted)return;e().then(e=>{o=!0,i(e)},function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];o=!0,a(...t)}),s+=1,await oV(n)}o||a(Error("Exceeded max attempts before resolving function"))})},oK=e=>"string"==typeof e?e:"0x"+e.toString(16);async function oY(e){let{store:t,walletList:n,externalWalletConfig:r,walletChainType:i,timeout:a=3e3}=e,o=!1,s=window;return new Promise(e=>{function l(){if(o)return;o=!0,window.removeEventListener("ethereum#initialized",l);let a=t.getProviders();console.debug("Detected injected providers:",a.map(e=>e.info));let s=[];for(let e of a)n.includes("coinbase_wallet")&&"com.coinbase.wallet"===e.info.rdns||"solana-only"===i&&"app.phantom"===e.info.rdns||s.push({type:e.info.name.toLowerCase().replace(/\s/g,"_"),eip6963InjectedProvider:e});if("solana-only"!==i)for(let e of function(){var e;let t=window,n=t.ethereum;if(!n)return[];let r=[];if(null==(e=n.providers)?void 0:e.length)for(let e of n.providers)e&&r.push(e);return r.push(t.ethereum),r}
1()){let t=oD(e);if(!a.some(e=>e.info.name===t)){if(oF(e,!0)&&!s.find(e=>"metamask"===e.type)){s.push({type:"metamask",legacyInjectedProvider:e});continue}if("Phantom"===t&&!s.find(e=>"phantom"===e.type)){s.push({type:"phantom",legacyInjectedProvider:e});continue}if("Coinbase Wallet"===t&&!s.find(e=>{var t,n,i;return"coinbase_wallet"===e.type&&"smartWalletOnly"!==(null==(i=r.coinbaseWallet)||null==(n=i.config)||null==(t=n.preference)?void 0:t.options)})){s.push({type:"coinbase_wallet",legacyInjectedProvider:e});continue}s.find(e=>"unknown_browser_extension"===e.type)||s.push({type:"unknown_browser_extension",legacyInjectedProvider:e})}}e(s)}s.ethereum?l():(window.addEventListener("ethereum#initialized",l,{once:!0}),setTimeout(()=>{l()},a))})}function oZ(e){return"eip155:".concat(String(Number(e)))}let oJ=(e,t,n,r)=>{let i=Number(e),a=t.find(e=>e.id===i);if(!a)throw new eb.x("Unsupported chainId ".concat(e),4901);return oz(a,n,r)},oQ=e=>{var t;let n={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},r=null!=(t=e.types.EIP712Domain)?t:Object.entries(e.domain).map(e=>{let[t,r]=e;if(null!=r&&"string"==typeof t&&t in n)return{name:t,type:n[t]}}).filter(e=>void 0!==e);return{...e,types:{...e.types,EIP712Domain:r}}},oX=e=>null==e?void 0:e.map(e=>({signer_id:e.signerId,override_policy_ids:e.policyIds})),o0=(0,f.createContext)({siteKey:"",enabled:!1,appId:void 0,token:void 0,error:void 0,status:"disabled",setToken:R.n,setError:R.n,setExecuting:R.n,waitForResult:()=>Promise.resolve(""),ref:{current:null},remove:R.n,reset:R.n,execute:R.n});class o1 extends eb.aa{constructor(e,t,n){super(e||"Captcha failed"),this.type="Captcha",t instanceof Error&&(this.cause=t),this.privyErrorCode=n}}let o2=e=>{let{children:t,id:n,captchaSiteKey:r,captchaEnabled:i}=e,a=(0,f.useRef)(null),[o,s]=(0,f.useState)(),[l,c]=(0,f.useState)(),[d,u]=(0,f.useState)(!1),h=(0,f.useMemo)(()=>i?d||o||l?!d||o||l?o&&!l?{status:"success",token:o}:l?{status:"error",error:l}:{status:"ready"}:{status:"loading"}:{status:"ready"}:{status:"disabled"},[i,o,l,d]);return(0,m.jsx)(o0.Provider,{value:{...h,ref:a,enabled:i,siteKey:r,appId:n,setToken:s,setError:c,setExecuting:u,remove(){var e;i&&(null==(e=a.current)||e.remove(),u(!1),c(void 0),s(void 0))},reset(){var e;i&&(null==(e=a.current)||e.reset(),u(!1),c(void 0),s(void 0))},execute(){var e;i&&(u(!0),null==(e=a.current)||e.execute())},async waitForResult(){if(!i)return"";try{return await function(e){let{interval:t=100,timeout:n=5e3}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise((r,i)=>{let a,o=0,s=()=>{o>=n?i("Max attempts reached without result"):(a=e(),o+=t,null==a?setTimeout(s,t):r(a))};s()})}(()=>{var e;return null==(e=a.current)?void 0:e.getResponse()},{interval:200,timeout:2e4})}catch(e){throw new o1("Captcha failed",null,eb.h.CAPTCHA_TIMEOUT)}}},children:t})},o3=()=>(0,f.useContext)(o0);class o5{async authenticate(){if(!this.api)throw new eb.P("Auth flow has no API instance");try{return await this.api.post(eb.ad,{captcha_token:this.meta.captchaToken,telegram_auth_result:this.meta.telegramAuthResult,telegram_web_app_data:this.meta.telegramWebAppData,mode:this.meta.disableSignup?"no-signup":"login-or-sign-up"})}catch(e){throw(0,eb.f)(e)}}async link(){if(!this.api)throw new eb.P("Auth flow has no API instance");try{return await this.api.post(eb.ae,{telegram_auth_result:this.meta.telegramAuthResult,telegram_web_app_data:this.meta.telegramWebAppData})}catch(e){throw(0,eb.f)(e)}}constructor(e,t=!1){this.meta={disableSignup:!1},this.meta={captchaToken:e,disableSignup:!1},this.meta.disableSignup=t}}function o4(e){let t={detail:"",retryable:!1};return(null==e?void 0:e.privyErrorCode)===eb.h.LINKED_TO_ANOTHER_USER&&(t.detail="This account has already been linked to another user."),(null==e?void 0:e.privyErrorCode)===eb.h.DISALLOWED_LOGIN_METHOD&&(t.detail="Login with Telegram not allowed."),(null==e?void 0:e.privyErrorCode)===eb.h.INVALID_DATA&&(t.retryable=!0,t.detail="Something went wrong. Try again."),(null==e?void 0:e.privyErrorCode)===eb.h.CANNOT_LINK_MORE_OF_TYPE&&(t.retryable=!0,t.detail="Something went wrong. Try again."),(null==e?void 0:e.privyErrorCode)===eb.h.INVALID_CREDENTIALS&&(t.retryable=!0,t.detail="Something went wrong. Try again."),(null==e?void 0:e.privyErrorCode)===eb.h.TOO_MANY_REQUESTS&&(t.detail="Too many requests. Please wait before trying again."),(null==e?void 0:e.privyErrorCode)===eb.h.TOO_MANY_REQUESTS&&e.message.includes("rate limit")&&(t.detail="Request limit reached for Telegram. Please wait a moment and try again."),e instanceof o1&&(t.retryable=!0,t.detail="Something went wrong. Try again."),t}function o6(){let e;return(e=function(){let e=new URLSearchParams(window.location.search),t=Number(e.get("id")||""),n=e.get("hash"),r=Number(e.get("auth_date")||""),i=e.get("first_name");if(t&&i&&r&&n)return Object.fromEntries(e.entries())}())?(o9(),{flowType:"login-url",authData:e}):(e=function(){let e=window.location.hash;if(!e||!e.startsWith("#tgWebAppData"))return;let t=o8(e.replace("#tgWebAppData=","")),{user:n,auth_date:r,hash:i}=t;return n&&r&&i?t:void 0}())?(o9(),{flowType:"web-app",authData:e}):void 0}function o8(e){return Object.fromEntries(decodeURIComponent(e).split("&").map(e=>e.split("=").map(decodeURIComponent)))}function o9(){let e=new URL(window.location.href);e.searchParams.delete("id"),e.searchParams.delete("hash"),e.searchParams.delete("auth_date"),e.searchParams.delete("first_name"),e.searchParams.delete("last_name"),e.searchParams.delete("username"),e.searchParams.delete("photo_url"),e.hash="",window.history.replaceState({},"",e)}let o7=e=>{if("ethereum"===e.chainType)return{entropyId:e.address,entropyIdVerifier:"ethereum-address-ver
1ifier"};if("solana"===e.chainType)return{entropyId:e.address,entropyIdVerifier:"solana-address-verifier"};throw Error("Failed to get account entropy details")},se=(e,t)=>{if(null==t?void 0:t.imported)return o7(t);let n=(0,g.a)(e);if(!n)throw Error("Failed to find primary wallet");return o7(n)},st=e=>{let{style:t,...n}=e;return(0,m.jsxs)("svg",{viewBox:"0 0 1024 1024",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"28px",width:"28px",...t},...n,children:[(0,m.jsx)("rect",{width:"1024",height:"1024",fill:"#0052FF",rx:100,ry:100}),(0,m.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z",fill:"white"})]})},sn="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PScwIDAgMTAyNCAxMDI0JyBmaWxsPSdub25lJyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHN0eWxlPSdoZWlnaHQ6MjhweDt3aWR0aDoyOHB4Jz48cmVjdCB3aWR0aD0nMTAyNCcgaGVpZ2h0PScxMDI0JyBmaWxsPScjMDA1MkZGJyByeD0nMTAwJyByeT0nMTAwJz48L3JlY3Q+PHBhdGggZmlsbC1ydWxlPSdldmVub2RkJyBjbGlwLXJ1bGU9J2V2ZW5vZGQnIGQ9J00xNTIgNTEyQzE1MiA3MTAuODIzIDMxMy4xNzcgODcyIDUxMiA4NzJDNzEwLjgyMyA4NzIgODcyIDcxMC44MjMgODcyIDUxMkM4NzIgMzEzLjE3NyA3MTAuODIzIDE1MiA1MTIgMTUyQzMxMy4xNzcgMTUyIDE1MiAzMTMuMTc3IDE1MiA1MTJaTTQyMCAzOTZDNDA2Ljc0NSAzOTYgMzk2IDQwNi43NDUgMzk2IDQyMFY2MDRDMzk2IDYxNy4yNTUgNDA2Ljc0NSA2MjggNDIwIDYyOEg2MDRDNjE3LjI1NSA2MjggNjI4IDYxNy4yNTUgNjI4IDYwNFY0MjBDNjI4IDQwNi43NDUgNjE3LjI1NSAzOTYgNjA0IDM5Nkg0MjBaJyBmaWxsPSd3aGl0ZSc+PC9wYXRoPjwvc3ZnPg==",sr="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAALZJREFUaEPtmjEOhDAMBNc/O14GvOzys3CAKK6eAlmaVGl2Zc+kTOU685vkc9/bnD2prZK5/TZY24z9P+g4F5hNh7/GdoG37WlAA5CATwgCxHENYISwQAMQII5rACOEBRqAAHFcAxghLNAABIjjGsAIYYEGIEAc1wBGCAs0AAHiuAYwQligAQgQxzWAEcICDUCAOK4BjBAWaAACxHENYISwQAMQII6fBjr+VHkW3+u+tfyxMpJaDgYzYxb/ALZVAAAAAElFTkSuQmCC";class si extends eb.x{constructor(){super("Wallet timeout"),this.type="wallet_error"}}let sa=e=>e instanceof eb.x?e:(null==e?void 0:e.code)?new ss(e):new eb.x("Unknown connector error",e);class so extends eb.aa{constructor(e,t,n){super(e),this.type="provider_error",this.code=t,this.data=n}}class ss extends so{constructor(e){var t,n,r;super(e.message,e.code,e.data);let i=Object.values(en.ProviderErrors).find(t=>t.eipCode===e.code);this.details=i||en.ProviderErrors.UNKNOWN_ERROR,-32002===e.code&&((null==(t=e.message)?void 0:t.includes("already pending for origin"))?(null==(n=e.message)?void 0:n.includes("wallet_requestPermissions"))?this.details=en.ProviderErrors.E32002_CONNECTION_ALREADY_PENDING:this.details=en.ProviderErrors.E32002_REQUEST_ALREADY_PENDING:(null==(r=e.message)?void 0:r.includes("Already processing"))&&e.message.includes("eth_requestAccounts")&&(this.details=en.ProviderErrors.E32002_WALLET_LOCKED))}}
1let sl={ERROR_USER_EXISTS:{message:"User already exists for this address",detail:"Try another address!",retryable:!1},ERROR_TIMED_OUT:{message:"Wallet request timed out",detail:"Please try connecting again.",retryable:!0},ERROR_WALLET_CONNECTION:{message:"Could not log in with wallet",detail:"Please try connecting again.",retryable:!0},ERROR_USER_LIMIT_REACHED:{message:"Unable to link",detail:"You've reached the maximum number of linked wallets.",retryable:!1},...en.ProviderErrors};function sc(e){return"ethereum"===e.type}function sd(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++){let r=e[n],i=t[n];if((null==r?void 0:r.address)!==(null==i?void 0:i.address)||r&&i&&sc(r)&&sc(i)&&(null==r?void 0:r.chainId)!==(null==i?void 0:i.chainId)||(null==r?void 0:r.connectorType)!==(null==i?void 0:i.connectorType)||(null==r?void 0:r.connectedAt)!==(null==i?void 0:i.connectedAt)||(null==r?void 0:r.walletClientType)!==(null==i?void 0:i.walletClientType)||(null==r?void 0:r.isConnected)!==(null==i?void 0:i.isConnected)||(null==r?void 0:r.linked)!==(null==i?void 0:i.linked))return!1}return!0}class su extends e2.default{constructor(e){super(),this.walletClientType=e,this.connected=!1,this.initialized=!1}}let sh=(e,t)=>e.rpcTimeouts&&e.rpcTimeouts[t]||12e4;function sp(e){return"ethereum"===e.chainType}class sf extends su{buildConnectedWallet(e,t,n,r){let i=async()=>!!this.wallets.find(t=>(0,H.getAddress)(t.address)===(0,H.getAddress)(e));return{type:"ethereum",address:(0,H.getAddress)(e),chainId:t,meta:n,imported:r,switchChain:async n=>{var r,i,a,o,s,l;let c,d,u=null==(r=this.wallets.find(t=>(0,H.getAddress)(t.address)===(0,H.getAddress)(e)))?void 0:r.chainId;if(!u)throw new eb.x("Unable to determine current chainId.");if("number"==typeof n?(c="0x".concat(n.toString(16)),d=n):(c=n,d=Number(n)),u===oZ(c))return;let h=this.chains.find(e=>e.id===d);if(!h)throw new eb.x("Unsupported chainId: ".concat(n));let p=async()=>{await this.proxyProvider.request({method:"wallet_switchEthereumChain",params:[{chainId:c}]})};try{return await p()}catch(e){if(((e,t)=>{switch(t){case"coinbase_wallet":case"base_account":return e.message.includes("addEthereumChain");case"rabby_wallet":return e.message.includes("Unrecognized chain ID");default:var n;return 4902===e.code||(null==(n=e.message)?void 0:n.includes("4902"))}})(e,this.walletClientType))return"rabby_wallet"===this.walletClientType&&await oV(300),await this.proxyProvider.request({method:"wallet_addEthereumChain",params:[{chainId:c,chainName:h.name,nativeCurrency:h.nativeCurrency,rpcUrls:[null!=(s=null==(i=h.rpcUrls.default)?void 0:i.http[0])?s:""],blockExplorerUrls:[null!=(l=null==(a=h.blockExplorers)?void 0:a.default.url)?l:""]}]}),p();if("rainbow"===this.walletClientType&&(null==(o=e.message)?void 0:o.includes("wallet_switchEthereumChain")))throw new eb.x("Rainbow does not support the chainId ".concat(t));throw e}},connectedAt:Date.now(),walletClientType:this.walletClientType,connectorType:this.connectorType,isConnected:i,getEthereumProvider:async()=>{if(!await i())throw new eb.x("Wallet is not currently connected.");return this.proxyProvider},sign:async e=>{if(!await i())throw new eb.x("Wallet is not currently connected.");return await this.sign(e)},disconnect:()=>{this.disconnect()}}}async syncAccounts(e){let t,n=e;try{if(void 0===n){let e=await oG(()=>this.proxyProvider.request({method:"eth_accounts"}),{maxAttempts:10,delayMs:500});console.debug("eth_accounts for ".concat(this.walletClientType,":"),e),Array.isArray(e)&&(n=e)}}catch(e){console.debug("Wallet did not respond to eth_accounts. Defaulting to prefetched accounts.",e)}if(!n||!Array.isArray(n)||n.length<=0||!n[0])return;let r=n[0],i=(0,H.getAddress)(r),a=[];if("privy"===this.walletClientType){let e=aG.get(oh(i));this.chains.find(t=>t.id===Number(e))||(aG.del(oh(i)),e=null),t=e||"0x".concat(this.defaultChain.id.toString(16));try{await this.proxyProvider.request({method:"wallet_switchEthereumChain",params:[{chainId:t}]})}catch(e){console.warn("Unable to switch embedded wallet to chain ID ".concat(t," on initialization"))}}else try{let e=await oG(()=>this.proxyProvider.request({method:"eth_chainId"}),{maxAttempts:10,delayMs:500});if(console.debug("eth_chainId for ".concat(this.walletClientType,":"),e),"string"==typeof e)t=e;else{if("number"!=typeof e)throw Error("Invalid chainId returned from provider");t="0x".concat(e.toString(16))}}catch(e){console.warn("Failed to get chainId from provider, defaulting to 0x1",e),t="0x1"}let o=oZ(t);if(!a.find(e=>(0,H.getAddress)(e.address)===i)){let e={name:this.walletBranding.name,icon:"string"==typeof this.walletBranding.icon?this.walletBranding.icon:void 0,id:this.walletBranding.id};a.push(this.buildConnectedWallet((0,H.getAddress)(r),o,e,"embedded_imported"===this.connectorType))}
1sd(a,this.wallets)||(this.wallets=a,this.emit("walletsUpdated"))}async getConnectedWallet(){let e=await this.proxyProvider.request({method:"eth_accounts"});return this.wallets.sort((e,t)=>t.connectedAt-e.connectedAt).find(t=>e.find(e=>(0,H.getAddress)(e)===(0,H.getAddress)(t.address)))||null}async isConnected(){let e=await this.proxyProvider.request({method:"eth_accounts"});return Array.isArray(e)&&e.length>0}async sign(e){var t;return await this.connect({showPrompt:!1}),this.proxyProvider.request({method:"personal_sign",params:[(0,G.toHex)(e),null==(t=this.wallets[0])?void 0:t.address]})}subscribeListeners(){this.proxyProvider.on("accountsChanged",this.onAccountsChanged),this.proxyProvider.on("chainChanged",this.onChainChanged),this.proxyProvider.on("disconnect",this.onDisconnect),this.proxyProvider.on("connect",this.onConnect)}unsubscribeListeners(){this.proxyProvider.removeListener("accountsChanged",this.onAccountsChanged),this.proxyProvider.removeListener("chainChanged",this.onChainChanged),this.proxyProvider.removeListener("disconnect",this.onDisconnect),this.proxyProvider.removeListener("connect",this.onConnect)}constructor(e,t,n,r){super(e),this.chainType="ethereum",this.onAccountsChanged=e=>{0===e.length?this.onDisconnect():this.syncAccounts(e)},this.onChainChanged=e=>{this.wallets.forEach(t=>{t.chainId=oZ(e),"privy"===this.walletClientType&&aG.put(oh(t.address),e)}),this.emit("walletsUpdated")},this.onDisconnect=()=>{this.connected=!1,this.wallets=[],this.emit("walletsUpdated")},this.onConnect=async()=>{"base_account"===this.connectorType&&this.connected||(this.connected=!0,"coinbase_wallet"===this.connectorType&&await oV(500),this.syncAccounts())},this.wallets=[],this.walletClientType=e,this.chains=t,this.defaultChain=n,this.rpcConfig=r,this.rpcTimeoutDuration=sh(r,e),this.connected=!1,this.initialized=!1}}class sg{on(e,t){if(this.walletProvider)return this.walletProvider.on(e,t);this._subscriptions.push({eventName:e,listener:t})}async request(e){if(!this.walletProvider)throw new eb.x("A wallet request of type ".concat(e.method," was made before setting a wallet provider."));return Promise.race([this.walletProvider.request(e),this.walletTimeout()]).catch(e=>{throw sa(e)})}constructor(e,t){var n=this;this.removeListener=(e,t)=>{if(this.walletProvider)try{return this.walletProvider.removeListener(e,t)}catch(e){console.warn("Unable to remove wallet provider listener")}},this.walletTimeout=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new si,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.rpcTimeoutDuration;return new Promise((n,r)=>setTimeout(()=>{r(e)},t))},this.setWalletProvider=e=>{this.walletProvider&&this._subscriptions.forEach(e=>{this.removeListener(e.eventName,e.listener)}),this.walletProvider=e,this._subscriptions.forEach(e=>{var t;null==(t=this.walletProvider)||t.on(e.eventName,e.listener)})},this.walletProvider=e,this.rpcTimeoutDuration=t||12e4,this._subscriptions=[]}}let sm=e=>{let{...t}=e;return(0,m.jsx)("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:(0,m.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.37126 11.0323C2.37126 12.696 3.90598 13.4421 5.40654 13.4468C8.91753 13.4468 12.8021 11.2897 12.7819 7.67984C12.7673 5.07728 10.3748 2.86167 7.54357 2.88296C4.8495 2.88296 2.21821 4.6411 2.21803 7.03628C2.21803 7.67951 2.58722 8.30178 3.55231 8.37184C2.74763 9.16826 2.37126 10.1225 2.37126 11.0323ZM7.55283 8.68012C8.11562 8.68012 8.57186 8.13217 8.57186 7.45624C8.57186 6.78032 8.11562 6.23237 7.55283 6.23237C6.99003 6.23237 6.53379 6.78032 6.53379 7.45624C6.53379 8.13217 6.99003 8.68012 7.55283 8.68012ZM10.4747 8.68012C11.0375 8.68012 11.4937 8.13217 11.4937 7.45625C11.4937 6.78032 11.0375 6.23237 10.4747 6.23237C9.91186 6.23237 9.45562 6.78032 9.45562 7.45625C9.45562 8.13217 9.91186 8.68012 10.4747 8.68012Z",fill:t.color||"var(--privy-color-foreground-3)"})})};class sy extends sf{get walletBranding(){return{id:this.id,name:this.name,icon:this.icon}}
1async initialize(){this.initialized=!0,this.emit("initialized")}async connect(){throw Error("connect called for an uninstalled wallet via the EthereumNullConnector")}disconnect(){throw Error("disconnect called for an uninstalled wallet via the EthereumNullConnector")}promptConnection(e){throw Error("promptConnection called for an uninstalled wallet via the EthereumNullConnector for ".concat(e))}constructor({id:e,name:t,icon:n,walletClientType:r,defaultChain:i}){super(r,[],i,{}),this.connectorType="null",this.proxyProvider=new sg(void 0,12e4),this.id=e,this.name=t,this.icon=n,this.connectorType=r}}let sv=e=>{let{style:t,...n}=e;return(0,m.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",strokeWidth:1.5,viewBox:"0 0 24 24",style:{...t},...n,children:(0,m.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 17.25v1.007a3 3 0 01-.879 2.122L7.5 21h9l-.621-.621A3 3 0 0115 18.257V17.25m6-12V15a2.25 2.25 0 01-2.25 2.25H5.25A2.25 2.25 0 013 15V5.25m18 0A2.25 2.25 0 0018.75 3H5.25A2.25 2.25 0 003 5.25m18 0V12a2.25 2.25 0 01-2.25 2.25H5.25A2.25 2.25 0 013 12V5.25"})})},sb=e=>{let{...t}=e;return(0,m.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",...t,children:[(0,m.jsx)("rect",{width:"32",height:"32",rx:"6",fill:"#121314"}),(0,m.jsx)("g",{transform:"translate(4, 4)",children:(0,m.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 318.6 318.6",children:[(0,m.jsx)("style",{children:".s1{stroke-linecap:round;stroke-linejoin:round}.s2{fill:#e4761b;stroke:#e4761b}.s3{fill:#f6851b;stroke:#f6851b}"}),(0,m.jsx)("path",{fill:"#e2761b",stroke:"#e2761b",className:"s1",d:"m274.1 35.5-99.5 73.9L193 65.8z"}),(0,m.jsx)("path",{d:"m44.4 35.5 98.7 74.6-17.5-44.3zm193.9 171.3-26.5 40.6 56.7 15.6 16.3-55.3zm-204.4.9L50.1 263l56.7-15.6-26.5-40.6z",className:"s1 s2"}),(0,m.jsx)("path",{d:"m103.6 138.2-15.8 23.9 56.3 2.5-2-60.5zm111.3 0-39-34.8-1.3 61.2 56.2-2.5zM106.8 247.4l33.8-16.5-29.2-22.8zm71.1-16.5 33.9 16.5-4.7-39.3z",className:"s1 s2"}),(0,m.jsx)("path",{fill:"#d7c1b3",stroke:"#d7c1b3",className:"s1",d:"m211.8 247.4-33.9-16.5 2.7 22.1-.3 9.3zm-105 0 31.5 14.9-.2-9.3 2.5-22.1z"}),(0,m.jsx)("path",{fill:"#233447",stroke:"#233447",className:"s1",d:"m138.8 193.5-28.2-8.3 19.9-9.1zm40.9 0 8.3-17.4 20 9.1z"}),(0,m.jsx)("path",{fill:"#cd6116",stroke:"#cd6116",className:"s1",d:"m106.8 247.4 4.8-40.6-31.3.9zM207 206.8l4.8 40.6 26.5-39.7zm23.8-44.7-56.2 2.5 5.2 28.9 8.3-17.4 20 9.1zm-120.2 23.1 20-9.1 8.2 17.4 5.3-28.9-56.3-2.5z"}),(0,m.jsx)("path",{fill:"#e4751f",stroke:"#e4751f",className:"s1",d:"m87.8 162.1 23.6 46-.8-22.9zm120.3 23.1-1 22.9 23.7-46zm-64-20.6-5.3 28.9 6.6 34.1 1.5-44.9zm30.5 0-2.7 18 1.2 45 6.7-34.1z"}),(0,m.jsx)("path",{d:"m179.8 193.5-6.7 34.1 4.8 3.3 29.2-22.8 1-22.9zm-69.2-8.3.8 22.9 29.2 22.8 4.8-3.3-6.6-34.1z",className:"s3"}),(0,m.jsx)("path",{fill:"#c0ad9e",stroke:"#c0ad9e",className:"s1",d:"m180.3 262.3.3-9.3-2.5-2.2h-37.7l-2.3 2.2.2 9.3-31.5-14.9 11 9 22.3 15.5h38.3l22.4-15.5 11-9z"}),(0,m.jsx)("path",{fill:"#161616",stroke:"#161616",className:"s1",d:"m177.9 230.9-4.8-3.3h-27.7l-4.8 3.3-2.5 22.1 2.3-2.2h37.7l2.5 2.2z"}),(0,m.jsx)("path",{fill:"#763d16",stroke:"#763d16",className:"s1",d:"m278.3 114.2 8.5-40.8-12.7-37.9-96.2 71.4 37 31.3 52.3 15.3 11.6-13.5-5-3.6 8-7.3-6.2-4.8 8-6.1zM31.8 73.4l8.5 40.8-5.4 4 8 6.1-6.1 4.8 8 7.3-5 3.6 11.5 13.5 52.3-15.3 37-31.3-96.2-71.4z"}),(0,m.jsx)("path",{d:"m267.2 153.5-52.3-15.3 15.9 23.9-23.7 46 31.2-.4h46.5zm-163.6-15.3-52.3 15.3-17.4 54.2h46.4l31.1.4-23.6-46zm71 26.4 3.3-57.7 15.2-41.1h-67.5l15 41.1 3.5 57.7 1.2 18.2.1 44.8h27.7l.2-44.8z",className:"s3"})]})})]})},sw=e=>{let{style:t,...n}=e;return(0,m.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"108",height:"108",viewBox:"0 0 108 108",fill:"none",style:{height:"28px",width:"28px",...t},...n,children:[(0,m.jsx)("rect",{width:"108",height:"108",rx:"23",fill:"#AB9FF2"}),(0,m.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M46.5267 69.9229C42.0054 76.8509 34.4292 85.6182 24.348 85.6182C19.5824 85.6182 15 83.6563 15 75.1342C15 53.4305 44.6326 19.8327 72.1268 19.8327C87.768 19.8327 94 30.6846 94 43.0079C94 58.8258 83.7355 76.9122 73.5321 76.9122C70.2939 76.9122 68.7053 75.1342 68.7053 72.314C68.7053 71.5783 68.8275 70.7812 69.0719 69.9229C65.5893 75.8699 58.8685 81.3878 52.5754 81.3878C47.993 81.3878 45.6713 78.5063 45.6713 74.4598C45.6713 72.9884 45.9768 71.4556 46.5267 69.9229ZM83.6761 42.5794C83.6761 46.1704 81.5575 47.9658 79.1875 47.9658C76.7816 47.9658 74.6989 46.1704 74.6989 42.5794C74.6989 38.9885 76.7816 37.1931 79.1875 37.1931C81.5575 37.1931 83.6761 38.9885 83.6761 42.5794ZM70.2103 42.5795C70.2103 46.1704 68.0916 47.9658 65.7216 47.9658C63.3157 47.9658 61.233 46.1704 61.233 42.5795C61.233 38.9885 63.3157 37.1931 65.7216 37.1931C68.0916 37.1931 70.2103 38.9885 70.2103 42.5795Z",fill:"#FFFDF8"})]})},sx=["metamask","phantom","brave_wallet","rainbow","uniswap_wallet_extension","uniswap_extension","rabby_wallet","bybit_wallet","ronin_wallet","haha_wallet","crypto.com_wallet_extension","crypto.com_onchain","binance","bitget_wallet","coinbase_wallet","coinbase_smart_wallet","base_account","metamask","trust","safe","rainbow","uniswap","zerion","argent","spot","omni","cryptocom","blockchain","safepal","bitget_wallet","zengo","1inch","binance","exodus","mew_wallet","alphawallet","keyring_pro","mathwallet","unstoppable","obvious","ambire","internet_money_wallet","coin98","abc_wallet","arculus_wallet","haha","cling_wallet","broearn","copiosa","burrito_wallet","enjin_wallet","plasma_wallet","avacus","bee","pitaka","pltwallet","minerva","kryptogo","prema","slingshot","kriptonio","timeless","secux","bitizen","blocto","okx_wallet","safemoon","rabby_wallet","bybit_wallet","ronin_wallet","haha_wallet","privy","unknown","phantom","solflare","glow","backpack","mobile_wallet_adapter"],sC=Object.freeze({phantom:{client:"phantom",name:"Phantom",installLink:eT.isFirefox?"https://addons.mozilla.org/en-US/firefox/addon/phantom-app/":"https://chrome.google.com/webstore/detail/phantom/bfnaelmomeimhlpmgjnjophhpkkoljpa?hl=en",chainTypes:["ethereum","solana"],get isInstalled(){if("phantom"in window){var sE,sk,sS,sI,sA,sT;let e=window;if((null==e||null==(sk=e.phantom)||null==(sE=sk.ethereum)?void 0:sE.isPhantom)&&(null==e||null==(sI=e.phantom)||null==(sS=sI.ethereum)?void 0:sS.chainId)||(null==e||null==(sT=e.phantom)||null==(sA=sT.solana)?void 0:sA.isPhantom))return!0}return!1},getMobileRedirect(e){let{useUniversalLink:t,isSolana:n,connectOnly:r}=e,i=sU({client:this.client,isSolana:n,connectOnly:r});return"".concat(t?"phantom://":"https://phantom.app/ul/","browse/").concat(i,"?ref=").concat(i)}},solflare:{client:"solflare",name:"Solflare",installLink:eT.isFirefox?"https://addons.mozilla.org/es/firefox/addon/solflare-wallet/":"https://chromewebstore.google.com/detail/solflare-wallet/bhhhlbepdkbapadjdnnojkbgioiodbic",chainTypes:["solana"],get isInstalled(){var s_,sj;return"solflare"in window&&!!(null==(sj=window)||null==(s_=sj.solflare)?void 0:s_.isSolflare)},getMobileRedirect(e){let{useUniversalLink:t,isSolana:n,connectOnly:r}=e,i=sU({client:this.client,isSolana:n,connectOnly:r});return"".concat(t?"solflare://ul/v1/":"https://solflare.com/ul/v1/","browse/").concat(i,"?ref=").concat(i)}},backpack:{client:"backpack",name:"Backpack",installLink:"https://chromewebstore.google.com/detail/backpack/aflkmfhebedbjioipglgcb
1cmnbpgliof",chainTypes:["ethereum","solana"],get isInstalled(){var sP,s$,sN,sO,sM,sR;return!(!("backpack"in window)||!(null==(sN=window)||null==(s$=sN.backpack)||null==(sP=s$.ethereum)?void 0:sP.isBackpack)&&!(null==(sR=window)||null==(sM=sR.backpack)||null==(sO=sM.solana)?void 0:sO.isBackpack))},getMobileRedirect(e){let{useUniversalLink:t,isSolana:n,connectOnly:r}=e,i=sU({client:this.client,isSolana:n,connectOnly:r});return"".concat(t?"backpack://ul/v1/":"https://backpack.app/ul/v1/","browse/").concat(i,"?ref=").concat(i)}},okx_wallet:{client:"okx_wallet",name:"OKX Wallet",installLink:"https://chromewebstore.google.com/detail/okx-wallet/mcohilncbfahbmgdjkbpemcciiolgcge",chainTypes:["solana"],get isInstalled(){var sL,sD;return"okxwallet"in window&&!!(null==(sD=window)||null==(sL=sD.okxwallet)?void 0:sL.isOkxWallet)},getMobileRedirect(e){let{isSolana:t,connectOnly:n}=e;return"https://www.okx.com/download?deeplink="+encodeURIComponent("okx://wallet/dapp/url?dappUrl="+sU({client:this.client,isSolana:t,connectOnly:n}))}}});function sF(e){let{connectorType:t,walletClientType:n}=e;for(let e of sx)if(t===e||n===e)return sC[e]}function sU(e){let{client:t,isSolana:n,connectOnly:r}=e,i=new URL(window.location.href);return i.searchParams.set("privy_connector",n?"solana_adapter":"injected"),i.searchParams.set("privy_wallet_client",t),i.searchParams.set("privy_connect_only",String(r)),encodeURIComponent(i.href.replace(/\/$/g,""))}let sB=()=>{let e=aG.get(op);return e&&Array.isArray(e)&&e.map(e=>(e=>e&&"string"==typeof e.address&&"string"==typeof e.connectorType&&"string"==typeof e.walletClientType&&"number"==typeof e.connectedAt)(e)).every(Boolean)?e:[]},sz=["phantom","glow","solflare","backpack","okx_wallet","walletconnect","mobile_wallet_adapter"];function sW(e){return e.toLowerCase().split(" ").join("_")}class sq extends su{get isInstalled(){return!0}get wallet(){return this._wallet}buildConnectedWallet(){return this._wallet.accounts.map(e=>({type:"solana",provider:new er.ConnectedStandardSolanaWallet({wallet:this._wallet,account:e}),address:e.address,connectedAt:Date.now(),walletClientType:this._wallet.name,connectorType:this.connectorType,imported:!1,meta:{name:this._wallet.name,id:this._wallet.name,icon:this._wallet.icon},isConnected:async()=>this._wallet.accounts.length>0,disconnect:()=>{this.disconnect()}}))}async syncAccounts(){this.wallets=this.buildConnectedWallet(),this.emit("walletsUpdated")}get walletBranding(){return{id:this.wallet.name,name:this.wallet.name,icon:this.wallet.icon}}async initialize(){var e;this.subscribeListeners(),await this.syncAccounts(),this.shouldAttemptAutoConnect()&&await (null==(e=this.wallet.features["standard:connect"])?void 0:e.connect({silent:!0}).catch(()=>{})),this.initialized=!0,this.emit("initialized")}async connect(e){return e.showPrompt&&await this.promptConnection(),await this.isConnected()?this.getConnectedWallet():null}async getConnectedWallet(){return this.wallets.sort((e,t)=>t.connectedAt-e.connectedAt)[0]||null}async isConnected(){return this._wallet.accounts.length>0}subscribeListeners(){var e;this._unsubscribeListeners=null==(e=this.wallet.features["standard:events"])?void 0:e.on("change",this.onChange)}unsubscribeListeners(){var e;null==(e=this._unsubscribeListeners)||e.call(this)}shouldAttemptAutoConnect(){return!(!this.autoConnectEnabled||!sz.includes(this.walletClientType))&&("phantom"!==this.walletClientType||sB().some(e=>{let{walletClientType:t}=e;return"phantom"===t}))}constructor(e,t){super(sW(e.name)),this.chainType="solana",this.connectorType="solana_adapter",this.disconnect=()=>{var e;null==(e=this.wallet.features["standard:disconnect"])||e.disconnect().catch(e=>console.error("Error disconnecting",e))},this.promptConnection=async()=>{try{var e;await (null==(e=this.wallet.features["standard:connect"])?void 0:e.connect())}catch(e){throw sa(e)}},this.onChange=()=>{this.syncAccounts()},this._wallet=e,this.autoConnectEnabled=t,this.wallets=[]}}class sH extends sq{get walletBranding(){return{id:this.id,name:this.name,icon:this.icon}}
1async initialize(){this.initialized=!0,this.emit("initialized")}async connect(){throw Error("connect called for an uninstalled wallet via the SolanaNullConnector")}constructor({id:e,name:t,icon:n}){super({name:t},!1),this.connectorType="null",this.proxyProvider=new sg(void 0,12e4),this.disconnect=async()=>{throw Error("disconnect called for an uninstalled wallet via the SolanaNullConnector")},this.promptConnection=async()=>{throw Error("promptConnection called for an uninstalled wallet via the SolanaNullConnector")},this.id=e,this.name=t,this.icon=n}}function sV(e){return"solana"===e.chainType}function sG(e){return"solana"===e.type}let sK=(0,e3.create)(()=>({listings:[]})),sY=sK.setState,sZ=e=>{let t;try{t=new URL(e).hostname}catch(e){return}return sK.getState().listings.find(e=>{let n,{homepage:r}=e;try{n=new URL(r).hostname}catch(e){return!1}return t.includes(n)})},sJ=e=>sK(t=>{let{listings:n}=t;return n.find(t=>{let{slug:n}=t;return sQ(n)===sQ(e)})});function sQ(e){return"cryptocom"===e?"cryptocom-defi":"binance"===e?"binance-defi":e.replace(/[-_]wallet$/,"")}let sX={appearance:{landingHeader:"Log in or sign up",theme:"light",walletList:["detected_ethereum_wallets","detected_solana_wallets","metamask","coinbase_wallet","rainbow","base_account","wallet_connect"]},walletConnectCloudProjectId:"34357d3c125c2bcf2ce2bc3309d98715",captchaEnabled:!1,_render:{standalone:!1},fundingMethodConfig:{moonpay:{useSandbox:!1}}},s0=new Set(["coinbase_wallet","base_account","cryptocom","metamask","okx_wallet","phantom","rainbow","uniswap","zerion","universal_profile","bybit_wallet","ronin_wallet","haha_wallet","wallet_connect","wallet_connect_qr","detected_solana_wallets","detected_ethereum_wallets","rabby_wallet","safe","solflare","backpack","binance","binanceus","bitget_wallet"]),s1=e=>s0.has(e),s2=(e,t,n)=>n.indexOf(e)===t;function s3(e,t){let n=Math.max(0,Math.min(1,e.toHsl().l+t));return(0,ew.default)({...e.toHsl(),l:n})}function s5(e,t){let n=e.getLuminance(),r=t.getLuminance();return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}let s4={background:{default:"#020713",elevated:"#1A2230","default-hover":"#101724","default-clicked":"#1A2230","default-disabled":"#020713",success:"#0E3E2D",warning:"#373827",error:"#2E0C18",interactive:"#8B86FF","error-hover":"#441821","interactive-hover":"#7B73E5","interactive-clicked":"#6560CC","interactive-disabled":"#141824",info:"#1F2937","info-hover":"#141824"},icon:{default:"#F8F8F8",muted:"#9BA2AE",subtle:"#7B8491",inverse:"#020713",success:"#88E3B5",warning:"#FDF27B",error:"#EF4444",interactive:"#88B6FF","default-hover":"#F8F8F8","muted-hover":"#AEB3BD","subtle-hover":"#8B939E","default-clicked":"#F8F8F8","muted-clicked":"#9097A5","subtle-clicked":"#78818E","default-disabled":"#404452","muted-disabled":"#404452","subtle-disabled":"#404452","error-hover":"#F05555","interactive-hover":"#7B73E5","error-clicked":"#
1EF4444","interactive-clicked":"#6560CC"},text:{default:"#F8F8F8",muted:"#9BA2AE",placeholder:"#7B8491",success:"#ACEECB",warning:"#FEF9A0",error:"#FCA5A5",interactive:"#A29EFF","default-disabled":"#404452","interactive-hover":"#8C88E5"},border:{default:"#1F2937",interactive:"#88B0FF",focused:"#F8F8FC",info:"#5B83D3",success:"#317056",warning:"#FBBF24",error:"#F87171","default-hover":"#34304A","interactive-hover":"#88B0FF"}},s6={background:{default:"#FFFFFF",elevated:"#F1F2F9","default-hover":"#F8F9FC","default-clicked":"#F1F2F9","default-disabled":"#FFFFFF",success:"#DCFCE7",warning:"#FEF3C7",error:"#FEE2E2",interactive:"#5B4FFF","error-hover":"#FECACA","interactive-hover":"#4F46E5","interactive-clicked":"#4338CA","interactive-disabled":"#F1F2F9",info:"#E0E7FF","info-hover":"#EEF2FF"},icon:{default:"#110F2A",muted:"#64668B",subtle:"#9498B8",inverse:"#FFFFFF",success:"#33B287",warning:"#F59E0B",error:"#EF4444",interactive:"#564FFF","default-hover":"#1D1B35","muted-hover":"#64668B","subtle-hover":"#888AAE","default-clicked":"#060C23","muted-clicked":"#64668B","subtle-clicked":"#788804","default-disabled":"#CBCDE1","muted-disabled":"#CBCDE1","subtle-disabled":"#CBCDE1","error-hover":"#F06060","interactive-hover":"#4F46E5","error-clicked":"#DC3838","interactive-clicked":"#2BA482"},text:{default:"#040217",muted:"#64668B",placeholder:"#9498B8",success:"#135638",warning:"#906218",error:"#991B1B",interactive:"#5B4FFF","default-disabled":"#CBCDE1","interactive-hover":"#5B4FFF"},border:{default:"#E2E3F0",interactive:"#5B4FFF",focused:"#949DF9",info:"#F1F2F9",success:"#87D7B7",warning:"#FACD63",error:"#F69393","default-hover":"#E2E3F0","interactive-hover":"#5B4FFF"}};function s8(e,t,n,r,i){var a,o,s,l,c,d,u,h,f,g,m,y,b,w,x,C,E,k,S,I,A,T,_,j,P,$,N,O,M,R,L,D,F,U,B,z,W,q,H,V,G,K,Y,Z,J,Q,X,ee,et,en,er,eo,es,el,ec,ed,eu,eh,ep,ef,eg,em,ey,ev,eb,ex,eC,eE,ek,eS,eI,eA,eT,e_,ej,eP,e$,eN,eO,eM,eR,eL,eD,eF,eU,eB,ez,eW,eq,eH,eV,eG,eK,eY,eZ,eJ,eQ,eX,e0,e1,e2,e3,e5;let e4,e6,e8,e9,e7,te,tt,tn,tr,ti,ta,to,ts,tl,tc,td,tu,th=n?console.warn:()=>{};(null==t?void 0:t.loginMethods)?(e4=t.loginMethods.includes("email"),e6=t.loginMethods.includes("sms"),e9=t.loginMethods.includes("wallet"),e7=t.loginMethods.includes("google"),te=t.loginMethods.includes("twitter"),tt=t.loginMethods.includes("discord"),ta=t.loginMethods.includes("spotify"),to=t.loginMethods.includes("instagram"),tn=t.loginMethods.includes("tiktok"),tr=t.loginMethods.includes("line"),ti=t.loginMethods.includes("twitch"),tl=t.loginMethods.includes("github"),ts=t.loginMethods.includes("linkedin"),tc=t.loginMethods.includes("apple"),td=t.loginMethods.includes("farcaster"),tu=t.loginMethods.includes("telegram"),e8=t.loginMethods.includes("passkey")):(e4=e.email_auth,e6=e.sms_auth,e9=e.wallet_auth||e.solana_wallet_auth,e7=e.google_oauth,te=e.twitter_oauth,tt=e.discord_oauth,tl=e.github_oauth,ta=e.spotify_oauth,to=e.instagram_oauth,tn=e.tiktok_oauth,tr=e.line_oauth,ti=e.twitch_oauth,ts=e.linkedin_oauth,tc=e.apple_oauth,td=e.farcaster_auth,tu=e.telegram_auth,e8=e.passkey_auth),e.passkey_auth&&(e8=!0),"undefined"!=typeof window&&"function"!=typeof window.PublicKeyCredential&&(e8=!1);let tp=[e4,e6].filter(Boolean),tf=[e7,te,tt,tl,ta,to,tn,tr,ts,tc,td,tu].filter(
1Boolean),tg=[e9].filter(Boolean),tm=null!=(ey=null==t||null==(a=t.loginMethods)?void 0:a.includes("passkey"))&&ey,ty=null!=(ev=e.passkeys_for_signup_enabled)&&ev,tv=[e8&&(ty||tm)].filter(Boolean);if(tp.length+tf.length+tg.length+tv.length===0)throw Error("You must enable at least one login method");let tb=void 0!==(null==t||null==(o=t.appearance)?void 0:o.showWalletLoginFirst)?null==t||null==(s=t.appearance)?void 0:s.showWalletLoginFirst:e.show_wallet_login_first;tb&&0===tg.length?(th("You should only enable `showWalletLoginFirst` when `wallet` logins are also enabled. `showWalletLoginFirst` has been set to false"),tb=!1):tb||tf.length+tp.length!==0||(th("You should only disable `showWalletLoginFirst` when `email`, `sms`, or social logins are also enabled. `showWalletLoginFirst` has been set to true"),tb=!0);let tw=null==(eb=null==t||null==(c=t.externalWallets)||null==(l=c.walletConnect)?void 0:l.enabled)||eb;(null==t?void 0:t.loginMethods)&&t.loginMethodsAndOrder&&th("You should only configure one of `loginMethods` or `loginMethodsAndOrder`");let tx=(e=>{var t;let{input:n,overrides:r}=e;return r?r.primary.concat(null!=(t=r.overflow)?t:[]).filter(s1).filter(s2):n?n.filter(s1).filter(s2):sX.appearance.walletList})({input:null==t||null==(d=t.appearance)?void 0:d.walletList,overrides:null==t?void 0:t.loginMethodsAndOrder}),tC=(e=>{var t;let{input:n}=e;if(!n||!n.primary[0])return;let r=[n.primary[0]],i=[];for(let e of(n.primary.length>4&&console.warn("You should not specify greater than 4 login methods in `loginMethodsAndOrder.primary`"),n.primary.slice(1)))r.includes(e)?console.warn("Duplicated login method: ".concat(e)):r.push(e);for(let e of null!=(t=n.overflow)?t:[])r.includes(e)||i.includes(e)?console.warn("Duplicated login method: ".concat(e)):i.push(e);return{primary:r,overflow:i}})({input:null==t?void 0:t.loginMethodsAndOrder}),tE=null!=(ex=null==t||null==(u=t.intl)?void 0:u.defaultCountry)?ex:"US",{chains:tk,defaultChain:tS}=function(e){let t,{supportedChains:n,defaultChainFromConfig:r}=e;if(n){if(0===n.length)throw Error("`supportedChains` must contain at least one chain");t=(0,ei.dedupeSupportedChains)(n)}else t=[...ea.DEFAULT_SUPPORTED_CHAINS];let i=n?t[0]:p.mainnet,a=null!=r?r:i;if(!t.find(e=>e.id===a.id))throw Error("`defaultChain` must be included in `supportedChains`");return{chains:t,defaultChain:a}}({supportedChains:null==t?void 0:t.supportedChains,defaultChainFromConfig:null==t?void 0:t.defaultChain}),tI=!!(null==t?void 0:t.defaultChain),tA=(null==t||null==(h=t.customAuth)?void 0:h.getCustomAccessToken)&&!1!==(null==t||null==(f=t.customAuth)?void 0:f.enabled),tT=tA?"all-users":e.embedded_wallet_config.ethereum.create_on_login,t_=e.embedded_wallet_config.solana.create_on_login;!e.solana_wallet_auth||(null==t||null==(m=t.externalWallets)||null==(g=m.solana)?void 0:g.connectors)||console.warn("App configuration has Solana wallet login enabled, but no Solana wallet connectors have been passed to Privy. Make sure to pass Solana connectors to the `config.externalWallets.solana.connectors` field of the `PrivyProvider`");let tj=e.telegram_auth_config?{botId:e.telegram_auth_config.bot_id,botName:e.telegram_auth_config.bot_name,linkEnabled:e.telegram_auth_config.link_enabled,seamlessAuthEnabled:e.telegram_auth_config.seamless_auth_enabled}:void 0,tP=e.funding_config?{methods:e.funding_config.methods,options:e.funding_config.options,defaultRecommendedAmount:e.funding_config.default_recommended_amount,defaultRecommendedCurrency:e.funding_config.default_recommended_currency,promptFundingOnWalletCreation:e.funding_config.prompt_funding_on_wallet_creation,crossChainBridgingEnabled:e.funding_config.cross_chain_bridging_enabled}:void 0;return{id:e.id,appClientId:i,name:e.name,allowlistConfig:{errorTitle:e.allowlist_config.error_title,errorDetail:e.allowlist_config.error_detail,errorCtaText:e.allowlist_config.cta_text,errorCtaLink:e.allowlist_config.cta_link},legacyWalletUiConfig:e.legacy_wallet_ui_config,appearance:{logo:null!=(eE=null!=(eC=null==t||null==(y=t.appearance)?void 0:y.logo)?eC:e.logo_url)?eE:void 0,landingHeader:null!=(ek=null==t||null==(b=t.appearance)?void 0:b.landingHeader)?ek:sX.appearance.landingHeader,loginMessage:"string"==typeof(null==t||null==(w=t.appearance)?void 0:w.loginMessage)?null==t||null==(x=t.appearance)?void 0:x.loginMessage.slice(0,100):null==t||null==(C=t.a
1ppearance)?void 0:C.loginMessage,footerLogo:null==t||null==(E=t.appearance)?void 0:E.footerLogo,palette:function(e){let t,n,r,i,a,o,s,{backgroundTheme:l,accentHex:c}=e;"light"===l?o=!1:"dark"===l?o=!0:(o=.5>=(0,ew.default)(l).getLuminance(),s=(0,ew.default)(l).toHslString());let d=o?"dark":"light",u=o?s4:s6,{accent:h,accentLight:p,accentHover:f,accentDark:g,accentDarkest:m}=function(e,t){if(!e){let e=t?s4:s6;return{accent:(0,ew.default)(e.background.interactive),accentLight:(0,ew.default)(e.background.interactive),accentHover:(0,ew.default)(e.background["interactive-hover"]),accentDark:(0,ew.default)(e.background["interactive-clicked"]),accentDarkest:(0,ew.default)(e.background["interactive-disabled"])}}let n=(0,ew.default)(e);return{accent:n,accentLight:s3(n,.15),accentHover:s3(n,.3),accentDark:s3(n,-.06),accentDarkest:s3(n,-.6)}}(c,o),y=(t=(0,ew.default)(s6.text.default),n=(0,ew.default)(s4.text.default),r=s5(h,t),i=s5(h,n),(a=h.toHsl()).h>=220&&a.h<=300&&i>=3?s4.text.default:r>i?s6.text.default:s4.text.default),b=(0,ew.default)(y),w=s5(h,(0,ew.default)(u.background.default))>=3;return{colorScheme:d,background:s||u.background.default,background2:u.background.elevated,background3:u.background.interactive,foreground:u.text.default,foreground2:u.text.muted,foreground3:u.text.placeholder,foreground4:u.border.default,accent:h.toHslString(),accentLight:p.toHslString(),accentHover:f.toHslString(),accentDark:g.toHslString(),accentDarkest:m.toHslString(),foregroundAccent:b.toHslString(),success:u.background.success,successDark:u.text.success,successLight:u.background.success,error:u.text.error,errorLight:u.background.error,warn:u.background.warning,warnLight:u.background.warning,warningDark:u.text.warning,errorDark:u.text.error,successBg:u.background.success,errorBg:u.background.error,errorBgHover:u.background["error-hover"],warnBg:u.background.warning,infoBg:u.background.info,infoBgHover:u.background["info-hover"],borderDefault:u.border.default,borderHover:u.border["default-hover"],borderFocus:u.border.focused,borderError:u.border.error,borderSuccess:u.border.success,borderWarning:u.border.warning,borderInfo:u.border.info,borderInteractive:u.border.interactive,borderInteractiveHover:u.border["interactive-hover"],backgroundHover:u.background["default-hover"],backgroundClicked:u.background["default-clicked"],backgroundDisabled:u.background["default-disabled"],backgroundInteractive:u.background.interactive,backgroundInteractiveHover:u.background["interactive-hover"],backgroundInteractiveClicked:u.background["interactive-clicked"],backgroundInteractiveDisabled:u.background["interactive-disabled"],foregroundHover:u.text.default,foregroundClicked:u.text.default,foregroundDisabled:u.text["default-disabled"],foregroundInteractive:u.text.interactive,foregroundInteractiveHover:u.text["interactive-hover"],accentHasGoodContrast:w?"1":"0",linkNavigationColor:w?h.toHslString():u.text.default,linkNavigationDecoration:w?"none":"underline",iconDefault:u.icon.default,iconMuted:u.icon.muted,iconSubtle:u.icon.subtle,iconInverse:u.icon.inverse,iconSuccess:u.icon.success,iconWarning:u.icon.warning,iconError:u.icon.error,iconInteractive:u.icon.interactive,iconDefaultHover:u.icon["default-hover"],iconMutedHover:u.icon["muted-hover"],iconSubtleHover:u.icon["subtle-hover"],iconDefaultClicked:u.icon["default-clicked"],iconMutedClicked:u.icon["muted-clicked"],iconSubtleClicked:u.icon["subtle-clicked"],iconDefaultDisabled:u.icon["default-disabled"],iconMutedDisabled:u.icon["muted-disabled"],iconSubtleDisabled:u.icon["subtle-disabled"],iconErrorHover:u.icon["error-hover"],iconInteractiveHover:u.icon["interactive-hover"],iconErrorClicked:u.icon["error-clicked"],iconInteractiveClicked:u.icon["interactive-clicked"],iconMutedDisabledAlt:u.icon["muted-disabled"],iconSubtleDisabledAlt:u.icon["subtle-disabled"]}}({backgroundTheme:null!=(eS=null==t||null==(k=t.appearance)?void 0:k.theme)?eS:sX.appearance.theme,accentHex:null!=(eI=null==t||null==(S=t.appearance)?void 0:S.accentColor)?eI:e.accent_color}),loginGroupPriority:tb?"web3-first":"web2-first",hideDirectWeb2Inputs:!!(null==t||null==(I=t.appearance)?void 0:I.hideDirectWeb2Inputs),walletList:tx,walletChainType:null!=(e_=null==t||null==(A=t.appearance)?void 0:A.walletChainType)?e_:(e=>{let{evmWalletAuth:t,solanaWalletAuth:n}=e;return t&&n?"ethereum-and-solana":t?"ethereum-only":n?"solana-only":"ethereum-only"})({evmWalletAuth:null!=(eA=e.wallet_auth)&&eA,solanaWalletAuth:null!=(eT=e.solana_wallet_auth)&&eT})},loginMethods:{wallet:e9,email:e4,sms:e6,passkey:e8,google:e7,twitter:te,discord:tt,github:tl,spotify:ta,instagram:to,tiktok:tn,line:tr,twitch:ti,linkedin:ts,apple:tc,farcaster:td,telegram:tu},customOAuthProviders:(null!=(ej=e.custom_oauth_providers)?ej:[]).filter(e=>!1!==e.enabled),disablePlusEmails:e.disable_plus_emails,loginMethodsAndOrder:tC,legal:{termsAndConditionsUrl:null!=(eP=null==t||null==(T=t.legal)?void 0:T.termsAndConditionsUrl)?eP:e.terms_and_conditions_url,privacyPolicyUrl:null!=(e$=null==t||null==(_=t.legal)?void 0:_.privacyPolicyUrl)?e$:e.privacy_policy_url,requireUsersAcceptTerms:null!=(eN=e.require_users_accept_terms)&&eN},walletConnectCloudProjectId:null!=(eM=null!=(eO=null==t?void 0:t.walletConnectCloudProjectId)?eO:e.wallet_connect_cloud_project_id)?eM:sX.walletConnectCloudProjectId,rpcConfig:{rpcUrls:{},rpcTimeouts:null!=(eR=null==t||null==(j=t.externalWallets)?void 0:j.signatureRequestTimeouts)?eR:{}},chains:tk,defaultChain:tS,intl:{defaultCountry:tE},shouldEnforceDefaultChainOnConnect:tI,captchaEnabled:null!=(eL=e.captcha_enabled)?eL:sX.captchaEnabled,captchaSiteKey:e.captcha_site_key,externalWallets:{coinbaseWallet:{config:{appName:e.n
1ame,appLogoUrl:e.logo_url,preference:{options:"all",...null==t||null==(N=t.externalWallets)||null==($=N.coinbaseWallet)||null==(P=$.config)?void 0:P.preference},...null==t||null==(M=t.externalWallets)||null==(O=M.coinbaseWallet)?void 0:O.config}},baseAccount:{config:{appName:e.name,appLogoUrl:e.logo_url,...null==t||null==(L=t.externalWallets)||null==(R=L.baseAccount)?void 0:R.config,preference:{...null==t||null==(U=t.externalWallets)||null==(F=U.baseAccount)||null==(D=F.config)?void 0:D.preference,telemetry:!1}}},walletConnect:{enabled:tw},solana:{connectors:null==t||null==(z=t.externalWallets)||null==(B=z.solana)?void 0:B.connectors},disableAllExternalWallets:null!=(eD=null==t||null==(W=t.externalWallets)?void 0:W.disableAllExternalWallets)&&eD},embeddedWallets:{requireUserOwnedRecoveryOnCreate:!tA&&null!=(eF=e.embedded_wallet_config.require_user_owned_recovery_on_create)&&eF,userOwnedRecoveryOptions:tA?["user-passcode"]:e.embedded_wallet_config.user_owned_recovery_options,priceDisplay:null!=(eU=null==t||null==(q=t.embeddedWallets)?void 0:q.priceDisplay)?eU:{primary:"fiat-currency",secondary:"native-token"},ethereum:{createOnLogin:null!=(eB=null==t||null==(V=t.embeddedWallets)||null==(H=V.ethereum)?void 0:H.createOnLogin)?eB:tT},solana:{createOnLogin:null!=(ez=null==t||null==(K=t.embeddedWallets)||null==(G=K.solana)?void 0:G.createOnLogin)?ez:t_},disableAutomaticMigration:null!=(eW=null==t||null==(Y=t.embeddedWallets)?void 0:Y.disableAutomaticMigration)&&eW,mode:e.embedded_wallet_config.mode,showWalletUIs:null==(eH=null!=(eq=null==t||null==(Z=t.embeddedWallets)?void 0:Z.showWalletUIs)?eq:e.enforce_wallet_uis)||eH,extendedCalldataDecoding:null!=(eV=null==t||null==(J=t.embeddedWallets)?void 0:J.extendedCalldataDecoding)&&eV,transactionScanning:{enabled:null!=(eG=null==t||null==(X=t.embeddedWallets)||null==(Q=X.transactionScanning)?void 0:Q.enabled)&&eG,domain:null!=(eY=null!=(eK=null==t||null==(et=t.embeddedWallets)||null==(ee=et.transactionScanning)?void 0:ee.domain)?eK:r)?eY:"https://auth.privy.io"}},mfa:{methods:null!=(eZ=e.mfa_methods)?eZ:[],noPromptOnMfaRequired:null!=(eJ=null==t||null==(en=t.mfa)?void 0:en.noPromptOnMfaRequired)&&eJ},passkeys:{shouldUnlinkOnUnenrollMfa:null==t||null==(er=t.passkeys)?void 0:er.shouldUnlinkOnUnenrollMfa,shouldUnenrollMfaOnUnlink:null==t||null==(eo=t.passkeys)?void 0:eo.shouldUnenrollMfaOnUnlink,registration:null==t||null==(es=t.passkeys)?void 0:es.registration},customAuth:tA?{enabled:!0,...t.customAuth}:void 0,loginConfig:{telegramAuthConfiguration:tj,passkeysForSignupEnabled:e.passkeys_for_signup_enabled},headless:!!(null==t?void 0:t.headless),render:{standalone:null!=(eQ=null==t||null==(el=t._render)?void 0:el.standalone)?eQ:sX._render.standalone},fundingConfig:tP,fundingMethodConfig:{...null!=(eX=null==t?void 0:t.fundingMethodConfig)?eX:sX.fundingMethodConfig,moonpay:{...null!=(e0=null==t||null==(ec=t.fundingMethodConfig)?void 0:ec.moonpay)?e0:sX.fundingMethodConfig.moonpay,useSandbox:null!=(e1=null==t||null==(ed=t.fundingMethodConfig)?void 0:ed.moonpay.useSandbox)?e1:sX.fundingMethodConfig.moonpay.useSandbox}},whatsAppEnabled:!!e.whatsapp_enabled,customOAuthRedirectUrl:null==t?void 0:t.customOAuthRedirectUrl,solanaRpcs:{"solana:mainnet":null!=(e2=null==t||null==(eh=t.solana)||null==(eu=eh.rpcs)?void 0:eu["solana:mainnet"])?e2:null,"solana:devnet":null!=(e3=null==t||null==(ef=t.solana)||null==(ep=ef.rpcs)?void 0:ep["solana:devnet"])?e3:null,"solana:testnet":null!=(e5=null==t||null==(em=t.solana)||null==(eg=em.rpcs)?void 0:eg["solana:testnet"])?e5:null}}}let s9={show_wallet_login_first:!0,allowlist_config:{error_title:null,error_detail:null,cta_text:null,cta_link:null},wallet_auth:!0,email_auth:!0,sms_auth:!1,google_oauth:!1,twitter_oauth:!1,discord_oauth:!1,github_oauth:!1,linkedin_oauth:!1,apple_oauth:!1,disable_plus_emails:!1,terms_and_conditions_url:null,privacy_policy_url:null,embedded_wallet_config:{create_on_login:"off",ethereum:{create_on_login:"off"},solana:{create_on_login:"off"},require_user_owned_recovery_on_create:!1,user_owned_recovery_options:["user-passcode"],mode:"user-controlled-server-wallets-only"},captcha_enabled:!1,captcha_site_key:"",enforce_wallet_uis:!1,legacy_wallet_ui_config:!1,id:"",name:"",passkeys_for_signup_enabled:!1,whatsapp_enabled:!1},s7=(0,f.createContext)({appConfig:s8(s9,void 0,!1),isServerConfigLoaded:!1}),le=e=>{let{children:t,client:n,legacyClient:r,clientConfig:i,appClientId:a}=e,[o,s]=(0,f.useState)(null),l=(0,f.useMemo)(()=>s8(null!=o?o:s9,i,!!o,"undefined"!=typeof window?window.location.origin:void 0,a),[o,i,a]);return(0,f.useEffect)(()=>
1{if(!o)return;let e=function(e){var t,n;if(!e)return{};let{appearance:r,supportedChains:i,defaultChain:a,externalWallets:o,...s}=e;return{...s,...i?{supportedChains:i.map(e=>e.id)}:void 0,...a?{defaultChain:a.id}:void 0,...o?{walletConnect:o.walletConnect?{enabled:o.walletConnect.enabled}:void 0,coinbaseWallet:o.coinbaseWallet,solana:{connectors:null==(n=o.solana)||null==(t=n.connectors)?void 0:t.get().map(e=>e.walletClientType)}}:void 0}}(i),t=(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=0xdeadbeef^t,r=0x41c6ce57^t;for(let t,i=0;i<e.length;i++)n=Math.imul(n^(t=e.charCodeAt(i)),0x9e3779b1),r=Math.imul(r^t,0x5f356495);return n=Math.imul(n^n>>>16,0x85ebca6b)^Math.imul(r^r>>>13,0xc2b2ae35),0x100000000*(2097151&(r=Math.imul(r^r>>>16,0x85ebca6b)^Math.imul(n^n>>>13,0xc2b2ae35)))+(n>>>0)})(JSON.stringify(e)).toString(),n="privy:sent:".concat(o.id,":").concat(t);localStorage.getItem(n)||(r.createAnalyticsEvent({eventName:"sdk_initialize",payload:e}),localStorage.setItem(n,"t"))},[i,o]),(0,f.useEffect)(()=>{o||(async()=>{try{await n.initialize();let e=n.app.getConfig();e.custom_api_url&&r.updateApiUrl(e.custom_api_url),s(e)}catch(e){console.warn("Error generating app config: ",e)}})()},[]),(0,m.jsx)(s7.Provider,{value:{appConfig:l,isServerConfigLoaded:!!o},children:t})},lt=()=>{let{appConfig:e}=(0,f.useContext)(s7);return e},ln=()=>{let{isServerConfigLoaded:e}=(0,f.useContext)(s7);return e},lr=e=>{let{style:t,...n}=e,r=lt();return(0,m.jsxs)("svg",{width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"28px",width:"28px",...t},...n,children:[(0,m.jsx)("rect",{width:"28",height:"28",rx:"3",fill:"dark"===(null==r?void 0:r.appearance.palette.colorScheme)?"#3396ff":"#141414"}),(0,m.jsx)("g",{clipPath:"url(#clip0_1765_9946)",children:(0,m.jsx)("path",{d:"M8.09448 10.3941C11.3558 7.20196 16.6442 7.20196 19.9055 10.3941L20.2982 10.7782C20.3369 10.8157 20.3677 10.8606 20.3887 10.9102C20.4097 10.9599 20.4206 11.0132 20.4206 11.0671C20.4206 11.121 20.4097 11.1744 20.3887 11.224C20.3677 11.2737 20.3369 11.3186 20.2982 11.3561L18.9554 12.6702C18.9158 12.7086 18.8628 12.7301 18.8077 12.7301C18.7526 12.7301 18.6996 12.7086 18.66 12.6702L18.1198 12.1415C15.8448 9.91503 12.1557 9.91503 9.88015 12.1415L9.30167 12.7075C9.26207 12.7459 9.20909 12.7673 9.15395 12.7673C9.0988 12.7673 9.04582 12.7459 9.00622 12.7075L7.66346 11.3934C7.62475 11.3559 7.59397 11.3109 7.57295 11.2613C7.55193 11.2117 7.5411 11.1583 7.5411 11.1044C7.5411 11.0505 7.55193 10.9971 7.57295 10.9475C7.59397 10.8979 7.62475 10.8529 7.66346 10.8154L8.09448 10.3941ZM22.6829 13.1115L23.8776 14.2814C23.9163 14.319 23.9471 14.3639 23.9681 14.4135C23.9892 14.4632 24 14.5165 24 14.5704C24 14.6243 23.9892 14.6777 23.9681 14.7273C23.9471 14.777 23.9163 14.8219 23.8776 14.8594L18.4893 20.1332C18.4102 20.2101 18.3042 20.2531 18.1938 20.2531C18.0835 20.2531 17.9775 20.2101 17.8984 20.1332L14.0743 16.3901C14.0545 16.3708 14.0279 16.36 14.0003 16.36C13.9726 16.36 13.9461 16.3708 13.9263 16.3901L10.1021 20.1332C10.023 20.2101 9.91703 20.2531 9.8067 20.2531C9.69636 20.2531 9.59038 20.2101 9.51124 20.1332L4.12236 14.8594C4.08365 14.8219 4.05287 14.777 4.03185 14.7273C4.01083 14.6777 4 14.6243 4 14.5704C4 14.5165 4.01083 14.4632 4.03185 14.4135C4.05287 14.3639 4.08365 14.319 4.12236 14.2814L5.31767 13.1115C5.39678 13.0348 5.50265 12.9919 5.61285 12.9919C5.72305 12.9919 5.82892 13.0348 5.90803 13.1115L9.73216 16.8546C9.75194 16.874 9.7785 16.8848 9.80616 16.8848C9.83381 16.8848 9.86037 16.874 9.88015 16.8546L13.7043 13.1115C13.7834 13.0346 13.8894 12.9916 13.9997 12.9916C14.1101 12.9916 14.216 13.0346 14.2952 13.1115L18.1198 16.8546C18.1396 16.874 18.1662 16.8848 18.1938 16.8848C18.2215 16.8848 18.2481 16.874 18.2678 16.8546L22.092 13.1115C22.1711 13.0346 22.2771 12.9916 22.3874 12.9916C22.4977 12.9916 22.6037 13.0346 22.6829 13.1115Z",fill:"white"})}),(0,m.jsx)("defs",{children:(0,m.jsx)("clipPath",{id:"clip0_1765_9946",children:(0,m.jsx)("rect",{width:"20",height:"12.2531",fill:"white",transform:"translate(4 8)"})})})]})},li="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAIGNIUk0AAHomAACAhAAA+gAAAIDoAAB1MAAA6mAAADqYAAAXcJy6UTwAAAAGYktHRAD/AP8A/6C9p5MAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAHdElNRQfoDAIVODUC+w+GAAAGsUlEQVRYw6WXbYwWVxXHf+fOLAtCXYS2QJdIaClipGCTknXXNqBQMVHbfmhItH4Aral+IAEaG03UxJgYKQJGTUxtDWjaxDSNtcZqIGDwpRuW1oYiVqpdpZSlpC3qysu+PHPP3w/3mXnmeXZbPzjJZO7cefn/z/mfe865xlscq3dGDIguGiHLaMQVLja4s87FShcLo5jtApdddnHexUmHIy475JmdUkPRAQMu7gzT4ljnxJpdk0QPmMFkyAKN2OfOFpc2uuh1J3MZDrjAvXmVEQUuoosRxw642FcEG7IoDxiFxNiu8NYE+vcUYIFYRKKs113bXWx2Z34CoQZsVHOiCZ7mopdzdsFhv8NexEgRDHMxUSNREbh1bwNZwBsFblmfu/a4a6AEENYO5i3AOoEWeEUCF4MOOxBDMQAOk99OJALA2u80sBCwWGBZWG/yRwMaCAbBIAsQTJT3gea1OWfNeaPzvjoHEI85rA8ObtB1v7cIdJkIHgkh9AXpocy0LJjIKvB2wPpZB0v3wkrw5jdNEjeYeMhFX3BAyfn2ke9NUrgB9LrrcZcGJFCld4fWNddXbvbWfWzGR6xJFZsBGh0cBh3bBIxIEGTQ3W0h4NuDaSAzyAxCmGq11Vzf5uaa1aG8p+WFtrEYQGwvjICJkAEqvC+YNmcmMlMNvEaCdrcbyUvQAWDTjVuESHObM6cPGWHmzDwLaEtmzG9Z3qF1zUpXmuuZBb1z4bqeNC6f0WE1NtUTwHzEloiy3BvFisy0sYoLlQtT6XW15md2Qf9SY+2Ngfdca/TMSm/9ewz+/Boc/It45h/i4kSTsKw90SQJsPTvjSZbkWemDW7qTRZ0JEYJWSKxZJ7xmf6M224MzMzbX1s8F1YugjtvMg6eErt/4/z1jUrz1rXUKxnZC2zIg2mdBTK1mFUOKC1fOt/48kdz
1VixIz86Nij+eEacvpJWyZJ5xy7th8VzjjpuMJfMCW58QL73ekXPVlhsyE+vyzFiplJyauEIyrGIquruMq7qTxk+dcB495rzyTzFepCUWLIFv/kBg081Gd55WUk1IDGFTS89K++TDYxddzKnWcbluHd450xgdh7EGrOo1rr868PMTzqWJRGZ2d8oB/xpL33Xnxl2rjeNn4blXRXduzJ4B5y+28kWscAwXl+yeR654FFZPHoUb710YuPeDOUdPO48di1xptKpeEeHqOcYXNwQKGd88EDk3mqxtxPSfGRlsXRtYt8z4ytPOH/7eqpg1Aso7fYKgK4NPrMpYvsC4/poMA34yVJIQC3sCD9yecdsNyaV5yPj6ryJnR1PAvSNP4J+/1cgDfLbfePaMGGtM7Qdyl12WmKOmXgKKAp54vmBRTxfLrjE+tSYjBPjRM5FrrzIeuD2jf2lLzw8vN4JlfPVp581LsO1DgXv7jSzAiXPw/d+JiYLpjsu26Yfjf5O0rF5WoxsNT9G/bX0XKxakmPjlSee6HlizJJXSX7/oRDc+vjKR+f2wODcKd78/gR8/C9uedF44myJxmhh4OY/ipMQyqaWxmjn95TfEroMFOzbkvG+RceeqViPx1Aln1yEnOow1AnffHCpJAJ5/Vex4UvzptZRdY/O/1dJIS/NkcNmR6MTYah6qzseA4TfFtw4UvHBW1bc/O+7sPhwZHYf/jMODh5yfPudVbXj2TAJ/8XxrOZagNamj4Ei2/GNfuyRxh8t6BG2l15up+MIVODEiFr8rcPS0+O6RBF6mrrEGHHtFzOo2Lo7Dl37hvPQ6mNV6R9JYKgnYWcE37K5HlE2OT/5A0udaPUBHH+BQOMzuNsYLuDyZflTW+fTcmJFDHhJhaZqewMuewXDxcDR9IYyPN6Jj+6K4MF2vV8qBtZJScqVRNi6lpGONVJis5mpKi1WbgwsY+zIsBpcR8mzIZfuTRVZrtdu9odrptR/Xx5XONXJqBmCN0P6YMUQq9WJiwt0Je102WHdbpxSqydMObBWYdwDWLVcqcIMYe3NPjg0Ht84od0Ajju1w2XCr9e6QoqM9V23ZtnmI6cfAMMb9AY0YEHdb6oobEh4y3H3Ize6LsmGvN5IdUnhttdQ9UVrfLk/ljWEZ9wXsqAdQk1EA+O22GcgdZTke/bAs3OPY4HSdcB20HhvVtTMu0jmI8ekAhz2IICj2hKpNqI60NcuIRUHEej1quzubXa2tmZhenrfZmv3YYQ9ipDAIgvHptmblccuDjdRcmjFpWbDi/9ycZjZkRbk5jYztai/AUwiUx+qdEQB/m+25i9lxyvbcjrg45Lmd0uT/3p7/Fw6ODf+WO019AAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDI0LTEyLTAyVDIxOjU2OjQ4KzAwOjAwMVpslgAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyNC0xMi0wMlQyMTo1Njo0OCswMDowMEAH1CoAAAAodEVYdGRhdGU6dGltZXN0YW1wADIwMjQtMTItMDJUMjE6NTY6NTMrMDA6MDDZv6GRAAAAAElFTkSuQmCC";class la extends sf{async initialize(){var e,t,n,r,i;let a=await this.createProvider();this.provider=a,this.proxyProvider.setWalletProvider(a),this.subscribeListeners(),a.session&&((null==(t=this.walletProvider)||null==(e=t.session)?void 0:e.peer.metadata.url)&&(this.walletEntry=sZ(null==(r=this.walletProvider)||null==(n=r.session)?void 0:n.peer.metadata.url),this.walletClientType=(null==(i=this.walletEntry)?void 0:i.slug)||"unknown"),this.connected=!0,await this.syncAccounts()),this.initialized=!0,this.emit("initialized")}async connect(e){return e.showPrompt&&await this.promptConnection(),this.getConnectedWallet()}async isConnected(){var e;return!!(null==(e=this.walletProvider)?void 0:e.connected)}get walletBranding(){var e,t,n,r,i,a,o;let s=null==(n=this.walletProvider)||null==(t=n.session)||null==(e=t.peer.metadata.icons)?void 0:e[0];return{name:((null==(i=this.walletProvider)||null==(r=i.session)?void 0:r.peer.metadata.name)||"").replace(/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g,"")||"WalletConnect",icon:"string"==typeof s?s:li,id:(null==(o=this.walletProvider)||null==(a=o.session)?void 0:a.peer.metadata.name.toLowerCase())||"wallet_connect_v2"}}async resetConnection(e){this.walletProvider&&this.walletProvider.connected&&(await this.walletProvider.disconnect(),this.walletProvider.signer.session=void 0,this.walletClientType=e,this.redirectUri=void 0,this.fallbackUniversalRedirectUri=void 0,function(){try{localStorage.removeItem(aZ)}catch(e){}}(),this.onDisconnect())}async promptConnection(){if(this.provider)return new Promise((e,t)=>{(async()=>{var t,n,r,i,a,o;let s="",l=await Promise.race([null==(t=this.walletProvider)?void 0:t.enable(),this.proxyProvider.walletTimeout()]);if((null==l?void 0:l.length)&&(s=l[0]),!s||""===s)throw new eb.x("Unable to retrieve address");(null==(r=this.walletProvider)||null==(n=r.session)?void 0:n.peer.metadata.url)&&(this.walletEntry=sZ(null==(a=this.walletProvider)||null==(i=a.session)?void 0:i.peer.metadata.url),this.walletClientType=(null==(o=this.walletEntry)?void 0:o.slug)||"unknown",this.proxyProvider.rpcTimeoutDuration=sh(this.rpcConfig,this.walletClientType)),this.connected=!0,await this.syncAccounts(l),e()})().catch(e=>{t(e?sa(e):new eb.x("Unknown error during connection"))})})}disconnect(){var e;null==(e=this.walletProvider)||e.disconnect().then(()=>this.onDisconnect()).catch(()=>console.warn("Unable to disconnect WalletConnect provider"))}get walletProvider(){return this.proxyProvider.walletProvider}setWalletProvider(e){this.proxyProvider.setWalletProvider(e)}async createProvider(){let e={};for(let t of this.chains){let n=oJ(t.id,this.chains,this.rpcConfig,this.privyAppId);n&&(e[t.id]=n)}let t=this.shouldEnforceDefaultChainOnConnect?[this.defaultChain.id]:[],n=this.chains.map(e=>e.id),r=await e5.EthereumProvider.init({projectId:this.walletConnectCloudProjectId,chains:t,optionalChains:n,optionalEvents:e5.OPTIONAL_EVENTS,optionalMethods:e5.OPTIONAL_METHODS,rpcMap:e,showQrModal:!1,metadata:{description:this.privyAppName,name:this.privyAppName,url:window.location.origin,icons:[]}});return r.on("display_uri",e=>{if(r.signer.abortPairingAttempt(),function(){try{localStorage.removeItem(aZ)}catch(e){}}(),!this.showPrivyQrModal)throw new eb.x("WalletConnect modal not available - Privy handles wallet connections through its own UI");if(eT.isMobile&&this.walletEntry){var t;let{redirect:n,href:r}=function(e,t){let n=aK(t);if(n.deepLink)return aQ(n.deepLink,e);if(n.universalLink)return aX(n.universalLink,e);throw new eb.P("Unsupported wallet ".concat(t.id))}(e,this.walletEntry);a0(n,"_self"),function(e){let{href:t,name:n}=e;try{localStorage.setItem(aZ,JSON.stringify({href:t,name:n}))}catch(e){}}({href:r,name:(null==(t=this.walletEntry.metadata)?void 0:t.shortName)||this.walletEntry.name});let i=aY(e,this.walletEntry);return this.redirectUri=n,this.fallbackUniversalRedirectUri=null==i?void 0:i.redirect,this.showPrivyQrModal({native:n,universal:n})}if(this.redirectUri=void 0,this.walletEntry){let t=aY(e,this.walletEntry);this.fallbackUniversalRedirectUri=null==t?void 0:t.redirect}this.showPrivyQrModal({native:e,universal:void 0})}),r.on("connect",()=>{var e,t,n;(null==(e=r.session)?void 0:e.peer.metadata.url)&&(this.walletEntry=sZ(null==(t=r.session)?void 0:t.peer.metadata.url),this.walletClientType=(null==(n=this.walletEntry)?void 0:n.slug)||"unknown")}),r}async enableProvider(){var e,t;return(null==(e=this.walletProvider)?void 0:e.connected)?Promise.resolve(this.walletProvider.accounts):await (null==(t=this.walletProvider)?void 0:t.enable())}setWalletEntry(e,t){this.walletEntry=e,this.showPrivyQrModal=t}constructor({walletConnectCloudProjectId:e,rpcConfig:t,chains:n,defaultChain:r,shouldEnforceDefaultChainOnConnect:i,privyAppId:a,privyAppName:o,walletClientType:s}){super(s||"unknown",n,r,t),this.connectorType="wallet_connect_v2",this.privyAppId=a,this.privyAppName=o,this.walletConnectCloudProjectId=e,this.rpcConfig=t,this.shouldEnforceDefaultChainOnConnect=i,this.proxyProvider=new sg(void 0,this.rpcTimeoutDuration),s&&(this.walletEntry=sK.getState().listings.find(e=>{let{slug:t}=e;return sQ(t)===sQ(s)}),this.walletClientType=s)}}function lo(e){let{src:t,...n}=e;return(0,m.jsx)("img",{src:t,...n,style:{display:"none"}})}let ls=(0,f.createContext)({currentScreen:null,lastScreen:null,navigate:R.n,navigateBack:R.n,resetNavigation:R.n,setModalData:R.n,onUserCloseViaDialogOrKeybindRef:void 0}),ll=e=>{var t;let n=lt(),r=e.authenticated,[i,a]=(0,f.useState)(e.initialScreen);(0,f.useEffect)(()=>{r||!e.initialScreen||e.initialScreen.isUnauthenticatedScreem||e.setInitialScreen(null)},[r]);let o=(0,f.useRef)(null);(0,f.useEffect)(()=>{e.open||(o.current=null)},[e.open]),(0,f.useEffect)(()=>{o.current=null},[e.initialScreen]);let s={data:e.data,setModalData:e.setModalData,currentScreen:e.initialScreen,lastScreen:i,navigate:function(t){let n=!(arguments.length>1)||void 0===arguments[1]||arguments[1];e.setInitialScreen(t),n&&a(e.initialScreen)},navigateBack:()=>{e.setInitialScreen(i)},resetNavigation:()=>{e.setInitialScreen(null),a(null)},onUserCloseViaDialogOrKeybindRef:o};return(0,m.jsxs)(ls.Provider,{value:s,children:[("string"==typeof n.appearance.logo||"img"===(null==(t=n.appearance.logo)?void 0:t.type))&&(0,m.jsx)(lo,{src:"string"==typeof n.appearance.logo?n.appearance.logo:n.appearance.logo.props.src}),e.children]})},lc=()=>(0,f.useContext)(ls),ld={login:{onComplete:[],onError:[]},logout:{onSuccess:[]},connectWallet:{onSuccess:[],onError:[]}
1,connectOrCreateWallet:{onSuccess:[],onError:[]},createWallet:{onSuccess:[],onError:[]},linkAccount:{onSuccess:[],onError:[]},update:{onSuccess:[],onError:[]},configureMfa:{onMfaRequired:[]},setWalletPassword:{onSuccess:[],onError:[]},setWalletRecovery:{onSuccess:[],onError:[]},signMessage:{onSuccess:[],onError:[]},signTypedData:{onSuccess:[],onError:[]},sendTransaction:{onSuccess:[],onError:[]},signTransaction:{onSuccess:[],onError:[]},accessToken:{onAccessTokenGranted:[],onAccessTokenRemoved:[]},oAuthAuthorization:{onOAuthTokenGrant:[]},fundWallet:{onUserExited:[]},fundSolanaWallet:{onUserExited:[]},customAuth:{onAuthenticated:[],onUnauthenticated:[]}},lu=(0,f.createContext)(void 0),lh=()=>(0,f.useContext)(lu);function lp(e,t){if(!t)return;let n=lh().current[e];return(0,f.useEffect)(()=>{var r;for(let[i,a]of Object.entries(t))Object.prototype.hasOwnProperty.call(n,i)||console.warn('Invalid event type "'.concat(i,'" for action "').concat(e,'"')),null==(r=n[i])||r.push(a);return()=>{var r;for(let[i,a]of Object.entries(t))Object.prototype.hasOwnProperty.call(n,i)||console.warn('Invalid event type "'.concat(i,'" for action "').concat(e,'"')),n[i]=null==(r=n[i])?void 0:r.filter(e=>e!==a)}},[t])}function lf(e,t,n){for(var r=arguments.length,i=Array(r>3?r-3:0),a=3;a<r;a++)i[a-3]=arguments[a];for(let r of e.current[t][n])r(...i)}function lg(){let e=lh();return function(t,n){for(var r=arguments.length,i=Array(r>2?r-2:0),a=2;a<r;a++)i[a-2]=arguments[a];return lf(e,t,n,...i)}}let lm=L.styled.div.withConfig({displayName:"Grow",componentId:"sc-681ff332-0"})(["text-align:left;flex-grow:1;"]),ly=L.styled.div.withConfig({displayName:"AlignBottom",componentId:"sc-681ff332-1"})(["display:flex;flex-direction:column;justify-content:flex-end;flex-grow:1;"]),lv=L.styled.div.withConfig({displayName:"LoginMethodContainer",componentId:"sc-681ff332-2"})(["display:flex;flex-direction:column;gap:8px;-ms-overflow-style:none;scrollbar-width:none;&::-webkit-scrollbar{display:none;}"]),lb=(0,L.styled)(lv).withConfig({displayName:"LoginMethodContainerWithScrollShadows",componentId:"sc-681ff332-3"})([""," background-repeat:no-repeat;background-size:100% 32px,100% 16px;background-attachment:local,scroll;max-height:400px;overflow-y:auto;scrollbar-width:none;padding:3px;"],e=>"light"===e.$colorScheme?"background: linear-gradient(var(--privy-color-background), var(--privy-color-background) 70%) bottom, linear-gradient(rgba(0, 0, 0, 0) 20%, rgba(0, 0, 0, 0.06)) bottom;":"dark"===e.$colorScheme?"background: linear-gradient(var(--privy-color-background), var(--privy-color-background) 70%) bottom, linear-gradient(rgba(255, 255, 255, 0) 20%, rgba(255, 255, 255, 0.06)) bottom;":void 0),lw=(0,L.css)(["&&{width:100%;font-size:16px;line-height:24px;min-height:56px;@media (min-width:440px){font-size:14px;}display:flex;gap:12px;align-items:center;color:var(--privy-color-foreground);padding:10px 12px;border:1px solid var(--privy-color-foreground-4) !important;border-radius:var(--privy-border-radius-md);transition:background-color 200ms ease;cursor:pointer;&:hover{background-color:var(--privy-color-background-2);}&:disabled{cursor:pointer;background-color:var(--privy-color-background-2);}}"]),lx=L.styled.div.withConfig({displayName:"Subtitle",componentId:"sc-681ff332-4"})(["text-align:center;font-size:14px;margin-bottom:24px;"]),lC=L.styled.button.attrs({className:"login-method-button"}).withConfig({displayName:"LoginMethodButton",componentId:"sc-681ff332-5"})(["",""],lw),lE=L.styled.div.withConfig({displayName:"LoginMethodIconWrapper",componentId:"sc-681ff332-7"})(["width:32px;height:32px;border-radius:",";background:",";display:flex;align-items:center;justify-content:center;flex-shrink:0;svg{width:",";height:",";color:",";}"],e=>e.$fullSize?"0":"4px",e=>e.$fullSize?"transparent":"var(--privy-color-background-2)",e=>e.$fullSize?"32px":"18px",e=>e.$fullSize?"32px":"18px",e=>e.$fullSize?"inherit":"var(--privy-color-icon-muted)"),lk=L.styled.div.withConfig({displayName:"Hide",componentId:"sc-681ff332-8"})(["width:100%;height:100%;min-height:inherit;display:flex;flex-direction:column;",""],e=>e.$if?"display: none;":""),lS=L.styled.div.withConfig({displayName:"EmptyWalletState",componentId:"sc-681ff332-9"})(["width:100%;height:100%;padding:",";"],e=>e.$withPadding?"64px 0px":"0px"),lI=L.styled.div.withConfig({displayName:"Header",componentId:"sc-681ff332-10"})(["display:flex;flex-direction:column;align-items:center;justify-content:center;margin-bottom:32px;gap:12px;& h3{font-size:18px;font-style:normal;font-weight:600;line-height:24px;}& p{max-width:300px;font-size:14px;font-style:normal;font-weight:400;line-height:20px;}"]);function lA(e){return(0,m.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 460 40",...e,children:(0,m.jsx)("g",{fill:e.color||"var(--privy-color-foreground)",children:(0,m.jsx)("path",{d:"M0 15.4v15.38h4.64V19.96h3.58c2.47 0 3.63-.01 3.77-.02 1-.08 1.49-.15 2.18-.3a9.45 9.45 0 0 0 4.6-2.37c1.66-1.57 2.64-3.87 2.81-6.56.02-.3.02-1.19 0-1.49-.1-1.77-.56-3.35-1.36-4.72A8.84 8.84 0 0 0 15.14.57c-.93-.3-1.75-.43-3.09-.54C11.9.02 10.2 0 5.93 0H0ZM10.85 4c1.85.05 3.1.45 4.16 1.3.22.17.54.49.69.68a5.97 5.97 0 0 1 1.19 3.13c.04.35.04 1.36 0 1.71-.08.68-.23 1.3-.44 1.85a4.8 4.8 0 0 1-1.09 1.68A5.63 5.63 0 0 1 12 15.92c-.6.08-.4.08-4.01.09H4.64V3.98h2.9c1.6 0 3.08 0 3.31.02ZM187.65 5.71v5.72h-.27l-.09-.14a15.9 15.9 0 0 0-1.21-1.73c-.43-.5-1-.95-1.7-1.36-.54-.3-1.05-.5-1.73-.63a8.98 8.98 0 0 0-1.7-.17 8.84 8.84 0 0 0-7.8 4.03 12.95 12.95 0 0 0-2.03 6.39c-.07.98-.06 2.15.02 3.13.2 2.47.87 4.53 2.02 6.25a8.98 8.98 0 0 0 10.22 3.65 6.5 6.5 0 0 0 2.8-1.93c.41-.51.84-1.1 1.1-1.55l.1-.17h.37v3.58h4.38V0h-4.48Zm-5.24 5.54c1.3.14 2.3.6 3.17 1.48.9.9 1.5 2.09 1.85 3.64.36 1.6.39 3.72.06 5.43a8.13 8.13 0 0 1-1.54 3.62 5.1 5.1 0 0 1-3.93 1.96 6.13 6.13 0 0 1-2.32-.31 5.87 5.87 0 0 1-3.33-3.5c-.39-1-.62-2.05-.72-3.32-.03
1-.32-.04-1.35-.02-1.73.08-1.56.4-2.91.96-4.05a6.2 6.2 0 0 1 1.06-1.58 5.08 5.08 0 0 1 3.6-1.66c.25-.02.9 0 1.16.02ZM210.07 15.39l.01 15.38h4.38l.01-3.57h.37l.09.15c.24.44.84 1.26 1.21 1.7a6.79 6.79 0 0 0 2.57 1.75 9.3 9.3 0 0 0 6.86-.49 9.28 9.28 0 0 0 4.05-4.07A13.05 13.05 0 0 0 231 21.6c.21-1.73.18-3.7-.09-5.32a13.03 13.03 0 0 0-1.5-4.3 9.1 9.1 0 0 0-3.75-3.63 9.15 9.15 0 0 0-4.43-.96 7.46 7.46 0 0 0-2.8.5A7.07 7.07 0 0 0 216 9.7c-.4.52-.82 1.12-1.1 1.59l-.07.14h-.27V0h-4.5Zm11.13-4.14c1.07.1 1.94.44 2.7 1.04a6.1 6.1 0 0 1 1.64 1.98c.43.84.78 2 .94 3.11.15 1.16.16 2.4.02 3.54a9.34 9.34 0 0 1-1.39 4.03 5.33 5.33 0 0 1-2.69 2.15c-.9.3-2.04.38-3.06.2a5.14 5.14 0 0 1-3.45-2.37 6.03 6.03 0 0 1-.45-.8c-.5-1.03-.8-2.2-.92-3.58-.04-.49-.06-.89-.05-1.53.01-.76.05-1.23.13-1.85.38-2.53 1.47-4.38 3.15-5.31a5.46 5.46 0 0 1 2.3-.63 10 10 0 0 1 1.13.02ZM69.05 2.17l-.01 2.77V7.7h-3.36v3.6h3.36v6.8l.01 7.15c.06 1.4.4 2.44 1.1 3.37a5.8 5.8 0 0 0 2.97 2.07c.91.3 1.83.42 2.9.38a8.71 8.71 0 0 0 2.66-.48l-.8-3.7-.38.06a4.96 4.96 0 0 1-2.43-.06c-.33-.1-.56-.25-.8-.49-.4-.41-.6-.88-.7-1.67-.02-.2-.02-.62-.03-6.82v-6.6h4.73V7.7h-4.73V2.16h-4.49ZM133.34 2.17V7.7h-3.39v3.6h3.38v6.9l.01 7.17a5.66 5.66 0 0 0 2.36 4.49c.85.6 2.03 1.03 3.26 1.17.85.1 2.03.05 2.81-.1.3-.06.75-.18 1-.26l.2-.06v-.05l-.81-3.67-.37.06a4.99 4.99 0 0 1-1.8.09c-.85-.13-1.32-.4-1.7-.97a2.63 2.63 0 0 1-.39-1.04c-.06-.4-.06 0-.06-7.1V11.3h4.7V7.7h-4.7l-.01-2.77V2.16h-4.49ZM293.41 2.36a14.56 14.56 0 0 0-13.7 16.07 14.59 14.59 0 0 0 21.86 11.08 14.5 14.5 0 0 0 7.11-14.07 14.61 14.61 0 0 0-6.53-10.73 14.49 14.49 0 0 0-8.74-2.35ZM350.8 2.36a10.17 10.17 0 0 0-7.56 4.2c-.16.2-.45.63-.58.83l-.05.1h-.47l-.01-4.36h-7.36v36.4h7.82V27.27h.49l.05.07a11.3 11.3 0 0 0 7.49 4.15 10.52 10.52 0 0 0 9.38-4.1c1.66-2.1 2.73-4.9 3.07-8.06.1-.87.13-1.4.13-2.37 0-.8 0-1.1-.07-1.76a15.95 15.95 0 0 0-3.23-8.72 12.8 12.8 0 0 0-1.85-1.84 10.49 10.49 0 0 0-7.26-2.28Zm-.94 6.05c1.27.15 2.33.65 3.2 1.5.98.96 1.67 2.31 2.03 4 .34 1.57.38 3.68.12 5.39a9.78 9.78 0 0 1-1.04 3.25c-.14.25-.44.69-.6.89a5.35 5.35 0 0 1-4.31 2.07 5.25 5.25 0 0 1-4.41-1.9 7.35 7.35 0 0 1-1.26-2.32 14.09 14.09 0 0 1-.62-4.83c.05-1.98.38-3.53 1.02-4.85a5.63 5.63 0 0 1 2.5-2.65c.66-.34 1.3-.5 2.14-.58.18-.02 1.04 0 1.23.03ZM363.63 3.1l-.01 3.2v3.16h1.43c1.26.01 1.44.02 1.54.04.42.09.66.28.79.62.08.23.08.08.08 2.96a911.57 911.57 0 0 1 .03 10.18v7.54h7.82v-7.4l.01-7.83c.03-.94.11-1.63.27-2.28.46-1.9 1.54-2.93 3.35-3.23.52-.08.2-.08 5-.08h4.4V3.08h-3.1c-3.48 0-3.91.01-4.67.1-1.83.2-3.04.79-3.96 1.88-.5.6-.9 1.32-1.26 2.26l-.06.17h-.46V3.09h-5.6c-4.46 0-5.6 0-5.6.02ZM390.8 16.95V30.8h3.87l3.86-.01V3.09h-7.73ZM400.6 3.1l-.01.4v.38l4.66 13.4 4.69 13.47.02.05h10.3l.03-.05 4.67-13.45 4.67-13.4V3.1h-7.43l-6.7 19.26h-.5l-3.28-9.5-3.31-9.64-.05-.12h-3.88l-3.88.01ZM430.98 3.1c-.01 0-.02.19-.02.4v.39l5.08 14.59c2.8 8.02 5.08 14.6 5.08 14.61.01.02-.22.02-4.8.02h-4.82v6.42h4.95c5.09 0 5.23 0 5.87-.06 3.15-.28 5.29-1.63 6.63-4.15.28-.55.44-.95.87-2.16L459 6.78l1-2.89v-.8h-7.43l-6.69 19.26h-.5l-3.27-9.46-3.31-9.64-.06-.16h-3.88l-3.88.01ZM36.57 7.36c-1.36.1-2.6.6-3.62 1.45a5.65 5.65 0 0 0-1.67 2.42l-.05.13H31V7.7h-4.35v23.08h4.5v-7.3c0-8 0-7.34.08-7.82a4.89 4.89 0 0 1 2.06-3.18c.83-.58 1.74-.89 2.87-.98a11.87 11.87 0 0 1 2.8.25H39v-4.3l-.21-.02c-.61-.07-1.74-.1-2.22-.07ZM51.08 7.41c-2.33.12-4.3.84-5.95 2.16a9.89 9.89 0 0 0-2.03 2.2 12.5 12.5 0 0 0-2 5.78 18.04 18.04 0 0 0 0 3.65 12.13 12.13 0 0 0 2.26 6.05 9.74 9.74 0 0 0 5 3.52c2.11.64 4.7.64 6.8 0a9.78 9.78 0 0 0 4.88-3.37c1.38-1.78 2.19-4 2.4-6.58.13-1.46.06-3.06-.18-4.42a11.24 11.24 0 0 0-3.58-6.6 10 10 0 0 0-5.75-2.35c-.56-.06-1.31-.07-1.85-.04Zm1.42 3.78c.88.1 1.62.34 2.28.75a6.13 6.13 0 0 1 1.99 2.15 10.31 10.31 0 0 1 1.2 5c.02 1.23-.12 2.44-.42 3.51a7.14 7.14 0 0 1-1.81 3.32c-.61.6-1.2.98-1.95 1.24a6 6 0 0 1-2 .3 5.7 5.7 0 0 1-2.72-.6 5 5 0 0 1-1.28-.94A7.1 7.1 0 0 1 46 22.73c-.57-1.99-.6-4.46-.08-6.5a7.24 7.24 0 0 1 2.03-3.67 5.13 5.13 0 0 1 3.35-1.4 11 11 0 0 1 1.2.03ZM92.05 7.4c-.96.06-1.56.15-2.3.33a9.62 9.62 0 0 0-6.09 4.66 13.5 13.5 0 0 0-1.71 7c0 .83 0 1.04.06 1.6.16 1.77.58 3.32 1.29 4.7A9.72 9.72 0 0 0 90.28 31c1.84.37 4.08.32 5.85-.13a9.07 9.07 0 0 0 5.02-3.1A7.64 7.64 0 0 0 102.5 25l-2.11-.39-2.11-.38-.08.13a4.72 4.72 0 0 1-2.35 2.55 6.3 6.3 0 0 1-2.23.58c-.29.03-1.13.03-1.44 0a6.35 6.35 0 0 1-3.02-1.04 5.93 5.93 0 0 1-2.02-2.43 8.44 8.44 0 0 1-.72-3.18v-.26h16.38v-.81c0-1.83-.06-2.76-.25-3.87-.2-1.22-.53-2.24-1.05-3.28a8.9 8.9 0 0 0-2.66-3.26 10.1 10.1 0 0 0-5.34-1.94 18.3 18.3 0 0 0-1.46-.03Zm1.3 3.75c1.2.13 2.19.55 3.05 1.3a5.8 5.8 0 0 1 1.78 2.96c.13.51.21 1.17.21 1.66v.15H86.43v-.12c.08-.97.3-1.78.72-2.61.5-1 1.2-1.8 2.14-2.42a5.32 5.32 0 0 1 2.9-.95c.2-.01.97 0 1.17.03ZM116.79 7.41c-2 .1-3.73.65-5.22 1.65a10.7 10.7 0 0 0-4.25 6.06 16.1 16.1 0 0 0-.5 5.8c.2 2.17.84 4.13 1.88 5.76.58.9 1.32 1.73 2.15 2.4a9.37 9.37 0 0 0 3.6 1.8 12.06 12.06 0 0 0 3.92.34 10.2 10.2 0 0 0 3.84-.95 8.31 8.31 0 0 0 4.76-6.75l.01-.04h-4.37l-.05.16a4.87 4.87 0 0 1-4.24 3.75c-.59.07-1.32.06-1.93-.05a5.47 5.47 0 0 1-3.5-2.27c-.56-.75-1-1.73-1.26-2.79a13.8 13.8 0 0 1-.16-5.24 7.77 7.77 0 0 1 2.1-4.3 5.48 5.48 0 0 1 2.15-1.3 6.4 6.4 0 0 1 3.89.1c.59.21 1.03.5 1.5.96a5.32 5.32 0 0 1 1.46 2.5l.04.15h4.37v-.06a8.22 8.22 0 0 0-5.31-6.94 10.98 10.98 0 0 0-4.88-.74ZM156.2 7.41a9.87 9.87 0 0 0-6 2.29 11.02 11.
102 0 0 0-3.41 5.43c-.52 1.78-.68 3.9-.48 5.97.17 1.8.63 3.38 1.37 4.8a9.68 9.68 0 0 0 5.91 4.86c1.65.48 3.63.61 5.53.36 3.72-.49 6.55-2.62 7.56-5.69.12-.39.13-.42.1-.43-.02 0-4.13-.75-4.19-.75-.03 0-.04 0-.1.16-.18.42-.45.9-.72 1.22-.16.2-.49.53-.7.7-.67.54-1.5.9-2.43 1.08-.48.08-.83.11-1.41.11-.64 0-1.07-.04-1.6-.15a5.76 5.76 0 0 1-3.93-2.83 8 8 0 0 1-.99-3.79v-.16h16.38v-1.11l-.02-1.43c-.1-2.25-.53-4-1.35-5.59a9.24 9.24 0 0 0-6.18-4.75c-1.04-.26-2.2-.36-3.33-.3Zm1.45 3.74a5.35 5.35 0 0 1 3.66 1.94 6.1 6.1 0 0 1 1.38 4.01v.12h-11.97v-.06c0-.02 0-.14.02-.25a6.6 6.6 0 0 1 2.15-4.32 5.73 5.73 0 0 1 3.5-1.46c.25-.02 1 0 1.26.02ZM233.58 7.82l8.37 23.22a49.22 49.22 0 0 1-.67 1.9 5.36 5.36 0 0 1-1.14 1.8c-.41.4-.82.58-1.48.69-.27.04-1.03.03-1.35 0a8.05 8.05 0 0 1-1.1-.23l-1.08 3.67c0 .02.32.14.66.22.83.21 1.57.29 2.56.28.56-.01.8-.03 1.24-.1 2.71-.4 4.66-2.09 5.86-5.08l9.64-26.44c0-.02-4.82-.06-4.83-.05l-2.93 8.96-2.91 8.94h-.24l-.22-.65-2.91-8.95-2.7-8.3H233.53ZM293.05 35.8c-1.18.04-1.93.09-2.8.16-2.52.24-4.53.69-5.43 1.23-.7.41-.76.86-.2 1.28.88.66 3.29 1.19 6.36 1.4a48.55 48.55 0 0 0 5.75.05c3.47-.19 6.24-.78 7.11-1.5.22-.19.3-.34.3-.53 0-.1 0-.12-.04-.22-.35-.69-2.32-1.3-5.25-1.63a41.09 41.09 0 0 0-5.8-.24Zm0 0"})})})}let lT=L.styled.span.withConfig({displayName:"TermsAndConditionsContainer",componentId:"sc-ff3bd734-0"})(["margin-top:16px;font-size:13px;text-align:center;color:var(--privy-color-foreground-3);display:block;&& > a{color:var(--privy-color-accent);}"]);function l_(e){let{app:{legal:{privacyPolicyUrl:t,termsAndConditionsUrl:n,requireUsersAcceptTerms:r}}
1,alwaysShowImplicitConsent:i}=e,a=!(!t||!n);return(!r||i)&&(n||t)?(0,m.jsxs)(lT,{children:["By logging in I agree to the"," ",n&&(0,m.jsx)("a",{href:n,target:"_blank",children:a?"Terms":"Terms of Service"}),a&&" & ",t&&(0,m.jsx)("a",{href:t,target:"_blank",children:"Privacy Policy"})]}):(0,m.jsx)(lT,{})}let lj=e=>{var t;let{className:n}=e,{appearance:r}=lt();return(0,m.jsx)(l$,{className:n,children:null!=(t=r.footerLogo)?t:(0,m.jsx)(lP,{href:"https://www.privy.io/",target:"_blank",id:"protected-by-privy",children:(0,m.jsx)(lA,{color:"currentColor",height:13,width:150})})})},lP=L.styled.a.withConfig({displayName:"PrivyLink",componentId:"sc-ff3bd734-1"})(["&&{padding:0;color:var(--privy-color-foreground-3);}"]),l$=L.styled.div.withConfig({displayName:"ModalFooter",componentId:"sc-ff3bd734-2"})(["display:flex;align-items:center;justify-content:center;padding-top:8px;padding-bottom:12px;gap:8px;font-size:13px;&& a{padding:0.5rem 0;&:hover{text-decoration:none;}}@media all and (display-mode:standalone){padding-bottom:30px;}"]),lN=e=>{let{success:t,fail:n}=e;return(0,m.jsxs)(lM,{children:[(0,m.jsx)(lO,{children:(0,m.jsx)(lL,{className:t?"success":n?"fail":""})}),(0,m.jsx)(lO,{children:(0,m.jsx)(lR,{className:t?"success":n?"fail":""})})]})},lO=L.styled.span.withConfig({displayName:"PositionedAbsoluteLoader",componentId:"sc-aba6339d-0"})(["&&{position:absolute;top:0;left:0;z-index:2;}"]),lM=L.styled.span.withConfig({displayName:"ConnectionLoaderContainer",componentId:"sc-aba6339d-1"})(["position:relative;width:82px;height:82px;display:inline-block;"]),lR=L.styled.span.withConfig({displayName:"Loader",componentId:"sc-aba6339d-2"})(["&&{width:82px;height:82px;border-width:4px;border-style:solid;border-color:",";border-bottom-color:transparent;border-radius:50%;display:inline-block;box-sizing:border-box;animation:rotation 1.2s linear infinite;transition:border-color 800ms;}@keyframes rotation{0%{transform:rotate(0deg);}100%{transform:rotate(360deg);}}&&&.success{border-color:var(--privy-color-icon-success);border-bottom-color:var(--privy-color-icon-success);}&&&.fail{border-color:var(--privy-color-icon-error);border-bottom-color:var(--privy-color-icon-error);}"],e=>{var t;return null!=(t=e.color)?t:"var(--privy-color-icon-subtle)"}),lL=(0,L.styled)(lR).withConfig({displayName:"LoaderFaint",componentId:"sc-aba6339d-3"})(["&&{border-bottom-color:",";border-color:",";animation:none;opacity:0.5;}"],e=>{var t;return null!=(t=e.color)?t:"var(--privy-color-border-default)"},e=>{var t;return null!=(t=e.color)?t:"var(--privy-color-border-default)"}),lD=e=>(0,m.jsx)(lF,{color:e.color||"var(--privy-color-foreground-3)"}),lF=(0,L.styled)(lR).withConfig({displayName:"StyledButtonLoader",componentId:"sc-aba6339d-4"})(["&&{height:1rem;width:1rem;margin:2px 0;border-width:1.5px;transition:border-color 200ms ease;}"]),lU=e=>{let{variant:t="primary",size:n="lg",children:r,success:i,...a}=e;switch(t){case"secondary":return(0,m.jsx)(lV,{size:n,...a,children:r});case"error":return(0,m.jsx)(lV,{$warn:!0,size:n,...a,children:r});case"muted":return(0,m.jsx)(lG,{size:n,...a,children:r});default:return(0,m.jsx)(lz,{size:n,success:i,...a,children:r})}},lB=L.styled.button.withConfig({displayName:"BaseButton",componentId:"sc-e537b447-0"})(["display:flex;flex-direction:row;align-items:center;justify-content:center;user-select:none;&{width:auto;cursor:pointer;border-radius:",";font-size:14px;font-style:normal;font-weight:500;line-height:22px;letter-spacing:-0.016px;}&&{height:",";padding:0 ",";}"],e=>{let{$size:t}=e;return"sm"===t?"6px":"var(--privy-border-radius-sm)"},e=>{let{$size:t}=e;return"sm"===t?"28px":"48px"},e=>{let{$size:t}=e;return"sm"===t?"10px":"16px"}),lz=e=>{let{children:t,loading:n,disabled:r,success:i,size:a="lg",loadingText:o="Loading...",as:s,onClick:l,...c}=e,d="a"===s,u=!(!n&&!r);return(0,m.jsx)(lH,{as:s,disabled:d?void 0:u,"aria-disabled":d?u:void 0,$success:i,$size:a,onClick:e=>{d&&u?e.preventDefault():null==l||l(e)},...c,children:n?(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(lD,{}),o?(0,m.jsx)("span",{style:{marginLeft:"8px"},children:o}):null]}):t})},lW=e=>{let{children:t,loading:n,disabled:r,...i}=e;return(0,m.jsx)(lq,{disabled:r,...i,children:n?(0,m.jsx)(lD,{color:"var(--privy-color-foreground-accent)"}):t})},lq=(0,L.styled)(lB).withConfig({displayName:"StyledPrimaryButtonWithoutGray",componentId:"sc-e537b447-1"})(["position:relative;&&{background-color:var(--privy-color-accent);color:var(--privy-color-foreground-accent);transition:background-color 200ms ease;}&:hover{background-color:var(--privy-color-accent-dark);}&:active{background-color:var(--privy-color-accent-dark);}&:disabled,&:hover:disabled,&:active:disabled{cursor:not-allowed;color:var(--privy-color-foreground-disabled);background-color:var(--privy-color-accent-dark);}"]),lH=(0,L.styled)(lB).withConfig({displayName:"StyledPrimaryButton",componentId:"sc-e537b447-2"})(["position:relative;&&{background-color:",";color:var(--privy-color-foreground-accent);transition:background-color 200ms ease;}&:hover{background-color:",";}&:active{background-color:",";}&:focus{outline:none;box-shadow:0 0 0 3px #949df9;}&:disabled{background-color:var(--privy-color-background-2);border:1px solid var(--privy-color-border-default);color:var(--privy-color-foreground-disabled);cursor:not-allowed;}&:hover:disabled,&:active:disabled{background-color:var(--privy-color-background-2);border:1px solid var(--privy-color-border-default);color:var(--privy-color-foreground-disabled);cursor:not-allowed;}",""],e=>e.$warn?"var(--privy-color-error-dark)":"var(--privy-color-accent)",e=>e.$warn?"var(--privy-color-error-dark)":"var(--privy-color-accent-dark)",e=>e.$warn?"var(--privy-color-error-dark)":"var(--privy-color-accent-dark)",e=>e.disabled&&(0,L.css)(["&&&,&&&:hover,&&&:active{background-color:var(--privy-color-background-2);border:1px solid var(--privy-color-border-default);color:var(--privy-color-foreground-disabled);cursor:not-allowed;}"])),lV=e=>{let{children:t,loading:n,disabled:r,size:i="lg",loadingText:a="Lo
1ading...",as:o,onClick:s,...l}=e,c="a"===o,d=!(!n&&!r);return(0,m.jsx)(lK,{as:o,disabled:c?void 0:d,"aria-disabled":c?d:void 0,$size:i,onClick:e=>{c&&d?e.preventDefault():null==s||s(e)},...l,children:n?(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(lD,{}),a?(0,m.jsx)("span",{style:{marginLeft:"8px"},children:a}):null]}):t})},lG=e=>{let{children:t,loading:n,disabled:r,size:i="lg",loadingText:a="Loading...",as:o,onClick:s,...l}=e,c="a"===o,d=!(!n&&!r);return(0,m.jsx)(lY,{as:o,disabled:c?void 0:d,"aria-disabled":c?d:void 0,$size:i,onClick:e=>{c&&d?e.preventDefault():null==s||s(e)},...l,children:n?(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(lD,{}),a?(0,m.jsx)("span",{style:{marginLeft:"8px"},children:a}):null]}):t})},lK=(0,L.styled)(lB).withConfig({displayName:"StyledSecondaryButton",componentId:"sc-e537b447-3"})(["&&{border-width:1px;border-style:solid;border-color:",";background-color:var(--privy-color-background);color:",";transition:border-color 200ms ease,color 200ms ease,background-color 200ms ease;}&:hover{border-color:",";background-color:",";color:",";}&:active{border-color:",";background-color:",";color:",";}&:disabled{border-color:var(--privy-color-border-default);background-color:var(--privy-color-background-2);color:var(--privy-color-foreground-disabled);cursor:not-allowed;}&:hover:disabled,&:active:disabled{border-color:var(--privy-color-border-default);background-color:var(--privy-color-background-2);color:var(--privy-color-foreground-disabled);cursor:not-allowed;}",""],e=>e.$warn?"var(--privy-color-border-error)":"var(--privy-color-accent)",e=>e.$warn?"var(--privy-color-error-dark)":"var(--privy-color-accent)",e=>e.$warn?"var(--privy-color-border-error)":"var(--privy-color-border-interactive-hover)",e=>e.$warn?"var(--privy-color-error-light)":"var(--privy-color-info-bg-hover)",e=>e.$warn?"var(--privy-color-error-dark)":"var(--privy-color-accent)",e=>e.$warn?"var(--privy-color-border-error)":"var(--privy-color-border-interactive)",e=>e.$warn?"var(--privy-color-error-bg-hover)":"var(--privy-color-info-bg)",e=>e.$warn?"var(--privy-color-error-dark)":"var(--privy-color-accent)",e=>e.disabled&&(0,L.css)(["&&&,&&&:hover,&&&:active{border-color:var(--privy-color-border-default);background-color:var(--privy-color-background-2);color:var(--privy-color-foreground-disabled);cursor:not-allowed;}"])),lY=(0,L.styled)(lB).withConfig({displayName:"StyledMutedButton",componentId:"sc-e537b447-4"})(["&&{border-width:1px;border-style:solid;border-color:var(--privy-color-border-default);background-color:transparent;color:var(--privy-color-text-muted);transition:border-color 200ms ease,color 200ms ease,background-color 200ms ease;}&:hover{border-color:var(--privy-color-border-default);background-color:var(--privy-color-info-bg-hover);color:var(--privy-color-foreground-2);}&:active{border-color:var(--privy-color-border-default);background-color:var(--privy-color-info-bg);color:var(--privy-color-foreground-2);}&:focus{outline:none;box-shadow:0 0 0 3px #949df9;}&:disabled{border-color:var(--privy-color-border-default);background-color:var(--privy-color-background-2);color:var(--privy-color-foreground-disabled);cursor:not-allowed;}&:hover:disabled,&:active:disabled{border-color:var(--privy-color-border-default);background-color:var(--privy-color-background-2);color:var(--privy-color-foreground-disabled);cursor:not-allowed;}",""],e=>e.disabled&&(0,L.css)(["&&&,&&&:hover,&&&:active{border-color:var(--privy-color-border-default);background-color:var(--privy-color-background-2);color:var(--privy-color-foreground-disabled);cursor:not-allowed;}"])),lZ=e=>{let{children:t,onClick:n,disabled:r,isSubmitting:i,...a}=e;return(0,m.jsxs)(lJ,{$isSubmitting:i,onClick:n,disabled:r,...a,children:[(0,m.jsx)("span",{children:t}),(0,m.jsx)("span",{children:(0,m.jsx)(lD,{})})]})},lJ=L.styled.button.withConfig({displayName:"StyledEmbeddedButton",componentId:"sc-e537b447-7"})(["&&{color:var(--privy-color-accent);font-size:16px;font-style:normal;font-weight:500;line-height:24px;cursor:pointer;border-radius:0px var(--privy-border-radius-mdlg) var(--privy-border-radius-mdlg) 0px;border:none;transition:color 200ms ease;@media (min-width:441px){font-size:14px;}:hover{color:var(--privy-color-accent-dark);}&& > :first-child{opacity:",";}&& > :last-child{position:absolute;display:flex;top:50%;left:50%;
1transform:translate3d(-50%,-50%,0);opacity:",";}:disabled,:hover:disabled{color:var(--privy-color-foreground-disabled);cursor:not-allowed;}}"],e=>+!e.$isSubmitting,e=>+!!e.$isSubmitting),lQ=e=>{let{backFn:t}=e;return(0,m.jsx)("div",{children:(0,m.jsx)(l2,{onClick:t,children:(0,m.jsx)(eC.default,{height:"16px",width:"16px",strokeWidth:2})})})},lX=e=>{let{infoFn:t}=e;return(0,m.jsx)("div",{children:(0,m.jsx)(l3,{"aria-label":"info",onClick:t,children:(0,m.jsx)(eE.default,{height:"22px",width:"22px",strokeWidth:2})})})},l0=e=>(0,m.jsx)("div",{children:(0,m.jsx)(l2,{"aria-label":"close modal",onClick:e.onClose,children:(0,m.jsx)(ek.default,{height:"16px",width:"16px",strokeWidth:2})})}),l1=e=>{let{backFn:t,infoFn:n,onClose:r,title:i,closeable:a=!0,className:o}=e,{closePrivyModal:s}=(0,R.u)(),l=lt();return(0,m.jsxs)(l5,{className:o,children:[(0,m.jsxs)(l4,{children:[t&&(0,m.jsx)(lQ,{backFn:t}),n&&(0,m.jsx)(lX,{infoFn:n})]}),i&&(0,m.jsx)(l8,{id:"privy-dialog-title",children:i}),(0,m.jsx)(l6,{children:!l.render.standalone&&a&&(0,m.jsx)(l0,{onClose:r||(()=>s())})})]})},l2=L.styled.button.withConfig({displayName:"StyledButton",componentId:"sc-e033e17a-0"})(["&&{cursor:pointer;display:flex;opacity:0.6;background-color:var(--privy-color-background-2);border-radius:var(--privy-border-radius-full);padding:4px;> svg{margin:auto;color:var(--privy-color-foreground);}:hover{opacity:1;}}"]),l3=(0,L.styled)(l2).withConfig({displayName:"TransparentStyledButton",componentId:"sc-e033e17a-1"})(["&&{background-color:transparent;}"]),l5=L.styled.div.withConfig({displayName:"StyledHeader",componentId:"sc-e033e17a-2"})(["padding:16px 0;display:flex;align-items:center;justify-content:space-between;h2{font-size:16px;line-height:24px;font-weight:600;color:var(--privy-color-foreground);}"]),l4=L.styled.div.withConfig({displayName:"LeftActionContainer",componentId:"sc-e033e17a-3"})(["flex:1;align-items:center;display:flex;gap:8px;"]),l6=L.styled.div.withConfig({displayName:"RightActionContainer",componentId:"sc-e033e17a-4"})(["flex:1;display:flex;justify-content:flex-end;"]),l8=L.styled.div.withConfig({displayName:"TitleContainer",componentId:"sc-e033e17a-5"})(["overflow:hidden;white-space:nowrap;max-width:100%;text-overflow:ellipsis;text-align:center;color:var(--privy-color-foreground-2);"]),l9=e=>{let{size:t,centerIcon:n}=e;return(0,m.jsx)(l7,{$size:t,children:(0,m.jsxs)(ce,{children:[(0,m.jsx)(cn,{}),(0,m.jsx)(cr,{}),n?(0,m.jsx)(ct,{children:n}):null]})})},l7=L.styled.div.withConfig({displayName:"LoadingContainer",componentId:"sc-ebc93df8-0"})(["--spinner-size:",";display:inline-flex;justify-content:center;align-items:center;@media all and (display-mode:standalone){margin-bottom:30px;}"],e=>e.$size?e.$size:"96px"),ce=L.styled.div.withConfig({displayName:"SpinnerContainer",componentId:"sc-ebc93df8-1"})(["position:relative;height:var(--spinner-size);width:var(--spinner-size);opacity:1;animation:fadein 200ms ease;"]),ct=L.styled.div.withConfig({displayName:"CenterIconContainer",componentId:"sc-ebc93df8-2"})(["position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;svg,img{width:calc(var(--spinner-size) * 0.4);height:calc(var(--spinner-size) * 0.4);border-radius:var(--privy-border-radius-full);}"]),cn=L.styled.div.withConfig({displayName:"CircleFixed",componentId:"sc-ebc93df8-3"})(["position:absolute;top:0;right:0;bottom:0;left:0;width:var(--spinner-size);height:var(--spinner-size);&&{border:4px solid var(--privy-color-border-default);border-radius:50%;}"]),cr=L.styled.div.withConfig({displayName:"CircleRotate",componentId:"sc-ebc93df8-4"})(["position:absolute;top:0;right:0;bottom:0;left:0;width:var(--spinner-size);height:var(--spinner-size);animation:spin 1200ms linear infinite;&&{border:4px solid;border-color:var(--privy-color-icon-subtle) transparent transparent transparent;border-radius:50%;}@keyframes spin{from{transform:rotate(0deg);}to{transform:rotate(360deg);}}"]),ci=L.styled.div.withConfig({displayName:"ScreenRoot",componentId:"sc-cc9e9a32-0"})(["--screen-space:16px;--screen-space-lg:calc(var(--screen-space) * 1.5);position:relative;overflow:hidden;margin:0 calc(-1 * var(--screen-space));height:100%;border-radius:var(--privy-border-radius-lg);"]),ca=L.styled.div.withConfig({displayName:"ScreenRootInner",componentId:"sc-cc9e9a32-1"})(["display:flex;flex-direction:column;gap:calc(var(--screen-space) * 1.5);width:100%;background:var(--privy-color-background);padding:0 var(--screen-space-lg) var(--screen-space);height:100%;border-radius:var(--privy-border-radius-lg);"]),co=L.styled.div.withConfig({displayName:"HeaderContainer",componentId:"sc-cc9e9a32-2"})(["position:relative;display:flex;flex-direction:column;"]),cs=(0,L.styled)(l1).withConfig({displayName:"StyledModalHeader",componentId:"sc-cc9e9a32-3"})(["margin:0 -8px;"]),cl=L.styled.div.withConfig({displayName:"BodyContainer",componentId:"sc-cc9e9a32-4"})(["flex:1 1 auto;display:flex;flex-direction:column;overflow-y:auto;padding:3px;margin:-3px;&::-webkit-scrollbar{display:none;}scrollbar-gutter:stable both-edges;scrollbar-width:none;-ms-overflow-style:none;"," background-repeat:no-repeat;background-size:100% 32px,100% 16px;background-attachment:local,scroll;"],e=>{let{$colorScheme:t}=e;return"light"===t?"background: linear-gradient(var(--privy-color-background), var(--privy-color-background) 70%) bottom, linear-gradient(rgba(0, 0, 0, 0) 20%, rgba(0, 0, 0, 0.06)) bottom;":"dark"===t?"background: linear-gradient(var(--privy-color-background), var(--privy-color-background) 70%) bottom, linear-gradient(rgba(255, 255, 255, 0) 20%, rgba(255, 255, 255, 0.06)) bottom;":void 0}),cc=L.styled.div.withConfig({displayName:"FooterContainer",componentId:"sc-cc9e9a32-5"})(["display:flex;flex-direction:column;gap:var(--screen-space-lg);"]),cd=L.styled.div.withConfig({displayName:"CenteredHeader",componentId:"sc-cc9e9a32-6"})(["text-align:center;display:flex;flex-direction:column;align-items:center;gap:var(--screen-space);"]),cu=L.styled.div.withConfig({displayName:"TitleContainer",componentId:"sc-cc9e9a32-7"})(["display:flex;flex-direction:column;gap:4px;"]),ch=L.styled.h3.withConfig({displayName:"HeaderTitle",componentId:"sc-cc9e9a32-8"})(["&&{font-size:20px;line-height:32px;font-weight:500;color:var(--privy-color-foreground);margin:0;}"]),cp=L.styled.p.withConfig({displayName:"HeaderSubtitle",componentId:"sc-cc9e9a32-9"})(["&&{margin:0;font-size:16px;font-weight:300;line-height:24px;color:var(--privy-color-foreground);}"]),cf=L.styled.div.withConfig({displayName:"IconContainer",componentId:"sc-cc9e9a32-10"})(["background:",";border-radius:50%;width:64px;
1height:64px;display:flex;align-items:center;justify-content:center;"],e=>{let{$variant:t}=e;switch(t){case"success":return"var(--privy-color-success-bg, #EAFCEF)";case"warning":return"var(--privy-color-warn, #FEF3C7)";case"error":return"var(--privy-color-error-bg, #FEE2E2)";case"loading":case"logo":return"transparent";default:return"var(--privy-color-background-2)"}}),cg=L.styled.div.withConfig({displayName:"LogoContainer",componentId:"sc-cc9e9a32-11"})(["display:flex;align-items:center;justify-content:center;margin-bottom:var(--screen-space);img,svg{max-height:90px;max-width:180px;}"]),cm=L.styled.div.withConfig({displayName:"LoadingWithIconContainer",componentId:"sc-cc9e9a32-12"})(["display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%;height:82px;> div{position:relative;}> div > :first-child{position:relative;}> div > :last-child{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);}"]),cy=e=>{let{children:t,...n}=e;return(0,m.jsx)(ci,{children:(0,m.jsx)(ca,{...n,children:t})})},cv=L.styled.div.withConfig({displayName:"ProgressBarContainer",componentId:"sc-cc9e9a32-13"})(["position:absolute;top:0;left:calc(-1 * var(--screen-space-lg));width:calc(100% + calc(var(--screen-space-lg) * 2));height:4px;background:var(--privy-color-background-2);border-top-left-radius:inherit;border-top-right-radius:inherit;overflow:hidden;"]),cb=(0,L.styled)(lj).withConfig({displayName:"StyledBlobbyFooter",componentId:"sc-cc9e9a32-14"})(["padding:0;&& a{padding:0;color:var(--privy-color-foreground-3);}"]),cw=L.styled.div.withConfig({displayName:"ProgressBarFill",componentId:"sc-cc9e9a32-15"})(["height:100%;width:","%;background:var(--privy-color-foreground-3);border-radius:2px;transition:width 300ms ease-in-out;"],e=>{let{pct:t}=e;return t}),cx=e=>{let{step:t}=e;return t?(0,m.jsx)(cv,{children:(0,m.jsx)(cw,{pct:Math.min(100,t.current/t.total*100)})}):null};cy.Header=e=>{let{title:t,subtitle:n,icon:r,iconVariant:i,iconLoadingStatus:a,showBack:o,onBack:s,showInfo:l,onInfo:c,showClose:d,onClose:u,step:h,...p}=e;return(0,m.jsxs)(co,{...p,children:[(0,m.jsx)(cs,{backFn:o?s:void 0,infoFn:l?c:void 0,onClose:d?u:void 0,closeable:d}),(r||i||t||n)&&(0,m.jsxs)(cd,{children:[r||i?(0,m.jsx)(cy.Icon,{icon:r,variant:i,loadingStatus:a}):null,(0,m.jsxs)(cu,{children:[t&&(0,m.jsx)(ch,{children:t}),n&&(0,m.jsx)(cp,{children:n})]})]}),h&&(0,m.jsx)(cx,{step:h})]})},cy.Body=f.default.forwardRef((e,t)=>{let{children:n,...r}=e;return(0,m.jsx)(cl,{ref:t,...r,children:n})}),cy.Body.displayName="Screen.Body",cy.Footer=e=>{let{children:t,...n}=e;return(0,m.jsx)(cc,{...n,children:t})},cy.Actions=e=>{let{children:t,...n}=e;return(0,m.jsx)(cC,{...n,children:t})},cy.HelpText=e=>{let{children:t,...n}=e;return(0,m.jsx)(cE,{...n,children:t})},cy.Watermark=()=>(0,m.jsx)(cb,{}),cy.Icon=e=>{let{icon:t,variant:n="subtle",loadingStatus:r}=e;return"logo"===n&&t?(0,m.jsx)(cg,"string"==typeof t?{children:(0,m.jsx)("img",{src:t,alt:""})}:f.default.isValidElement(t)?{children:t}:{children:f.default.createElement(t)}):"loading"===n?t?(0,m.jsx)(cm,{children:(0,m.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"},children:[(0,m.jsx)(lN,{success:null==r?void 0:r.success,fail:null==r?void 0:r.fail}),"string"==typeof t?(0,m.jsx)("span",{style:{background:"url('".concat(t,"') 0 0 / contain"),height:"38px",width:"38px",borderRadius:"6px",margin:"auto",backgroundSize:"contain"}}):f.default.isValidElement(t)?f.default.cloneElement(t,{style:{width:"38px",height:"38px"}}):f.default.createElement(t,{style:{width:"38px",height:"38px"}})]})}):(0,m.jsx)(cf,{$variant:n,children:(0,m.jsx)(l9,{size:"64px"})}):(0,m.jsx)(cf,{$variant:n,children:t&&("string"==typeof t?(0,m.jsx)("img",{src:t,alt:"",style:{width:"32px",height:"32px",borderRadius:"6px"}}):f.default.isValidElement(t)?t:f.default.createElement(t,{width:32,height:32,stroke:(()=>{switch(n){case"success":return"var(--privy-color-icon-success)";case"warning":return"var(--privy-color-icon-warning)";case"error":return"var(--privy-color-icon-error)";default:return"var(--privy-color-icon-muted)"}})(),strokeWidth:2}))})};let cC=L.styled.div.withConfig({displayName:"ActionsContainer",componentId:"sc-cc9e9a32-16"})(["width:100%;display:flex;flex-direction:column;gap:calc(var(--screen-space) / 2);"]),cE=L.styled.p.withConfig({displayName:"HelpTextContainer",componentId:"sc-cc9e9a32-17"})(["&&{margin:0;width:100%;text-align:center;color:var(--privy-color-foreground-3);font-size:14px;line-height:22px;& a{color:var(--privy-color-accent);}}"]),ck=e=>{let{primaryCta:t,secondaryCta:n,helpText:r,watermark:i=!0,children:a,...o}=e,s=t||n?(0,m.jsxs)(m.Fragment,{children:[t&&(()=>{let{label:e,...n}=t,r=n.variant||"primary";return(0,m.jsx)(lU,{...n,variant:r,style:{width:"100%",...n.style},children:e})})(),n&&(()=>{let{label:e,...t}=n,r=t.variant||"secondary";return(0,m.jsx)(lU,{...t,variant:r,style:{width:"100%",...t.style},children:e})})()]}):null;return(0,m.jsxs)(cy,{id:o.id,className:o.className,children:[(0,m.jsx)(cy.Header,{...o}),a?(0,m.jsx)(cy.Body,{children:a}):null,r||s||i?(0,m.jsxs)(cy.Footer,{children:[r?(0,m.jsx)(cy.HelpText,{children:r}):null,s?(0,m.jsx)(cy.Actions,{children:s}):null,i?(0,m.jsx)(cy.Watermark,{}):null]}):null]})},cS=e=>{let{label:t,children:n,valueStyles:r}=e;return(0,m.jsxs)(cI,{children:[(0,m.jsx)("div",{children:t}),(0,m.jsx)(cA,{style:{...r},children:n})]})}
1,cI=L.styled.div.withConfig({displayName:"StyledDetailsRow",componentId:"sc-4ebfdd45-0"})(["display:flex;align-items:center;justify-content:space-between;width:100%;> :first-child{color:var(--privy-color-foreground-3);text-align:left;}> :last-child{color:var(--privy-color-foreground-2);text-align:right;}"]),cA=L.styled.div.withConfig({displayName:"ValueWrapper",componentId:"sc-4ebfdd45-1"})(["font-size:14px;line-height:100%;display:flex;align-items:center;justify-content:center;border-radius:var(--privy-border-radius-full);background-color:var(--privy-color-background-2);padding:4px 8px;"]),cT=new Intl.NumberFormat(void 0,{style:"currency",currency:"USD",maximumFractionDigits:2}),c_=e=>cT.format(e),cj=(e,t)=>{let n=c_(t*parseFloat(e));return"$0.00"!==n?n:"<$0.01"},cP=(e,t)=>{let n=c_(t*parseFloat((0,z.formatEther)(e)));return"$0.00"===n?"<$0.01":n},c$=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:6,r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return"".concat(cN(e,n,r)," ").concat(t)},cN=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=parseFloat((0,z.formatEther)(e)).toFixed(t).replace(/0+$/,"").replace(/\.$/,"");return n?r:"".concat("0"===r?"<0.001":r)},cO=e=>e.reduce((e,t)=>e+t,0n),cM={"solana:mainnet":{EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v:{symbol:"USDC",decimals:6,address:"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"},Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB:{symbol:"USDT",decimals:6,address:"Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB"},So11111111111111111111111111111111111111112:{symbol:"SOL",decimals:9,address:"So11111111111111111111111111111111111111112"}},"solana:devnet":{"4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU":{symbol:"USDC",decimals:6,address:"4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU"},EJwZgeZrdC8TXTQbQBoL6bfuAnFUUy1PVCMB4DYPzVaS:{symbol:"USDT",decimals:6,address:"EJwZgeZrdC8TXTQbQBoL6bfuAnFUUy1PVCMB4DYPzVaS"},So11111111111111111111111111111111111111112:{symbol:"SOL",decimals:9,address:"So11111111111111111111111111111111111111112"}},"solana:testnet":{}};function cR(e,t){let n=parseFloat(e.toString())/1e9,r=cL.format(t*n);return"$0.00"===r?"<$0.01":r}let cL=new Intl.NumberFormat(void 0,{style:"currency",currency:"USD",maximumFractionDigits:2});function cD(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=(parseFloat(e.toString())/1e9).toFixed(t).replace(/0+$/,"").replace(/\.$/,""),a=r?"":" SOL";return n?"".concat(i).concat(a):"".concat("0"===i?"<0.001":i).concat(a)}let cF=e=>{let{weiQuantities:t,tokenPrice:n,tokenSymbol:r}=e,i=cO(t),a=n?cP(i,n):void 0,o=c$(i,r);return(0,m.jsx)(cB,{children:a||o})},cU=e=>{let{weiQuantities:t,tokenPrice:n,tokenSymbol:r}=e,i=cO(t),a=n?cP(i,n):void 0,o=c$(i,r);return(0,m.jsx)(cB,{children:a?(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(cz,{children:"USD"}),"<$0.01"===a?(0,m.jsxs)(cq,{children:[(0,m.jsx)(cW,{children:"<"}),"$0.01"]}):a]}):o})},cB=L.styled.span.withConfig({displayName:"StyledPriceDisplay",componentId:"sc-3cd56c8a-0"})(["font-size:14px;line-height:140%;display:flex;gap:4px;align-items:center;"]),cz=L.styled.span.withConfig({displayName:"StyledPriceUnit",componentId:"sc-3cd56c8a-1"})(["font-size:12px;line-height:12px;color:var(--privy-color-foreground-3);"]),cW=L.styled.span.withConfig({displayName:"TinyLessThan",componentId:"sc-3cd56c8a-2"})(["font-size:10px;"]),cq=L.styled.span.withConfig({displayName:"FlexCenter",componentId:"sc-3cd56c8a-3"})(["display:flex;align-items:center;"]),cH=L.styled.div.withConfig({displayName:"BottomPusherContainer",componentId:"sc-cb963810-0"})(["display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-end;margin-top:auto;gap:16px;flex-grow:100;"]),cV=L.styled.div.withConfig({displayName:"CenteredItem",componentId:"sc-cb963810-1"})(["display:flex;flex-direction:column;align-items:center;justify-content:center;flex-grow:1;width:100%;"]),cG=L.styled.div.withConfig({displayName:"HorizontallyCenteredItem",componentId:"sc-cb963810-2"})(["display:flex;flex-direction:column;align-items:center;width:100%;"]),cK=(0,L.styled)(cV).withConfig({displayName:"CenteredItemWithPadding",componentId:"sc-cb963810-3"})(["padding:20px 0;"]),cY=(0,L.styled)(cV).withConfig({displayName:"CenteredItemWithGap",componentId:"sc-cb963810-4"})(["gap:16px;"]),cZ=L.styled.div.withConfig({displayName:"FlexContainer",componentId:"sc-cb963810-5"})(["display:flex;flex-direction:column;width:100%;"]),cJ=L.styled.div.withConfig({displayName:"FixedGappedContainer",componentId:"sc-cb963810-6"})(["display:flex;flex-direction:column;gap:8px;"]),cQ=L.styled.div.withConfig({displayName:"StyledCalloutSection",componentId:"sc-cb963810-8"})(["display:flex;flex-direction:column;justify-content:flex-start;align-items:flex-start;text-align:left;gap:8px;padding:16px;margin-top:16px;margin-bottom:16px;width:100%;background:var(--privy-color-background-2);border-radius:var(--privy-border-radius-md);&& h4{color:var(--privy-color-foreground-3);font-size:14px;text-decoration:underline;font-weight:medium;}&& p{color:var(--privy-color-foreground-3);font-size:14px;}"]),cX=L.styled.div.withConfig({displayName:"RefactorSpacerTop",componentId:"sc-cb963810-9"})(["height:16px;"]),c0=L.styled.div.withConfig({displayName:"RefactorSpacerBottom",componentId:"sc-cb963810-10"}
1)(["height:12px;"]),c1=L.styled.div.withConfig({displayName:"ConfigurableSpacer",componentId:"sc-cb963810-12"})(["height:","px;"],e=>{var t;return null!=(t=e.height)?t:"12"}),c2=e=>{let{gas:t,tokenPrice:n,tokenSymbol:r}=e;return(0,m.jsxs)(cZ,{style:{paddingBottom:"12px"},children:[(0,m.jsxs)(c5,{children:[(0,m.jsx)(c6,{children:"Est. Fees"}),(0,m.jsx)("div",{children:(0,m.jsx)(cU,{weiQuantities:[BigInt(t)],tokenPrice:n,tokenSymbol:r})})]}),n&&(0,m.jsx)(c4,{children:"".concat(c$(BigInt(t),r))})]})},c3=e=>{let{value:t,gas:n,tokenPrice:r,tokenSymbol:i}=e,a=BigInt(null!=t?t:0)+BigInt(n);return(0,m.jsxs)(cZ,{children:[(0,m.jsxs)(c5,{children:[(0,m.jsx)(c6,{children:"Total (including fees)"}),(0,m.jsx)("div",{children:(0,m.jsx)(cU,{weiQuantities:[BigInt(t||0),BigInt(n)],tokenPrice:r,tokenSymbol:i})})]}),r&&(0,m.jsx)(c4,{children:c$(a,i)})]})},c5=L.styled.div.withConfig({displayName:"TransactionTotalRow",componentId:"sc-f8ef9b74-0"})(["display:flex;flex-direction:row;justify-content:space-between;align-items:center;padding-top:4px;"]),c4=L.styled.div.withConfig({displayName:"ValueConversionRow",componentId:"sc-f8ef9b74-1"})(["display:flex;flex-direction:row;height:12px;font-size:12px;line-height:12px;color:var(--privy-color-foreground-3);font-weight:400;"]),c6=L.styled.div.withConfig({displayName:"TotalText",componentId:"sc-f8ef9b74-2"})(["font-size:14px;line-height:22.4px;font-weight:400;"]),c8=(0,f.createContext)(void 0),c9=(0,f.createContext)(void 0),c7=e=>{let{defaultValue:t,children:n}=e,[r,i]=(0,f.useState)(t||null);return(0,m.jsx)(c8.Provider,{value:{activePanel:r,togglePanel:e=>{i(r===e?null:e)}},children:(0,m.jsx)(di,{children:n})})},de=e=>{let{value:t,children:n}=e,{activePanel:r,togglePanel:i}=(0,f.useContext)(c8),a=r===t;return(0,m.jsx)(c9.Provider,{value:{onToggle:()=>i(t),value:t},children:(0,m.jsx)(dc,{isActive:a?"true":"false","data-open":String(a),children:n})})},dt=e=>{let{children:t}=e,{activePanel:n}=(0,f.useContext)(c8),{onToggle:r,value:i}=(0,f.useContext)(c9),a=n===i;return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsxs)(da,{onClick:r,"data-open":String(a),children:[(0,m.jsx)(dl,{children:t}),(0,m.jsx)(dh,{isactive:a?"true":"false",children:(0,m.jsx)(te.default,{height:"16px",width:"16px",strokeWidth:"2"})})]}),(0,m.jsx)(ds,{})]})},dn=e=>{let{children:t}=e,{activePanel:n}=(0,f.useContext)(c8),{value:r}=(0,f.useContext)(c9);return(0,m.jsx)(dd,{"data-open":String(n===r),children:(0,m.jsx)(du,{children:t})})},dr=e=>{let{children:t}=e,{activePanel:n}=(0,f.useContext)(c8),{value:r}=(0,f.useContext)(c9);return(0,m.jsx)(du,{children:"function"==typeof t?t({isActive:n===r}):t})},di=L.styled.div.withConfig({displayName:"AccordionRoot",componentId:"sc-d25f9267-0"})(["display:flex;flex-direction:column;width:100%;gap:8px;"]),da=L.styled.div.withConfig({displayName:"AccordionTriggerContainer",componentId:"sc-d25f9267-1"})(["display:flex;justify-content:space-between;align-items:center;width:100%;cursor:pointer;padding-bottom:8px;"]),ds=L.styled.div.withConfig({displayName:"AccordionDivider",componentId:"sc-d25f9267-2"})(["width:100%;&&{border-top:1px solid;border-color:var(--privy-color-foreground-4);}padding-bottom:12px;"]),dl=L.styled.div.withConfig({displayName:"AccordionTriggerContent",componentId:"sc-d25f9267-3"})(["font-size:14px;font-weight:500;line-height:19.6px;width:100%;padding-right:8px;"]),dc=L.styled.div.withConfig({displayName:"AccordionPanelContainer",componentId:"sc-d25f9267-4"})(["display:flex;flex-direction:column;width:100%;overflow:hidden;padding:12px;&&{border:1px solid;border-color:var(--privy-color-foreground-4);border-radius:var(--privy-border-radius-md);}"]),dd=L.styled.div.withConfig({displayName:"AccordionContentContainer",componentId:"sc-d25f9267-5"})(["position:relative;overflow:hidden;transition:max-height 25ms ease-out;&[data-open='true']{max-height:700px;}&[data-open='false']{max-height:0;}"]),du=L.styled.div.withConfig({displayName:"ContentWrapper",componentId:"sc-d25f9267-6"})(["display:flex;flex-direction:column;gap:12px;flex:1 1 auto;min-height:1px;"]),dh=L.styled.div.withConfig({displayName:"IconWrapper",componentId:"sc-d25f9267-7"})(["transform:",";"],e=>"true"===e.isactive?"rotate(180deg)":"rotate(0deg)"),dp=e=>{var t,n;return(0,m.jsx)(df,{href:"ethereum"===e.chainType?((e,t)=>{let{chains:n}=(0,R.u)(),r="https://etherscan.io/address/".concat(t),i="".concat(((e,t)=>{var n;let r=Number(e),i=t.find(e=>e.id===r);if(!i)throw new eb.x("Unsupported chainId ".concat(e),4901);return null==(n=i.blockExplorers)?void 0:n.default.url}
1)(e,n),"/address/").concat(t);try{new URL(i)}catch(e){return r}return i})(e.chainId,e.walletAddress):(t=e.walletAddress,n=e.chainId,"https://explorer.solana.com/account/".concat(t,"?chain=").concat(n)),target:"_blank",children:oq(e.walletAddress)})},df=L.styled.a.withConfig({displayName:"StyledLink",componentId:"sc-dd6c0f9f-0"})(["&:hover{text-decoration:underline;}"]),dg=e=>{let{from:t,to:n,txn:r,transactionInfo:i,tokenPrice:a,gas:o,tokenSymbol:s}=e,l=BigInt((null==r?void 0:r.value)||0);return(0,m.jsx)(c7,{...lt().render.standalone?{defaultValue:"details"}:{},children:(0,m.jsxs)(de,{value:"details",children:[(0,m.jsx)(dt,{children:(0,m.jsxs)(dm,{children:[(0,m.jsx)("div",{children:(null==i?void 0:i.title)||"Details"}),(0,m.jsx)(dy,{children:(0,m.jsx)(cF,{weiQuantities:[l],tokenPrice:a,tokenSymbol:s})})]})}),(0,m.jsxs)(dn,{children:[(0,m.jsx)(cS,{label:"From",children:(0,m.jsx)(dp,{walletAddress:t,chainId:r.chainId||1,chainType:"ethereum"})}),(0,m.jsx)(cS,{label:"To",children:(0,m.jsx)(dp,{walletAddress:n,chainId:r.chainId||1,chainType:"ethereum"})}),i&&i.action&&(0,m.jsx)(cS,{label:"Action",children:i.action}),o&&(0,m.jsx)(c2,{value:r.value,gas:o,tokenPrice:a,tokenSymbol:s})]}),(0,m.jsx)(dr,{children:e=>{let{isActive:t}=e;return(0,m.jsx)(c3,{value:r.value,displayFee:t,gas:o||"0x0",tokenPrice:a,tokenSymbol:s})}})]})})},dm=L.styled.div.withConfig({displayName:"AccordionTriggerContent",componentId:"sc-2eff9f5c-0"})(["display:flex;flex-direction:row;justify-content:space-between;"]),dy=L.styled.div.withConfig({displayName:"TotalText",componentId:"sc-2eff9f5c-1"})(["flex-shrink:0;padding-left:8px;"]),dv=function(){let{enabled:e=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{showFiatPrices:t,getUsdPriceForSol:n}=(0,R.u)(),[r,i]=(0,f.useState)(!0),[a,o]=(0,f.useState)(void 0),[s,l]=(0,f.useState)(void 0);return(0,f.useEffect)(()=>{(async()=>{if(t&&e)try{i(!0);let e=await n();e?l(e):o(Error("Unable to fetch SOL price"))}catch(e){o(e)}finally{i(!1)}else i(!1)})()}
1,[]),{solPrice:s,isSolPriceLoading:r,solPriceError:a}};function db(e){let{tokenPrice:t,isTokenPriceLoading:n,tokenPriceError:r}=(e=>{let{showFiatPrices:t,getUsdTokenPrice:n,chains:r}=(0,R.u)(),[i,a]=(0,f.useState)(!0),[o,s]=(0,f.useState)(void 0),[l,c]=(0,f.useState)(void 0);return(0,f.useEffect)(()=>{e||(e=1);let i=(0,eo.addToDefaultChains)(r).find(t=>t.id===Number(e));(async()=>{if(t){if(!i)return a(!1),s(Error("Unable to fetch token price on chain id ".concat(e)));try{a(!0);let e=await n(i);e?c(e):s(Error("Unable to fetch token price on chain id ".concat(i.id)))}catch(e){s(e)}finally{a(!1)}}else a(!1)})()},[e]),{tokenPrice:l,isTokenPriceLoading:i,tokenPriceError:o}})("solana"===e?-1:e),{solPrice:i,isSolPriceLoading:a,solPriceError:o}=dv({enabled:"solana"===e});return"solana"===e?{tokenPrice:i,isTokenPriceLoading:a,tokenPriceError:o}:{tokenPrice:t,isTokenPriceLoading:n,tokenPriceError:r}}let dw=(0,f.createContext)(null);function dx(){let e=(0,f.useContext)(dw);return null===e?(console.warn("`useWallets` was called outside the PrivyProvider component"),{wallets:[],ready:!1}):e}async function dC(e,t,n,r){let i=(0,tt.toViemTransactionSerializable)(e),a=await (async()=>r?await r():await t.prepareTransactionRequest({...i,account:{address:n,type:"json-rpc"}}))();return{...a,type:tt.STRING_TO_NUMBER_TXN_TYPE[a.type]}}let dE=L.styled.div.withConfig({displayName:"StackedContainer",componentId:"sc-f7e7d474-0"})(["display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%;height:82px;> div{position:relative;}> div > span{position:absolute;left:-41px;top:-41px;}> div > :last-child{position:absolute;left:-19px;top:-19px;}"]),dk=["error","invalid_request_arguments","wallet_not_on_device","invalid_recovery_pin","insufficient_funds","missing_or_invalid_mfa","mfa_verification_max_attempts_reached","mfa_timeout","twilio_verification_failed"];class dS extends Error{constructor(e,t){super(t),this.type=e}}function dI(e){let t=e.type;return"string"==typeof t&&dk.includes(t)}function dA(e){return dI(e)&&"wallet_not_on_device"===e.type}function dT(e){return!!dI(e)&&"mfa_timeout"===e.type}function d_(e){return!!dI(e)&&"missing_or_invalid_mfa"===e.type}function dj(e){return!!dI(e)&&"mfa_verification_max_attempts_reached"===e.type}function dP(e){return!(!dI(e)||!e.message.includes("code 429"))}function d$(e){let t;return"string"==typeof(t=e.type)&&"client_error"===t&&"MFA canceled"===e.message}let dN=()=>window.open(void 0,void 0,dO({w:440,h:680})),dO=e=>{let{w:t,h:n}=e,r=void 0!==window.screenLeft?window.screenLeft:window.screenX,i=void 0!==window.screenTop?window.screenTop:window.screenY,a=window.innerWidth?window.innerWidth:document.documentElement.clientWidth?document.documentElement.clientWidth:screen.width,o=window.innerHeight?window.innerHeight:document.documentElement.clientHeight?document.documentElement.clientHeight:screen.height;return"toolbar=0,location=0,menubar=0,height=".concat(n,",width=").concat(t,",popup=1,left=").concat((a-t)/2/(a/window.screen.availWidth)+r,",top=").concat((o-n)/2/(o/window.screen.availHeight)+i)},dM=e=>{let{title:t,description:n,children:r,...i}=e;return(0,m.jsx)(dL,{...i,children:(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("h3",{children:t}),"string"==typeof n?(0,m.jsx)("p",{children:n}):n,r]})})},dR=e=>{let{title:t,description:n,icon:r,children:i,...a}=e;return(0,m.jsxs)(dD,{...a,children:[r||null,(0,m.jsx)("h3",{children:t}),n&&"string"==typeof n?(0,m.jsx)("p",{children:n}):n,i]})},dL=L.styled.div.withConfig({displayName:"StyledSection",componentId:"sc-523a75d6-1"})(["display:flex;flex-direction:column;justify-content:flex-start;align-items:flex-start;text-align:left;gap:8px;width:100%;margin-bottom:24px;&& h3{font-size:17px;color:var(--privy-color-foreground);}&& p{color:var(--privy-color-foreground-2);font-size:14px;}"]),dD=(0,L.styled)(dL).withConfig({displayName:"CenteredStyledSection",componentId:"sc-523a75d6-2"})(["align-items:center;text-align:center;gap:16px;h3{margin-bottom:24px;}"]),dF=e=>(0,m.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 21 20",...e,children:[(0,m.jsx)("path",{fill:"url(#icloud-gradient)",d:"M12.34 7.315a4.26 4.26 0 0 0-3.707 2.18 2.336 2.336 0 0 0-1.02-.236 2.336 2.336 0 0 0-2.3 1.963 3.217 3.217 0 0 0 1.244 6.181c.135-.001.27-.01.404-.029h8.943c.047.004.094.006.141.007.045-.001.09-.004.135-.007h.214v-.016a2.99 2.99 0 0 0 1.887-.988c.487-.55.757-1.261.757-1.998v-.006a3.017 3.017 0 0 0-.69-1.915 2.992 2.992 
10 0 0-1.748-1.034 4.26 4.26 0 0 0-4.26-4.102Z"}),(0,m.jsx)("defs",{children:(0,m.jsxs)("linearGradient",{id:"icloud-gradient",x1:19.086,x2:3.333,y1:14.38,y2:14.163,gradientUnits:"userSpaceOnUse",children:[(0,m.jsx)("stop",{stopColor:"#3E82F4"}),(0,m.jsx)("stop",{offset:1,stopColor:"#93DCF7"})]})})]}),dU=e=>{let{style:t,...n}=e;return(0,m.jsxs)("svg",{width:"16",height:"14",style:t,viewBox:"0 0 16 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n,children:[(0,m.jsxs)("g",{clipPath:"url(#clip0_2115_829)",children:[(0,m.jsx)("path",{d:"M2.34709 12.9404L2.3471 12.9404L2.34565 12.938L1.64031 11.7448L1.64004 11.7444L0.651257 10.0677C0.640723 10.0496 0.630746 10.0314 0.621325 10.0129H4.16461L2.39424 13.0139C2.3775 12.9901 2.36178 12.9656 2.34709 12.9404Z",fill:"#0066DA",stroke:"#6366F1"}),(0,m.jsx)("path",{d:"M8 4.48713L5.47995 0.215332C5.23253 0.358922 5.02176 0.556358 4.87514 0.80764L0.219931 8.70508C0.076007 8.95094 0.000191627 9.22937 0 9.51277H5.04009L8 4.48713Z",fill:"#00AC47"}),(0,m.jsx)("path",{d:"M13.48 13.7847C13.7274 13.6411 13.9382 13.4437 14.0848 13.1924L14.3781 12.6988L15.7801 10.3206C15.9267 10.0693 16.0001 9.79114 16.0001 9.51294H10.9596L12.0321 11.577L13.48 13.7847Z",fill:"#EA4335"}),(0,m.jsx)("path",{d:"M8.00003 4.48718L10.5201 0.215385C10.2726 0.0717949 9.98857 0 9.69533 0H6.30472C6.01148 0 5.7274 0.0807692 5.47998 0.215385L8.00003 4.48718Z",fill:"#00832D"}),(0,m.jsx)("path",{d:"M10.9599 9.51294H5.04007L2.52002 13.7847C2.76744 13.9283 3.05152 14.0001 3.34476 14.0001H12.6552C12.9484 14.0001 13.2325 13.9194 13.4799 13.7847L10.9599 9.51294Z",fill:"#2684FC"}),(0,m.jsx)("path",{d:"M13.4525 4.75636L11.1249 0.80764C10.9782 0.556358 10.7675 0.358922 10.52 0.215332L8 4.48713L10.9599 9.51277H15.9908C15.9908 9.23456 15.9175 8.95636 15.7709 8.70508L13.4525 4.75636Z",fill:"#FFBA00"})]}),(0,m.jsx)("defs",{children:(0,m.jsx)("clipPath",{id:"clip0_2115_829",children:(0,m.jsx)("rect",{width:"16",height:"14",fill:"white"})})})]})};async function dB(e){let{url:t,popup:n,provider:r}=e;return n.location=t,new Promise((e,t)=>{function r(){null==n||n.close(),window.removeEventListener("message",i)}function i(n){n.data&&("PRIVY_OAUTH_RESPONSE"===n.data.type&&n.data.stateCode&&n.data.authorizationCode&&(e(n.data),r()),"https://cdn.apple-cloudkit.com"===n.origin&&n.data.ckSession&&(e({type:"PRIVY_OAUTH_RESPONSE",ckWebAuthToken:n.data.ckSession}),r()),"PRIVY_OAUTH_ERROR"===n.data.type&&(t(n.data.error),r()))}window.addEventListener("message",i)})}async function dz(e){let{api:t,provider:n,stateCode:r,codeVerifier:i,authorizationCode:a}=e;if(!a||!r)throw new eb.P("[OAuth AuthFlow] Authorization and state codes code must be set prior to calling authenicate.");if("undefined"===a)throw new eb.P("User denied confirmation during OAuth flow");try{return(await t.post(eb.af,{authorization_code:a,state_code:r,code_verifier:i,provider:n})).access_token}catch(t){let e=(0,eb.f)(t);if(e.privyErrorCode)throw new eb.P(e.message||"Invalid code during OAuth flow.",void 0,e.privyErrorCode);if("User denied confirmation during OAuth flow"===e.message)throw new eb.P("Invalid code during oauth flow.",void 0,eb.h.OAUTH_USER_DENIED);throw new eb.P("Invalid code during OAuth flow.",void 0,eb.h.UNKNOWN_AUTH_ERROR)}}async function dW(e){let{api:t,provider:n}=e,r=oy(),i=ov(),a=await ob(r);try{return"icloud"===n?{url:(await t.post(eb.ag,{client_type:"web"})).url}:{url:(await t.post(eb.ah,{redirect_to:window.location.href,code_challenge:a,state_code:i})).url,codeVerifier:r,stateCode:i,provider:n}}catch(e){throw(0,eb.f)(e)}}let dq=function(e){var t;let{chainType:n,walletIndex:r}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return null!=(t=null==e?void 0:e.linkedAccounts.filter(e=>"wallet"===e.type&&"privy"===e.walletClientType&&(void 0===r||e.walletIndex===r)&&(void 0===n||e.chainType===n)))?t:[]},dH=async e=>{let{user:t,accessToken:n,proxy:r,refreshSessionAndUser:i,privy:a,appConfig:o,recoverEmbeddedWallet:s,setUser:l,walletIndex:c,chainType:d,recoveryMethod:u,recoveryPassword:h,recoveryAccessToken:p}=e;if(0===c)if("user-controlled-server-wallets-only"===o.embeddedWallets.mode)await (0,es.create)(a,{request:{chain_type:d}});else if("ethereum"===d){let e=(0,g.l)(t);e&&await s({address:e.address}),await r.create({accessToken:n,solanaAddress:null==e?void 0:e.address,recoveryMethod:u,recoveryPassword:h,recoveryAccessToken:p})}else{if("solana"!==d)throw Error("Invalid input to create wallet");{let e=(0,g.b)(t);e&&await s({address:e.address}),await r.createSolana({accessToken:n,ethereumAddress:null==e?void 0:e.address,recoveryMethod:u,recoveryPassword:h,recoveryAccessToken:p})}}else if("user-controlled-server-wallets-only"===o.embeddedWallets.mode)await (0,es.create)(a,{request:{chain_type:d}});else{let{entropyId:e,entropyIdVerifier:i}=se(t);await s(),await r.addWallet({accessToken:n,entropyId:e,entropyIdVerifier:i,chainType:d,hdWalletIndex:c})}
1let f=await i(),m=dq(f,{chainType:d,walletIndex:c})[0];return l(f),{user:f,account:m}},dV=()=>{let{walletProxy:e,recoverEmbeddedWallet:t,setUser:n,refreshSessionAndUser:r,privy:i,client:a}=(0,R.u)(),o=lt();return{create:async s=>{let{walletIndex:l,chainType:c,latestUser:d,recoveryMethod:u,recoveryPassword:h,recoveryAccessToken:p}=s,f=d;f||(f=await r());let g=await a.getAccessToken();if(!f||!g||!e)throw Error("User must be authenticated before creating a Privy wallet");return await dH({appConfig:o,user:f,refreshSessionAndUser:r,privy:i,accessToken:g,proxy:e,recoverEmbeddedWallet:t,setUser:n,walletIndex:l,chainType:c,recoveryMethod:u,recoveryPassword:h,recoveryAccessToken:p})}}},dG=e=>{let{title:t,description:n,onClose:r}=e;return(0,m.jsx)(ck,{title:t,subtitle:n,icon:y.CheckCircle,iconVariant:"success",watermark:!0,onBack:r})},dK={component:()=>{let{user:e}=(0,g.u)(),{closePrivyModal:t,isNewUserThisSession:n,updateWallets:r}=(0,R.u)(),{data:i,onUserCloseViaDialogOrKeybindRef:a}=lc(),o=lt(),{onSuccess:s,onFailure:l,callAuthOnSuccessOnClose:c}=i.createWallet,d=()=>{var n;let i=null!=(n=(0,g.b)(e))?n:(0,g.l)(e);e&&i?(r(),s({user:e,account:i})):l(Error("Failed to create wallet")),t({shouldCallAuthOnSuccess:c})};return(0,f.useEffect)(()=>{let e=setTimeout(d,2500);return()=>clearTimeout(e)},[]),a.current=d,(0,m.jsx)(dG,{title:n?"Welcome"+((null==o?void 0:o.name)?" to ".concat(null==o?void 0:o.name):""):"All set!",description:n?"You've successfully created an account.":"Your account is secured.",onClose:d})}},dY=L.styled.div.withConfig({displayName:"RecoveryContainer",componentId:"sc-12b46968-0"})(["display:flex;flex-direction:column;gap:12px;padding-top:24px;padding-bottom:24px;"]),dZ=L.styled.div.withConfig({displayName:"RecoveryExplainerContainer",componentId:"sc-12b46968-1"})(["padding-bottom:24px;"]),dJ={"google-drive":{name:"Google Drive",component:dU},icloud:{name:"iCloud",component:dF}},dQ={component:()=>{var e;let{logout:t}=(0,g.u)(),{navigate:n,setModalData:r,data:i}=lc(),{closePrivyModal:a,createAnalyticsEvent:o}=(0,R.u)(),{execute:s}=(()=>{let{client:e,walletProxy:t,refreshSessionAndUser:n}=(0,R.u)(),{data:r}=lc(),{user:i}=(0,g.u)(),a=lg(),{create:o}=dV();return{execute:async s=>{let l,c,{provider:d,action:u,popup:h,shouldCreateEth:p,shouldCreateSol:f}=s;if(!e)throw new eb.P("Missing client");function m(t){if(!t&&e)throw e.createAnalyticsEvent({eventName:"recovery_oauth_error",payload:{error:"Unable to open recovery OAuth popup",provider:d}}),new eb.P("Recovery OAuth failed")}switch(d){case"google-drive":{let t,n,{url:r,codeVerifier:i,stateCode:a}=await dW({api:e.api,provider:d});m(r);try{let i=await dB({url:r,popup:h,provider:d});if(t=i.stateCode,n=i.authorizationCode,t!==a)throw e.createAnalyticsEvent({eventName:"possible_phishing_attempt",payload:{provider:d,storedStateCode:null!=a?a:"",returnedStateCode:null!=t?t:""}}),new eb.P("Unexpected auth flow. This may be a phishing attempt.",void 0,eb.h.OAUTH_UNEXPECTED)}catch(t){throw e.createAnalyticsEvent({eventName:"recovery_oauth_error",payload:{error:t.toString(),provider:d}}),new eb.P("Recovery OAuth failed")}[l,c]=await Promise.all([e.getAccessToken(),dz({api:e.api,provider:d,codeVerifier:i,stateCode:t,authorizationCode:n})]);break}case"icloud":{let{url:t}=await dW({api:e.api,provider:d});m(t);let{ckWebAuthToken:n}=await dB({url:t,popup:h,provider:d});c=n,l=await e.getAccessToken()}}if(!t)throw new eb.P("Cannot connect to wallet proxy");if(!l)throw new eb.P("Unable to authorize user");switch(u){case"recover":{var y,b;let n=null==r||null==(y=r.recoverWallet)?void 0:y.entropyId,i=null==r||null==(b=r.recoverWallet)?void 0:b.entropyIdVerifier;if(!n||!i)throw new eb.P("Recovery OAuth failed");e.createAnalyticsEvent({eventName:"embedded_wallet_recovery_started",payload:{walletAddress:n,recoveryMethod:d}}),await t.recover({accessToken:l,entropyId:n,entropyIdVerifier:i,recoveryAccessToken:c}),e.createAnalyticsEvent({eventName:"embedded_wallet_recovery_completed",payload:{walletAddress:n,recoveryMethod:d}});break}case"create-wallet":{let t;if(e.createAnalyticsEvent({eventName:"embedded_wallet_creation_started"}),p&&f)t=await o({recoveryMethod:d,recoveryAccessToken:c,chainType:"ethereum",walletIndex:0,latestUser:i}),t=await o({chainType:"solana",walletIndex:0,latestUser:t.user});else if(f)t=await o({recoveryMethod:d,recoveryAccessToken:c,chainType:"solana",walletIndex:0,latestUser:i});else{if(!p)throw Error("Invalid args to create wallet");t=await o({recoveryMethod:d,recoveryAccessToken:c,chainType:"ethereum",walletIndex:0,latestUser:i})}if(!t)throw a("createWallet","onError",eb.h.UNKNOWN_EMBEDDED_WALLET_ERROR),Error("Failed to create wallet");e.createAnalyticsEvent({eventName:"embedded_wallet_creation_completed",payload:{walletAddress:t.account.address}}),a("createWallet","onSuccess",{wallet:t.account});break}case"set-recovery":{let r=(0,g.a)(i);if(!r)throw a("setWalletRecovery","onError",eb.h.EMBEDDED_WALLET_NOT_FOUND),Error("Embedded wallet not found");e.createAnalyticsEvent({eventName:"embedded_wallet_set_recovery_started",payload:{walletAddress:r.address,existingRecoveryMethod:r.re
1coveryMethod,targetRecoveryMethod:d}});let{entropyId:o,entropyIdVerifier:s}=se(i);await t.setRecovery({accessToken:l,entropyId:o,entropyIdVerifier:s,recoveryMethod:d,recoveryAccessToken:c});let u=(0,g.a)(await n());if(!u)throw a("createWallet","onError",eb.h.UNKNOWN_EMBEDDED_WALLET_ERROR),Error("Failed to set recovery on wallet");e.createAnalyticsEvent({eventName:"embedded_wallet_set_recovery_completed",payload:{walletAddress:r.address,existingRecoveryMethod:r.recoveryMethod,targetRecoveryMethod:d}}),a("setWalletRecovery","onSuccess",{method:d,wallet:u});break}default:throw new eb.P("Unsupported recovery action")}}}})(),[l,c]=(0,f.useState)(!1),{provider:d,action:u,isInAccountCreateFlow:h,shouldCreateEth:p,shouldCreateSol:y}=null==i?void 0:i.recoveryOAuthStatus,[b,w]=(0,f.useState)(void 0),[x,C]=(0,f.useState)("create-wallet"===u);if("user-passcode"===d)throw Error("RecoveryOAuthScreen should never be called with a wallet that specifies recoveryMethod: `user-passcode`");let E=dJ[d].name,k=dJ[d].component,S=null==i||null==(e=i.recoverWallet)?void 0:e.onCompleteNavigateTo,I=new a1(async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"create-wallet";return C(!0),new Promise((t,n)=>{setTimeout(async()=>{try{let n=window.open();await s({provider:d,action:e,popup:n,shouldCreateEth:p,shouldCreateSol:y}),c(!0),t()}catch(t){w({message:"".concat("recover"===e?"Recovery":"Back up"," with ").concat(E," unsuccessful"),detail:"recover"===u?"Please verify that you are selecting the ".concat(E," account associated with your backup."):"",retryable:!0}),n()}},0)})});(0,f.useEffect)(()=>{"recover"!==u&&I.execute(h?"create-wallet":"set-recovery")},[]),(0,f.useEffect)(()=>{if(!l)return;let e=setTimeout(()=>{h?(r({createWallet:{onSuccess:()=>{},onFailure:e=>{o({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,screen:"RecoveryOAuthScreen"}}),t()},callAuthOnSuccessOnClose:!0,shouldCreateEth:!1,shouldCreateSol:!1}}),n(dK)):a({shouldCallAuthOnSuccess:!1})},a5);return()=>clearTimeout(e)},[l]);let A=(0,f.useCallback)(async()=>{await I.execute("recover"),S?n(S):c(!0)},[]),T="google-drive"===d?"Google Drive":"Apple iCloud",_=l&&"Successfully ".concat("recover"===u?"recovered":"backed up"," with ").concat(T,".")||b&&b.message||"".concat("recover"===u?"Recovering":"Backing up"," with ").concat(T,"..."),j=b?b.detail:"";return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(l1,{}),x?(0,m.jsx)(m.Fragment,{children:(0,m.jsxs)(dY,{children:[(0,m.jsx)(dR,{title:_,icon:(0,m.jsx)(k,{style:{width:"38px",height:"38px"}}),description:j}),b&&(null==b?void 0:b.retryable)?(0,m.jsx)(lz,{onClick:()=>{oN(),w(void 0),"create-wallet"===u?I.execute("create-wallet"):A()},disabled:!l&&!(null==b?void 0:b.retryable),children:"Try again"}):null]})}):(0,m.jsxs)(dY,{children:[(0,m.jsx)(dR,{title:"Confirm it's really you",icon:(0,m.jsx)(k,{style:{height:42,width:48}}),description:"To confirm your identity, please log in to ".concat(T," where your account is backed up.")}),(0,m.jsxs)(lz,{onClick:A,children:["Confirm with ",T]})]}),(0,m.jsx)(lj,{})]})}},dX=L.styled.div.withConfig({displayName:"IconContainer",componentId:"sc-ccfae04f-0"})(["width:24px;height:24px;display:flex;justify-content:center;align-items:center;"]),d0={"google-drive":"Google Drive",icloud:"iCloud","user-passcode":"password",privy:"Privy","privy-v2":"Privy"},d1=e=>{let{onClose:t}=e;return(0,m.jsxs)(dZ,{children:[(0,m.jsx)(dR,{title:"Why do I need to secure my account?",icon:(0,m.jsx)(eE.default,{width:48}),description:(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("p",{children:"Your app uses cryptography to secure your account. App secrets are split and encrypted so only you can access them."}),(0,m.jsx)("p",{children:"To use this app on new devices, secure account secrets using a password, your Google or your Apple account. It’s important you don’t lose access to the method you choose."})]})}),(0,m.jsx)(lz,{onClick:t,children:"Select backup method"})]})},d2={component:()=>{let[e,t]=(0,f.useState)(!1),{navigate:n,lastScreen:r,navigateBack:i,setModalData:a,data:o,onUserCloseViaDialogOrKeybindRef:s}=lc(),{user:l}=(0,g.u)(),{embeddedWallets:c}=lt(),{closePrivyModal:d}=(0,R.u)(),u=(0,g.a)(l),h=null===u,{isInAccountCreateFlow:p,isResettingPassword:y,shouldCreateEth:b,shouldCreateSol:w}=o.recoverySelection,x=u&&"privy"!==u.recoveryMethod,C=x?(0,m.jsxs)("span",{children:["Your account is currently secured using"," ",(0,m.jsx)("strong",{children:d0[(null==u?void 0:u.recoveryMethod)||"user-passcode"]}),"."]}):"Select a method for logging in on new devices and recovering your account.";function E(e){a({recoveryOAuthStatus:{provider:e,action:h?"create-wallet":"set-recovery",isInAccountCreateFlow:p,shouldCreateEth:b,shouldCreateSol:w}}),n(dQ)}function k(){var e,t,n;null==o||null==(e=o.setWalletPassword)||e.onFailure(Error("User exited set recovery flow")),d({shouldCallAuthOnSuccess:null!=(n=null==o||null==(t=o.setWalletPassword)?void 0:t.callAuthOnSuccessOnClose)&&n})}return s.current=k,(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(l1,{onClose:k,backFn:e?()=>t(!1):r?i:void 0,infoFn:r||e?void 0:()=>t(!0)},"header"),e?(0,m.jsx)(d1,{onClose:()=>t(!1)}):(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(dR,{title:x?"Update backup method":"Secure your account",icon:(0,m.jsx)(eR.default,{width:48}),description:C}
1),(0,m.jsx)(dY,{children:c.userOwnedRecoveryOptions.filter(e=>!["icloud","google-drive"].includes((null==u?void 0:u.recoveryMethod)||"")||e!==(null==u?void 0:u.recoveryMethod)).sort().map(e=>{switch(e){case"google-drive":return(0,m.jsxs)(lC,{onClick:()=>E("google-drive"),children:[(0,m.jsx)(dX,{children:(0,m.jsx)(dU,{style:{width:18}})}),"Back up to Google Drive"]},e);case"icloud":return(0,m.jsxs)(lC,{onClick:()=>E("icloud"),children:[(0,m.jsx)(dX,{children:(0,m.jsx)(dF,{style:{width:24}})}),"Back up to Apple iCloud"]},e);case"user-passcode":return(0,m.jsxs)(lC,{onClick:()=>{n(yK({isCreatingWallet:h,skipSplashScreen:!0}))},children:[(0,m.jsx)(dX,{children:(0,m.jsx)(eL.default,{style:{width:18}})}),y?"Reset your":"Set a"," password"]},e);default:return null}})})]}),(0,m.jsx)(lj,{})]})}},d3=(0,L.css)(["font-size:14px;font-style:normal;font-weight:400;line-height:20px;letter-spacing:-0.008px;text-align:left;transition:color 0.1s ease-in;"]),d5=L.styled.span.withConfig({displayName:"StatusText",componentId:"sc-acac4b9-0"})([""," transition:color 0.1s ease-in;color:",";text-transform:",";&[aria-hidden='true']{visibility:hidden;}"],d3,e=>{let{error:t}=e;return t?"var(--privy-color-error)":"var(--privy-color-foreground-3)"},e=>{let{error:t}=e;return t?"":"capitalize"}),d4=L.styled.div.withConfig({displayName:"EmbeddedWalletScreenContainer",componentId:"sc-acac4b9-1"})(["display:flex;flex-direction:column;justify-content:center;flex-grow:1;"]),d6=(0,L.styled)(lz).withConfig({displayName:"NoAnimationPrimaryButton",componentId:"sc-acac4b9-2"})(["",""],e=>{let{$hideAnimations:t}=e;return t&&(0,L.css)(["&&{transition:none;}"])}),d8=(0,L.css)(["&&{width:100%;border-width:1px;border-radius:var(--privy-border-radius-md);border-color:var(--privy-color-foreground-3);background:var(--privy-color-background);color:var(--privy-color-foreground);padding:12px;font-size:16px;font-style:normal;font-weight:300;line-height:22px;}"]),d9=L.styled.input.withConfig({displayName:"PasswordInput",componentId:"sc-acac4b9-3"})([""," &::placeholder{color:var(--privy-color-foreground-3);font-style:italic;font-size:14px;}overflow:hidden;text-overflow:ellipsis;white-space:nowrap;"],d8),d7=L.styled.div.withConfig({displayName:"PasswordDisplay",componentId:"sc-acac4b9-4"})(["",""],d8),ue=L.styled.div.withConfig({displayName:"PasswordContainer",componentId:"sc-acac4b9-5"})(["position:relative;width:100%;display:flex;align-items:center;justify-content:",";"],e=>{let{centered:t}=e;return t?"center":"space-between"}),ut=L.styled.div.withConfig({displayName:"Header",componentId:"sc-acac4b9-6"})(["display:flex;flex-direction:column;align-items:center;justify-content:center;margin:32px 0;gap:4px;& h3{font-size:18px;font-style:normal;font-weight:600;line-height:24px;}& p{max-width:300px;font-size:14px;font-style:normal;font-weight:400;line-height:20px;}"]),un=L.styled.div.withConfig({displayName:"Details",componentId:"sc-acac4b9-7"})(["display:flex;flex-direction:column;gap:10px;padding-bottom:1rem;"]),ur=L.styled.div.withConfig({displayName:"DetailItem",componentId:"sc-acac4b9-8"})(["display:flex;text-align:left;align-items:center;gap:8px;max-width:300px;font-size:14px;font-style:normal;font-weight:400;line-height:20px;letter-spacing:-0.008px;margin:0 8px;color:var(--privy-color-foreground-2);> :first-child{min-width:24px;}"]),ui=(0,L.styled)(lU).withConfig({displayName:"ExportButton",componentId:"sc-acac4b9-10"})(["display:flex;flex:1;gap:4px;justify-content:center;&&{background:var(--privy-color-background);border-radius:var(--privy-border-radius-md);border-color:var(--privy-color-foreground-3);border-width:1px;}"]),ua=L.styled.div.withConfig({displayName:"InputRightIcons",componentId:"sc-acac4b9-11"})(["position:absolute;right:0.5rem;display:flex;flex-direction:row;justify-content:space-around;align-items:center;"]),uo=(0,L.styled)(eF.default).withConfig({displayName:"RegenerateIcon",componentId:"sc-acac4b9-12"})(["height:1.25rem;width:1.25rem;stroke:var(--privy-color-accent);cursor:pointer;:active{stroke:var(--privy-color-accent-light);}"]),us=(0,L.styled)(eB.default).withConfig({displayName:"HiddenIcon",componentId:"sc-acac4b9-13"})(["height:1.25rem;width:1.25rem;stroke:var(--privy-color-accent);cursor:pointer;:active{stroke:var(--privy-color-accent-light);}"]),ul=(0,L.styled)(eU.default).withConfig({displayName:"ShownIcon",componentId:"sc-acac4b9-14"})(["height:1.25rem;width:1.25rem;stroke:var(--privy-color-accent);cursor:pointer;:active{stroke:var(--privy-color-accent-light);}"]),uc=L.styled.progress.withConfig({displayName:"StrengthMeter",componentId:"sc-acac4b9-15"}
1)(["height:4px;width:100%;margin:8px 0;::-webkit-progress-bar{border-radius:8px;background:var(--privy-color-foreground-4);}::-webkit-progress-value{border-radius:8px;transition:all 0.1s ease-out;background:",";}"],e=>{let{label:t}=e;return("Strong"===t?"#78dca6":"Medium"===t&&"var(--privy-color-warn)")||"var(--privy-color-error)"}),ud=e=>{let{buttonHideAnimations:t,buttonLoading:n,password:r,onSubmit:i,onBack:a}=e,[o,s]=(0,f.useState)(!0),[l,c]=(0,f.useState)(!1),[d,u]=(0,f.useState)(""),h=r===d;return(0,f.useEffect)(()=>{d&&!l&&c(!0)},[d]),(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(l1,{closeable:!1,backFn:a}),(0,m.jsx)(cX,{}),(0,m.jsxs)(d4,{children:[(0,m.jsxs)(ut,{children:[(0,m.jsx)(e_.default,{height:48,width:48,stroke:"var(--privy-color-background)",fill:"var(--privy-color-accent)"}),(0,m.jsx)("h3",{style:{color:"var(--privy-color-foreground)"},children:"Confirm your password"}),(0,m.jsx)("p",{style:{color:"var(--privy-color-foreground-2)"},children:"Please re-enter your password below to continue."})]}),(0,m.jsxs)(ue,{children:[(0,m.jsx)(d9,{value:d,onChange:e=>u(e.target.value),onKeyUp:e=>{"Enter"===e.key&&i()},onBlur:()=>c(!0),placeholder:"confirm your password",type:o?"password":"text",style:{paddingRight:"2.3rem"}}),(0,m.jsx)(ua,{style:{right:"0.75rem"},children:o?(0,m.jsx)(us,{onClick:()=>s(!1)}):(0,m.jsx)(ul,{onClick:()=>s(!0)})})]}),(0,m.jsx)(d5,{"aria-hidden":!l||h,error:!0,children:"Passwords do not match"})]}),(0,m.jsx)(d6,{onClick:i,loading:n,disabled:!h,$hideAnimations:t,children:"Continue"}),(0,m.jsx)(c0,{}),(0,m.jsx)(lj,{})]})},uu=e=>{let{className:t,checked:n,color:r="var(--privy-color-accent)",...i}=e;return(0,m.jsx)("label",{children:(0,m.jsxs)(uh,{className:t,children:[(0,m.jsx)(uf,{checked:n,...i}),(0,m.jsx)(ug,{color:r,checked:n,children:(0,m.jsx)(up,{viewBox:"0 0 24 24",children:(0,m.jsx)("polyline",{points:"20 6 9 17 4 12"})})})]})})},uh=L.styled.div.withConfig({displayName:"CheckboxContainer",componentId:"sc-db51b935-1"})(["display:inline-block;vertical-align:middle;"]),up=L.styled.svg.withConfig({displayName:"Icon",componentId:"sc-db51b935-2"})(["fill:none;stroke:white;stroke-width:3px;"]),uf=L.styled.input.attrs({type:"checkbox"}).withConfig({displayName:"HiddenCheckbox",componentId:"sc-db51b935-3"})(["border:0;clip:rect(0 0 0 0);clippath:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px;"]),ug=L.styled.div.withConfig({displayName:"StyledCheckbox",componentId:"sc-db51b935-4"})(["display:inline-block;width:18px;height:18px;transition:all 150ms;cursor:pointer;border-color:",";border-radius:3px;background:",";&&{border-width:1px;}",":focus + &{box-shadow:0 0 0 1px ",";}","{visibility:",";}"],e=>e.color,e=>e.checked?e.color:"var(--privy-color-background)",uf,e=>e.color,up,e=>e.checked?"visible":"hidden"),um=e=>{let{buttonHideAnimations:t,buttonLoading:n,onSubmit:r,onBack:i,config:a}=e,[o,s]=(0,f.useState)(!1);return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(l1,{closeable:!1,backFn:i}),(0,m.jsx)(cX,{}),(0,m.jsxs)(d4,{children:[(0,m.jsxs)(ut,{children:[(0,m.jsx)(e_.default,{height:48,width:48,stroke:"var(--privy-color-background)",fill:"var(--privy-color-error)"}),(0,m.jsx)("h3",{style:{color:"var(--privy-color-foreground)"},children:"Confirm you have saved"}),(0,m.jsx)("p",{style:{color:"var(--privy-color-foreground-2)"},children:"Losing access to your password means you will lose access to your account."})]}),(0,m.jsx)(un,{children:(0,m.jsxs)(ur,{style:{color:"var(--privy-color-error)",cursor:"pointer"},onClick:e=>{e.preventDefault(),s(e=>!e)},children:[(0,m.jsx)(uu,{color:"var(--privy-color-error)",readOnly:!0,checked:o}),(0,m.jsx)(m.Fragment,{children:"I understand that if I lose my password and device, I will lose access to my account and my assets."})]})})]}),(0,m.jsxs)(uy,{children:["user"===a.initiatedBy&&(0,m.jsx)(lV,{onClick:a.onCancel,disabled:n,children:"Cancel"}),(0,m.jsx)(d6,{onClick:r,loading:n,$hideAnimations:t,disabled:!o,children:"Set Password"})]}),(0,m.jsx)(c0,{}),(0,m.jsx)(lj,{})]})},uy=L.styled.div.withConfig({displayName:"ButtonsContainer",componentId:"sc-d1659c5f-0"})(["display:flex;gap:10px;"]),uv=/[a-z]/,ub=/[A-Z]/,uw=/[0-9]/,ux="!@#$%^&*()\\-_+.",uC="a-zA-Z0-9".concat(ux),uE=RegExp("[".concat(ux,"]")),uk=RegExp("[".concat(uC,"]")),uS=RegExp("^[".concat(uC,"]{6,}$")),uI=()=>eO.generatePassphrase(4,eM.DEFAULT_WORDLIST),uA=e=>{let{buttonHideAnimations:t,buttonLoading:n,password:r="",config:i,isResettingPassword:a,onSubmit:o,onClose:s,onBack:l,onPasswordChange:c,onPasswordGenerate:d}=e,[u,h]=(0,f.useState)(!1),[p,g]=(0,f.useState)(!1);(0,f.useEffect)(()=>{r&&!p&&g(!0)},[r]);let y=(0,f.useMemo)(()=>p?6>((null==r?void 0:r.length)||0)?"Password must be at least 6 characters":uS.test(r||"")?null:"Invalid characters used ( ".concat((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return[...new Set(e.split("").filter(e=>!uk.test(e)).map(e=>e.replace(" ","SPACE")))]})(r).join(" ")," )"):null,[r,p]),b=(0,f.useMemo)(()=>y?{value:0,label:"Weak"}:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return(.3*function(e){if(e.length<8)return 0;let t=0;return uv.test(e)&&(t+=1),ub.test(e)&&(t+=1),uw.test(e)&&(t+=1),uE.test(e)&&(t+=1),Math.max(0,Math.min(1,t/3))}(e)+(0,eN.default)(e)/95)/2}(e);return{value:t,label:t>.9?"Strong":t>.5?"Medium":"Weak"}}(r),[r,y]),w=(0,f.useMemo)(()=>!(null==r?void 0:r.length)||!!y,[y,r]);return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(l1,{onClose:s,closeable:"user"===i.initiatedBy,backFn:l}),(0,m.jsx)(cX,{}),(0,m.jsxs)(d4,{children:[(0,m.jsxs)(ut,{children:[(0,m.jsx)(ez.default,{height:48,width:48,stroke:"var(--privy-color-accent)"}),(0,m.jsxs)("h3",{style:{color:"var(--privy-color-foreground)"},children:[a?"Reset":"Set"," your password"]}),(0,m.jsx)("p",{style:{color:"var(--privy-color-foreground-2)"},children:"Select a strong, memorable password to secure your account."})]}),(0,m.jsxs)(ue,{children:[(0,m.jsx)(d9,{value:r,onChange:e=>c(e.target.value),onKeyUp:e=>{"Enter"===e.key&&o()},placeholder:"enter or generate a strong password",type:u?"password":"text",style:{paddingRight:"3.8rem"}}),(0,m.jsxs)(ua,{style:{width:"3.5rem"},children:[u?(0,m.jsx)(us,{onClick:()=>h(!1)}):(0,m.jsx)(ul,{onClick:()=>h(!0)}),(0,m.jsx)(uo,{onClick:d})]})]}),(0,m.jsx)(uc,{value:0===b.value?.01:b.value,label:b.label}),(0,m.jsx)(d5,{error:!!y,children:y||"Password Strength: ".concat(p?b.label:"--")}),(0,m.jsxs)(u_,{children:[(0,m.jsx)(uT,{children:(0,m.jsxs)(un,{children:[(0,m.jsxs)(ur,{children:[(0,m.jsx)(eW.default,{width:24,height:24,fill:"var(--privy-color-accent)"}),"This password is used to secure your account."]}),(0,m.jsxs)(ur,{children:[(0,m.jsx)(eW.default,{width:24,height:24,fill:"var(--privy-color-accent)"}),"Use it to log in on a new environment, like another browser or device."]})]})}),(0,m.jsx)(d6,{onClick:o,loading:n,disabled:w,$hideAnimations:t,children:"Continue"})]})]}),(0,m.jsx)(c0,{}),(0,m.jsx)(lj,{})]})},uT=(0,L.styled)(un).withConfig({displayName:"DetailsContainer",componentId:"sc-2da5fe90-0"})(["flex:1;padding-top:1rem;"]),u_=L.styled.div.withConfig({displayName:"LowerContainer",componentId:"sc-2da5fe90-1"})(["display:flex;flex-direction:column;height:100%;"]),uj=e=>{let{buttonHideAnimations:t,buttonLoading:n,appName:r,password:i,onSubmit:a,onBack:o}
1=e,[s,l]=(0,f.useState)(!1),[c,d]=(0,f.useState)(!0),u=(0,f.useCallback)(()=>{l(!0),i&&navigator.clipboard.writeText(i)},[i]),h=(0,f.useCallback)(()=>{let e=document.createElement("a"),t=r.toLowerCase().replace(/[^a-z\s]/g,"").replace(/\s/g,"-"),n=new Blob([uP(r,i)],{type:"text/plain"}),a=URL.createObjectURL(n);e.href=a,e.target="_blank",e.download="".concat(t,"-privy-wallet-recovery.txt"),document.body.appendChild(e),e.click(),setTimeout(()=>{e.remove(),URL.revokeObjectURL(a)},5e3)},[i]);return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(l1,{backFn:o,closeable:!1}),(0,m.jsx)(cX,{}),(0,m.jsxs)(d4,{children:[(0,m.jsxs)(ut,{children:[(0,m.jsx)(e_.default,{height:48,width:48,stroke:"var(--privy-color-background)",fill:"var(--privy-color-accent)"}),(0,m.jsx)("h3",{style:{color:"var(--privy-color-foreground)"},children:"Save your password"}),(0,m.jsx)("p",{style:{color:"var(--privy-color-foreground-2)"},children:"For your security, this password cannot be reset, so keep it somewhere safe."})]}),(0,m.jsxs)(ue,{centered:!0,children:[(0,m.jsx)(d7,{children:c?"•".repeat(i.length):i}),(0,m.jsx)(ua,{style:{right:"0.75rem"},children:c?(0,m.jsx)(us,{onClick:()=>d(!1)}):(0,m.jsx)(ul,{onClick:()=>d(!0)})})]}),(0,m.jsxs)("div",{style:{display:"flex",margin:"12px 0",gap:"12px"},children:[(0,m.jsx)(ui,{onClick:u,children:(0,m.jsxs)(m.Fragment,s?{children:[(0,m.jsx)(eH.default,{style:{width:24,height:24},stroke:"var(--privy-color-accent)"}),"Copied"]}:{children:[(0,m.jsx)(eV.default,{style:{width:24,height:24},stroke:"var(--privy-color-accent)"}),"Copy"]})}),(0,m.jsxs)(ui,{onClick:h,children:[(0,m.jsx)(eq.default,{style:{width:24,height:24},stroke:"var(--privy-color-accent)"}),"Download"]})]})]}),(0,m.jsx)(d6,{onClick:a,loading:n,$hideAnimations:t,children:"Continue"}),(0,m.jsx)(c0,{}),(0,m.jsx)(lj,{})]})},uP=(e,t)=>"Your wallet recovery password for ".concat(e," is\n\n").concat(t,"\n\nYou will need this password to access your ").concat(e," wallet on a new device. Please keep it somewhere safe."),u$=e=>{let{error:t,onClose:n}=e;return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(l1,{closeable:!1}),(0,m.jsx)(cX,{}),(0,m.jsxs)(cY,t?{children:[(0,m.jsx)(eG.default,{fill:"var(--privy-color-error)",width:"64px",height:"64px"}),(0,m.jsx)(dR,{title:"Something went wrong",description:t})]}:{children:[(0,m.jsx)(eW.default,{fill:"var(--privy-color-success)",width:"64px",height:"64px"}),(0,m.jsx)(dR,{title:"Success"})]}),(0,m.jsx)(lz,{onClick:n,children:"Close"}),(0,m.jsx)(c0,{}),(0,m.jsx)(lj,{})]})},uN=(e,t)=>{switch(e){case"creating":return"back"===t?e:"saving";case"saving":return"back"===t?"creating":"confirming";case"confirming":return"back"===t?"saving":"finalizing";case"finalizing":return"back"===t?"confirming":"done";default:return e}},uO=e=>{let{onSubmit:t,...n}=e,{lastScreen:r,navigate:i}=lc(),{send:a,state:o}=(()=>{let[e,t]=(0,f.useReducer)(uN,"creating");return{send:t,state:e}})(),s=(0,f.useCallback)(async()=>{"finalizing"===o&&await t(),a("next")},[o,a,t]);(0,f.useEffect)(()=>{let e;return"done"===o&&"automatic"===n.config.initiatedBy&&(e=setTimeout(()=>{var e;return null==(e=n.onClose)?void 0:e.call(n)},a5)),()=>{e&&clearTimeout(e)}},[o,n.config.initiatedBy,n.onClose]);let l=(0,f.useCallback)(()=>{a("back")},[a]),c=(0,f.useCallback)(()=>{i(d2)},[r,i]);return"creating"===o?(0,m.jsx)(uA,{...n,onSubmit:s,onBack:r===d2?c:void 0}):"saving"===o?(0,m.jsx)(uj,{...n,onSubmit:s,onBack:l}):"confirming"===o?(0,m.jsx)(ud,{...n,onSubmit:s,onBack:l}):"finalizing"===o?(0,m.jsx)(um,{...n,onSubmit:s,onBack:l}):"done"===o?(0,m.jsx)(u$,{...n,onSubmit:s}):null},uM={apple_oauth:"apple",custom_auth:"custom",discord_oauth:"discord",email:"email",farcaster:"farcaster",github_oauth:"github",google_oauth:"google",instagram_oauth:"instagram",linkedin_oauth:"linkedin",passkey:"passkey",phone:"sms",spotify_oauth:"spotify",telegram:"telegram",tiktok_oauth:"tiktok",line_oauth:"line",twitch_oauth:"twitch",twitter_oauth:"twitter",wallet:"siwe",smart_wallet:"siwe",cross_app:"privy:"},uR=e=>{if((0,g.i)(e))return{displayName:e.replace("custom:",""),loginMethod:"custom"};let t=uM[e];return"wallet"===e||"phone"===e?{displayName:e,loginMethod:t}:{displayName:t,loginMethod:t}},uL=(0,f.createContext)({}),uD=e=>{let{children:t}=e,n=lt(),[r,i]=(0,f.useState)({});return lp("login",{onComplete:e=>{let{loginAccount:t}=e;t&&"passkey"!==t.type&&"cross_app"!==t.type&&("wallet"!==t.type||"privy"!==t.walletClientType)&&(aG.put(uF(n.id),t.type),"wallet"===t.type?(aG.put(uU(n.id
1),t.walletClientType),aG.put(uB(n.id),t.chainType),i({accountType:t.type,walletClientType:t.walletClientType,chainType:t.chainType})):(aG.del(uU(n.id)),aG.del(uB(n.id)),i({accountType:t.type})))}}),(0,f.useEffect)(()=>{if(!n.id)return;let e=aG.get(uF(n.id)),t=aG.get(uU(n.id)),r=aG.get(uB(n.id));e&&i("wallet"===e?{accountType:e,walletClientType:t,chainType:r}:{accountType:e})},[n.id]),(0,m.jsx)(uL.Provider,{value:r,children:t})},uF=e=>"privy:".concat(e,":recent-login-method"),uU=e=>"privy:".concat(e,":recent-login-wallet-client"),uB=e=>"privy:".concat(e,":recent-login-chain-type"),uz=()=>(0,f.useContext)(uL),uW=()=>{var e;let t=lt(),n=null==t||null==(e=t.appearance)?void 0:e.logo,r="".concat(null==t?void 0:t.name," logo"),i={maxHeight:"90px",maxWidth:"180px"};return n?"string"==typeof n?(0,m.jsx)("img",{src:n,alt:r,style:i}):"svg"===n.type||"img"===n.type?f.default.cloneElement(n,{alt:r,style:i}):(console.warn("`config.appearance.logo` must be a string, or an SVG / IMG element. Nothing will be rendered."),null):null},uq=L.styled.div.withConfig({displayName:"AppLogoContainer",componentId:"sc-b210074-0"})(["display:flex;flex-direction:column;align-items:center;padding:24px 0;flex-grow:1;justify-content:center;"]),uH=e=>{let{name:t,logoUrl:n,size:r="38px"}=e;return"string"==typeof n?(0,m.jsx)("img",{src:n,alt:"".concat(null!=t?t:"Provider app"," logo"),style:{width:r,height:r,maxHeight:"90px",maxWidth:"180px",borderRadius:"8px"}}):(0,m.jsx)("span",{})},uV=e=>{let{appId:t}=e,[n,r]=(0,f.useState)(void 0),{startCrossAppAuthFlow:i,authenticated:a}=(0,g.u)(),{client:o}=(0,R.u)();return(0,f.useEffect)(()=>{(async()=>{o&&r(await o.getCrossAppProviderDetails(t))})()},[o]),(0,m.jsx)(lC,{onClick:()=>i({appId:t,action:a?"link":"login"}),disabled:!n,children:n?(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(uH,{name:n.name,logoUrl:n.icon_url||void 0,size:"24px"})," ",n.name]}):(0,m.jsx)(lD,{})})},uG=L.styled.a.withConfig({displayName:"StyledLink",componentId:"sc-c8577138-0"})(["&&{color:",";font-weight:400;text-decoration:",";text-underline-offset:4px;text-decoration-thickness:1px;cursor:",";opacity:",";font-size:",";line-height:",";transition:color 200ms ease,text-decoration-color 200ms ease,opacity 200ms ease;&:hover{color:",";text-decoration:",";text-underline-offset:4px;}&:active{color:",";}&:focus{outline:none;box-shadow:0 0 0 3px #949df9;border-radius:2px;}}"],e=>{let{$variant:t}=e;return"underlined"===t?"var(--privy-color-foreground)":"var(--privy-link-navigation-color, var(--privy-color-accent))"},e=>{let{$variant:t}=e;return"underlined"===t?"underline":"var(--privy-link-navigation-decoration, none)"},e=>{let{$disabled:t}=e;return t?"not-allowed":"pointer"},e=>{let{$disabled:t}=e;return t?.5:1},e=>{let{$size:t}=e;switch(t){case"xs":return"12px";case"sm":return"14px";default:return"16px"}},e=>{let{$size:t}=e;switch(t){case"xs":return"18px";case"sm":return"22px";default:return"24px"}},e=>{let{$variant:t,$disabled:n}=e;return"underlined"===t?"var(--privy-color-foreground)":"var(--privy-link-navigation-color, var(--privy-color-accent))"},e=>{let{$disabled:t}=e;return t?"none":"underline"},e=>{let{$variant:t,$disabled:n}=e;return n?"underlined"===t?"var(--privy-color-foreground)":"var(--privy-link-navigation-color, var(--privy-color-accent))":"var(--privy-color-foreground)"}),uK=e=>{let{size:t="md",variant:n="navigation",disabled:r=!1,as:i,children:a,onClick:o,...s}=e;return(0,m.jsx)(uG,{as:i,$size:t,$variant:n,$disabled:r,onClick:e=>{r?e.preventDefault():null==o||o(e)},...s,children:a})},uY=(e,t)=>!(0,g.b)(e)&&("all-users"===t||"users-without-wallets"===t&&!uZ(e).length),uZ=e=>e.linkedAccounts.filter(e=>"wallet"===e.type&&"ethereum"===e.chainType),uJ=(e,t)=>!(0,g.l)(e)&&("all-users"===t||"users-without-wallets"===t&&!uQ(e).length),uQ=e=>e.linkedAccounts.filter(e=>"wallet"===e.type&&"solana"===e.chainType),uX=(e,t)=>uY(e,t.ethereum.createOnLogin)||uJ(e,t.solana.createOnLogin),u0=e=>{let{title:t="Account not found",subtitle:n,appName:r="this app",ctaText:i="Try logging in again",onRetry:a}=e;return(0,m.jsx)(ck,{title:t,subtitle:n||"Please try logging in again or go to ".concat(r," to create an account."),icon:b.HelpCircle,iconVariant:"warning",primaryCta:{label:i,onClick:a},watermark:!0})},u1={component:()=>{let{navigate:e,setModalData:t,data:n}=lc(),r=lt(),{getAuthMeta:i,client:a}=(0,R.u)();return(0,m.jsx)(u0,{appName:null==r?void 0:r.name,onRetry:()=>{let r=i();t({...n,login:{...null==n?void 0:n.login,...(null==r?void 0:r.disableSignup)?{disableSignup:!0}:{}}}),(null==a?void 0:a.authFlow)&&(a.authFlow=void 0),e(yL)}})}},u2=L.styled.span.withConfig({displayName:"CircleBorder",componentId:"sc-9056b8b8-0"})(["&&{width:82px;height:82px;border-width:4px;border-style:solid;border-color:",";border-bottom-color:transparent;border-radius:50%;display:inline-block;box-sizing:border-box;animation:rotation 1.2s linear infinite;transition:border-color 800ms;border-bottom-color:",";}"],e=>{var t;return null!=(t=e.color)?t:"var(--privy-color-accent)"},e=>{var t;return null!=(t=e.color)?t:"var(--privy-color-accent)"}),u3=e=>{let{address:t,showCopyIcon:n,url:r,className:i}=e,[a,o]=(0,f.useState)(!1);function s(e){e.stopPropagation(),navigator.clipboard.writeText(t).then(()=>o(!0)).catch(console.error)}return(0,f.useEffect)(()=>
1{if(a){let e=setTimeout(()=>o(!1),3e3);return()=>clearTimeout(e)}},[a]),(0,m.jsxs)(u5,r?{children:[(0,m.jsx)(u6,{title:t,className:i,href:"".concat(r,"/address/").concat(t),target:"_blank",children:oq(t)}),n&&(0,m.jsx)(lV,{onClick:s,size:"sm",style:{gap:"0.375rem"},children:(0,m.jsxs)(m.Fragment,a?{children:["Copied",(0,m.jsx)(w.Check,{size:16})]}:{children:["Copy",(0,m.jsx)(x.Copy,{size:16})]})})]}:{children:[(0,m.jsx)(u4,{title:t,className:i,children:oq(t)}),n&&(0,m.jsx)(lV,{onClick:s,size:"sm",style:{gap:"0.375rem",fontSize:"14px"},children:(0,m.jsxs)(m.Fragment,a?{children:["Copied",(0,m.jsx)(w.Check,{size:14})]}:{children:["Copy",(0,m.jsx)(x.Copy,{size:14})]})})]})},u5=L.styled.span.withConfig({displayName:"AddressContainer",componentId:"sc-3a987cc8-0"})(["display:inline-flex;align-items:center;gap:0.5rem;"]),u4=L.styled.span.withConfig({displayName:"AddressText",componentId:"sc-3a987cc8-1"})(["font-size:14px;font-weight:500;color:var(--privy-color-foreground);"]),u6=L.styled.a.withConfig({displayName:"AddressLink",componentId:"sc-3a987cc8-2"})(["font-size:14px;color:var(--privy-color-foreground);text-decoration:none;&:hover{text-decoration:underline;}"]);function u8(e){return(0,m.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",...e,children:[(0,m.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,m.jsx)("line",{x1:"12",x2:"12",y1:"8",y2:"12"}),(0,m.jsx)("line",{x1:"12",x2:"12.01",y1:"16",y2:"16"})]})}let u9="11111111111111111111111111111111",u7="0x0000000000000000000000000000000000000000",he=e=>{let{originCurrency:t,destinationCurrency:n,...r}=e;return{tradeType:"EXPECTED_OUTPUT",originCurrency:null!=t?t:u7,destinationCurrency:null!=n?n:u7,...r}},ht="https://api.relay.link",hn="https://api.testnets.relay.link",hr=async e=>{var t;let{input:n,isTestnet:r}=e,i=await fetch((r?hn:ht)+"/quote",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)}),a=await i.json();if(!(i.ok||"string"==typeof a.message&&a.message.startsWith("Invalid address")))throw console.error("Relay error:",a),Error(null!=(t=a.message)?t:"Error fetching quote from relay");return a},hi=e=>{var t,n;let r=null==(n=e.steps[0])||null==(t=n.items)?void 0:t[0];if(r)return{from:r.data.from,to:r.data.to,value:Number(r.data.value),chainId:Number(r.data.chainId),data:r.data.data}};async function ha(e){var t,n;let{transactionHash:r,isTestnet:i}=e,a=await fetch((i?hn:ht)+"/requests/v2?hash="+r),o=await a.json();if(!a.ok){if("message"in o&&"string"==typeof o.message)throw Error(o.message);throw Error("Error fetching request from relay")}return null!=(n=null==(t=o.requests.at(0))?void 0:t.status)?n:"pending"}function ho(e){let{transactionHash:t,isTestnet:n,bridgingStatus:r,setBridgingStatus:i,onSuccess:a,onFailure:o}=e;(0,f.useEffect)(()=>{if(t&&r){if(["delayed","waiting","pending"].includes(r)){let e=setInterval(async()=>{try{let e=await ha({transactionHash:t,isTestnet:n});i(e)}catch(e){console.error(e)}},1e3);return()=>clearInterval(e)}"success"===r?a({transactionHash:t}):["refund","failure"].includes(r)&&o({error:new hs(t,n)})}},[r,t,n])}class hs extends eb.P{constructor(e,t){super("We were unable to complete the bridging transaction. Funds will be refunded on your wallet.",void 0,eb.h.TRANSACTION_FAILURE),this.relayLink=t?"https://testnets.relay.link/transaction/".concat(e):"https://relay.link/transaction/".concat(e)}}let hl=e=>{let{error:t,allowlistConfig:n,onRetry:r,onCaptchaReset:i,onBack:a}=e,o=((e,t)=>{if(e instanceof hs)return{title:"Transaction failed",detail:(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("span",{children:e.message}),(0,m.jsxs)("span",{children:[" ","Check the"," ",(0,m.jsx)(hd,{href:e.relayLink,target:"_blank",children:"refund status"}),"."]})]}),ctaText:"Try again",icon:C.AlertTriangle};if(e instanceof eb.P)switch(e.privyErrorCode){case eb.h.CLIENT_REQUEST_TIMEOUT:return{title:"Timed out",detail:e.message,ctaText:"Try again",icon:C.AlertTriangle};case eb.h.INSUFFICIENT_BALANCE:return{title:"Insufficient balance",detail:e.message,ctaText:"Try again",icon:C.AlertTriangle};case eb.h.TRANSACTION_FAILURE:return{title:"Transaction failure",detail:e.message,ctaText:"Try again",icon:C.AlertTriangle};default:return{title:"Something went wrong",detail:"Try again later",ctaText:"Try again",icon:C.AlertTriangle}}if(e instanceof dS&&"twilio_verification_failed"===e.type)return{title:"Something went wrong",detail:e.message,ctaText:"Try again",icon:E.Phone};if(!(e instanceof eb.aa))return e instanceof eb.G&&e.status&&[400,422].includes(e.status)?{title:"Something went wrong",detail:e.message,ctaText:"Try again",icon:C.AlertTriangle}:{title:"Something went wrong",detail:"Try again later",ctaText:"Try again",icon:C.AlertTriangle};switch(e.privyErrorCode){case eb.h.INVALID_CAPTCHA:return{title:"Something went wrong",detail:"Please try again.",ctaText:"Try again",icon:C.AlertTriangle};case eb.h.DISALLOWED_LOGIN_METHOD:return{title:"Not allowed",detail
1:e.message,ctaText:"Try another method",icon:C.AlertTriangle};case eb.h.ALLOWLIST_REJECTED:return{title:t.errorTitle||"You don't have access to this app",detail:t.errorDetail||"Have you been invited?",ctaText:t.errorCtaText||"Try another account",icon:k.Lock};case eb.h.CAPTCHA_FAILURE:return{title:"Something went wrong",detail:"You did not pass CAPTCHA. Please try again.",ctaText:"Try again",icon:null};case eb.h.CAPTCHA_TIMEOUT:return{title:"Something went wrong",detail:"Something went wrong! Please try again later.",ctaText:"Try again",icon:null};case eb.h.LINKED_TO_ANOTHER_USER:return{title:"Authentication failed",detail:"This account has already been linked to another user.",ctaText:"Try again",icon:C.AlertTriangle};case eb.h.NOT_SUPPORTED:return{title:"This region is not supported",detail:"SMS authentication from this region is not available",ctaText:"Try another method",icon:C.AlertTriangle};case eb.h.TOO_MANY_REQUESTS:return{title:"Request failed",detail:"Too many attempts.",ctaText:"Try again later",icon:C.AlertTriangle};default:return{title:"Something went wrong",detail:"Try again later",ctaText:"Try again",icon:C.AlertTriangle}}})(t,n);return(0,m.jsx)(ck,{title:o.title,subtitle:o.detail,icon:o.icon,onBack:a,iconVariant:"error",primaryCta:{label:o.ctaText,onClick:()=>{t instanceof eb.aa&&(t.privyErrorCode===eb.h.INVALID_CAPTCHA&&(null==i||i()),t.privyErrorCode===eb.h.ALLOWLIST_REJECTED&&n.errorCtaLink)?window.location.href=n.errorCtaLink:null==r||r()},variant:"error"},watermark:!0})},hc={component:()=>{var e,t;let{navigate:n,data:r,lastScreen:i,currentScreen:a}=lc(),o=lt(),{reset:s}=o3(),l=(null==r||null==(e=r.errorModalData)?void 0:e.previousScreen)||(i===a?void 0:i);return(0,m.jsx)(hl,{error:(null==r||null==(t=r.errorModalData)?void 0:t.error)||Error(),allowlistConfig:o.allowlistConfig,onRetry:()=>{n(l||yL,!1)},onCaptchaReset:s})}},hd=L.styled.a.withConfig({displayName:"Link",componentId:"sc-e29a7de8-0"})(["color:var(--privy-color-accent) !important;font-weight:600;"]),hu=e=>{let{onTransfer:t,isTransferring:n,transferSuccess:r}=e;return(0,m.jsx)(lz,{...r?{success:!0,children:"Success!"}:{warn:!0,loading:n,onClick:t,children:"Transfer and delete account"}})},hh=L.styled.div.withConfig({displayName:"ConnectContainer",componentId:"sc-3505eb4c-0"})(["display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;width:100%;padding-bottom:16px;"]),hp=L.styled.div.withConfig({displayName:"GappedContainer",componentId:"sc-3505eb4c-1"})(["display:flex;flex-direction:column;&& p{font-size:14px;}width:100%;gap:16px;"]),hf=L.styled.div.withConfig({displayName:"DisclosedAccountContainer",componentId:"sc-3505eb4c-2"})(["display:flex;cursor:pointer;align-items:center;width:100%;border:1px solid var(--privy-color-foreground-4) !important;border-radius:var(--privy-border-radius-md);padding:8px 10px;font-size:14px;font-weight:500;gap:8px;"]),hg=(0,L.styled)(eP.default).withConfig({displayName:"StyledExclamationCircleIcon",componentId:"sc-3505eb4c-3"})(["position:relative;width:",";height:",";color:var(--privy-color-foreground-3);margin-left:auto;"],e=>{let{$iconSize:t}=e;return"".concat(t,"px")},e=>{let{$iconSize:t}=e;return"".concat(t,"px")}),hm=(0,L.styled)(e$.default).withConfig({displayName:"StyledCopyIcon",componentId:"sc-3505eb4c-4"})(["position:relative;width:15px;height:15px;color:var(--privy-color-foreground-3);margin-left:auto;"]),hy=L.styled.ol.withConfig({displayName:"ListContainer",componentId:"sc-3505eb4c-5"})(["display:flex;flex-direction:column;font-size:14px;width:100%;text-align:left;"]),hv=L.styled.li.withConfig({displayName:"ListItem",componentId:"sc-3505eb4c-6"})(["font-size:14px;list-style-type:auto;list-style-position:outside;margin-left:1rem;margin-bottom:0.5rem;&:last-child{margin-bottom:0;}"]),hb=L.styled.div.withConfig({displayName:"CircleContainer",componentId:"sc-3505eb4c-7"})(["position:relative;width:60px;height:60px;margin:10px;display:flex;justify-content:center;align-items:center;"]),hw=()=>(0,m.jsx)(hb,{children:(0,m.jsx)(hg,{$iconSize:60})}),hx=e=>{var t,n;let{address:r,onClose:i,onRetry:a,onTransfer:o,isTransferring:s,transferSuccess:l}=e,{defaultChain:c}=lt(),d=null!=(n=null==(t=c.blockExplorers)?void 0:t.default.url)?n:"https://etherscan.io";return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(l1,{onClose:i,backFn:a}),(0,m.jsxs)(hh,{children:[(0,m.jsx)(hw,{}),(0,m.jsxs)(hp,{children:[(0,m.jsx)("h3",{children:"Check account assets before transferring"}),(0,m.jsx)("p",{children:"Before transferring, ensure there are no assets in the other account. Assets in that account will not transfer automatically and may be lost."}),(0,m.jsxs)(hy,{children:[(0,m.jsx)("p",{children:" To check your balance, you can:"}),(0,m.jsx)(hv,{children:"Log out and log back into the other account, or "}),(0,m.jsxs)(hv,{children:["Copy your wallet address and use a"," ",(0,m.jsx)("u",{children:(0,m.jsx)("a",{target:"_blank",href:d,children:"block explorer"})})," ","to see if the account holds any assets."]})]}),(0,m.jsxs)(hf,{onClick:()=>
1navigator.clipboard.writeText(r).catch(console.error),children:[(0,m.jsx)(ej.default,{color:"var(--privy-color-foreground-1)",strokeWidth:2,height:"28px",width:"28px"}),(0,m.jsx)(u3,{address:r,showCopyIcon:!1}),(0,m.jsx)(hm,{})]}),(0,m.jsx)(hu,{onTransfer:o,isTransferring:s,transferSuccess:l})]})]}),(0,m.jsx)(lj,{})]})},hC={component:()=>{let{initiateAccountTransfer:e,closePrivyModal:t}=(0,R.u)(),{data:n,navigate:r,lastScreen:i,setModalData:a}=lc(),[o,s]=(0,f.useState)(void 0),[l,c]=(0,f.useState)(!1),[d,u]=(0,f.useState)(!1),h=async()=>{try{var o,s,l,d,h,p,f,g,m,y;if(!(null==n||null==(o=n.accountTransfer)?void 0:o.nonce)||!(null==n||null==(s=n.accountTransfer)?void 0:s.account))throw Error("missing account transfer inputs");u(!0),await e({nonce:null==n||null==(l=n.accountTransfer)?void 0:l.nonce,account:null==n||null==(d=n.accountTransfer)?void 0:d.account,accountType:null==n||null==(h=n.accountTransfer)?void 0:h.linkMethod,externalWalletMetadata:null==n||null==(p=n.accountTransfer)?void 0:p.externalWalletMetadata,telegramWebAppData:null==n||null==(f=n.accountTransfer)?void 0:f.telegramWebAppData,telegramAuthResult:null==n||null==(g=n.accountTransfer)?void 0:g.telegramAuthResult,farcasterEmbeddedAddress:null==n||null==(m=n.accountTransfer)?void 0:m.farcasterEmbeddedAddress,oAuthUserInfo:null==n||null==(y=n.accountTransfer)?void 0:y.oAuthUserInfo}),c(!0),u(!1),setTimeout(t,1e3)}catch(e){a({errorModalData:{error:e,previousScreen:i||hC}}),r(hc,!0)}};return o?(0,m.jsx)(hx,{address:o,onClose:t,onRetry:()=>s(void 0),onTransfer:h,isTransferring:d,transferSuccess:l}):(0,m.jsx)(hE,{onClose:t,onInfo:()=>{var e;return s(null==n||null==(e=n.accountTransfer)?void 0:e.embeddedWalletAddress)},onContinue:()=>{var e;return s(null==n||null==(e=n.accountTransfer)?void 0:e.embeddedWalletAddress)},onTransfer:h,isTransferring:d,transferSuccess:l,data:n})}},hE=e=>{var t,n,r,i,a,o,s;let{onClose:l,onContinue:c,onInfo:d,onTransfer:u,transferSuccess:h,isTransferring:p,data:f}=e;if(!(null==f||null==(t=f.accountTransfer)?void 0:t.linkMethod)||!(null==f||null==(n=f.accountTransfer)?void 0:n.displayName))return;let g={method:null==f||null==(r=f.accountTransfer)?void 0:r.linkMethod,handle:null==f||null==(i=f.accountTransfer)?void 0:i.displayName,disclosedAccount:(null==f||null==(a=f.accountTransfer)?void 0:a.embeddedWalletAddress)?{type:"wallet",handle:null==f||null==(o=f.accountTransfer)?void 0:o.embeddedWalletAddress}:void 0};return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(l1,{closeable:!0}),(0,m.jsxs)(hh,{children:[(0,m.jsx)(dE,{children:(0,m.jsxs)("div",{children:[(0,m.jsx)(u2,{color:"var(--privy-color-error)"}),(0,m.jsx)(e_.default,{height:38,width:38,stroke:"var(--privy-color-error)"})]})}),(0,m.jsxs)(hp,{children:[(0,m.jsxs)("h3",{children:[function(e){switch(e){case"sms":return"Phone number";case"email":return"Email address";case"siwe":return"Wallet address";case"siws":return"Solana wallet address";case"linkedin":return"LinkedIn profile";case"google":case"apple":case"discord":case"github":case"instagram":case"spotify":case"tiktok":case"line":case"twitch":case"twitter":case"telegram":case"farcaster":return"".concat(ox(e.replace("_oauth",""))," profile");default:return e.startsWith("privy:")?"Cross-app account":e}}(g.method)," is associated with another account"]}),(0,m.jsxs)("p",{children:["Do you want to transfer",(0,m.jsx)("b",{children:g.handle?" ".concat(g.handle):""})," to this account instead? This will delete your other account."]}),(0,m.jsx)(hk,{onClick:d,disclosedAccount:g.disclosedAccount})]}),(0,m.jsxs)(hp,{style:{gap:12,marginTop:12},children:[(null==f||null==(s=f.accountTransfer)?void 0:s.embeddedWalletAddress)?(0,m.jsx)(lz,{onClick:c,children:"Continue"}):(0,m.jsx)(hu,{onTransfer:u,transferSuccess:h,isTransferring:p}),(0,m.jsx)(lV,{onClick:l,children:"No thanks"})]})]}),(0,m.jsx)(lj,{})]})};function hk(e){let{disclosedAccount:t,onClick:n}=e;return t?(0,m.jsxs)(hf,{onClick:n,children:[(0,m.jsx)(ej.default,{color:"var(--privy-color-foreground-1)",strokeWidth:2,height:"28px",width:"28px"}),(0,m.jsx)(u3,{address:t.handle,showCopyIcon:!1}),(0,m.jsx)(u8,{width:15,height:15,color:"var(--privy-color-foreground-3)",style:{marginLeft:"auto"}})]}):null}let hS=e=>{let{errorMessage:t,onClose:n}=e;
1return(0,m.jsx)(ck,t?{title:"Something went wrong",subtitle:t,icon:S.XCircle,iconVariant:"error",primaryCta:{label:"Close",onClick:n},watermark:!0}:{title:"Creating your wallet",subtitle:"Please wait...",iconVariant:"loading",watermark:!1})},hI={component:()=>{let{setModalData:e,navigate:t,data:n,onUserCloseViaDialogOrKeybindRef:r}=lc(),i=lt(),[a,o]=(0,f.useState)(""),{embeddedWallets:s}=lt(),{authenticated:l,user:c}=(0,g.u)(),{closePrivyModal:d,walletProxy:u,client:h}=(0,R.u)(),{onSuccess:p,onFailure:y,callAuthOnSuccessOnClose:b,shouldCreateEth:w,shouldCreateSol:x}=n.createWallet,C="legacy-embedded-wallets-only"===i.embeddedWallets.mode&&!0===(null==i?void 0:i.embeddedWallets.requireUserOwnedRecoveryOnCreate),[E,k]=(0,f.useState)(null),{create:S}=dV(),I=null!=w?w:!!c&&uY(c,i.embeddedWallets.ethereum.createOnLogin),A=null!=x?x:!!c&&uJ(c,i.embeddedWallets.solana.createOnLogin),T=new a1(async()=>{let e=await h.getAccessToken();if(c&&e&&u)try{let e;if(I&&A)e=await S({chainType:"ethereum",walletIndex:0,latestUser:c}),e=await S({chainType:"solana",walletIndex:0,latestUser:e.user});else if(A)e=await S({chainType:"solana",walletIndex:0,latestUser:c});else{if(!I)return void d({shouldCallAuthOnSuccess:b});e=await S({chainType:"ethereum",walletIndex:0,latestUser:c})}k(e),t(dK)}catch(e){o(e.message)}});return(0,f.useEffect)(()=>l&&c?C?(e({...n,createWallet:{...n.createWallet,shouldCreateEth:I,shouldCreateSol:A},recoverySelection:{...null==n?void 0:n.recoverySelection,isInAccountCreateFlow:!0,shouldCreateEth:I,shouldCreateSol:A}}),t(yY({walletAction:"create",showAutomaticRecovery:!1,availableRecoveryMethods:s.userOwnedRecoveryOptions,legacySetWalletPasswordFlow:!1,isResettingPassword:!1}))):void T.execute():(t(yL),void y(Error("User must be authenticated before creating a Privy wallet"))),[C,l]),r.current=()=>null,(0,m.jsx)(hS,{errorMessage:a||void 0,onClose:()=>{E?(p(E),d({shouldCallAuthOnSuccess:b})):(y(new eb.ai("User wallet creation failed")),d({shouldCallAuthOnSuccess:!1}))}})}},hA={component:()=>{let{user:e,logout:t}=(0,g.u)(),{onUserCloseViaDialogOrKeybindRef:n,setModalData:r,navigate:i}=lc(),a=lt(),{acceptTerms:o,closePrivyModal:s,createAnalyticsEvent:l}=(0,R.u)(),c=e=>{null==e||e.preventDefault(),s({shouldCallAuthOnSuccess:!1}),t()};return n.current=c,(0,m.jsx)(hT,{termsAndConditionsUrl:null==a?void 0:a.legal.termsAndConditionsUrl,privacyPolicyUrl:null==a?void 0:a.legal.privacyPolicyUrl,onAccept:async n=>{null==n||n.preventDefault(),await o(),e&&uX(e,a.embeddedWallets)?(r({createWallet:{onSuccess:()=>{},onFailure:e=>{console.error(e),l({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,screen:"AffirmativeConsentScreen"}}),t()},callAuthOnSuccessOnClose:!0}}),i(hI)):s()},onDecline:c})}},hT=e=>{let{termsAndConditionsUrl:t,privacyPolicyUrl:n,onAccept:r,onDecline:i,title:a="One last step",subtitle:o="By signing up, you agree to our terms and privacy policy."}=e;return(0,m.jsx)(ck,{title:a,subtitle:o,icon:I.FileCheck,primaryCta:{label:"Accept",onClick:r},secondaryCta:{label:"No thanks",onClick:i},watermark:!0,children:(t||n)&&(0,m.jsxs)(h_,{children:[t&&(0,m.jsxs)(lU,{variant:"muted",href:t,target:"_blank",size:"lg",style:{justifyContent:"space-between"},as:"a",children:["View Terms",(0,m.jsx)(A.ExternalLink,{width:16,height:16,strokeWidth:2.25})]}),n&&(0,m.jsxs)(lU,{variant:"muted",href:n,target:"_blank",size:"lg",style:{justifyContent:"space-between"},as:"a",children:["View Privacy Policy",(0,m.jsx)(A.ExternalLink,{width:16,height:16,strokeWidth:2.25})]})]})})},h_=L.styled.div.withConfig({displayName:"LinksContainer",componentId:"sc-21e1b98c-0"})(["display:flex;flex-direction:column;gap:12px;margin-top:var(--screen-space);"]),hj=e=>{let{color:t,...n}=e;return(0,m.jsx)("svg",{version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 115.77 122.88",xmlSpace:"preserve",...n,children:(0,m.jsx)("g",{children:(0,m.jsx)("path",{fill:t||"currentColor",className:"st0",d:"M89.62,13.96v7.73h12.19h0.01v0.02c3.85,0.01,7.34,1.57,9.86,4.1c2.5,2.51,4.06,5.98,4.07,9.82h0.02v0.02 v73.27v0.01h-0.02c-0.01,3.84-1.5
17,7.33-4.1,9.86c-2.51,2.5-5.98,4.06-9.82,4.07v0.02h-0.02h-61.7H40.1v-0.02 c-3.84-0.01-7.34-1.57-9.86-4.1c-2.5-2.51-4.06-5.98-4.07-9.82h-0.02v-0.02V92.51H13.96h-0.01v-0.02c-3.84-0.01-7.34-1.57-9.86-4.1 c-2.5-2.51-4.06-5.98-4.07-9.82H0v-0.02V13.96v-0.01h0.02c0.01-3.85,1.58-7.34,4.1-9.86c2.51-2.5,5.98-4.06,9.82-4.07V0h0.02h61.7 h0.01v0.02c3.85,0.01,7.34,1.57,9.86,4.1c2.5,2.51,4.06,5.98,4.07,9.82h0.02V13.96L89.62,13.96z M79.04,21.69v-7.73v-0.02h0.02 c0-0.91-0.39-1.75-1.01-2.37c-0.61-0.61-1.46-1-2.37-1v0.02h-0.01h-61.7h-0.02v-0.02c-0.91,0-1.75,0.39-2.37,1.01 c-0.61,0.61-1,1.46-1,2.37h0.02v0.01v64.59v0.02h-0.02c0,0.91,0.39,1.75,1.01,2.37c0.61,0.61,1.46,1,2.37,1v-0.02h0.01h12.19V35.65 v-0.01h0.02c0.01-3.85,1.58-7.34,4.1-9.86c2.51-2.5,5.98-4.06,9.82-4.07v-0.02h0.02H79.04L79.04,21.69z M105.18,108.92V35.65v-0.02 h0.02c0-0.91-0.39-1.75-1.01-2.37c-0.61-0.61-1.46-1-2.37-1v0.02h-0.01h-61.7h-0.02v-0.02c-0.91,0-1.75,0.39-2.37,1.01 c-0.61,0.61-1,1.46-1,2.37h0.02v0.01v73.27v0.02h-0.02c0,0.91,0.39,1.75,1.01,2.37c0.61,0.61,1.46,1,2.37,1v-0.02h0.01h61.7h0.02 v0.02c0.91,0,1.75-0.39,2.37-1.01c0.61-0.61,1-1.46,1-2.37h-0.02V108.92L105.18,108.92z"})})})},hP=L.styled.button.withConfig({displayName:"CopyTextButton",componentId:"sc-4b0620dc-0"})(["display:flex;align-items:center;gap:0.5rem;&:hover{text-decoration:underline;}svg{width:0.875rem;height:0.875rem;}"]),h$=L.styled.span.withConfig({displayName:"CopiedText",componentId:"sc-4b0620dc-1"})(["display:flex;align-items:center;gap:0.25rem;font-size:0.875rem;color:var(--privy-color-foreground-2);"]),hN=(0,L.styled)(e0.default).withConfig({displayName:"GreenCheck",componentId:"sc-4b0620dc-2"})(["color:var(--privy-color-success);"]),hO=(0,L.styled)(hj).withConfig({displayName:"StyledCopy",componentId:"sc-4b0620dc-3"})(["color:var(--privy-color-foreground-3);opactiy:0.5;"]),hM=()=>(0,m.jsx)("svg",{width:"200",height:"200",viewBox:"-77 -77 200 200",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"28px",width:"28px"},children:(0,m.jsx)("rect",{width:"50",height:"50",fill:"black",rx:10,ry:10})}),hR=(e,t,n,r,i)=>{for(let a=t;a<t+r;a++)for(let t=n;t<n+i;t++){let n=null==e?void 0:e[t];n&&n[a]&&(n[a]=0)}return e},hL=e=>{let{x:t,y:n,cellSize:r,bgColor:i,fgColor:a}=e;return(0,m.jsx)(m.Fragment,{children:[0,1,2].map(e=>(0,m.jsx)("circle",{r:r*(7-2*e)/2,cx:t+7*r/2,cy:n+7*r/2,fill:e%2!=0?i:a},"finder-".concat(t,"-").concat(n,"-").concat(e)))})},hD=e=>{let{cellSize:t,matrixSize:n,bgColor:r,fgColor:i}=e;return(0,m.jsx)(m.Fragment,{children:[[0,0],[(n-7)*t,0],[0,(n-7)*t]].map(e=>{let[n,a]=e;return(0,m.jsx)(hL,{x:n,y:a,cellSize:t,bgColor:r,fgColor:i},"finder-".concat(n,"-").concat(a))})})},hF=e=>{let{matrix:t,cellSize:n,color:r}=e;return(0,m.jsx)(m.Fragment,{children:t.map((e,t)=>e.map((e,i)=>e?(0,m.jsx)("rect",{height:n-.4,width:n-.4,x:t*n+.1*n,y:i*n+.1*n,rx:.5*n,ry:.5*n,fill:r},"cell-".concat(t,"-").concat(i)):(0,m.jsx)(f.default.Fragment,{},"circle-".concat(t,"-").concat(i))))})},hU=e=>{let{cellSize:t,matrixSize:n,element:r,sizePercentage:i,bgColor:a}=e;if(!r)return(0,m.jsx)(m.Fragment,{});let o=n*(i||.14),s=Math.floor(n/2-o/2),l=Math.floor(n/2+o/2);(l-s)%2!=n%2&&(l+=1);let c=(l-s)*t,d=c-.2*c,u=s*t;return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("rect",{x:s*t,y:s*t,width:c,height:c,fill:a}),(0,m.jsx)(r,{x:u+.1*c,y:u+.1*c,height:d,width:d})]})},hB=e=>{var t;let n=e.outputSize,r=((e,t)=>{let n=e1.default.create(e,{errorCorrectionLevel:t}).modules,r=((e,t)=>{let n=e.slice(0),r=[];for(;n.length;)r.push(n.splice(0,t));return r})(Array.from(n.data),n.size);return r=hR(r,0,0,7,7),r=hR(r,r.length-7,0,7,7),hR(r,0,r.length-7,7,7)})(e.url,e.errorCorrectionLevel),i=n/r.length,a=function(e,t){let{min:n,max:r}=t;return Math.min(Math.max(e,n),r)}(2*i,{min:.025*n,max:.036*n});return(0,m.jsxs)("svg",{height:e.outputSize,width:e.outputSize,viewBox:"0 0 ".concat(e.outputSize," ").concat(e.outputSize),style:{height:"100%",width:"100%",padding:"".concat(a,"px")},children:[(0,m.jsx)(hF,{matrix:r,cellSize:i,color:e.fgColor}),(0,m.jsx)(hD,{cellSize:i,matrixSize:r.length,fgColor:e.fgColor,bgColor:e.bgColor}),(0,m.jsx)(hU,{cellSize:i,element:null==(t=e.logo)?void 0:t.element,bgColor:e.bgColor,matrixSize:r.length})]})},hz=L.styled.div.attrs({className:"ph-no-capture"}).withConfig({displayName:"QrContainer",componentId:"sc-597e27f3-0"})(["display:flex;justify-content:center;align-items:center;height:",";width:",";margin:auto;background-color:",";&&{border-width:2px;border-color:",";border-radius:var(--privy-border-radius-md);}"],e=>"".concat(e.$size,"px"),e=>"".concat(e.$size,"px"),e=>e.$bgColor,e=>e.$borderColor),hW=e=>{var t;let{appearance:n}=lt(),r=e.bgColor||"#FFFFFF",i=e.fgColor||"#000000",a=e.size||160,o="dark"===n.palette.colorScheme?r:i;return(0,m.jsx)(hz,{$size:a,$bgColor:r,$fgColor:i,$borderColor:o,children:(0,m.jsx)(hB,{url:e.url,logo:{element:null!=(t=e.squareLogoElement)?t:hM},outputSize:a,bgColor:r,fgColor:i,errorCorrectionLevel:e.errorCorrectionLevel||"Q"})})},hq=L.styled.span.withConfig({displayName:"ErrorMessage",componentId:"sc-fcb8cd50-0"})(["text-align:left;font-size:0.75rem;font-weight:500;line-height:1.125rem;color:var(--privy-color-error);"]),hH=L.styled.label.withConfig({displayName:"BaseEmailForm",componentId:"sc-f34af797-0"})(["display:block;position:relative;width:100%;height:56px;&& > :first-child{position:absolute;
1left:0.75em;top:50%;transform:translate(0,-50%);}&& > input{font-size:16px;line-height:24px;color:var(--privy-color-foreground);padding:12px 88px 12px 52px;flex-grow:1;background:var(--privy-color-background);border:1px solid ",";border-radius:var(--privy-border-radius-md);width:100%;height:100%;@media (min-width:441px){font-size:14px;padding-right:78px;}:focus{outline:none;border-color:",";box-shadow:",";}:autofill,:-webkit-autofill{background:var(--privy-color-background);}&& > input::placeholder{color:var(--privy-color-foreground-3);}&:disabled{opacity:0.4;cursor:not-allowed;}&:disabled,&:disabled:hover,&:disabled > span{color:var(--privy-color-foreground-3);}}&& > button:last-child{right:0px;line-height:24px;padding:13px 17px;:focus{outline:none;}&:disabled{opacity:0.4;cursor:not-allowed;}&:disabled,&:disabled:hover,&:disabled > span{color:var(--privy-color-foreground-3);}}"],e=>{let{$error:t}=e;return t?"var(--privy-color-error) !important":"var(--privy-color-foreground-4)"},e=>{let{$error:t}=e;return t?"var(--privy-color-error) !important":"var(--privy-color-accent-light)"},e=>{let{$error:t}=e;return t?"none":"0 0 0 1px var(--privy-color-accent-light)"}),hV=(0,L.styled)(hH).withConfig({displayName:"EmailUpdateForm",componentId:"sc-f34af797-1"})(["background-color:var(--privy-color-background);transition:background-color 200ms ease;&& > button{right:0;line-height:24px;position:absolute;padding:13px 17px;background-color:#090;:focus{outline:none;border-color:var(--privy-color-accent);}}"]),hG=(0,L.styled)(hH).withConfig({displayName:"EmailInputForm",componentId:"sc-f34af797-2"})(["&& > input{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding-right:",";border:1px solid ",";&& > input::placeholder{color:var(--privy-color-foreground-3);}}&& > :last-child{right:16px;position:absolute;top:50%;transform:translate(0,-50%);}&& > button:last-child{right:0px;line-height:24px;padding:13px 17px;:focus{outline:none;}}"],e=>e.$stacked?"16px":"88px",e=>{let{$error:t}=e;return t?"var(--privy-color-error) !important":"var(--privy-color-foreground-4)"}),hK=L.styled.div.withConfig({displayName:"InputContainerForm",componentId:"sc-f34af797-3"})(["width:100%;&& > ","{display:block;text-align:left;padding-left:var(--privy-border-radius-md);padding-bottom:5px;}"],hq),hY=e=>{let{...t}=e;return(0,m.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...t,children:[(0,m.jsx)("rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}),(0,m.jsx)("path",{d:"M3 9a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2"}),(0,m.jsx)("path",{d:"M3 11h3c.8 0 1.6.3 2.1.9l1.1.9c1.6 1.6 4.1 1.6 5.7 0l1.1-.9c.5-.5 1.3-.9 2.1-.9H21"})]})},hZ={phantom:{mobile:{native:"phantom://",universal:"https://phantom.app/ul/"}},solflare:{mobile:{native:void 0,universal:"https://solflare.com/ul/v1/"}},metamask:{image_url:{sm:sb,md:sb}}};class hJ{static normalize(e){return e.replace(/[-_]wallet$/,"").replace(/[-_]extension$/,"").toLowerCase()}isEth(e){return e.chains.some(e=>e.startsWith("eip155:"))}isSol(e){return e.chains.some(e=>e.startsWith("solana:"))}inAllowList(e,t){if(!this.normalizedAllowList||0===this.normalizedAllowList.length||"listing"===t&&this.includeWalletConnect)return!0;let n=hJ.normalize(e);return this.normalizedAllowList.some(e=>n===hJ.normalize(e))}chainMatches(e){return"ethereum-only"===this.chainFilter?"ethereum"===e:"solana-only"!==this.chainFilter||"solana"===e}connectorOk(e){return!!("null"!==e.connectorType&&this.chainMatches(e.chainType)&&(this.inAllowList(e.walletClientType,"connector")||("injected"===e.connectorType||"solana_adapter"===e.connectorType)&&("ethereum"===e.chainType&&this.detectedEth||"solana"===e.chainType&&this.detectedSol)))}listingOk(e){if(e.slug.includes("coinbase"))return!1;let t=this.isEth(e);if(this.isSol(e)&&!t)return!1;if("ethereum-only"===this.chainFilter){if(!this.isEth(e))return!1}else if("solana-only"===this.chainFilter&&!this.isSol(e))return!1;return!!this.inAllowList(e.slug,"listing")}getWallets(e,t){var n;let r=new Map,i=e=>{let t=r.get(e.id);if(t){t.chainType!==e.chainType&&(t.chainType="multi");let n=new Set(t.chains);
1e.chains.forEach(e=>n.add(e)),t.chains=Array.from(n),!t.icon&&e.icon&&(t.icon=e.icon),!t.url&&e.url&&(t.url=e.url),!t.listing&&e.listing&&(t.listing=e.listing)}else r.set(e.id,e)};e.filter(e=>this.connectorOk(e)).forEach(e=>{var t,n,r;let a=hJ.normalize(e.walletClientType);i({id:a,label:null!=(r=null==(t=e.walletBranding)?void 0:t.name)?r:a,source:"connector",connector:e,chainType:e.chainType,icon:null==(n=e.walletBranding)?void 0:n.icon,url:void 0,chains:["ethereum"===e.chainType?"eip155":"solana"]})}),t.filter(e=>this.listingOk(e)).forEach(e=>{var t,n;let r=e.chains.filter(e=>!e.startsWith("solana:")),a=hJ.normalize(e.slug),o=hZ[e.slug],s=(null==o||null==(t=o.image_url)?void 0:t.sm)||(null==(n=e.image_url)?void 0:n.sm);i({id:a,label:e.name||a,source:"listing",listing:e,chainType:"ethereum",icon:s,url:e.homepage,chains:r})});let a=e.find(e=>"wallet_connect_v2"===e.connectorType);this.includeWalletConnectQr&&a&&i({id:"wallet_connect_qr",label:"WalletConnect",source:"connector",connector:a,chainType:"ethereum",icon:li,url:void 0,chains:["ethereum"===a.chainType?"eip155":"solana"]});let o=Array.from(r.values());o.forEach(e=>{var t,n;let r=hZ[(null==(t=e.listing)?void 0:t.slug)||e.id];(null==r||null==(n=r.image_url)?void 0:n.sm)&&(e.icon=r.image_url.sm)});let s=new Map;return null==(n=this.normalizedAllowList)||n.forEach((e,t)=>{s.set(hJ.normalize(e),t)}),{wallets:o.slice().sort((e,t)=>{let n=hJ.normalize(e.id),r=hJ.normalize(t.id);"binance-defi"===n?n="binance":"universalprofiles"===n?n="universal_profile":"cryptocom-defi"===n&&(n="cryptocom"),"binance-defi"===r?r="binance":"universalprofiles"===r?r="universal_profile":"cryptocom-defi"===r&&(r="cryptocom");let i=s.has(n),a=s.has(r);return i&&a?s.get(n)-s.get(r):i?-1:a?1:"connector"===e.source&&"listing"===t.source?-1:"listing"===e.source&&"connector"===t.source?1:e.label.toLowerCase().localeCompare(t.label.toLowerCase())}),walletCount:o.length}}constructor(e,t){var n,r,i,a,o,s,l,c;this.chainFilter=e,t&&t.length>0&&(this.normalizedAllowList=t.map(String),this.normalizedAllowList.includes("binance")&&this.normalizedAllowList.push("binance-defi-wallet")),this.detectedEth=null!=(o=null==(n=this.normalizedAllowList)?void 0:n.includes("detected_ethereum_wallets"))&&o,this.detectedSol=null!=(s=null==(r=this.normalizedAllowList)?void 0:r.includes("detected_solana_wallets"))&&s,this.includeWalletConnect=null!=(l=null==(i=this.normalizedAllowList)?void 0:i.includes("wallet_connect"))&&l,this.includeWalletConnectQr=null!=(c=null==(a=this.normalizedAllowList)?void 0:a.includes("wallet_connect_qr"))&&c}}var hQ=e=>(0,m.jsxs)("svg",{viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,m.jsx)("path",{d:"m0 0h32v32h-32z",fill:"#5469d4"}),(0,m.jsx)("path",{d:"m15.997 5.333-.143.486v14.106l.143.143 6.548-3.87z",fill:"#c2ccf4"}),(0,m.jsx)("path",{d:"m15.996 5.333-6.548 10.865 6.548 3.87z",fill:"#fff"}),(0,m.jsx)("path",{d:"m15.997 21.306-.08.098v5.025l.08.236 6.552-9.227z",fill:"#c2ccf4"}),(0,m.jsx)("path",{d:"m15.996 26.665v-5.36l-6.548-3.867z",fill:"#fff"}),(0,m.jsx)("path",{d:"m15.995 20.07 6.548-3.87-6.548-2.976v6.847z",fill:"#8698e8"}),(0,m.jsx)("path",{d:"m9.448 16.2 6.548 3.87v-6.846z",fill:"#c2ccf4"})]}),hX=e=>(0,m.jsxs)("svg",{viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,m.jsxs)("linearGradient",{id:"a",gradientUnits:"userSpaceOnUse",x1:"7.233",x2:"24.766",y1:"24.766",y2:"7.234",children:[(0,m.jsx)("stop",{offset:"0",stopColor:"#9945ff"}),(0,m.jsx)("stop",{offset:".2",stopColor:"#7962e7"}),(0,m.jsx)("stop",{offset:"1",stopColor:"#00d18c"})]}),(0,m.jsx)("path",{d:"m0 0h32v32h-32z",fill:"#10111a"}),(0,m.jsx)("path",{clipRule:"evenodd",d:"m9.873 20.41a.645.645 0 0 1 .476-.21l14.662.012a.323.323 0 0 1 .238.54l-3.123 3.438a.643.643 0 0 1 -.475.21l-14.662-.012a.323.323 0 0 1 -.238-.54zm15.376-2.862a.322.322 0 0 1 -.238.54l-14.662.012a.642.642 0 0 1 -.476-.21l-3.122-3.44a.323.323 0 0 1 .238-.54l14.662-.012a.644.644 0 0 1 .475.21zm-15.376-9.738a.644.644 0 0 1 .476-.21l14.662.012a.322.322 0 0 1 .238.54l-3.123 3.438a.643.643 0 0 1 -.475.21l-14.662-.012a.323.323 0 0 1 -.238-.54z",fill:"url(#a)",fillRule:"evenodd"})]});let h0=L.styled.div.withConfig({displayName:"WalletIconWithActiveIndicator",componentId:"sc-9b65f2b6-2"})(["position:relative;display:inline-flex;align-items:center;&::after{content:' ';border-radius:var(--privy-border-radius-full);height:6px;width:6px;background-color:var(--privy-color-icon-success);position:absolute;right:-3px;top:-3px;}"]),h1=L.styled.img.withConfig({displayName:"WalletIcon",componentId:"sc-9b65f2b6-3"})(["width:32px;height:32px;border-radius:0.25rem;object-fit:contain;"]),h2=L.styled.span.withConfig({displayName:"Chip",componentId:"sc-9b65f2b6-4"})(["display:flex;gap:0.25rem;align-items:center;padding:0.25rem 0.5rem;font-size:0.75rem;font-weight:500;line-height:1.125rem;border-radius:var(--privy-border-radius-sm);background-color:var(--privy-color-background-2);svg{width:100%;max-width:1rem;max-height:1rem;stroke-width:2;}
1"]),h3=(e=>"light"===e.$colorScheme?"background: linear-gradient(var(--privy-color-background), var(--privy-color-background) 70%) bottom, linear-gradient(rgba(0, 0, 0, 0) 20%, rgba(0, 0, 0, 0.06)) bottom;":"dark"===e.$colorScheme?"background: linear-gradient(var(--privy-color-background), var(--privy-color-background) 70%) bottom, linear-gradient(rgba(255, 255, 255, 0) 20%, rgba(255, 255, 255, 0.06)) bottom;":void 0,(0,e3.create)(()=>({isModalOpen:!1,resolvers:null}))),h5=(0,e3.create)(()=>({})),h4=async()=>{let e,t,n=new Promise((n,r)=>{e=n,t=r});return h5.setState({}),h3.setState({isModalOpen:!0,resolvers:{resolve:e,reject:t}}),await n},h6=e=>{let{address:t,client:n,appId:r}=e,i="".concat(n,":").concat(t);r&&aG.put(h8(r),i),h3.setState({wallet:i})},h8=e=>"privy:".concat(e,":active-wallet-connection");function h9(e){var t;let{walletList:n,walletChainType:r}=e,i=lt(),{connectors:a}=(0,R.u)(),o=sK(e=>e.listings),s=null!=r?r:i.appearance.walletChainType,l=null!=n?n:null==(t=i.appearance)?void 0:t.walletList,c=(0,f.useMemo)(()=>new hJ(s,l),[s,l]),{wallets:d,walletCount:u}=(0,f.useMemo)(()=>c.getWallets(a,o),[c,a,o]),[h,p]=(0,f.useState)(""),g=(0,f.useMemo)(()=>h?d.filter(e=>e.label.toLowerCase().includes(h.toLowerCase())):d,[h,d]),[m,y]=(0,f.useState)();return{selected:m,setSelected:y,search:h,setSearch:p,wallets:g,walletCount:u}}let h7=e=>!e||"string"!=typeof e&&(e instanceof sy||e instanceof sH),pe=e=>{var t,n;let{index:r,style:i,data:a,recent:o}=e,s=a.wallets[r],{walletChainType:l,handleWalletClick:c}=a,d={...i,boxSizing:"border-box"};return s?(0,m.jsxs)(pi,{style:d,onClick:()=>c(s),children:[s.icon&&(s.connector&&!h7(s.connector)?(0,m.jsx)(h0,{children:"string"==typeof s.icon?(0,m.jsx)(h1,{src:s.icon}):(0,m.jsx)(s.icon,{style:{width:"32px",height:"32px"}})}):"string"==typeof s.icon?(0,m.jsx)(h1,{src:s.icon}):(0,m.jsx)(s.icon,{style:{width:"32px",height:"32px"}})),(0,m.jsx)(ps,{children:s.label}),o?(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(h2,{children:"Last used"}),(0,m.jsx)(pa,{children:(0,m.jsxs)(m.Fragment,{children:["ethereum-only"===l&&(0,m.jsx)(hQ,{}),"solana-only"===l&&(0,m.jsx)(hX,{})]})})]}):(0,m.jsx)(pa,{children:"ethereum-only"!==l&&"solana-only"!==l&&(0,m.jsxs)(m.Fragment,{children:[(null==(t=s.chains)?void 0:t.some(e=>e.startsWith("eip155")))&&(0,m.jsx)(hQ,{}),(null==(n=s.chains)?void 0:n.some(e=>e.startsWith("solana")))&&(0,m.jsx)(hX,{})]})})]}):null};var pt=e=>{var t,n,r,i;let{className:a,customDescription:o,connectOnly:s,preSelectedWalletId:l,...c}=e,d=lt(),{connectors:u}=(0,R.u)(),h=c.walletChainType||d.appearance.walletChainType,p=c.walletList||(null==(t=d.appearance)?void 0:t.walletList),{onBack:g,onClose:y,app:b}=c,{selected:w,setSelected:x,qrUrl:C,setQrUrl:E,connecting:k,uiState:S,wallets:I,walletCount:A,handleConnect:T,handleBack:_,showSearchBar:j,isInitialConnectView:P,title:$,search:N,setSearch:O}=function(e){let{onConnect:t,onBack:n,onClose:r,onConnectError:i,walletList:a,walletChainType:o,app:s}=e,l=lt(),{connectors:c}=(0,R.u)(),{wallets:d,walletCount:u,search:h,setSearch:p,selected:g,setSelected:m}=h9({walletList:a,walletChainType:o}),[y,b]=(0,f.useState)(),[w,x]=(0,f.useState)(),[C,E]=(0,f.useState)(),k=!g&&!w&&!C,S=k&&(u>6||h.length>0),I=c.find(e=>"wallet_connect_v2"===e.connectorType),A=(0,f.useCallback)(async(e,n)=>{if(e){var r,a,o,s,c,d;if((null==C?void 0:C.connector)===e)return void console.log("Already connecting to this wallet, skipping duplicate attempt");if(b("loading"),"string"==typeof e)return E({connector:e,name:null!=(r=null==n?void 0:n.name)?r:"Wallet",icon:null==n?void 0:n.icon}),void window.open(e,"_blank");E({connector:e,name:null!=(o=null!=(a=null==n?void 0:n.name)?a:e.walletBranding.name)?o:"Wallet",icon:null!=(s=null==n?void 0:n.icon)?s:e.walletBranding.icon});try{let n=await e.connect({showPrompt:!0});if(!n)return b("error"),void(null==i||i(new eb.x("Unable to connect wallet")));b("success"),h6({address:n.address,client:n.walletClientType,appId:l.id}),setTimeout(()=>{t({connector:e,wallet:n})},a5)}catch(e){if(console.error("ERROR: ",{e:e}),(null==e||null==(c=e.message)?void 0:c.includes("already pending for origin"))||(null==e||null==(d=e.message)?void 0:d.includes("wallet_requestPermissions")))return void console.log("Connection request already pending, maintaining loading state");b("error"),null==i||i(new eb.x("Unable to connect wallet"))}}},[l.id,t,C]),T=(0,f.useCallback)(()=>w?(b(void 0),E(void 0),void x(void 0)):C?(b(void 0),void E(void 0)):g?(b(void 0),E(void 0),void m(void 0)):"error"===y||"loading"===y?(b(void 0),void E(void 0)):void(null==n||n()),[w,C,g,y,n]),_=(0,f.useMemo)(()=>(null==C?void 0:C.connector)===I&&w&&eT.isMobile?"Go to ".concat(C.name," to continue"):(null==C?void 0:C.connector)===I&&w?"Scan code to connect to ".concat(C.name):"string"==typeof(null==C?void 0:C.connector)?"Open or install ".concat(C.name):g&&!C?"Select network":C?null:"Select your wallet",[C,w,g,I]);return{selected:g,setSelected:m,qrUrl:w,setQrUrl:x,connecting:C,uiState:y,search:h,setSearch:p,wallets:d,walletCount:u,wc:I,isInitialConnect
1View:k,showSearchBar:S,title:_,handleConnect:A,handleBack:T,onClose:r,onConnect:t,app:s}}({...c,walletList:p,walletChainType:h}),M=u.find(e=>"wallet_connect_v2"===e.connectorType),L=(0,f.useRef)(null),D=(0,eX.useVirtualizer)({count:I.length,getScrollElement:()=>L.current,estimateSize:()=>56,overscan:6,gap:5}),F=(0,f.useCallback)(async e=>{var t,n,r,i,a,o,l;let c,d="solana-only"!==h&&(null==(t=e.chains)?void 0:t.some(e=>e.startsWith("eip155"))),p="ethereum-only"!==h&&(null==(n=e.chains)?void 0:n.some(e=>e.startsWith("solana"))),f=sC[e.id];if(p&&f)c=f.getMobileRedirect({isSolana:!0,connectOnly:!!s,useUniversalLink:!1});else{let t=null==(a=e.listing)||null==(i=a.mobile)?void 0:i.native;c=(null==(l=e.listing)||null==(o=l.mobile)?void 0:o.universal)||t||e.url}if(d&&p){let t=hJ.normalize(e.id),n=u.filter(e=>hJ.normalize(e.walletClientType)===t&&!("ethereum"===e.chainType&&e instanceof sy||"solana"===e.chainType&&e instanceof sH)),r=n.find(e=>"ethereum"===e.chainType),i=n.find(e=>"solana"===e.chainType);if(!r&&e.listing){let t=hZ[e.listing.slug]?{...e.listing,...hZ[e.listing.slug]}:e.listing;M.setWalletEntry(t,E),await M.resetConnection(e.id),r=M}if(!i&&c&&(i=c),r||i)return void x({eth:r,sol:i,name:e.label,icon:e.icon})}if(!h7(e.connector))return"wallet_connect_v2"===(null==(r=e.connector)?void 0:r.connectorType)&&(await M.resetConnection(e.id),M.setWalletEntry({id:"wallet_connect_qr",name:"WalletConnect",rdns:"",slug:"wallet-connect",homepage:"",chains:["eip155"],mobile:{native:"",universal:void 0}},E)),void await T(e.connector,{name:e.label,icon:e.icon});if(d||p||e.url||e.listing){if(d&&e.listing){let t=hZ[e.listing.slug]?{...e.listing,...hZ[e.listing.slug]}:e.listing;M.setWalletEntry(t,E),await M.resetConnection(e.id)}if(d&&p)return void x({eth:M,sol:c,name:e.label,icon:e.icon});if(p)return void await T(c,{name:e.label,icon:e.icon});if(d)return void(e.listing?await T(M,{name:e.label,icon:e.icon}):e.url?await T(e.url,{name:e.label,icon:e.icon}):console.warn("Cannot connect to EVM wallet without connector or listing details:",e.label));if(e.url)return void await T(e.url,{name:e.label,icon:e.icon})}},[M,T,x,E,_,y,b,P,$,o,d,u]),U=g||_,B=!!g||!P;return(0,f.useEffect)(()=>{if(!l)return;let e=I.find(e=>{let{id:t}=e;return t===l});e&&F(e).catch(console.error)},[l]),(0,m.jsxs)(cy,{className:a,children:[(0,m.jsx)(cy.Header,{icon:k&&!C||C&&eT.isMobile&&(null==k?void 0:k.icon)?k.icon:k?void 0:hY,iconVariant:k&&!C||C&&eT.isMobile?"loading":void 0,iconLoadingStatus:k&&!C||C&&eT.isMobile?{success:"success"===S,fail:"error"===S}:void 0,title:k&&!C?"Waiting for ".concat(k.name):C&&eT.isMobile?"Waiting for ".concat(null!=(n=null==k?void 0:k.name)?n:"connection"):$,subtitle:k&&!C&&"string"==typeof k.connector?"To connect to ".concat(k.name,", install and open the app. Then confirm the connection when prompted."):k&&!C&&"string"!=typeof k.connector?"error"===S?"Please try connecting again.":"For the best experience, connect only one wallet at a time.":P?null!=o?o:b?"Connect a wallet to your ".concat(b.name," account"):null:null,showBack:B,showClose:!0,onBack:U,onClose:y}),(0,m.jsxs)(cy.Body,{ref:L,$colorScheme:d.appearance.palette.colorScheme,style:{marginBottom:C?"0.5rem":void 0},children:[j&&(0,m.jsx)(pn,{children:(0,m.jsxs)(hV,{style:{background:"transparent"},children:[(0,m.jsx)(lE,{children:(0,m.jsx)(eY.MagnifyingGlassIcon,{})}),(0,m.jsx)("input",{className:"login-method-button",type:"text",placeholder:"Search wallets",onChange:e=>O(e.target.value),value:N})]})}),C&&eT.isMobile&&"loading"===S&&(0,m.jsx)("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"1rem"},children:(0,m.jsx)(lU,{variant:"primary",onClick:()=>{var e;return window.open(null!=(e=C.universal)?e:C.native,"_blank")},style:{width:"100%"},children:"Open in app"})}),C&&!eT.isMobile&&"loading"===S&&(0,m.jsx)("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"1rem"},children:(0,m.jsx)(pl,{value:null!=(r=C.universal)?r:C.native,iconOnly:!0,children:"Copy link"})}),C&&!eT.isMobile&&(0,m.jsx)(hW,{size:280,url:null!=(i=C.universal)?i:C.native,squareLogoElement:(null==k?void 0:k.icon)?"string"==typeof k.icon?e=>(0,m.jsx)("svg",{...e,children:(0,m.jsx)("image",{href:k.icon,height:e.height,width:e.width})}):k.icon:lr}),(0,m.jsxs)(pr,{children:[k&&!C&&"string"==typeof k.connector&&(0,m.jsxs)(pi,{onClick:()=>window.open(k.connector,"_blank"),children:[k.icon&&("string"==typeof k.icon?(0,m.jsx)(h1,{src:k.icon}):(0,m.jsx)(k.icon,{})),(0,m.jsx)(ps,{children:k.name})]}),(null==w?void 0:w.eth)&&!k&&(0,m.jsxs)(pi,{onClick:()=>T(w.eth,{name:w.name,icon:w.icon}),children:[w.icon&&("string"==typeof w.icon?(0,m.jsx)(h1,{src:w.icon}):(0,m.jsx)(w.icon,{})),(0,m.jsx)(ps,{children:w.name}),(0,m.jsx)(pa,{children:(0,m.jsx)(hQ,{})})]}),(null==w?void 0:w.sol)&&!k&&(0,m.jsxs)(pi,{onClick:()=>T(w.sol,{name:w.name,icon:w.icon}),children:[w.icon&&("string"==typeof w.icon?(0,m.jsx)(h1,{src:w.icon}):(0,m.jsx)(w.icon,{})),(0,m.jsx)(ps,{children:w.name}),(0,m.jsx)(pa,{children:(0,m.jsx)(hX,{})})]}),P&&(0,m.jsxs)(m.Fragment,{children:[!(A>0)&&(0,m.jsx)(po,{children:"No wallets found. Try another search."}),A>0&&!C&&(0,m.jsx)("div",{style:{maxHeight:56*Math.min(I.length,5)+5,width:"100%"},children:(0,m.jsx)("div",{style:{height:"".concat(D.getTotalSize(),"px"),width:"100%",position:"relative"},children:D.getVirtualItems().map(e=>(0,m.jsx)(pe,{index:e.index,style:{position:"absolute",top:0,left:0,height:"".concat(e.size,"px"),transform:"translateY(".concat(e.start,"px)")},data:{wallets:I,walletChainType:h,handleWalletClick:F}},e.key))})})]})]})]}),(0,m.jsxs)(cy.Footer,{children:[k&&!C&&"string"!=typeof k.connector&&"error"===S&&(0,m.jsx)(cy.Actions,{children:(0,m.jsx)(lU,{style:{width:"100%",alignItems:"center"},variant:"error",onClick:()=>T(k.connector,{name:k.name,icon:k.icon}),children:"Retry"})}),!!(b&&b.legal.privacyPolicyUrl&&b.legal.termsAndConditionsUrl)&&(0,m.jsx)(l_,{app:b,alwaysShowImplicitConsent:!0}),(0,m.jsx)(cy.Watermark,{})]})]})};let pn=L.styled.div.withConfig({displayName:"StickySearchContainer",componentId:"sc-850f7dce-0"})(["position:sticky;margin-top:-3px;padding-top:3px;top:-3px;z-index:1;background:var(--privy-color-background);padding-bottom:calc(var(--screen-space) / 2);
1"]),pr=L.styled.div.withConfig({displayName:"WalletListContainer",componentId:"sc-850f7dce-1"})(["display:flex;flex-direction:column;gap:","px;"],5),pi=L.styled.button.withConfig({displayName:"Button",componentId:"sc-850f7dce-2"})(["&&{gap:0.5rem;align-items:center;display:flex;position:relative;text-align:left;font-weight:500;transition:background 200ms ease-in;width:calc(100% - 4px);border-radius:var(--privy-border-radius-md);padding:0.75em;border:1px solid var(--privy-color-foreground-4);justify-content:space-between;}&:hover{background:var(--privy-color-background-2);}"]),pa=L.styled.span.withConfig({displayName:"ButtonBadge",componentId:"sc-850f7dce-3"})(["display:flex;align-items:center;justify-content:end;position:relative;& > svg{border-radius:var(--privy-border-radius-full);stroke-width:2.5;width:100%;max-height:1rem;max-width:1rem;flex-shrink:0;}& > svg:not(:last-child){border-radius:var(--privy-border-radius-full);margin-right:-0.375rem;}"]),po=L.styled.div.withConfig({displayName:"EmptyContainer",componentId:"sc-850f7dce-4"})(["height:60px;display:flex;align-items:center;justify-content:center;text-align:center;"]),ps=L.styled.span.withConfig({displayName:"WalletName",componentId:"sc-850f7dce-5"})(["text-overflow:ellipsis;white-space:nowrap;color:var(--privy-color-foreground);font-weight:400;flex:1;"]),pl=(0,L.styled)(function(e){let{children:t,iconOnly:n,value:r,hideCopyIcon:i,...a}=e,[o,s]=(0,f.useState)(!1);return(0,m.jsxs)(hP,{...a,onClick:()=>{navigator.clipboard.writeText(r||t).catch(console.error),s(!0),setTimeout(()=>s(!1),1500)},children:[t," ",o?(0,m.jsxs)(h$,{children:[(0,m.jsx)(hN,{})," ",!n&&"Copied"]}):!i&&(0,m.jsx)(hO,{})]})}).withConfig({displayName:"StyledCopyableText",componentId:"sc-850f7dce-6"})(["&&{margin:0.5rem auto 0 auto;}"]),pc=e=>{let{...t}=e;return(0,m.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"25",height:"25",viewBox:"0 0 25 25",fill:"none",...t,children:[(0,m.jsxs)("g",{clipPath:"url(#clip0_2856_1743)",children:[(0,m.jsx)("path",{d:"M22.1673 8.24075V16.3642C22.1673 17.3256 21.3421 18.105 20.3241 18.105H17.0028M22.1673 8.24075C22.1673 7.27936 21.3421 6.5 20.3241 6.5H11.5302M22.1673 8.24075V8.42852C22.1673 9.03302 21.8352 9.59423 21.2901 9.91105L15.1463 13.4818C14.5539 13.8261 13.8067 13.8261 13.2143 13.4818L10.1621 11.5401",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,m.jsx)("path",{d:"M3.12913 6.64816C0.508085 12.9507 3.49251 20.1847 9.79504 22.8057L11.5068 23.5176C12.4522 23.9108 13.7783 23.2222 14.1714 22.2768L14.6054 21.2333C14.7687 20.8406 14.6438 20.3871 14.3024 20.1334L11.2872 17.8927C10.9878 17.6702 10.5843 17.6488 10.2632 17.8384L9.11575 18.5156C8.78274 18.7121 8.3597 18.6844 8.07552 18.4221C5.94293 16.4542 4.77629 13.6264 4.90096 10.7273C4.91757 10.3409 5.19796 10.023 5.57269 9.92753L6.86381 9.59869C7.22522 9.50664 7.49627 9.20696 7.55169 8.83815L8.10986 5.12321C8.17306 4.70259 7.94188 4.29293 7.54915 4.1296L6.50564 3.69564C5.56026 3.30248 4.23416 3.99103 3.84101 4.9364L3.12913 6.64816Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),(0,m.jsx)("defs",{children:(0,m.jsx)("clipPath",{id:"clip0_2856_1743",children:(0,m.jsx)("rect",{x:"0.5",y:"0.5",width:"24",height:"24",rx:"6",fill:"white"})})})]})},pd=e=>{var t;let n=null==(t=localStorage.getItem("-walletlink:https://www.walletlink.org:Addresses"))?void 0:t.split(" ").filter(e=>(0,q.isHex)(e,{strict:!0})).map(e=>(0,H.getAddress)(e));return!!(null==n?void 0:n.length)&&!!(null==e?void 0:e.linkedAccounts.filter(e=>"wallet"==e.type&&n.includes(e.address)).length)},pu=(0,f.createContext)({plugins:{current:{}}}),ph=e=>{let{children:t}=e,n=(0,f.useRef)({});return(0,m.jsx)(pu.Provider,{value:{plugins:n},children:t})},pp=()=>{let{plugins:e}=(0,f.useContext)(pu);return(0,f.useCallback)(t=>e.current[t],[e])},pf=Symbol("solana-ledger-plugin"),pg=e=>{let{title:t="You don't have access to this app",subtitle:n="Have you been invited?",ctaText:r="Try another account",ctaLink:i,onCtaClick:a}=e;return(0,m.jsx)(ck,{title:t,subtitle:n,icon:k.Lock,iconVariant:"warning",primaryCta:{label:r,onClick:()=>{i?window.open(i,"_blank"):null==a||a()}},watermark:!0})},pm={component:()=>{let{navigate:e}=lc(),t=lt(),n=(null==t?void 0:t.allowlistConfig.errorTitle)||"You don't have access to this app",r=(null==t?void 0:t.allowlistConfig.errorDetail)||"Have you been invited?",i=(null==t?void 0:t.allowlistConfig.errorCtaText)||"Try another account",a=null==t?void 0:t.allowlistConfig.errorCtaLink;return(0,m.jsx)(pg,{title:n,subtitle:r,ctaText:i,ctaLink:null!=a?a:void 0,onCtaClick:()=>{e(yL)}})}},py=e=>{let{status:t,title:n,description:r,userIntentRequired:i,retriesRemaining:a,hasSelectedCta:o,onContinue:s,onRetry:l}=e,c=(0,f.useMemo)(()=>{switch(t){case"loading":default:return;case"success":return i?{label:o?"Continuing...":"Continue",onClick:s,disabled:o,loading:o}:void 0;case"error":return a>0?{label:"Retry",onClick:l}:void 0}},[t,o,s,l]),d=(0,f.useMemo)(()=>({loading:"loading",ready:"subtle",disabled:"subtle",success:"success",error:"error"})[t]||"loading",[t]);return(0,m.jsx)(ck,{icon:"loading"===t||"ready"===t?void 0:"success"===t?y.CheckCircle:S.XCircle,iconVariant:d,title:n,subtitle:r,primaryCta:c,watermark:!0})},pv={component:()=>{let{lastScreen:e,data:t,navigate:n,setModalData:r}=lc(),{status:i,token:a,waitForResult:o,reset:s,execute:l}=o3(),c=(0,f.useRef)([]),d=e=>{c.current=[e,...c.current]},[u,h]=(0,f.useState)(!0);(0,f.useEffect)(()=>(d(setTimeout(h,1e3,!1)),()=>
1{c.current.forEach(e=>clearTimeout(e)),c.current=[]}),[]);let[p,g]=(0,f.useState)(""),[y,b]=(0,f.useState)("Checking that you are a human..."),[w,x]=(0,f.useState)(!1),[C,E]=(0,f.useState)(3),k=null==t?void 0:t.captchaModalData,S=async t=>{try{await (null==k?void 0:k.callback(t)),(null==k?void 0:k.onSuccessNavigateTo)&&n(null==k?void 0:k.onSuccessNavigateTo,!1)}catch(t){if(t instanceof o1)return;r({errorModalData:{error:t,previousScreen:e||yL}}),n((null==k?void 0:k.onErrorNavigateTo)||hc,!1)}};return(0,f.useEffect)(()=>{"success"===i?d(setTimeout(async()=>{let e=await o();!e||(null==k?void 0:k.userIntentRequired)||S(e)},1e3)):"ready"===i&&d(setTimeout(()=>{"ready"===i&&l()},500))},[i]),(0,f.useEffect)(()=>{if(!u)switch(i){case"success":g("Success!"),b("CAPTCHA passed successfully."),(null==k?void 0:k.userIntentRequired)||setTimeout(()=>{x(!0),S(a)},2e3);break;case"loading":g(""),b("Checking that you are a human...");break;case"error":g("Something went wrong"),b(C<=0?"If you use an adblocker or VPN, try disabling and re-attempting.":"You did not pass CAPTCHA. Please try again.")}},[i,u,w]),(0,m.jsx)(py,{status:i,title:p,description:y,userIntentRequired:null==k?void 0:k.userIntentRequired,retriesRemaining:C,hasSelectedCta:w,onContinue:()=>{x(!0),S(a)},onRetry:async()=>{if(C<=0)return;E(e=>e-1),s(),l();let e=await o();!e||(null==k?void 0:k.userIntentRequired)||S(e)}})}},pb=e=>(0,m.jsx)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"-0.625 12.48 397.647 399.546",width:"2500",height:"674",preserveAspectRatio:"none",...e,children:(0,m.jsx)("g",{children:(0,m.jsx)("path",{fill:"#333745",d:"M 333.9 12.8 L 150.9 12.8 L 150.9 258.4 L 396.5 258.4 L 396.5 76.7 C 396.6 42.2 368.4 12.8 333.9 12.8 Z M 94.7 12.8 L 64 12.8 C 29.5 12.8 0 40.9 0 76.8 L 0 107.5 L 94.7 107.5 L 94.7 12.8 Z M 0 165 L 94.7 165 L 94.7 259.7 L 0 259.7 L 0 165 Z M 301.9 410.6 L 332.6 410.6 C 367.1 410.6 396.6 382.5 396.6 346.6 L 396.6 316 L 301.9 316 L 301.9 410.6 Z M 150.9 316 L 245.6 316 L 245.6 410.7 L 150.9 410.7 L 150.9 316 Z M 0 316 L 0 346.7 C 0 381.2 28.1 410.7 64 410.7 L 94.7 410.7 L 94.7 316 L 0 316 Z"})})}),pw=e=>{let{onContinueWithLedger:t,onContinueWithoutLedger:n,title:r="Phantom supports Ledger",subtitle:i="Are you using a Ledger hardware wallet?\nContinue to sign with Ledger"}=e;return(0,m.jsx)(ck,{title:r,subtitle:(0,m.jsx)(pE,{children:i}),primaryCta:{label:"Continue with Ledger",onClick:t},secondaryCta:{label:"Continue without Ledger",onClick:n},watermark:!0,children:(0,m.jsxs)(pC,{children:[(0,m.jsx)(sw,{style:{width:"48px",height:"48px"}}),(0,m.jsx)(T.ArrowRightLeft,{strokeWidth:2,color:"var(--privy-color-icon-subtle)",width:22,height:22}),(0,m.jsx)(pb,{style:{width:"48px",height:"48px"}})]})})},px={component:function(){let{data:e,setModalData:t,navigate:n}=lc();return(0,m.jsx)(pw,{onContinueWithLedger:function(){t({...e,login:{...null==e?void 0:e.login,isSigningInWithLedgerSolana:!0}}),n(p_)},onContinueWithoutLedger:function(){t({...e,login:{...null==e?void 0:e.login,isSigningInWithLedgerSolana:!1}}),n(p_)}})}},pC=L.styled.div.withConfig({displayName:"IconContainer",componentId:"sc-218811f1-0"})(["display:flex;align-items:center;justify-content:center;gap:8px;margin-bottom:var(--screen-space);"]),pE=L.styled.span.withConfig({displayName:"SubtitleText",componentId:"sc-218811f1-1"})(["white-space:pre-wrap;"]),pk=e=>{let{style:t,...n}=e;return(0,m.jsx)("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"38px",width:"38px",...t},...n,children:(0,m.jsx)("path",{d:"M20 13.6V20M20 26.4H20.016M36 20C36 28.8365 28.8366 36 20 36C11.1635 36 4.00001 28.8365 4.00001 20C4.00001 11.1634 11.1635 3.99999 20 3.99999C28.8366 3.99999 36 11.1634 36 20Z",stroke:"currentColor",strokeWidth:"3.2",strokeLinecap:"round",strokeLinejoin:"round"})})},pS=e=>{let{title:t="Unable to sign in",subtitle:n="This is a test application that has reached its user limit. To allow more users, this app needs to be upgraded to production.",onGoBack:r}=e;return(0,m.jsx)(ck,{title:t,subtitle:n,icon:pk,iconVariant:"subtle",primaryCta:{label:"Go back",onClick:r},showBack:!0,onBack:r,watermark:!0})},pI={component:()=>{let{navigate:e}=lc();return(0,m.jsx)(pS,{onGoBack:()=>{e(yL)}})}},pA=e=>(null==e?void 0:e.privyErrorCode)===eb.h.LINKED_TO_ANOTHER_USER?sl.ERROR_USER_EXISTS:e instanceof ss&&!e.details.default?e.details:e instanceof si?sl.ERROR_TIMED_OUT:(null==e?void 0:e.privyErrorCode)===eb.h.CANNOT_LINK_MORE_OF_TYPE?sl.ERROR_USER_LIMIT_REACHED:sl.ERROR_WALLET_CONNECTION,pT=e=>{let{walletLogo:t,title:n,subtitle:r,signSuccess:i,errorMessage:a,connectSuccess:o,separateConnectAndSign:s,signing:l,w
1alletConnectRedirectUri:c,walletConnectFallbackUniversalUri:d,hasTabbedAway:u,showCoinbaseWalletResetCta:h,numRetries:p,onBack:f,onSign:g,onRetry:y,onCoinbaseReset:b,onDifferentWallet:w}=e,x=h?{label:"Use a different wallet",onClick:b,disabled:i}:a===sl.ERROR_USER_EXISTS&&f?{label:"Use a different wallet",onClick:w}:o&&!i&&s?{label:l?"Signing":"Sign with your wallet",onClick:g,disabled:l}:!i&&(null==a?void 0:a.retryable)&&p<2?{label:"Retry",onClick:y,disabled:!1}:i||a?void 0:{label:"Connecting",onClick:()=>{},disabled:!0};return(0,m.jsx)(ck,{title:n,subtitle:r,icon:t,iconVariant:"loading",iconLoadingStatus:{success:i,fail:!!a},primaryCta:x,onBack:f,watermark:!0,children:!o&&c&&!u&&(0,m.jsxs)(pj,{children:["Still here?"," ",(0,m.jsx)(uK,{href:c,target:"_blank",variant:"underlined",size:"sm",children:"Try connecting again"}),d&&(0,m.jsxs)(m.Fragment,{children:[" ","or"," ",(0,m.jsx)(uK,{href:d,target:"_blank",variant:"underlined",size:"sm",children:"use this different link"})]})]})})},p_={component:()=>{var e,t,n,r,i,a,o,s,l,c,d,u,h,p,y;let b,[w,x]=(0,f.useState)(!1),[C,E]=(0,f.useState)(!1),[k,S]=(0,f.useState)(void 0),{authenticated:I,logout:A}=(0,g.u)(),{navigate:T,navigateBack:_,lastScreen:j,currentScreen:P,setModalData:$,data:N}=lc(),O=lt(),{getAuthFlow:M,walletConnectionStatus:L,closePrivyModal:D,initLoginWithWallet:F,loginWithWallet:U,updateWallets:B,createAnalyticsEvent:z}=(0,R.u)(),{walletConnectors:W}=(0,g.u)(),[q,H]=(0,f.useState)(0),{user:V}=(0,g.u)(),G=pp(),[K]=(0,f.useState)((null==V?void 0:V.linkedAccounts.length)||0),[Y,Z]=(0,f.useState)(""),[J,Q]=(0,f.useState)(""),[X,ee]=(0,f.useState)(!1),{hasTabbedAway:et}=function(){let[e,t]=(0,f.useState)(!1),n=(0,f.useCallback)(()=>{document.hidden&&t(!0)},[]);return(0,f.useEffect)(()=>(document.addEventListener("visibilitychange",n),()=>document.removeEventListener("visibilitychange",n)),[n]),{hasTabbedAway:e,reset:()=>t(!1)}}(),{enabled:en,token:er}=o3(),ei=sJ((null==L||null==(e=L.connector)?void 0:e.walletClientType)||"unknown"),ea=eT.isMobile&&"wallet_connect_v2"===(null==L||null==(t=L.connector)?void 0:t.connectorType)||eT.isMobile&&"coinbase_wallet"===(null==L||null==(n=L.connector)?void 0:n.connectorType)||eT.isMobile&&"base_account"===(null==L||null==(r=L.connector)?void 0:r.connectorType)||eT.isMobile&&"injected"===(null==L||null==(i=L.connector)?void 0:i.connectorType)&&"phantom"===(null==L||null==(a=L.connector)?void 0:a.walletClientType)||eT.isMobile&&"solana_adapter"===(null==L||null==(o=L.connector)?void 0:o.connectorType)&&"mobile_wallet_adapter"
1===L.connector.walletClientType,eo="connected"===(null==L?void 0:L.status),es="switching_to_supported_chain"===(null==L?void 0:L.status);(0,f.useEffect)(()=>{var e,t,n,r,i,a;let o=M(),s=o instanceof oM||o instanceof oL?o:void 0;eo&&"solana"===(null==(e=L.connector)?void 0:e.chainType)&&"phantom"===(null==(t=L.connector)?void 0:t.walletClientType)&&G(pf)&&void 0===(null==N||null==(n=N.login)?void 0:n.isSigningInWithLedgerSolana)?T(px,!1):(eo&&!s&&(!en||er||I?F(L.connectedWallet,er,null==N||null==(r=N.login)?void 0:r.disableSignup,(null==N||null==(i=N.login)?void 0:i.isSigningInWithLedgerSolana)?"transaction":"plain").then(()=>{ee(!0)}):($({captchaModalData:{callback:e=>{var t,n;return F(L.connectedWallet,e,null==N||null==(t=N.login)?void 0:t.disableSignup,(null==N||null==(n=N.login)?void 0:n.isSigningInWithLedgerSolana)?"transaction":"plain").then(()=>{ee(!0)})},userIntentRequired:!1,onSuccessNavigateTo:p_,onErrorNavigateTo:hc}}),T(pv,!1))),s instanceof oL&&(null==N||null==(a=N.login)?void 0:a.isSigningInWithLedgerSolana)&&(s.messageType="transaction"),s&&ea&&eo&&!s.preparedMessage?s.buildMessage():s&&!ea&&eo&&(C||(async()=>{E(!0),S(void 0);try{var e,t;"wallet_connect_v2"===(null==L||null==(e=L.connector)?void 0:e.connectorType)&&"metamask"===(null==L||null==(t=L.connector)?void 0:t.walletClientType)&&await oV(2500),await ec()}catch(e){console.warn("Auto-prompted signature failed",e)}finally{E(!1)}})()))},[q,eo,X]),(0,f.useEffect)(()=>{if(V&&w){if((null==O?void 0:O.legal.requireUsersAcceptTerms)&&!V.hasAcceptedTerms){let e=setTimeout(()=>{T(hA)},900);return()=>clearTimeout(e)}if(uX(V,O.embeddedWallets)){let e=setTimeout(()=>{$({createWallet:{onSuccess:()=>{},onFailure:e=>{console.error(e),z({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,screen:"ConnectionStatusScreen"}}),A()},callAuthOnSuccessOnClose:!0}}),T(hI)},900);return()=>clearTimeout(e)}B();let e=setTimeout(()=>D({shouldCallAuthOnSuccess:!0,isSuccess:!0}),a5);return()=>clearTimeout(e)}},[V,w]);let el=e=>{if((null==e?void 0:e.privyErrorCode)!==eb.h.ALLOWLIST_REJECTED){var t,n,r,i,a,o,s,l,c,d,u,h,p,f;if((null==e?void 0:e.privyErrorCode)===eb.h.USER_LIMIT_REACHED)return console.error(new eb.ab(e).toString()),void T(pI);if((null==e?void 0:e.privyErrorCode)!==eb.h.USER_DOES_NOT_EXIST)return(null==e?void 0:e.privyErrorCode)===eb.h.ACCOUNT_TRANSFER_REQUIRED&&(null==(n=e.data)||null==(t=n.data)?void 0:t.nonce)?($({accountTransfer:{nonce:null==(i=e.data)||null==(r=i.data)?void 0:r.nonce,account:null==(a=M())?void 0:a.meta.address,displayName:null==(l=e.data)||null==(s=l.data)||null==(o=s.account)?void 0:o.displayName,externalWalletMetadata:{walletClientType:null==(c=M())?void 0:c.meta.walletClientType,chainId:null==(d=M())?void 0:d.meta.chainId,connectorType:null==(u=M())?void 0:u.meta.connectorType},linkMethod:M()instanceof oM?"siwe":"siws",embeddedWalletAddress:null==(f=e.data)||null==(p=f.data)||null==(h=p.otherUser)?void 0:h.embeddedWalletAddress}}),void T(hC)):void S(pA(e));T(u1)}else T(pm)};async function ec(){try{await U(),x(!0)}catch(e){el(e)}finally{E(!1)}}(0,f.useEffect)(()=>{(null==L?void 0:L.connectError)&&el(null==L?void 0:L.connectError)},[L]),((e,t)=>{let n=(0,f.useRef)(()=>{});(0,f.useEffect)(()=>{n.current=e}),(0,f.useEffect)(()=>{if(null!==t){let e=setInterval(()=>n.current(),t||0);return()=>clearInterval(e)}},[t])})(()=>{let e="wallet_connect_v2"===ed&&(null==L?void 0:L.connector)instanceof la?L.connector.redirectUri:void 0;e&&Z(e);let t="wallet_connect_v2"===ed&&(null==L?void 0:L.connector)instanceof la?L.connector.fallbackUniversalRedirectUri:void 0;t&&Q(t)},(null==L?void 0:L.connector)instanceof la&&!Y?500:null);let ed=(null==L||null==(s=L.connector)?void 0:s.connectorType)||"injected",eu=(null==L||null==(l=L.connector)?void 0:l.walletClientType)||"unknown",eh=(null==ei||null==(c=ei.metadata)?void 0:c.shortName)||(null==ei?void 0:ei.name)||(null==L||null==(d=L.connector)?void 0:d.walletBranding.name)||"Browser Extension",ep=(null==ei||null==(u=ei.image_url)?void 0:u.md)||(null==L||null==(h=L.connector)?void 0:h.walletBranding.icon)||(e=>(0,m.jsx)(sv,{...e})),ef="Browser Extension"===eh?eh.toLowerCase():eh;b=w?"Successfully connected with ".concat(ef):k?k.message:es?"Switching networks":eo?C&&ea?"Signing":"Sign to verify":"Waiting for ".concat(ef);let eg="Don’t see your wallet? Check your other browser windows.";w?eg=K===((null==V?void 0:V.linkedAccounts.length)||0)?"Wallet was already linked.":"You’re good to go!":q>=2&&k?eg="Unable to connect wallet":k?eg=k.detail:es?eg="Switch your wallet to the requested network.":eo&&ea?eg="Sign the message in y
1our wallet to verify it belongs to you.":"metamask"===eu&&eT.isMobile?eg="Click continue to open and connect MetaMask.":"metamask"===eu?eg="For the best experience, connect only one wallet at a time.":"wallet_connect"===ed?eg="Open your mobile wallet app to continue":"coinbase_wallet"===ed?oU()||(eg=pd(V)?"Continue with the Coinbase app. Not the right wallet? Reset your connection below.":"Confirm in the Coinbase app/popup to continue."):(null==N||null==(p=N.login)?void 0:p.isSigningInWithLedgerSolana)&&(eg="Ledger requires a transaction to verify your identity. You’ll sign a transaction that performs no onchain action.");let em=null==W||null==(y=W.walletConnectors)?void 0:y.find(e=>"coinbase_wallet"===e.walletClientType),ey="coinbase_wallet"===eu&&(pd(V)||k===sl.ERROR_USER_EXISTS);return(0,m.jsx)(pT,{walletLogo:ep,title:b,subtitle:eg,signSuccess:w,errorMessage:k,connectSuccess:eo,separateConnectAndSign:ea,signing:C,walletConnectRedirectUri:Y,walletConnectFallbackUniversalUri:J,hasTabbedAway:et,showCoinbaseWalletResetCta:ey,numRetries:q,onBack:j&&P!==j?_:void 0,onSign:()=>{E(!0),ec()},onRetry:()=>{H(q+1),S(void 0),eo?(E(!0),ec()):null==L||L.connectRetry()},onCoinbaseReset:()=>{em&&(null==em||em.disconnect())},onDifferentWallet:_})}},pj=L.styled.p.withConfig({displayName:"RedirectLinksContainer",componentId:"sc-7b4251f2-0"})(["text-align:center;color:var(--privy-color-foreground-2);font-size:14px;line-height:22px;margin:16px 0;"]),pP={component:()=>{var e,t,n,r,i,a,o,s;let{setWalletConnectionStatus:l,closePrivyModal:c,inProgressAuthFlowRef:d}=(0,R.u)(),{data:u,navigate:h}=lc(),p=lt(),g=lg(),y=null==u||null==(e=u.externalConnectWallet)?void 0:e.description,b=(0,f.useRef)(null!=(o=null==u||null==(t=u.externalConnectWallet)?void 0:t.walletList)?o:p.appearance.walletList),w=(0,f.useRef)(null!=(s=null==u||null==(n=u.externalConnectWallet)?void 0:n.walletChainType)?s:p.appearance.walletChainType),x=b.current,C=w.current,E="link"===d.current?void 0:()=>h(yL);return(0,m.jsx)(pt,{walletList:x,walletChainType:C,onClose:c,onConnect:(0,f.useCallback)(e=>{var t;let{connector:n,wallet:r}=e;g("connectWallet","onSuccess",{wallet:r}),l({status:"connected",connectedWallet:r,connector:n,connectError:null,connectRetry:()=>null}),h(p_,!(null==u||null==(t=u.externalConnectWallet)?void 0:t.preSelectedWalletId))},[l,h,null==u||null==(r=u.login)?void 0:r.disableSignup,null==u||null==(i=u.externalConnectWallet)?void 0:i.preSelectedWalletId]),onConnectError:e=>{e instanceof eb.aa?(console.warn(e.cause?e.cause:e.message),g("connectWallet","onError",e.privyErrorCode||eb.h.GENERIC_CONNECT_WALLET_ERROR)):(console.warn(e),g("connectWallet","onError",eb.h.UNKNOWN_CONNECT_WALLET_ERROR))},onBack:E,customDescription:y||"",preSelectedWalletId:null==u||null==(a=u.externalConnectWallet)?void 0:a.preSelectedWalletId,app:p})},isUnauthenticatedScreem:!0},p$=e=>{let{children:t,theme:n}=e;return(0,m.jsxs)(pN,{$theme:n,children:[(0,m.jsx)(e9.default,{width:"20px",height:"20px",color:"var(--privy-color-icon-subtle)",strokeWidth:2,style:{flexShrink:0}}),(0,m.jsx)(pO,{$theme:n,children:t})]})},pN=L.styled.div.withConfig({displayName:"Container",componentId:"sc-1b5ed8dd-0"})(["display:flex;gap:0.75rem;background-color:var(--privy-color-background-2);align-items:flex-start;padding:1rem;border-radius:0.75rem;"]),pO=L.styled.div.withConfig({displayName:"Content",componentId:"sc-1b5ed8dd-1"})(["color:",";font-size:1rem;font-weight:400;line-height:1.5;flex:1;text-align:left;"],e=>"dark"===e.$theme?"var(--privy-color-foreground-2)":"var(--privy-color-foreground)"),pM=L.styled.span.withConfig({displayName:"Subtitle",componentId:"sc-7a11f796-0"})(["margin-top:4px;color:var(--privy-color-foreground);text-align:center;font-size:0.875rem;font-weight:400;line-height:1.375rem;&& a{color:var(--privy-color-accent);}"]),pR=L.styled.span.withConfig({displayName:"Title",componentId:"sc-66de63c-0"})(["color:var(--privy-color-foreground);font-size:1.125rem;font-weight:600;line-height:1.875rem;text-align:center;"]),pL=L.styled.span.withConfig({displayName:"LabelXs",componentId:"sc-4c43f9fd-0"})(["color:var(--privy-color-foreground-3);font-size:0.75rem;font-weight:500;line-height:1.125rem;"]),pD=(0,L.css)(["&&{border-width:1px;padding:0.5rem 1rem;}width:100%;text-align:left;border:solid 1px var(--privy-color-foreground-4);border-radius:var(--privy-border-radius-md);display:flex;justify-content:space-between;align-items:center;",""],e=>"error"===e.$state?"\n        border-color: var(--privy-color-error);\n        background: var(--privy-color-error-bg);\n      ":""),pF=L.styled.div.withConfig({displayName:"Box",componentId:"sc-7252360a-0"})(["",""],pD),pU=(0,L.styled)(pF).withConfig({displayName:"StyledBox",componentId:"sc-4010d8f3-0"})(["&&{padding:0.75rem;height:56px;}"]),pB=L.styled.div.withConfig({displayName:"WalletContent",componentId:"sc-4010d8f3-1"})(["display:flex;align-items:center;justify-content:space-between;width:100%;"]),pz=L.styled.div.withConfig({displayName:"AddressContainer",componentId:"sc-4010d8f3-2"})(["display:flex;flex-direction:column;gap:0;"]),pW=L.styled.div.withConfig({displayName:"BalanceText",componentId:"sc-4010d8f3-3"})(["font-size:12px;line-height:1rem;color:var(--privy-color-foreground-3);"]),pq=(0,L.styled)(pL).withConfig({displayName:"TitleLabel",componentId:"sc-4010d8f3-4"})(["text-align:left;margin-bottom:0.5rem;"]),pH=(0,L.styled)(hq).withConfig({displayName:"StyledErrorMessage",componentId:"sc-4010d8f3-5"})(["margin-top:0.25rem;"]),pV=(0,L.styled)(lV).withConfig({displayName:"CopyButton",componentId:"sc-4010d8f3-6"})(["&&{gap:0.375rem;font-size:14px;}"]),pG=e=>{let{errMsg:t,balance:n,address:r,className:i,title:a,showCopyButton:o=!1}=e,[s,l]=(0,f.useState)(!1);return(0,f.useEffect)(()=>
1{if(s){let e=setTimeout(()=>l(!1),3e3);return()=>clearTimeout(e)}},[s]),(0,m.jsxs)("div",{children:[a&&(0,m.jsx)(pq,{children:a}),(0,m.jsx)(pU,{className:i,$state:t?"error":void 0,children:(0,m.jsxs)(pB,{children:[(0,m.jsxs)(pz,{children:[(0,m.jsx)(u3,{address:r,showCopyIcon:!1}),void 0!==n&&(0,m.jsx)(pW,{children:n})]}),o&&(0,m.jsx)(pV,{onClick:function(e){e.stopPropagation(),navigator.clipboard.writeText(r).then(()=>l(!0)).catch(console.error)},size:"sm",children:(0,m.jsxs)(m.Fragment,s?{children:["Copied",(0,m.jsx)(w.Check,{size:14})]}:{children:["Copy",(0,m.jsx)(x.Copy,{size:14})]})})]})}),t&&(0,m.jsx)(pH,{children:t})]})};function pK(e){let{rpcConfig:t,appId:n,address:r,chain:i}=e,{chains:a}=(0,R.u)(),[o,s]=(0,f.useState)(0n),[l,c]=(0,f.useState)(!1),d=(0,f.useMemo)(()=>{let e=i||a[0];if(e)return(0,U.createPublicClient)({chain:i,transport:(0,B.http)(oz(e,t,n))})},[i,t,n]),u=(0,f.useCallback)(async()=>{if(!r||!d)return;c(!0);let e=await d.getBalance({address:r}).catch(console.error);return e?(s(e),c(!1),e):void 0},[d,r,s]);return(0,f.useEffect)(()=>{u().catch(console.error)},[]),{balance:o,isLoading:l,reloadBalance:u}}let pY="sdk_fiat_on_ramp_completed_with_status";async function pZ(e){var t;let{rpc:n,address:r}=e;return null!=(t=(await n.getBalance(r,{commitment:"confirmed"}).send()).value)?t:0n}function pJ(e){switch(e){case"solana:mainnet":return"Solana";case"solana:devnet":return"Devnet";case"solana:testnet":return"Testnet"}}function pQ(e){var t;let[n]=null!=(t=Object.entries(cM[e]).find(e=>{let[t,n]=e;return"USDC"===n.symbol}))?t:[];return n}let pX=async e=>{let{chain:t,address:n,appId:r,rpcConfig:i,erc20Address:a}=e,o=(0,U.createPublicClient)({chain:t,transport:(0,B.http)(oz(t,i,r))});return{balance:await o.readContract({address:a,abi:p0,functionName:"balanceOf",args:[n]}).catch(()=>0n),chain:t}},p0=[{constant:!0,inputs:[{name:"_owner",type:"address"}],name:"balanceOf",outputs:[{name:"balance",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"}],p1={component:()=>{var e,t,n;let{wallets:r}=dx(),{connectors:i}=(0,R.u)(),a=i.filter(sV).flatMap(e=>e.wallets),{data:o,setModalData:s,navigate:l,lastScreen:c}=lc(),{rpcConfig:d,appId:u,createAnalyticsEvent:h,closePrivyModal:p}=(0,R.u)(),g=lt(),[y,b]=(0,f.useState)(void 0),[w,x]=(0,f.useState)(!1),C=null==o?void 0:o.funding,{reloadBalance:E}=pK({rpcConfig:d,appId:u,address:"ethereum"===C.chainType?C.address:void 0,chain:"ethereum"===C.chainType?C.chain:void 0}),k="solana"===C.chainType,S=k?C.isUSDC?"USDC":"SOL":C.erc20Address?null==(e=C.erc20ContractInfo)?void 0:e.symbol:C.chain.nativeCurrency.symbol,I=k?a.find(e=>{let{address:t}=e;return t===C.address}):r.find(e=>{let{address:t}=e;return oq(t)===oq(C.address)});if(!C)return s({errorModalData:{error:Error("Couldn't find funding config"),previousScreen:c||mC},funding:null==o?void 0:o.funding,solanaFundingData:null==o?void 0:o.solanaFundingData,sendTransaction:null==o?void 0:o.sendTransaction}),l(hc),(0,m.jsx)(m.Fragment,{});(0,f.useEffect)(()=>{let e=k?async function(){if("solana"!==C.chainType)return;let e=g.solanaRpcs[C.chain];e?(C.isUSDC?async function(e){var t;let{rpc:n,address:r,mintAddress:i}=e,a=null==(t=(await n.getTokenAccountsByOwner(r,{mint:i},{encoding:"jsonParsed",commitment:"confirmed"}).send()).value[0])?void 0:t.account;return a?BigInt(a.data.parsed.info.tokenAmount.amount):0n}({rpc:e.rpc,address:C.address,mintAddress:pQ(C.chain)}):pZ({rpc:e.rpc,address:C.address})).then(e=>{let t=BigInt(e);y&&t>y&&(x(!0),h({eventName:pY,payload:{provider:"manual",status:"success",chainType:"solana",address:null==I?void 0:I.address,value:C.isUSDC?(0,W.formatUnits)(t-y,6):(0,W.formatUnits)(t-y,9),token:C.isUSDC?"USDC":"SOL"}})),b(t)}):console.warn("Unable to load solana rpc, skipping balance")}:async function(){"ethereum"===C.chainType&&(async()=>{var e;if(!C.erc20Address)return null!=(e=await E())?e:BigInt(0);{let{balance:e}=await pX({chain:C.chain,address:C.address,erc20Address:C.erc20Address,rpcConfig:d,appId:u});return e}})().then(e=>{var t,n,r,i,a;y&&e>y&&(x(!0),h({eventName:pY,payload:{provider:"manual",status:"success",chainType:"ethereum",address:null==I?void 0:I.address,chainId:C.chain.id,value:(0,W.formatUnits)(e-y,null!=(r=null==(t=C.erc20ContractInfo)?void 0:t.decimals)?r:18),token:null!=(a=null!=(i=null==(n=C.erc20ContractInfo)?void 0:n.symbol)?i:C.erc20Address)?a:"ETH"}})),b(e)}).catch(()=>b(void 0))},t=setInterval(e,2e3);return e(),()=>clearInterval(t)},[y]);let A=(0,f.useMemo)(()=>{var e;return null==y?"":C.isUSDC?(0,el.formatTokenAmount)({amount:y,decimals:6}):k?cD(y,3,!0,!0):null!=(null==(e=C.erc20ContractInfo)?void 0:e.decimals)?(0,el.formatTokenAmount)({amount:y,decimals:C.erc20ContractInfo.decimals}):(0,el.formatWeiAmount)({wei:y})}
1,[y,k,C]),T="ethereum"===C.chainType?C.chain.name:pJ(C.chain),_=(0,f.useMemo)(()=>{var e,t,n;return""===(null==(e=C.uiConfig)?void 0:e.receiveFundsTitle)?null:(0,m.jsx)(pR,{children:null!=(n=null==(t=C.uiConfig)?void 0:t.receiveFundsTitle)?n:"Receive ".concat(C.amount," ").concat(null!=S?S:"").trim()})},[null==(t=C.uiConfig)?void 0:t.receiveFundsTitle,C.amount,S]),j=(0,f.useMemo)(()=>{var e,t,n;return""===(null==(e=C.uiConfig)?void 0:e.receiveFundsSubtitle)?null:(0,m.jsx)(pM,{children:null!=(n=null==(t=C.uiConfig)?void 0:t.receiveFundsSubtitle)?n:"Scan this code or copy your wallet address to receive funds on ".concat(T,".")})},[null==(n=C.uiConfig)?void 0:n.receiveFundsSubtitle,T]),P="solana"===C.chainType&&C.isUSDC&&pQ(C.chain)?"?spl-token=".concat(pQ(C.chain)):"";return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(gi,{}),_,j,(0,m.jsxs)(cZ,{style:{gap:"1rem",margin:_||j?"1rem 0":"0"},children:[(0,m.jsx)(hW,{url:"".concat(C.chainType,":").concat(C.address).concat(P),size:200,squareLogoElement:p2}),(0,m.jsxs)(p$,{theme:g.appearance.palette.colorScheme,children:["Make sure to send funds on ",T,"."]}),(0,m.jsx)(pG,{title:"Your wallet",errMsg:void 0,showCopyButton:!0,balance:"".concat(A," ").concat(S),address:C.address}),w&&(0,m.jsx)(lz,{onClick:()=>p({shouldCallAuthOnSuccess:!1,isSuccess:!0}),children:"Continue"})]}),(0,m.jsx)(lj,{})]})}},p2=e=>{let{...t}=e;return(0,m.jsx)(sm,{color:"black",...t})},p3=[{constant:!0,inputs:[{name:"_owner",type:"address"}],name:"balanceOf",outputs:[{name:"balance",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"}],p5=async e=>{let{address:t,chain:n,rpcConfig:r,privyAppId:i}=e;try{let e=(0,U.createPublicClient)({chain:n,transport:(0,B.http)(oz(n,r,i))}),[a,o]=await Promise.all([e.readContract({abi:p4,address:t,functionName:"symbol"}),e.readContract({abi:p4,address:t,functionName:"decimals"})]);return{decimals:o,symbol:a}}catch(e){return console.log(e),null}},p4=[{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}],p6=2n**256n-1n,p8=e=>{let{amount:t,decimals:n}=e;return t===p6?"Maximum":Intl.NumberFormat(void 0,{maximumFractionDigits:n}).format(Number(t)/10**n)},p9=e=>{let{data:t}=e,n=e=>"object"==typeof e&&null!==e?(0,m.jsx)(fe,{children:Object.entries(e).map(e=>{let[t,r]=e;return(0,m.jsxs)("li",{children:[(0,m.jsxs)("strong",{children:[t,":"]})," ",n(r)]},t)})}):(0,m.jsx)("span",{children:String(e)});return(0,m.jsx)("div",{children:n(t)})},p7=L.styled.div.withConfig({displayName:"Message",componentId:"sc-70ec2a4f-0"})(["margin-top:1.5rem;background-color:var(--privy-color-background-2);border-radius:var(--privy-border-radius-md);padding:12px;text-align:left;max-height:310px;overflow:scroll;white-space:pre-wrap;width:100%;font-size:0.875rem;font-weight:400;color:var(--privy-color-foreground);line-height:1.5;-ms-overflow-style:none;scrollbar-width:none;&::-webkit-scrollbar{display:none;}"]),fe=L.styled.ul.withConfig({displayName:"MessageList",componentId:"sc-70ec2a4f-1"})(["margin-left:12px !important;white-space:nowrap;&:first-child{margin-left:0 !important;}strong{font-weight:500 !important;}"]),ft=e=>{let{data:t,className:n}=e;return(0,m.jsx)(p7,{className:n,children:(0,m.jsx)(p9,{data:t})})},fn=L.styled.div.withConfig({displayName:"Container",componentId:"sc-b3a607dd-0"})(["display:flex;flex-direction:column;min-height:72px;"]);var fr=e=>{let{onBack:t,details:n}=e;return(0,m.jsxs)(fn,{children:[(0,m.jsx)(l1,{backFn:t}),(0,m.jsx)(ft,{data:n}),(0,m.jsx)(lj,{})]})};let fi=L.styled.span.withConfig({displayName:"LabelSm",componentId:"sc-6c002d6-0"})(["color:var(--privy-color-foreground-3);font-size:0.875rem;font-weight:400;line-height:1.375rem;"]),fa=(0,L.styled)(fi).withConfig({displayName:"LabelSmPrimary",componentId:"sc-6c002d6-1"})(["color:var(--privy-color-accent);"]),fo=(0,L.styled)(fi).withConfig({displayName:"InteractiveLabel",componentId:"sc-b57d0824-0"})(["cursor:pointer;display:inline-flex;gap:8px;align-items:center;color:var(--privy-color-accent);
1svg{fill:var(--privy-color-accent);}"]),fs=L.styled.span.withConfig({displayName:"Rows",componentId:"sc-b764aab6-0"})(["display:flex;flex-direction:column;gap:0.35rem;width:100%;"]),fl=L.styled.span.withConfig({displayName:"Row",componentId:"sc-b764aab6-1"})(["display:flex;width:100%;justify-content:space-between;gap:0.5rem;"]),fc=(0,L.keyframes)(["from,to{background:var(--privy-color-foreground-4);color:var(--privy-color-foreground-4);}50%{background:var(--privy-color-foreground-accent);color:var(--privy-color-foreground-accent);}"]),fd=(0,L.css)(["",""],e=>e.$isLoading?(0,L.css)(["width:35%;animation:"," 2s linear infinite;border-radius:var(--privy-border-radius-sm);"],fc):""),fu=L.styled.span.withConfig({displayName:"Value",componentId:"sc-72aa026-0"})(["color:var(--privy-color-foreground);font-size:0.875rem;font-weight:500;line-height:1.375rem;word-break:break-all;text-align:right;",""],fd);var fh=e=>{let{iconUrl:t,value:n,symbol:r,usdValue:i,nftName:a,nftCount:o,decimals:s,$isLoading:l}=e;if(l)return(0,m.jsx)(fp,{$isLoading:l});let c=n&&i&&s?function(e,t,n){let r=parseFloat(e),i=parseFloat(n);if(0===r||0===i||Number.isNaN(r)||Number.isNaN(i))return e;let a=Math.ceil(-Math.log10(.01/(i/r))),o=Math.pow(10,a=Math.max(a=Math.min(a,t),1)),s=+(Math.floor(r*o)/o).toFixed(a).replace(/\.?0+$/,"");return Intl.NumberFormat(void 0,{maximumFractionDigits:t}).format(s)}(n,s,i):n;return(0,m.jsxs)("div",{children:[(0,m.jsxs)(fp,{$isLoading:l,children:[t&&(0,m.jsx)(fg,{src:t,alt:"Token icon"}),o&&o>1?o+"x":void 0," ",a,c," ",r]}),i&&(0,m.jsxs)(ff,{$isLoading:l,children:["$",i]})]})};let fp=L.styled.span.withConfig({displayName:"Value",componentId:"sc-991db279-0"})(["color:var(--privy-color-foreground);font-size:0.875rem;font-weight:500;line-height:1.375rem;word-break:break-all;text-align:right;display:flex;justify-content:flex-end;",""],fd),ff=L.styled.span.withConfig({displayName:"Subvalue",componentId:"sc-991db279-1"})(["color:var(--privy-color-foreground-2);font-size:12px;font-weight:400;line-height:18px;word-break:break-all;text-align:right;display:flex;justify-content:flex-end;",""],fd),fg=L.styled.img.withConfig({displayName:"TokenIcon",componentId:"sc-991db279-2"})(["height:14px;width:14px;margin-right:4px;object-fit:contain;"]),fm=e=>{var t,n,r,i,a,o,s,l;let{chain:c,transactionDetails:d,isTokenContractInfoLoading:u,symbol:h}=e,{action:p,functionName:f}=d;return(0,m.jsx)(pF,{children:(0,m.jsxs)(fs,{children:["transaction"!==p&&(0,m.jsxs)(fl,{children:[(0,m.jsx)(fi,{children:"Action"}),(0,m.jsx)(fu,{children:f})]}),"mint"===f&&"args"in d&&d.args.filter(e=>e).map((e,t)=>{var n,r;return(0,m.jsxs)(fl,{children:[(0,m.jsx)(fi,{children:"Param ".concat(t)}),(0,m.jsx)(fu,{children:"string"==typeof e&&(0,V.isAddress)(e)?(0,m.jsx)(u3,{address:e,url:null==c||null==(r=c.blockExplorers)||null==(n=r.default)?void 0:n.url,showCopyIcon:!1}):null==e?void 0:e.toString()})]},t)}),"setApprovalForAll"===f&&d.operator&&(0,m.jsxs)(fl,{children:[(0,m.jsx)(fi,{children:"Operator"}),(0,m.jsx)(fu,{children:(0,m.jsx)(u3,{address:d.operator,url:null==c||null==(n=c.blockExplorers)||null==(t=n.default)?void 0:t.url,showCopyIcon:!1})})]}),"setApprovalForAll"===f&&void 0!==d.approved&&(0,m.jsxs)(fl,{children:[(0,m.jsx)(fi,{children:"Set approval to"}),(0,m.jsx)(fu,{children:d.approved?"true":"false"})]}),"transfer"===f||"transferFrom"===f||"safeTransferFrom"===f||"approve"===f?(0,m.jsxs)(m.Fragment,{children:["formattedAmount"in d&&d.formattedAmount&&(0,m.jsxs)(fl,{children:[(0,m.jsx)(fi,{children:"Amount"}),(0,m.jsxs)(fu,{$isLoading:u,children:[d.formattedAmount," ",h]})]}),"tokenId"in d&&d.tokenId&&(0,m.jsxs)(fl,{children:[(0,m.jsx)(fi,{children:"Token ID"}),(0,m.jsx)(fu,{children:d.tokenId.toString()})]})]}):null,"safeBatchTransferFrom"===f&&(0,m.jsxs)(m.Fragment,{children:["amounts"in d&&d.amounts&&(0,m.jsxs)(fl,{children:[(0,m.jsx)(fi,{children:"Amounts"}),(0,m.jsx)(fu,{children:d.amounts.join(", ")})]}),"tokenIds"in d&&d.tokenIds&&(0,m.jsxs)(fl,{children:[(0,m.jsx)(fi,{children:"Token IDs"}),(0,m.jsx)(fu,{children:d.tokenIds.join(", ")})]})]}),"approve"===f&&d.spender&&(0,m.jsxs)(fl,{children:[(0,m.jsx)(fi,{children:"Spender"}),(0,m.jsx)(fu,{children:(0,m.jsx)(u3,{address:d.spender,url:null==c||null==(i=c.blockExplorers)||null==(r=i.default)?void 0:r.url,showCopyIcon:!1})})]}),("transferFrom"===f||"safeTransferFrom"===f||"safeBatchTransferFrom"===f)&&d.transferFrom&&(0,m.jsxs)(fl,{children:[(0,m.jsx)(fi,{children:"Transferring from"}),(0,m.jsx)(fu,{children:(0,m.jsx)(u3,{address:d.transferFrom,url:null==c||null==(o=c.blockExplorers)||null==(a=o.default)?void 0:a.url,showCopyIcon:!1})})]}),("transferFrom"===f||"safeTransferFrom"===f||"safeBatchTransferFrom"===f)&&d.transferTo&&(0,m.jsxs)(fl,{children:[(0,m.jsx)(fi,{children:"Transferring to"}),(0,m.jsx)(fu,{children:(0,m.jsx)(u3,{address:d.transferTo,url:null==c||null==(l=c.blockExplorers)||null==(s=l.default)?void 0:s.url,showCopyIcon:!1})})]})]})})},fy=e=>{let{children:t,theme:n}=e;
1return(0,m.jsxs)(fv,{$theme:n,children:[(0,m.jsx)(eP.default,{width:"20px",height:"20px",color:"var(--privy-color-icon-error)",strokeWidth:2,style:{flexShrink:0}}),(0,m.jsx)(fb,{$theme:n,children:t})]})},fv=L.styled.div.withConfig({displayName:"Container",componentId:"sc-34910fd1-0"})(["display:flex;gap:0.75rem;background-color:var(--privy-color-error-bg);align-items:flex-start;padding:1rem;border-radius:0.75rem;"]),fb=L.styled.div.withConfig({displayName:"Content",componentId:"sc-34910fd1-1"})(["color:",";font-size:1rem;font-weight:400;line-height:1.5;flex:1;text-align:left;"],e=>"dark"===e.$theme?"var(--privy-color-foreground-2)":"var(--privy-color-foreground)"),fw=e=>{let{children:t,theme:n}=e;return(0,m.jsxs)(fx,{$theme:n,children:[(0,m.jsx)(e_.default,{width:"20px",height:"20px",color:"var(--privy-color-icon-warning)",strokeWidth:2,style:{flexShrink:0}}),(0,m.jsx)(fC,{$theme:n,children:t})]})},fx=L.styled.div.withConfig({displayName:"Container",componentId:"sc-a77c2854-0"})(["display:flex;gap:0.75rem;background-color:var(--privy-color-warn-bg);align-items:flex-start;padding:1rem;border-radius:0.75rem;"]),fC=L.styled.div.withConfig({displayName:"Content",componentId:"sc-a77c2854-1"})(["color:",";font-size:1rem;font-weight:400;line-height:1.5;flex:1;text-align:left;"],e=>"dark"===e.$theme?"var(--privy-color-foreground-2)":"var(--privy-color-foreground)"),fE=e=>{let{variant:t,setPreventMaliciousTransaction:n,colorScheme:r="light",preventMaliciousTransaction:i}=e;return"warn"===t?(0,m.jsx)(fk,{children:(0,m.jsxs)(fw,{theme:r,children:[(0,m.jsx)("span",{style:{fontWeight:"500"},children:"Warning: Suspicious transaction"}),(0,m.jsx)("br",{}),"This has been flagged as a potentially deceptive request. Approving could put your assets or funds at risk."]})}):"error"===t?(0,m.jsx)(m.Fragment,{children:(0,m.jsxs)(fk,{children:[(0,m.jsx)(fy,{theme:r,children:(0,m.jsxs)("div",{children:[(0,m.jsx)("strong",{children:"This is a malicious transaction"}),(0,m.jsx)("br",{}),"This transaction transfers tokens to a known malicious address. Proceeding may result in the loss of valuable assets."]})}),(0,m.jsxs)(fS,{children:[(0,m.jsx)(uu,{color:"var(--privy-color-error)",checked:!i,readOnly:!0,onClick:()=>n(!i)}),(0,m.jsx)("span",{children:"I understand and want to proceed anyways."})]})]})}):null},fk=L.styled.div.withConfig({displayName:"BannerContainer",componentId:"sc-ab8a5a0b-0"})(["margin-top:1.5rem;"]),fS=L.styled.div.withConfig({displayName:"CheckboxContainer",componentId:"sc-ab8a5a0b-1"})(["display:flex;align-items:center;gap:0.5rem;margin-top:0.75rem;"]),fI=e=>{let{transactionIndex:t,maxIndex:n}=e;return"number"!=typeof t||0===n?"":" (".concat(t+1," / ").concat(n+1,")")},fA=e=>{var t,n,r,i,a,o,s,l;let{img:c,submitError:d,prepareError:u,onClose:h,action:p,title:g,subtitle:y,to:b,tokenAddress:w,network:x,missingFunds:C,fee:E,from:k,cta:S,disabled:I,chain:A,isSubmitting:T,isPreparing:_,isTokenPriceLoading:j,isTokenContractInfoLoading:P,isSponsored:$,symbol:N,balance:O,onClick:M,transactionDetails:R,transactionIndex:L,maxIndex:D,onBack:F,chainName:U,validation:B,hasScanDetails:z,setIsScanDetailsOpen:W,preventMaliciousTransaction:q,setPreventMaliciousTransaction:H,tokensSent:V,tokensReceived:G,isScanning:K,isCancellable:Y,functionName:Z}=e,{showTransactionDetails:J,setShowTransactionDetails:Q,hasMoreDetails:X,isErc20Ish:ee}=(e=>{let[t,n]=(0,f.useState)(!1),r=!0,i=!1;return(!e||e.isErc20Ish||"transaction"===e.action)&&(r=!1),r&&(i=Object.entries(e||{}).some(e=>{let[t,n]=e;return n&&!["action","isErc20Ish","isNFTIsh"].includes(t)})),{showTransactionDetails:t,setShowTransactionDetails:n,hasMoreDetails:r&&i,isErc20Ish:null==e?void 0:e.isErc20Ish}})(R),et=lt(),en=ee&&P||_||j||K;return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(l1,{onClose:h,backFn:F}),c&&(0,m.jsx)(fj,{children:c}),(0,m.jsxs)(pR,{style:{marginTop:c?"1.5rem":0},children:[g,(0,m.jsx)(fI,{maxIndex:D,transactionIndex:L})]}),(0,m.jsx)(pM,{children:y}),(0,m.jsxs)(fs,{style:{marginTop:"2rem"},children:[(!!V[0]||en)&&(0,m.jsxs)(fl,{children:[G.length>0?(0,m.jsx)(fi,{children:"Send"}):(0,m.jsx)(fi,{children:"approve"===p?"Approval amount":"Amount"}),(0,m.jsx)("div",{className:"flex flex-col",children:V.map((e,t)=>(0,m.jsx)(fh,{iconUrl:e.iconUrl,value:"setApprovalForAll"===Z?"All":e.value,usdValue:e.usdValue,
1symbol:e.symbol,nftName:e.nftName,nftCount:e.nftCount,decimals:e.decimals},t))})]}),G.length>0&&(0,m.jsxs)(fl,{children:[(0,m.jsx)(fi,{children:"Receive"}),(0,m.jsx)("div",{className:"flex flex-col",children:G.map((e,t)=>(0,m.jsx)(fh,{iconUrl:e.iconUrl,value:e.value,usdValue:e.usdValue,symbol:e.symbol,nftName:e.nftName,nftCount:e.nftCount,decimals:e.decimals},t))})]}),R&&"spender"in R&&(null==R?void 0:R.spender)?(0,m.jsxs)(fl,{children:[(0,m.jsx)(fi,{children:"Spender"}),(0,m.jsx)(fu,{children:(0,m.jsx)(u3,{address:R.spender,url:null==A||null==(n=A.blockExplorers)||null==(t=n.default)?void 0:t.url})})]}):null,b&&(0,m.jsxs)(fl,{children:[(0,m.jsx)(fi,{children:"To"}),(0,m.jsx)(fu,{children:(0,m.jsx)(u3,{address:b,url:null==A||null==(i=A.blockExplorers)||null==(r=i.default)?void 0:r.url,showCopyIcon:!0})})]}),w&&(0,m.jsxs)(fl,{children:[(0,m.jsx)(fi,{children:"Token address"}),(0,m.jsx)(fu,{children:(0,m.jsx)(u3,{address:w,url:null==A||null==(o=A.blockExplorers)||null==(a=o.default)?void 0:a.url})})]}),(0,m.jsxs)(fl,{children:[(0,m.jsx)(fi,{children:"Network"}),(0,m.jsx)(fu,{children:x})]}),(0,m.jsxs)(fl,{children:[(0,m.jsx)(fi,{children:"Estimated fee"}),(0,m.jsx)(fu,{$isLoading:_||j||void 0===$,children:$?(0,m.jsxs)(fP,{children:[(0,m.jsxs)(f$,{children:["Sponsored by ",et.name]}),(0,m.jsx)(eZ.BoltIcon,{height:16,width:16})]}):E})]}),X&&!z&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(fl,{className:"cursor-pointer",onClick:()=>Q(!J),children:(0,m.jsxs)(fa,{className:"flex items-center gap-x-1",children:["Details"," ",(0,m.jsx)(eQ.ChevronDownIcon,{style:{width:"0.75rem",marginLeft:"0.25rem",transform:J?"rotate(180deg)":void 0}})]})}),J&&R&&(0,m.jsx)(fm,{action:p,chain:A,transactionDetails:R,isTokenContractInfoLoading:P,symbol:N})]}),z&&(0,m.jsx)(fl,{children:(0,m.jsxs)(fo,{onClick:()=>W(!0),children:[(0,m.jsx)("span",{className:"text-color-primary",children:"Details"}),(0,m.jsx)(eJ.ArrowRightIcon,{height:"14px",width:"14px",strokeWidth:"2"})]})})]}),(0,m.jsx)(lm,{}),d?(0,m.jsx)(hq,{style:{marginTop:"2rem"},children:d.message}):u&&0===L?(0,m.jsx)(hq,{style:{marginTop:"2rem"},children:null!=(s=u.shortMessage)?s:f_}):null,(0,m.jsx)(fE,{variant:B,preventMaliciousTransaction:q,setPreventMaliciousTransaction:H}),(0,m.jsx)(fT,{$useSmallMargins:!(!u&&!d&&"warn"!==B&&"error"!==B),address:k,balance:O,errMsg:_||u||d||!C?void 0:"Add funds on ".concat(null!=(l=null==A?void 0:A.name)?l:U," to complete transaction.")}),(0,m.jsx)(lz,{style:{marginTop:"1rem"},loading:T,disabled:I||_,onClick:M,children:S}),Y&&(0,m.jsx)(lZ,{style:{marginTop:"1rem"},onClick:h,isSubmitting:!1,children:"Not now"}),(0,m.jsx)(lj,{})]})},fT=(0,L.styled)(pG).withConfig({displayName:"StyledWalletInfoCard",componentId:"sc-cbe5ab37-0"})(["",""],e=>e.$useSmallMargins?"margin-top: 0.5rem;":"margin-top: 2rem;"),f_=((0,L.styled)(fs).withConfig({displayName:"InstructionRows",componentId:"sc-cbe5ab37-1"})(["margin-top:0.5rem;border:1px solid var(--privy-color-foreground-4);border-radius:var(--privy-border-radius-sm);padding:0.5rem;"]),"There was an error preparing your transaction. Your transaction request will likely fail."),fj=L.styled.div.withConfig({displayName:"ImageContainer",componentId:"sc-cbe5ab37-2"})(["display:flex;width:100%;justify-content:center;max-height:40px;> img{object-fit:contain;border-radius:var(--privy-border-radius-sm);}"]),fP=L.styled.span.withConfig({displayName:"SponsoredRow",componentId:"sc-cbe5ab37-3"})(["display:inline-flex;align-items:center;gap:0.3rem;"]),f$=L.styled.span.withConfig({displayName:"SponsoredText",componentId:"sc-cbe5ab37-4"})(["font-size:14px;font-weight:500;color:var(--privy-color-foreground);"]),fN=()=>(0,m.jsxs)(fD,{children:[(0,m.jsx)(fU,{}),(0,m.jsx)(fF,{})]}),fO=e=>{let{transactionError:t,chainId:n,onClose:r,onRetry:i,chainType:a,transactionHash:o}=e,{chains:s}=(0,R.u)(),[l,c]=(0,f.useState)(!1),{errorCode:d,errorMessage:u}=((e,t)=>{var n;if("ethereum"===t)return{errorCode:null!=(n=e.details)?n:e.message,errorMessage:e.shortMessage};let r=e.txSignature,i=(null==e?void 0:e.transactionMessage)||"Something went wrong.";if(Array.isArray(e.logs)){let t=e.logs.find(e=>/insufficient (lamports|funds)/gi.test(e));t&&(i=t)}return{transactionHash:r,errorMessage:i}})(t,a),h=(e=>{var t,n,r,i;let{chains:a,chainId:o,chainType:s,transactionHash:l}=e;return"ethereum"===s?null!=(r=null==(n=a.find(e=>e.id===o))||null==(t=n.blockExplorers)?void 0:t.default.url)?r:"https://etherscan.io":(i=l||"","https://explorer.solana.com/tx/".concat(i,"?
1chain=").concat(o))})({chains:s,chainId:n,chainType:a,transactionHash:o});return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(l1,{onClose:r}),(0,m.jsxs)(fM,{children:[(0,m.jsx)(fN,{}),(0,m.jsx)(fR,{children:d}),(0,m.jsx)(fL,{children:"Please try again."}),(0,m.jsxs)(fW,{children:[(0,m.jsx)(fz,{children:"Error message"}),(0,m.jsx)(fH,{$clickable:!1,children:u})]}),o&&(0,m.jsxs)(fW,{children:[(0,m.jsx)(fz,{children:"Transaction hash"}),(0,m.jsxs)(fq,{children:["Copy this hash to view details about the transaction on a"," ",(0,m.jsx)("u",{children:(0,m.jsx)("a",{href:h,children:"block explorer"})}),"."]}),(0,m.jsxs)(fH,{$clickable:!0,onClick:async()=>{await navigator.clipboard.writeText(o),c(!0)},children:[o,(0,m.jsx)(fK,{clicked:l})]})]}),(0,m.jsx)(fB,{onClick:()=>i({resetNonce:!!o}),children:"Retry transaction"})]}),(0,m.jsx)(l$,{})]})},fM=L.styled.div.withConfig({displayName:"TransactionErrorScreenContainer",componentId:"sc-d58f10e6-0"})(["display:flex;flex-direction:column;align-items:center;justify-content:center;"]),fR=L.styled.span.withConfig({displayName:"ErrorCode",componentId:"sc-d58f10e6-1"})(["color:var(--privy-color-foreground);text-align:center;font-size:1.125rem;font-weight:500;line-height:1.25rem;text-align:center;margin:10px;"]),fL=L.styled.span.withConfig({displayName:"Subtitle",componentId:"sc-d58f10e6-2"})(["margin-top:4px;margin-bottom:10px;color:var(--privy-color-foreground-3);text-align:center;font-size:0.875rem;font-style:normal;font-weight:400;line-height:20px;letter-spacing:-0.008px;"]),fD=L.styled.div.withConfig({displayName:"CircleContainer",componentId:"sc-d58f10e6-3"})(["position:relative;width:60px;height:60px;margin:10px;display:flex;justify-content:center;align-items:center;"]),fF=(0,L.styled)(eP.default).withConfig({displayName:"StyledExclamationCircleIcon",componentId:"sc-d58f10e6-4"})(["position:absolute;width:35px;height:35px;color:var(--privy-color-error);"]),fU=L.styled.div.withConfig({displayName:"StyledRedCircle",componentId:"sc-d58f10e6-5"})(["position:absolute;width:60px;height:60px;border-radius:50%;background-color:var(--privy-color-error);opacity:0.1;"]),fB=(0,L.styled)(lz).withConfig({displayName:"RetryButton",componentId:"sc-d58f10e6-6"})(["&&{margin-top:24px;}transition:color 350ms ease,background-color 350ms ease;"]),fz=L.styled.span.withConfig({displayName:"TextBoxTitle",componentId:"sc-d58f10e6-7"})(["width:100%;text-align:left;font-size:0.825rem;color:var(--privy-color-foreground);padding:4px;"]),fW=L.styled.div.withConfig({displayName:"TextBoxContainer",componentId:"sc-d58f10e6-8"})(["width:100%;margin:5px;display:flex;flex-direction:column;justify-content:center;align-items:center;"]),fq=L.styled.text.withConfig({displayName:"HelperText",componentId:"sc-d58f10e6-9"})(["position:relative;width:100%;padding:5px;font-size:0.8rem;color:var(--privy-color-foreground-3);text-align:left;word-wrap:break-word;"]),fH=L.styled.span.withConfig({displayName:"TextBox",componentId:"sc-d58f10e6-10"})(["position:relative;width:100%;background-color:var(--privy-color-background-2);padding:8px 12px;border-radius:10px;margin-top:5px;font-size:14px;color:var(--privy-color-foreground-3);text-align:left;word-wrap:break-word;",""],e=>e.$clickable&&"cursor: pointer;\n  transition: background-color 0.3s;\n  padding-right: 45px;\n\n  &:hover {\n    background-color: var(--privy-color-foreground-4);\n  }"),fV=(0,L.styled)(e7.default).withConfig({displayName:"StyledClipboardIcon",componentId:"sc-d58f10e6-11"})(["position:absolute;top:13px;right:13px;width:24px;height:24px;"]),fG=(0,L.styled)(eH.default).withConfig({displayName:"StyledClipboardCheckIcon",componentId:"sc-d58f10e6-12"})(["position:absolute;top:13px;right:13px;width:24px;height:24px;"]),fK=e=>{let{clicked:t}=e;return(0,m.jsx)(t?fG:fV,{})},fY=e=>{let{txn:t,receipt:n,transactionInfo:r,onClose:i,tokenPrice:a,tokenSymbol:o,receiptHeader:s,receiptDescription:l}=e;return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(l1,{onClose:i}),(0,m.jsx)(dM,{title:null!=s?s:"Transaction complete!",description:null!=l?l:"You're all set."}),(0,m.jsx)(dg,{tokenPrice:a,from:n.from,to:n.to,gas:(e=>{let{gasUsed:t,effectiveGasPrice:n}=e;if(t&&n)try{return(0,G.toHex)(t*n)}catch(e){return}})(n),txn:t,transactionInfo:r,tokenSymbol:o}),(0,m.jsx)(lm,{}),(0,m.jsx)(fZ,{loading:!1,onClick:i,children:"All Done"}),(0,m.jsx)(c0,{}),(0,m.jsx)(lj,{})]})},fZ=(0,L.styled)(lz).withConfig({displayName:"SubmitButton",componentId:"sc-f70d0f7a-0"})(["&&{margin-top:24px;}transition:color 350ms ease,background-color 350ms ease;"]),fJ=[{constant:!1,inputs:[{name:"_salt",type:"bytes32"},{name:"_initializer",type:"bytes"}],name:"deployAccount",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"}],fQ=[{name:"from",type:"address"},{name:"param2",type:"address"},{name:"param3",type:"bytes"},{name:"param4",type:"tuple",components:[]},{type:"tuple",components:[{name:"param5",type:"address"},{name:"param6",type:"uint256"},{name:"param7",type:"uint256"},{name:"encodedInitData",type:"bytes"}]}],fX=[{constant:!1,inputs:[{name:"spender",type:"address"},{name:"value",type:"uint256"}],name:"approve",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"}],f0=[{constant:!1,inputs:[{name:"_to",type:"address"},{name:"_value",type:"uint256"}],name:"transfer",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"}],f1=[{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"mint",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"}],name:"mint",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"uint256",name:"quantity",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"mint",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"uint256",name:"quantity",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"mint",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256[]",name:"tokenIds",type:"uint256[]"},{internalType:"uint256[]",name:"quantities",type:"uint256[]"},{internalType:"bytes",name:"data",type:"bytes"}],name:"mintBatch",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256[]",name:"tokenIds",type:"uint256[]"},{internalType:"uint256[]",name:"quantities",type:"uint256[]"},{internalType:"bytes",name:"data",type:"bytes"}],name:"mintBatch",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"quantity",type:"uint256"}],name:"mint",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"quantity",type:"uint256"}],name:"mint",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"}],name:"safeMint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"}],name:"safeMint",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"string",name:"uri",type:"string"}],name:"safeMint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"string",name:"uri",type:"string"}],name:"safeMint",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeMint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeMint",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"string",name:"uri",type:"string"}],name:"safeMint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"string",name:"uri",type:"string"}],name:"safeMint",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"batchMint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"batchMint",outputs:[],stateMutability:"payable",type:"function"}],f2=[{constant:!1,inputs:[{name:"_from",type:"address"},{name:"_to",type:"address"},{name:"_tokenId",type:"uint256"}],name:"safeTransferFrom",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"}],f3=[{constant:!1,inputs:[{name:"_operator",type:"address"},{name:"_approved",type:"bool"}],name:"setApprovalForAll",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"}],f5=[{constant:!1,inputs:[{name:"_from",type:"address"},{name:"_to",type:"address"},{name:"_tokenId",type:"uint256"}],name:"transferFrom",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"}],f4=[{constant:!1,inputs:[{name:"_from",type:"address"},{name:"_to",type:"address"},{name:"_tokenIds",type:"uint256[]"},{name:"_amounts",type:"uint256[]"},{name:"_data",type:"bytes"}],name:"safeBatchTransferFrom",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"}],f6=[{constant:!1,inputs:[{name:"_from",type:"address"},{name:"_to",type:"address"},{name:"_tokenId",type:"uint256"},{name:"_amount",type:"uint256"},{name:"_data",type:"bytes"}],name:"safeTransferFrom",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"}],f8=(e,t)=>
1{let n=f9(fX,e);if(n)return{action:"approve",functionName:"approve",isErc20Ish:!0,isNFTIsh:!1,spender:n.args[0],amount:n.args[1]};let r=f9(f0,e);if(r)return{action:"transfer",functionName:"transfer",isErc20Ish:!0,isNFTIsh:!1,transferTo:r.args[0],amount:r.args[1]};if(!t)return{action:"transaction",functionName:"",isErc20Ish:!1,isNFTIsh:!1};let i=f9(fJ,e);if(i&&"string"==typeof i.args[1]){let e=f7(i.args[1]);if(e&&e[4].encodedInitData)return f8(e[4].encodedInitData,t)}let a=f9(f3,e);if(a)return{action:"approve",functionName:"setApprovalForAll",isNFTIsh:!0,isErc20Ish:!1,operator:a.args[0],approved:a.args[1]};let o=f9(f5,e);if(o)return{action:"transfer",functionName:"transferFrom",isNFTIsh:!0,isErc20Ish:!1,transferFrom:o.args[0],transferTo:o.args[1],tokenId:o.args[2]};let s=f9(f2,e);if(s)return{action:"transfer",functionName:"safeTransferFrom",isNFTIsh:!0,isErc20Ish:!1,transferFrom:s.args[0],transferTo:s.args[1],tokenId:s.args[2]};let l=f9(f6,e);if(l)return{action:"transfer",functionName:"safeTransferFrom",isNFTIsh:!0,isErc20Ish:!1,transferFrom:l.args[0],transferTo:l.args[1],tokenId:l.args[2],amount:l.args[3]};let c=f9(f4,e);if(c)return{action:"batch transfer",functionName:"safeBatchTransferFrom",isNFTIsh:!0,isErc20Ish:!1,transferFrom:c.args[0],transferTo:c.args[1],tokenIds:c.args[2],amounts:c.args[3]};let d=f9(f1,e);return d?{action:"mint",functionName:d.functionName,isNFTIsh:!0,isErc20Ish:!1,args:d.args}:{action:"transaction",isErc20Ish:!1,isNFTIsh:!1}},f9=(e,t)=>{try{let n=(0,K.decodeFunctionData)({abi:e,data:t});return{functionName:n.functionName,args:n.args||[]}}catch(e){return null}},f7=e=>{try{if("string"==typeof e)return(0,Y.decodeAbiParameters)(fQ,"0x".concat(e.slice(10)))}catch(e){return null}},ge=e=>"".concat(parseFloat(e).toFixed(2)),gt=new ss(new so("There was an issue preparing your transaction",en.ProviderErrors.E32603_DEFAULT_INTERNAL_ERROR.eipCode)),gn=(e,t)=>(null==e?void 0:e.sendTransaction)?"transactionRequest"in e.sendTransaction?e.sendTransaction.transactionRequest:e.sendTransaction.transactionRequests[t]:void 0,gr={component:()=>{var e,t,n,r,i,a,o,s,l,c,d,u,h,p,y,b,w,x,C,E,k,S,I,A,T,_,j;let{data:P,onUserCloseViaDialogOrKeybindRef:$,setModalData:N,navigate:O}=lc(),{client:M,rpcConfig:L,chains:D,closePrivyModal:F,walletProxy:W,showFiatPrices:q}=(0,R.u)(),{user:H}=(0,g.u)(),V=lt(),[G,K]=(0,f.useState)(0),[Y,Z]=(0,f.useState)(0),[J,Q]=(0,f.useState)(gn(P,G)),[X,ee]=(0,f.useState)(null),[et,er]=(0,f.useState)(),[ei,ea]=(0,f.useState)(!1),[eo,es]=(0,f.useState)(null),[ed,eu]=(0,f.useState)(null),[eh,ep]=(0,f.useState)(null),[ef,eg]=(0,f.useState)(void 0),[em,ey]=(0,f.useState)(void 0),[ev,eb]=(0,f.useState)(!1),[ew,ex]=(0,f.useState)(!1),[eC,eE]=(0,f.useState)([]),[ek,eS]=(0,f.useState)([]),[eI,eA]=(0,f.useState)("uninitiated"),[eT,e_]=(0,f.useState)(void 0);if(!J||!(null==P?void 0:P.sendTransaction)||!(null==P?void 0:P.sendTransaction))return(0,m.jsx)(hl,{error:Error("Invalid transaction request"),allowlistConfig:V.allowlistConfig,onRetry:()=>{var e;null==P||null==(e=P.sendTransaction)||e.onFailure(gt),F({shouldCallAuthOnSuccess:!1})}});let{transactingWalletAddress:ej}=P.sendTransaction,eP=(0,f.useMemo)(()=>D.find(e=>Number(e.id)===Number(J.chainId)),[J.chainId]),e$=null!=(C=null==eP?void 0:eP.nativeCurrency.symbol)?C:"ETH",eN=(0,f.useMemo)(()=>f8(J.data,!!V.embeddedWallets.extendedCalldataDecoding),[J.data]),{action:eO,isErc20Ish:eM,isNFTIsh:eR,functionName:eL}=eN,{toAddress:eD,tokenAddress:eF}=(0,f.useMemo)(()=>{var e;return{toAddress:eN.isErc20Ish?eN.transferTo:null!=(e=J.to)?e:void 0,tokenAddress:eN.isErc20Ish?J.to:void 0}},[eN]);(0,f.useEffect)(()=>{J.to&&eP&&eM&&p5({address:J.to,chain:eP,rpcConfig:V.rpcConfig,privyAppId:V.id}).then(ee).catch(console.error)},[J.to,eP]);let{tokenPrice:eU,isTokenPriceLoading:eB}=db(J.chainId),{balance:ez}=pK({rpcConfig:V.rpcConfig,appId:V.id,address:ej,chain:eP}),eW=function(e){let{rpcConfig:t,appId:n,address:r,chain:i,tokenInfo:a}=e,{chains:o}=(0,R.u)(),[s,l]=(0,f.useState)(null),[c,d]=(0,f.useState)(!1),u=(0,f.useMemo)(()=>{let e=i||o[0];if(e)return(0,U.createPublicClient)({chain:i,transport:(0,B.http)((0,ec.getJsonRpcEndpointFromChain)(e,t,n
1))})},[i,t,n]),h=(0,f.useCallback)(async()=>{if(r&&u&&a.address)try{return d(!0),await u.readContract({address:a.address,abi:p3,functionName:"balanceOf",args:[r]})}catch(e){console.error(e)}finally{d(!1)}},[u,r,null==a?void 0:a.address,i]);return(0,f.useEffect)(()=>{h().then(e=>null!=e&&l(e))},[h]),{balance:s,isLoading:c&&null==s,formattedBalance:(0,el.formatTokenAmount)({amount:null!=s?s:BigInt(0),decimals:a.decimals})}}({rpcConfig:V.rpcConfig,appId:V.id,address:ej,tokenInfo:{address:eF||"",decimals:null!=(E=null==X?void 0:X.decimals)?E:18},chain:eP}),eq=(0,f.useMemo)(()=>oB(Number(J.chainId),D,L,{appId:V.id}),[J.chainId,L]),eH=((e,t,n,r)=>{let[i,a]=(0,f.useState)(null),{walletProxy:o}=(0,R.u)();return(0,f.useEffect)(()=>{i&&a(null),(async()=>{if(!o||!t)return null;let i=[],a=!0,s=await dC(e,n,t,r).catch(t=>(t.message&&t.message.includes("Insufficient balance for transaction")||t.details&&t.details.includes("insufficient funds")?a=!1:i.push(t),e));return{tx:s,totalGasEstimate:s.gas,hasFunds:a,errors:i}})().then(a)},[e]),i})(J,ej,eq,null==P||null==(e=P.sendTransaction)?void 0:e.prepareTransactionRequest);(0,f.useEffect)(()=>{Q(gn(P,G))},[G]),(0,f.useEffect)(()=>{var e;(null==(e=P.sendTransaction)?void 0:e.getIsSponsored)?P.sendTransaction.getIsSponsored().then(er).catch(console.error):er(!1)},[P.sendTransaction.getIsSponsored]);let eV=()=>{var e,t,n,r;if(!ei)return eo?null==P||null==(e=P.sendTransaction)||e.onSuccess({hash:eo}):eh||(null==eH?void 0:eH.errors[0])?null==P||null==(t=P.sendTransaction)||t.onFailure(null!=(r=null!=eh?eh:null==eH?void 0:eH.errors[0])?r:gt):null==P||null==(n=P.sendTransaction)||n.onFailure(new ss(new so("The user rejected the request",en.ProviderErrors.E4001_USER_REJECTED_REQUEST.eipCode))),F({shouldCallAuthOnSuccess:!1})};$.current=eV;let eG=!!(P.funding&&P.funding.supportedOptions.length>0),eK=c$(BigInt(null!=(k=null==eH?void 0:eH.totalGasEstimate)?k:0n),e$),eY=q&&eU?cP(BigInt(null!=(S=null==eH?void 0:eH.totalGasEstimate)?S:0n),eU):void 0,eZ=c$(null!=ez?ez:0n,e$,void 0,!0),eJ=q&&eU?cP(null!=ez?ez:0n,eU):void 0,eQ=X&&!eW.isLoading&&eM&&"approve"!==eO?"".concat(eW.formattedBalance," ").concat(X.symbol):void 0,eX=null==(r=P.sendTransaction)||null==(n=r.uiOptions)||null==(t=n.transactionInfo)?void 0:t.title;eX||(eX="approve"===eO?eM?"Confirm address":"Confirm action":"Approve ".concat(eO));let e0=(0,f.useMemo)(()=>{var e,t,n,r,i,a,o,s;if(null==(t=P.sendTransaction)||null==(e=t.uiOptions)?void 0:e.description)return null==(r=P.sendTransaction)||null==(n=r.uiOptions)?void 0:n.description;if("approve"===eO&&"setApprovalForAll"===eL&&eN.approved){let e=(0,m.jsx)(u3,{address:eN.operator||"",url:null==eP||null==(a=eP.blockExplorers)||null==(i=a.default)?void 0:i.url});return(0,m.jsxs)(m.Fragment,{children:[V.name," would like your permission for ",e," to transfer tokens on your behalf."]})}if("approve"===eO&&"setApprovalForAll"===eL&&!eN.approved){let e=(0,m.jsx)(u3,{address:eN.operator||"",url:null==eP||null==(s=eP.blockExplorers)||null==(o=s.default)?void 0:o.url});return(0,m.jsxs)(m.Fragment,{children:[V.name," would like your permission to revoke permissions of ",e," from transferring tokens on your behalf."]})}return eM&&"approve"===eO||eM&&"approve"===eO?"".concat(V.name," would like your permission for ").concat(oq(eN.spender)," to spend tokens on your behalf."):"".concat(V.name," wants your permission to approve the following transaction.")},[V.name,eM,eN,null==(i=P.sendTransaction)?void 0:i.uiOptions.description,eL]),e1=(null==(l=P.sendTransaction)||null==(s=l.uiOptions)||null==(o=s.transactionInfo)||null==(a=o.contractInfo)?void 0:a.imgUrl)?(0,m.jsx)("img",{src:P.sendTransaction.uiOptions.transactionInfo.contractInfo.imgUrl,alt:P.sendTransaction.uiOptions.transactionInfo.contractInfo.imgAltText}):null,e2=!(!eH||eH.errors[0]||eH.hasFunds||!1!==et),e3=e2&&eG,e5=e3?"Add funds":(null==(d=P.sendTransaction)||null==(c=d.uiOptions)?void 0:c.buttonText)||(G<Y?"Continue":"Approve");if((0,f.useEffect)(()=>{var e;(null==(e=P.sendTransaction)?void 0:e.scanTransaction)&&V.embeddedWallets.transactionScanning.enabled&&"uninitiated"===eI&&(eA("in progress"),P.sendTransaction.scanTransaction().then(e=>{(e=>{if(!e)throw Error("Transaction scan failed");if("Success"===e.validation.status&&("Benign"===e.validation.result_type?ey("safe"):"Warning"===e.validation.result_type?ey("warn"):"Malicious"===e.validation.result_type&&(ey("error"),ex(!0))),"Success"!==e.simulation.status)throw Error("Simulation failed");{eg(e.simulation.params);let{assetsIn:t,assetsOut:n}=function(e,t){var n,r,i,a,o;let s=[],l=new Map;if(e){for(let t of e)if(t.in[0]){let e;e="ERC721"===t.asset.type||"approve_for_all"===t.in[0].value?{id:"nft:".concat(t.asset.name),nftName:t.asset.name,nftCount:t.in.length}:{id:"token:".concat(t.asset.type,":").concat(t.asset.symbol,":").concat(t.asset.name),iconUrl:t.asset.logo_url,value:t.in[0].value,symbol:t.asset.symbol,usdValue:t.in[0].usd_price?ge(t.in[0].usd_price):void 0,decimals:t.asset.decimals},s.push(e)}else if(null==(n=t.out[0])?void 0:n.value){let e;e="ERC721"===t.asset.type||"approve_for_all"===t.out[0].value?{id:"nft:".concat(t.asset.name),nftName:t.asset.name}:{id:"token:".concat(t.asset.type,":").concat(t.asset.symbol,":").concat(t.asset.name),iconUrl:t.asset.logo_url,value:t.out[0].value,symbol:t.asset.symbol,usdValue:t.out[0].usd_price?ge(t.out[0].usd_price):void 0,decimals:t.asset.decimals},l.has(e.id)||l.set(e.id,e)}}for(let e of t)for(let t of Object.keys(e.spenders)){let n;n="ERC721"===e.asset.type||"approve_for_all"===(null==(r=e.spenders[t])?void 0:r.value)?{id:"nft:".concat(e.asset.name),nftName:e.asset.name}:{id:"token:".concat(e.asset.type,":").concat(e.asset.symbol,":").concat(e.asset.name),iconUrl:e.asset.logo_url,value:null==(i=e.spenders[t])?void 0:i.value,symbol:e.asset.symbol,usdValue:(null==(a=e.spenders[t])?void 0:a.usd_price)?ge(null==(o=e.spenders[t])?void 0:o.usd_price):void 0,decimals:e.asset.decimals},l.has(n.id)||l.set(n.id,n)}return{assetsIn:s,assetsOut:Array.from(l.values())}}(e.simulation.assets_diffs,e.simulation.exposures);if(0===n.length&&0===t.length)throw Error("No tokens found");eE(n),eS(t)}})(e),eA("completed")}
1).catch(()=>eA("failed")))},[!!(null==(u=P.sendTransaction)?void 0:u.scanTransaction)]),(0,f.useEffect)(()=>{var e,t;(null==(e=P.sendTransaction)?void 0:e.scanTransaction)&&"failed"!==eI||((e,t,n)=>{if(Z((e=>(null==e?void 0:e.sendTransaction)?"transactionRequest"in e.sendTransaction?0:e.sendTransaction.transactionRequests.length-1:0)(P)),t.isErc20Ish&&t.amount&&n){let e=p8({amount:t.amount,decimals:n.decimals});e_(e),eE([{value:e,symbol:null==n?void 0:n.symbol,decimals:null==n?void 0:n.decimals}])}else if(e.value){let t=BigInt(e.value),n=eU?cP(t,eU):void 0;eE(q&&n?[{value:n}]:[{value:cN(t),symbol:e$,decimals:18,usdValue:n}])}else eE(q?[{value:"$0"}]:[{value:"0",symbol:e$,decimals:18}])})(null!=(t=null==eH?void 0:eH.tx)?t:J,eN,X)},[J,null==eH?void 0:eH.tx,eN,X,eI]),ed)return(0,m.jsx)(fY,{txn:null!=(I=null==eH?void 0:eH.tx)?I:J,onClose:eV,receipt:ed,transactionInfo:null==(h=P.sendTransaction)?void 0:h.uiOptions.transactionInfo,tokenPrice:eU,tokenSymbol:e$,receiptHeader:null==(p=P.sendTransaction)?void 0:p.uiOptions.successHeader,receiptDescription:null==(y=P.sendTransaction)?void 0:y.uiOptions.successDescription});if(eh)return(0,m.jsx)(fO,{transactionError:eh,transactionHash:null!=eo?eo:void 0,chainType:"ethereum",chainId:null!=(A=null==eH?void 0:eH.tx.chainId)?A:J.chainId,onClose:eV,onRetry:e=>{var t;let{resetNonce:n}=e;ep(null);let r={...null!=(t=null==eH?void 0:eH.tx)?t:J};n&&(r.nonce=void 0),Q(r)}});let e4=0!==Y&&"number"==typeof G&&0!==G?()=>{K(G-1)}:void 0;return ev&&ef?(0,m.jsx)(fr,{details:ef,onBack:()=>eb(!1)}):(0,m.jsx)(fA,{transactionIndex:G,onBack:e4,maxIndex:Y,disabled:e2&&!eG||ew,isSubmitting:ei,submitError:eh,isPreparing:!eH,isTokenPriceLoading:eB,isTokenContractInfoLoading:!eR&&!X,prepareError:null==eH?void 0:eH.errors[0],symbol:null==X?void 0:X.symbol,chain:eP,img:e1,title:eX,subtitle:e0,txValue:J.value,fee:null!=eY?eY:eK,isSponsored:et,from:null!=ej?ej:"",to:eD,tokenAddress:null!=eF?eF:void 0,network:null!=(T=null==(b=V.chains.find(e=>e.id===J.chainId))?void 0:b.name)?T:"",transactionDetails:{...eN,formattedAmount:eT},cta:e5,missingFunds:e2,action:eO,balance:null!=(_=null!=eQ?eQ:eJ)?_:eZ,onClose:eV,onClick:e3?async()=>{if(ej){var e,t,n;if(!eG)throw Error("Funding wallet is not enabled");N({...P,funding:{...P.funding,methodScreen:mC,chainType:"ethereum",amount:(0,z.formatEther)(BigInt(null!=(t=null==eH?void 0:eH.tx.value)?t:0)+BigInt(null!=(n=null==eH||null==(e=eH.totalGasEstimate)?void 0:e.toString())?n:0)),chain:eP},solanaFundingData:null==P?void 0:P.solanaFundingData}),O(mC)}}:async()=>{if(G<Y)K(G+1);else{var e,t,n,r;ea(!0);try{let r=await M.getAccessToken();if(ei||!r||!W||!H)return;let i=await P.sendTransaction.onConfirm({transactionRequest:null!=(n=null==eH?void 0:eH.tx)?n:J});if(es(i),null==(e=P.sendTransaction)?void 0:e.signOnly)return await new Promise(e=>setTimeout(e,a5)),null==P||null==(t=P.sendTransaction)||t.onSuccess({hash:i}),F({shouldCallAuthOnSuccess:!1});let a=await eq.waitForTransactionReceipt({hash:i});if("reverted"===a.status)throw Error("Transaction failed");eu(a)}catch(e){console.warn({transaction:null!=(r=null==eH?void 0:eH.tx)?r:J,error:e}),ep(e)}finally{ea(!1)}}},validation:em,hasScanDetails:!!ef,setIsScanDetailsOpen:eb,preventMaliciousTransaction:ew,setPreventMaliciousTransaction:ex,tokensSent:eC,tokensReceived:ek,isScanning:"in progress"===eI,isCancellable:null!=(j=null==(x=P.sendTransaction)||null==(w=x.uiOptions)?void 0:w.isCancellable)&&j,functionName:eL})}};function gi(e){var t,n;let{title:r}=e,{currentScreen:i,navigateBack:a,navigate:o,data:s,setModalData:l}=lc();return(0,m.jsx)(l1,{title:r,backFn:i===p1?a:i===(null==s||null==(t=s.funding)?void 0:t.methodScreen)?s.funding.comingFromSendTransactionScreen?()=>o(gr):void 0:(null==s||null==(n=s.funding)?void 0:n.methodScreen)?()=>{let e=s.funding;e.usingDefaultFundingMethod&&(e.usingDefaultFundingMethod=!1),l({funding:e,solanaFundingData:null==s?void 0:s.solanaFundingData}),o(e.methodScreen)}:void 0})}let ga=e=>(0,m.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 210.2",xmlSpace:"preserve",...e,children:(0,m.jsx)("path",{d:"M93.6,27.1C87.6,34.2,78,39.8,68.4,39c-1.2-9.6,3.5-19.8,9-26.1c6-7.3,16.5-12.5,25-12.9  C103.4,10,99.5,19.8,93.6,27.1 M102.3,40.9c-13.9-0.8-25.8,7.9-32.4,7.9c-6.7,0-16.8-7.5-27.8-7.3c-14.3,0.2-27.6,8.3-34.9,21.2  c-15,25.8-3.9,64,10.6,85c7.1,10.4,15.6,21.8,26.8,21.4c10.6-0.4,14.8-6.9,27.6-6.9c12.9,0,16.6,6.9,27.8,6.7  c11.6-0.2,18.9-10.4,26-20.8c8.1-11.8,11.4-23.3,11.6-23.9c-0.2-0.2-22.4-8.7-22.6-34.3c-0.2-21.4,17.5-31.6,18.3-32.2  C123.3,42.9,107.7,41.3,102.3,40.9 M182.6,11.9v155.9h24.2v-53.3h33.5c30.6,0,52.1-21,52.1-51.4c0-30.4-21.1-51.2-51.3-51.2H182.6z   M206.8,32.3h27.9c21,0,33,11.2,33,30.9c0,19.7-12,31-33.1,31h-27.8V32.3z M336.6,169c15.2,0,29.3-7.7,35.7-19.9h0.5v18.7h22.4V90.2  c0-22.5-18-37-45.7-37c-25.7,0-44.7,14.7-45.4,34.9h21.8c1.8-9.6,10.7-15.9,22.9-15.9c14.8,0,23.1,6.9,23.1,19.6v8.6l-30.2,1.8  c-28.1,1.7-43.3,13.2-43.3,33.2C298.4,155.6,314.1,169,336.6,169z M343.1,150.5c-12.9,0-21.1-6.2-21.1-15.7c0-9.8,7.9-15.5,23-16.4  l26.9-1.7v8.8C371.9,140.1,359.5,150.5,343.1,150.5z M425.1,210.2c23.6,0,34.7-9,44.4-36.3L512,54.7h-24.6l-28.5,92.1h-0.5  l-28.5-92.1h-25.3l41,113.5l-2.2,6.9c-3.7,11.7-9.7,
116.2-20.4,16.2c-1.9,0-5.6-0.2-7.1-0.4v18.7C417.3,210,423.3,210.2,425.1,210.2z"})}),go=e=>(0,m.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 80 38.1",xmlSpace:"preserve",...e,children:[(0,m.jsx)("path",{style:{fill:"#5F6368"},d:"M37.8,19.7V29h-3V6h7.8c1.9,0,3.7,0.7,5.1,2c1.4,1.2,2.1,3,2.1,4.9c0,1.9-0.7,3.6-2.1,4.9c-1.4,1.3-3.1,2-5.1,2  L37.8,19.7L37.8,19.7z M37.8,8.8v8h5c1.1,0,2.2-0.4,2.9-1.2c1.6-1.5,1.6-4,0.1-5.5c0,0-0.1-0.1-0.1-0.1c-0.8-0.8-1.8-1.3-2.9-1.2  L37.8,8.8L37.8,8.8z"}),(0,m.jsx)("path",{style:{fill:"#5F6368"},d:"M56.7,12.8c2.2,0,3.9,0.6,5.2,1.8s1.9,2.8,1.9,4.8V29H61v-2.2h-0.1c-1.2,1.8-2.9,2.7-4.9,2.7  c-1.7,0-3.2-0.5-4.4-1.5c-1.1-1-1.8-2.4-1.8-3.9c0-1.6,0.6-2.9,1.8-3.9c1.2-1,2.9-1.4,4.9-1.4c1.8,0,3.2,0.3,4.3,1v-0.7  c0-1-0.4-2-1.2-2.6c-0.8-0.7-1.8-1.1-2.9-1.1c-1.7,0-3,0.7-3.9,2.1l-2.6-1.6C51.8,13.8,53.9,12.8,56.7,12.8z M52.9,24.2  c0,0.8,0.4,1.5,1,1.9c0.7,0.5,1.5,0.8,2.3,0.8c1.2,0,2.4-0.5,3.3-1.4c1-0.9,1.5-2,1.5-3.2c-0.9-0.7-2.2-1.1-3.9-1.1  c-1.2,0-2.2,0.3-3,0.9C53.3,22.6,52.9,23.3,52.9,24.2z"}),(0,m.jsx)("path",{style:{fill:"#5F6368"},d:"M80,13.3l-9.9,22.7h-3l3.7-7.9l-6.5-14.7h3.2l4.7,11.3h0.1l4.6-11.3H80z"}),(0,m.jsx)("path",{style:{fill:"#4285F4"},d:"M25.9,17.7c0-0.9-0.1-1.8-0.2-2.7H13.2v5.1h7.1c-0.3,1.6-1.2,3.1-2.6,4v3.3H22C24.5,25.1,25.9,21.7,25.9,17.7z"}),(0,m.jsx)("path",{style:{fill:"#34A853"},d:"M13.2,30.6c3.6,0,6.6-1.2,8.8-3.2l-4.3-3.3c-1.2,0.8-2.7,1.3-4.5,1.3c-3.4,0-6.4-2.3-7.4-5.5H1.4v3.4  C3.7,27.8,8.2,30.6,13.2,30.6z"}),(0,m.jsx)("path",{style:{fill:"#FBBC04"},d:"M5.8,19.9c-0.6-1.6-0.6-3.4,0-5.1v-3.4H1.4c-1.9,3.7-1.9,8.1,0,11.9L5.8,19.9z"}),(0,m.jsx)("path",{style:{fill:"#EA4335"},d:"M13.2,9.4c1.9,0,3.7,0.7,5.1,2l0,0l3.8-3.8c-2.4-2.2-5.6-3.5-8.8-3.4c-5,0-9.6,2.8-11.8,7.3l4.4,3.4  C6.8,11.7,9.8,9.4,13.2,9.4z"})]}),gs=e=>{let[t,n]=(0,f.useState)();return(0,f.useEffect)(()=>{e().then(e=>{n(e)}).catch(()=>{})},[]),t},gl=e=>{let{children:t,color:n,isLoading:r,isPulsing:i,...a}=e;return(0,m.jsx)(gc,{$color:n,$isLoading:r,$isPulsing:i,...a,children:t})},gc=L.styled.span.withConfig({displayName:"StyledSpan",componentId:"sc-80725f4-0"})(["padding:0.25rem;font-size:0.75rem;font-weight:500;line-height:1rem;border-radius:var(--privy-border-radius-xs);display:flex;align-items:center;"," ",""],e=>{let t,n;"green"===e.$color&&(t="var(--privy-color-success-dark)",n="var(--privy-color-success-light)"),"red"===e.$color&&(t="var(--privy-color-error)",n="var(--privy-color-error-light)"),"gray"===e.$color&&(t="var(--privy-color-foreground-2)",n="var(--privy-color-background-2)");let r=(0,L.keyframes)(["from,to{background-color:",";}50%{background-color:rgba(",",0.8);}"],n,n);return(0,L.css)(["color:",";background-color:",";",";"],t,n,e.$isPulsing&&(0,L.css)(["animation:"," 3s linear infinite;"],r))},fd),gd=e=>{let{onClick:t,text:n}=e;return(0,m.jsxs)(lC,{onClick:t,children:[(0,m.jsx)(lE,{children:(0,m.jsx)(_.Wallet,{})}),(0,m.jsx)(lm,{children:n})]})},gu=e=>{let{chainType:t,withPadding:n}=e,r="";return r="ethereum-only"===t||"ethereum-and-solana"===t?"Rainbow, Phantom, or Coinbase Wallet":"Phantom or Solflare",(0,m.jsx)(lS,{$withPadding:n,children:(0,m.jsxs)(lI,{children:[(0,m.jsx)(eE.default,{style:{color:"var(--privy-color-warn)",height:48,width:48}}),(0,m.jsx)("h3",{children:"No wallets available"}),(0,m.jsxs)("p",{children:["Please download an external wallet provider, like ",r,"."]})]})},"empty-wallet-state")},gh=e=>{let{icon:t,name:n}=e;return"string"==typeof t?(0,m.jsx)("img",{alt:"".concat(n||"wallet"," logo"),src:t,style:{height:24,width:24,borderRadius:4}}):void 0===t?(0,m.jsx)(ej.default,{style:{height:24,width:24}}):t?(0,m.jsx)(t,{}):null};function gp(e){var t,n,r,i;let a=e.toLowerCase();return!!(null==(r=window)||null==(n=r.webkit)||null==(t=n.messageHandlers)?void 0:t.ReactNativeWebView)||!!(null==(i=window)?void 0:i.ReactNativeWebView)||["fbav","fban","instagram","snapchat","linkedinapp"].some(e=>a.includes(e))}let gf=e=>{let{walletLogo:t,success:n,errorMessage:r,title:i,subtitle:a,onRetry:o,onUseDifferentWallet:s,onBack:l,numRetries:c,maxRetries:d}=e;return(0,m.jsx)(ck,{title:i,subtitle:a,icon:t,iconVariant:"loading",iconLoadingStatus:{success:n,fail:!!r},primaryCta:r===sl.ERROR_USER_EXISTS?{label:"Use a different wallet",onClick:s}:!n&&(null==r?void 0:r.retryable)&&c<d?{label:"Retry",onClick:o,disabled:!(null==r?void 0:r.retryable)||c>=d}:!n&&r&&c>=d?{label:"Use a different wallet",onClick:s}:void 0,onBack:l,watermark:!0})},gg={component:()=>{var e,t,n,r,i,a,o;let s,{navigateBack:l,navigate:c,lastScreen:d,currentScreen:u,data:h,setModalData:p}=lc(),{walletConnectionStatus:g,closePrivyModal:y}=(0,R.u)(),[b,w]=(0,f.useState)(void 0),[x,C]=(0,f.useState)(0),E=sJ((null==g||null==(e=g.connector)?void 0:e.walletClientType)||"unknown"),k="connected"===(null==g?void 0:g.status),S="switching_to_supp
1orted_chain"===(null==g?void 0:g.status);(0,f.useEffect)(()=>{if(k){var e,t;let n;if(null==h||null==(e=h.externalConnectWallet)?void 0:e.onCompleteNavigateTo){let e=h.externalConnectWallet.onCompleteNavigateTo,r=null==(t=g.connectedWallet)?void 0:t.address;n=setTimeout(()=>{var t,n;h.funding&&p({...h,funding:{...h.funding,connectedWalletAddress:r}}),c(e({address:r,walletClientType:null==(t=g.connector)?void 0:t.walletClientType,walletChainType:null==(n=g.connector)?void 0:n.chainType}))},a5)}else n=setTimeout(y,a5);return()=>clearTimeout(n)}},[k]),(0,f.useEffect)(()=>{(null==g?void 0:g.connectError)&&w(pA(null==g?void 0:g.connectError))},[g]);let I=(null==g||null==(t=g.connector)?void 0:t.connectorType)||"injected",A=(null==g||null==(n=g.connector)?void 0:n.walletClientType)||"unknown",T=(null==E||null==(r=E.metadata)?void 0:r.shortName)||(null==E?void 0:E.name)||(null==g||null==(i=g.connector)?void 0:i.walletBranding.name)||"Browser Extension",_=(null==E||null==(a=E.image_url)?void 0:a.md)||(null==g||null==(o=g.connector)?void 0:o.walletBranding.icon)||(e=>(0,m.jsx)(sv,{...e})),j="Browser Extension"===T?T.toLowerCase():T;s=k?"Successfully connected with ".concat(j):b?b.message:S?"Switching networks":"Waiting for ".concat(j);let P="Don’t see your wallet? Check your other browser windows.";return k?P="You’re good to go!":x>=2&&b?P="Unable to connect wallet":b?P=b.detail:S?P="Switch your wallet to the requested network.":"metamask"===A&&eT.isMobile?P="Click to continue to open and connect MetaMask.":"metamask"===A?P="For the best experience, connect only one wallet at a time.":"wallet_connect_v2"===I?P="Open your mobile wallet app to continue":"coinbase_wallet"===I&&(P="Confirm in the Coinbase app/popup to continue."),(0,m.jsx)(gf,{walletName:T,walletLogo:_,success:k,errorMessage:b,title:s,subtitle:P,onRetry:()=>{C(x+1),w(void 0),null==g||g.connectRetry()},onUseDifferentWallet:l,onBack:u===d?void 0:l,numRetries:x,maxRetries:2})}},gm=L.styled.div.withConfig({displayName:"TodoList",componentId:"sc-bcc78743-0"})(["display:flex;flex-direction:column;justify-content:flex-start;gap:10px;padding-left:8px;"]),gy=e=>{let{children:t,variant:n="default",icon:r}=e,i=()=>{switch(n){case"success":return"var(--privy-color-icon-success)";case"error":return"var(--privy-color-icon-error)";default:return"var(--privy-color-icon-muted)"}};return(0,m.jsxs)(gb,{children:[(0,m.jsx)(gv,{$variant:n,"data-variant":n,children:(()=>{if(r)return f.default.isValidElement(r)?f.default.cloneElement(r,{stroke:i(),strokeWidth:2}):r;switch(n){case"success":default:return(0,m.jsx)(w.Check,{size:12,stroke:i(),strokeWidth:3});case"error":return(0,m.jsx)(j.X,{size:12,stroke:i(),strokeWidth:3})}})()}),t]})},gv=L.styled.div.withConfig({displayName:"IconBackground",componentId:"sc-bcc78743-2"})(["display:flex;align-items:center;justify-content:center;width:20px;height:20px;border-radius:50%;background-color:",";flex-shrink:0;"],e=>{let{$variant:t}=e;switch(t){case"success":return"var(--privy-color-success-bg, #EAFCEF)";case"error":return"var(--privy-color-error-bg, #FEE2E2)";default:return"var(--privy-color-background-2)"}}),gb=L.styled.div.withConfig({displayName:"TodoItemWrapper",componentId:"sc-bcc78743-3"})(["display:flex;justify-content:flex-start;align-items:flex-start;text-align:left;gap:8px;&&{a{color:var(--privy-color-accent);}}"]),gw=e=>{let{walletName:t,installLink:n,title:r,subtitle:i="Follow the instructions below to get started.",onReload:a,onBack:o}=e,s=r||"Create a ".concat(t," wallet").replace(/wallet wallet/gi,"wallet");return(0,m.jsx)(ck,{title:s,subtitle:i,onBack:o,showBack:!0,primaryCta:{label:"Reload the page to use your wallet",onClick:a},helpText:(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("span",{children:"Still not sure? "}),(0,m.jsx)(uK,{size:"sm",target:"_blank",href:"https://solana.com/docs/intro/wallets",children:"Learn more"})]}),watermark:!0,children:(0,m.jsxs)(gm,{children:[(0,m.jsx)(gy,{children:(0,m.jsxs)("div",{children:[(0,m.jsx)("span",{children:"Install the "})," ",(0,m.jsxs)(uK,{href:n,target:"_blank",children:[t," browser extension"]})]})}),(0,m.jsx)(gy,{children:"Set up your first wallet"}),(0,m.jsx)(gy,{children:"Store your recovery phrase in a safe place!"})]})})},gx={component:()=>{let{navigateBack:e,data:t}=lc();if(!(null==t?void 0:t.installWalletModalData))throw Error("Wallet data is missing");let{walletConfig:n}=t.installWalletModalData;return(0,m.jsx)(gw,{walletName:n.name,installLink:n.installLink,onReload:()=>{window.location.reload()},onBack:e})}},gC=e=>{let{title:t,subtitle:n,buttonText:r,buttonHref:i,isLoading:a=!1,helpText:o,onButtonClick:s}=e;return(0,m.jsx)(ck,{title:t,subtitle:n,primaryCta:{label:r,onClick:()=>{i&&window.open(i,"_self"),null==s||s()},disabled:a},helpText:o,watermark:!0})},gE={component:()=>{let{ready:e}=(0,g.u)(),{data:t}=lc(),[n,r]=(0,f.useState)(!1);if(!(null==t?void 0:t.installWalletModalData))throw Error("Wallet data is missing");let{walletConfig:i,connectOnly:a,chainType:o}=t.installWalletModalData,s=i.getMobileRedirect({useUniversalLink:!n,isSolana:"solana"===o,connectOnly:a}),l=i.name.replace(/ wallet/gi,""),c={title:"Redirecting to ".concat(l," Mobile Wallet"),description:"We'll take you to the ".concat(l," Mobile Wallet app to continue your login experience."),footnote:""};return e&&(c.description="For the best experience, we'll automatically log you into the ".concat(l," Mobile Wallet in-app browser."),c.footnote="You can always return here to login via other methods."),n&&(c.title="Still here?",c.description="You may need to install the ".concat(i.name," mobile app."),c.footnote="Once you're done, you can connect with ".concat(i.name," wallet to complete the login.")),(0,m.jsx)(gC,{title:c.title,subtitle:c.description,buttonText:n?"Go to App Store":"Continue",buttonHref:s,isLoading:e&&!s,helpText:c.footnote||void 0,onButtonClick:()=>{setTimeout(()=>r(!0),1e3)}})}},gk=e=>{var t,n,r;let{provider:i,displayName:a,logo:o,connectOnly:s,connector:l}=e,c,{navigate:d,setModalData:u}=lc(),{connectWallet:h}=(0,R.u)(),p=uz(),f=sJ(i),g="wallet_connect_v2"===l.connectorType?i:l.walletClientType,y=window.matchMedia("(display-mode: standalone)").matches,b=sF({connectorType:l.connectorType,walletClientType:g});c=b&&b.chainTypes.includes(l.chainType)?()=>{b.isInstalled||"solana"===l.chainType&&"isInstalled"in l&&l.isInstalled?(h(l,g),d(s?gg:p_)):eT.isMobile?(u({installWalletModalData:{w
1alletConfig:b,chainType:l.chainType,connectOnly:s}}),d(gE)):(u({installWalletModalData:{walletConfig:b,chainType:l.chainType,connectOnly:s}}),d(gx))}:"coinbase_wallet"!==l.connectorType||"eoaOnly"!==(null==(t=l.coinbaseWalletConfig.preference)?void 0:t.options)||!eT.isMobile||y||oU()?()=>{var e;(!gp(window.navigator.userAgent)||(null==(e=event)?void 0:e.isTrusted))&&(h(l,g),s?"wallet_connect_v2"===l.connectorType?(u(e=>({...e,externalConnectWallet:{...null==e?void 0:e.externalConnectWallet,preSelectedWalletId:"wallet_connect_qr"}})),d(mE)):d(gg):d(p_))}:()=>{window.location.href="https://go.cb-w.com/dapp?cb_url=".concat(encodeURI(window.location.href))};let w=a||(null==f||null==(n=f.metadata)?void 0:n.shortName)||(null==f?void 0:f.name)||l.walletClientType;return(0,m.jsxs)(gS,{onClick:c,children:[(0,m.jsx)(gh,{icon:o||(null==f||null==(r=f.image_url)?void 0:r.md),name:w}),(0,m.jsx)("span",{children:w}),(0,m.jsxs)(gA,{id:"chip-container",children:[(null==p?void 0:p.walletClientType)===g&&(null==p?void 0:p.chainType)===l.chainType?(0,m.jsx)(gI,{color:"gray",children:"Recent"}):(0,m.jsx)("span",{id:"connect-text",children:"Connect"}),"solana"===l.chainType&&(0,m.jsx)(gI,{color:"gray",children:"Solana"})]})]})},gS=(0,L.styled)(lC).withConfig({displayName:"ConnectWalletButton",componentId:"sc-89605346-0"})(["> span{color:var(--privy-color-foreground);}> #chip-container > #connect-text{font-weight:500;color:var(--privy-color-accent);opacity:0;transition:opacity 0.1s ease-out;}:hover > #chip-container > #connect-text{opacity:1;}@media (max-width:440px){> #chip-container > #connect-text{display:none;}}"]),gI=(0,L.styled)(gl).withConfig({displayName:"StyledChip",componentId:"sc-89605346-1"})(["margin-left:auto;"]),gA=L.styled.div.withConfig({displayName:"ChipContainer",componentId:"sc-89605346-2"})(["display:flex;flex-wrap:wrap;gap:8px;margin-left:auto;"]),gT=["coinbase_wallet","base_account"],g_=["metamask","okx_wallet","rainbow","uniswap","bybit_wallet","ronin_wallet","haha_wallet","uniswap_extension","zerion","rabby_wallet","cryptocom","binance"],gj=["safe"],gP=["phantom","backpack","solflare","universal_profile"],g$=e=>{let{walletList:t,walletChainType:n,connectors:r,connectOnly:i,ignore:a,walletConnectEnabled:o,forceWallet:s}=e,l=[],c=[],d=[],u=r.filter(e=>"ethereum-only"===n?"ethereum"===e.chainType:"solana-only"!==n||"solana"===e.chainType),h=u.find(e=>"wallet_connect_v2"===e.connectorType);for(let[e,r]of(s?[s.wallet]:t).entries()){if("detected_ethereum_wallets"===r)for(let[t,n]of u.filter(e=>{let{chainType:t,connectorType:n,walletClientType:r}=e;return"solana"!==t&&("uniswap_wallet_extension"===r||"uniswap_extension"===r?!a.includes("uniswap"):"crypto.com_wallet_extension"===r||"crypto.com_onchain"===r?!a.includes("cryptocom"):"injected"===n&&!a.includes(r))}).entries()){let{walletClientType:a,walletBranding:o,chainType:s}=n;("unknown"===a?c:l).push((0,m.jsx)(gk,{connectOnly:i,provider:a,logo:o.icon,displayName:o.name,connector:n},"".concat(e,"-").concat(r,"-").concat(a,"-").concat(s,"-").concat(t)))}if("detected_solana_wallets"===r)for(let[t,o]of u.filter(e=>{let{chainType:t,walletClientType:r}=e;if("solana"===t)return"ethereum-only"!==n&&!a.includes(r)}).entries()){let{walletClientType:n,walletBranding:a,chainType:s}=o;("unknown"===n?c:l).push((0,m.jsx)(gk,{connectOnly:i,provider:n,logo:a.icon,displayName:a.name,connector:o},"".concat(e,"-").concat(r,"-").concat(n,"-").concat(s,"-").concat(t)))}if(gP.includes(r)){let t=u.find(e=>"injected"===e.connectorType&&e.walletClientType===r||e.connectorType===r);if(t&&l.push((0,m.jsx)(gk,{connectOnly:i,provider:r,connector:t},"".concat(e,"-").concat(r))),"solana-only"===n||"ethereum-and-solana"===n){let e=u.find(e=>{let{chainType:t,walletClientType:n}=e;return"solana"===t&&n===r});e&&l.push((0,m.jsx)(gk,{connectOnly:i,provider:r,connector:e},"".concat(r,"-solana")))}}else if(g_.includes(r)){let t=u.find(e=>"uniswap"===r?"uniswap_wallet_extension"===e.walletClientType||"uniswap_extension"===e.walletClientType:"cryptocom"===r?"crypto.com_wallet_extension"===e.walletClientType||"crypto.com_onchain"===e.walletClientType:"injected"===e.connectorType&&e.walletClientType===r);if(o&&!t&&(t=h),t&&l.push((0,m.jsx)(gk,{connectOnly:i,provider:r,connector:t,logo:"injected"===t.connectorType?t.walletBranding.icon:void 0,displayName:"injected"===t.connectorType?t.walletBranding.name:void 0},"".concat(e,"-").concat(r))),"solana-only"===n||"ethereum-and-solana"===n){let e=u.find(e=>{let{chainType:t,walletClientType:n}=e;return"solana"===t&&n===r});e&&l.push((0,m.jsx)(gk,{connectOnly:i,provider:r,connector:e},"".concat(r,"-solana")))}}else if(gT.includes(r)){let t=u.find(e=>{let{connectorType:t}=e;return t===r});t&&l.push((0,m.jsx)(gk,{connectOnly:i,provider:r,connector:t,displayName:"coinbase_wallet"===t.walletClientType?"Coinbase":"Base",logo:"coinbase_wallet"===t.walletClientType?sn:sr},"".concat(e,"-").concat(r)))}else if(gj.includes(r))h&&d.push((0,m.jsx)(gk,{connectOnly:i,provider:r,connector:h},"".concat(e,"-").concat(r)));else if("wallet_connect"===r)h&&d.push((0,m.jsx)(gk,{connectOnly:i,provider:r,connector:h,logo:h.walletBranding.icon,displayName:"WalletConnect"},"".concat(e,"-").concat(r)));else if(r===(null==s?void 0:s.wallet)){let n="ethereum"===s.chainType&&t.includes("detected_ethereum_wallets"),a="solana"===s.chainType&&t.includes("detected_solana_wallets");if(n||a){var p,f;let t=u.find(e=>{let{walletClientType:t}=e;return t===r});t&&l.push((0,m.jsx)(gk,{connectOnly:i,provider:r,displayName:null==(p=t.walletBranding)?void 0:p.name,logo:null==(f=t.walletBranding)?void 0:f.icon,connector:t},"".concat(e,"-").concat(r)))}}}return[...c,...l,...d]},gN=e=>{let{chains:t,appId:n,address:r,rpcConfig:i,includeUsdc:a}=e;return Promise.all(t.map(async e=>{let t=(0,U.createPublicClient)({chain:e,transport:(0,B.http)(oz(e,i,n))}),o=await t.getBalance({address:r}).catch(()=>0n),s=null,l=ed.UsdcAddressMap[e.id];if(a&&l){let{balance:t}=await pX({address:r,chain:e,rpcConfig:i,appId:n,erc20Address:l});s=t}return{balance:o,erc20Balance:s,erc20Address:l,chain:e}}))},gO=e=>(0,m.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",id:"Layer_1",x:"0px",y:"0px",viewBox:"0 0 397.7 311.7",enableBackgroun
1d:"new 0 0 397.7 311.7",xmlSpace:"preserve",...e,children:[(0,m.jsxs)("linearGradient",{id:"SVGID_1_",gradientUnits:"userSpaceOnUse",x1:"360.8791",y1:"351.4553",x2:"141.213",y2:"-69.2936",gradientTransform:"matrix(1 0 0 -1 0 314)",children:[(0,m.jsx)("stop",{offset:"0",stopColor:"#00FFA3"}),(0,m.jsx)("stop",{offset:"1",stopColor:"#DC1FFF"})]}),(0,m.jsx)("path",{d:"M64.6,237.9c2.4-2.4,5.7-3.8,9.2-3.8h317.4c5.8,0,8.7,7,4.6,11.1l-62.7,62.7c-2.4,2.4-5.7,3.8-9.2,3.8H6.5  c-5.8,0-8.7-7-4.6-11.1L64.6,237.9z",fill:"url(#SVGID_1_)"}),(0,m.jsxs)("linearGradient",{id:"SVGID_2_",gradientUnits:"userSpaceOnUse",x1:"264.8291",y1:"401.6014",x2:"45.163",y2:"-19.1475",gradientTransform:"matrix(1 0 0 -1 0 314)",children:[(0,m.jsx)("stop",{offset:"0",stopColor:"#00FFA3"}),(0,m.jsx)("stop",{offset:"1",stopColor:"#DC1FFF"})]}),(0,m.jsx)("path",{d:"M64.6,3.8C67.1,1.4,70.4,0,73.8,0h317.4c5.8,0,8.7,7,4.6,11.1l-62.7,62.7c-2.4,2.4-5.7,3.8-9.2,3.8H6.5  c-5.8,0-8.7-7-4.6-11.1L64.6,3.8z",fill:"url(#SVGID_2_)"}),(0,m.jsxs)("linearGradient",{id:"SVGID_3_",gradientUnits:"userSpaceOnUse",x1:"312.5484",y1:"376.688",x2:"92.8822",y2:"-44.061",gradientTransform:"matrix(1 0 0 -1 0 314)",children:[(0,m.jsx)("stop",{offset:"0",stopColor:"#00FFA3"}),(0,m.jsx)("stop",{offset:"1",stopColor:"#DC1FFF"})]}),(0,m.jsx)("path",{d:"M333.1,120.1c-2.4-2.4-5.7-3.8-9.2-3.8H6.5c-5.8,0-8.7,7-4.6,11.1l62.7,62.7c2.4,2.4,5.7,3.8,9.2,3.8h317.4  c5.8,0,8.7-7,4.6-11.1L333.1,120.1z",fill:"url(#SVGID_3_)"})]}),gM={[r.arbitrum.id]:e=>(0,m.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",version:"1.1",id:"Layer_1",x:"0px",y:"0px",viewBox:"0 0 2500 2500",xmlSpace:"preserve",...e,children:(0,m.jsx)("g",{id:"Layer_x0020_1",children:(0,m.jsxs)("g",{id:"_2405588477232",children:[(0,m.jsx)("rect",{fill:"none",width:"2500",height:"2500"}),(0,m.jsx)("g",{children:(0,m.jsxs)("g",{children:[(0,m.jsx)("path",{fill:"#213147",d:"M226,760v980c0,63,33,120,88,152l849,490c54,31,121,31,175,0l849-490c54-31,88-89,88-152V760      c0-63-33-120-88-152l-849-490c-54-31-121-31-175,0L314,608c-54,31-87,89-87,152H226z"}),(0,m.jsx)("g",{children:(0,m.jsxs)("g",{children:[(0,m.jsx)("g",{children:(0,m.jsx)("path",{fill:"#12AAFF",d:"M1435,1440l-121,332c-3,9-3,19,0,29l208,571l241-139l-289-793C1467,1422,1442,1422,1435,1440z"})}),(0,m.jsx)("g",{children:(0,m.jsx)("path",{fill:"#12AAFF",d:"M1678,882c-7-18-32-18-39,0l-121,332c-3,9-3,19,0,29l341,935l241-139L1678,883V882z"})})]})}),(0,m.jsx)("g",{children:(0,m.jsx)("path",{fill:"#9DCCED",d:"M1250,155c6,0,12,2,17,5l918,530c11,6,17,18,17,30v1060c0,12-7,24-17,30l-918,530c-5,3-11,5-17,5       s-12-2-17-5l-918-530c-11-6-17-18-17-30V719c0-12,7-24,17-30l918-530c5-3,11-5,17-5l0,0V155z M1250,0c-33,0-65,8-95,25L237,555       c-59,34-95,96-95,164v1060c0,68,36,130,95,164l918,530c29,17,62,25,95,25s65-8,95-25l918-530c59-34,95-96,95-164V719       c0-68-36-130-95-164L1344,25c-29-17-62-25-95-25l0,0H1250z"})}),(0,m.jsx)("polygon",{fill:"#213147",points:"642,2179 727,1947 897,2088 738,2234     "}),(0,m.jsxs)("g",{children:[(0,m.jsx)("path",{fill:"#FFFFFF",d:"M1172,644H939c-17,0-33,11-39,27L401,2039l241,139l550-1507c5-14-5-28-19-28L1172,644z"}),(0,m.jsx)("path",{fill:"#FFFFFF",d:"M1580,644h-233c-17,0-33,11-39,27L738,2233l241,139l620-1701c5-14-5-28-19-28V644z"})]})]})})]})})}),[a.avalanche.id]:e=>(0,m.jsxs)("svg",{width:"1503",height:"1504",viewBox:"0 0 1503 1504",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,m.jsx)("rect",{x:"287",y:"258",width:"928",height:"844",fill:"white"}),(0,m.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1502.5 752C1502.5 1166.77 1166.27 1503 751.5 1503C336.734 1503 0.5 1166.77 0.5 752C0.5 337.234 336.734 1 751.5 1C1166.27 1 1502.5 337.234 1502.5 752ZM538.688 1050.86H392.94C362.314 1050.86 347.186 1050.86 337.962 1044.96C327.999 1038.5 321.911 1027.8 321.173 1015.99C320.619 1005.11 328.184 991.822 343.312 965.255L703.182 330.935C718.495 303.999 726.243 290.531 736.021 285.55C746.537 280.2 759.083 280.2 769.599 285.55C779.377 290.531 787.126 303.999 802.438 330.935L876.42 460.079L876.797 460.738C893.336 489.635 901.723 504.289 905.385 519.669C909.443 536.458 909.443 554.169 905.385 570.958C901.695 586.455 893.393 601.215 876.604 630.549L687.573 964.702L687.084 965.558C670.436 994.693 661.999 1009.46 650.306 1020.6C637.576 1032.78 622.263 1041.63 605.474 1046.62C590.161 1050.86 573.004 1050.86 538.688 1050.86ZM906.75 1050.86H1115.59C1146.4 1050.86 1161.9 1050.86 1171.13 1044.78C1181.09 1038.32 1187.36 1027.43 1187.92 1015.63C1188.45 1005.1 1181.05 992.33 1166.55 967.307C1166.05 966.455 1165.55 965.588 1165.04 964.706L1060.43 785.75L1059.24 783.735C1044.54 758.877 1037.12 746.324 1027.59 741.472C1017.08 736.121 1004.71 736.121 994.199 741.472C984.605 746.453 976.857 759.552 961.544 785.934L857.306 964.891L856.949 965.507C841.69 991.847 834.064 1005.01 834.614 1015.81C835.352 1027.62 841.44 1038.5 851.402 1044.96C860.443 1050.86 875.94 1050.86 906.75 1050.86Z",fill:"#E84142"})]}),[s.base.id]:e=>(0,m.jsxs)("svg",{width:"146",height:"146",viewBox:"0 0 146 146",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,m.jsx)("circle",{cx:"73",cy:"73",r:"73",fill:"#0052FF"}),(0,m.jsx)("path",{d:"M73.323 123.729C101.617 123.729 124.553 100.832 124.553 72.5875C124.553 44.343 101.617 21.4463 73.323 21.4463C46.4795 21.4463 24.4581 42.0558 22.271 68.2887H89.9859V76.8864H22.271C24.4581 103.119 46.4795 123.729 73.323 123.729Z",fill:"white"})]}),[ep.celo.id]:e=>(0,m.jsxs)("svg",{fill:"none",height:"400",viewBox:"0 0 400 400",width:"400",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,m.jsx)("path",{d:"m0 0h400v400h-400z",fill:"#fcff52"}),(0,m.jsx)("path",{d:"m300 100h-200v200h199.996v-69.813h-33.191c-11.442 25.468-37.194 43.206-66.665 43.206-40.63 0-73.533-33.187-73.533-73.533s32.903-73.249 73.533-73.249c30.043 0 55.795 18.313 67.24 44.349h32.62z",fill:"#000"})]}),[eh.linea.id]:e=>(0,m.jsxs)("svg",{width:"200",height:"208",viewBox:"0 0 200 208",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,m.jsx)("rect",{width:"199.4",height:"207.623",fill:"#121212"}),(0,m.jsxs)("g",{"clip-path":"url(#clip0_2303_643)",children:[(0,m.jsx)("path",{d:"M132.369 155.99H49.7001V68.8854H68.6148V139.109H132.369V155.981V155.99Z",fill:"white"}),(0,m.jsx)("path",{d:"M132.369 85.7575C141.687 85.7575 149.241 78.2036 149.241 68.8855C149.241 59.5673 141.687 52.0134 132.369 52.0134C123.05 52.0134 115.497 59.5673 115.497 68.8855C115.497 78.2036 123.05 85.7575 132.369 85.7575Z",fill:"white"})]}),(0,m.jsx)("defs",{children:(0,m.jsx)("clipPath",{id:"clip0_2303_643",children:(0,m.jsx)("rect",{width:"99.5407",height:"103.977",fill:"white",transform:"translate(49.7001 52.0134)"})})})]}),[p.mainnet.id]:e=>(0,m.jsxs)("svg",{version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 327.5 533.3",enableBackgroun
1d:"new 0 0 327.5 533.3;",xmlSpace:"preserve",...e,children:[(0,m.jsx)("path",{fill:"#8492B2",d:"M163.7,197.2V0L0,271.6L163.7,197.2z"}),(0,m.jsx)("path",{fill:"#62688F",d:"M163.7,368.4V197.2L0,271.6L163.7,368.4z M163.7,197.2l163.7,74.4L163.7,0V197.2z"}),(0,m.jsx)("path",{fill:"#454A75",d:"M163.7,197.2v171.2l163.7-96.8L163.7,197.2z"}),(0,m.jsx)("path",{fill:"#8492B2",d:"M163.7,399.4L0,302.7l163.7,230.7V399.4z"}),(0,m.jsx)("path",{fill:"#62688F",d:"M327.5,302.7l-163.8,96.7v134L327.5,302.7z"})]}),[u.optimism.id]:e=>(0,m.jsxs)("svg",{width:"500",height:"500",viewBox:"0 0 500 500",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,m.jsx)("circle",{cx:"250",cy:"250",r:"250",fill:"#FF0420"}),(0,m.jsx)("path",{d:"M177.133 316.446C162.247 316.446 150.051 312.943 140.544 305.938C131.162 298.808 126.471 288.676 126.471 275.541C126.471 272.789 126.784 269.411 127.409 265.408C129.036 256.402 131.35 245.581 134.352 232.947C142.858 198.547 164.812 181.347 200.213 181.347C209.845 181.347 218.476 182.973 226.107 186.225C233.738 189.352 239.742 194.106 244.12 200.486C248.498 206.74 250.688 214.246 250.688 223.002C250.688 225.629 250.375 228.944 249.749 232.947C247.873 244.08 245.621 254.901 242.994 265.408C238.616 282.546 231.048 295.368 220.29 303.874C209.532 312.255 195.147 316.446 177.133 316.446ZM179.76 289.426C186.766 289.426 192.707 287.362 197.586 283.234C202.59 279.106 206.155 272.789 208.281 264.283C211.158 252.524 213.348 242.266 214.849 233.51C215.349 230.883 215.599 228.194 215.599 225.441C215.599 214.058 209.657 208.366 197.774 208.366C190.768 208.366 184.764 210.43 179.76 214.558C174.882 218.687 171.379 225.004 169.253 233.51C167.001 241.891 164.749 252.149 162.498 264.283C161.997 266.784 161.747 269.411 161.747 272.163C161.747 283.672 167.752 289.426 179.76 289.426Z",fill:"white"}),(0,m.jsx)("path",{d:"M259.303 314.57C257.927 314.57 256.863 314.132 256.113 313.256C255.487 312.255 255.3 311.13 255.55 309.879L281.444 187.914C281.694 186.538 282.382 185.412 283.508 184.536C284.634 183.661 285.822 183.223 287.073 183.223H336.985C350.87 183.223 362.003 186.1 370.384 191.854C378.891 197.609 383.144 205.927 383.144 216.81C383.144 219.937 382.769 223.19 382.018 226.567C378.891 240.953 372.574 251.586 363.067 258.466C353.685 265.346 340.8 268.786 324.413 268.786H299.082L290.451 309.879C290.2 311.255 289.512 312.38 288.387 313.256C287.261 314.132 286.072 314.57 284.822 314.57H259.303ZM325.727 242.892C330.98 242.892 335.546 241.453 339.424 238.576C343.427 235.699 346.054 231.571 347.305 226.192C347.68 224.065 347.868 222.189 347.868 220.563C347.868 216.935 346.805 214.183 344.678 212.307C342.551 210.305 338.924 209.305 333.795 209.305H311.278L304.148 242.892H325.727Z",fill:"white"})]}),[c.polygon.id]:e=>(0,m.jsxs)("svg",{width:"360",height:"360",viewBox:"0 0 360 360",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,m.jsx)("rect",{width:"360",height:"360",rx:"180",fill:"#6C00F6"}),(0,m.jsx)("path",{d:"M157.743 154.241L141.052 144.58L90.9766 173.561V231.519L141.052 260.5L191.13 231.519V141.359L218.948 125.26L246.77 141.359V173.561L218.948 189.66L202.257 180.002V205.759L218.948 215.42L269.024 186.439V128.481L218.948 99.5L168.873 128.481V218.641L141.052 234.74L113.233 218.641V186.439L141.052 170.34L157.743 179.998V154.241Z",fill:"white"})]}),[eu.zora.id]:e=>(0,m.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"30",height:"30",viewBox:"0 0 30 30",fill:"none",...e,children:[(0,m.jsx)("g",{clipPath:"url(#clip0)",children:(0,m.jsx)("g",{clipPath:"url(#clip1)",children:(0,m.jsx)("path",{d:"M14.9188 29.8373C6.67944 29.8373 0.00012207 23.1581 0.00012207 14.9187C0.00012207 6.67931 6.67944 0 14.9188 0C23.1581 0 29.8373 6.67931 29.8373 14.9187C29.8373 23.1581 23.1581 29.8373 14.9188 29.8373Z",fill:"url(#paint0)"})})}),(0,m.jsxs)("defs",{children:[(0,m.jsxs)("radialGradient",{id:"paint0",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(21.6921 8.02215) rotate(180) scale(25.2008)",children:[(0,m.jsx)("stop",{offset:"0.00682297",stopColor:"#F2CEFE"}),(0,m.jsx)("stop",{offset:"0.1913",stopColor:"#AFBAF1"}),(0,m.jsx)("stop",{offset:"0.4982",stopColor:"#4281D3"}),(0,m.jsx)("stop",{offset:"0.666667",stopColor:"#2E427D"}),(0,m.jsx)("stop",{offset:"0.822917",stopColor:"#230101"}),(0,m.jsx)("stop",{offset:"1",stopColor:"#8F6B40"})]}),(0,m.jsx)("clipPath",{id:"clip0",children:(0,m.jsx)("rect",{width:"30",height:"30",fill:"white"})}),(0,m.jsx)("clipPath",{id:"clip1",children:(0,m.jsx)("rect",{width:"30",height:"30",fill:"white"})})]})]})},gR=e=>{let{chainId:t,...n}=e;if("solana"===t)return(0,m.jsx)(gO,{...n});let r=gM[t];return(0,m.jsx)(r||tr,{...n})},gL=e=>{let{balance:t,className:n,chain:r}=e;return(0,m.jsx)(pF,{className:n,$state:void 0,children:(0,m.jsx)(gD,{balance:t,chain:r})})},gD=e=>{let{balance:t,chain:n}=e;return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsxs)(gF,{children:[(0,m.jsx)(gB,{chainId:"object"==typeof n?n.id:"solana"}),(0,m.jsx)(fu,{children:"object"==typeof n?n.name:pJ(n)})]}),(0,m.jsxs)(gl,{isLoading:!1,isPulsing:!1,color:"gray",children:[(0,m.jsx)(gU,{children:(0,m.jsx)(ej.default,{})}),t]})]})},gF=L.styled.div.withConfig({displayName:"Container",componentId:"sc-63f80cee-0"})(["display:flex;align-items:center;"]),gU=L.styled.div.withConfig({displayName:"IconContainer",componentId:"sc-63f80cee-1"}
1)(["height:0.75rem;width:0.75rem;margin-right:0.2rem;"]),gB=(0,L.styled)(gR).withConfig({displayName:"StyledNetworkIcon",componentId:"sc-63f80cee-2"})(["height:1.25rem;width:1.25rem;display:inline-block;margin-right:0.5rem;border-radius:4px;"]),gz=e=>{let{options:t,onSelect:n,selected:r,className:i}=e;return(0,m.jsxs)(aL,{as:gW,children:[(0,m.jsxs)(aO,{as:gG,children:[(0,m.jsx)(gD,{balance:r.balance,chain:r.chain}),(0,m.jsx)(gV,{height:16})]}),(0,m.jsx)(aM,{as:gq,className:i,children:t.map((e,t)=>(0,m.jsx)(aR,{as:gH,onClick:()=>n(t),children:(0,m.jsx)(gD,{balance:e.balance,chain:e.chain})},t))})]})},gW=L.styled.div.withConfig({displayName:"Wrapper",componentId:"sc-31c00f79-0"})(["width:100%;position:relative;"]),gq=L.styled.div.withConfig({displayName:"Popover",componentId:"sc-31c00f79-1"})(["width:100%;margin-top:0.5rem;position:absolute;background-color:var(--privy-color-background);border-radius:var(--privy-border-radius-md);overflow-x:hidden;overflow-y:auto;box-shadow:0px 1px 2px 0px rgba(16,24,40,0.05);max-height:11.75rem;&&{border:solid 1px var(--privy-color-foreground-4);}z-index:1;"]),gH=L.styled.button.withConfig({displayName:"Button",componentId:"sc-31c00f79-2"})(["width:100%;display:flex;justify-content:space-between;&&{padding:1rem;}:not(:last-child){border-bottom:solid 1px var(--privy-color-foreground-4);}:hover{background:var(--privy-color-background-2);}"]),gV=(0,L.styled)(te.default).withConfig({displayName:"StyledChevronIcon",componentId:"sc-31c00f79-3"})(["height:1rem;margin-left:0.5rem;"]),gG=L.styled.button.withConfig({displayName:"StyledMenuButton",componentId:"sc-31c00f79-4"})([""," span{margin-left:auto;}","{transition:rotate 100ms ease-in;}&[aria-expanded='true']{","{rotate:-180deg;}}"],pD,gV,gV),gK=L.styled.div.withConfig({displayName:"FundingMethodContainer",componentId:"sc-eaaa12a-0"})(["display:flex;flex-direction:column;gap:12px;padding-top:24px;padding-bottom:24px;"]),gY=L.styled.div.withConfig({displayName:"IconContainer",componentId:"sc-eaaa12a-1"})(["width:24px;height:24px;display:flex;justify-content:center;align-items:center;svg{border-radius:var(--privy-border-radius-sm);}"]),gZ=L.styled.div.withConfig({displayName:"FundingQuantityWrapper",componentId:"sc-eaaa12a-2"})(["display:flex;flex-direction:column;justify-content:center;align-items:flex-start;gap:8px;"]),gJ=L.styled.div.withConfig({displayName:"FundingQuantity",componentId:"sc-eaaa12a-3"})(["display:flex;align-items:center;gap:4px;width:100%;padding:0 16px;border-width:1px !important;border-radius:12px;cursor:text;&:focus-within{border-color:var(--privy-color-accent);}"]),gQ=L.styled.input.withConfig({displayName:"FundingAmountInput",componentId:"sc-eaaa12a-5"})(["background-color:var(--privy-color-background);width:100%;&:focus{outline:none !important;border:none !important;box-shadow:none !important;}&&{font-size:26px;}"]),gX=(0,L.styled)(gQ).withConfig({displayName:"FundingAmountInputLarge",componentId:"sc-eaaa12a-6"})(["&&{font-size:42px;}"]),g0=L.styled.div.withConfig({displayName:"FundingCurrency",componentId:"sc-eaaa12a-8"})(["font-size:18px;"]),g1=L.styled.div.withConfig({displayName:"FundingDollars",componentId:"sc-eaaa12a-9"})(["font-size:12px;color:var(--privy-color-foreground-3);height:20px;"]),g2=L.styled.div.withConfig({displayName:"InfoButtonText",componentId:"sc-eaaa12a-13"})([""]),g3=L.styled.a.withConfig({displayName:"InfoButtonLink",componentId:"sc-eaaa12a-14"})(["&&{color:var(--privy-color-accent);}cursor:pointer;"]),g5=e=>{var t,n;let{displayName:r,errorMessage:i,configuredFundingChain:a,formattedBalance:o,fundingAmount:s,fundingCurrency:l,fundingAmountInUsd:c,options:d,selectedOption:u,isPreparing:h,isSubmitting:p,addressToFund:g,fundingWalletAddress:y,onSubmit:b,onSelect:w,onAmountChange:x,erc20ContractInfo:C}=e,E=(0,f.useRef)(null);return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(gi,{}),(0,m.jsx)(cX,{}),(0,m.jsx)(pR,{children:"Transfer from another network"}),(0,m.jsxs)(pM,{children:["You need more funds on the"," ","object"==typeof a?a.name:pJ(a)," ","network. Bridge from another blockchain network."]}),(0,m.jsxs)(gZ,{style:{marginTop:"2rem"},children:[(0,m.jsxs)(gJ,{onClick:()=>{var e;return null==(e=E.current)?void 0:e.focus()},children:[(0,m.jsx)(gQ,{ref:E,value:s,onChange:e=>{let t=e.target.value;if(/^[0-9.]*$/.test(t)&&t.split(".").length-1<=1){let e=/\.$/.test(t)?".":"",n=Number(t.replace(/\.$/,"")||"0");if(Number.isNaN(n))return void x("0");x(n.toString()+e)}}}),(0,m.jsx)(g0,{children:l})]}),c&&(0,m.jsx)(g1,{children:c})]}),(0,m.jsxs)(fl,{style:{marginTop:"1.5rem"},children:[(0,m.jsx)(fi,{children:"From"}),(0,m.jsx)(fi,{children:(0,el.formatWalletAddress)(y)})]}),(0,m.jsx)(gz,{selected:{chain:u.chain,balance:u.isErc20Quote?p8({amount:null!=(t=u.erc20Balance)?t:0n,decimals:null!=(n=null==C?void 0:C.decimals)?n:6})+" ".concat((null==C?void 0:C.symbol)||""):c$(u.balance,u.chain.nativeCurrency.symbol,3,!0)},options:d.map(e=>{var t;let{chain:n,balance:r,isErc20Quote:i,erc20Balance:a}=e;return{chain:n,balance:i?p8({amount:null!=a?a:0n,decimals:null!=(t=null==C?void 0:C.decimals)?t:6})+" ".concat((null==C?void 0:C.symbol)||""):c$(r,n.nativeCurrency.symbol,3,!0)}}),onSelect:w}),(0,m.jsxs)(fl,{style:{marginTop:"1.5rem"},children:[(0,m.jsx)(fi,{children:"To"}),(0,m.jsx)(fi,{children:(0,el.formatWalletAddress)(g)})]}),(0,m.jsx)(gL,{chain:a,balance:o}),(0,m.jsx)(hq,{style:{marginTop:"1rem"},children:i}),(0,m.jsxs)(lW,{style:{marginTop:"1rem"},loading:p||h,disabled:h||p,onClick:b,children:["Confirm with ",r]}),(0,m.jsx)(c0,{}),(0,m.jsx)(lj,{})]})},g4=e=>{var t;let{walletClientType:n,displayName:r,addressToFund:i,chainId:a,chainName:o,isBridging:s,isErc20Flow:l,totalPriceInNativeCurrency:c,totalPriceInUsd:d,gasPriceInNativeCurrency:u,gasPriceInUsd:h}=e,p=sJ(n);return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(gi,{}),(0,m.jsx)(l9,{centerIcon:(0,m.jsx)(gh,{icon:null==p||null==(t=p.image_url)?void 0:t.md,name:n})}),(0,m.jsx)(dR,{style:{marginTop:"8px",marginBottom:"12px"},title:"".concat(s?"Bridging":"Confirming"," with ").concat(r)}),!s&&!l&&(0,m.jsxs)(fs,{children:[(0,m.jsxs)(fl,{children:[(0,m.jsx)(fi,{children:"Total"}),(0,m.jsx)(fu,{children:d||c})]}),(0,m.jsxs)(fl,{children:[(0,m.jsx)(fi,{children:"To"}),(0,m.jsx)(fu,{children:(0,m.jsx)(u3,{address:i,showCopyIcon:!1})})]}),(0,m.jsxs)(fl,{children:[(0,m.jsx)(fi,{children:"Network"}),(0,m.jsx)(fu,{children:(0,m.jsxs)(g6,{children:[(0,m.jsx)(gR,{chainId:a,height:16,width:16})," ",o]})})]}),u&&(0,m.jsxs)(fl,{children:[(0,m.jsx)(fi,{children:"Estimated fee"}),(0,m.jsx)(fu,{children:h||u})]})]}),(0,m.jsx)(c1,{height:24}),(0,m.jsx)(lj,{})]})},g6=L.styled.div.withConfig({displayName:"NetworkColumn",componentId:"sc-5bdbf842-0"})(["display:flex;flex-direction:row;align-items:center;gap:4px;"]),g8={component:()=>{let e=lt(),{rpcConfig:t,appId:n,closePrivyModal:r,createAnalyticsEvent:i}=(0,R.u)(),{navigate:a,setModalData:o,data:s}=lc(),l=lt(),{wallets:c}=dx(),[d,u]=(0,f.useState)(null),[h,p]=(0,f.useState)(null),[g,y]=(0,f.useState)([]),[b,w]=(0,f.useState)(0),[x,C]=(0,f.useState)(!1),[E,k]=(0,f.useState)(!1),[S,I]=(0,f.useState)(!1),[A,T]=(0,f.useState)(!1),[_,j]=(0,f.useState)(),[P,$]=(0,f.useState)();if(!(null==s?void 0:s.funding)||"solana"!==s.funding.chainType)throw Error("Invalid funding data");let{address:N,chain:O,connectedWalletAddress:M}=s.funding,[L,D]=(0,f.useState)(s.funding.amount),F=M?c.find(e=>{let{address:t}=e;return t===M}):c[0],z=sJ((null==F?void 0:F.walletClientType)||"unknown"),q=(null==z?void 0:z.name)||"wallet",[H,V]=(0,f.useState)(null);(0,f.useEffect)(()=>{(async()=>
1{if(!F)return;let e=await F.getEthereumProvider();V((0,Z.createWalletClient)({account:F.address,transport:(0,J.custom)(e)}).extend(Q.publicActions))})().catch(console.error)},[F]);let[G,K]=(0,f.useState)(0n),Y=cD(G);(0,f.useEffect)(()=>{let t=e.solanaRpcs[O];t?pZ({rpc:t.rpc,address:N}).then(e=>K(BigInt(e))).catch(console.error):console.warn("Unable to load solana rpc, skipping balance")},[]);let[X,ee]=(0,f.useState)(),{tokenPrice:et}=db("solana"),{fundingAmountInBaseUnit:en,fundingAmountInUsd:er}=function(e){let{amount:t,fee:n,tokenPrice:r,isUsdc:i}=e,a=BigInt(Math.floor(parseFloat(t)*10**(i?6:9))),o=i?a:a+n;return{fundingAmountInBaseUnit:a,fundingAmountInUsd:r?cR(a,r):void 0,totalPriceInUsd:r?cR(o,r):void 0,totalPriceInNativeCurrency:cD(o),feePriceInNativeCurrency:cD(n),feePriceInUsd:r?cR(n,r):void 0}}({amount:L,fee:0n,tokenPrice:et,isUsdc:s.funding.isUSDC});if((0,f.useEffect)(()=>{(async()=>{if(!H||!F)return;let e=["solana:testnet","solana:devnet"].includes(O);e&&console.warn("Solana testnets are not supported for bridging");let r=(0,eo.addToDefaultChains)(l.chains).filter(t=>{let{testnet:n}=t;return!!n===e}),i=(await gN({chains:r,address:F.address,appId:n,rpcConfig:t})).filter(e=>e.balance>0n);if(i.length<1)return void u(new eb.P("Wallet ".concat(oq(F.address)," does not have enough funds."),void 0,eb.h.INSUFFICIENT_BALANCE));i.sort((e,t)=>Number(t.balance-e.balance));let a=(await Promise.allSettled(i.map(async e=>({...e,quote:await hr({isTestnet:!1,input:he({amount:en.toString(),user:F.address,recipient:N,destinationChainId:0x2f3fb341,destinationCurrency:u9,originChainId:e.chain.id})})})))).filter(e=>"fulfilled"===e.status).map(e=>e.value);if(a.length<1)return void u(new eb.P("Unable to fetch quotes for bridging. Wallet ".concat(oq(F.address)," does not have enough funds."),void 0,eb.h.INSUFFICIENT_BALANCE));let o=a.map(e=>{let{quote:t,balance:n,chain:r}=e;return{bridgeTx:hi(t),balance:n,chain:r,isErc20Quote:!1}}).filter(e=>{let{bridgeTx:t}=e;return!!t});if(o.length>1)return void y(o);let s=o.at(0);s?(k(!0),ee({data:s.bridgeTx.data,to:s.bridgeTx.to,value:s.bridgeTx.value,chain:s.chain})):u(new eb.P("Unable to select bridge option from quotes. Wallet ".concat(oq(F.address)," does not have enough funds."),void 0,eb.h.INSUFFICIENT_BALANCE))})().catch(console.error)},[H]),(0,f.useEffect)(()=>{(async()=>{var e,r,a;let o,s;if(!H||!F||x||S||!X)return;C(!0);let l=(0,U.createPublicClient)({chain:X.chain,transport:(0,B.http)(oz(X.chain,t,n))});try{o=await l.prepareTransactionRequest({account:F.address,to:X.to,chain:X.chain,data:X.data,value:BigInt(null!=(e=X.value)?e:0)})}catch(e){console.error(e),g.length>1&&p(null!=(r=e.shortMessage)?r:"Something went wrong")}if(o){C(!1),I(!0);try{await H.switchChain({id:X.chain.id})}catch(e){await H.addChain({chain:X.chain}),await H.switchChain({id:X.chain.id})}try{s=await H.sendTransaction(o)}catch(e){console.error(e),"TransactionExecutionError"===e.name&&(g.length<1?u(new eb.P(e.shortMessage,void 0,eb.h.TRANSACTION_FAILURE)):p(null!=(a=e.shortMessage)?a:"Something went wrong"))}if(s)return await H.waitForTransactionReceipt({hash:s}),E?($("pending"),void j(s)):(I(!1),T(!0),void i({eventName:pY,payload:{provider:"external",status:"success",txHash:s,address:F.address,chainId:X.chain.id,chainType:"ethereum",value:X.value?(0,W.formatUnits)(BigInt(X.value),18):void 0,token:"ETH",destination:N,destinationClusterName:"mainnet-beta",destinationChainType:"solana",destinationValue:(0,W.formatUnits)(en,9),destinationToken:"SOL"}}));I(!1)}else C(!1)})().catch(console.error)},[H,X]),ho({transactionHash:_,isTestnet:!1,bridgingStatus:P,setBridgingStatus:$,onSuccess(e){let{transactionHash:t}=e;k(!1),T(!0),i({eventName:pY,payload:{provider:"external",status:"success",txHash:t,address:null==F?void 0:F.address,chainId:null==X?void 0:X.chain.id,chainType:"ethereum",value:(null==X?void 0:X.value)?(0,W.formatUnits)(BigInt(X.value),18):void 0,token:"ETH",destination:N,destinationClusterName:"mainnet-beta",destinationChainType:"solana",destinationValue:(0,W.formatUnits)(en,9),destinationToken:"SOL"}})},onFailure(e){let{error:t}=e;k(!1),u(t)}}),(0,f.useEffect)(()=>{d&&(o({funding:null==s?void 0:s.funding,solanaFundingData:null==s?void 0:s.solanaFundingData,sendTransaction:null==s?void 0:s.sendTransaction,errorMod
1alData:{error:d,previousScreen:mn}}),a(hc,!1))},[d]),(0,f.useEffect)(()=>{if(!A)return;let e=setTimeout(r,4e3);return()=>clearTimeout(e)},[A]),A)return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(gi,{}),(0,m.jsx)(cX,{}),(0,m.jsxs)(cY,{children:[(0,m.jsx)(tn,{color:"var(--privy-color-success)",width:"64px",height:"64px"}),(0,m.jsx)(dR,{title:"Success!",description:"You’ve successfully added ".concat(L," SOL to your ").concat(l.name," wallet. It may take a minute before the funds are available to use.")})]}),(0,m.jsx)(c0,{}),(0,m.jsx)(lj,{})]});let ei=g[b];return g.length>1&&ei?(0,m.jsx)(g5,{displayName:q,configuredFundingChain:O,formattedBalance:Y,fundingAmount:L,fundingCurrency:"SOL",fundingAmountInUsd:er,options:g,selectedOption:ei,isPreparing:x,isSubmitting:S,addressToFund:N,fundingWalletAddress:(null==F?void 0:F.address)||"",errorMessage:h,onSubmit:()=>{var e;(null==(e=s.funding)?void 0:e.amount)!==L?(async function(){if(F&&ei)try{let e=await hr({isTestnet:!1,input:he({amount:en.toString(),user:F.address,recipient:N,destinationChainId:0x2f3fb341,destinationCurrency:u9,originChainId:ei.chain.id})}),t=hi(e);if(!t)throw Error("Invalid transaction request");k(!0),ee({data:t.data,to:t.to,value:t.value,chain:ei.chain})}catch(e){console.error(e),u(new eb.P("Unable to fetch quotes for bridging",e,eb.h.INSUFFICIENT_BALANCE))}})().catch(console.error):ee({to:ei.bridgeTx.to,data:ei.bridgeTx.data,value:ei.bridgeTx.value,chain:ei.chain})},onSelect:e=>{e!==b&&(p(null),w(e))},onAmountChange:D}):S&&F?(0,m.jsx)(g4,{walletClientType:(null==F?void 0:F.walletClientType)||"unknown",displayName:q,addressToFund:N,isBridging:E,isErc20Flow:!1,chainId:"solana",chainName:pJ(O),totalPriceInUsd:void 0,totalPriceInNativeCurrency:void 0,gasPriceInUsd:void 0,gasPriceInNativeCurrency:void 0}):(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(gi,{}),(0,m.jsx)(l9,{}),(0,m.jsx)("div",{style:{marginTop:"1rem"}}),(0,m.jsx)(lj,{})]})}},g9={component:()=>{var e,t,n,r,i;let{rpcConfig:a,appId:o,closePrivyModal:s,createAnalyticsEvent:l}=(0,R.u)(),{navigate:c,setModalData:d,data:u}=lc(),h=lt(),{wallets:p}=dx(),[g,y]=(0,f.useState)(!1),[b,w]=(0,f.useState)(0n),[x,C]=(0,f.useState)(!1),[E,k]=(0,f.useState)(null),[S,I]=(0,f.useState)(null),[A,T]=(0,f.useState)([]),[_,j]=(0,f.useState)(0),[P,$]=(0,f.useState)(!1),[N,O]=(0,f.useState)(!1),[M,L]=(0,f.useState)(!1),[D,F]=(0,f.useState)(!1),[z,q]=(0,f.useState)(),[H,V]=(0,f.useState)();if(!(null==u?void 0:u.funding)||"ethereum"!==u.funding.chainType)throw Error("Invalid funding data");let{erc20ContractInfo:G,chain:K,connectedWalletAddress:Y}=u.funding,et=u.funding.address,en=u.funding.erc20Address,[er,ei]=(0,f.useState)(u.funding.amount);(0,f.useEffect)(()=>{en&&!G&&k(Error("Unable to fetch token details"))},[]);let ea=!!en&&!!G,es=ea?BigInt(parseFloat(er)*10**G.decimals):(0,X.parseEther)(er),el=Y?p.find(e=>{let{address:t}=e;return t===Y}):p[0],ec=sJ((null==el?void 0:el.walletClientType)||"unknown"),ed=(null==ec?void 0:ec.name)||"wallet",[eu,eh]=(0,f.useState)(null);(0,f.useEffect)(()=>{(async()=>{if(!el)return;let e=await el.getEthereumProvider();eh((0,Z.createWalletClient)({account:el.address,transport:(0,J.custom)(e)}).extend(Q.publicActions))})().catch(console.error)},[el]);let[ep,ef]=(0,f.useState)(0n);(0,f.useEffect)(()=>{(0,U.createPublicClient)({chain:K,transport:(0,B.http)(oz(K,a,o))}).getBalance({address:et}).then(ef).catch(console.error)},[]);let[eg,em]=(0,f.useState)(0n);(0,f.useEffect)(()=>{ea&&pX({chain:K,address:et,appId:o,rpcConfig:a,erc20Address:en}).then(e=>em(e.balance)).catch(console.error)},[]);let{tokenPrice:ey}=db(K.id),[ev,ew]=(0,f.useState)({to:et,chain:K,value:es,data:void 0});(0,f.useEffect)(()=>{(async()=>{var e,t,n,r,i,s,c,d,u;let h,p;if(!eu||!el||P||M)return;$(!0);let f=(0,U.createPublicClient)({chain:ev.chain,transport:(0,B.http)(oz(ev.chain,a,o))});if(ea&&!ev.data)return await f.simulateContract({address:en,chain:ev.chain,abi:f0,functionName:"transfer",args:[et,es],account:el.address}).catch(e=>{console.warn("Simulated token transfer failed with error, fetching bridge options.",e)})?($(!1),void ew({to:en,chain:ev.chain,data:(0,ee.encodeFunctionData)({abi:f0,functionName:"transfer",args:[et,es]}),value:"0x0"})):($(!1),void C(!0));try{h=await f.prepareTransactionRequest({account:el.address,to:ev.to,chain:ev.chain,data:ev.data,value:BigInt(null!=(e=ev.value)?e:0)})}catch(e){if(console.error(e),A.length>
11)I(null!=(t=e.shortMessage)?t:"Something went wrong");else if(N&&0===A.length)return void k(new eb.P("Wallet ".concat(oq(el.address)," does not have enough funds."),void 0,eb.h.INSUFFICIENT_BALANCE))}if(!h)return $(!1),void C(!0);$(!1),L(!0),y(!0),w(h.gas);try{await eu.switchChain({id:ev.chain.id})}catch(e){await eu.addChain({chain:ev.chain}),await eu.switchChain({id:ev.chain.id})}try{p=await eu.sendTransaction(h)}catch(e){if(console.error(e),"TransactionExecutionError"===e.name)if(A.length<1){let t=e.shortMessage;(e.shortMessage.includes("rejected the request")||e.details.includes("rejected the request"))&&(t="User rejected the request."),k(new eb.P(t,void 0,eb.h.TRANSACTION_FAILURE))}else I(null!=(n=e.shortMessage)?n:"Something went wrong")}if(p)return await eu.waitForTransactionReceipt({hash:p}),L(!1),N?(q(p),void V("pending")):(F(!0),void l({eventName:pY,payload:{provider:"external",status:"success",txHash:p,address:el.address,chainId:ev.chain.id,chainType:"ethereum",value:ev.value?(0,W.formatUnits)(BigInt(ev.value),null!=(r=null==G?void 0:G.decimals)?r:18):void 0,token:null!=(s=null!=(i=null==G?void 0:G.symbol)?i:en)?s:"ETH",destinationAddress:et,destinationChainId:K.id,destinationChainType:"ethereum",destinationValue:es?(0,W.formatUnits)(es,null!=(c=null==G?void 0:G.decimals)?c:18):void 0,destinationToken:null!=(u=null!=(d=null==G?void 0:G.symbol)?d:en)?u:K.nativeCurrency.name}}));L(!1)})().catch(console.error)},[eu,ev]),(0,f.useEffect)(()=>{(async()=>{var e;if(!x||!eu||!el)return;let t=(0,eo.addToDefaultChains)(h.chains).filter(e=>e.id!==K.id&&!!e.testnet==!!K.testnet);ea&&t.unshift(K);let n=await gN({chains:t,address:el.address,appId:o,rpcConfig:a,includeUsdc:null==(e=u.funding)?void 0:e.isUSDC}),r=ea?n.filter(e=>e.balance>0n):n.filter(e=>e.balance>es),i=ea&&n.every(e=>0n===e.balance);if(r.length<1)return void k(new eb.P(i?"Wallet ".concat(oq(el.address)," doesn't have enough funds to cover gas fees. Top up your wallet and try again."):"Wallet ".concat(oq(el.address)," does not have enough funds."),void 0,eb.h.INSUFFICIENT_BALANCE));r.sort((e,t)=>{var n,r;return Number(ea?(null!=(n=t.erc20Balance)?n:0n)-(null!=(r=e.erc20Balance)?r:0n):t.balance-e.balance)});let s=r.flatMap(e=>{var t;let n=[{...e,isErc20Quote:!1,isTestnet:!!K.testnet,input:he({amount:es.toString(),user:el.address,recipient:et,destinationChainId:K.id,destinationCurrency:en,originChainId:e.chain.id})}];return ea&&en&&(null!=(t=e.erc20Balance)?t:0n)>=es&&n.push({...e,isErc20Quote:!0,isTestnet:!!K.testnet,input:he({amount:es.toString(),user:el.address,recipient:et,destinationChainId:K.id,destinationCurrency:en,originChainId:e.chain.id,originCurrency:e.erc20Address})}),n}),l=(await Promise.allSettled(s.map(async e=>({...e,quote:await hr(e)})))).filter(e=>"fulfilled"===e.status).map(e=>e.value);if(l.length<1)return void k(new eb.P("Wallet ".concat(oq(el.address)," does not have enough funds."),void 0,eb.h.INSUFFICIENT_BALANCE));let c=l.map(e=>({bridgeTx:hi(e.quote),balance:e.balance,chain:e.chain,erc20Balance:e.erc20Balance,isErc20Quote:e.isErc20Quote})).filter(e=>!!e.bridgeTx);if(c.length>1)return void T(c);let d=c[0];d?(O(!0),ew({data:d.bridgeTx.data,to:d.bridgeTx.to,value:d.bridgeTx.value,chain:d.chain})):k(new eb.P("Wallet ".concat(oq(el.address)," does not have enough funds."),void 0,eb.h.INSUFFICIENT_BALANCE))})().catch(console.error)},[x]),ho({transactionHash:z,isTestnet:!!K.testnet,bridgingStatus:H,setBridgingStatus:V,onSuccess(e){var t,n,r,i,a,o;let{transactionHash:s}=e;O(!1),F(!0),l({eventName:pY,payload:{provider:"external",status:"success",txHash:s,address:null==el?void 0:el.address,chainId:ev.chain.id,chainType:"ethereum",value:ev.value?(0,W.formatUnits)(BigInt(ev.value),null!=(t=null==G?void 0:G.decimals)?t:18):void 0,token:null!=(r=null!=(n=null==G?void 0:G.symbol)?n:en)?r:"ETH",destinationAddress:et,destinationChainId:K.id,destinationChainType:"ethereum",destinationValue:es?(0,W.formatUnits)(es,null!=(i=null==G?void 0:G.decimals)?i:18):void 0,destinationToken:null!=(o=null!=(a=null==G?void 0:G.symbol)?a:en)?o:K.nativeCurrency.name}})},onFailure(e){let{error:t}=e;O(!1),k(t)}}),(0,f.useEffect)(()=>{E&&(d({funding:null==u?void 0:u.funding,solanaFundingData:null==u?void 0:u.solanaFundingData,sendTransaction:null==u?void 0:u.sendTransaction,errorMod
1alData:{error:E,previousScreen:mn}}),c(hc,!1))},[E]);let ex=!ea&&ey?cj(null!=er?er:"0",ey):void 0,eC=ea?b:cO([b,es]),eE=eC&&ey?cP(eC,ey):void 0,ek=eC?c$(eC,(null==u||null==(e=u.funding)?void 0:e.erc20Address)?(null==u||null==(n=u.funding)||null==(t=n.erc20ContractInfo)?void 0:t.symbol)||"ETH":(null==u||null==(r=u.funding)?void 0:r.chain.nativeCurrency.symbol)||"ETH"):void 0,eS=b&&ey?cP(b,ey):void 0,eI=b?c$(b,(null==K||null==(i=K.nativeCurrency)?void 0:i.symbol)||"ETH"):void 0;if((0,f.useEffect)(()=>{if(!D)return;let e=setTimeout(s,4e3);return()=>clearTimeout(e)},[D]),D)return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(gi,{}),(0,m.jsx)(cX,{}),(0,m.jsxs)(cY,{children:[(0,m.jsx)(tn,{color:"var(--privy-color-success)",width:"64px",height:"64px"}),(0,m.jsx)(dR,{title:"Success!",description:"You’ve successfully added ".concat(er," ").concat(ea?G.symbol:K.nativeCurrency.symbol," to your ").concat(h.name," wallet. It may take a minute before the funds are available to use.")})]}),(0,m.jsx)(c0,{}),(0,m.jsx)(lj,{})]});let eA=ea?"".concat(p8({amount:eg,decimals:G.decimals}),"  ").concat(G.symbol):c$(ep,K.nativeCurrency.symbol,3,!0),eT=A[_];return A.length>1&&eT?(0,m.jsx)(g5,{displayName:ed,configuredFundingChain:K,erc20ContractInfo:G,formattedBalance:eA,fundingAmount:er,fundingCurrency:ea?G.symbol:K.nativeCurrency.symbol,fundingAmountInUsd:ex,options:A,selectedOption:eT,isPreparing:P,isSubmitting:M,addressToFund:et,fundingWalletAddress:(null==el?void 0:el.address)||"",errorMessage:S,onSubmit:()=>{var e;(null==(e=u.funding)?void 0:e.amount)!==er?(async function(){if(el&&eT)try{let e=await hr({isTestnet:!!K.testnet,input:he({amount:es.toString(),user:el.address,recipient:et,destinationChainId:K.id,destinationCurrency:en,originChainId:eT.chain.id})}),t=hi(e);if(!t)throw Error("Invalid transaction request");O(!0),ew({data:t.data,to:t.to,value:t.value,chain:eT.chain})}catch(e){console.error(e),k(new eb.P("Unable to fetch quotes for bridging",e,eb.h.INSUFFICIENT_BALANCE))}})().catch(console.error):ew({to:eT.bridgeTx.to,data:eT.bridgeTx.data,value:eT.bridgeTx.value,chain:eT.chain})},onSelect:e=>{e!==_&&(I(null),j(e))},onAmountChange:ei}):g&&b&&el&&(null==u?void 0:u.funding)?(0,m.jsx)(g4,{walletClientType:(null==el?void 0:el.walletClientType)||"unknown",displayName:ed,addressToFund:et,isBridging:N,isErc20Flow:ea,totalPriceInUsd:eE,totalPriceInNativeCurrency:ek,gasPriceInUsd:eS,gasPriceInNativeCurrency:eI,chainId:K.id,chainName:K.name}):(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(gi,{}),(0,m.jsx)(l9,{}),(0,m.jsx)("div",{style:{marginTop:"1rem"}}),(0,m.jsx)(lj,{})]})}},g7=Symbol("solana-funding-plugin"),me={component:function(){let e=lt(),{closePrivyModal:t,createAnalyticsEvent:n,connectors:r}=(0,R.u)(),{navigate:i,setModalData:a,data:o}=lc(),s=lt(),l=(0,f.useRef)(!1),c=pp(),[d,u]=(0,f.useState)(!1),[h,p]=(0,f.useState)(!1),[g,y]=(0,f.useState)(null),[b,w]=(0,f.useState)(),[x,C]=(0,f.useState)();if(!(null==o?void 0:o.funding)||"ethereum"!==o.funding.chainType)throw Error("Invalid funding data");let{amount:E,connectedWalletAddress:k,chain:S,solanaChain:I,isUSDC:A}=o.funding,T=o.funding.address,_=o.funding.erc20Address,j=o.funding.isUSDC?"USDC":S.nativeCurrency.symbol,P=(0,f.useMemo)(()=>(function(e){let{connectors:t,connectedWalletAddress:n}=e,r=t.find(e=>"solana"===e.chainType&&e.wallets.some(e=>e.address===n)),i=null==r?void 0:r.wallet.accounts.find(e=>e.address===n);if(!r||!i)throw new eb.P("Unable to find source wallet connector");return new er.ConnectedStandardSolanaWallet({wallet:r.wallet,account:i})})({connectors:r,connectedWalletAddress:k||""}),[r,k]),$=(0,f.useMemo)(()=>{var t;let n=c(g7);if(!n)throw new eb.P("Unable to load solana plugin");let r=e.solanaRpcs["solana:mainnet"];if(!r)throw new eb.P("Unable to load mainnet RPC");return n.getSolanaRpcClient({rpc:r.rpc,rpcSubscriptions:r.rpcSubscriptions,chain:"solana:mainnet",blockExplorerUrl:null!=(t=r.blockExplorerUrl)?t:"https://explorer.solana.com"})},[]),N=sJ(sW((null==P?void 0:P.standardWallet.name)||"unknown")),O=(null==N?void 0:N.name)||"wallet";return(0,f.useEffect)(()=>{(async function(){if(!P||!S||l.current)return;let e=c(g7);if(!e)return void y(new eb.P("Unable to solana plugin"));l.current=!0,(null==S?void 0:S.testnet)&&console.warn("Solana testnets are not supported for bridging");let t=A?1e6*parseFloat(E):(0,X.parseEther)(E),n=await hr({isTestnet:!!S.testnet,input:he({amount:t.toString(),user:P.address,recipient:T,destinationChainId:S.id,originChainId:0x2f3fb341,originCurrency:A?"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v":u9,destinationCurrency:A?_:void 0})}).catch(console.error);if(!n)return void y(new eb.P("Unable to fetch quotes for bridging. Wallet ".concat(oH(P.address)," does not have enough funds."),void 0,eb.h.INSUFFICIENT_BALANCE));let r=await e.createTransactionFromRelayQuote({quote:n,source:P.address,solanaClient:$});if(r)try{u(!0);let t=await e.simulateTransaction({solanaClient:$,tx:r});if(t.hasError)return t.hasFunds?(console.error("Transaction failed:",t.error),void y(new eb.P("Something went wrong",void 0,eb.h.TRANSACTION_FAILURE))):void y(new eb.P("Wallet ".concat(oH(null==P?void 0:P.address)," does not have enough funds. ").concat(n.details.currencyIn.amountFormatted," ").concat(j," are needed to complete the transaction."),void 0,eb.h.INSUFFICIENT_BALANCE));let{signature:i}=await P.signAndSendTransaction({chain:"solana:mainnet",transaction:r}),a=e.getAddressFromBuffer(i);w(a),C("pending")}catch(e){if(console.error(e),/user rejected the request/gi.test(e.message||""))return void y(new eb.P("Transaction was rejected by the user",void 0,eb.h.TRANSACTION_FAILURE));y(new eb.P("Something went wrong",void 0,eb.h.TRANSACTION_FAILURE))}else y(new eb.P("Unable to select bridge option from quotes. Wallet ".concat(oH(P.address)," does not have enough funds."),void 0,eb.h.INSUFFICIENT_BALANCE))})().catch(console.error)},[]),ho({transactionHash:b,isTestnet:!1,bridgingStatus:x,setBridgingStatus:C,onSuccess(e){let{transactionHash:t}=e;u(!1),p(!0),n({eventName:pY,payload:{provider:"external",status:"success",txHash:t,address:P.address,chainType:"solana",clusterName:I,token:"SOL",destinationAddress:T,destinationChainId:S.id,destinationChainType:"ethereum",destinationValue:E,destinationToken:A?"USDC":"ETH"}})},onFailure(e){let{error:t}=e;u(!1),y(t)}}),(0,f.useEffect)(()=>
1{if(!h)return;let e=setTimeout(t,4e3);return()=>clearTimeout(e)},[h]),(0,f.useEffect)(()=>{g&&(a({funding:null==o?void 0:o.funding,solanaFundingData:null==o?void 0:o.solanaFundingData,sendTransaction:null==o?void 0:o.sendTransaction,errorModalData:{error:g,previousScreen:mn}}),i(hc,!1))},[g]),h?(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(gi,{}),(0,m.jsx)(cX,{}),(0,m.jsxs)(cY,{children:[(0,m.jsx)(tn,{color:"var(--privy-color-success)",width:"64px",height:"64px"}),(0,m.jsx)(dR,{title:"Success!",description:"You’ve successfully added ".concat(E," ").concat(j," to your ").concat(s.name," wallet. It may take a minute before the funds are available to use.")})]}),(0,m.jsx)(c0,{}),(0,m.jsx)(lj,{})]}):d&&P?(0,m.jsx)(g4,{walletClientType:sW((null==P?void 0:P.standardWallet.name)||"unknown"),displayName:O,addressToFund:T,isBridging:d,isErc20Flow:!1,chainId:S.id,chainName:S.name,totalPriceInUsd:void 0,totalPriceInNativeCurrency:void 0,gasPriceInUsd:void 0,gasPriceInNativeCurrency:void 0}):(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(gi,{}),(0,m.jsx)(l9,{}),(0,m.jsx)("div",{style:{marginTop:"1rem"}}),(0,m.jsx)(lj,{})]})}},mt={component:()=>{var e;let{data:t,setModalData:n}=lc(),r=null==t?void 0:t.funding,i="solana"===r.chainType,a=(0,f.useRef)(null),{tokenPrice:o}=db(i?"solana":r.chain.id),s=i?void 0:r,l=!(!(null==s?void 0:s.erc20Address)||(null==s?void 0:s.erc20ContractInfo)),c=i?r.isUSDC?"USDC":"SOL":r.erc20Address?null==(e=r.erc20ContractInfo)?void 0:e.symbol:r.chain.nativeCurrency.symbol||"ETH",d=parseFloat(r.amount),u=!isNaN(d)&&d>0,h=o?cj(r.amount,o):void 0;return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(gi,{}),(0,m.jsx)(pR,{children:"Confirm or edit amount"}),(0,m.jsxs)(cZ,{style:{marginTop:"32px"},children:[(0,m.jsx)(gZ,{children:l?(0,m.jsx)(l9,{size:"50px"}):(0,m.jsxs)(m.Fragment,{children:[(0,m.jsxs)(gJ,{onClick:()=>{var e;return null==(e=a.current)?void 0:e.focus()},children:[(0,m.jsx)(gX,{ref:a,value:r.amount,onChange:e=>{let i=e.target.value;/^[0-9.]*$/.test(i)&&i.split(".").length-1<=1&&n({...t,funding:{...r,amount:i},solanaFundingData:(null==t?void 0:t.solanaFundingData)?{...t.solanaFundingData,amount:i}:void 0})}}),(0,m.jsx)(g0,{children:c})]}),!(null==s?void 0:s.erc20Address)&&(0,m.jsx)(g1,{children:h&&u?"".concat(h," USD"):""})]})}),(0,m.jsx)(lW,{style:{marginTop:"1rem"},disabled:!u,onClick:r.onContinueWithExternalWallet,children:"Continue"})]}),(0,m.jsx)(lj,{})]})}},mn={component:()=>{var e,t,n,r;let i,{connectors:a}=(0,R.u)(),{setModalData:o,data:s,navigate:l}=lc(),c=lt(),{wallets:d}=dx(),u=a.filter(sV).flatMap(e=>e.wallets),[h,p]=(0,f.useState)("default"),g="solana"===(null==s||null==(e=s.funding)?void 0:e.chainType),y=!!(null==s||null==(t=s.funding)?void 0:t.crossChainBridgingEnabled);i="ethereum"===(null==s||null==(n=s.funding)?void 0:n.chainType)?s.funding.erc20Address&&!s.funding.isUSDC?"ethereum-only":y&&!s.funding.chain.testnet?"ethereum-and-solana":"ethereum-only":!y||(null==(r=s.funding)?void 0:r.isUSDC)?"solana-only":"ethereum-and-solana";let b=d.filter(e=>"privy"!==e.walletClientType),w=b.map(e=>e.walletClientType),x=u.filter(e=>"privy"!==e.walletClientType),C=x.map(e=>e.walletClientType),E=[],k={...s.funding};k.usingDefaultFundingMethod&&(k.usingDefaultFundingMethod=!1);let S=e=>{let{address:t,walletChainType:n,walletClientType:r}=e;o({...s,funding:{...k,connectedWalletAddress:t,onContinueWithExternalWallet:()=>l(A({destChainType:g?"solana":"ethereum",sourceChainType:n}))},solanaFundingData:(null==s?void 0:s.solanaFundingData)?{...s.solanaFundingData,sourceWalletData:{address:t,walletClientType:r}}:void 0}),l(mt)};"solana-only"!==i&&E.push(...b.map((e,t)=>(0,m.jsx)(mr,{onClick:()=>S({address:e.address,walletChainType:"ethereum",walletClientType:e.walletClientType}),icon:e.meta.icon,name:e.meta.name,chainType:e.type},t))),"ethereum-only"!==i&&E.push(...x.map((e,t)=>(0,m.jsx)(mr,{onClick:()=>S({address:e.address,walletChainType:"solana",walletClientType:e.walletClientType}),icon:e.meta.icon,name:e.meta.name,chainType:e.type},t))),E.push(...g$({walletList:c.appearance.walletList.filter(e=>!b.some(t=>t.walletClientType===e)&&!x.some(t=>t.walletClientType===e)),walletChainType:i,connectors:a,connectOnly:!0,ignore:[...c.appearance.walletList,...w,...C],walletConnectEnabled:c.externalWallets.walletConnect.enabled}));let I=(0,m.jsx)(gd,{text:"More wallets",onClick:()=>p("overflow")}),A=e=>{let{sourceChainType:t,destChainType:n}=e;return"ethereum"===t&&"solana"===n?g8:"ethereum"===t&&"ethereum"===n?g9:"solana"===t&&"ethereum"===n?me:k.externalSolanaFundingScreen};return(0,f.useEffect)(()=>{o({...s,externalConnectWallet:{onCompleteNavigateTo:e=>{let{address:t,walletClientType:n,walletChainType:r}=e;return o({...s,funding:{...k,connectedWalletAddress:t,onContinueWithExternalWallet:()=>{l(A({destChainType:g?"solana":"ethereum",sourceChainType:null!=r?r:"ethereum"}))}},solanaFundingData:(null==s?void 0:s.solanaFundingData)?{...s.solanaFundingData,sourceWalletData:{address:t||"",walletClientType:n||""}}:void 0}),mt}}})},[]),(0,m.jsxs)(m.Fragment,"overflow"===h?{children:[(0,m.jsx)(l1,{backFn:()=>p("default")},"header"),(0,m.jsxs)(lv,{children:[(0,m.jsx)(pM,{style:{color:"var(--privy-color-foreground-3)",textAlign:"left"},children:"More wallets"}),E]}),(0,m.jsx)(lj,{})]}:{children:[(0,m.jsx)(gi,{}),(0,m.jsx)(dR,{title:"Transfer from wallet",description:"Connect a wallet to deposit funds or send funds manually to your wallet address."}),(0,m.jsxs)(lv,{children:[E.length>4?E.slice(0,3):E,E.length>4&&I]}),(0,m.jsx)(lj,{})]})}},mr=e=>{let{onClick:t,icon:n,name:r,chainType:i}=e;return(0,m.jsxs)(lC,{onClick:t,children:[(0,m.jsx)(gY,{style:{width:20},children:(0,m.jsx)("img",{src:n})}),r,(0,m.jsx)(gl,{color:"gray",style:{marginLeft:"auto"},children:"Connected"}),"solana"===i&&(0,m.jsx)(gl,{color:"gray",children:"Solana"})]})},mi={component:()=>{var e;let{data:t,setModalData:n,navigate:r,navigateBack:i}=lc(),{closePrivyModal:a,createAnalyticsEvent:o,client:s}=(0,R.u)(),[l,c]=(0,f.useState)("pending-in-flow"),d=(0,f.useRef)(0),u={...null==t?void 0:t.funding,showAlternateFundingMethod:!0};u.usingDefaultFundingMethod&&(u.usingDefaultFundingMethod=!1);let{partnerUserId:h,popup:p}=null!=(e=null==t?void 0:t.coinbaseOnrampStatus)?e:{};return(0,f.useEffect)(()=>
1{if("pending-in-flow"===l||"pending-after-flow"===l){let e=setInterval(async()=>{if(h)try{let{status:e}=await s.getCoinbaseOnRampStatus({partnerUserId:h});if("success"===e)return void c("success");if("failure"===e)throw Error("There was an error completing Coinbase Onramp flow.");if(d.current>=3)return n({funding:u,solanaFundingData:null==t?void 0:t.solanaFundingData}),void r(mC);(null==p?void 0:p.closed)&&(d.current=d.current+1,c("pending-after-flow"))}catch(e){console.error(e),c("error"),o({eventName:pY,payload:{status:"failure",provider:"coinbase-onramp",error:e.message}}),n({funding:{...u,errorMessage:"Something went wrong adding funds. Please try again or use another method."},solanaFundingData:null==t?void 0:t.solanaFundingData}),r(mC)}},1500);return()=>clearInterval(e)}},[h,p,l]),(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(l1,{title:"Fund account",backFn:()=>{n({funding:u,solanaFundingData:null==t?void 0:t.solanaFundingData}),i()}},"header"),(0,m.jsx)(ma,{status:l,onClickCta:a}),(0,m.jsx)(lj,{})]})}},ma=e=>{let{status:t,onClickCta:n}=e,{title:r,body:i,cta:a}=(0,f.useMemo)(()=>(e=>{switch(e){case"success":return{title:"You've funded your account!",body:"It may take a few minutes for the assets to appear.",cta:"Continue"};case"pending-after-flow":return{title:"In Progress",body:"Almost done. Retrieving transaction status from Coinbase",cta:""};case"error":case"pending-in-flow":return{title:"In Progress",body:"Go back to Coinbase Onramp to finish funding your account.",cta:""}}})(t),[t]);return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsxs)(ml,{children:[(0,m.jsx)(mo,{isSucccess:"success"===t}),(0,m.jsxs)(cJ,{children:[(0,m.jsx)("h3",{children:r}),(0,m.jsx)(ms,{children:i})]})]}),a&&(0,m.jsx)(lz,{onClick:n,children:a})]})},mo=e=>{let{isSucccess:t}=e;if(!t){let e="var(--privy-color-foreground-4)";return(0,m.jsxs)("div",{style:{position:"relative"},children:[(0,m.jsx)(lR,{color:e,style:{position:"absolute"}}),(0,m.jsx)(lL,{color:e}),(0,m.jsx)(st,{style:{position:"absolute",width:"2.8rem",height:"2.8rem",top:"1.2rem",left:"1.2rem"}})]})}let n=t?eW.default:()=>(0,m.jsx)(e8.default,{width:"3rem",height:"3rem",style:{backgroundColor:"var(--privy-color-foreground-4)",color:"var(--privy-color-background)",borderRadius:"100%",padding:"0.5rem",margin:"0.5rem"}}),r=t?"var(--privy-color-success)":"var(--privy-color-foreground-4)";return(0,m.jsx)("div",{style:{borderColor:r,display:"flex",justifyContent:"center",alignItems:"center",borderRadius:"100%",borderWidth:2,padding:"0.5rem",marginBottom:"0.5rem"},children:n&&(0,m.jsx)(n,{width:"4rem",height:"4rem",color:r})})},ms=L.styled.p.withConfig({displayName:"StatusBody",componentId:"sc-8428a551-0"})(["font-size:1rem;color:var(--privy-color-foreground-3);margin-bottom:1rem;display:flex;flex-direction:column;gap:1rem;"]),ml=L.styled.div.withConfig({displayName:"ConnectContainer",componentId:"sc-8428a551-1"})(["display:flex;flex-direction:column;align-items:center;justify-content:center;margin-left:1.75rem;margin-right:1.75rem;padding:2rem 0;"]),mc={[p.mainnet.id]:"ethereum",[s.base.id]:"base",[u.optimism.id]:"optimism",[c.polygon.id]:"polygon",[r.arbitrum.id]:"arbitrum",[a.avalanche.id]:"avacchain"},md=(e,t,n,r,i,a)=>new Promise(async(o,s)=>{let l=dN();if(!l)return void s(Error("Unable to initialize flow"));let c="ethereum"===t.chainType?function(e){let t=mc[e];if(!t)throw new eb.P("Unsupported chainId: ".concat(e," for Coinbase Onramp"));return t}(t.chain.id):"solana",d=t.isUSDC?"USDC":"ethereum"===t.chainType?(0,ef.toCoinbaseAssetId)(t.chain.id,"native-currency"):"SOL",u=await e.initCoinbaseOnRamp({addresses:[{address:t.address,blockchains:[c]}],assets:[d]}),{url:h}=(0,ef.getCoinbaseOnRampUrl)({appId:e.getAppId(),input:u,amount:t.amount,blockchain:c,asset:d,experience:a});l.location=h.toString();let p={...null==i?void 0:i.funding,showAlternateFundingMethod:!0};t.usingDefaultFundingMethod&&(p.usingDefaultFundingMethod=!1),n({funding:p,solanaFundingData:null==i?void 0:i.solanaFundingData,coinbaseOnrampStatus:{popup:l}}),r(mi),e.createAnalyticsEvent({eventName:"sdk_fiat_on_ramp_started",payload:{provider:"coinbase-onramp",value:t.amount,chainType:t.chainType,chainId:"ethereum"===t.chainType?t.chain.id:t.chain}}),setTimeout(()=>{n({funding:p,solanaFundingData:null==i?void 0:i.solanaFundingData,coinbaseOnrampStatus:{partnerUserId:u.partner_user_id,popup:l}})},5e3),o()}),mu="moonpay",mh=e=>{let{size:t=61,...n}=e;return(0,m.jsx)("svg",{width:t,height:t,viewBox:"0 0 61 61",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n,children:(0,m.jsxs)("g",{id:"moonpay_symbol_wht 2",children:[(0,m.jsx)("rect",{x:"1.3374",y:"1",width:"59",height:"59",rx:"11.5",fill:"#7715F5"}),(0,m.jsx)("path",{id:"Vector",d:"M43.8884 23.3258C45.0203 23.3258 46.1268 22.9901 47.068 22.3613C48.0091 21.7324 48.7427 20.8386 49.1759 19.7928C49.6091 18.747 49.7224 17.5962 49.5016 16.4861C49.2807 15.3759 48.7357 14.3561 47.9353 13.5557C47.1349 12.7553 46.1151 12.2102 45.0049 11.9893C43.8947 11.7685 42.7439 11.8819 41.6982 12.3151C40.6524 12.7482 39.7585 13.4818 39.1297 14.423C38.5008 15.3641 38.1651 16.4707 38.1651 17.6026C38.165 18.3542 38.3131 19.0985 38.6007 19.7929C38.8883 20.4873 39.3098 21.1182 39.8413 21.6496C40.3728 22.1811 41.0037 22.6027 41.6981 22.8903C42.3925 23.1778 43.1367 23.3259 43.8884 23.3258ZM26.3395 49.1017C23.5804 49.1017 20.8832 48.2836 18.5891 46.7507C16.295 45.2178 14.5069 43.039 13.4511 40.49C12.3952 37.9409 12.1189 35.1359 12.6572 32.4298C13.1955 29.7237 14.5241 27.238 16.4751 25.287C18.4262 23.336 20.9118 22.0074 23.6179 21.4691C26.324 20.9308 29.129 21.2071 31.6781 22.2629C34.2272 23.3189 36.406 25.1069 37.9389 27.401C39.4717 29.6952 40.2899 32.3923 40.2899 35.1514C40.2899 36.9835 39.9291 38.7975 39.2281 40.49C38.527 42.1826 37.4994 43.7205 36.204 45.0159C34.9086 46.3113 33.3707 47.3389 31.6781 48.04C29.9856 48.741 28.1715 49.1018 26.3395 49.1017Z",fill:"white"})]})})},mp={component:()=>{var e;let{data:t,setModalData:n,navigateBack:r}=lc(),i=lt(),{closePrivyModal:a}=(0,R.u)(),{externalTransactionId:o}=null==t?void 0:t.moonpayStatus,s=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],[n,r]=(0,f.useState)(null),{createAnalyticsEvent:i}=(0,R.u)(),{data:a,navigate:o,setModalData:s}=lc(),l=null==a?void 0:a.funding,c=(0,f.useRef)(0);return(0,f.useEffect)(()=>{let n=setInterval(async()=>{var d,u;if(e)try{let[c]=await async function(e,t){return aW("https://api.moonpay.com/v1/transactions/ext/".concat(e),{query:{apiKey:t?"pk_test_fqWjXZMSFwloh7orvJsRfjiUHXJqFzI":"pk_live_hirbpu0cVcLHrjktC9l7fbc9ctjv0SL"}})}(e,t),u="waitingAuthorization"===c.status&&"credit_debit_card"===c.paymentMethod?"pending":c.status;if(["failed","completed","awaitingAuthorization"].includes(u)&&(i({eventName:pY,payload:{status:u,provider:mu,paymentMethod:c.paymentMethod,cardPaymentType:c.cardPaymentType,currency:null==(d=c.currency)?void 0:d.code,baseCurrencyAmount:c.baseCurrencyAmount,quoteCurrencyAmount:c.quoteCurrencyAmount,feeAmount:c.feeAmount,extraFeeAmount:c.extraFeeAmount,networkFeeAmount:c.networkFeeAmount,isSandbox:t}}),clearInterval(n)),"failed"===u||"serviceFailure"===u)return s({funding:{...l,errorMessage:"Something went wrong adding funds from Moonpay. Please try again or use another method to fund your wallet."},solanaFundingData:null==a?void 0:a.solanaFundingData}),void o(mC);r(u)}catch(e){404!==(null==(u=e.response)?void 0:u.status)&&(c.current+=1),c.current>=3&&(i({eventName:pY,payload:{status:"serviceFailure",provider:mu}}),clearInterval(n),s({funding:{...l,errorMessage:"Something went wrong adding funds from Moonpay. Please try again or use another method to fund your wallet."},solanaFundingData:null==a?void 0:a.solanaFundingData}),o(mC))}},3e3);return()=>clearInterval(n)},[e,c]),n}(o||null,null!=(e=i.fundingMethodConfig.moonpay.useSandbox)&&e);return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(l1,{title:"Fund account",backFn:()=>{let e={...null==t?void 0:t.funding,showAlternateFundingMethod:!0};e.usingDefaultFundingMethod&&(e.usingDefaultFundingMethod=!1),n({funding:e,solanaFundingData:null==t?void 0:t.solanaFundingData}),r()}}),(0,m.jsx)(mf,{status:s,onClickCta:a}),(0,m.jsx)(lj,{})]})}},mf=e=>{let{status:t,onClickCta:n}=e,{title:r,body:i,cta:a}=(0,f.useMemo)(()=>(e=>{switch(e){case"completed":return{title:"You've funded your account!",body:"It may take a few minutes for the assets to appear.",cta:"Continue"};case"waitingAuthorization":return{title:"Processing payment",body:"This may take up to a few hours. You will receive an email when the purchase is complete.",cta:"Continue"};default:return{title:"In Progress",body:"Go back to MoonPay to finish funding your account.",cta:""}}})(t),[t]);return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsxs)(my,{children:[(0,m.jsx)(mg,{status:t}),(0,m.jsxs)(cJ,{children:[(0,m.jsx)("h3",{children:r}),(0,m.jsx)(mm,{children:i})]})]}),a&&(0,m.jsx)(lz,{onClick:n,children:a})]})},mg=e=>{let{status:t}=e;if(!t||"pending"===t){let e="var(--privy-color-foreground-4)";return(0,m.jsxs)("div",{style:{position:"relative"},children:[(0,m.jsx)(lR,{color:e,style:{position:"absolute"}}),(0,m.jsx)(lL,{color:e}),(0,m.jsx)(mh,{size:"3rem",style:{position:"absolute",top:"1rem",left:"1rem"}})]})}let n=(e=>{switch(e){case"completed":return eW.default;case"waitingAuthorization":return()=>(0,m.jsx)(e8.default,{width:"3rem",height:"3rem",style:{backgroundColor:"var(--privy-color-foreground-4)",color:"var(--privy-color-background)",borderRadius:"100%",padding:"0.5rem",margin:"0.5rem"}});default:return}})(t),r=(e=>e?({completed:"var(--privy-color-success)",failed:"var(--privy-color-error)",serviceFailure:"var(--privy-color-error)",waitingAuthorization:"var(--privy-color-accent)",pending:"var(--privy-color-foreground-4)"})[e]:"var(--privy-color-foreground-4)")(t);return(0,m.jsx)("div",{style:{borderColor:r,display:"flex",justifyContent:"center",alignItems:"center",borderRadius:"100%",borderWidth:2,padding:"0.5rem",marginBottom:"0.5rem"},children:n&&(0,m.jsx)(n,{width:"4rem",height:"4rem",color:r})})},mm=L.styled.p.withConfig({displayName:"StatusBody",componentId:"sc-727a5a8d-0"})(["font-size:1rem;color:var(--privy-color-foreground-3);margin-bottom:1rem;display:flex;flex-direction:column;gap:1rem;"]),my=L.styled.div.withConfig({displayName:"ConnectContainer",componentId:"sc-727a5a8d-1"})(["display:flex;flex-direction:column;align-items:center;justify-content:center;margin-left:1.75rem;margin-right:1.75rem;padding:2rem 0;"]),mv=async(e,t,n,r,i,a,o,s)=>{var l;let c=dN();if(!c)throw Error("Unable to initialize flow");let d="ethereum"===t.chainType?(0,eg.chainToMoonpayCurrency)(t.chain.id,r):t.isUSDC?"USDC_SOL":"SOL",{signedUrl:u,externalTransactionId:h}=await e.signMoonpayOnRampUrl({address:t.address,useSandbox:null!=(l=n.fundingMethodConfig.moonpay.useSandbox)&&l,config:{uiConfig:{accentColor:n.appearance.palette.accent,theme:n.appearance.palette.colorScheme},paymentMethod:s,currencyCode:d,quoteCurrencyAmount:parseFloat(t.amount)}});e.createAnalyticsEvent({eventName:"sdk_fiat_on_ramp_started",payload:{provider:"moonpay",value:t.amount,chainType:t.chainType,chainId:"ethereum"===t.chainType?t.chain.id:t.chain}}),c.location=u;let p={...null==o?void 0:o.funding,showAlternateFundingMethod:!0};t.usingDefaultFundingMethod&&(p.usingDefaultFundingMethod=!1),i({moonpayStatus:{},funding:p,solanaFundingData:null==o?void 0:o.solanaFundingData}),a(mp),setTimeout(()=>{i({moonpayStatus:{externalTransactionId:h},funding:p,solanaFundingData:null==o?void 0:o.solanaFundingData})},8e3)},mb=async e=>"undefined"!=typeof window&&"PaymentRequest"in window&&await new window.PaymentRequest([{supportedMethods:e}],{id:"0",total:{label:"Item",amount:{currency:"USD",value:"1.00"}}}).canMakePayment(),mw=()=>mb("https://apple.com/apple-pay"),mx=()=>mb("https://google.com/pay"),mC={component:()=>{var e,t,n,r;let{wallets:i}=dx(),{connectors:a}=(0,R.u)(),o=a.filter(sV).flatMap(e=>e.wallets),{navigate:s,data:l,setModalData:c}=lc(),{client:d}=(0,R.u)(),u=lt(),h=null==l?void 0:l.funding,p=gs(mw),g=gs(mx),y="solana"===h.chainType,b=y?void 0:h,w=(0,f.useMemo)(()=>((e,t,n,r,i,a)=>{var o,s;let l,c,d="solana"===n.chainType,u=d?void 0:n,h=n.isUSDC?"USDC":(null==u?void 0:u.erc20Address)?void 0:"native-currency",p=!!d||h&&(0,eg.isSupportedChainIdForMoonpay)(Number(n.chain.id),h),f=!!d||h&&(0,ef.isSupportedChainIdForCoinbaseOnramp)(Number(n.chain.id),h),g=[];for(let o of(n.preferredCardProvider&&n.supportedOptions.sort(e=>e.provider===n.preferredCardProvider?-1:1),n.supportedOptions))"card"===o.method&&"coinbase"===o.provider&&f&&g.push(()=>md(t,n,r,i,a,"buy")),"card"===o.method&&"moonpay"===o.provider&&p&&h&&g.push(()=>mv(t,n,e,h,r,i,a,"credit_debit_card"));for(let e of n.supportedOptions)"exchange"===e.method&&"coinbase"===e.provider&&f&&(l=()=>md(t,n,r,i,a,"buy"));for(let e of null!=(s=null==a||null==(o=a.funding)?void 0:o.supportedOptions)?s:[])"wallets"===e.method&&(c=()=>i(mn));return{onFundWithCard:g,onFundWithExchange:l,onFundWithWallet:c}})(u,d,h,c,s,l),[u,d,h,l,c,s]),x=y?o.find(e=>{let{address:t}=e;return t===h.address}):i.find(e=>{let{address:t}=e;return(0,H.getAddress)(t)===(0,H.getAddress)(h.address)}),C=sJ((null==x?void 0:x.walletClientType)||"unknown"),E=(null==C?void 0:C.name)||"wallet",k=x&&"privy"!==x.walletClientType?E:u.name,S=(0,f.useMemo)(()=>{var e,t,n,r;return(null==(t=h.uiConfig)||null==(e=t.landing)?void 0:e.title)?null==(r=h.uiConfig)||null==(n=r.landing)?void 0:n.title:"Add funds to your ".concat((null==k?void 0:k.toLowerCase().endsWith("wallet"))?k:k+" wallet")},[null==(t=h.uiConfig)||null==(e=t.landing)?void 0:e.title,k]);(0,f.useEffect)(()=>
1{if((null==h?void 0:h.defaultFundingMethod)&&h.usingDefaultFundingMethod)switch(c({funding:{...h,usingDefaultFundingMethod:!1},solanaFundingData:null==l?void 0:l.solanaFundingData}),null==h?void 0:h.defaultFundingMethod){case"card":w.onFundWithCard[0]&&w.onFundWithCard[0]();break;case"exchange":w.onFundWithExchange&&w.onFundWithExchange();break;case"wallet":w.onFundWithWallet&&w.onFundWithWallet();break;case"manual":s(p1)}},[]),(0,f.useEffect)(()=>{(null==b?void 0:b.erc20Address)&&!b.erc20ContractInfo&&p5({address:b.erc20Address,chain:b.chain,rpcConfig:u.rpcConfig,privyAppId:u.id}).then(e=>{c({...l,funding:{...b,erc20ContractInfo:e?{symbol:e.symbol,decimals:e.decimals}:void 0}})}).catch(console.error)},[null==b?void 0:b.erc20Address,null==b?void 0:b.chain]);let I=!(!(null==b?void 0:b.erc20Address)||(null==b?void 0:b.erc20ContractInfo));return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(gi,{}),(0,m.jsx)("h3",{children:S}),(0,m.jsxs)(gK,{children:[h.errorMessage&&(0,m.jsx)(fy,{theme:u.appearance.palette.colorScheme,children:h.errorMessage}),(null==(n=w.onFundWithCard)?void 0:n[0])&&(0,m.jsxs)(lC,{disabled:I,onClick:w.onFundWithCard[0],children:[(0,m.jsx)(gY,{children:(0,m.jsx)(e4.default,{style:{width:24}})}),"Pay with card",p?(0,m.jsx)(ga,{style:{marginLeft:"auto",maxWidth:"100%",width:"auto",height:"0.875rem"}}):g?(0,m.jsx)(go,{style:{marginLeft:"auto",maxWidth:"100%",width:"auto",height:"0.875rem"}}):null]}),w.onFundWithExchange&&(0,m.jsxs)(lC,{disabled:I,onClick:w.onFundWithExchange,children:[(0,m.jsx)(gY,{children:(0,m.jsx)(e8.default,{style:{width:24}})}),"Transfer from an exchange"]}),w.onFundWithWallet&&(0,m.jsxs)(lC,{disabled:I,onClick:w.onFundWithWallet,children:[(0,m.jsx)(gY,{children:(0,m.jsx)(hY,{style:{width:24}})}),"Transfer from wallet"]}),(0,m.jsxs)(lC,{disabled:I,onClick:()=>s(p1),children:[(0,m.jsx)(gY,{children:(0,m.jsx)(e6.default,{style:{width:24}})}),"Receive funds"]}),(null==h?void 0:h.showAlternateFundingMethod)&&(null==(r=w.onFundWithCard)?void 0:r[1])&&(0,m.jsx)(p$,{theme:u.appearance.palette.colorScheme,children:(0,m.jsxs)(g2,{children:["Having trouble or facing location restrictions?"," ",(0,m.jsx)(g3,{onClick:w.onFundWithCard[1],children:"Try a different provider."})]})})]}),(0,m.jsx)(lj,{})]})}},mE={component:()=>{var e,t,n,r,i,a;let{closePrivyModal:o}=(0,R.u)(),{data:s,navigate:l}=lc(),c=lt(),d=lg(),u=null==s||null==(e=s.externalConnectWallet)?void 0:e.description,h=(0,f.useRef)(null!=(i=null==s||null==(t=s.externalConnectWallet)?void 0:t.walletList)?i:c.appearance.walletList),p=(0,f.useRef)(null!=(a=null==s||null==(n=s.externalConnectWallet)?void 0:n.walletChainType)?a:c.appearance.walletChainType);return(0,m.jsx)(pt,{walletList:h.current,walletChainType:p.current,preSelectedWalletId:null==s||null==(r=s.externalConnectWallet)?void 0:r.preSelectedWalletId,onBack:(null==s?void 0:s.funding)?()=>l(mC):void 0,onClose:()=>{d("connectWallet","onError",eb.h.GENERIC_CONNECT_WALLET_ERROR),o()},onConnect:e=>{var t;let{connector:n,wallet:r}=e;d("connectWallet","onSuccess",{wallet:r});let i=null==s||null==(t=s.externalConnectWallet)?void 0:t.onCompleteNavigateTo;i?l(i({address:r.address,walletClientType:null==n?void 0:n.walletClientType,walletChainType:null==n?void 0:n.chainType})):o()},onConnectError:e=>{e instanceof eb.aa?(console.warn(e.cause?e.cause:e.message),d("connectWallet","onError",e.privyErrorCode||eb.h.GENERIC_CONNECT_WALLET_ERROR)):(console.warn(e),d("connectWallet","onError",eb.h.UNKNOWN_CONNECT_WALLET_ERROR))},customDescription:u,app:c})},isUnauthenticatedScreem:!0},mk=e=>(0,m.jsxs)("svg",{width:"33",height:"32",viewBox:"0 0 33 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,m.jsx)("rect",{x:"0.5",width:"32",height:"32",rx:"4",fill:"#855DCD"}),(0,m.jsxs)("g",{"clip-path":"url(#clip0_1715_1960)",children:[(0,m.jsx)("path",{d:"M4.5 4H28.5V28H4.5V4Z",fill:"#855DCD"}),(0,m.jsx)("path",{d:"M11.1072 8.42105H21.6983V23.5789H20.1437V16.6357H20.1284C19.9566 14.7167 18.3542 13.2129 16.4028 13.2129C14.4514 13.2129 12.849 14.7167 12.6771 16.6357H12.6619V23.5789H11.1072V8.42105Z",fill:"white"}),(0,m.jsx)("path",{d:"M8.28943 10.5725L8.92101 12.7239H9.45542V21.4275C9.1871 21.4275 8.96959 21.6464 8.96959 21.9165V22.5032H8.87242C8.60411 22.5032 8.38659 22.7221 8.38659 22.9922V23.5789H13.8279V22.9922C13.8279 22.7221 13.6104 22.5032 13.3421 22.5032H13.2449V2
11.9165C13.2449 21.6464 13.0274 21.4275 12.7591 21.4275H12.1761V10.5725H8.28943Z",fill:"white"}),(0,m.jsx)("path",{d:"M20.2408 21.4275C19.9725 21.4275 19.755 21.6464 19.755 21.9165V22.5032H19.6579C19.3895 22.5032 19.172 22.7221 19.172 22.9922V23.5789H24.6133V22.9922C24.6133 22.7221 24.3958 22.5032 24.1275 22.5032H24.0303V21.9165C24.0303 21.6464 23.8128 21.4275 23.5445 21.4275V12.7239H24.0789L24.7105 10.5725H20.8238V21.4275H20.2408Z",fill:"white"})]}),(0,m.jsx)("defs",{children:(0,m.jsx)("clipPath",{id:"clip0_1715_1960",children:(0,m.jsx)("rect",{width:"24",height:"24",fill:"white",transform:"translate(4.5 4)"})})})]}),mS=e=>{let[t,n]=(0,f.useState)(!1);return(0,m.jsx)(mI,{color:e.color,href:e.url,target:"_blank",rel:"noreferrer noopener",onClick:()=>{n(!0),setTimeout(()=>n(!1),1500)},justOpened:t,children:e.text})},mI=L.styled.a.withConfig({displayName:"StyledOpenLinkButton",componentId:"sc-4e695c83-0"})(["display:flex;align-items:center;gap:6px;&&{margin:8px 2px;font-size:14px;color:",";font-weight:",";transition:color 350ms ease;:focus,:active{background-color:transparent;border:none;outline:none;box-shadow:none;}:hover{color:",";}:active{color:'var(--privy-color-foreground)';font-weight:medium;}@media (max-width:440px){margin:12px 2px;}}svg{width:14px;height:14px;}"],e=>e.justOpened?"var(--privy-color-foreground)":e.color||"var(--privy-color-foreground-3)",e=>e.justOpened?"medium":"normal",e=>e.justOpened?"var(--privy-color-foreground)":"var(--privy-color-foreground-2)"),mA=L.styled.div.withConfig({displayName:"Container",componentId:"sc-913deead-0"})(["width:100%;"]),mT=L.styled.div.withConfig({displayName:"InputContainer",componentId:"sc-913deead-1"})(["display:flex;align-items:center;justify-content:space-between;gap:0.75rem;padding:0.75rem;height:56px;background:",";border:1px solid var(--privy-color-foreground-4);border-radius:var(--privy-border-radius-md);&:hover{border-color:",";}"],e=>e.$disabled?"var(--privy-color-background-2)":"var(--privy-color-background)",e=>e.$disabled?"var(--privy-color-foreground-4)":"var(--privy-color-foreground-3)"),m_=L.styled.div.withConfig({displayName:"TextContainer",componentId:"sc-913deead-2"})(["flex:1;min-width:0;display:flex;align-items:center;"]),mj=L.styled.span.withConfig({displayName:"Text",componentId:"sc-913deead-3"})(["display:block;font-size:16px;line-height:24px;color:",";overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;word-break:break-all;@media (min-width:441px){font-size:14px;line-height:20px;}"],e=>e.$disabled?"var(--privy-color-foreground-2)":"var(--privy-color-foreground)"),mP=(0,L.styled)(mj).withConfig({displayName:"PlaceholderText",componentId:"sc-913deead-4"})(["color:var(--privy-color-foreground-3);font-style:italic;"]),m$=(0,L.styled)(pL).withConfig({displayName:"TitleLabel",componentId:"sc-913deead-5"})(["margin-bottom:0.5rem;"]),mN=(0,L.styled)(lV).withConfig({displayName:"CopyButton",componentId:"sc-913deead-6"})(["&&{gap:0.375rem;font-size:14px;flex-shrink:0;}"]),mO=e=>{let{value:t,title:n,placeholder:r,className:i,showCopyButton:a=!0,truncate:o,maxLength:s=40,disabled:l=!1}=e,[c,d]=(0,f.useState)(!1),u=o&&t?((e,t,n)=>{if((e=e.startsWith("https://")?e.slice(8):e).length<=n)return e;if("middle"===t){let t=Math.ceil(n/2)-2,r=Math.floor(n/2)-1;return"".concat(e.slice(0,t),"...").concat(e.slice(-r))}return"".concat(e.slice(0,n-3),"...")})(t,o,s):t;return(0,f.useEffect)(()=>{if(c){let e=setTimeout(()=>d(!1),3e3);return()=>clearTimeout(e)}},[c]),(0,m.jsxs)(mA,{className:i,children:[n&&(0,m.jsx)(m$,{children:n}),(0,m.jsxs)(mT,{$disabled:l,children:[(0,m.jsx)(m_,{children:t?(0,m.jsx)(mj,{$disabled:l,title:t,children:u}):(0,m.jsx)(mP,{$disabled:l,children:r||"No value"})}),a&&t&&(0,m.jsx)(mN,{onClick:function(e){e.stopPropagation(),navigator.clipboard.writeText(t).then(()=>d(!0)).catch(console.error)},size:"sm",children:(0,m.jsxs)(m.Fragment,c?{children:["Copied",(0,m.jsx)(w.Check,{size:14})]}:{children:["Copy",(0,m.jsx)(x.Copy,{size:14})]})})]})]})},mM=e=>{let{connectUri:t,loading:n,success:r,errorMessage:i,onBack:a,onClose:o,onOpenFarcaster:s}=e;return(0,m.jsx)(ck,eT.isMobile||n?eT.isIOS?{title:i?i.message:"Sign in with Farcaster",subtitle:i?i.detail:"To sign in with Farcaster, please open the Farcaster app.",icon:mk,iconVariant:"loading",iconLoadingStatus:{success:r,fail:!!i},primaryCta:t&&s?{label:"Open Farcaster app",onClick:s}:void 0,onBack:a,onClose:o,watermark:!0}:{title:i?i.message:"Signing in with Farcaster",subtitle:i?i.detail:"This should only take a moment",icon:mk,iconVariant:"loading",iconLoadingStatus:{success:r,fail:!!i},onBack:a,onClose:o,watermark:!0,children:t&&eT.isMobile&&(0,m.jsx)(mL,{children:(0,m.jsx)(mS,{text:"Take me to Farcaster",url:t,color:"#8a63d2"})})}:{title:"Sign in with Farcaster",subtitle:"Scan with your phone's camera to continue.",onBack:a,onClose:o,watermark:!0,children:(0,m.jsxs)(mD,{children:[(0,m.jsx)(mF,{children:t?(0,m.jsx)(hW,{url:t,size:275,squareLogoElement:mk}):(0,m.jsx)(mz,{children:(0,m.jsx)(lR,{})})}),(0,m.jsxs)(mU,{children:[(0,m.jsx)(mB,{children:"Or copy this link and paste it into a phone browser to open the Farcaster app."}),t&&(0,m.jsx)(mO,{value:t,truncate:"end",maxLength:30,showCopyButton:!0,disabled:!0})]})]})})},mR={component:()=>{let{authenticated:e,logout:t,ready:n,user:r}=(0,g.u)(),{lastScreen:i,navigate:a,navigateBack:o,setModalData:s}=lc(),l=lt(),{getAuthFlow:c,loginWithFarcaster:d,closePrivyModal:u,createAnalyticsEvent:h}=(0,R.u)(),[p,y]=(0,f.useState)(void 0),[b,w]=(0,f.useState)(!1),[x,C]=(0,f.useState)(!1),E=(0,f.useRef)([]),k=c(),S=null==k?void 0:k.meta.connectUri;return(0,f.useEffect)(()=>{let e=Date.now(),t=setInterval(async()=>{let n=await k.pollForReady.execute(),r=Date.now()-e;if(n){clearInterval(t),w(!0);try{await d(),C(!0)}catch(t){var i,o,l,c,u,h,p,f,g,m,b,x,E,S,I,A;let e={retryable:!1,message:"Authentication failed"};if((null==t?void 0:t.privyErrorCode)===eb.h.ALLOWLIST_REJECTED)return void a(pm);if((null==t?void 0:t.privyErrorCode)===eb.h.USER_LIMIT_REACHED)return console.error(new eb.ab(t).toString()),void a(pI);if((null==t?void 0:t.privyErrorCode)===eb.h.USER_DOES_NOT_EXIST)return void a(u1);if((null==t?void 0:t.privyErrorCode)===eb.h.LINKED_TO_ANOTHER_USER)e.detail=null!=(i=t.message)?i:"This account has already been linked to another user.";else{if((null==t?void 0:t.privyErrorCode)===eb.h.ACCOUNT_TRANSFER_REQUIRED&&(null==(l=t.data)||null==(o=l.data)?void 0:o.nonce))return s({accountTransfer:{nonce:null==(u=t.data)||null==(c=u.data)?void 0:c.nonce,account:null==(p=t.data)||null==(h=p.data)?void 0:h.subject,displayName:null==(m=t.data)||null==(g=m.data)||null==(f=g.account)?void 0:f.displayName,linkMethod:"farcaster",embeddedWalletAddress:null==(E=t.data)||null==(x=E.data)||null==(b=x.otherUser)?void 0:b.embeddedWalletAddress,farcasterEmbeddedAddress:null==(A=t.data)||null==(I=A.data)||null==(S=I.otherUser)?void 0:S.farcasterEmbeddedAddress}}),void a(hC);(null==t?void 0:t.privyErrorCode)===eb.h.INVALID_CREDENTIALS?(e.retryable=!0,e.detail="Something went wrong. Try again."):(null==t?void 0:t.privyErrorCode)===eb.h.TOO_MANY_REQUESTS&&(e.detail="Too many requests. Please wait before trying again.")}y(e)}}else r>12e4&&(clearInterval(t),y({retryable:!0,message:"Authentication failed",detail
1:"The request timed out. Try again."}))},2e3);return()=>{clearInterval(t),E.current.forEach(e=>clearTimeout(e))}},[]),(0,f.useEffect)(()=>{if(n&&e&&x&&r){if((null==l?void 0:l.legal.requireUsersAcceptTerms)&&!r.hasAcceptedTerms){let e=setTimeout(()=>{a(hA)},a5);return()=>clearTimeout(e)}x&&(uX(r,l.embeddedWallets)?E.current.push(setTimeout(()=>{s({createWallet:{onSuccess:()=>{},onFailure:e=>{console.error(e),h({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,screen:"FarcasterConnectStatusScreen"}}),t()},callAuthOnSuccessOnClose:!0}}),a(hI)},a5)):E.current.push(setTimeout(()=>u({shouldCallAuthOnSuccess:!0,isSuccess:!0}),a5)))}},[x,n,e,r]),(0,m.jsx)(mM,{connectUri:S,loading:b,success:x,errorMessage:p,onBack:i?o:void 0,onClose:u,onOpenFarcaster:()=>{S&&(window.location.href=S)}})}},mL=L.styled.div.withConfig({displayName:"MobileLinkContainer",componentId:"sc-6e4b180b-0"})(["margin-top:24px;"]),mD=L.styled.div.withConfig({displayName:"ContentContainer",componentId:"sc-6e4b180b-1"})(["display:flex;flex-direction:column;align-items:center;gap:24px;"]),mF=L.styled.div.withConfig({displayName:"QrContainer",componentId:"sc-6e4b180b-2"})(["display:flex;align-items:center;justify-content:center;min-height:275px;"]),mU=L.styled.div.withConfig({displayName:"InstructionsContainer",componentId:"sc-6e4b180b-3"})(["display:flex;flex-direction:column;align-items:center;gap:16px;"]),mB=L.styled.div.withConfig({displayName:"InstructionText",componentId:"sc-6e4b180b-4"})(["font-size:0.875rem;text-align:center;color:var(--privy-color-foreground-2);"]),mz=L.styled.div.withConfig({displayName:"LoaderWrapper",componentId:"sc-6e4b180b-5"})(["position:relative;width:82px;height:82px;"]),mW=()=>{let[e,t]=(0,f.useState)(!1),{currentScreen:n,navigate:r,setModalData:i,data:a}=lc(),{enabled:o,token:s}=o3(),{initLoginWithFarcaster:l}=(0,R.u)(),{accountType:c}=uz();return(0,m.jsxs)(lC,{onClick:async()=>{t(!0);try{var e;o&&!s?(i({captchaModalData:{callback:e=>{var t;return l(e,null==a||null==(t=a.login)?void 0:t.disableSignup)},userIntentRequired:!0,onSuccessNavigateTo:mR,onErrorNavigateTo:hc}}),r(pv)):(await l(s,null==a||null==(e=a.login)?void 0:e.disableSignup),r(mR))}catch(e){i({errorModalData:{error:e,previousScreen:n||yL}}),r(hc)}finally{t(!1)}},disabled:!1,children:[(0,m.jsx)(mk,{width:32,height:32})," Farcaster",e&&(0,m.jsx)(lD,{}),"farcaster"===c&&(0,m.jsx)(mq,{color:"gray",children:"Recent"})]})},mq=(0,L.styled)(gl).withConfig({displayName:"StyledChip",componentId:"sc-c6317ff9-0"})(["margin-left:auto;"]),mH=e=>{let{status:t,passkeySignupFlow:n=!1,error:r,onRetry:i}=e;return(0,m.jsx)(ck,{title:(()=>{switch(t){case"loading":return"Waiting for passkey";case"success":return"Success";case"error":return"Something went wrong"}})(),subtitle:(0,m.jsx)(mG,{children:(()=>{switch(t){case"loading":return n?"Please follow prompts to register your passkey.":"Please follow prompts to verify your passkey.\nYou will have to sign up with another method first to register a passkey for your account.";case"success":return"You've successfully logged in with your passkey.";case"error":if(r instanceof eb.aa){if(r.privyErrorCode===eb.h.CANNOT_LINK_MORE_OF_TYPE)return"Cannot link more passkeys to account.";if(r.privyErrorCode===eb.h.PASSKEY_NOT_ALLOWED)return"Passkey request timed out or rejected by user.\nYou will have to sign up with another method first to register a passkey for your account."}return"An unknown error occurred.\nYou will have to sign up with another method first to register a passkey for your account."}})()}),icon:P.FingerprintIcon,iconVariant:"loading",iconLoadingStatus:{success:"success"===t,fail:"error"===t},primaryCta:"error"===t&&i?{label:"Retry",onClick:i}:"success"===t?{label:"Continue",disabled:!0}:void 0,watermark:!0})},mV={component:()=>{var e;let{data:t,setModalData:n,navigate:r}=lc(),i=lt(),{loginWithPasskey:a,signupWithPasskey:o,closePrivyModal:s,createAnalyticsEvent:l}=(0,R.u)(),{user:c,logout:d}=(0,g.u)(),{passkeySignupFlow:u}=null!=(e=null==t?void 0:t.passkeyAuthModalData)?e:{},[h,p]=(0,f.useState)("loading"),[y,b]=(0,f.useState)(null),w=(0,f.useRef)([]),x=e=>{w.current=[e,...w.current]};(0,f.useEffect)(()=>()=>
1{w.current.forEach(e=>clearTimeout(e)),w.current=[]},[]);let C=async()=>{p("loading");try{u?await o():await a(),p("success")}catch(e){b(e),p("error")}};return(0,f.useEffect)(()=>{if("success"===h&&c){if((null==i?void 0:i.legal.requireUsersAcceptTerms)&&!c.hasAcceptedTerms)return void x(setTimeout(()=>{r(hA)},900));if(!uX(c,null==i?void 0:i.embeddedWallets))return void x(setTimeout(()=>{s({shouldCallAuthOnSuccess:!0,isSuccess:!0})},a5));x(setTimeout(()=>{n({createWallet:{onSuccess:()=>{},onFailure:e=>{console.error(e),l({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,screen:"PasskeyStatusScreen"}}),d()},callAuthOnSuccessOnClose:!0}}),r(hI)},900))}},[c,h]),(0,f.useEffect)(()=>{C()},[]),(0,m.jsx)(mH,{status:h,passkeySignupFlow:u,error:y,onRetry:C})}},mG=L.styled.span.withConfig({displayName:"SubtitleText",componentId:"sc-7ff4a13e-0"})(["white-space:pre-wrap;"]),mK=e=>{let{title:t="Log in or create a new account?",subtitle:n="Create a new account with a passkey or use a passkey to log in to an existing account.",onSignup:r,onLogin:i}=e;return(0,m.jsx)(ck,{title:t,subtitle:n,icon:P.FingerprintIcon,primaryCta:{label:"Create new account",onClick:r},secondaryCta:{label:"Log in with a passkey",onClick:i},watermark:!0})},mY={component:()=>{let{enabled:e,token:t}=o3(),{navigate:n,setModalData:r}=lc(),{initSignupWithPasskey:i,initLoginWithPasskey:a}=(0,R.u)();return(0,m.jsx)(mK,{onSignup:async()=>{e&&!t?(r({passkeyAuthModalData:{passkeySignupFlow:!0},captchaModalData:{callback:e=>i({captchaToken:e,withPrivyUi:!0}),userIntentRequired:!1,onSuccessNavigateTo:mV,onErrorNavigateTo:hc}}),n(pv)):(await i({withPrivyUi:!0,captchaToken:t}),r({passkeyAuthModalData:{passkeySignupFlow:!0}}),n(mV))},onLogin:async()=>{e&&!t?(r({passkeyAuthModalData:{passkeySignupFlow:!1},captchaModalData:{callback:e=>a({captchaToken:e,withPrivyUi:!0}),userIntentRequired:!1,onSuccessNavigateTo:mV,onErrorNavigateTo:hc}}),n(pv)):(await a({withPrivyUi:!0,captchaToken:t}),r({passkeyAuthModalData:{passkeySignupFlow:!1}}),n(mV))}})}},mZ=()=>{let{enabled:e,token:t}=o3(),{navigate:n,setModalData:r,data:i}=lc(),a=lt(),{initLoginWithPasskey:o}=(0,R.u)(),s=()=>{a.loginConfig.passkeysForSignupEnabled?n(mY):(async()=>{e&&!t?(r({passkeyAuthModalData:{passkeySignupFlow:!1},captchaModalData:{callback:e=>o({captchaToken:e,withPrivyUi:!0}),userIntentRequired:!1,onSuccessNavigateTo:mV,onErrorNavigateTo:hc}}),n(pv)):(await o({withPrivyUi:!0,captchaToken:t}),r({passkeyAuthModalData:{passkeySignupFlow:!1}}),n(mV))})()};return 0===(0,f.useMemo)(()=>{var e;let t=null==i||null==(e=i.login)?void 0:e.loginMethods;return t?t.filter(e=>"passkey"!==e).length:Object.entries(a.loginMethods).filter(e=>{let[t,n]=e;return n}).filter(e=>{let[t]=e;return"passkey"!==t}).length},[a.loginMethods,null==i?void 0:i.login])?(0,m.jsxs)(lC,{onClick:s,children:[(0,m.jsx)(aq,{})," Continue with passkey"]}):(0,m.jsx)(uK,{as:"button",onClick:s,size:"sm",variant:"navigation",style:{width:"100%",justifyContent:"center"},children:"I have a passkey"})},mJ=e=>{let{value:t,onChange:n}=e;return(0,m.jsx)("select",{value:t,onChange:n,children:em.countryCodesAndNumbers.map(e=>(0,m.jsxs)("option",{value:e.code,children:[e.code," +",e.callCode]},e.code))})},mQ=(0,f.forwardRef)((e,t)=>{var n;let r=lt(),[i,a]=(0,f.useState)(!1),{accountType:o}=uz(),[s,l]=(0,f.useState)(""),[c,d]=(0,f.useState)(null!=(n=null==r?void 0:r.intl.defaultCountry)?n:"US"),u=(0,em.validatePhoneNumber)(s,c),h=(0,em.phoneNumberTypingFormatter)(c),p=(0,em.getPlaceholderPhoneNumber)(c),g=(0,ey.getCountryCallingCode)(c),y=!u,[b,w]=(0,f.useState)(!1),x=g.length,C=t=>{let n=t.target.value;d(n),l(""),e.onChange&&e.onChange({rawPhoneNumber:s,qualifiedPhoneNumber:(0,em.formatPhoneNumber)(s,n),countryCode:n,isValid:(0,em.validatePhoneNumber)(s,c)})},E=(t,n)=>{try{let r=t.replace(/\D/g,"")===s.replace(/\D/g,"")?t:h.input(t);l(r),e.onChange&&e.onChange({rawPhoneNumber:r,qualifiedPhoneNumber:(0,em.formatPhoneNumber)(t,n),countryCode:n,isValid:(0,em.validatePhoneNumber)(t,n)})}catch(e){console.error("Error processing phone number:",e)}},k=()=>{w(!0);let t=(0,em.formatPhoneNumber)(s,c);
1e.onSubmit({rawPhoneNumber:s,qualifiedPhoneNumber:t,countryCode:c,isValid:(0,em.validatePhoneNumber)(s,c)}).finally(()=>w(!1))};return(0,f.useEffect)(()=>{if(e.defaultValue){let t=(0,em.getPhoneCountryCodeAndNumber)(e.defaultValue);h.reset(),C({target:{value:t.countryCode}}),E(t.phone,t.countryCode)}},[e.defaultValue]),(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(mX,{children:(0,m.jsxs)(m0,{$callingCodeLength:x,$stacked:e.stacked,children:[(0,m.jsx)(mJ,{value:c,onChange:C}),(0,m.jsx)("input",{ref:t,id:"phone-number-input",className:"login-method-button",type:"tel",placeholder:p,onFocus:()=>a(!0),onChange:e=>{E(e.target.value,c)},onKeyUp:e=>{"Enter"===e.key&&k()},value:s,autoComplete:"tel"}),"phone"!==o||i||e.hideRecent?e.stacked||e.noIncludeSubmitButton?(0,m.jsx)("span",{}):(0,m.jsx)(lZ,{isSubmitting:b,onClick:k,disabled:y,children:"Submit"}):(0,m.jsx)(gl,{color:"gray",children:"Recent"})]})}),e.stacked&&!e.noIncludeSubmitButton?(0,m.jsx)(lz,{loading:b,loadingText:null,onClick:k,disabled:y,children:"Submit"}):null]})}),mX=L.styled.div.withConfig({displayName:"InputContainer",componentId:"sc-545daacd-0"})(["width:100%;"]),m0=L.styled.label.withConfig({displayName:"PhoneNumberInput",componentId:"sc-545daacd-1"})(["--country-code-dropdown-width:calc(54px + calc(12 * ","px));--phone-input-extra-padding-left:calc(12px + calc(3 * ","px));display:block;position:relative;width:100%;@media (min-width:441px){--country-code-dropdown-width:calc(52px + calc(10 * ","px));}&& > select{font-size:16px;height:24px;position:absolute;margin:13px calc(var(--country-code-dropdown-width) / 4);line-height:24px;width:var(--country-code-dropdown-width);background-color:var(--privy-color-background);background-size:auto;background-position-x:right;cursor:pointer;@media (min-width:441px){font-size:14px;width:var(--country-code-dropdown-width);}:focus{outline:none;box-shadow:none;}}&& > input{font-size:16px;line-height:24px;color:var(--privy-color-foreground);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;width:calc(100% - var(--country-code-dropdown-width));padding:12px 88px 12px calc(var(--country-code-dropdown-width) + var(--phone-input-extra-padding-left));padding-right:",";flex-grow:1;background:var(--privy-color-background);border:1px solid var(--privy-color-foreground-4);border-radius:var(--privy-border-radius-md);width:100%;:focus{outline:none;border-color:var(--privy-color-accent);}:autofill,:-webkit-autofill{background:var(--privy-color-background);}@media (min-width:441px){font-size:14px;padding-right:78px;}}&& > :last-child{right:16px;position:absolute;top:50%;transform:translate(0,-50%);}&& > button:last-child{right:0px;line-height:24px;padding:13px 17px;:focus{outline:none;border-color:var(--privy-color-accent);}}&& > input::placeholder{color:var(--privy-color-foreground-3);}"],e=>e.$callingCodeLength,e=>e.$callingCodeLength,e=>e.$callingCodeLength,e=>e.$stacked?"16px":"88px"),m1=e=>{let{isEditable:t,setIsEditable:n,defaultValue:r}=e,i=(0,f.useRef)(null),{authenticated:a}=(0,g.u)(),{navigate:o,setModalData:s,currentScreen:l,data:c}=lc(),{initLoginWithSms:d}=(0,R.u)(),{enabled:u,token:h}=o3(),{whatsAppEnabled:p}=lt();return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(lk,{$if:!t,children:(0,m.jsx)(mQ,{ref:i,onSubmit:async function(e){let{qualifiedPhoneNumber:t}=e;if(!u||h||a)try{var n;await d({phoneNumber:t,captchaToken:h,withPrivyUi:!0,disableSignup:null==c||null==(n=c.login)?void 0:n.disableSignup}),o(yC)}catch(e){s({errorModalData:{error:e,previousScreen:l||yL}}),o(hc)}else s({captchaModalData:{callback:e=>{var n;return d({phoneNumber:t,captchaToken:e,withPrivyUi:!0,disableSignup:null==c||null==(n=c.login)?void 0:n.disableSignup})},userIntentRequired:!1,onSuccessNavigateTo:yC,onErrorNavigateTo:hc}}),o(pv)},defaultValue:r})}),(0,m.jsx)(lk,{$if:t,children:(0,m.jsxs)(lC,{onClick:()=>{n(),setTimeout(()=>{var e;null==(e=i.current)||e.focus()},0)},children:[(0,m.jsx)(lE,{children:(0,m.jsx)($.Smartphone,{})}),"Continue with ",p?"WhatsApp":"SMS"]})})]})},m2={apple:{logo:oC,displayName:"Apple"},discord:{logo:oE,displayName:"Discord"},github:{logo:ok,displayName:"GitHub"},google:{logo:oS,displayName:"Google"},linkedin:{logo:oT,displayName:"LinkedIn"},spotify:{logo:o_,displayName:"Spotify"},instagram:{logo:oI,displayName:"Instagram"},twitter:{logo:o$,displayName:"Twitter"},tiktok:{logo:oj,displayName:"TikTok"},line:{logo:oA,displayName:"LINE"},twitch:{logo:oP,displayName:"Twitch"}},m3=e=>{let{provider:t}=e,{enabled:n,token:r}=o3(),{navigate:i,setModalData:a,data:o}=lc(),[s,l]=(0,f.useState)(!1),c=lt(),{initLoginWithOAuth:d}=(0,R.u)(),{accountType:u}=uz(),h=(0,f.useMemo)(()=>u&&"guest"!==u&&"authorization_key"!==u&&"cross_app"!==u?uR(u):null,[u]),{displayName:p,logo:y}=(0,f.useMemo)(()=>
1{if((0,g.i)(t)){let e=c.customOAuthProviders.find(e=>e.provider===t),n=e.provider_icon_url,r=e.provider_display_name;return{displayName:r,logo:e=>{let{style:t}=e;return(0,m.jsx)("img",{alt:"".concat(r," logo"),src:n,style:t})}}}return m2[t]},[t,c.customOAuthProviders]);return(0,m.jsxs)(lC,{onClick:()=>{var e;l(!0),setTimeout(()=>{l(!1)},2e3),n&&!r?(a({captchaModalData:{callback:e=>{var n;return d(t,e,null==o||null==(n=o.login)?void 0:n.disableSignup)},userIntentRequired:!0,onSuccessNavigateTo:null,onErrorNavigateTo:hc}}),i(pv)):d(t,void 0,null==o||null==(e=o.login)?void 0:e.disableSignup)},disabled:s,children:[(0,m.jsx)(lE,{$fullSize:!0,children:(0,m.jsx)(y,{style:{width:"32px",height:"32px"}})}),p,(null==h?void 0:h.loginMethod)===t&&(0,m.jsx)(m5,{color:"gray",children:"Recent"})]})},m5=(0,L.styled)(gl).withConfig({displayName:"StyledChip",componentId:"sc-45a4e2df-0"})(["margin-left:auto;"]);function m4(e){return(0,m.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",...e,children:[(0,m.jsx)("rect",{width:"512",height:"512",rx:"15%",fill:"#37aee2"}),(0,m.jsx)("path",{fill:"#c8daea",d:"M199 404c-11 0-10-4-13-14l-32-105 245-144"}),(0,m.jsx)("path",{fill:"#a9c9dd",d:"M199 404c7 0 11-4 16-8l45-43-56-34"}),(0,m.jsx)("path",{fill:"#f6fbfe",d:"M204 319l135 99c14 9 26 4 30-14l55-258c5-22-9-32-24-25L79 245c-21 8-21 21-4 26l83 26 190-121c9-5 17-3 11 4"})]})}let m6=e=>{let{success:t,errorMessage:n,onRetry:r}=e,i=t?"Successfully connected with Telegram":n?n.message:"Verifying connection to Telegram";return(0,m.jsx)(ck,{title:i,subtitle:t?"You're good to go!":n?n.detail:"Just a few moments more",icon:m4,iconVariant:"loading",iconLoadingStatus:{success:t,fail:!!n},secondaryCta:(null==n?void 0:n.retryable)&&r?{label:"Retry",onClick:r}:void 0,watermark:!0})},m8={component:()=>{let{authenticated:e,logout:t,ready:n,user:r}=(0,g.u)(),{setModalData:i,navigate:a,resetNavigation:o,data:s}=lc(),l=lt(),{initLoginWithTelegram:c,loginWithTelegram:d,updateWallets:u,setReadyToTrue:h,closePrivyModal:p,createAnalyticsEvent:y,getAuthMeta:b}=(0,R.u)(),[w,x]=(0,f.useState)(!1),[C,E]=(0,f.useState)(void 0),k=o3();async function S(){try{let t=await async function(){let t;if(!e){if(k.enabled&&"error"===k.status)throw new o1(k.error,null,eb.h.CAPTCHA_FAILURE);return k.enabled&&"success"!==k.status&&(k.execute(),t=await k.waitForResult()),t}}();await d({captchaToken:t}),x(!0),h(!0)}catch(h){var t,n,r,s,l,c,u,p,f,g,m,y,w,C;if((null==h?void 0:h.privyErrorCode)===eb.h.ALLOWLIST_REJECTED)return E(void 0),o(),void a(pm);if((null==h?void 0:h.privyErrorCode)===eb.h.USER_LIMIT_REACHED)return console.error(new eb.ab(h).toString()),E(void 0),o(),void a(pI);if((null==h?void 0:h.privyErrorCode)===eb.h.USER_DOES_NOT_EXIST)return E(void 0),o(),void a(u1);if((null==h?void 0:h.privyErrorCode)===eb.h.ACCOUNT_TRANSFER_REQUIRED&&(null==(n=h.data)||null==(t=n.data)?void 0:t.nonce))return E(void 0),o(),i({accountTransfer:{nonce:null==(s=h.data)||null==(r=s.data)?void 0:r.nonce,account:null==(c=h.data)||null==(l=c.data)?void 0:l.subject,telegramAuthResult:null==(u=b())?void 0:u.telegramAuthResult,telegramWebAppData:null==(p=b())?void 0:p.telegramWebAppData,displayName:null==(m=h.data)||null==(g=m.data)||null==(f=g.account)?void 0:f.displayName,linkMethod:"telegram",embeddedWalletAddress:null==(C=h.data)||null==(w=C.data)||null==(y=w.otherUser)?void 0:y.embeddedWalletAddress}}),void a(hC);let{retryable:e,detail:d}=o4(h);E({retryable:e,detail:d,message:"Authentication failed"})}}return(0,f.useEffect)(()=>{S()},[]),(0,f.useEffect)(()=>{if(!(n&&e&&w&&r))return;if((null==l?void 0:l.legal.requireUsersAcceptTerms)&&!r.hasAcceptedTerms){let e=setTimeout(()=>{a(hA)},a5);return()=>clearTimeout(e)}if(uX(r,l.embeddedWallets)){let e=setTimeout(()=>{i({createWallet:{onSuccess:()=>{},onFailure:e=>{console.error(e),y({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,provider:"telegram",screen:"TelegramAuthScreen"}}),t()},callAuthOnSuccessOnClose:!0}}),a(hI)},a5);return()=>clearTimeout(e)}u();let o=setTimeout(()=>p({shouldCallAuthOnSuccess:!0,isSuccess:!0}),a5);return()=>clearTimeout(o)},[n,e,w,r]),(0,m.jsx)(m6,{success:w,errorMessage:C,onRetry:(null==C?void 0:C.retryable)?async()=>{try{var e,t;E(void 0),(null==s||null==(e=s.telegramAuthModalData)?void 0:e.seamlessAuth)||await c(void 0,null==s||null==(t=s.login)?void 0:t.disableSignup),await S()}catch(n){let{retryable:e,detail:t}=o4(n);E({retryable:e,detail:t,message:"Authentication failed"})}}:void 0})},isCaptchaRequired:!0},m9=()=>{let{enabled:e,token:t}=o3(),{navigate:n,setModalData:r,data:i}=lc(),[a,o]=(0,f.useState)(!1),{initLoginWithTelegram:s}=(0,R.u)(),{accountType:l}=uz();async function c(e){try{var t;await s(e,null==i||null==(t=i.login)?void 0:t.disableSignup),r({telegramAuthModalData:{seamlessAuth:!1}}),n(m8)}catch(e){console.error(e),o(!1)}}return(0,m.jsxs)(lC,{onClick:async function(){if(o(!0),e&&!t)return r({captchaModalData:{callback:c,userIntentRequired:!0,onSuccessNavigateTo:null,onErrorNavigateTo:hc}}),void n(pv);await c(t)},disabled:a,children:[(0,m.jsx)(m4,{width:32,height:32}),"Telegram","telegram"===l&&(0,m.jsx)(m7,{color:"gray",children:"Recent"})]})},m7=(0,L.styled)(gl).withConfig({displayName:"StyledChip",componentId:"sc-4b233cf1-0"})(["margin-left:auto;"]),ye=e=>{let{onClick:t,text:n,icon:r}=e;return(0,m.jsxs)(lC,{onClick:t,children:[(0,m.jsx)(lE,{children:r}),(0,m.jsx)(lm,{children:n})]})},yt=e=>{var t,n,r;let{connectOnly:i}=e,{closePrivyModal:a}=(0,R.u)(),{data:o,setModalData:s,onUserCloseViaDialogOrKeybindRef:l,navigate:c}=lc(),d=lt(),u=null==o?void 0:o.login,h=d.appearance.walletList,p=null!=(n=null==u?void 0:u.walletChainType)?n:d.appearance.walletChainType,{accountType:y,walletClientType:b,chainType:w}=uz(),{wallets:x}=h9({walletList:h,walletChainType:p}),C=(0,f.useMemo)(()=>y&&"guest"!==y&&"authorization_key"!==y&&"cross_app"!==y?uR(y):null,[y]),{email:E,sms:k,google:S,twitter:I,discord:A,github:T,spotify:_,instagram:j,tiktok:P,line:$,twitch:N,linkedin:O,apple:M,wallet:L,farcaster:D,telegram:F}=null!=(r=(0,f.useMemo)(()=>(null==u?void 0:u.loginMethods)?(0,ev.toObjectKeys)(u.loginMethods,!0):null,[u]))?r:d.loginMethods,U=d.customOAuthProviders,{passkey:B}=d.loginMethods,z=[E&&"email",k&&"sms",S&&"google",I&&"twitter",A&&"discord",T&&"github",_&&"spotify",j&&"instagram",P&&"tiktok",$&&"line",N&&"twitch",O&&"linkedin",M&&"apple",D&&"farcaster",F&&"telegram",...U.map(e=>e.provider)].filter(e=>!!e),W=z.length>0,q=(0,f.useMemo)(()=>L&&!W?"web3-first":L&&(null==d?void 0:d.appearance.loginGroupPriority)||"web2-first",[L,W,null==d?void 0:d.appearance.loginGroupPriority]),H=null==d?void 0:d.appearance.hideDirectWeb2Inputs,[V,G]=(0,f.useState)("default"),[K,Y]=(0,f.useState)(ys({mostRecentlyUsedAccountType:y,smsAvailable:k,emailAvailable:E,prefilledType:null==u||null==(t=u.prefill)?void 0:t.type}));(0,f.useEffect)(()=>{var e;Y(ys({mostRecentlyUsedAccountType:y,smsAvailable:k,emailAvailable:E,prefilledType:null==u||null==(e=u.prefill)?void 0:e.type}))},[E,k,y]);let Z=()=>{a({shouldCallAuthOnSuccess:!0}),setTimeout(()=>{G("default")},150)};l.current=Z;let J=[];b&&L?J.push(b):(null==C?void 0:C.loginMethod)&&z.includes(C.loginMethod)&&J.push(C.loginMethod);let Q=e=>{var t,n;if("email"===e)return(0,m.jsx)(yN,{isEditable:"email"===K,setIsEditable:()=>{Y("email")},defaultValue:"email"===(null==u||null==(t=u.prefill)?void 0:t.type)?u.prefill.value:void 0},e);if("sms"===e)return(0,m.jsx)(m1,{isEditable:"sms"===K,setIsEditable:()=>{Y("sms")},defaultValue:"phone"===(null==u||null==(n=u.prefill)?void 0:n.type)?u.prefill.value:void 0},e);if("apple"===e)return(0,m.jsx)(m3,{provider:"apple"},e);if("discord"===e)return(0,m.jsx)(m3,{provider:"discord"},e);if("farcaster"===e)return(0,m.jsx)(mW,{},e);if("github"===e)return(0,m.jsx)(m3,{provider:"github"},e);if("google"===e)return(0,m.jsx)(m3,{provider:"google"},e);if("linkedin"===e)return(0,m.jsx)(m3,{provider:"linkedin"},e);if("tiktok"===e)return(0,m.jsx)(m3,{provider:"tiktok"},e);if("line"===e)return(0,m.jsx)(m3,{provider:"line"},e);if("twitch"===e)return(0,m.jsx)(m3,{provider:"twitch"},e);if("spotify"===e)return(0,m.jsx)(m3,{provider:"spotify"},e);if("instagram"===e)return(0,m.jsx)(m3,{provider:"instagram"},e);if("twitter"===e)return(0,m.jsx)(m3,{provider:"twitter"},e);if("telegram"===e)return(0,m.jsx)(m9,{},e);if((0,g.i)(e))return(0,m.jsx)(m3,{provider:e},e);let r=x.findIndex(t=>{let{id:n}=t;return n===hJ.normalize(e)}),a="solana"===w?"solana-only":"ethereum-only";
1return(0,m.jsx)(pe,{recent:!0,index:r,data:{wallets:x,walletChainType:a,handleWalletClick(e){s(t=>({...t,externalConnectWallet:{walletList:h,walletChainType:a,preSelectedWalletId:e.id}})),c(i?mE:pP)}}})},X=x.filter(e=>e.id!==hJ.normalize(b||"")),ee=X.map((e,t)=>(0,m.jsx)(pe,{index:t,data:{walletChainType:p,wallets:X,handleWalletClick(e){s(t=>({...t,externalConnectWallet:{walletList:h,walletChainType:p,preSelectedWalletId:e.id}})),c(i?mE:pP)}}},e.id)),et=z.filter(e=>e!==(null==C?void 0:C.loginMethod)).flatMap(Q),en=J.flatMap(Q);"web3-first"===q&&"default"===V?ee.unshift(...en):"web2-first"===q&&et.unshift(...en);let er="web2-overflow"===V?()=>G("default"):void 0,ei=z.filter(e=>"email"!==e&&"sms"!==e),ea=yi({priority:q,email:E,sms:k,social:ei}),eo=ya({priority:q,email:E,sms:k,social:ei}),es=(0,m.jsx)(gd,{text:yo({priority:q}),onClick:()=>{var e;s({...o,externalConnectWallet:{walletChainType:null!=(e=null==u?void 0:u.walletChainType)?e:d.appearance.walletChainType}}),c(i?mE:pP)}}),el=(0,m.jsx)(ye,{text:ea,icon:eo,onClick:()=>G("web2-overflow")}),ec=+!H,ed=L&&ee.length>0,eu=0===et.length&&L&&0===ee.length,eh=5-!!ed,ep="default"===V&&(null==d?void 0:d.appearance.logo),ef="default"===V&&d.appearance.loginMessage;return(0,m.jsxs)(ck,{title:d.appearance.landingHeader,icon:ep?(0,m.jsx)(uW,{}):void 0,iconVariant:ep?"logo":void 0,onClose:Z,showClose:!0,onBack:er,showBack:!!er,helpText:d||B&&"default"===V?(0,m.jsxs)(m.Fragment,{children:[B&&"default"===V&&(0,m.jsx)(mZ,{}),d&&(0,m.jsx)(l_,{app:d})]}):void 0,watermark:!0,children:[ef&&("string"==typeof d.appearance.loginMessage?(0,m.jsx)(yn,{children:d.appearance.loginMessage}):(0,m.jsx)(yr,{children:d.appearance.loginMessage})),(0,m.jsx)(lb,{$colorScheme:d.appearance.palette.colorScheme,children:"default"===V&&"web2-first"===q?(0,m.jsxs)(m.Fragment,{children:[et.length>eh?et.slice(0,eh-1):et,et.length>eh&&el,ed&&es,eu&&(0,m.jsx)(gu,{chainType:d.appearance.walletChainType})]}):"default"===V&&"web3-first"===q?(0,m.jsxs)(m.Fragment,{children:[L&&(0,m.jsxs)(m.Fragment,{children:[ee.length>eh?ee.slice(0,eh-1):ee,ee.length>eh&&es]}),et.length>ec&&el,et.length===ec&&et[0],eu&&(0,m.jsx)(gu,{chainType:d.appearance.walletChainType})]}):"web2-overflow"===V?(0,m.jsx)(m.Fragment,{children:"web3-first"===q?et:et.slice(3)}):null})]})},yn=L.styled.div.withConfig({displayName:"StyledSubtitle",componentId:"sc-b9aad528-0"})(["text-align:center;font-size:14px;margin-bottom:24px;"]),yr=L.styled.div.withConfig({displayName:"MessageContainer",componentId:"sc-b9aad528-1"})(["margin-bottom:24px;"]),yi=e=>{let{priority:t,email:n,sms:r,social:i}=e;return"web2-first"===t?"Other socials":n&&r&&i.length>0||n&&i.length>0?"Log in with email or socials":r&&i.length>0?"Log in with sms or socials":n&&r?"Continue with email or sms":n?"Continue with email":r?"Continue with sms":"Log in with a social account"},ya=e=>{let{priority:t,email:n,sms:r,social:i}=e;return"web2-first"===t||i.length>0?(0,m.jsx)(N.UserCircle,{}):n&&r?(0,m.jsx)(pc,{}):n?(0,m.jsx)(O.Mail,{}):r?(0,m.jsx)($.Smartphone,{}):null},yo=e=>{let{priority:t}=e;return"web2-first"===t?"Continue with a wallet":"Other wallets"},ys=e=>{let{mostRecentlyUsedAccountType:t,smsAvailable:n,emailAvailable:r,prefilledType:i}=e;return r&&("email"===t&&"phone"!==i||"email"===i)||!n||"phone"!==t&&"phone"!==i?"email":"sms"},yl={component:()=>{let e=lt();return e.loginMethodsAndOrder&&e.loginMethodsAndOrder.primary.length>0?(0,m.jsx)(yO,{connectOnly:!0}):(0,m.jsx)(yt,{connectOnly:!0})}},yc=e=>{let{contactMethod:t,authFlow:n,appName:r="Privy",whatsAppEnabled:i=!1,onBack:a,onCodeSubmit:o,onResend:s,errorMessage:l,success:c=!1,resendCountdown:d=0,onInvalidInput:u,onClearError:h}=e,[p,g]=(0,f.useState)(yu);(0,f.useEffect)(()=>{l||g(yu)},[l]);let y=async e=>{var t;e.preventDefault();let n=e.currentTarget.value.replace(" ","");if(""===n)return;if(isNaN(Number(n)))return void(null==u||u("Code should be numeric"));null==h||h();let r=Number(null==(t=e.currentTarget.name)?void 0:t.charAt(5)),i=[...n||[""]].slice(0,yd-r),a=[...p.slice(0,r),...i,...p.slice(r+i.length)];g(a);let s=Math.min(Math.max(r+i.length,0),yd-1);if(!isNaN(Number(e.currentTarget.value))){let e=document.querySelector("input[name=code-".concat(s,"]"));null==e||e.focus()}
1if(a.every(e=>e&&!isNaN(+e))){let e=document.querySelector("input[name=code-".concat(s,"]"));null==e||e.blur(),await (null==o?void 0:o(a.join("")))}};return(0,m.jsx)(ck,{title:"Enter confirmation code",subtitle:(0,m.jsxs)("span","email"===n?{children:["Please check ",(0,m.jsx)(yT,{children:t})," for an email from privy.io and enter your code below."]}:{children:["Please check ",(0,m.jsx)(yT,{children:t})," for a",i?" WhatsApp":""," message from ",r," and enter your code below."]}),icon:"email"===n?eI.default:eA.default,onBack:a,showBack:!0,helpText:(0,m.jsxs)(yI,{children:[(0,m.jsxs)("span",{children:["Didn't get ","email"===n?"an email":"a message","?"]}),d?(0,m.jsxs)(yA,{children:[(0,m.jsx)(eS.default,{color:"var(--privy-color-foreground)",strokeWidth:1.33,height:"12px",width:"12px"}),(0,m.jsx)("span",{children:"Code sent"})]}):(0,m.jsx)(uK,{as:"button",size:"sm",onClick:s,children:"Resend code"})]}),children:(0,m.jsx)(yE,{children:(0,m.jsx)(cG,{children:(0,m.jsxs)(yk,{children:[(0,m.jsx)("div",{children:p.map((e,t)=>(0,m.jsx)("input",{name:"code-".concat(t),type:"text",value:p[t],onChange:y,onKeyUp:e=>{"Backspace"===e.key&&(e=>{if(null==h||h(),g([...p.slice(0,e),"",...p.slice(e+1)]),e>0){let t=document.querySelector("input[name=code-".concat(e-1,"]"));null==t||t.focus()}})(t)},inputMode:"numeric",autoFocus:0===t,pattern:"[0-9]",className:"".concat(c?"success":""," ").concat(l?"fail":""),autoComplete:eT.isMobile?"one-time-code":"off"},t))}),(0,m.jsx)(yS,{$fail:!!l,$success:c,children:(0,m.jsx)("span",{children:"Invalid or expired verification code"===l?"Incorrect code":l||(c?"Success!":"")})})]})})})})},yd=6,yu=Array(6).fill("");var yh,yp,yf,yg,ym,yy,yv,yb,yw=((yv=yw||{})[yv.RESET_AFTER_DELAY=0]="RESET_AFTER_DELAY",yv[yv.CLEAR_ON_NEXT_VALID_INPUT=1]="CLEAR_ON_NEXT_VALID_INPUT",yv),yx=((yb=yx||{})[yb.EMAIL=0]="EMAIL",yb[yb.SMS=1]="SMS",yb);let yC={component:()=>{var e,t,n;let{navigate:r,lastScreen:i,navigateBack:a,setModalData:o,onUserCloseViaDialogOrKeybindRef:s}=lc(),l=lt(),{closePrivyModal:c,resendEmailCode:d,resendSmsCode:u,getAuthMeta:h,loginWithCode:p,updateWallets:y,createAnalyticsEvent:b}=(0,R.u)(),{authenticated:w,logout:x,user:C}=(0,g.u)(),{whatsAppEnabled:E}=lt(),[k,S]=(0,f.useState)(!1),[I,A]=(0,f.useState)(null),[T,_]=(0,f.useState)(null),[j,P]=(0,f.useState)(0);s.current=()=>null;let $=+(null==(e=h())||!e.email),N=0===$?(null==(t=h())?void 0:t.email)||"":(null==(n=h())?void 0:n.phoneNumber)||"";return(0,f.useEffect)(()=>{if(j){let e=setTimeout(()=>{P(j-1)},1e3);return()=>clearTimeout(e)}},[j]),(0,f.useEffect)(()=>{if(w&&k&&C){if((null==l?void 0:l.legal.requireUsersAcceptTerms)&&!C.hasAcceptedTerms){let e=setTimeout(()=>{r(hA)},900);return()=>clearTimeout(e)}if(uX(C,l.embeddedWallets)){let e=setTimeout(()=>{o({createWallet:{onSuccess:()=>{},onFailure:e=>{console.error(e),b({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,screen:"AwaitingPasswordlessCodeScreen"}}),x()},callAuthOnSuccessOnClose:!0}}),r(hI)},900);return()=>clearTimeout(e)}{y();let e=setTimeout(()=>c({shouldCallAuthOnSuccess:!0,isSuccess:!0}),a5);return()=>clearTimeout(e)}}},[w,k,C]),(0,f.useEffect)(()=>{if(I&&0===T){let e=setTimeout(()=>{A(null),_(null);let e=document.querySelector("input[name=code-0]");null==e||e.focus()},1400);return()=>clearTimeout(e)}},[I,T]),(0,m.jsx)(yc,{contactMethod:N,authFlow:0===$?"email":"sms",appName:null==l?void 0:l.name,whatsAppEnabled:E,onBack:()=>a(),onCodeSubmit:async e=>{try{await p(e),S(!0)}catch(e){if(e instanceof eb.G&&e.privyErrorCode===eb.h.INVALID_CREDENTIALS)A("Invalid or expired verification code"),_(0);else if(e instanceof eb.G&&e.privyErrorCode===eb.h.CANNOT_LINK_MORE_OF_TYPE)A(e.message);else{var t,n,a,s,l,c,d,u,h,f;if(e instanceof eb.G&&e.privyErrorCode===eb.h.USER_LIMIT_REACHED)return console.error(new eb.ab(e).toString()),void r(pI);if(e instanceof eb.G&&e.privyErrorCode===eb.h.USER_DOES_NOT_EXIST)return void r(u1);if(e instanceof eb.G&&e.privyErrorCode===eb.h.LINKED_TO_ANOTHER_USER)return o({errorModalData:{error:e,previousScreen:null!=i?i:yC}}),void r(hc,!1);if(e instanceof eb.G&&e.privyErrorCode===eb.h.DISALLOWED_PLUS_EMAIL)return o({inlineError:{error:e}}),void r(yl,!1);if(e instanceof eb.G&&e.privyErrorCode===eb.h.ACCOUNT_TRANSFER_REQUIRED&&(null==(n=e.data)||null==(t=n.data)?void 0:t.nonce))return o({accountTransfer:{nonce:null==(s=e.data)||null==(a=s.data)?void 0:a.nonce,account:N,displayName:null==(d=e.data)||null==(c=d.data)||null==(l=c.account)?void 0:l.displayName,linkMethod:0===$?"email":"sms",embeddedWalletAddress:null==(f=e.data)||null==(h=f.data)||null==(u=h.otherUser)?void 0:u.embeddedWalletAddress}}),void r(hC);A("Issue verifying code"),_(0)}}},onResend:async()=>{P(30),0===$?await d():await u()},errorMessage:I||void 0,success:k,resendCountdown:j,onInvalidInput:e=>{A(e),_(1)},onClearError:()=>{1===T&&(A(null),_(null))}})}},yE=L.styled.div.withConfig({displayName:"PasswordlessCodeContainer",componentId:"sc-63a7dae3-0"})(["display:flex;flex-direction:column;align-items:center;justify-content:center;margin:auto;gap:16px;flex-grow:1;width:100%;"]),yk=L.styled.div.withConfig({displayName:"CodeInput",componentId:"sc-63a7dae3-1"})(["display:flex;flex-direction:column;width:100%;gap:12px;> div:first-child{display:flex;justify-content:center;gap:0.5rem;width:100%;border-radius:var(--privy-border-radius-sm);> input{border:1px solid var(--privy-color-foreground-4);background:var(--privy-color-background);border-radius:var(--privy-border-radius-sm);padding:8px 10px;height:48px;width:40px;text-align:center;font-size:18px;font-weight:600;color:var(--privy-color-foreground);transition:all 0.2s ease;}> input:focus{border:1px solid var(--privy-color-foreground);box-shadow:0 0 0 1px var(--privy-color-foreground);}> input:invalid{border:1px solid var(--privy-color-error);}> input.success{border:1px solid var(--privy-color-border-success);background:var(--privy-color-success-bg);}> input.fail{border:1px solid var(--privy-color-border-error);background:var(--privy-color-error-bg);animation:shake 180ms;animation-iteration-count:2;}}@keyframes shake{0%{transform:translate(1px,0px);}33%{transform:translate(-1px,0px);}67%{transform:translate(-1px,0px);}100%{transform:translate(1px,0px);}}"]),yS=L.styled.div.withConfig({displayName:"InputHelp",componentId:"sc-63a7dae3-2"})(["line-height:20px;min-height:20px;font-size:14px;font-weight:400;color:",";display:flex;justify-content:center;width:100%;text-align:center;"],e=>e.$success?"var(--privy-color-success-dark)":e.$fail?"var(--privy-color-error-dark)":"transparent"),yI=L.styled.div.withConfig({displayName:"HelpTextContainer",componentId:"sc-63a7dae3-3"})(["display:flex;gap:8px;align-items:center;justify-content:center;width:100%;color:var(--privy-color-foreground-2);"]),yA=L.styled.div.withConfig({displayName:"Badge",componentId:"sc-63a7dae3-4"})(["display:flex;align-items:center;justify-content:center;border-radius:var(--privy-border-radius-sm);padding:2px 8px;gap:4px;background:var(--privy-color-background-2);color:var(--privy-color-foreground-2);"]),yT=L.styled.span.withConfig({displayName:"BoldWrappingSpan",componentId:"sc-63a7dae3-5"})(["font-weight:500;word-break:break-all;color:var(--privy-color-foreground);"]),y_=(0,f.forwardRef)((e,t)=>
1{let[n,r]=(0,f.useState)(e.defaultValue||""),[i,a]=(0,f.useState)(""),[o,s]=(0,f.useState)(!1),{authenticated:l}=(0,g.u)(),{initLoginWithEmail:c}=(0,R.u)(),{navigate:d,setModalData:u,currentScreen:h,data:p}=lc(),{enabled:y,token:b}=o3(),[w,x]=(0,f.useState)(!1),{accountType:C}=uz(),E=lt();(0,f.useEffect)(()=>{var e,t;!n&&E.disablePlusEmails&&(null==p||null==(e=p.inlineError)?void 0:e.error)instanceof eb.aa&&(null==p||null==(t=p.inlineError)?void 0:t.error.privyErrorCode)===eb.h.DISALLOWED_PLUS_EMAIL&&!i&&a("Please enter a valid email address without a '+'."),i&&a("")},[n]);let k=oW(n),S=o||!k,I=()=>{u({login:null==p?void 0:p.login,inlineError:void 0}),!y||b||l?(e=>{var t;s(!0),c({email:n,captchaToken:e,disableSignup:null==p||null==(t=p.login)?void 0:t.disableSignup,withPrivyUi:!0}).then(()=>{d(yC)}).catch(e=>{u({errorModalData:{error:e,previousScreen:h||yL}}),d(hc)}).finally(()=>{s(!1)})})(b):(u({captchaModalData:{callback:e=>c({email:n,captchaToken:e,withPrivyUi:!0}),userIntentRequired:!1,onSuccessNavigateTo:yC,onErrorNavigateTo:hc}}),d(pv))};return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsxs)(yj,{children:[i&&(0,m.jsx)(hq,{style:{display:"block",marginTop:"0.25rem",textAlign:"left"},children:i}),(0,m.jsxs)(yP,{stacked:e.stacked,$error:!!i,children:[(0,m.jsx)(y$,{children:(0,m.jsx)(O.Mail,{})}),(0,m.jsx)("input",{ref:t,id:"email-input",className:"login-method-button",type:"email",placeholder:"[email protected]",onFocus:()=>x(!0),onChange:e=>r(e.target.value),onKeyUp:e=>{"Enter"===e.key&&I()},value:n,autoComplete:"email"}),"email"!==C||w?e.stacked?(0,m.jsx)("span",{}):(0,m.jsx)(lZ,{isSubmitting:o,onClick:I,disabled:S,children:"Submit"}):(0,m.jsx)(gl,{color:"gray",children:"Recent"})]})]}),e.stacked?(0,m.jsx)(lz,{loadingText:null,loading:o,disabled:S,onClick:I,style:{width:"100%"},children:"Submit"}):null]})}),yj=hK,yP=hG,y$=(0,L.styled)(lE).withConfig({displayName:"StyledLoginMethodIconWrapper",componentId:"sc-e33d938a-0"})(["display:inline-flex;"]),yN=e=>{let{isEditable:t,setIsEditable:n,defaultValue:r}=e,i=(0,f.useRef)(null);return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(lk,{$if:!t,children:(0,m.jsx)(y_,{ref:i,defaultValue:r})}),(0,m.jsx)(lk,{$if:t,children:(0,m.jsxs)(lC,{onClick:()=>{n(),setTimeout(()=>{var e;null==(e=i.current)||e.focus()},0)},children:[(0,m.jsx)(lE,{children:(0,m.jsx)(O.Mail,{})}),"Continue with Email"]})})]})},yO=e=>{var t,n,r,i,a;let{connectOnly:o}=e,{closePrivyModal:s,connectors:l}=(0,R.u)(),{onUserCloseViaDialogOrKeybindRef:c,data:d}=lc(),u=lt(),{appearance:{palette:{colorScheme:h}}}=lt(),{accountType:p,walletClientType:g,chainType:y}=uz(),b=(0,f.useMemo)(()=>p&&"guest"!==p&&"authorization_key"!==p&&"cross_app"!==p?uR(p):null,[p]),w=null!=(i=null==(t=u.loginMethodsAndOrder)?void 0:t.primary)?i:[],x=null!=(a=null==(n=u.loginMethodsAndOrder)?void 0:n.overflow)?a:[],C=(0,f.useMemo)(()=>[...w,...x],[w,x]),E=u.loginMethods.passkey,k=null==d?void 0:d.login,S=[];g&&C.includes(g)?S.push(g):p&&C.includes(null==b?void 0:b.loginMethod)&&S.push(null==b?void 0:b.loginMethod);let[I,A]=(0,f.useState)("default"),[T,_]=(0,f.useState)(ys({mostRecentlyUsedAccountType:p,smsAvailable:C.includes("sms"),emailAvailable:C.includes("email"),prefilledType:null==k||null==(r=k.prefill)?void 0:r.type}));(0,f.useEffect)(()=>{var e;_(ys({mostRecentlyUsedAccountType:p,smsAvailable:C.includes("sms"),emailAvailable:C.includes("email"),prefilledType:null==k||null==(e=k.prefill)?void 0:e.type}))},[C,p]),(0,f.useEffect)(()=>{"phone"===p&&_("sms");let e=C.indexOf("sms"),t=C.indexOf("email");e>-1&&e<t&&_("sms")},[p,w,x]);let j=()=>{s({shouldCallAuthOnSuccess:!0}),setTimeout(()=>{A("default")},150)};c.current=j;let P=e=>{var t,n,r;return"email"===e?(0,m.jsx)(yN,{isEditable:"email"===T,setIsEditable:()=>{_("email")},defaultValue:"email"===(null==k||null==(t=k.prefill)?void 0:t.type)?k.prefill.value:void 0},e):"sms"===e?(0,m.jsx)(m1,{isEditable:"sms"===T,setIsEditable:()=>{_("sms")},defaultValue:"phone"===(null==k||null==(n=k.prefill)?void 0:n.type)?k.prefill.value:void 0},e):"apple"===e?(0,m.jsx)(m3,{provider:"apple"},e):"discord"===e?(0,m.jsx)(m3,{provider:"discord"},e):"farcaster"===e?(0,m.jsx)(mW,{},e):"github"===e?(0,m.jsx)(m3,{provider:"github"},e):"google"===e?(0,m.jsx)(m3,{provider:"google"},e):"linkedin"===e?(0,m.jsx)(m3,{provider:"linkedin"},e):"spotify"===e?(0,m.jsx)(m3,{provider:"spotify"},e):"instagram"===e?(0,m.jsx)(m3,{provider:"instagram"},e):"tiktok"===e?(0,m.jsx)(m3,{provider:"tiktok"},e):"line"===e?(0,m.jsx)(m3,{provider:"line"},e):"twitch"===e?(0,m.jsx)(m3,{provider:"twitch"},e):"twitter"===e?(0,m.jsx)(m3,{provider:"twitter"},e):"telegram"===e?(0,m.jsx)(m9,{},e):e.startsWith("privy:")?(0,m.jsx)(uV,{appId:e.replace("privy:","")},e):g$({walletList:u.appearance.walletList,walletChainType:null!=(r=null==k?void 0:k.walletChainType)?r:u.appearance.walletChainType,connectors:l,connectOnly:o,ignore:C,walletConnectEnabled:u.externalWallets.walletConnect.enabled,forceWallet:{wallet:e,chainType:null!=y?y:"ethereum"}})},$=S.flatMap(P),N=w.filter(e=>e!==g&&e!==(null==b?void 0:b.loginMethod)).flatMap(P),O=x.filter(e=>e!==g&&e!==(null==b?void 0:b.loginMethod)).flatMap(P),[M,L]=((e,t)=>{let n=[],r=[];for(let[i,a]of e.entries())i<t?n.push(a):r.push(a);return[n,r]})([...$,...N,...O],yM({primary:N.length+$.length,overflow:O.length}));return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(l1,{title:u.appearance.landingHeader,onClose:j,backFn:"default"===I?void 0:()=>{A("default")}}),"default"===I&&(0,m.jsx)(yR,{}),"default"===I&&("string"==typeof u.appearance.loginMessage?(0,m.jsx)(lx,{children:u.appearance.loginMessage}):u.appearance.loginMessage),(0,m.jsx)(ly,{style:{overflow:"hidden"},children:(0,m.jsxs)(lb,{$colorScheme:h,children:["default"===I&&(0,m.jsxs)(m.Fragment,{children:[M,L.length>0&&(0,m.jsx)(ye,{text:"More options",icon:(0,m.jsx)(ex.default,{}),onClick:()=>A("overflow")})]}),"overflow"===I&&(0,m.jsx)(m.Fragment,{children:L}),E&&"default"===I&&(0,m.jsx)(mZ,{})]})}),u&&(0,m.jsx)(l_,{app:u}),(0,m.jsx)(lj,{})]})},yM=e=>{let{primary:t,overflow:n}=e;return t<5?t:5===t&&0===n?5:4},yR=(0,L.styled)(e=>{let t=lt();return(null==t?void 0:t.appearance.logo)?(0,m.jsx)(uq,{...e,children:(0,m.jsx)(uW,{})}):null}).withConfig({displayName:"StyledAppLogoHeader",componentId:"sc-7cdadd41-0"})(["margin-bottom:16px;"]),yL={component:()=>{let e=lt();return e.loginMethodsAndOrder&&e.loginMethodsAndOrder.primary.length>0?(0,m.jsx)(yO,{connectOnly:!1}):(0,m.jsx)(yt,{connectOnly:!1})},isCaptchaRequired:!0,isUnauthenticatedScreem:!0},yD={component:()=>{let[e,t]=(0,f.useState)(null),[n,r]=(0,f.useState)(!1),[i,a]=(0,f.useState)(null),[o,s]=(0,f.useState)(""),{authenticated:l,user:c}=(0,g.u)(),{client:d,walletProxy:u,refreshSessionAndUser:h,closePrivyModal:p,createAnalyticsEvent:y}=(0,R.u)(),{navigate:b,data:w,onUserCloseViaDialogOrKeybindRef:x}=lc(),C=lt(),{onSuccess:E,onFailure:k}=w.setWalletPassword,S=(0,g.a)(c),I="user-passcode"===(null==e?void 0:e.recoveryMethod),A="user-passcode"===(null==S?void 0:S.recoveryMethod);(0,f.useEffect)(()=>{l||(b(yL),k(new eb.aj("User must be authenticated before setting a password on a Privy wallet")))},[l]);let T=()=>(i?k(i):I?E(e):k(new eb.ai("Exited before password was added to wallet")),void p({shouldCallAuthOnSuccess:!1}));return x.current=T,(0,m.jsx)(uO,{appName:(null==C?void 0:C.name)||"privy",config:{initiatedBy:"user",onCancel:T},error:i?"An error has occurred, please try again.":void 0,buttonLoading:n,buttonHideAnimations:!1,password:o,isResettingPassword:A,onPasswordGenerate:()=>s(uI()),onPasswordChange:s,onSubmit:async()=>{I?(E(e),p({shouldCallAuthOnSuccess:!1})):(r(!0),a(null),await (async()=>{let e=await d.getAccessToken();if(e&&c&&(null==S?void 0:S.address)&&o&&u)try{y({eventName:"embedded_wallet_set_recovery_started",payload:{walletAddress:S.address,existingRecoveryMethod:S.recoveryMethod,targetRecoveryMethod:"user-passcode",isResettingPassword:A}});let{entropyId:n,entropyIdVerifier:r}=se(c);if(!(await u.setRecovery({accessToken:e,entropyId:n,entropyIdVerifier:r,recoveryPassword:o,recoveryMethod:"user-passcode"})).entropyId)return a(new eb.ai("Error setting password on privy wallet")),void y({eventName:"embedded_wallet_set_recovery_failed",payload:{walletAddress:S.address,existingRecoveryMethod:S.recoveryMethod,targetRecoveryMethod:"user-passcode",isResettingPassword:A,reason:"error setting password"}});let i=await h(),s=(0,g.a)(i);if(!s)return a(new eb.ai("Error setting password on privy wallet")),void y({eventName:"embedded_wallet_set_recovery_failed",payload:{walletAddress:S.address,existingRecoveryMethod:S.recoveryMethod,targetRecoveryMethod:"user-passcode",isResettingPassword:A,reason:"wallet disconnected"}});t(s),y({eventName:"embedded_wallet_set_recovery_completed",payload:{walletAddress:S.address,existingRecoveryMethod:S.recoveryMethod,targetRecoveryMethod:"user-passcode",isResettingPassword:A}})}catch(e){console.warn(e),a(e instanceof Error?e:Error("Error setting password on privy wallet")),y({eventName:"embedded_wallet_set_password_failed",payload:{walletAddress:S.address,reason:e}})}})(),r(!1))},onClose:T})}},yF=e=>{let{onClose:t,onProceed:n}=e;return(0,m.jsx)(ck,{title:"Secure Your Account",subtitle:(0,m.jsxs)(m.Fragment,{children:["Please set a password to secure your account.",(0,m.jsx)("br",{}),"Losing access to this password and this device will make your account inaccessible."]}),icon:k.Lock,primaryCta:{label:"Add password",onClick:n},onClose:t,watermark:!0})},yU={component:()=>{let{closePrivyModal:e}=(0,R.u)(),{data:t,navigate:n,onUserCloseViaDialogOrKeybindRef:r}=lc(),{onFailure:i}=t.setWalletPassword,a=()=>{i(new eb.ai("Exited before password was added to wallet")),e({shouldCallAuthOnSuccess:!1})};return r.current=a,(0,m.jsx)(yF,{onClose:a,onProceed:()=>{n(yD)}})}},yB={component:()=>{let[e,t]=(0,f.useState)(!0),{authenticated:n,user:r}=(0,g.u)(),{walletProxy:i,closePrivyModal:a,createAnalyticsEvent:o,client:s}=(0,R.u)(),{navigate:l,data:c,onUserCloseViaDialogOrKeybindRef:d}=lc(),[u,h]=(0,f.useState)(void 0),[p,y]=(0,f.useState)(""),[b,w]=(0,f.useState)(!1),{entropyId:x,entropyIdVerifier:C,onCompleteNavigateTo:E,onSuccess:k,onFailure:S}=c.recoverWallet,I=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"User exited before their wallet could be recovered";a({shouldCallAuthOnSuccess:!1}),S("string"==typeof e?new eb.ai(e):e)};return d.current=I,(0,f.useEffect)(()=>
1{if(!n)return I("User must be authenticated and have a Privy wallet before it can be recovered")},[n]),(0,m.jsxs)(cy,{children:[(0,m.jsx)(cy.Header,{icon:eK.default,title:"Enter your password",subtitle:"Please provision your account on this new device. To continue, enter your recovery password.",showClose:!0,onClose:I}),(0,m.jsx)(cy.Body,{children:(0,m.jsx)(yz,{children:(0,m.jsxs)("div",{children:[(0,m.jsxs)(ue,{children:[(0,m.jsx)(d9,{type:e?"password":"text",onChange:e=>(e=>{e&&h(e)})(e.target.value),disabled:b,style:{paddingRight:"2.3rem"}}),(0,m.jsx)(ua,{style:{right:"0.75rem"},children:e?(0,m.jsx)(us,{onClick:()=>t(!1)}):(0,m.jsx)(ul,{onClick:()=>t(!0)})})]}),!!p&&(0,m.jsx)(yW,{children:p})]})})}),(0,m.jsxs)(cy.Footer,{children:[(0,m.jsx)(cy.HelpText,{children:(0,m.jsxs)(cQ,{children:[(0,m.jsx)("h4",{children:"Why is this necessary?"}),(0,m.jsx)("p",{children:"You previously set a password for this wallet. This helps ensure only you can access it"})]})}),(0,m.jsx)(cy.Actions,{children:(0,m.jsx)(yq,{loading:b||!i,disabled:!u,onClick:async()=>{w(!0);let e=await s.getAccessToken(),t=(0,g.f)(r,x);if(!e||!t||null===u)return I("User must be authenticated and have a Privy wallet before it can be recovered");try{o({eventName:"embedded_wallet_recovery_started",payload:{walletAddress:t.address}}),await (null==i?void 0:i.recover({accessToken:e,entropyId:x,entropyIdVerifier:C,recoveryPassword:u})),y(""),E?l(E):a({shouldCallAuthOnSuccess:!1}),null==k||k(t),o({eventName:"embedded_wallet_recovery_completed",payload:{walletAddress:t.address}})}catch(e){!function(e){return dI(e)&&("invalid_recovery_pin"===e.type||"invalid_request_arguments"===e.type)}(e)?y("An error has occurred, please try again."):y("Invalid recovery password, please try again.")}finally{w(!1)}},$hideAnimations:!x&&b,children:"Recover your account"})}),(0,m.jsx)(cy.Watermark,{})]})]})}},yz=L.styled.div.withConfig({displayName:"Content",componentId:"sc-f366413c-0"})(["display:flex;flex-direction:column;gap:1.5rem;"]),yW=L.styled.div.withConfig({displayName:"ErrorMessage",componentId:"sc-f366413c-1"})(["line-height:20px;height:20px;font-size:13px;color:var(--privy-color-error);text-align:left;margin-top:0.5rem;"]),yq=(0,L.styled)(lz).withConfig({displayName:"NoAnimationPrimaryButton",componentId:"sc-f366413c-2"})(["",""],e=>{let{$hideAnimations:t}=e;return t&&(0,L.css)(["&&{transition:none;}"])}),yH={component:()=>{let{navigate:e,data:t,onUserCloseViaDialogOrKeybindRef:n}=lc(),r=lt(),[i,a]=(0,f.useState)(""),[o,s]=(0,f.useState)(!1),[l,c]=(0,f.useState)(),[d,u]=(0,f.useState)(null),{create:h}=dV(),{authenticated:p,user:y}=(0,g.u)(),{closePrivyModal:b,isNewUserThisSession:w,initializeWalletProxy:x}=(0,R.u)(),{onSuccess:C,onFailure:E,callAuthOnSuccessOnClose:k,shouldCreateEth:S,shouldCreateSol:I}=t.createWallet,[A,T]=(0,f.useState)(null),_=new a1(async()=>{try{let t;if(S&&I)t=await h({recoveryMethod:"user-passcode",recoveryPassword:l,chainType:"ethereum",walletIndex:0,latestUser:y}),t=await h({chainType:"solana",walletIndex:0,latestUser:t.user});else if(I)t=await h({recoveryMethod:"user-passcode",recoveryPassword:l,chainType:"solana",walletIndex:0,latestUser:y});else{if(!S)throw Error("Invalid args to create wallet");t=await h({recoveryMethod:"user-passcode",recoveryPassword:l,chainType:"ethereum",walletIndex:0,latestUser:y})}T(t),w?e(dK):(C(t),b({shouldCallAuthOnSuccess:k}))}catch(e){a(e.message)}});return(0,f.useEffect)(()=>{d||x(3e4).then(e=>u(e))},[d]),(0,f.useEffect)(()=>{if(!p||!y)return e(yL),void E(Error("User must be authenticated before creating a Privy wallet"))},[p]),n.current=()=>null,(0,m.jsx)(uO,{config:{initiatedBy:"automatic"},appName:(null==r?void 0:r.name)||"privy",loading:!d,buttonLoading:o,buttonHideAnimations:!A&&o,isResettingPassword:!1,error:i,password:l||"",onClose:()=>{A&&"user-passcode"!==A.account.recoveryMethod?(E(new eb.ai("User created a wallet but failed to set a password for it")),b({shouldCallAuthOnSuccess:!1})):A?(C(A),b({shouldCallAuthOnSuccess:k})):(E(new eb.ai("User wallet creation failed")),b({shouldCallAuthOnSuccess:!1}))},onPasswordChange:c,onPasswordGenerate:()=>c(uI()),onSubmit:async()=>(s(!0),_.execute().then(()=>new Promise(e=>setTimeout(e,250))).finally(()=>s(!1)))})}},yV=L.styled.div.withConfig({displayName:"WithCircleBorder",componentId:"sc-e4fc5563-0"})(["&&{border-width:4px;}display:flex;justify-content:center;align-items:center;padding:1rem;aspect-ratio:1;border-style:solid;border-color:",";border-radius:50%;"],e=>{var t;return null!=(t=e.$color)?t:"var(--privy-color-accent)"}),yG={component:()=>{var e;let{user:t}=(0,g.u)(),{client:n,walletProxy:r,refreshSessionAndUser:i,closePrivyModal:a}=(0,R.u)(),o=lc(),{entropyId:s,entropyIdVerifier:l}=null==(e=o.data)?void 0:e.recoverWallet,[c,d]=(0,f.useState)(!1),[u,h]=(0,f.useState)(null),[p,y]=(0,f.useState)(null);function b(){if(!c){var e,t,n,r;if(p)return null==(t=o.data)||null==(e=t.setWalletPassword)||e.onFailure(p),void a();if(!u)return null==(r=o.data)||null==(n=r.setWalletPassword)||n.onFailure(Error("User exited set recovery flow")),void a()}}return o.onUserCloseViaDialogOrKeybindRef.current=b,(0,m.jsxs)(m.Fragment,p?{children:[(0,m.jsx)(l1,{onClose:b},"header"),(0,m.jsx)(yV,{$color:"var(--privy-color-error)",style:{alignSelf:"center"},children:(0,m.jsx)(e_.default,{height:38,width:38,stroke:"var(--privy-color-error)"})}),(0,m.jsx)(pR,{style:{marginTop:"0.5rem"},children:"Something went wrong"}),(0,m.jsx)(lm,{style:{minHeight:"2rem"}}),(0,m.jsx)(lW,{onClick:()=>y(null),children:"Try again"}),(0,m.jsx)(lj,{})]}:{children:[(0,m.jsx)(l1,{onClose:b},"header"),(0,m.jsx)(eR.default,{style:{width:"3rem",height:"3rem",alignSelf:"center"}}),(0,m.jsx)(pR,{style:{marginTop:"0.5rem"},children:"Automatically secure your account"}),(0,m.jsx)(pM,{style:{marginTop:"1rem"}
1,children:"When you log into a new device, you’ll only need to authenticate to access your account. Never get logged out if you forget your password."}),(0,m.jsx)(lm,{style:{minHeight:"2rem"}}),(0,m.jsx)(lW,{loading:c,disabled:!(!c&&!u),onClick:()=>(async function(){d(!0);try{let e=await n.getAccessToken(),c=(0,g.f)(t,s);if(!e||!r||!c)return;if(!(await r.setRecovery({accessToken:e,entropyId:s,entropyIdVerifier:l,existingRecoveryMethod:c.recoveryMethod,recoveryMethod:"privy"})).entropyId)throw Error("Unable to set recovery on wallet");let d=await i();if(!d)throw Error("Unable to set recovery on wallet");let u=(0,g.f)(d,c.address);if(!u)throw Error("Unabled to set recovery on wallet");h(!!d),setTimeout(()=>{var e,t;null==(t=o.data)||null==(e=t.setWalletPassword)||e.onSuccess(u),a()},a5)}catch(e){y(e)}finally{d(!1)}})(),children:u?"Success":"Confirm"}),(0,m.jsx)(lj,{})]})}};function yK(e){let{isCreatingWallet:t,skipSplashScreen:n}=e;return t?yH:n?yD:yU}function yY(e){let{walletAction:t,availableRecoveryMethods:n,legacySetWalletPasswordFlow:r,isResettingPassword:i,showAutomaticRecovery:a}=e;return a?yG:r||1===n.length?yK({isCreatingWallet:"create"===t,skipSplashScreen:i}):d2}function yZ(e){switch(e){case"user-passcode":return yB;case"google-drive":case"icloud":return dQ;default:throw Error("Recovery method not supported")}}let yJ=e=>{let{address:t,accessToken:n,appConfigTheme:r,onClose:i,isLoading:a=!1,exportButtonProps:o}=e;return(0,m.jsx)(ck,{title:"Export wallet",subtitle:(0,m.jsxs)(m.Fragment,{children:["Copy either your private key or seed phrase to export your wallet."," ",(0,m.jsx)("a",{href:"https://privy-io.notion.site/Transferring-your-account-9dab9e16c6034a7ab1ff7fa479b02828",target:"blank",rel:"noopener noreferrer",children:"Learn more"})]}),onClose:i,watermark:!0,children:(0,m.jsxs)(yQ,{children:[(0,m.jsx)(fw,{theme:r,children:"Never share your private key or seed phrase with anyone."}),(0,m.jsx)(pG,{title:"Your wallet",address:t,showCopyButton:!0}),(0,m.jsx)("div",{style:{width:"100%"},children:a?(0,m.jsx)(yX,{}):n&&o&&(0,m.jsx)(y2,{accessToken:n,dimensions:{height:"44px"},...o})})]})})},yQ=L.styled.div.withConfig({displayName:"ContentContainer",componentId:"sc-39a41d8e-0"})(["display:flex;flex-direction:column;gap:1.25rem;text-align:left;"]),yX=()=>(0,m.jsx)(y0,{children:(0,m.jsx)(y1,{children:"Loading..."})}),y0=L.styled.div.withConfig({displayName:"PlaceholderContainer",componentId:"sc-39a41d8e-1"})(["display:flex;gap:12px;height:44px;"]),y1=L.styled.div.withConfig({displayName:"PlaceholderButton",componentId:"sc-39a41d8e-2"})(["display:flex;align-items:center;justify-content:center;width:100%;height:100%;font-size:16px;font-weight:500;border-radius:var(--privy-border-radius-md);background-color:var(--privy-color-background-2);color:var(--privy-color-foreground-3);"]);function y2(e){let[t,n]=(0,f.useState)(e.dimensions.width),[r,i]=(0,f.useState)(void 0),a=(0,f.useRef)(null);(0,f.useEffect)(()=>{if(a.current&&void 0===t){let{width:e}=a.current.getBoundingClientRect();n(e)}let e=getComputedStyle(document.documentElement);i({background:e.getPropertyValue("--privy-color-background"),background2:e.getPropertyValue("--privy-color-background-2"),foreground3:e.getPropertyValue("--privy-color-foreground-3"),foregroundAccent:e.getPropertyValue("--privy-color-foreground-accent"),accent:e.getPropertyValue("--privy-color-accent"),accentDark:e.getPropertyValue("--privy-color-accent-dark"),success:e.getPropertyValue("--privy-color-success"),colorScheme:e.getPropertyValue("color-scheme")})},[]);let o="ethereum"===e.chainType&&!e.imported&&!e.isUnifiedWallet;return(0,m.jsx)("div",{ref:a,children:t&&(0,m.jsxs)(y5,{children:[(0,m.jsx)("iframe",{style:{position:"absolute",zIndex:1},width:t,height:e.dimensions.height,allow:"clipboard-write self *",src:(0,D.constructURL)({origin:e.origin,path:"/apps/".concat(e.appId,"/embedded-wallets/export"),query:e.isUnifiedWallet?{v:"1-unified",wallet_id:e.walletId,client_id:e.appClientId,width:"".concat(t,"px"),caid:e.clientAnalyticsId,phrase_export:o,...r}:{v:"1",entropy_id:e.entropyId,entropy_id_verifier:e.entropyIdVerifier,hd_wallet_index:e.hdWalletIndex,chain_type:e.chainType,client_id:e.appClientId,width:"".concat(t,"px"),caid:e.clientAnalyticsId,phrase_export:o,...r},hash:{token:e.accessToken}})}),(0,m.jsx)(y4,{children:"Loading..."}),o&&(0,m.jsx)(y4,{children:"Loading..."})]})})}let y3={component:()=>{let[e,t]=(0,f.useState)(null),{authenticated:n,user:r}=(0,g.u)(),{closePrivyModal:i,createAnalyticsEvent:a,clientAnalyticsId:o,client:s}=(0,R.u)(),l=lt(),{data:c,onUserCloseViaDialogOrKeybindRef:d}=lc(),{onFailure:u,onSuccess:h,origin:p,appId:y,appClientId:b,entropyId:w,entropyIdVerifier:x,walletId:C,hdWalletIndex:E,chainType:k,address:S,isUnifiedWallet:I,imported:A}=c.keyExport,T=e=>{i({shouldCallAuthOnSuccess:!1}),u("string"==typeof e?Error(e):e)},_=()=>{i({shouldCallAuthOnSuccess:!1}),h(),a({eventName:"embedded_wallet_key_export_completed",payload:{walletAddress:S}})};return(0,f.useEffect)(()=>
1{if(!n)return T("User must be authenticated before exporting their wallet");s.getAccessToken().then(t).catch(T)},[n,r]),d.current=_,(0,m.jsx)(yJ,{address:S,accessToken:e,appConfigTheme:l.appearance.palette.colorScheme,onClose:_,isLoading:!e,exportButtonProps:e?{origin:p,appId:y,appClientId:b,clientAnalyticsId:o,entropyId:w,entropyIdVerifier:x,walletId:C,hdWalletIndex:E,isUnifiedWallet:I,imported:A,chainType:k}:void 0})}},y5=L.styled.div.withConfig({displayName:"ButtonContainer",componentId:"sc-39a41d8e-3"})(["overflow:visible;position:relative;overflow:none;height:44px;display:flex;gap:12px;"]),y4=L.styled.div.withConfig({displayName:"LoadingButton",componentId:"sc-39a41d8e-4"})(["display:flex;align-items:center;justify-content:center;width:100%;height:100%;font-size:16px;font-weight:500;border-radius:var(--privy-border-radius-md);background-color:var(--privy-color-background-2);color:var(--privy-color-foreground-3);"]),y6=e=>{let{connectionFailed:t,onClose:n}=e;return(0,m.jsx)(ck,t?{title:"Something went wrong",subtitle:"We're on it. Please try again later.",icon:S.XCircle,iconVariant:"error",primaryCta:{label:"Close",onClick:n},watermark:!0}:{title:"Connecting to your wallet",subtitle:"Please wait...",iconVariant:"loading",showClose:!0,onClose:n,watermark:!1})},y8={component:()=>{let{authenticated:e,user:t}=(0,g.u)(),{client:n,closePrivyModal:r,createAnalyticsEvent:i,walletProxy:a}=(0,R.u)(),{navigate:o,data:s,setModalData:l,onUserCloseViaDialogOrKeybindRef:c}=lc(),d=(0,f.useMemo)(()=>Date.now(),[]),[u,h]=(0,f.useState)(!1),{onCompleteNavigateTo:p,onFailure:y,shouldForceMFA:b,entropyId:w,entropyIdVerifier:x,recoveryMethod:C,connectingWalletAddress:E,isUnifiedWallet:k=!1}=null==s?void 0:s.connectWallet,S=e=>{u||(h(!0),y("string"==typeof e?Error(e):e))};return(0,f.useEffect)(()=>{let t;return e?a?((async()=>{let e=await n.getAccessToken();if(!e)return S("User must be authenticated and have a Privy wallet before it can be connected");try{k||await a.connect({accessToken:e,entropyId:w,entropyIdVerifier:x}),b&&await a.verifyMfa({accessToken:e});let n=(Date.now()-d)/1e3;p===y3&&n<1?t=setTimeout(()=>{o(p,!1)},1e3*(1-n)):o(p,!1)}catch(e){if(dA(e)&&"privy"===C){let e=await n.getAccessToken();if(!e)return S("User must be authenticated and have a Privy wallet before it can be recovered");try{i({eventName:"embedded_wallet_pinless_recovery_started",payload:{walletAddress:E}});let t=await (null==a?void 0:a.recover({accessToken:e,entropyId:w,entropyIdVerifier:x}));(null==t?void 0:t.entropyId)||S(Error("Unable to recover wallet")),p?o(p):r({shouldCallAuthOnSuccess:!1}),i({eventName:"embedded_wallet_recovery_completed",payload:{walletAddress:E}}),o(p)}catch(e){S("An error has occurred, please try again.")}}else dA(e)&&"privy"!==C&&"privy-v2"!==C?(l({...s,recoverWallet:{entropyId:w,entropyIdVerifier:x,onCompleteNavigateTo:p,onFailure:y},recoveryOAuthStatus:{provider:C,action:"recover",isInAccountCreateFlow:!1,shouldCreateEth:!1,shouldCreateSol:!1}}),o(yZ(C))):S(e)}})(),()=>clearTimeout(t)):void 0:S("User must be authenticated and have a Privy wallet before it can be connected")},[e,t,a]),c.current=()=>{S("User exited before wallet could be connected"),r({shouldCallAuthOnSuccess:!1})},(0,m.jsx)(y6,{connectionFailed:u,onClose:()=>r({shouldCallAuthOnSuccess:!1})})}},y9=e=>{let{style:t,color:n,...r}=e;return(0,m.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:n||"currentColor",style:{height:"1.5rem",width:"1.5rem",...t},...r,children:(0,m.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 12.75l6 6 9-13.5"})})},y7=e=>{let[t,n]=(0,f.useState)(!1);return(0,m.jsxs)(ve,{color:e.color,onClick:()=>{n(!0),navigator.clipboard.writeText(e.text),setTimeout(()=>n(!1),1500)},$justCopied:t,children:[t?(0,m.jsx)(y9,{style:{height:"14px",width:"14px"},strokeWidth:"2"}):(0,m.jsx)(hj,{style:{height:"14px",width:"14px"}}),t?"Copied":"Copy"," ",e.itemName?e.itemName:"to Clipboard"]})},ve=L.styled.button.withConfig({displayName:"StyledCopytoClipboardButton",componentId:"sc-46f4187f-0"})(["display:flex;align-items:center;gap:6px;&&{margin:8px 2px;font-size:14px;color:",";font-weight:",";transition:color 350ms ease;:focus,:active{background-color:transparent;border:none;outline:none;box-shadow:none;}:hover{color:",";}:active{color:'var(--privy-color-foreground)';font-weight:medium;}@media (max-width:440px){margin:12px 2px;}}svg{width:14px;
1height:14px;}"],e=>e.$justCopied?"var(--privy-color-foreground)":e.color||"var(--privy-color-foreground-3)",e=>e.$justCopied?"medium":"normal",e=>e.$justCopied?"var(--privy-color-foreground)":"var(--privy-color-foreground-2)"),vt=L.styled.img.withConfig({displayName:"StyledLogo",componentId:"sc-68c1b1ea-0"})(["&&{height:",";width:",";border-radius:16px;margin-bottom:12px;}"],e=>"sm"===e.size?"65px":"140px",e=>"sm"===e.size?"65px":"140px"),vn=e=>{let{types:t,primaryType:n,...r}=e.typedData;return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(vs,{data:r}),(0,m.jsx)(y7,{text:JSON.stringify(e.typedData,null,2),itemName:"full payload to clipboard"})," "]})},vr=e=>{let{method:t,messageData:n,copy:r,iconUrl:i,isLoading:a,success:o,walletProxyIsLoading:s,errorMessage:l,isCancellable:c,onSign:d,onCancel:u,onClose:h}=e;return(0,m.jsx)(ck,{title:r.title,subtitle:r.description,showClose:!0,onClose:h,icon:M.Edit,iconVariant:"subtle",helpText:l?(0,m.jsx)(vo,{children:l}):void 0,primaryCta:{label:r.buttonText,onClick:d,disabled:a||o||s,loading:a},secondaryCta:c?{label:"Not now",onClick:u,disabled:a||o||s}:void 0,watermark:!0,children:(0,m.jsxs)(cJ,{children:[i?(0,m.jsx)(vt,{style:{alignSelf:"center"},size:"sm",src:i,alt:"app image"}):null,(0,m.jsxs)(va,{children:["personal_sign"===t&&(0,m.jsx)(vl,{children:(e=>{if(!(0,q.isHex)(e))return e;try{let t=(0,et.hexToString)(e);return t.includes("�")?e:t}catch(t){return e}})(n)}),"eth_signTypedData_v4"===t&&(0,m.jsx)(vn,{typedData:n}),"solana_signMessage"===t&&(0,m.jsx)(vl,{children:(e=>{try{let t=F.base64.decode(e),n=(new TextDecoder).decode(t);return n.includes("�")?e:n}catch(t){return e}})(n)})]})]})})},vi={component:()=>{let{authenticated:e}=(0,g.u)(),{initializeWalletProxy:t,closePrivyModal:n}=(0,R.u)(),{navigate:r,data:i,onUserCloseViaDialogOrKeybindRef:a}=lc(),[o,s]=(0,f.useState)(!0),[l,c]=(0,f.useState)(""),[d,u]=(0,f.useState)(),[h,p]=(0,f.useState)(null),[y,b]=(0,f.useState)(!1);(0,f.useEffect)(()=>{e||r(yL)},[e]),(0,f.useEffect)(()=>{t(3e4).then(e=>{s(!1),e||(c("An error has occurred, please try again."),u(new ss(new so(l,en.ProviderErrors.E32603_DEFAULT_INTERNAL_ERROR.eipCode))))})},[]);let{method:w,data:x,confirmAndSign:C,onSuccess:E,onFailure:k,uiOptions:S}=i.signMessage,I={title:(null==S?void 0:S.title)||"Sign message",description:(null==S?void 0:S.description)||"Signing this message will not cost you any fees.",buttonText:(null==S?void 0:S.buttonText)||"Sign and continue"},A=e=>{e?E(e):k(d||new ss(new so("The user rejected the request.",en.ProviderErrors.E4001_USER_REJECTED_REQUEST.eipCode))),n({shouldCallAuthOnSuccess:!1}),setTimeout(()=>{p(null),c(""),u(void 0)},200)};return a.current=()=>{A(h)},(0,m.jsx)(vr,{method:w,messageData:x,copy:I,iconUrl:(null==S?void 0:S.iconUrl)&&"string"==typeof S.iconUrl?S.iconUrl:void 0,isLoading:y,success:null!==h,walletProxyIsLoading:o,errorMessage:l,isCancellable:null==S?void 0:S.isCancellable,onSign:async()=>{b(!0),c("");try{let e=await C();p(e),b(!1),setTimeout(()=>{A(e)},a5)}catch(e){console.error(e),c("An error has occurred, please try again."),u(new ss(new so(l,en.ProviderErrors.E32603_DEFAULT_INTERNAL_ERROR.eipCode))),b(!1)}},onCancel:()=>A(null),onClose:()=>A(h)})}},va=L.styled.div.withConfig({displayName:"MessageContainer",componentId:"sc-e01d451f-0"})(["flex:1;display:flex;flex-direction:column;gap:16px;"]),vo=L.styled.p.withConfig({displayName:"ErrorText",componentId:"sc-e01d451f-1"})(["&&{margin:0;width:100%;text-align:center;color:var(--privy-color-error-dark);font-size:14px;line-height:22px;}"]),vs=(0,L.styled)(ft).withConfig({displayName:"StyledDisplayJsonTree",componentId:"sc-e01d451f-2"})(["margin-top:0;"]),vl=(0,L.styled)(p7).withConfig({displayName:"StyledMessage",componentId:"sc-e01d451f-3"})(["margin-top:0;"]);function vc(e){return["ethereum","solana"].includes(e.chainType)}function vd(e){let t=e.replace("eip155:","");if(t)return parseInt(t);throw Error("Chain ID not compatible with CAIP-2 format.")}let vu=e=>e.filter(e=>"wallets"===e.method||("exchange"===e.method?"coinbase"===e.provider:"card"===e.method||"payment-request"===e.method?"coinbase"===e.provider||"moonpay"===e.provider:(e.method,!1))),vh={[p.mainnet.id]:"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",[h.sepolia.id]:"0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238",[u.optimism.id]:"0x0b2c639c533813f4aa9d7837caf62653d097ff85",[d.optimismSepolia.id]:"0x5fd84259d66Cd46123540766Be93DFE6D43130D7",[c.polygon.id]:"0x3c499c542cef5e3811e1192ce70d8cc03d5c3359",[l.polygonAmoy.id]:"0x41e94eb019c0762f9bfcf9fb1e58725bfb0e7582",[s.base.id]:"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",[o.baseSepolia.id]:"0x036CbD53842c5426634e7929541eC2318f3dCF7e",[a.avalanche.id]:"0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E",[i.avalancheFuji.id]:"0x5425890298aed601595a70ab815c96711a31bc65",[r.arbitrum.
1id]:"0xaf88d065e77c8cC2239327C5EDb3A432268e5831",[n.arbitrumSepolia.id]:"0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d"},vp=e=>{var n,r,i;let a,o,{address:s,appConfig:l,fundWalletConfig:c,methodScreen:d,chainIdOverride:u,comingFromSendTransactionScreen:h=!1}=e;if(!l.fundingConfig)throw Error("Wallet funding is not enabled");let p=vu(l.fundingConfig.options);if(p.length<1)throw Error("Wallet funding is not enabled");a=u||((null==c?void 0:c.chain)?c.chain.id:vd(l.fundingConfig.defaultRecommendedCurrency.chain));let f=l.chains.find(e=>e.id===a);if(!f)throw new t.P("Funding chain ".concat(a," is not in PrivyProvider chains list"));let g=null!=(r=null==c?void 0:c.amount)?r:l.fundingConfig.defaultRecommendedAmount,m=!1;function y(){if(!a)return;let e=vh[a];p.find(e=>"wallets"===e.method)&&!e&&console.warn("Attempting to fund with USDC on chain where USDC address is not known. Funding via external wallet will be disabled."),o=e,m=!0}c&&"asset"in c?"USDC"===c.asset?y():"string"!=typeof c.asset&&"erc20"in c.asset&&(m=(o=c.asset.erc20)===vh[f.id]):"USDC"===l.fundingConfig.defaultRecommendedCurrency.asset&&y();let b=null==c?void 0:c.defaultFundingMethod;return{chainType:"ethereum",address:s,amount:g,chain:f,erc20Address:o,erc20ContractInfo:m?{symbol:"USDC",decimals:6}:void 0,isUSDC:m,methodScreen:d,supportedOptions:p,comingFromSendTransactionScreen:h,defaultFundingMethod:b,usingDefaultFundingMethod:!!b,preferredCardProvider:null==c||null==(n=c.card)?void 0:n.preferredProvider,crossChainBridgingEnabled:null!=(i=l.fundingConfig.crossChainBridgingEnabled)&&i,solanaChain:"solana:mainnet",uiConfig:c&&"uiConfig"in c?c.uiConfig:void 0,externalSolanaFundingScreen:null}},vf=async e=>{var n,r,i;let{appConfig:a,getAccessToken:o,initializeWalletProxy:s,user:l,privy:c,emitPrivyEvent:d,recoverEmbeddedWallet:u,setModalData:h,openModal:p,setUser:f,options:g,timeoutDuration:m,refreshSessionAndUser:y,chainType:b}=e,[w,x]=await Promise.all([s(m),o()]);if(!x||!l)throw d("createWallet","onError",t.h.MUST_BE_AUTHENTICATED),Error("User must be authenticated before creating a Privy wallet");if(!w&&(null==(n=a.customAuth)?void 0:n.enabled))throw d("createWallet","onError",t.h.UNKNOWN_EMBEDDED_WALLET_ERROR),Error("Failed to connect to wallet proxy");if(g&&"walletIndex"in g&&"number"==typeof g.walletIndex){if("user-controlled-server-wallets-only"===a.embeddedWallets.mode)throw d("createWallet","onError",t.h.INVALID_DATA),Error("Invalid input, use `createAdditional` instead of `walletIndex` to create additional wallets.");return vg({accessToken:x,appConfig:a,privy:c,emitPrivyEvent:d,openModal:p,proxy:w,refreshSessionAndUser:y,recoverEmbeddedWallet:u,setModalData:h,user:l,walletIndex:g.walletIndex,chainType:b,setUser:f})}let C=g&&"createAdditional"in g&&g.createAdditional,E=dq(l,{chainType:b});if(E[0]&&!C)throw d("createWallet","onError",t.h.EMBEDDED_WALLET_ALREADY_EXISTS),Error("User already has an embedded wallet.");return vg({accessToken:x,appConfig:a,privy:c,emitPrivyEvent:d,openModal:p,proxy:w,recoverEmbeddedWallet:u,setModalData:h,user:l,walletIndex:(null!=(i=null==(r=E.reduce((e,t)=>!e||e.walletIndex<t.walletIndex?t:e,null))?void 0:r.walletIndex)?i:-1)+1,chainType:b,refreshSessionAndUser:y,setUser:f})},vg=async e=>{let{accessToken:n,appConfig:r,privy:i,emitPrivyEvent:a,proxy:o,refreshSessionAndUser:s,recoverEmbeddedWallet:l,user:c,walletIndex:d,setModalData:u,openModal:h,chainType:p,setUser:f}=e;if(d<0)throw a("createWallet","onError",t.h.EMBEDDED_WALLET_CREATE_ERROR),Error("A negative walletIndex (".concat(d,") is invalid."));let m=(0,g.a)(c);if(d>0&&!m)throw a("createWallet","onError",t.h.EMBEDDED_WALLET_NOT_FOUND),Error("Must have an existing embedded wallet to create an additional wallet.");if(r.embeddedWallets.requireUserOwnedRecoveryOnCreate&&"user-controlled-server-wallets-only"===r.embeddedWallets.mode)throw a("createWallet","onError",t.h.EMBEDDED_WALLET_CREATE_ERROR),Error("User owned recovery not yet supported for this app.");if(!m&&r.embeddedWallets.requireUserOwnedRecoveryOnCreate)return await vm({emitPrivyEvent:a,setModalData:u,openModal:h,chainType:p});let y=dq(c,{chainType:p,walletIndex:d})[0];if(y)return{user:c,account:y};if(0===d&&!o)return vm({emitPrivyEvent:a,setModalData:u,openModal:h,chainType:p});if(!o)throw a("createWallet","onError",t.h.UNKNOWN_EMBEDDED_WALLET_ERROR),Error("Failed to connect to wallet proxy");return dH({appConfig:r,walletIndex:d,chainType:p,user:c,accessToken:n,proxy:o,refreshSessionAndUser:s,privy:i,recoverEmbeddedWallet:l,setUser:f})},vm=async e=>{let{emitPrivyEvent:n,setModalData:r,openModal:i,chainType:a}=e;return new Promise((e,o)=>{r({createWallet:{onSuccess:t=>{let{user:r,account:i}=t;n("createWallet","onSuccess",{wallet:i}),e({user:r,account:i})},onFailure:e=>{n("createWallet","onError",t.h.UNKNOWN_EMBEDDED_WALLET_ERROR),o(e)},callAuthOnSuccessOnClose:!1,shouldCreateEth:"ethereum"===a,shouldCreateSol:"solana"===a}}),i(hI)})},vy=()=>{let e=lt(),n=lg(),{setModalData:r}
1=lc(),{initializeWalletProxy:i,recoverEmbeddedWallet:a,setUser:o,openModal:s,refreshSessionAndUser:l,privy:c,client:d}=(0,R.u)();return{create:async u=>{let{chainType:h,options:p,latestUser:f}=u,g=f;if(g||(g=await l()),!g)throw n("createWallet","onError",t.h.MUST_BE_AUTHENTICATED),Error("User must be authenticated before creating a Privy wallet");return await vf({appConfig:e,privy:c,getAccessToken:()=>d.getAccessToken(),refreshSessionAndUser:l,initializeWalletProxy:i,user:g,emitPrivyEvent:n,recoverEmbeddedWallet:a,setModalData:r,openModal:s,setUser:o,options:p,timeoutDuration:of,chainType:h})}}},vv=async(e,n)=>{let{emitPrivyEvent:r,getAccessToken:i,initializeWalletProxy:a,refreshSessionAndUser:o,user:s,appConfig:l}=e,{privateKey:c,chainType:d,additionalSigners:u}=n;if(!s)throw r("linkAccount","onError",t.h.MUST_BE_AUTHENTICATED,{linkMethod:"siwe"}),new t.P("User must be authenticated before linking an account.");let h="user-controlled-server-wallets-only"===l.embeddedWallets.mode?"tee":"on-device";if(u&&"on-device"===h)throw new t.P("Specifying additionalSigners is only supported for TEE execution and this app uses On-device execution. Learn more https://docs.privy.io/recipes/tee-wallet-migration-guide");let[p,f]=await Promise.all([i(),a(15e3)]);if(!f||!p)throw r("linkAccount","onError",t.h.MUST_BE_AUTHENTICATED,{linkMethod:"siwe"}),new t.P("User must be authenticated before linking an account.");let{address:m}=await f.importWallet({privateKey:c,accessToken:p,chainType:d,mode:h,additionalSigners:u}),y=await o(),b="solana"===d?(0,g.h)(y):(0,g.e)(y),w=null==b?void 0:b.find(e=>e.address===m);if(!w)throw r("createWallet","onError",t.h.UNKNOWN_EMBEDDED_WALLET_ERROR),Error("Failed to import wallet");return r("createWallet","onSuccess",{wallet:w}),w},vb=()=>{let{importWallet:e}=(()=>{let{user:e}=(0,g.u)(),{client:t,refreshSessionAndUser:n,initializeWalletProxy:r}=(0,R.u)(),i=lg(),a=lt();return{importWallet:(0,f.useCallback)(o=>{let{privateKey:s,additionalSigners:l}=o;return vv({getAccessToken:()=>t.getAccessToken(),user:e,initializeWalletProxy:r,refreshSessionAndUser:n,emitPrivyEvent:i,appConfig:a},{privateKey:s,chainType:"ethereum",additionalSigners:l})},[e,t,n,r,i,a])}})(),{createWallet:t}=function(e){let{create:t}=vy();return lp("createWallet",void 0),{createWallet:async e=>{e&&"target"in e&&e&&(e=void 0);let{account:n}=await t({chainType:"ethereum",options:e});return n}}}();return{...(0,f.useContext)(g.P),importWallet:e,createWallet:t}}},229032,945933,e=>{"use strict";function t(e,t,n){if(!t.has(e))throw TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function n(e,n){var r=t(e,n,"get");return r.get?r.get.call(e):r.value}e.s(["_",()=>n],229032),e.s(["_",()=>t],945933)},32041,e=>{"use strict";function t(e,t){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object")}e.s(["_",()=>t])},567928,523474,63408,e=>{"use strict";e.s(["_",()=>n],567928);var t=e.i(32041);function n(e,n,r){(0,t._)(e,n),n.set(e,r)}e.s(["_",()=>i],523474);var r=e.i(945933);function i(e,t,n){var i=(0,r._)(e,t,"set");if(i.set)i.set.call(e,n);else{if(!i.writable)throw TypeError("attempted to set read only private field");i.value=n}return n}function a(e,t){var n=(0,r._)(e,t,"update");if(n.set){if(!n.get)throw TypeError("attempted to read set only private field");return"__destrWrapper"in n||(n.__destrWrapper={set value(v){n.set.call(e,v)},get value(){return n.get.call(e)}}),n.__destrWrapper}if(!n.writable)throw TypeError("attempted to set read only private field");return n}e.s(["_",()=>a],63408)},203023,e=>{"use strict";function t(e,t,n){if(!t.has(e))throw TypeError("attempted to get private field on non-instance");return n}e.s(["_",()=>t])},903150,e=>{"use strict";e.s(["_",()=>n]);var t=e.i(32041);function n(e,n){(0,t._)(e,n),n.add(e)}},369620,e=>{"use strict";e.s(["IoCopy",()=>n,"IoMenu",()=>r,"IoPaperPlane",()=>i,"IoTicketSharp",()=>a]);var t=e.i(940141);function n(e){return(0,t.GenIcon)({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M408 480H184a72 72 0 0 1-72-72V184a72 72 0 0 1 72-72h224a72 72 0 0 1 72 72v224a72 72 0 0 1-72 72z"},child:[]},{tag:"path",attr:{d:"M160 80h235.88A72.12 72.12 0 0 0 328 32H104a72 72 0 0 0-72 72v224a72.12 72.12 0 0 0 48 67.88V160a80 80 0 0 1 80-80z"},child:[]}]})(e)}function r(e){return(0,t.GenIcon)({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"48",d:"M88 152h336M88 256h336M88 360h336"},child:[]}]})(e)}function i(e){return(0,t.GenIcon)({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M473 39.05a24 24 0 0 0-25.5-5.46L47.47 185h-.08a24 24 0 0 0 1 45.16l.41.13 
1137.3 58.63a16 16 0 0 0 15.54-3.59L422 80a7.07 7.07 0 0 1 10 10L226.66 310.26a16 16 0 0 0-3.59 15.54l58.65 137.38c.06.2.12.38.19.57 3.2 9.27 11.3 15.81 21.09 16.25h1a24.63 24.63 0 0 0 23-15.46L478.39 64.62A24 24 0 0 0 473 39.05z"},child:[]}]})(e)}function a(e){return(0,t.GenIcon)({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"m426.24 127.72-10.94 10.94a29.67 29.67 0 0 1-42-42l10.94-10.94L314.52 16l-88 88-4 12.09-12.09 4L16 314.52l69.76 69.76 10.94-10.94a29.67 29.67 0 0 1 42 42l-10.94 10.94L197.48 496l194.4-194.4 4-12.09 12.09-4 88-88zm-208.56 5.43 21.87-21.87 33 33-21.88 21.87zm43 43 21.88-21.88 32.52 32.52-21.88 21.88zm42.56 42.56 21.88-21.88 32.52 32.52-21.84 21.93zm75.57 75.56-33-33 21.87-21.88 33 33z"},child:[]}]})(e)}},497058,e=>{"use strict";e.s(["TbHandFinger",()=>n,"TbHandGrab",()=>r,"TbLogout",()=>i]);var t=e.i(940141);function n(e){return(0,t.GenIcon)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M8 13v-8.5a1.5 1.5 0 0 1 3 0v7.5"},child:[]},{tag:"path",attr:{d:"M11 11.5v-2a1.5 1.5 0 1 1 3 0v2.5"},child:[]},{tag:"path",attr:{d:"M14 10.5a1.5 1.5 0 0 1 3 0v1.5"},child:[]},{tag:"path",attr:{d:"M17 11.5a1.5 1.5 0 0 1 3 0v4.5a6 6 0 0 1 -6 6h-2h.208a6 6 0 0 1 -5.012 -2.7a69.74 69.74 0 0 1 -.196 -.3c-.312 -.479 -1.407 -2.388 -3.286 -5.728a1.5 1.5 0 0 1 .536 -2.022a1.867 1.867 0 0 1 2.28 .28l1.47 1.47"},child:[]}]})(e)}function r(e){return(0,t.GenIcon)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M8 11v-3.5a1.5 1.5 0 0 1 3 0v2.5"},child:[]},{tag:"path",attr:{d:"M11 9.5v-3a1.5 1.5 0 0 1 3 0v3.5"},child:[]},{tag:"path",attr:{d:"M14 7.5a1.5 1.5 0 0 1 3 0v2.5"},child:[]},{tag:"path",attr:{d:"M17 9.5a1.5 1.5 0 0 1 3 0v4.5a6 6 0 0 1 -6 6h-2h.208a6 6 0 0 1 -5.012 -2.7l-.196 -.3c-.312 -.479 -1.407 -2.388 -3.286 -5.728a1.5 1.5 0 0 1 .536 -2.022a1.867 1.867 0 0 1 2.28 .28l1.47 1.47"},child:[]}]})(e)}function i(e){return(0,t.GenIcon)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M14 8v-2a2 2 0 0 0 -2 -2h-7a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h7a2 2 0 0 0 2 -2v-2"},child:[]},{tag:"path",attr:{d:"M9 12h12l-3 -3"},child:[]},{tag:"path",attr:{d:"M18 15l3 -3"},child:[]}]})(e)}},65856,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"RouterContext",{enumerable:!0,get:function(){return r}});let r=e.r(563141)._(e.r(271645)).default.createContext(null)}]);

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.