r(n)}}(r,t,I(),n);if(a.add(s),!U.has(r)){let t=()=>{for(let t of a)t.measure()},n=()=>{for(let t of a)t.update(H.uv.timestamp)},s=()=>{for(let t of a)t.notify()},l=()=>{H.Gt.read(t,!1,!0),H.Gt.read(n,!1,!0),H.Gt.update(s,!1,!0)};U.set(r,l);let c=z(r);window.addEventListener("resize",l,{passive:!0}),r!==document.documentElement&&G.set(r,"function"==typeof r?(k.add(r),i||(i=()=>{let t={width:window.innerWidth,height:window.innerHeight},r={target:window,size:t,contentSize:t};k.forEach(t=>t(r))},window.addEventListener("resize",i)),()=>{k.delete(r),!k.size&&i&&(i=void 0)}):function(t,r){o||"undefined"!=typeof ResizeObserver&&(o=new ResizeObserver(A));let n=_(t);return n.forEach(t=>{let n=E.get(t);n||(n=new Set,E.set(t,n)),n.add(r),null==o||o.observe(t)}),()=>{n.forEach(t=>{let n=E.get(t);null==n||n.delete(r),(null==n?void 0:n.size)||null==o||o.unobserve(t)})}}(r,l)),c.addEventListener("scroll",l,{passive:!0})}let l=U.get(r);return H.Gt.read(l,!1,!0),()=>{var t;(0,H.WG)(l);let n=V.get(r);if(!n||(n.delete(s),n.size))return;let o=U.get(r);U.delete(r),o&&(z(r).removeEventListener("scroll",o),null==(t=G.get(r))||t(),window.removeEventListener("resize",o))}}(({x:t,y:r})=>{s.scrollX.set(t.current),s.scrollXProgress.set(t.progress),s.scrollY.set(r.current),s.scrollYProgress.set(r.progress)},{...a,container:(null==t?void 0:t.current)||void 0,target:(null==r?void 0:r.current)||void 0})),[t,r,JSON.stringify(a.offset)]),s}({container:s}),{bottomConstraint:p,setBottomConstraint:f,contentScrollRef:h}=(0,c.useContext)(rL);return h&&(h.current=d),(0,c.useEffect)(()=>{let t,r=s.current,n=r=>{t=r.touches[0].clientY},o=n=>{let o=n.touches[0].clientY;0===r.scrollTop&&o>t&&n.preventDefault()};r.addEventListener("touchstart",n),r.addEventListener("touchmove",o,{passive:!1});let i=u.onChange(t=>{0===t&&0===p&&f(void 0),0!==t&&0!==p&&f(0)});return()=>{r.removeEventListener("touchstart",n),r.removeEventListener("touchmove",o),i()}},[p]),(0,l.jsx)(tL,Object.assign({ref:rM(s,r),overflow:"auto"},a,{children:n}))});let rB=({id:t="portals",children:r})=>{let[n,o]=(0,c.useState)(null),{mediaBreakpoint:i}=e2();return(0,c.useEffect)(()=>{let r=document.getElementById(t);r&&o(r)},[i]),n?ek.createPortal(r,n):null};function rN(t){let r=(0,m.k)(),{isDesktop:n}=e2(),o=(0,c.useMemo)(()=>{if("undefined"==typeof window)return 0;let t=document.createElement("div");t.style.overflow="scroll",document.body.appendChild(t);let r=t.offsetWidth-t.clientWidth;return document.body.removeChild(t),r},[]),i=(0,c.useCallback)(t=>{t?(document.body.style.overflow="hidden",n&&(document.body.style.paddingRight=`${o}px`),r===m.bq.IOS&&(document.body.style.position="relative",document.body.style.height="100%",document.documentElement.style.position="relative",document.documentElement.style.height="100%")):(document.body.style.overflow="visible",n&&(document.body.style.paddingRight=""),r===m.bq.IOS&&(document.body.style.position="",document.body.style.height="",document.documentElement.style.overflow="",document.documentElement.style.position="",document.documentElement.style.height=""))},[r]);(0,c.useEffect)(()=>(i(t),()=>i(!1)),[i,t])}let r$={duration:.1,stiffness:600,damping:30,mass:.2},rF=t=>{var{children:r,isOpen:n,isLocked:o,blurBackground:i,portalsContainerId:a,onClose:s,bgImage:u,fullHeight:d,style:f}=t,h=eP(t,["children","isOpen","isLocked","blurBackground","portalsContainerId","onClose","bgImage","fullHeight","style"]);let g=(0,p.useTheme)(),v=(0,c.useRef)(null),y=(0,c.useRef)(),b=(0,Y.d)(0),[x,S]=(0,c.useState)(void 0),[w,_]=(0,c.useState)(0);(0,m.st)(()=>_(window.innerHeight-160));let E=(0,c.useCallback)((t,r)=>{if(r.velocity.y>400)return void(null==s||s());let n=v.current.clientHeight,o=b.get()/n>.5?n:0;o>=n?null==s||s():ex(b,o,Object.assign({type:"spring"},r$))},[]);if(rN(n),"undefined"==typeof document)return null;let T=`calc(${w}px - env(safe-area-inset-top))`;return(0,l.jsx)(rB,Object.assign({id:a},{children:(0,l.jsx)(eS.N,{children:n&&(0,l.jsx)(ew.m.div,Object.assign({initial:{backgroundColor:g.colors.overlay.darken2},animate:{backgroundColor:g.colors.overlay.darken2,backdropFilter:i?"blur(10px)":void 0},exit:{backgroundColor:"rgba(0,0,0,0)",transition:{delay:.1}},transition:{duration:.2,ease:"easeIn"},style:{position:"fixed",inset:0,overflow:"hidden",zIndex:eR.ModalBackdrop,backgroundColor:g.colors.overlay.darken2},onClick:s,"data-testid":"sheet"},{children:(0,l.jsx)(ew.m.div,Object.assign({initial:{y:"30%"},animate:{y:0},exit:{y:"100%"},transition:r$,style:{y:b,position:"absolute",left:0,bottom:0,width:"100%",zIndex:eR.Modal,borderRadius:"16px 16px 0 0",maxHeight:T},ref:t=>{v.current=t},drag:o?void 0:"y",dragElastic:0,dragMomentum:!1,onDragEnd:E,dragConstraints:{top:0,bottom:x}},{children:(0,l.jsx)(tB,Object.assign({bg:"surface.sp",onClick:t=>t.stopPropagation(),direction:"column",maxH:T,h:d?T:void 0,elevation:3,br:"16px 16px 0 0"},h,{style:Object.assign({backgroundImage:`url(${u})`},f)},{children:(0,l.jsx)(rL.Provider,Object.assign({value:{bottomConstraint:x,setBottomConstraint:S,contentScrollRef:y,onClose:s}},{children:r}))}))}),"sheet")}),"overlay")})}))};rF.Header=({children:t})=>{let{contentScrollRef:r,setBottomConstraint:n,onClose:o}=(0,c.useContext)(rL),i=(0,p.useTheme)().colors.effect.elevation1,a=(0,Y.d)(0),s=function(t,r,n,o){if("function"==typeof t){x.bt.current=[],t();let r=eT(x.bt.current,t);return x.bt.current=void 0,r}let i="function"==typeof r?r:function(...t){let r=!Array.isArray(t[0]),n=r?0:-1,o=t[0+n],i=t[1+n],a=t[2+n],s=t[3+n],l=(0,N.G)(i,a,{mixer:eE(a[0]),...s});return r?l(o):l}(r,n,void 0);return Array.isArray(t)?eA(t,i):eA([t],([t])=>i(t))}((null==r?void 0:r.current)||a,[0,120],[`0 0 0 0 ${i}`,`0 1px 8px 2px ${i}`]);return(0,l.jsxs)(ew.m.div,Object.assign({style:{boxShadow:s},onTouchStart:()=>n(void 0)},{children:[(0,l.jsx)(tB,Object.assign({justify:"flex-end",px:"lg",pt:"sm"},{children:(0,l.jsx)(tI,Object.assign({variant:"unshielded",onClick:o,p:0},{children:(0,l.jsx)(tX,{})}))})),(0,l.jsx)(tL,Object.assign({px:"lg",pb:"xs",mb:"md"},{children:t}))]}))},rF.Content=rD,rF.Footer=({children:t})=>(0,l.jsx)(tL,Object.assign({elevation:3},{children:t}));let rH=p.default.img.withConfig({componentId:"Img"})`
${tm}
${ts}
${tu}
${t=>t.isGrayscale&&"filter: grayscale(100%);"}
object-fit: ${t=>t.objectFit||"cover"};
`,rU=(0,c.forwardRef)((t,r)=>{let{fallback:n,src:o,srcSet:i,loading:a}=t,s=eP(t,["fallback","src","srcSet","loading"]),u={h:t.h,maxH:t.maxH,minH:t.minH,w:t.w,maxW:t.maxW,minW:t.minW,m:t.m,mt:t.mt,mb:t.mb,ml:t.ml,mr:t.mr,mx:t.mx,my:t.my,p:t.p,pt:t.pt,pb:t.pb,pl:t.pl,pr:t.pr,px:t.px,py:t.py},d=function(t){let{loading:r,src:n,srcSet:o,onLoad:i,onError:a,sizes:s,ignoreFallback:l}=t,[u,d]=(0,c.useState)("pending");(0,c.useEffect)(()=>{d(n?"loading":"pending")},[n]);let p=(0,c.useRef)(),f=(0,c.useCallback)(()=>{if(!n)return;let t=new Image;t.src=n,o&&(t.srcset=o),s&&(t.sizes=s),t.onload=t=>{d("loaded"),null==i||i(t)},t.onerror=t=>{d("failed"),null==a||a(t)},p.current=t},[n,o,s,i,a,r]);return(0,c.useLayoutEffect)(()=>{l||"loading"===u&&f()},[u,f,l]),l?"loaded":u}(Object.assign(Object.assign({},t),{ignoreFallback:void 0!==a}));return"pending"===d||"loading"===d||"failed"===d?(0,l.jsx)(tL,Object.assign({style:t.style},u,{children:n})):(0,l.jsx)(rH,Object.assign({src:o,srcSet:i,loading:a,ref:r},s))}),rG=(p.default.div.withConfig({componentId:"CalendarContainer"})`
border: 1px solid ${t=>t.theme.colors.onSurface.nLv4};
border-radius: 8px;
z-index: 1500; // the calendar sometimes goes under the top header
background-color: ${t=>t.theme.colors.surface.s1};
position: absolute;
${t=>t.$isMenuAbove?"bottom: 8px;":"top: 58px;"}
`,(0,p.default)(ej.Ay)`
button,
[type='button'],
[type='reset'],
[type='submit'] {
appearance: none !important;
}
button {
outline: none;
border: none;
background: none;
font-family: ${t=>t.theme.typography.family.sofascoreSans};
}
.react-calendar {
&__navigation {
display: flex;
padding: 10px 5px;
}
&__navigation__label__labelText span {
cursor: pointer;
color: ${t=>t.theme.colors.primary.default};
}
&__year-view__months__month,
&__decade-view__years__year {
cursor: pointer;
padding: 10px;
color: ${t=>t.theme.colors.primary.default};
}
&__year-view__months__month > div,
&__decade-view__years__year > div {
display: none;
}
&__month-view {
&__weekdays {
background-color: ${t=>t.theme.colors.surface.s2};
padding: 8px 0;
&__weekday {
text-align: center;
font: ${t=>t.theme.typography.font.body.small};
color: ${t=>t.theme.colors.onSurface.nLv3};
> abbr {
text-decoration: none;
}
}
}
&__days {
padding: 4px 0;
&__day {
padding: 4px 0;
position: relative;
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
&:not([disabled]):hover {
div.selected {
background-color: ${t=>t.theme.colors.primary.hover};
}
div.not-selected {
background-color: ${t=>t.theme.colors.primary.highlight};
}
}
.left::before,
.right::before {
display: block;
content: '';
width: calc(50% - 16px);
height: calc(100% - 8px);
position: absolute;
background-color: ${t=>t.theme.colors.primary.highlight};
}
.left::after,
.right::after,
.highlighted::after {
display: block;
content: '';
width: 32px;
height: calc(100% - 8px);
position: absolute;
left: 50%;
transform: translateX(-50%);
background-color: ${t=>t.theme.colors.primary.highlight};
}
.left {
::before {
right: 0;
}
::after {
border-radius: 50% 0 0 50%;
}
}
.right {
::before {
left: 0;
}
::after {
border-radius: 0 50% 50% 0;
}
}
.highlighted::after {
border-radius: 50%;
}
}
}
}
}
`);function rV(t,r){return void 0===t?new Date:(String(t).replace("-","").length<11&&(t*=1e3),new Date(t))}function rz(t,r){return rV(t).toDateString()===rV(r).toDateString()}function rW(t,r){return rV(t).setHours(0,0,0,0)=0;n--){var o=r[n];if(o&&1===o.nodeType&&o.hasAttribute(_))return o}}(n),a=void 0!==i?i.nextSibling:null;o.setAttribute(_,"active"),o.setAttribute("data-styled-version","5.3.11");var s=$();return s&&o.setAttribute("nonce",s),n.insertBefore(o,a),o},H=function(){function t(t){var r=this.element=F(t);r.appendChild(document.createTextNode("")),this.sheet=function(t){if(t.sheet)return t.sheet;for(var r=document.styleSheets,n=0,o=r.length;n{let n=0;if(m>1)for(;n