"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6781],{46781:function(e,a,t){t.d(a,{default:function(){return H}});var r=t(27573),n=t(81695),o=t(95731),i=t(58311),l=t(29147),s=t(6940),c=t(38278),u=t.n(c),d=t(75127),m=t.n(d),h=t(2230),p=t.n(h);let g=e=>(0,s.a)({queryKey:["searchSummoner",{input:e}],queryFn:()=>{if(!e)return[];let a=e.split("#")[0],t=e.split("#")[1],r=new URLSearchParams(m()({gameName:a,tagLine:t},u())),n=new AbortController,o=setTimeout(()=>n.abort(),2e3);return fetch("/api/search?".concat(r.toString()),{signal:n.signal}).then(e=>e.json()).then(e=>e).then(e=>[...p()(e.filter(e=>e.displayName),"displayName"),...e.filter(e=>!e.displayName)]).finally(()=>clearTimeout(o)).catch(e=>{if("AbortError"===e.name)return[];throw e})},enabled:e.length>0,placeholderData:e=>e||[]});var x=t(29860),f=t.n(x),y=t(89846),b=t.n(y),k=t(25585),w=t.n(k),S=t(51214),v=t(50294),N=t(7653),L=t(74374),C=t(32312),A=t(65986),j=t(20462);function P(e){let{region:a}=e;return a?(0,r.jsx)("div",{className:(0,l.cn)("hidden lg:block text-bxs font-extrabold  rounded-md px-[6px] py-4",function(e){switch(e){case"EUW1":return"bg-blue-500";case"EUN1":case"BR1":case"VN2":return"bg-lime-800";case"ME1":case"LA1":return"bg-yellow-700";case"RU":return"bg-blue-700";case"TR1":return"bg-red-600";case"KR":return"bg-orange-600";case"JP1":return"bg-cyan-700";case"LA2":return"bg-yellow-800";case"NA1":return"bg-purple-500";case"OC1":return"bg-lime-700";case"PH2":return"bg-cyan-800";case"SG2":return"bg-red-600/80";case"TH2":return"bg-blue-800";case"TW2":return"bg-red-600/90";default:return"bg-black-500"}}(a)),children:j.dw[a]}):null}var B=t(48253),z=t(88146),T=t(19813);function D(e){let{name:a}=e;return(0,r.jsxs)(z.default,{href:"/esport/players/".concat(a),ref:e=>null==e?void 0:e.addEventListener("touchend",e=>e.preventDefault()),onClick:e=>e.stopPropagation(),className:"text-bxs text-black-100 font-semibold hover:opacity-90  transition-transform duration-100 px-4 py-[4px] bg-purple-200/[0.06] rounded hidden lg:flex items-center relative overflow-hidden border-t border-black-0/20",children:["ESPORT",(0,r.jsx)(T.Z,{className:"absolute -top-48 left-0 w-[150px] -rotate-0 text-purple-300 blur"}),(0,r.jsx)(T.Z,{className:"absolute -bottom-48 right-0 w-[150px] -rotate-180 text-yellow-300 blur-"})]})}var R=t(42533);function K(e,a){if(void 0===e)return null;let t=e.toLowerCase().indexOf(a.toLowerCase());if(-1===t)return(0,r.jsx)("span",{children:e});let n=e.substring(0,t),o=e.substring(t,t+a.length),i=e.substring(t+a.length);return(0,r.jsxs)("span",{children:[n,(0,r.jsx)("span",{className:"font-black",children:o}),i]})}function M(e){return void 0!==e.gameName}function E(e){return void 0!==e.championName}function I(e){return void 0!==e.teamName}let J=e=>{var a;let{isSelected:t,input:n}=e;return(0,r.jsx)("div",{className:(0,l.cn)("cursor-pointer p-8 rounded-xl border border-black-700 hover:bg-gradient-fade hover:border-black-600 group",t&&"bg-gradient-fade border-black-600"),children:(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsxs)("div",{className:"flex items-center text-left gap-16",children:[M(e)&&("PRO"===e.role||"STREAMER"===e.role?(0,r.jsx)(R.Z,{className:"flex-shrink overflow-hidden rounded-full scale-150 w-32 relative right-2",player:e.displayName}):(0,r.jsx)(v.default,{src:(0,S.od)(e.profileIcon),alt:"Profile Icon",className:"border-black-500 flex-shrink overflow-hidden rounded-lg border-2 w-32 scale-125",width:128,height:128})),E(e)&&(0,r.jsx)(v.default,{src:(0,S.Ho)(e.championName),alt:"Champion Icon",className:" flex-shrink overflow-hidden rounded-lg w-32 scale-110",width:128,height:128}),I(e)&&(0,r.jsx)(v.default,{src:"/esport/teams/".concat(e.teamTag,".webp"),alt:"Team ".concat(e.teamName||"NoPicture"),className:" flex-shrink overflow-hidden rounded-lg scale-110 w-32",width:128,height:128}),(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:(0,l.cn)(t&&"font-bold","group-hover:font-bold",M(e)&&e.displayName?"text-yellow-400 font-bold":"text-black-0"),children:[M(e)&&(null!==(a=(0,l.T0)(e))&&void 0!==a?a:e.gameName),E(e)&&K(e.displayName,n),I(e)&&K(e.teamName,n)]}),(0,r.jsxs)("div",{className:"text-black-300 text-bs",children:[M(e)&&(e.displayName?"":e.tagLine?"#".concat(e.tagLine):""),E(e)&&e.championName&&"Builds, Runes & Counters",M(e)&&e.displayName&&"PRO"==e.role&&"Pro Player",M(e)&&e.displayName&&"STREAMER"==e.role&&"Streamer",I(e)&&e.teamName&&"Esport, Players & Stats"]})]}),M(e)&&e.team&&(0,r.jsx)(v.default,{src:"/esport/teams/".concat(e.team,".webp"),alt:"Team Icon",className:" flex-shrink overflow-hidden rounded-lg",width:28,height:28})]}),M(e)&&e.platformId&&!e.displayName&&(0,r.jsx)(P,{region:e.platformId}),M(e)&&"PRO"==e.role&&e.displayName&&e.team&&(0,r.jsx)(D,{name:e.displayName})]})})},F=w()(Object.entries(B.XD).map(e=>{let[a,t]=e;return{teamName:t[0],teamTag:a}}),(e,a)=>e.teamName===a.teamTag);function H(e){let{variant:a="full",path:t}=e,s=(0,n.useRouter)(),[c,u]=(0,N.useState)(Object.keys(A).map(e=>({championName:e,displayName:(0,l.rS)(e)}))),[d,m]=(0,N.useState)(F),[h,x]=(0,N.useState)(""),y=(0,N.useCallback)(f()(x,200),[]),{data:k,isError:w}=g(h),[S,v]=(0,N.useState)([]);(0,N.useEffect)(()=>{var e;v(JSON.parse(null!==(e=localStorage.getItem("lastSearches"))&&void 0!==e?e:"[]"))},[]),(0,N.useEffect)(()=>{null==k||k.forEach(e=>{M(e)&&"PRO"===e.role&&e.displayName&&s.prefetch("/pro/".concat(encodeURIComponent(e.displayName)),{kind:C.PrefetchKind.FULL}),I(e)&&s.prefetch("/esport/teams/".concat(e.teamTag.toUpperCase()),{kind:C.PrefetchKind.AUTO})})},[k,s,w]),(0,N.useEffect)(()=>{172384242e4>Number(localStorage.getItem("lastSearchUpdate")||"0")&&(localStorage.setItem("lastSearchUpdate",new Date().getTime().toString()),localStorage.setItem("lastSearches","[]"),v([]))});let j=(0,N.useMemo)(()=>h?[...d.slice(0,2),...c.slice(0,2),...null!=k?k:[]].slice(0,6):S,[k,S,w]),P=(e,a)=>M(e)&&e.displayName&&"PRO"===e.role?"/pro/".concat(encodeURIComponent(e.displayName)):M(e)?"/".concat((0,L.l)({...e})).concat(a?"/".concat(a):""):E(e)?"/build/".concat(e.championName):I(e)?"/esport/teams/".concat(e.teamTag.toUpperCase()):"#";return(0,r.jsx)("div",{className:"flex w-full items-center space-x-32 justify-center",children:(0,r.jsx)("div",{className:(0,l.cn)("full"===a?"bg-gradient-fade mx-[100px] flex w-full  items-center justify-between gap-x-32 rounded-2xl border border-blue-300/[0.35] px-24 py-28 max-w-xl xl:max-w-2xl 2xl:max-w-4xl shadow-[0_0px_15px_0px_rgba(121,137,236,0.15)]":"w-full max-w-[260px] min-[1400px]:max-w-[370px] min-[1470px]:max-w-xl 2xl:max-w-2xl","rewind"===t&&"shadow-[0_0px_15px_0px_rgba(255,235,173,0.15)] border-yellow-300/[0.35]"),children:(0,r.jsx)(i.Z,{items:0!=h.length?j:S,placeholder:"Riot ID, Champion, Team..",className:"max-h-[40px]",RightIcon:o.Z,Item:e=>(0,r.jsx)(z.default,{href:P(e,t),passHref:!0,children:(0,r.jsx)(J,{...e})}),onChange:e=>{let a=Object.keys(A),t=a.filter(a=>(0,l.rS)(a).toLowerCase().startsWith(e.toLowerCase()));t.length<2&&t.push(...a.filter(a=>(0,l.rS)(a).toLowerCase().includes(e.toLowerCase()))),u(0!==e.length?b()(t).map(e=>({championName:e,displayName:(0,l.rS)(e)})):[]);let r=F.filter(a=>a.teamName.toLowerCase().startsWith(e.toLowerCase())||a.teamTag.toLowerCase().startsWith(e.toLowerCase()));r.length<2&&r.push(...F.filter(a=>a.teamName.toLowerCase().includes(e.toLowerCase())||a.teamTag.toLowerCase().includes(e.toLowerCase()))),m(0!==e.length?p()(r,"teamTag"):[]),y(e)},onSelect:e=>{if(!e)return;let a=e;if("string"==typeof e){e.includes("#")||(e="".concat(h,"#EUW")),e=h.trim();let t=h.split("#");a={gameName:t[0],tagLine:t[1],profileIcon:1,displayName:null,platformId:null,role:"PLAYER",team:null}}M(a)&&localStorage.setItem("lastSearches",JSON.stringify([a,...S.filter(e=>e.gameName!==a.gameName||e.tagLine!==a.tagLine)].slice(0,6)));let r=P(a,t);"#"!==r&&s.push(r),x("")},allowFreeText:!0,freeTextValidor:e=>2===e.split("#").length})})})}},42533:function(e,a,t){t.d(a,{Z:function(){return i}});var r=t(27573);let n=new Set(["0N","FGG","Luana","Skeanz","113","FIESTA","Lucas","SkewMond","1xn","Fade","Lucid","Slay","369","Emo","Elio","FakeGod","Lucky","Slayder","5kid","Faker","LIMIT","Treatz","Norskeren","Luger","Advienne","Smeb","APA","Farfetch","Luon","Smoothie","Abbedagge","Feather","Lurox","Sn1lle","Able","Feisty","LvMao","Sneaky","Acorderr","Fenfen","Lyncas","Sniper","Adam","Fenix","Lyonz","SnowFlower","Afroboi","Ferret","MISSING","SoHwan","Agresivoo","Finn","MagiFelix","SofM","Ahn","Fisher","Maple","Soligo","Aiming","Flakked","Marge","Solo","Akaadian","Flandre","Mark","Solokill","Aki","Flawless","Markoon","Sotsy","Ale","Fleshy","Marky","Southwind","Alphari","Fly","Mask","Spawn","Alvaro","FoFo","Massu","Spica","Andariel","Fresskowy","Mata","Spirit","Andil","Froggen","Matias","Sponge","Angel","Fudge","Matixx","Spooder","Aria","Funk3y","Maxi","Ssumday","Armao","GALA","Maynter","Starry","Armut","Gakgos","Megan","Steelback","Arnax","Gango","Meiko","Stend","Arrow","Geju","Melonik","Stixxay","Artemis","Ghost","Mercy","Sty1e","Arthur","Goldenglue","Meteor","Summit","Artoria","Gori","Meteos","Supa","Assum","Grave","Mihile","Svenskeren","Asura","Grizzly","Mikyx","Sword","Attila","GuGer","Ming","SwordArt","Aegis","Punch","Aytekn","Ian","Key","Mickey","UNF0RGIVEN","Newbie","Gumayusi","Mir","Sylvie","BAO","Steal","EasyLove","Meliodas","Xmithie","yoHan","MooJin","Guwon","Mireu","Syzyf","BEAN","H4cker","Mlxg","Syzyfek","Baca","HOYA","Moham","Szygenda","Backlund","Hachani","Morgan","Tactical","Badlulu","Hai","Mxe","Taeyoon","Balls","HamBak","Myrtus","TakeSet","Bang","Hang","Myrwn","Tangyuan","Baolan","Hans Sama","Mystic","Targamas","Batuuu","Hans","Naak Nako","Tarzan","Bay","Hans SamD","Naau","Tazaku","Bdd","Hantera","Naehyun","Teddy","Becca","Harky","Nash","Th3Antonio","Beichuan","Harpoon","Nawa","Thal","Ben","Haru","Neo","Thanatos","Bengi","Hauntzer","Neon","Thayger","Berkan","Hazel","Niket","TheShy","Berserker","HeSSZero","Ning","Tian","BeryL","Hena","Nio","Tianzhen","Bie","Hery","Nisqy","TolanD","Bin","Hirit","NoName","Tomo","Biofrost","Hjarnan","NoPicture","Kikis","Heng","IgnaVilu","Ganks","Disamis","Jerry","Guigo","pzx","Leleko","frosty","Ackerman","Mia","Smiley","Enso","Whitelotus","ProDelta","Loken","Brance","Wuming","Grevthar","JoJo","Croc","Zzk","Robo","Wiz","Ayu","Tutsz","tinowns","RedBert","SoCool","Condi","xiaohan","Youdang","Sora","Lele","xiye","Tore","Bjergsen","Hoit","Noah","Tracyn","Blaber","HolyPhoenix","Nogo","Trick","Blank","Hoon","Nuc","Trymbi","Blazess","Hope","ON","TusiN","Blue","Howling","Obstinatus","Twiizt","Bo","Humanoid","Oddie","TynX","Bolulu","Huni","Odoamne","Typhoon","Boukada","Hylissang","Olleh","UmTi","Bradley","Ice","OnFleek","Unforgiven","Breathe","Ignar","Oner","Upset","Broken Blade","Impact","Orome","Uzi","BrokenBlade","Incarnati0n","Oscarinin","V1per","BuLLDoG","Infoneral","Oscure","VULCAN","Bugi","Innaxe","Ozgur","Vampire","Bull","Insanity","PARUS","Veignorem","Burdol","Inspired","Pabu","Venour","Busio","Instinct","Paduck","Vertigo","Bvoy","Irove","Paixdia","Vetheo","Bwipo","Irrelevant","Palafox","VicLa","CaD","Isles","Palette","Viper","Cabochard","Isma","Pann","Vitt","Caliste","Iwandy","Parasite","Vizicsacsi","Callme","JNX","Patch","Vladi","Canna","JackeyLove","Patrik","Vsta","Canyon","Jackies","PawN","Wadid","Caps","Jackspektra","Peach","Wayward","Care","Jane","Peanut","nuc","Nuc","Wei","Gemini","Carlsen","Husha","Santorin","Uniboy","SwordArT","Babip","AnDa","k1ng","BOSS","Jankos","Peco","Weiwei","Carry","Javier","Peng","West","Carzzy","JayJ","Perfect","White","Castle","Jelly","Perkz","WhiteKnight","Celebrity","Jensen","Peter","WildTurtle","Celebrity1","Jeskla","Peyz","Willer","Ceo","Jett","Philip","Wind","Chasy","Jezu","Photic","Wink","Chef","JieJie","Photon","Wolf","Chime","Jiizuke","Piero","Woolite","Chovy","Jinjiao","Pilot","Wunder","Citrus","Jiwoo","Pleata","Xeonerr","Clear","Johnsun","Pobelter","Xerxe","Clid","Jojopyun","Pollu","Xiaohao","Closer","Jopa","Poome","Xiaohu","Clozer","Josedeodo","PowerOfEvil","Xiaolaohu","Cody Sun","Juhan","PraY","Xiaoxu","Comp","Juice","Pretty","Xico","Contractz","Jun","Pride","XinLiu","CoreJJ","Jwei","Prime","XnS","Creme","KAKAO","Prince","Xun","Crisp","Kael","Puddin","Xx","Croco","Kaiser","Puff","YSKM","Crownie","Kamilius","Pullbae","Yagao","Crownshot","Kanavi","Pyosik","Yanxiang","Crush","Kaori","Pyshiro","Yeon","Cryin","Karis","Qingtian","Yike","CuVee","Karsa","Quad","YoungJae","Cuzz","Kati","Quantum","Yohan","Czajek","Kaymin","Quid","Yuekai","Czekolad","Keaiduo","R4VEN","Yuh","D4nKa","Keduii","Rabble","Yusui","DDoiV","Kehvo","Raes","Zanzarah","Daglas","Keine","RafBin","Zazee","Dajor","Keith","Ragner","Zeka","ZEKA","Damonte","Kellin","Rahel","Zenit","Danny","Kenal","Random","Zest","Dardoch","Kepler","Raptor","Zeus","Decay","Keria","Rascal","Zeyzal","Deft","Ketim","Razork","Zhuo","Deftly","Khan","Reeker","Zicssi","Delight","Kiaya","Rekkles","Zika","Densi","Kid","Relative","Zin","Deokdam","KidKid","Rhuckz","Zoelys","Dhokla","Kiin","Ribu","Zoom","Dia1","Kingen","Rich","Zven","Diamond","Kireas","Rin","Zwyroo","Diplex","Kitties","Rio","Zz1tai","Divkid","Kobbe","River","Zzus","DizL","Kofte","Rookie","adi1","DnDn","Koldo","Route","aphromoo","Doggo","Kozi","Ruep","bluerzor","Doinb","Kramer","Ruf","bonO","Domas","Krysia","Ruler","chenlun17","Domoles","Kryze","Ryuzaki","dispel","Doran","Kumo","SLT","eXyu","Doss","Kuro","SOLKA","gideon","Doublelift","Kuzan","SS","glfs","Dove","Kyeahoo","SSol","haichao","Dread","LP","Sacre","huanfeng","Dream","Labrov","Sajator","huhi","Dreams","Langx","Saken","iBo","DuDu","Larssen","SamD","icon","DuaLL","Lava","Samver","imp","Duan","LeBron","Scarface","marlon","Duke","Leaper","Score","milkyway","Duro","Leave","Scorth","minemaciek","EMENES","Legolas","Scout","mithy","Easylove","Lehends","SeTab","neny","Eckas","Lekcyc","Senan","playcool","Eddie","LemonNation","Sencux","ppgod","Effort","Leo","Serin","ry0ma","Elk","Letme","Sertuss","seaz","Ellim","Levi","Shanks","shanji","Elyoya","Leyan","ShazQ","sheer","Endz","Licorice","Shaoye","simpli","Envyy","Life","ShazQ","simpli","Erdote","Light","Shelfmade","toucouille","Escik","Lilipp","Shenyi","twohoyrz","Exakick","Lira","Sheo","ucal","Execute","LokeN","Shinigari","uden","Expect","Looper","Shlatan","vital","Eyla","Lospa","Shogun","whiteinn","FATE","Lost","Showmaker","Zero","Shernfire","Nuclear","Zeitnot","deokdam","Zdz","QiuQiu","clid","Ambition","Athena","Vulcan","Nemesis","Hans sama","IgNar","MnM","Apex","ucal","KaKAO","Archer","Nomanz","Yutapon","JimieN","xMatty","Jiejie","xiaolaohu","Nuguri","GimGoon","y4","Lwx","Betty","Azhi","JunJia","Woody","Wizer","CarioK","dyNquedo","TitaN","Kuri","Ysera","Prage","Adiogs","Wako","Shunn","Mission","FBI","Lot","Shy Carry","xiaoyueji","FEBIVEN","Lothen","Sinmivak","yeti","knight"]);var o=t(50294);function i(e){let{player:a,className:t}=e;return(0,r.jsx)(o.default,{className:t,src:"/esport/players/".concat(n.has(a)?a:"NoPicture",".webp"),alt:a||"Player",width:512,height:512,style:{filter:"brightness(0.9) contrast(1.1)"}})}},50466:function(e,a,t){t.d(a,{d:function(){return s},z:function(){return c}});var r=t(27573),n=t(7653),o=t(8828),i=t(85145),l=t(29147);let s=(0,i.j)("flex py-8 justify-center items-center flex-shrink-0 whitespace-nowrap rounded-xl font-semibold duration-200",{variants:{variant:{default:"bg-yellow-100 text-black-600 hover:bg-yellow-100/90 active:bg-blue-200 shadow-[0_0px_15px_0px_rgba(255,235,173,0.55)]",secondary:"text-blue-400 border border-blue-300/[0.35] hover:text-blue-300 hover:border-blue-300/[0.55] active:text-blue-200 active:border-blue-300/[0.75]",tertiary:"bg-black-600 text-black-200 hover:bg-black-500 active:bg-black-400",ghost:"text-black-400 hover:text-black-300 active:text-black-200","label-active":"bg-black-600 text-black-300 hover:bg-black-500","label-inactive":"bg-black-700 text-black-400 hover:bg-black-500 hover:text-black-300 active:bg-black-400 active:text-black-200",glass:"bg-gradient-fade text-black-200 hover:bg-black-500 active:bg-black-400"},size:{XL:"px-20 py-8 text-hxs [&>*>svg]:w-32",large:"px-20 py-8 text-bm [&>*>svg]:w-24",medium:"px-12 text-bs [&>*>svg]:w-20",small:"px-4 text-[10px] md:text-bxs [&>*>svg]:w-16",iconLarge:"px-4 [&>*>svg]:w-24",iconMedium:"px-4 [&>*>svg]:h-20 w-36 h-36",iconSmall:"px-4 [&>*>svg]:w-16",mediumMobile:"px-4 text-bs [&>*>svg]:w-16"}},defaultVariants:{variant:"default",size:"large"}}),c=n.forwardRef((e,a)=>{let{className:t,variant:n,size:i,asChild:c=!1,...u}=e,d=c?o.g7:"button";return(0,r.jsx)(d,{className:(0,l.cn)(s({variant:n,size:i,className:t})),ref:a,...u,children:(0,r.jsx)("div",{className:"flex items-center justify-center space-x-12 ",children:u.children})})});c.displayName="Button"},58311:function(e,a,t){t.d(a,{Z:function(){return u}});var r=t(27573),n=t(61284),o=t(7653),i=t(29147);let l=o.forwardRef((e,a)=>{let{className:t,type:n,...o}=e;return(0,r.jsx)("input",{type:n,className:(0,i.cn)("bg-black-600 text-bl text-black-200 placeholder-black-200 w-full min-w-[156px] placeholder:opacity-80  focus:outline-none focus:ring-0",t),ref:a,...o})});l.displayName="Input";var s=t(50466);let c=(0,o.forwardRef)((e,a)=>{let{className:t,items:c,placeholder:u,RightIcon:d,Item:m,onChange:h,onBlur:p,onSelect:g,allowFreeText:x=!1,freeTextValidor:f=()=>!0,...y}=e,[b,k]=(0,o.useState)(""),[w,S]=(0,o.useState)(c.length>0),[v,N]=(0,o.useState)(-1),[L,C]=(0,o.useState)(!1),A=(0,o.useRef)(!1),j=(0,o.useRef)(null);(0,o.useImperativeHandle)(a,()=>j.current);let P=e=>{var a;e&&(S(!1),N(0),null==g||g(e),k(""),null===(a=j.current)||void 0===a||a.blur())},B=()=>{P(b)};return(0,o.useEffect)(()=>{N(c.length>0?0:-1)},[c.length]),(0,r.jsxs)(n.J2,{open:w&&L,children:[(0,r.jsx)(n.tW,{asChild:!0,children:(0,r.jsxs)("div",{className:(0,i.cn)("bg-black-600 border-black-500 flex max-w-7xl grow items-center justify-between rounded border px-12 py-4",t),children:[(0,r.jsx)(l,{ref:j,...y,className:"mr-8",placeholder:u,autoComplete:"off",value:b,onChange:e=>{null==h||h(e.target.value),k(e.target.value),S(!0),N(0)},onFocus:()=>{C(!0),S(!0)},onBlur:()=>{A.current||(C(!1),S(!1)),null==p||p()},onKeyDown:e=>{"Escape"===e.key?S(!1):"ArrowDown"===e.key?(e.preventDefault(),N(e=>e<c.length-1?e+1:e)):"ArrowUp"===e.key?(e.preventDefault(),N(e=>e>0?e-1:0)):"Enter"===e.key&&(e.preventDefault(),v>=0&&w&&c.length>0?P(c[v]):x&&f(b)&&B())}}),d&&(0,r.jsx)(s.z,{variant:"ghost",size:"iconLarge",onClick:()=>B(),children:(0,r.jsx)(d,{className:"text-black-400 hover:scale-105 transition-transform duration-100"})})]})}),w&&L&&c.length>0&&(0,r.jsx)(n.yk,{align:"start",avoidCollisions:!1,onOpenAutoFocus:e=>e.preventDefault(),onMouseDown:()=>{A.current=!0},onMouseUp:()=>{setTimeout(()=>A.current=!1,0)},className:"PopoverContent w-full bg-black-700 p-4 rounded space-y-4 z-20 max-h-screen overflow-hidden whitespace-nowrap text-overflow max-w-full border border-black-0 border-opacity-10",children:c.map((e,a)=>(0,r.jsx)("div",{onClick:()=>P(e),children:(0,r.jsx)(m,{isSelected:v===a,input:b,...e})},a))})]})});c.displayName="ComboBox";var u=c},74374:function(e,a,t){t.d(a,{l:function(){return r}});function r(e){let{gameName:a,tagLine:t}=e;return a&&t?"".concat(encodeURIComponent(a),"-").concat(encodeURIComponent(t)):""}},19813:function(e,a,t){t.d(a,{Z:function(){return o}});var r=t(27573),n=t(29147);function o(e){let{className:a}=e;return(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 36 32",fill:"currentColor",className:(0,n.cn)("pointer-events-none",a),children:[(0,r.jsx)("g",{opacity:"0.16",filter:"url(#filter0_f_331_4773)",children:(0,r.jsx)("circle",{cy:"32",r:"20"})}),(0,r.jsx)("defs",{children:(0,r.jsxs)("filter",{id:"filter0_f_331_4773",x:"-36",y:"-4",width:"72",height:"72",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[(0,r.jsx)("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),(0,r.jsx)("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),(0,r.jsx)("feGaussianBlur",{stdDeviation:"8",result:"effect1_foregroundBlur_331_4773"})]})})]})}}}]);