1import{r as l,j as e}from"./vendor-react-BGN68_Lp.js";import{p as w}from"./pickemApi-BdXgbqao.js";import{t as p}from"./vendor-i18n-BWleq_Sd.js";import{dk as k,t as _,w as g,dK as z,G as d,g as L,al as T,N}from"./index-uear5Vpj.js";import{u as P}from"./vendor-redux-D8sX5Eqv.js";import{g as n}from"./vendor-styled-pkIKgjgv.js";import"./vendor-socket-DSYo_sTV.js";import"./vendor-router-CYD8mbvC.js";const $=n.div` 2 padding: 32px 1vw; 3 4 @media (max-width: 768px) { 5 padding: 24px 1vw; 6 } 7`,f=n.img` 8 position: absolute; 9 top: 0; 10 left: 0; 11 width: 100%; 12 height: 100%; 13 object-fit: cover; 14 border-radius: 6px; 15 mask-image: linear-gradient(to bottom, black 30%, transparent 100%); 16 transition: transform 0.3s ease-in-out; 17`,D=n.div` 18 display: flex; 19 gap: 24px; 20 overflow-x: auto; 21 padding-bottom: 36px; 22 23 &::-webkit-scrollbar { 24 height: 4px; 25 } 26 27 @media (max-width: 400px) { 28 scroll-snap-type: x mandatory; 29 } 30`,E=n.div` 31 display: flex; 32 align-items: center; 33 gap: 24px; 34`,R=n.div` 35 padding: 6px 10px; 36 position: absolute; 37 left: 14px; 38 top: 14px; 39 border-radius: 6px; 40 background: rgba(199, 211, 226, 0.12); 41 color: #c7d3e2; 42 font-size: 12px; 43 font-weight: 500; 44 z-index: 1; 45`,S=n(N)` 46 display: flex; 47 width: 240px; 48 height: 770px; 49 padding: 56px 40px 64px 40px; 50 flex-direction: column; 51 justify-content: space-between; 52 align-items: center; 53 border-radius: 6px; 54 background: #131821; 55 overflow: hidden; 56 cursor: pointer; 57 scroll-snap-align: start; 58 59 &.live { 60 border: 3px solid #d94141; 61 } 62 63 h4 { 64 color: #e1e9fd; 65 text-align: center; 66 font-family: 'Roboto'; 67 font-size: 20px; 68 font-weight: 700; 69 line-height: 28px; 70 display: flex; 71 width: 160px; 72 height: 78px; 73 flex-direction: column; 74 justify-content: center; 75 text-transform: none; 76 } 77 78 &:hover { 79 ${f} { 80 transform: scale(1.05); 81 } 82 } 83 84 @media (max-width: 1000px) { 85 height: 460px; 86 padding: 48px 32px 32px 32px; 87 } 88`,Y=n.div` 89 height: 160px; 90 display: flex; 91 align-items: center; 92 justify-content: center; 93 margin-bottom: 24px; 94 95 img { 96 max-width: 90%; 97 max-height: 200px; 98 object-fit: contain; 99 } 100`,h=n.div` 101 color: #919ba7; 102 display: flex; 103 align-items: center; 104 justify-content: center; 105 gap: 6px; 106 font-family: 'Roboto'; 107 font-size: 14px; 108 font-weight: 400; 109 line-height: 26px; 110 text-transform: uppercase; 111 112 &.live { 113 border-radius: 4px; 114 background: #d94141; 115 padding: 0 10px; 116 color: #fff; 117 } 118 119 img { 120 width: 18px; 121 height: 18px; 122 } 123`,m=n.div` 124 border-radius: 8px; 125 background: rgba(112, 123, 153, 0.4); 126 width: 40px; 127 height: 2.5px; 128 flex-shrink: 0; 129`,C=n.div` 130 display: grid; 131 grid-template-columns: 32px 32px; 132 gap: 18px; 133 134 & > div { 135 width: 32px; 136 height: 32px; 137 display: flex; 138 align-items: center; 139 justify-content: center; 140 } 141 142 img { 143 width: 100%; 144 height: 100%; 145 object-fit: contain; 146 } 147`,M=n.div` 148 position: relative; 149 height: 20px; 150 display: flex; 151 align-items: center; 152 margin-bottom: 24px; 153 154 div { 155 width: 100%; 156 height: 10px; 157 border-radius: 4px 0px 0px 4px; 158 border-right: 4px solid #778597; 159 background: linear-gradient( 160 90deg, 161 #131821 0%, 162 rgba(19, 24, 33, 0) 100% 163 ); 164 } 165 166 p { 167 z-index: 1; 168 position: absolute; 169 left: 16px; 170 top: 50%; 171 transform: translateY(-50%); 172 overflow: hidden; 173 color: #778597; 174 font-family: 'Roboto'; 175 font-size: 25px; 176 font-weight: 500; 177 letter-spacing: 1.25px; 178 } 179 180 @media (max-width: 1000px) { 181 p { 182 position: sticky; 183 left: 0; 184 top: 0; 185 transform: none; 186 } 187 188 div { 189 position: relative; 190 top: 5px; 191 } 192 } 193`,B=n.p` 194 width: 80%; 195 margin: 0 auto; 196 margin-top: 32px; 197 color: #5e6a82; 198 text-align: center; 199 font-family: 'Roboto'; 200 font-size: 14px; 201 line-height: 150%; 202 203 span { 204 color: #2a2f3a; 205 } 206 207 @media (max-width: 768px) { 208 width: 100%; 209 } 210`,H=()=>{const c=l.useRef(null),{lang:I}=P(i=>i.root),u=k();l.useEffect(()=>{_("pickem_list_page_open",{is_auth:!!g.get("multitoken"),language:g.get("lang_g")});const i=c.current,t=s=>
210{s.deltaY!==0&&(s.preventDefault(),i.scrollLeft+=s.deltaY)};return i&&i.addEventListener("wheel",t,{passive:!1}),()=>{i&&i.removeEventListener("wheel",t)}},[]);const[r,b]=l.useState([]),v=()=>{w.getPickems().then(i=>{if(i){const t=i.list.reduce((s,a)=>{const o=new Date(+a.unixtime_tournament_start*1e3).getFullYear();return s[o]||(s[o]=[]),s[o].push(a),s},{});b(t)}}).catch(i=>{console.error("Error fetching pickems:",i)})},j=i=>{const t=`/cs2/pickem/${i.url_short}`;return i.events_type===1&&i.stages[0]&&!i.live?`${t}/${i.stages[0].section}`:t};l.useEffect(()=>{v()},[]);function y(i,t){const s=new Date(Number(i)*1e3),a=new Date(Number(t)*1e3),o=x=>`${x.getDate().toString().padStart(2,"0")}.${(x.getMonth()+1).toString().padStart(2,"0")}`;return`${o(s)} â ${o(a)}`}return e.jsxs($,{children:[e.jsx(z,{title:p("pickem_seo_title"),descr:p("pickem_seo_description")}),e.jsx(D,{ref:c,className:"grey-scroll",children:Object.keys(r).reverse().map(i=>e.jsxs("div",{children:[e.jsxs(M,{children:[e.jsx("p",{children:i}),e.jsx("div",{})]}),e.jsx(E,{children:r[i].map(t=>e.jsxs(S,{to:j(t),className:t.live?"live":"",children:[e.jsx(R,{children:t.events_type==1?"Pickâem":"Predictor"}),e.jsx(f,{src:d(t.obj_assets.background_image),alt:""}),e.jsxs("div",{children:[e.jsx(Y,{children:t.user_achievement.status?e.jsx("img",{loading:"lazy",src:d(t.user_achievement.medal.img)}):e.jsx("img",{loading:"lazy",src:d(t.obj_assets.title_image),alt:t.name,style:{height:"100px"}})}),e.jsx("h4",{children:t.name})]}),e.jsxs(h,{children:[e.jsx("img",{loading:"lazy",src:L("/pages/pickem/icons/players.svg"),alt:""}),T(t.count_users)]})," ",!u&&e.jsxs(e.Fragment,{children:[e.jsx(m,{}),e.jsx(C,{children:t.teams_list.map(s=>e.jsx("div",{children:e.jsx("img",{loading:"lazy",src:d(s.logo),alt:""})},t))}),e.jsx(m,{})]}),e.jsx(h,{className:t.live?"live":"",children:y(t.unixtime_tournament_start,t.unixtime_tournament_end)})]},t.id))})]},i))}),r&&Object.keys(r).length>0&&e.jsxs(B,{children:[p("pickemsListText")," ",e.jsx("span",{children:p("pickemsListText2")})]})]})};export{H as default};
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.