PageSourceSearch

https://klirr.com/_next/static/immutable/chunks/22tja6aolabp9.js

js klirr.com collected 2026-10-08 03:29:16 UTC 14,931 bytes, 17 lines download raw bytes

1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="e821226a-57bf-2595-9bc4-36ca81c6eadc")}catch(e){}}();
2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,251865,e=>{e.v({"logo-link":"logo-module__G08edW__logo-link"})},537574,e=>{"use strict";var t=e.i(843476);e.i(348175);var a=e.i(644640),i=e.i(157773),l=e.i(479017),s=e.i(393374),r=e.i(673104),n=e.i(964964),o=e.i(760516),u=e.i(316091);e.i(825181);var d=e.i(21393),c=e.i(385514),f=e.i(532181),h=e.i(657688),m=e.i(522016),g=e.i(618566),_=e.i(271645),p=e.i(639941),x=e.i(251865);e.s(["LobbyLogo",0,()=>{let{isAboveLg:e}=(0,a.useBreakpoint)("lg"),{isHydrated:b}=(0,i.useIsHydrated)(),[v,S]=(0,_.useState)(!1),{clearSearch:R}=(0,p.useLobbySearch)(),C=(0,g.useRouter)(),{isLoggedIn:w}=(0,n.useAuth)(),y=(0,u.useText)(),L=(0,_.useMemo)(()=>(0,s.getCdnAsset)(e?s.CdnAsset.LogoLobbyDesktop:s.CdnAsset.LogoLobbyMobile),[e]);return(0,t.jsx)(f.motion.div,{className:x.default["logo-link"],initial:{opacity:0,y:-10,x:"-50%"},animate:{opacity:+!!v,y:v?1:-10,x:"-50%"},transition:{type:"spring",stiffness:150,damping:25,restDelta:.0025},children:(0,t.jsx)(m.default,{onClick:e=>{R({handleQueryString:!1}),w===o.IsLoggedIn.YES?(e.preventDefault(),C.push(r.Route.LOBBY)):(0,d.mobileAppPostMessage)(c.WebCommand.NAVIGATE_TO_START_SCREEN)},href:r.Route.HOME,prefetch:!1,children:b&&(0,t.jsx)(h.default,{onLoad:()=>S(!0),alt:y("COMMON_BRAND_LOGO_ALT",{brandName:l.AppConfig.brandName}),width:"100",height:"100",src:L,unoptimized:!0})})})}])},397707,e=>{e.v({blink:"styles-module__AJhSRG__blink",focuessed:"styles-module__AJhSRG__focuessed","search-button":"styles-module__AJhSRG__search-button"})},247245,e=>{e.v({arrow:"navigation-module__4_ZtKG__arrow",button:"navigation-module__4_ZtKG__button",buttons:"navigation-module__4_ZtKG__buttons","buttons-wrapper":"navigation-module__4_ZtKG__buttons-wrapper","clipping-both":"navigation-module__4_ZtKG__clipping-both","clipping-left":"navigation-module__4_ZtKG__clipping-left","clipping-right":"navigation-module__4_ZtKG__clipping-right","full-icon-transparency":"navigation-module__4_ZtKG__full-icon-transparency",new:"navigation-module__4_ZtKG__new",root:"navigation-module__4_ZtKG__root","slide-down":"navigation-module__4_ZtKG__slide-down",sticky:"navigation-module__4_ZtKG__sticky","sticky-background":"navigation-module__4_ZtKG__sticky-background"})},519357,e=>{"use strict";var t=e.i(843476);e.i(348175);var a=e.i(644640),i=e.i(104130),l=e.i(157773),s=e.i(468779),r=e.i(353126),n=e.i(673104),o=e.i(964964),u=e.i(760516),d=e.i(316091),c=e.i(450796),f=e.i(701768),h=e.i(384434),m=e.i(307503),g=e.i(560491),_=e.i(479017);let p=`${_.AppConfig.basePath??""}/api/altenar`;async function x({sportId:e,champId:t,categoryId:a,type:i,live:l,outRights:s,page:r,pageSize:n}){let o=new URLSearchParams({sportId:e.toString(),...t&&{champId:t.toString()},...a&&{categoryId:a.toString()},...i&&{type:i},...void 0!==l&&{live:l.toString()},...void 0!==s&&{outright:s.toString()},...void 0!==r&&{page:r.toString()},...void 0!==n&&{pageSize:n.toString()}}),u=await fetch(`${p}/events?${o}`);if(!u.ok)throw Error(`Failed to fetch events: ${u.status}`);return(await u.json()).map(e=>({...e,startDate:new Date(e.startDate)}))}async function b({page:e,pageSize:t,live:a}={}){let i=new URLSearchParams({...void 0!==e&&{page:e.toString()},...void 0!==t&&{pageSize:t.toString()},...a&&{live:"true"}}),l=await fetch(`${p}/sports?${i}`);if(!l.ok)throw Error(`Failed to fetch sports: ${l.status}`);return l.json()}var v=e.i(343794),S=e.i(618566),R=e.i(271645),C=e.i(770703),w=e.i(639941),y=e.i(220413);let L=(0,C.default)(()=>e.A(729887),{loadableGenerated:{modules:[864740]}}),A=({debounce:e=!1})=>{let i=(0,d.useText)(),{isBelowMd:l}=(0,a.useBreakpoint)("md"),{y:s}=(0,r.useWindowScroll)(),[n,o]=(0,R.useState)(!1),[u,c]=(0,R.useState)(!1),[m,g]=(0,R.useState)(null),{handleSearchChange:_,initialSearchString:p,isSearching:x,setIsSearching:b,searchText:S,setSearchText:C,clearSearch:A}=(0,w.useLobbySearch)(),I=(0,v.default)(y.default["search-field"],{[
2y.default.active]:u||S.length>0});(0,R.useEffect)(()=>{p&&(b(!!p),_(p),C(p))},[p,_]);let E=(0,R.useCallback)(t=>{let a=t.target.value;C(a),e?(m&&window.clearTimeout(m),g(window.setTimeout(()=>{b(""!==t.target.value),window.scrollTo(0,0),_(a)},400))):_(a)},[m,e,_]),B=(0,R.useCallback)(()=>{c(!0)},[]),j=(0,R.useCallback)(()=>{c(!1)},[]);return(0,R.useEffect)(()=>{o(l&&!x&&s>125)},[l,x,s]),(0,t.jsxs)("search",{role:"search",className:(0,v.default)(y.default.root,{[y.default.sticky]:n,[y.default.focuessed]:u}),children:[(0,t.jsxs)("div",{className:I,children:[(0,t.jsx)(f.Icon,{name:h.SvgIcon.Search,className:y.default.icon,size:{width:"1.5rem",height:"1.5rem"}}),(0,t.jsx)("input",{dir:"ltr",type:"text",role:"searchbox",placeholder:i("LOBBY_SEARCH_BAR_PLACEHOLDER"),value:S,onBlur:j,onFocus:B,onChange:E,"aria-label":i("LOBBY_SEARCH_BAR_PLACEHOLDER"),autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",spellCheck:"false"})]}),(0,t.jsx)(L,{handleClearSearch:()=>A()})]})};var I=e.i(532181);e.i(973962),e.i(486163),e.i(604181),e.i(183330),e.i(662537);var E=e.i(25283);e.i(283096),e.i(839899),e.i(806304),e.i(671496),(0,E.graphql)(`
3  query AltenarBetCount($userId: ID!, $gameProviderId: GameProviderId!) {
4    gameSessionStats(userId: $userId, gameProviderId: $gameProviderId) {
5      totalBetNumber
6    }
7  }
8`),(0,E.graphql)(`
9  mutation StartGame($input: StartGameInput!) {
10    startGame(input: $input) {
11      properties
12      gameSessionId
13    }
14  }
15`),e.i(952700);let B=(0,R.createContext)({searchIsReady:!1,isSearching:!1,setIsSearching:()=>{},searchText:"",setSearchText:()=>{},initialSearchString:"",searchResult:null,handleSearchChange:()=>{},clearSearch:()=>{},isLoading:!1}),j=()=>{let e=(0,S.usePathname)(),t=(0,w.useLobbySearch)(),a=(0,R.useContext)(B);return e?.includes(n.Route.BETTING)?a:t};var k=e.i(397707);let N=({onFocus:e,isSportsbook:a})=>{let i=(0,d.useText)(),[l,s]=(0,R.useState)(!1),[r,n]=(0,R.useState)(null),o=(0,S.usePathname)(),u=(0,R.useRef)(o),{handleSearchChange:m,initialSearchString:g,isSearching:_,setIsSearching:p,searchText:x,setSearchText:b,clearSearch:C}=j();(0,R.useEffect)(()=>{g&&(p(!!g),m(g),b(g))},[g,m]);let w=(0,R.useCallback)(()=>{s(!0)},[]),y=(0,R.useCallback)(()=>{setTimeout(()=>s(!1),250)},[]),L=(0,R.useCallback)(()=>{_&&C()},[_,C]);(0,R.useEffect)(()=>{u.current!==o&&(u.current=o,C({handleQueryString:!1}))},[o,C]),(0,R.useEffect)(()=>{e(l||_)},[l,_,e]);let A=(0,R.useCallback)(e=>{let t=e.target.value;b(t),r&&window.clearTimeout(r),n(window.setTimeout(()=>{p(""!==e.target.value),window.scrollTo(0,0),m(t)},400))},[r,m]);return(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)(I.motion.div,{initial:{minWidth:"44px"},animate:{minWidth:l||_?"250px":"44px",transition:{ease:"linear",duration:.25}},className:"absolute left-4 top-2 z-10",children:[(0,t.jsx)("div",{onClick:L,className:(0,v.default)("cursor-pointer text-input-text bg-input-badge absolute right-1.5 top-1 rounded-full h-8 w-8 z-[6] flex items-center justify-center",{hidden:!l&&!_}),children:(0,t.jsx)(f.Icon,{name:h.SvgIcon.Close,size:{width:"1.25rem",height:"1.25rem"}})}),(0,t.jsx)("input",{className:(0,v.default)("text-input-tex rounded-full px-4 text-base text-input-text bg-input-background border border-input-border outline-none absolute h-full w-full left-0 top-0 z-[5]",{"cursor-pointer":!l&&!_,[k.default.focuessed]:l}),dir:"ltr",type:"text",role:"searchbox",placeholder:i(a?"BETTING_SEARCH_BAR_PLACEHOLDER":"LOBBY_SEARCH_BAR_PLACEHOLDER"),value:x,onBlur:y,onFocus:w,onChange:A,"aria-label":i(a?"BETTING_SEARCH_BAR_PLACEHOLDER":"LOBBY_SEARCH_BAR_PLACEHOLDER"),autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",spellCheck:"false"}),(0,t.jsx)(c.default,{size:"small",className:(0,v.default)(k.default["search-button"],{"scale-0 opacity-0":l||_,"scale-[1.025]":!l&&!_}),variant:c.ButtonVariant.PRIMARY,"aria-label":i(a?"BETTING_SEARCH_BAR_PLACEHOLDER":"LOBBY_SEARCH_BAR_PLACEHOLDER"),children:(0,t.jsx)(f.Icon,{name:h.SvgIcon.Search})})]})})};var O=e.i(247245);let T={[n.Route.LOBBY]:(0,t.jsx)(f.Icon,{name:h.SvgIcon.House}),[n.Route.LOBBY_LIVE]:(0,t.jsx)(f.Icon,{name:h.SvgIcon.Live}),[n.Route.LOBBY_EXCLUSIVE]:(0,t.jsx)(f.Icon,{name:h.SvgIcon.CheckCircle}),[n.Route.LOBBY_CHRISTMAS]:(0,t.jsx)(f.Icon,{className:"[&>svg]:!opacity-100",name:h.SvgIcon.Santa}
15),[n.Route.BETTING_COMBO_PACKAGES]:(0,t.jsx)(f.Icon,{name:h.SportsbookIcon.BetCombo})},G={[n.Route.BETTING_LIVE]:(0,t.jsx)(()=>{let{data:e}=function(){let e,t,a,{showRealityCheck:i}=(0,m.useUser)(),l=async()=>e?(await x({sportId:e,champId:t,categoryId:a,live:!0})).filter(e=>e.isLive).length:(await b({live:!0})).reduce((e,t)=>e+t.eventsCount,0);return(0,g.default)((void 0)??!0?["altenar/live-count",e??"all",t??"all",a??"all"]:null,l,{keepPreviousData:!0,refreshInterval:function(e,t=!1,a=5e3){return e?0:t?a:0}(i,!0,3e4),...void 0})}(),a=null==e?"":e>99?"99":String(e);return(0,t.jsx)("span",{className:"text-[10px] font-bold ml-2 -mr-2 bg-red-500 font-sans text-white w-5 h-5 shrink-0 leading-[0]! flex items-center justify-center rounded-full",children:a})},{})};e.s(["default",0,({inlineSearch:e,sticky:m,exclusiveLobby:g,menuItems:_,showSearchSummary:p=!0,isSportsbook:x=!1})=>{let b=(0,s.useIsScrollLocked)(),C=(0,d.useText)(),{isLoggedIn:w}=(0,o.useAuth)(),y=(0,S.usePathname)(),[L,I]=(0,R.useState)(null),[E,B]=(0,R.useState)(!1),[k,P]=(0,R.useState)(!1),[H,W]=(0,R.useState)(!1),[Y,D]=(0,R.useState)(!1),K=(0,R.useRef)(null),{isAboveLg:M}=(0,a.useBreakpoint)("lg"),{y:z}=(0,r.useWindowScroll)(),{isSearching:$,searchResult:Z}=j(),{x:V}=(0,i.useElementScroll)({element:K}),{isHydrated:U}=(0,l.useIsHydrated)(),F=(0,R.useMemo)(()=>_.filter(e=>!e.authRequired||U&&w===u.IsLoggedIn.YES),[_,w,U]);(0,R.useEffect)(()=>{W(V>5),K.current&&D(K.current.scrollWidth-K.current.offsetWidth-V>=5)},[V]),(0,R.useEffect)(()=>{if(b)return;let e=window.scrollY;B(!!m&&(M&&e>135||!M&&e>98))},[z,m,M,b]),(0,R.useEffect)(()=>{let e=null;for(let t of F)(t.link===y||!t.noChildren&&y.startsWith(t.link))&&(e=t);if(I(e?e.link:null),e){let t=K.current,a=t?.querySelector(`#${e.id}`);if(a){let e=a.offsetLeft-(t?.offsetWidth??0)/2+a.offsetWidth/2;t?.scroll({left:e})}}},[y,F]);let q=(0,R.useMemo)(()=>({"h-[8.75rem] lg:h-[9.5rem]":!e,"h-20":e}),[e]),J=e=>{K.current&&(K.current.scrollLeft+=e)};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:(0,v.default)({[O.default["sticky-background"]]:E})}),(0,t.jsx)("div",{className:(0,v.default)("relative",{"mb-2 lg:mb-8":!m,...q}),children:(0,t.jsxs)("div",{className:(0,v.default)(O.default.root,q,{[O.default.sticky]:E,"pl-[3.75rem]":e&&!k,"pl-[268px]":e&&k}),children:[(0,t.jsx)("div",{className:(0,v.default)(O.default.arrow,{"hidden!":!H,"left-16 top-[0.45rem]":m,"left-2 top-[5.5rem]":!m}),onClick:()=>J(-200),children:(0,t.jsx)(f.Icon,{name:h.SvgIcon.ArrowLeft,size:{width:"1.25rem",height:"1.25rem"}})}),(0,t.jsx)("div",{onClick:()=>J(200),className:(0,v.default)(O.default.arrow,{"hidden!":!Y,"right-2 top-[0.45rem]":m,"right-2 top-[5.5rem]":!m}),children:(0,t.jsx)(f.Icon,{name:h.SvgIcon.ArrowRight,size:{width:"1.25rem",height:"1.25rem"}})}),!e&&(0,t.jsx)("div",{className:"flex w-full lg:max-w-[50rem] flex-col px-4 2xl:px-0",children:(0,t.jsx)(A,{debounce:!0})}),e&&(0,t.jsx)(N,{onFocus:e=>P(e),isSportsbook:x}),(0,t.jsx)("div",{className:(0,v.default)(O.default["buttons-wrapper"],{[O.default["clipping-left"]]:H&&!Y,[O.default["clipping-both"]]:H&&Y,[O.default["clipping-right"]]:!H&&Y}),children:(0,t.jsx)("div",{ref:K,className:(0,v.default)(O.default.buttons,{"ml-2.5":!e}),children:F.map((e,a)=>{let{id:i,link:l,label:s,newFlag:r}=e;if(l===n.Route.LOBBY_EXCLUSIVE&&!g)return null;let o=l===L;return(0,t.jsxs)(c.default,{id:i,svgIconLeft:T[l],size:"small",className:O.default.button,href:l,onClick:()=>{o||window.scrollTo({top:0,behavior:"instant"})},showArrow:o,variant:o?c.ButtonVariant.SECONDARY:c.ButtonVariant.TERTIARY,children:[r&&(0,t.jsx)("div",{className:O.default.new,children:"Nyhet"}),C(s),G[l]]},a)})})})]})}),e&&$&&p&&(0,t.jsx)("div",{className:"px-4 mb-4 -mt-4 text-sm lg:text-base",dangerouslySetInnerHTML:{__html:C("LOBBY_SEARCH_SUMMARY",{count:(Z?.length??"").toString()})}})]})}],519357)},220413,e=>{e.v({active:"search-module__y9WRRa__active",blink:"search-module__y9WRRa__blink",focuessed:"search-module__y9WRRa__focuessed",icon:"search-module__y9WRRa__icon",root:"search-module__y9WRRa__root","search-field":"search-module__y9WRRa__search-field","slide-down":"search-module__y9WRRa__slide-down",sticky:"search-module__y9WRRa__sticky"})},141416,e=>{"use strict";var t=e.i(843476),a=e.i(479017),i=e.i(393374),l=e.i(673104),s=e.i(964964),r=e.i(760516),n=e.i(316091),o=e.i(343794),u=e.i(657688),d=e.i(522016),c=e.i(618566),f=e.i(639941);e.s(["VerticalNavigation",0,({sportPath:e=l.Route.SPORTSBOOK})=>{let h=(0,c.usePathname)(),m=(0,n.useText)(),g=(0,c.useRouter)(),{isLoggedIn:_}=(0,s.useAuth)(),{clearSearch:p}=(0,f.useLobbySearch)();return(0,t.jsx)("div",{children:(0,t.jsxs)("div",{className:"relative flex justify-between items-center gap-6 mt-4 mb-0 lg:mb-6 mx-4",children:[(0,t.jsx)("div",{className:"vertical-nav-decoration"}
15),(0,t.jsx)(d.default,{href:l.Route.HOME,draggable:!1,className:"relative w-20 h-20 lg:w-28 lg:h-2w-28 z-10",prefetch:!1,onClick:e=>{p({handleQueryString:!1}),_===r.IsLoggedIn.YES&&(e.preventDefault(),g.push(l.Route.LOBBY))},children:(0,t.jsx)(u.default,{draggable:!1,alt:m("COMMON_BRAND_LOGO_ALT",{brandName:a.AppConfig.brandName}),fill:!0,src:(0,i.getCdnAsset)(i.CdnAsset.LogoLobbyDesktop)})}),(0,t.jsx)("div",{children:(0,t.jsxs)("div",{className:"font-header uppercase flex gap-2 lg:absolute lg:left-1/2 lg:translate-x-[-50%] lg:top-4",children:[(0,t.jsx)(d.default,{href:l.Route.LOBBY,draggable:!1,className:(0,o.default)("no-underline -skew-x-[10deg] rounded-sm h-10 px-6 text-sm flex items-center justify-center",{"button-primary":!h.startsWith(e),"border-2 border-[#ffffff33]":h.startsWith(e)}),children:(0,t.jsx)("span",{className:"skew-x-[10deg]",children:"Casino"})}),(0,t.jsxs)(d.default,{href:e,draggable:!1,className:(0,o.default)("relative no-underline -skew-x-[10deg] rounded-sm h-10 px-6 text-sm flex items-center justify-center",{"button-primary":h.startsWith(e),"border-2 border-[#ffffff33]":!h.startsWith(e)}),children:[(0,t.jsx)("span",{className:"skew-x-[10deg]",children:"Sport"}),a.AppConfig.instance===a.Instance.OnerushSe&&a.AppConfig.customSportsbookEnabled&&(0,t.jsx)("span",{className:"absolute top-0 right-0 translate-x-1/4 -translate-y-1/2 skew-x-[10deg] rotate-[5deg] bg-success text-white text-xs font-bold leading-none px-1.5 py-1 rounded-sm",children:"Ny"})]})]})})]})})}])}]);
16
17//# debugId=e821226a-57bf-2595-9bc4-36ca81c6eadc

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.