fansunited-sports-ui 0.0.7 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.es.js +35 -28
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),A=require("react"),co=require("react-dom"),uo=(e,r)=>{const o=new Array(e.length+r.length);for(let n=0;n<e.length;n++)o[n]=e[n];for(let n=0;n<r.length;n++)o[e.length+n]=r[n];return o},mo=(e,r)=>({classGroupId:e,validator:r}),cr=(e=new Map,r=null,o)=>({nextPart:e,validators:r,classGroupId:o}),De="-",Dt=[],po="arbitrary..",go=e=>{const r=ho(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return xo(i);const l=i.split(De),u=l[0]===""&&l.length>1?1:0;return ur(l,u,r)},getConflictingClassGroupIds:(i,l)=>{if(l){const u=n[i],c=o[i];return u?c?uo(c,u):u:c||Dt}return o[i]||Dt}}},ur=(e,r,o)=>{if(e.length-r===0)return o.classGroupId;const a=e[r],s=o.nextPart.get(a);if(s){const c=ur(e,r+1,s);if(c)return c}const i=o.validators;if(i===null)return;const l=r===0?e.join(De):e.slice(r).join(De),u=i.length;for(let c=0;c<u;c++){const m=i[c];if(m.validator(l))return m.classGroupId}},xo=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const r=e.slice(1,-1),o=r.indexOf(":"),n=r.slice(0,o);return n?po+n:void 0})(),ho=e=>{const{theme:r,classGroups:o}=e;return fo(o,r)},fo=(e,r)=>{const o=cr();for(const n in e){const a=e[n];pt(a,o,n,r)}return o},pt=(e,r,o,n)=>{const a=e.length;for(let s=0;s<a;s++){const i=e[s];bo(i,r,o,n)}},bo=(e,r,o,n)=>{if(typeof e=="string"){jo(e,r,o);return}if(typeof e=="function"){vo(e,r,o,n);return}wo(e,r,o,n)},jo=(e,r,o)=>{const n=e===""?r:mr(r,e);n.classGroupId=o},vo=(e,r,o,n)=>{if(yo(e)){pt(e(n),r,o,n);return}r.validators===null&&(r.validators=[]),r.validators.push(mo(o,e))},wo=(e,r,o,n)=>{const a=Object.entries(e),s=a.length;for(let i=0;i<s;i++){const[l,u]=a[i];pt(u,mr(r,l),o,n)}},mr=(e,r)=>{let o=e;const n=r.split(De),a=n.length;for(let s=0;s<a;s++){const i=n[s];let l=o.nextPart.get(i);l||(l=cr(),o.nextPart.set(i,l)),o=l}return o},yo=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,No=e=>{if(e<1)return{get:()=>{},set:()=>{}};let r=0,o=Object.create(null),n=Object.create(null);const a=(s,i)=>{o[s]=i,r++,r>e&&(r=0,n=o,o=Object.create(null))};return{get(s){let i=o[s];if(i!==void 0)return i;if((i=n[s])!==void 0)return a(s,i),i},set(s,i){s in o?o[s]=i:a(s,i)}}},ut="!",Et=":",Co=[],$t=(e,r,o,n,a)=>({modifiers:e,hasImportantModifier:r,baseClassName:o,maybePostfixModifierPosition:n,isExternal:a}),ko=e=>{const{prefix:r,experimentalParseClassName:o}=e;let n=a=>{const s=[];let i=0,l=0,u=0,c;const m=a.length;for(let N=0;N<m;N++){const S=a[N];if(i===0&&l===0){if(S===Et){s.push(a.slice(u,N)),u=N+1;continue}if(S==="/"){c=N;continue}}S==="["?i++:S==="]"?i--:S==="("?l++:S===")"&&l--}const p=s.length===0?a:a.slice(u);let j=p,v=!1;p.endsWith(ut)?(j=p.slice(0,-1),v=!0):p.startsWith(ut)&&(j=p.slice(1),v=!0);const k=c&&c>u?c-u:void 0;return $t(s,v,j,k)};if(r){const a=r+Et,s=n;n=i=>i.startsWith(a)?s(i.slice(a.length)):$t(Co,!1,i,void 0,!0)}if(o){const a=n;n=s=>o({className:s,parseClassName:a})}return n},So=e=>{const r=new Map;return e.orderSensitiveModifiers.forEach((o,n)=>{r.set(o,1e6+n)}),o=>{const n=[];let a=[];for(let s=0;s<o.length;s++){const i=o[s],l=i[0]==="[",u=r.has(i);l||u?(a.length>0&&(a.sort(),n.push(...a),a=[]),n.push(i)):a.push(i)}return a.length>0&&(a.sort(),n.push(...a)),n}},Ao=e=>({cache:No(e.cacheSize),parseClassName:ko(e),sortModifiers:So(e),...go(e)}),Ro=/\s+/,To=(e,r)=>{const{parseClassName:o,getClassGroupId:n,getConflictingClassGroupIds:a,sortModifiers:s}=r,i=[],l=e.trim().split(Ro);let u="";for(let c=l.length-1;c>=0;c-=1){const m=l[c],{isExternal:p,modifiers:j,hasImportantModifier:v,baseClassName:k,maybePostfixModifierPosition:N}=o(m);if(p){u=m+(u.length>0?" "+u:u);continue}let S=!!N,g=n(S?k.substring(0,N):k);if(!g){if(!S){u=m+(u.length>0?" "+u:u);continue}if(g=n(k),!g){u=m+(u.length>0?" "+u:u);continue}S=!1}const x=j.length===0?"":j.length===1?j[0]:s(j).join(":"),y=v?x+ut:x,P=y+g;if(i.indexOf(P)>-1)continue;i.push(P);const _=a(g,S);for(let B=0;B<_.length;++B){const E=_[B];i.push(y+E)}u=m+(u.length>0?" "+u:u)}return u},Lo=(...e)=>{let r=0,o,n,a="";for(;r<e.length;)(o=e[r++])&&(n=pr(o))&&(a&&(a+=" "),a+=n);return a},pr=e=>{if(typeof e=="string")return e;let r,o="";for(let n=0;n<e.length;n++)e[n]&&(r=pr(e[n]))&&(o&&(o+=" "),o+=r);return o},Mo=(e,...r)=>{let o,n,a,s;const i=u=>{const c=r.reduce((m,p)=>p(m),e());return o=Ao(c),n=o.cache.get,a=o.cache.set,s=l,l(u)},l=u=>{const c=n(u);if(c)return c;const m=To(u,o);return a(u,m),m};return s=i,(...u)=>s(Lo(...u))},Po=[],T=e=>{const r=o=>o[e]||Po;return r.isThemeGetter=!0,r},gr=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,xr=/^\((?:(\w[\w-]*):)?(.+)\)$/i,_o=/^\d+\/\d+$/,Io=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,zo=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Bo=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Oo=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Do=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,se=e=>_o.test(e),C=e=>!!e&&!Number.isNaN(Number(e)),X=e=>!!e&&Number.isInteger(Number(e)),rt=e=>e.endsWith("%")&&C(e.slice(0,-1)),V=e=>Io.test(e),Eo=()=>!0,$o=e=>zo.test(e)&&!Bo.test(e),hr=()=>!1,Go=e=>Oo.test(e),Ho=e=>Do.test(e),Uo=e=>!h(e)&&!f(e),Wo=e=>ue(e,jr,hr),h=e=>gr.test(e),ee=e=>ue(e,vr,$o),ot=e=>ue(e,Zo,C),Gt=e=>ue(e,fr,hr),Vo=e=>ue(e,br,Ho),_e=e=>ue(e,wr,Go),f=e=>xr.test(e),fe=e=>me(e,vr),Fo=e=>me(e,Ko),Ht=e=>me(e,fr),Yo=e=>me(e,jr),qo=e=>me(e,br),Ie=e=>me(e,wr,!0),ue=(e,r,o)=>{const n=gr.exec(e);return n?n[1]?r(n[1]):o(n[2]):!1},me=(e,r,o=!1)=>{const n=xr.exec(e);return n?n[1]?r(n[1]):o:!1},fr=e=>e==="position"||e==="percentage",br=e=>e==="image"||e==="url",jr=e=>e==="length"||e==="size"||e==="bg-size",vr=e=>e==="length",Zo=e=>e==="number",Ko=e=>e==="family-name",wr=e=>e==="shadow",Xo=()=>{const e=T("color"),r=T("font"),o=T("text"),n=T("font-weight"),a=T("tracking"),s=T("leading"),i=T("breakpoint"),l=T("container"),u=T("spacing"),c=T("radius"),m=T("shadow"),p=T("inset-shadow"),j=T("text-shadow"),v=T("drop-shadow"),k=T("blur"),N=T("perspective"),S=T("aspect"),g=T("ease"),x=T("animate"),y=()=>["auto","avoid","all","avoid-page","page","left","right","column"],P=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],_=()=>[...P(),f,h],B=()=>["auto","hidden","clip","visible","scroll"],E=()=>["auto","contain","none"],b=()=>[f,h,u],O=()=>[se,"full","auto",...b()],Q=()=>[X,"none","subgrid",f,h],oe=()=>["auto",{span:["full",X,f,h]},X,f,h],$=()=>[X,"auto",f,h],U=()=>["auto","min","max","fr",f,h],he=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],K=()=>["start","end","center","stretch","center-safe","end-safe"],W=()=>["auto",...b()],J=()=>[se,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...b()],w=()=>[e,f,h],_t=()=>[...P(),Ht,Gt,{position:[f,h]}],It=()=>["no-repeat",{repeat:["","x","y","space","round"]}],zt=()=>["auto","cover","contain",Yo,Wo,{size:[f,h]}],et=()=>[rt,fe,ee],I=()=>["","none","full",c,f,h],D=()=>["",C,fe,ee],Te=()=>["solid","dashed","dotted","double"],Bt=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],L=()=>[C,rt,Ht,Gt],Ot=()=>["","none",k,f,h],Le=()=>["none",C,f,h],Me=()=>["none",C,f,h],tt=()=>[C,f,h],Pe=()=>[se,"full",...b()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[V],breakpoint:[V],color:[Eo],container:[V],"drop-shadow":[V],ease:["in","out","in-out"],font:[Uo],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[V],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[V],shadow:[V],spacing:["px",C],text:[V],"text-shadow":[V],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",se,h,f,S]}],container:["container"],columns:[{columns:[C,h,f,l]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:_()}],overflow:[{overflow:B()}],"overflow-x":[{"overflow-x":B()}],"overflow-y":[{"overflow-y":B()}],overscroll:[{overscroll:E()}],"overscroll-x":[{"overscroll-x":E()}],"overscroll-y":[{"overscroll-y":E()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:O()}],"inset-x":[{"inset-x":O()}],"inset-y":[{"inset-y":O()}],start:[{start:O()}],end:[{end:O()}],top:[{top:O()}],right:[{right:O()}],bottom:[{bottom:O()}],left:[{left:O()}],visibility:["visible","invisible","collapse"],z:[{z:[X,"auto",f,h]}],basis:[{basis:[se,"full","auto",l,...b()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[C,se,"auto","initial","none",h]}],grow:[{grow:["",C,f,h]}],shrink:[{shrink:["",C,f,h]}],order:[{order:[X,"first","last","none",f,h]}],"grid-cols":[{"grid-cols":Q()}],"col-start-end":[{col:oe()}],"col-start":[{"col-start":$()}],"col-end":[{"col-end":$()}],"grid-rows":[{"grid-rows":Q()}],"row-start-end":[{row:oe()}],"row-start":[{"row-start":$()}],"row-end":[{"row-end":$()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":U()}],"auto-rows":[{"auto-rows":U()}],gap:[{gap:b()}],"gap-x":[{"gap-x":b()}],"gap-y":[{"gap-y":b()}],"justify-content":[{justify:[...he(),"normal"]}],"justify-items":[{"justify-items":[...K(),"normal"]}],"justify-self":[{"justify-self":["auto",...K()]}],"align-content":[{content:["normal",...he()]}],"align-items":[{items:[...K(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...K(),{baseline:["","last"]}]}],"place-content":[{"place-content":he()}],"place-items":[{"place-items":[...K(),"baseline"]}],"place-self":[{"place-self":["auto",...K()]}],p:[{p:b()}],px:[{px:b()}],py:[{py:b()}],ps:[{ps:b()}],pe:[{pe:b()}],pt:[{pt:b()}],pr:[{pr:b()}],pb:[{pb:b()}],pl:[{pl:b()}],m:[{m:W()}],mx:[{mx:W()}],my:[{my:W()}],ms:[{ms:W()}],me:[{me:W()}],mt:[{mt:W()}],mr:[{mr:W()}],mb:[{mb:W()}],ml:[{ml:W()}],"space-x":[{"space-x":b()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":b()}],"space-y-reverse":["space-y-reverse"],size:[{size:J()}],w:[{w:[l,"screen",...J()]}],"min-w":[{"min-w":[l,"screen","none",...J()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[i]},...J()]}],h:[{h:["screen","lh",...J()]}],"min-h":[{"min-h":["screen","lh","none",...J()]}],"max-h":[{"max-h":["screen","lh",...J()]}],"font-size":[{text:["base",o,fe,ee]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,f,ot]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",rt,h]}],"font-family":[{font:[Fo,h,r]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[a,f,h]}],"line-clamp":[{"line-clamp":[C,"none",f,ot]}],leading:[{leading:[s,...b()]}],"list-image":[{"list-image":["none",f,h]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",f,h]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:w()}],"text-color":[{text:w()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Te(),"wavy"]}],"text-decoration-thickness":[{decoration:[C,"from-font","auto",f,ee]}],"text-decoration-color":[{decoration:w()}],"underline-offset":[{"underline-offset":[C,"auto",f,h]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:b()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",f,h]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",f,h]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:_t()}],"bg-repeat":[{bg:It()}],"bg-size":[{bg:zt()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},X,f,h],radial:["",f,h],conic:[X,f,h]},qo,Vo]}],"bg-color":[{bg:w()}],"gradient-from-pos":[{from:et()}],"gradient-via-pos":[{via:et()}],"gradient-to-pos":[{to:et()}],"gradient-from":[{from:w()}],"gradient-via":[{via:w()}],"gradient-to":[{to:w()}],rounded:[{rounded:I()}],"rounded-s":[{"rounded-s":I()}],"rounded-e":[{"rounded-e":I()}],"rounded-t":[{"rounded-t":I()}],"rounded-r":[{"rounded-r":I()}],"rounded-b":[{"rounded-b":I()}],"rounded-l":[{"rounded-l":I()}],"rounded-ss":[{"rounded-ss":I()}],"rounded-se":[{"rounded-se":I()}],"rounded-ee":[{"rounded-ee":I()}],"rounded-es":[{"rounded-es":I()}],"rounded-tl":[{"rounded-tl":I()}],"rounded-tr":[{"rounded-tr":I()}],"rounded-br":[{"rounded-br":I()}],"rounded-bl":[{"rounded-bl":I()}],"border-w":[{border:D()}],"border-w-x":[{"border-x":D()}],"border-w-y":[{"border-y":D()}],"border-w-s":[{"border-s":D()}],"border-w-e":[{"border-e":D()}],"border-w-t":[{"border-t":D()}],"border-w-r":[{"border-r":D()}],"border-w-b":[{"border-b":D()}],"border-w-l":[{"border-l":D()}],"divide-x":[{"divide-x":D()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":D()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Te(),"hidden","none"]}],"divide-style":[{divide:[...Te(),"hidden","none"]}],"border-color":[{border:w()}],"border-color-x":[{"border-x":w()}],"border-color-y":[{"border-y":w()}],"border-color-s":[{"border-s":w()}],"border-color-e":[{"border-e":w()}],"border-color-t":[{"border-t":w()}],"border-color-r":[{"border-r":w()}],"border-color-b":[{"border-b":w()}],"border-color-l":[{"border-l":w()}],"divide-color":[{divide:w()}],"outline-style":[{outline:[...Te(),"none","hidden"]}],"outline-offset":[{"outline-offset":[C,f,h]}],"outline-w":[{outline:["",C,fe,ee]}],"outline-color":[{outline:w()}],shadow:[{shadow:["","none",m,Ie,_e]}],"shadow-color":[{shadow:w()}],"inset-shadow":[{"inset-shadow":["none",p,Ie,_e]}],"inset-shadow-color":[{"inset-shadow":w()}],"ring-w":[{ring:D()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:w()}],"ring-offset-w":[{"ring-offset":[C,ee]}],"ring-offset-color":[{"ring-offset":w()}],"inset-ring-w":[{"inset-ring":D()}],"inset-ring-color":[{"inset-ring":w()}],"text-shadow":[{"text-shadow":["none",j,Ie,_e]}],"text-shadow-color":[{"text-shadow":w()}],opacity:[{opacity:[C,f,h]}],"mix-blend":[{"mix-blend":[...Bt(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Bt()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[C]}],"mask-image-linear-from-pos":[{"mask-linear-from":L()}],"mask-image-linear-to-pos":[{"mask-linear-to":L()}],"mask-image-linear-from-color":[{"mask-linear-from":w()}],"mask-image-linear-to-color":[{"mask-linear-to":w()}],"mask-image-t-from-pos":[{"mask-t-from":L()}],"mask-image-t-to-pos":[{"mask-t-to":L()}],"mask-image-t-from-color":[{"mask-t-from":w()}],"mask-image-t-to-color":[{"mask-t-to":w()}],"mask-image-r-from-pos":[{"mask-r-from":L()}],"mask-image-r-to-pos":[{"mask-r-to":L()}],"mask-image-r-from-color":[{"mask-r-from":w()}],"mask-image-r-to-color":[{"mask-r-to":w()}],"mask-image-b-from-pos":[{"mask-b-from":L()}],"mask-image-b-to-pos":[{"mask-b-to":L()}],"mask-image-b-from-color":[{"mask-b-from":w()}],"mask-image-b-to-color":[{"mask-b-to":w()}],"mask-image-l-from-pos":[{"mask-l-from":L()}],"mask-image-l-to-pos":[{"mask-l-to":L()}],"mask-image-l-from-color":[{"mask-l-from":w()}],"mask-image-l-to-color":[{"mask-l-to":w()}],"mask-image-x-from-pos":[{"mask-x-from":L()}],"mask-image-x-to-pos":[{"mask-x-to":L()}],"mask-image-x-from-color":[{"mask-x-from":w()}],"mask-image-x-to-color":[{"mask-x-to":w()}],"mask-image-y-from-pos":[{"mask-y-from":L()}],"mask-image-y-to-pos":[{"mask-y-to":L()}],"mask-image-y-from-color":[{"mask-y-from":w()}],"mask-image-y-to-color":[{"mask-y-to":w()}],"mask-image-radial":[{"mask-radial":[f,h]}],"mask-image-radial-from-pos":[{"mask-radial-from":L()}],"mask-image-radial-to-pos":[{"mask-radial-to":L()}],"mask-image-radial-from-color":[{"mask-radial-from":w()}],"mask-image-radial-to-color":[{"mask-radial-to":w()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":P()}],"mask-image-conic-pos":[{"mask-conic":[C]}],"mask-image-conic-from-pos":[{"mask-conic-from":L()}],"mask-image-conic-to-pos":[{"mask-conic-to":L()}],"mask-image-conic-from-color":[{"mask-conic-from":w()}],"mask-image-conic-to-color":[{"mask-conic-to":w()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:_t()}],"mask-repeat":[{mask:It()}],"mask-size":[{mask:zt()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",f,h]}],filter:[{filter:["","none",f,h]}],blur:[{blur:Ot()}],brightness:[{brightness:[C,f,h]}],contrast:[{contrast:[C,f,h]}],"drop-shadow":[{"drop-shadow":["","none",v,Ie,_e]}],"drop-shadow-color":[{"drop-shadow":w()}],grayscale:[{grayscale:["",C,f,h]}],"hue-rotate":[{"hue-rotate":[C,f,h]}],invert:[{invert:["",C,f,h]}],saturate:[{saturate:[C,f,h]}],sepia:[{sepia:["",C,f,h]}],"backdrop-filter":[{"backdrop-filter":["","none",f,h]}],"backdrop-blur":[{"backdrop-blur":Ot()}],"backdrop-brightness":[{"backdrop-brightness":[C,f,h]}],"backdrop-contrast":[{"backdrop-contrast":[C,f,h]}],"backdrop-grayscale":[{"backdrop-grayscale":["",C,f,h]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[C,f,h]}],"backdrop-invert":[{"backdrop-invert":["",C,f,h]}],"backdrop-opacity":[{"backdrop-opacity":[C,f,h]}],"backdrop-saturate":[{"backdrop-saturate":[C,f,h]}],"backdrop-sepia":[{"backdrop-sepia":["",C,f,h]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":b()}],"border-spacing-x":[{"border-spacing-x":b()}],"border-spacing-y":[{"border-spacing-y":b()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",f,h]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[C,"initial",f,h]}],ease:[{ease:["linear","initial",g,f,h]}],delay:[{delay:[C,f,h]}],animate:[{animate:["none",x,f,h]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[N,f,h]}],"perspective-origin":[{"perspective-origin":_()}],rotate:[{rotate:Le()}],"rotate-x":[{"rotate-x":Le()}],"rotate-y":[{"rotate-y":Le()}],"rotate-z":[{"rotate-z":Le()}],scale:[{scale:Me()}],"scale-x":[{"scale-x":Me()}],"scale-y":[{"scale-y":Me()}],"scale-z":[{"scale-z":Me()}],"scale-3d":["scale-3d"],skew:[{skew:tt()}],"skew-x":[{"skew-x":tt()}],"skew-y":[{"skew-y":tt()}],transform:[{transform:[f,h,"","none","gpu","cpu"]}],"transform-origin":[{origin:_()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Pe()}],"translate-x":[{"translate-x":Pe()}],"translate-y":[{"translate-y":Pe()}],"translate-z":[{"translate-z":Pe()}],"translate-none":["translate-none"],accent:[{accent:w()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:w()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",f,h]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":b()}],"scroll-mx":[{"scroll-mx":b()}],"scroll-my":[{"scroll-my":b()}],"scroll-ms":[{"scroll-ms":b()}],"scroll-me":[{"scroll-me":b()}],"scroll-mt":[{"scroll-mt":b()}],"scroll-mr":[{"scroll-mr":b()}],"scroll-mb":[{"scroll-mb":b()}],"scroll-ml":[{"scroll-ml":b()}],"scroll-p":[{"scroll-p":b()}],"scroll-px":[{"scroll-px":b()}],"scroll-py":[{"scroll-py":b()}],"scroll-ps":[{"scroll-ps":b()}],"scroll-pe":[{"scroll-pe":b()}],"scroll-pt":[{"scroll-pt":b()}],"scroll-pr":[{"scroll-pr":b()}],"scroll-pb":[{"scroll-pb":b()}],"scroll-pl":[{"scroll-pl":b()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",f,h]}],fill:[{fill:["none",...w()]}],"stroke-w":[{stroke:[C,fe,ee,ot]}],stroke:[{stroke:["none",...w()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Qo=Mo(Xo);function d(...e){return Qo(e.filter(Boolean).join(" "))}const Jo={default:"bg-neutral-700 text-white border-neutral-700",primary:"text-white bg-primary-500 border-primary-500",secondary:"text-white bg-secondary-500 border-secondary-500",danger:"bg-red-600 text-white border-red-700",warning:"bg-yellow-600 text-white border-yellow-700",success:"bg-green-600 text-white border-green-700",info:"bg-cyan-600 text-white border-cyan-700",custom:""};function gt({badge:e}){const r=e.variant||"default",o=r==="custom",n=Jo[r],a=e.styles?.container,s=o?a:d("inline-block text-xs font-semibold px-2 sm:px-3 py-1 rounded border",n,a);return t.jsx("span",{role:"status","aria-label":e.text,className:s,children:e.text})}const es={"top-left":"absolute top-2 sm:top-3 left-2 sm:left-3 flex flex-wrap gap-2 z-10","top-right":"absolute top-2 sm:top-3 right-2 sm:right-3 flex flex-wrap gap-2 justify-end z-10","bottom-left":"absolute bottom-2 sm:bottom-3 left-2 sm:left-3 flex flex-wrap gap-2 z-10","bottom-right":"absolute bottom-2 sm:bottom-3 right-2 sm:right-3 flex flex-wrap gap-2 justify-end z-10"};function xt({badges:e,positions:r=["top-left","top-right","bottom-left","bottom-right"],styles:o}){return!e||e.length===0?null:t.jsx(t.Fragment,{children:r.map(n=>{const a=e.filter(s=>s.position===n);return a.length===0?null:t.jsx("div",{className:d(es[n],o?.container),role:"group","aria-label":`${n} badges`,children:a.map((s,i)=>t.jsx(gt,{badge:s},`${n}-${i}`))},n)})})}const ts={gap:{none:"gap-0",sm:"gap-1",md:"gap-2",lg:"gap-3",xl:"gap-4"}},ht={cell:"backdrop-blur-md bg-black/10 rounded-lg px-2 py-1",gap:"md",typography:{value:"font-bold",label:"text-xs mt-1 opacity-90"}};function rs(e){return`${e?.cell??ht.cell} flex min-w-12 text-center items-center justify-center`}function os(e){return ts.gap[e?.gap??ht.gap]}function Ut(e,r){return r?.typography?.[e]??ht.typography[e]}const ze={days:"Days",hours:"Hours",minutes:"Mins",seconds:"Secs"};function Wt(e){const r=e.getTime()-new Date().getTime();return r<=0?{days:0,hours:0,minutes:0,seconds:0,total:0}:{days:Math.floor(r/(1e3*60*60*24)),hours:Math.floor(r/(1e3*60*60)%24),minutes:Math.floor(r/1e3/60%60),seconds:Math.floor(r/1e3%60),total:r}}function yr({targetDate:e,styles:r,labels:o}){const n=A.useMemo(()=>typeof e=="string"?new Date(e):e,[e]),[a,s]=A.useState(Wt(n)),i=rs(r),l=os(r),u=Ut("value",r),c=Ut("label",r),m={days:o?.days??ze.days,hours:o?.hours??ze.hours,minutes:o?.minutes??ze.minutes,seconds:o?.seconds??ze.seconds};return A.useEffect(()=>{const p=setInterval(()=>{s(Wt(n))},1e3);return()=>clearInterval(p)},[n]),t.jsxs("div",{className:d("flex",l,r?.container),role:"timer","aria-live":"polite",children:[a.days>0&&t.jsxs("div",{className:"flex flex-col items-center",children:[t.jsx("div",{className:d(i,u),children:a.days}),t.jsx("div",{className:c,children:m.days})]}),t.jsxs("div",{className:"flex flex-col items-center",children:[t.jsx("div",{className:d(i,u),children:String(a.hours).padStart(2,"0")}),t.jsx("div",{className:c,children:m.hours})]}),t.jsxs("div",{className:"flex flex-col items-center",children:[t.jsx("div",{className:d(i,u),children:String(a.minutes).padStart(2,"0")}),t.jsx("div",{className:c,children:m.minutes})]}),t.jsxs("div",{className:"flex flex-col items-center",children:[t.jsx("div",{className:d(i,u),children:String(a.seconds).padStart(2,"0")}),t.jsx("div",{className:c,children:m.seconds})]})]})}const ss={default:"bg-muted text-foreground hover:bg-muted/80 border border-transparent",primary:"bg-primary-500 text-white hover:bg-primary-600 border border-transparent",secondary:"bg-secondary-500 text-secondary-foreground hover:bg-secondary-500/80 border border-transparent",outline:"bg-transparent border border-current text-foreground hover:bg-muted",link:"bg-transparent text-primary-500 hover:underline border border-transparent px-0 py-0",custom:""};function ns({text:e,href:r,onClick:o,variant:n,styles:a}){const s=n==="custom",i=ss[n||"default"],l=a?.container,u=s?l:d("box-border w-full flex items-center justify-center px-4 py-2 rounded text-sm font-medium transition-colors whitespace-nowrap cursor-pointer",i,l),c=m=>{o&&(m.preventDefault(),m.stopPropagation(),o())};return r?t.jsx("a",{href:r,className:u,onClick:c,role:"link","aria-label":e,children:e}):t.jsx("button",{type:"button",className:u,onClick:c,"aria-label":e,children:e})}const as={vertical:"flex flex-col gap-2 sm:gap-1.5",horizontal:"flex flex-row gap-2 sm:gap-3",responsive:"flex flex-col sm:flex-row gap-1 sm:gap-2"};function $e({primaryCta:e,secondaryCta:r,layout:o="responsive",styles:n}){return!e&&!r?null:t.jsxs("div",{role:"group","aria-label":"Call to action buttons",className:d(as[o],n?.container),children:[e,r]})}const is={xs:"w-4 h-4",sm:"w-6 h-6",md:"w-8 h-8",lg:"w-10 h-10",xl:"w-12 h-12","2xl":"w-16 h-16","3xl":"w-20 h-20"},ls={1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4"},ds={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl",full:"rounded-full"};function G({name:e,mobileName:r,imageUrl:o,subtitle:n,orientation:a="ltr",truncate:s=!1,styles:i}){const l=i?.imageSize||"md",u=i?.imageBorderRadius||"md",c=i?.imageBorder||"",m=i?.gap||"2",p=i?.textAlign||"left",j=is[l],v=ds[u],k=ls[m],N=i?.typography?.name||"font-semibold leading-5",S=i?.typography?.subtitle||"text-xs text-muted-foreground",g=a==="rtl"?"flex-row-reverse":"flex-row",x=p==="right"?"text-right":"text-left";return t.jsxs("div",{className:d("flex items-center",g,k,i?.container),role:"group","aria-label":`${e}${n?` - ${n}`:""}`,children:[o&&t.jsx("img",{src:o,alt:"","aria-hidden":"true",className:d(j,v,"object-cover shrink-0",c)}),t.jsxs("div",{className:d("flex flex-col",x,s&&"min-w-0"),children:[r?t.jsxs("span",{className:d(N,s&&"truncate"),children:[t.jsx("span",{className:"sm:hidden",children:r}),t.jsx("span",{className:"hidden sm:inline",children:e})]}):t.jsx("span",{className:d(N,s&&"truncate"),children:e}),n&&t.jsx("span",{className:d(S,s&&"truncate"),children:n})]})]})}const pe={sm:{button:"px-2 py-1 text-xs min-w-[28px]",icon:"w-3 h-3",dot:"w-2 h-2"},md:{button:"px-3 py-1.5 text-sm min-w-[36px]",icon:"w-4 h-4",dot:"w-2.5 h-2.5"},lg:{button:"px-4 py-2 text-base min-w-[44px]",icon:"w-5 h-5",dot:"w-3 h-3"}},Ge={sm:"gap-1",md:"gap-2",lg:"gap-3"},He={previous:"Previous",next:"Next",first:"First",last:"Last",loadMore:"Load More",pageInfo:"Page {current} of {total}"},ft=({className:e})=>t.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 19l-7-7 7-7"})}),bt=({className:e})=>t.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})}),cs=({className:e})=>t.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11 19l-7-7 7-7M18 19l-7-7 7-7"})}),us=({className:e})=>t.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13 5l7 7-7 7M6 5l7 7-7 7"})});function F({onClick:e,disabled:r,active:o,size:n,styles:a,children:s,ariaLabel:i}){const l=pe[n],u="inline-flex items-center justify-center rounded-md transition-colors focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-1",c=r?"opacity-50 cursor-not-allowed bg-muted text-muted-foreground":o?d("cursor-pointer bg-primary-500 text-white",a?.typography?.activeButton):d("cursor-pointer bg-muted text-foreground hover:bg-muted/80",a?.typography?.button);return t.jsx("button",{type:"button",onClick:e,disabled:r,"aria-label":i,"aria-current":o?"page":void 0,className:d(u,l.button,c),children:s})}function ms(e,r,o){if(r<=o)return Array.from({length:r},(l,u)=>u+1);const n=Math.floor(o/2);let a=Math.max(1,e-n),s=Math.min(r,a+o-1);s-a+1<o&&(a=Math.max(1,s-o+1));const i=[];a>1&&(i.push(1),a>2&&i.push("ellipsis"));for(let l=a;l<=s;l++)l!==1&&l!==r&&i.push(l);return s<r&&(s<r-1&&i.push("ellipsis"),i.push(r)),i}function ps({currentPage:e,totalPages:r,onPageChange:o,disabled:n,size:a="md",icons:s,labels:i,styles:l,maxVisiblePages:u=5,showFirstLast:c=!1,showPrevNext:m=!0}){const p=pe[a],j={...He,...i},v=ms(e,r,u),k=Ge[l?.gap||"sm"];return t.jsxs("nav",{className:d("flex items-center",k,l?.container),"aria-label":"Pagination",children:[c&&t.jsx(F,{onClick:()=>o(1),disabled:n||e===1,size:a,styles:l,ariaLabel:j.first,children:s?.first||t.jsx(cs,{className:p.icon})}),m&&t.jsx(F,{onClick:()=>o(e-1),disabled:n||e===1,size:a,styles:l,ariaLabel:j.previous,children:s?.previous||t.jsx(ft,{className:p.icon})}),v.map((N,S)=>N==="ellipsis"?t.jsx("span",{className:"px-2 text-muted-foreground",children:"..."},`ellipsis-${S}`):t.jsx(F,{onClick:()=>o(N),disabled:n,active:N===e,size:a,styles:l,ariaLabel:`Page ${N}`,children:N},N)),m&&t.jsx(F,{onClick:()=>o(e+1),disabled:n||e===r,size:a,styles:l,ariaLabel:j.next,children:s?.next||t.jsx(bt,{className:p.icon})}),c&&t.jsx(F,{onClick:()=>o(r),disabled:n||e===r,size:a,styles:l,ariaLabel:j.last,children:s?.last||t.jsx(us,{className:p.icon})})]})}function gs({currentPage:e,totalPages:r,onPageChange:o,disabled:n,size:a="md",icons:s,labels:i,styles:l,showLabels:u=!0}){const c=pe[a],m={...He,...i},p=Ge[l?.gap||"md"];return t.jsxs("nav",{className:d("flex items-center",p,l?.container),"aria-label":"Pagination",children:[t.jsxs(F,{onClick:()=>o(e-1),disabled:n||e===1,size:a,styles:l,ariaLabel:m.previous,children:[s?.previous||t.jsx(ft,{className:c.icon}),u&&t.jsx("span",{className:"ml-1",children:m.previous})]}),t.jsxs(F,{onClick:()=>o(e+1),disabled:n||e===r,size:a,styles:l,ariaLabel:m.next,children:[u&&t.jsx("span",{className:"mr-1",children:m.next}),s?.next||t.jsx(bt,{className:c.icon})]})]})}function xs({currentPage:e,totalPages:r,onPageChange:o,disabled:n,size:a="md",icons:s,labels:i,styles:l}){const u=pe[a],c={...He,...i},m=Ge[l?.gap||"md"],p=c.pageInfo.replace("{current}",String(e)).replace("{total}",String(r));return t.jsxs("nav",{className:d("flex items-center",m,l?.container),"aria-label":"Pagination",children:[t.jsx(F,{onClick:()=>o(e-1),disabled:n||e===1,size:a,styles:l,ariaLabel:c.previous,children:s?.previous||t.jsx(ft,{className:u.icon})}),t.jsx("span",{className:d("px-2",l?.typography?.pageInfo||"text-sm text-muted-foreground"),children:p}),t.jsx(F,{onClick:()=>o(e+1),disabled:n||e===r,size:a,styles:l,ariaLabel:c.next,children:s?.next||t.jsx(bt,{className:u.icon})})]})}function hs({currentPage:e,totalPages:r,onPageChange:o,disabled:n,size:a="md",styles:s}){const i=pe[a],l=Ge[s?.gap||"sm"];return t.jsx("nav",{className:d("flex items-center",l,s?.container),"aria-label":"Pagination",children:Array.from({length:r},(u,c)=>c+1).map(u=>t.jsx("button",{type:"button",onClick:()=>o(u),disabled:n,"aria-label":`Page ${u}`,"aria-current":u===e?"page":void 0,className:d(i.dot,"rounded-full transition-colors focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-1",n?"opacity-50 cursor-not-allowed":"cursor-pointer",u===e?"bg-primary-500":"bg-muted hover:bg-muted-foreground/50")},u))})}function fs({totalPages:e,onPageChange:r,disabled:o,size:n="md",labels:a,styles:s,loading:i=!1,loadingLabel:l="Loading..."}){const u=pe[n],c={...He,...a},m=o||i||e<=1;return t.jsx("nav",{className:d("flex items-center justify-center",s?.container),"aria-label":"Load more",children:t.jsx("button",{type:"button",onClick:()=>r(2),disabled:m,"aria-label":i?l:c.loadMore,className:d("inline-flex items-center justify-center rounded-md transition-colors focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-1",u.button,m?"opacity-50 cursor-not-allowed bg-muted text-muted-foreground":"cursor-pointer bg-primary-500 text-white hover:bg-primary-600",s?.typography?.button),children:i?l:c.loadMore})})}function jt(e){switch(e.variant){case"numbered":return t.jsx(ps,{...e});case"simple":return t.jsx(gs,{...e});case"compact":return t.jsx(xs,{...e});case"dots":return t.jsx(hs,{...e});case"load-more":return t.jsx(fs,{...e});default:return null}}function be({content:e,children:r,position:o="top",styles:n}){const[a,s]=A.useState(!1),[i,l]=A.useState({top:0,left:0}),u=A.useRef(null),c=A.useId(),m=()=>{if(!u.current)return{top:0,left:0};const x=u.current.getBoundingClientRect();switch(o){case"top":return{top:x.top-8,left:x.left+x.width/2};case"bottom":return{top:x.bottom+8,left:x.left+x.width/2};case"left":return{top:x.top+x.height/2,left:x.left-8};case"right":return{top:x.top+x.height/2,left:x.right+8};default:return{top:0,left:0}}},p=()=>{l(m()),s(!0)},j=()=>{s(!1)},v=()=>{l(m()),s(!0)},k=()=>{s(!1)},N={top:"-translate-x-1/2 -translate-y-full",bottom:"-translate-x-1/2",left:"-translate-x-full -translate-y-1/2",right:"-translate-y-1/2"},S={top:"top-full left-1/2 -translate-x-1/2 border-l-transparent border-r-transparent border-b-transparent border-t-gray-900",bottom:"bottom-full left-1/2 -translate-x-1/2 border-l-transparent border-r-transparent border-t-transparent border-b-gray-900",left:"left-full top-1/2 -translate-y-1/2 border-t-transparent border-b-transparent border-r-transparent border-l-gray-900",right:"right-full top-1/2 -translate-y-1/2 border-t-transparent border-b-transparent border-l-transparent border-r-gray-900"},g=a&&t.jsx("div",{id:c,role:"tooltip","aria-hidden":!a,className:d("fixed z-9999 pointer-events-none",N[o],n?.container),style:{top:`${i.top}px`,left:`${i.left}px`},children:t.jsxs("div",{className:"bg-gray-900 text-white text-xs rounded-md py-1.5 px-2.5 whitespace-nowrap shadow-lg",children:[e,t.jsx("div",{className:d("absolute w-0 h-0 border-4",S[o]),"aria-hidden":"true"})]})});return t.jsxs(t.Fragment,{children:[t.jsx("div",{ref:u,className:"inline-block",onMouseEnter:p,onMouseLeave:j,onFocus:v,onBlur:k,"aria-describedby":a?c:void 0,children:r}),typeof document<"u"&&co.createPortal(g,document.body)]})}function Ue(e){const r=!!(e.onClick||e.link),o=A.useCallback(()=>{e.onClick?e.onClick():e.link&&(window.location.href=e.link)},[e]);return{isClickable:r,handleClick:r?o:void 0}}const je={borderRadius:"lg",shadow:"none",hoverShadow:"md",padding:"md",borderWidth:"1"},ve={borderRadius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl","3xl":"rounded-3xl",full:"rounded-full"},shadow:{none:"shadow-none",sm:"shadow-sm",md:"shadow-md",lg:"shadow-lg",xl:"shadow-xl","2xl":"shadow-2xl"},hoverShadow:{none:"hover:shadow-none",sm:"hover:shadow-sm",md:"hover:shadow-md",lg:"hover:shadow-lg",xl:"hover:shadow-xl","2xl":"hover:shadow-2xl"},padding:{none:"p-0",sm:"p-2 sm:p-3",md:"p-3 sm:p-4",lg:"p-4 sm:p-6",xl:"p-6 sm:p-8"},borderWidth:{0:"border-0",1:"border",2:"border-2",4:"border-4",8:"border-8"}},st={title:{hero:"text-lg sm:text-3xl font-bold",standard:"text-lg sm:text-base font-bold",compact:"text-sm sm:text-base font-bold",minimal:"text-sm sm:text-base font-bold",game:"text-lg sm:text-xl md:text-2xl font-bold",promo:"text-2xl sm:text-3xl md:text-4xl font-bold",social:"text-sm font-bold"},subtitle:"text-base sm:text-lg font-semibold",description:"text-sm",category:"text-xs font-semibold uppercase",metadata:"text-xs"};function Nr(e){const r=e?.borderRadius||je.borderRadius;return ve.borderRadius[r]}function bs(e){const r=e?.shadow||je.shadow;return ve.shadow[r]}function js(e){if(!(e?.hoverable??!0))return"";const o=e?.hoverShadow||je.hoverShadow;return ve.hoverShadow[o]}function vs(e){const r=e?.padding||je.padding;return ve.padding[r]}function ws(e){const r=e?.borderWidth||je.borderWidth;return ve.borderWidth[r]}function ys(e){return e?.borderColor||"border-border"}function Y(e,r,o){return r?.typography?.[e]?r.typography[e]:e==="title"&&o&&o in st.title?st.title[o]:st[e]}function Ns(e){const r=[Nr(e),bs(e),js(e),ws(e),ys(e)];return e?.container&&r.push(e.container),r.filter(Boolean).join(" ")}function Cs(e){const r=[Nr(e)];return e?.imageContainer&&r.push(e.imageContainer),r.filter(Boolean).join(" ")}function ks(e){return e?.background||""}const Ss={standard:{imageAspectRatio:"16/9"},standardHorizontal:{imageAspectRatio:"16/9"},hero:{imageAspectRatio:"16/9"},minimal:{imageAspectRatio:"1/1"},promo:{imageAspectRatio:"16/9"}};function we(e,r="standard"){return A.useMemo(()=>{const o=Ss[r],n=e?.imageAspectRatio||o.imageAspectRatio;return{container:Ns(e),imageContainer:Cs(e),padding:vs(e),background:ks(e),imageAspectRatio:n,typography:{title:Y("title",e,r),subtitle:Y("subtitle",e),description:Y("description",e),category:Y("category",e),metadata:Y("metadata",e)},isHoverable:e?.hoverable??!0}},[e,r])}function Cr({content:e,styles:r,primaryCta:o,secondaryCta:n,matchScore:a}){const s=e.image?.url,i=e.gradient||"linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 50%, transparent 100%)",{isClickable:l,handleClick:u}=Ue(e),c=we(r,"hero");return t.jsx("article",{className:d("dark group overflow-hidden",c.container,l&&"cursor-pointer"),onClick:u,children:t.jsxs("div",{className:d("relative overflow-hidden",c.background,c.imageContainer),style:{aspectRatio:c.imageAspectRatio},children:[s?t.jsx("img",{src:s,alt:e.image?.alt||e.title||"",className:"absolute inset-0 w-full h-full object-cover"}):t.jsx("div",{className:"absolute inset-0 bg-linear-to-br from-primary-600 to-primary-800"}),s&&t.jsx("div",{className:"absolute inset-0 z-0",style:{background:i}}),t.jsx(xt,{badges:e.badges,positions:["top-left","top-right"]}),t.jsx("div",{className:d("absolute inset-0 flex flex-col justify-end z-10",c.padding),children:t.jsxs("div",{className:"flex flex-col justify-between h-full",children:[t.jsx("div",{className:"flex-1"}),t.jsxs("div",{children:[a&&t.jsx("div",{className:"mb-1",children:a}),t.jsxs("div",{className:"hidden md:flex items-center justify-start space-x-3 ",children:[e.badges&&e.badges.filter(m=>m.position==="bottom-left").length>0&&t.jsx("div",{className:"mb-2 flex flex-wrap gap-2",children:e.badges.filter(m=>m.position==="bottom-left").map((m,p)=>t.jsx(gt,{badge:m},p))}),e.category&&t.jsx("div",{className:d(c.typography.category,"text-white/90 mb-2 uppercase tracking-wide"),children:e.category})]}),e.title&&t.jsxs("h3",{className:d(c.typography.title,"text-white mb-2",c.isHoverable&&"transition-colors"),children:[e.contextLabel&&t.jsx("div",{className:"text-black px-1 mr-2 mb-1 inline-block bg-white",children:e.contextLabel}),t.jsx("div",{children:e.title})]}),e.description&&t.jsx("p",{className:d(c.typography.description,"text-white/90 mb-2 max-w-3xl hidden md:block line-clamp-2"),children:e.description}),e.metadata?.time&&t.jsx("div",{className:d(c.typography.metadata,"text-white/70"),children:e.metadata.time})]}),t.jsx($e,{primaryCta:o,secondaryCta:n,layout:"responsive",styles:{container:"mt-4"}})]})})]})})}const As=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Rs=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(r,o,n)=>n?n.toUpperCase():o.toLowerCase()),Vt=e=>{const r=Rs(e);return r.charAt(0).toUpperCase()+r.slice(1)},kr=(...e)=>e.filter((r,o,n)=>!!r&&r.trim()!==""&&n.indexOf(r)===o).join(" ").trim(),Ts=e=>{for(const r in e)if(r.startsWith("aria-")||r==="role"||r==="title")return!0};var Ls={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"};const Ms=A.forwardRef(({color:e="currentColor",size:r=24,strokeWidth:o=2,absoluteStrokeWidth:n,className:a="",children:s,iconNode:i,...l},u)=>A.createElement("svg",{ref:u,...Ls,width:r,height:r,stroke:e,strokeWidth:n?Number(o)*24/Number(r):o,className:kr("lucide",a),...!s&&!Ts(l)&&{"aria-hidden":"true"},...l},[...i.map(([c,m])=>A.createElement(c,m)),...Array.isArray(s)?s:[s]]));const We=(e,r)=>{const o=A.forwardRef(({className:n,...a},s)=>A.createElement(Ms,{ref:s,iconNode:r,className:kr(`lucide-${As(Vt(e))}`,`lucide-${e}`,n),...a}));return o.displayName=Vt(e),o};const Ps=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],_s=We("check",Ps);const Is=[["path",{d:"M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z",key:"kmsa83"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],zs=We("circle-play",Is);const Bs=[["path",{d:"M5 12h14",key:"1ays0h"}]],Os=We("minus",Bs);const Ds=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Es=We("x",Ds),$s={sm:"w-8 h-8 sm:w-10 sm:h-10",md:"w-12 h-12 sm:w-16 sm:h-16",lg:"w-16 h-16 sm:w-20 sm:h-20 md:w-24 md:h-24",xl:"w-20 h-20 sm:w-24 sm:h-24 md:w-32 md:h-32","2xl":"w-24 h-24 sm:w-32 sm:h-32 md:w-40 md:h-40","3xl":"w-32 h-32 sm:w-40 sm:h-40 md:w-48 md:h-48","4xl":"w-40 h-40 sm:w-48 sm:h-48 md:w-56 md:h-56","5xl":"w-48 h-48 sm:w-56 sm:h-56 md:w-64 md:h-64"};function Sr({content:e,styles:r}){const o=r?.mainIconSize||"md",n=$s[o];return r?.mainIcon?t.jsx("div",{className:"absolute inset-0 flex items-center justify-center z-20",children:t.jsx("div",{className:n,children:r.mainIcon})}):e.type==="video"?t.jsx("div",{className:"absolute inset-0 flex items-center justify-center z-20",children:t.jsx(zs,{className:d(n,"text-white opacity-90")})}):null}function Ar({imageUrl:e,alt:r,aspectRatio:o,imageContainerClasses:n,content:a,styles:s,showBadges:i=!0,badgePositions:l=["top-left","top-right","bottom-left","bottom-right"],fallbackGradient:u=!1}){return t.jsxs("div",{className:d("relative w-full",n),style:{aspectRatio:o},children:[e?t.jsx("img",{src:e,alt:r||a.title||"",className:"absolute inset-0 w-full h-full object-cover"}):u?t.jsx("div",{className:"absolute inset-0 bg-linear-to-br from-primary-600 to-primary-800"}):null,i&&t.jsx(xt,{badges:a.badges,positions:l}),t.jsx(Sr,{content:a,styles:s})]})}function Rr({content:e,styles:r,isHoverable:o=!0,primaryCta:n,secondaryCta:a,ctaLayout:s="vertical",bettingOdds:i,matchScore:l}){const u=Y("title",r,"compact"),c=Y("category",r),m=Y("description",r),p=Y("metadata",r);return t.jsxs("div",{className:"flex flex-col justify-between h-full",children:[t.jsxs("div",{children:[l&&t.jsx("div",{className:"mb-1",children:l}),e.category&&t.jsx("div",{className:d(c,"text-muted-foreground mb-1"),children:e.category}),e.title&&t.jsxs("h3",{className:d(u,"text-foreground mb-1",o&&"group-hover:text-primary transition-colors"),children:[e.contextLabel&&t.jsx("div",{className:"text-white px-1 mr-2 mb-1 inline-block bg-neutral-700",children:e.contextLabel}),t.jsx("div",{children:e.title})]}),e.description&&t.jsx("p",{className:d(m,"text-muted-foreground mb-2"),children:e.description}),(e.metadata?.author||e.metadata?.time)&&t.jsxs("div",{className:d("flex items-center gap-2 text-muted-foreground",p),children:[e.metadata.author&&t.jsx("span",{children:e.metadata.author}),e.metadata.author&&e.metadata.time&&t.jsx("span",{children:"•"}),e.metadata.time&&t.jsx("span",{children:e.metadata.time})]})]}),(n||a||i)&&t.jsxs("div",{className:"flex flex-col space-y-0",children:[(n||a)&&t.jsxs("div",{className:d("flex mt-4",s==="horizontal"?"flex-col sm:flex-row gap-2 sm:gap-3":"flex-col gap-2"),children:[n&&t.jsx("div",{className:s==="horizontal"?"w-full sm:w-auto":"w-full",children:n}),a&&t.jsx("div",{className:s==="horizontal"?"w-full sm:w-auto":"w-full",children:a})]}),i&&t.jsx("div",{className:n||a?"mt-2":"mt-4",children:i})]})]})}function Tr({content:e,styles:r,primaryCta:o,secondaryCta:n,bettingOdds:a,matchScore:s}){const i=e.image?.url,{isClickable:l,handleClick:u}=Ue(e),c=we(r,"standard");return t.jsxs("article",{className:d("group bg-card text-card-foreground border-border overflow-hidden",c.container,c.background,l&&"cursor-pointer"),onClick:u,children:[i&&t.jsx(Ar,{imageUrl:i,alt:e.image?.alt,aspectRatio:c.imageAspectRatio,imageContainerClasses:c.imageContainer,content:e,styles:r}),t.jsx("div",{className:c.padding,children:t.jsx(Rr,{content:e,styles:r,isHoverable:c.isHoverable,primaryCta:o,secondaryCta:n,bettingOdds:a,matchScore:s})})]})}function Gs({content:e,styles:r,primaryCta:o,secondaryCta:n,bettingOdds:a,matchScore:s}){const i=e.image?.url,{isClickable:l,handleClick:u}=Ue(e),c=we(r,"standardHorizontal");return t.jsxs("article",{className:d("group bg-card text-card-foreground border-border overflow-hidden flex flex-col sm:flex-row",c.container,c.background,l&&"cursor-pointer"),onClick:u,children:[i&&t.jsx("div",{className:"relative w-full sm:w-2/5 shrink-0",children:t.jsx(Ar,{imageUrl:i,alt:e.image?.alt,aspectRatio:c.imageAspectRatio,imageContainerClasses:c.imageContainer,content:e,styles:r})}),t.jsx("div",{className:d("flex-1",c.padding),children:t.jsx(Rr,{content:e,styles:r,isHoverable:c.isHoverable,primaryCta:o,secondaryCta:n,ctaLayout:"horizontal",bettingOdds:a,matchScore:s})})]})}function Lr({content:e,styles:r,primaryCta:o,secondaryCta:n}){const a=e.coverImage?.url,s=!!e.gradient,i=e.textColor||"white",l=we(r,"promo");let u="",c={color:i};return l.background?u=l.background:a?c={backgroundImage:`url(${a})`,backgroundSize:"cover",backgroundPosition:"center",color:i}:s?c={background:e.gradient,color:i}:u="bg-gradient-to-br from-gray-500 to-gray-800",t.jsx("div",{className:d("dark overflow-hidden border-none",l.container),children:t.jsxs("div",{className:d(l.padding,u),style:c,children:[(e.image||e.subtitle)&&t.jsxs("div",{className:"flex flex-col md:flex-row md:justify-between md:items-center mb-4 gap-3",children:[e.image&&t.jsx("div",{className:"text-center md:text-left",children:t.jsx("img",{src:e.image.url,alt:e.image.alt||e.title||"",className:"h-12 sm:h-12 my-4 w-auto inline-block"})}),e.subtitle&&t.jsx("div",{className:d(l.typography.subtitle,"opacity-80 text-center md:text-left"),children:e.subtitle})]}),t.jsxs("div",{className:"flex flex-col md:flex-row items-center md:items-end justify-between gap-6",children:[t.jsxs("div",{className:"flex-1 text-center md:text-left",children:[e.title&&t.jsx("h3",{className:d(l.typography.title,"mb-2"),children:e.title}),e.description&&t.jsx("p",{className:d(l.typography.description,"opacity-90 max-w-xl"),children:e.description}),e.metrics&&e.metrics.length>0&&t.jsx("div",{className:"flex gap-6 mt-4 justify-center md:justify-start",children:e.metrics.map((m,p)=>t.jsxs("div",{className:"text-center md:text-left",children:[t.jsx("div",{className:"text-2xl font-bold",children:m.value}),t.jsx("div",{className:"text-xs opacity-80",children:m.label})]},p))}),e.countdownTo&&t.jsx("div",{className:"mt-4 flex justify-center md:justify-start",children:t.jsx(yr,{targetDate:e.countdownTo})})]}),(o||n||e.disclaimer)&&t.jsxs("div",{className:"flex flex-col items-center md:items-end gap-3 shrink-0",children:[t.jsx($e,{primaryCta:o,secondaryCta:n,layout:"horizontal"}),e.disclaimer&&t.jsx("p",{className:"text-xs opacity-70",children:e.disclaimer})]})]})]})})}function Mr({content:e,styles:r,primaryCta:o,secondaryCta:n,bettingOdds:a,matchScore:s}){const{isClickable:i,handleClick:l}=Ue(e),u=we(r,"minimal");return t.jsx("article",{className:d("group",u.container,i&&"cursor-pointer"),onClick:l,children:t.jsxs("div",{className:d("flex gap-3 sm:gap-4",u.padding,u.background),children:[e.image&&t.jsxs("div",{className:d("shrink-0 w-20 sm:w-24 overflow-hidden relative",u.imageContainer),style:{aspectRatio:u.imageAspectRatio},children:[t.jsx("img",{src:e.image.url,alt:e.image.alt||e.title||"",className:"w-full h-full object-cover"}),t.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:t.jsx(Sr,{content:e,styles:r})})]}),t.jsxs("div",{className:"flex-1 min-w-0 flex flex-col justify-between",children:[t.jsxs("div",{children:[s&&t.jsx("div",{className:"mb-2",children:s}),e.category&&t.jsx("div",{className:d(u.typography.category,"text-muted-foreground mb-1"),children:e.category}),e.title&&t.jsxs("h3",{className:d(u.typography.title,"text-foreground mb-1",u.isHoverable&&"group-hover:text-primary transition-colors"),children:[e.contextLabel&&t.jsx("span",{className:"text-white px-1 mr-1 mb-1 inline-block bg-neutral-700 rounded-sm",children:e.contextLabel}),e.title]}),(e.metadata?.author||e.metadata?.time)&&t.jsxs("div",{className:d("flex items-center gap-2 text-muted-foreground",u.typography.metadata),children:[e.metadata.author&&t.jsx("span",{children:e.metadata.author}),e.metadata.author&&e.metadata.time&&t.jsx("span",{children:"•"}),e.metadata.time&&t.jsx("span",{children:e.metadata.time})]})]}),t.jsxs("div",{children:[t.jsx($e,{primaryCta:o,secondaryCta:n,layout:"responsive",styles:{container:"mt-4"}}),a&&t.jsx("div",{className:"mt-2",children:a})]})]})]})})}function q({content:e,variant:r,styles:o,primaryCta:n,secondaryCta:a,bettingOdds:s,matchScore:i}){switch(r||"standard"){case"hero":return t.jsx(Cr,{content:e,styles:o,primaryCta:n,secondaryCta:a,matchScore:i});case"standardHorizontal":return t.jsx(Gs,{content:e,styles:o,primaryCta:n,secondaryCta:a,bettingOdds:s,matchScore:i});case"promo":return t.jsx(Lr,{content:e,styles:o,primaryCta:n,secondaryCta:a});case"minimal":return t.jsx(Mr,{content:e,styles:o,primaryCta:n,secondaryCta:a,bettingOdds:s,matchScore:i});case"standard":default:return t.jsx(Tr,{content:e,styles:o,primaryCta:n,secondaryCta:a,bettingOdds:s,matchScore:i})}}const ge={borderRadius:"lg",shadow:"none",hoverShadow:"md",padding:"md",borderWidth:"1",logoSize:"md"},xe={borderRadius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl","3xl":"rounded-3xl",full:"rounded-full"},shadow:{none:"shadow-none",sm:"shadow-sm",md:"shadow-md",lg:"shadow-lg",xl:"shadow-xl","2xl":"shadow-2xl"},hoverShadow:{none:"hover:shadow-none",sm:"hover:shadow-sm",md:"hover:shadow-md",lg:"hover:shadow-lg",xl:"hover:shadow-xl","2xl":"hover:shadow-2xl"},padding:{none:"p-0",sm:"p-2",md:"p-3 sm:p-4",lg:"p-4 sm:p-6",xl:"p-6 sm:p-8"},borderWidth:{0:"border-0",1:"border",2:"border-2",4:"border-4",8:"border-8"},logoSize:{xs:"w-4 h-4",sm:"w-6 h-6",md:"w-8 h-8",lg:"w-10 h-10",xl:"w-12 h-12","2xl":"w-16 h-16","3xl":"w-20 h-20"}};function Hs(e){const r=e?.borderRadius||ge.borderRadius;return xe.borderRadius[r]}function Us(e){const r=e?.shadow||ge.shadow;return xe.shadow[r]}function Ws(e){if(!(e?.hoverable??!0))return"";const o=e?.hoverShadow||ge.hoverShadow;return xe.hoverShadow[o]}function Vs(e){const r=e?.padding||ge.padding;return xe.padding[r]}function Fs(e){const r=e?.borderWidth||ge.borderWidth;return xe.borderWidth[r]}function Ys(e){return e?.borderColor||"border-border"}function qs(e){const r=e?.logoSize||ge.logoSize;return xe.logoSize[r]}function Zs(e){const r=[Hs(e),Us(e),Ws(e),Fs(e),Ys(e)];return e?.container&&r.push(e.container),r.filter(Boolean).join(" ")}function H(e){return e?.main??null}function ae(e){return e?.breakdown?.penalties?e.breakdown.penalties:null}const Ks={inline:"xs",scoreCard:"md",scoreLine:"md",embedded:"sm"},Xs={inline:{teamName:"text-sm text-foreground",score:"text-lg font-bold text-foreground",status:"text-xs text-foreground/90",metadata:"text-xs text-foreground/90"},scoreCard:{teamName:"text-sm sm:text-base font-semibold",score:"text-xl sm:text-2xl font-bold",status:"text-xs sm:text-sm font-medium",metadata:"text-xs"},scoreLine:{teamName:"text-sm sm:text-base font-semibold",score:"text-xl sm:text-2xl font-bold",status:"text-xs sm:text-sm font-medium",metadata:"text-xs"},embedded:{teamName:"text-sm font-medium",score:"text-sm font-bold",status:"text-xs font-medium",metadata:"text-xs"}},Qs={inline:{borderWidth:"0",borderRadius:"none",shadow:"none",hoverable:!1},scoreCard:{},scoreLine:{},embedded:{borderWidth:"0",borderRadius:"none",shadow:"none",padding:"none",hoverable:!1}};function Ve(e,r="scoreCard"){return A.useMemo(()=>{const o=Ks[r],n=e?.logoSize||o,s={...Qs[r],...e,logoSize:n},i=Xs[r];return{container:Zs(s),padding:Vs(s),background:s.background||(r==="inline"?"":"bg-card text-card-foreground"),logoSize:qs(s),logoSizeValue:n,typography:{teamName:e?.typography?.teamName||i.teamName,score:e?.typography?.score||i.score,status:e?.typography?.status||i.status,metadata:e?.typography?.metadata||i.metadata},isHoverable:s.hoverable??!0}},[e,r])}function Fe(e){const r=!!(e.onClick||e.link),o=A.useCallback(()=>{e.onClick?e.onClick():e.link&&(window.location.href=e.link)},[e]);return{isClickable:r,handleClick:r?o:void 0}}function Pr({match:e,styles:r}){const o=Ve(r,"inline"),{isClickable:n,handleClick:a}=Fe(e),s=e.competitorTwo.shortName||e.competitorTwo.name,i=e.competitorOne.shortName||e.competitorOne.name,l=e.period?.label??((e.period?.current?` ${e.period.current}`:"")||e.status.toUpperCase());return t.jsxs("div",{className:d("inline-flex items-center gap-1.5",o.container,n&&"cursor-pointer hover:opacity-80"),onClick:a,children:[t.jsx("span",{className:o.typography.teamName,children:s}),e.competitorTwo.logo&&t.jsx("img",{src:e.competitorTwo.logo.url,alt:e.competitorTwo.name,className:d(o.logoSize,"object-contain rounded-full")}),H(e.competitorTwo.score)!==null&&t.jsx("span",{className:o.typography.score,children:H(e.competitorTwo.score)}),t.jsx("span",{className:"mx-0.5 text-foreground",children:"-"}),H(e.competitorOne.score)!==null&&t.jsx("span",{className:o.typography.score,children:H(e.competitorOne.score)}),e.competitorOne.logo&&t.jsx("img",{src:e.competitorOne.logo.url,alt:e.competitorOne.name,className:d(o.logoSize,"object-contain rounded-full")}),t.jsx("span",{className:o.typography.teamName,children:i}),t.jsx("span",{className:d(o.typography.status,"ml-0.5"),children:l})]})}function Ee({team:e,score:r,penaltyScore:o,isWinner:n,variant:a,classes:s,logoSize:i="md",align:l="left"}){return a==="scoreCard"?t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx(G,{name:e.name,imageUrl:e.logo?.url,subtitle:e.subtitle,styles:{container:"flex-1",imageSize:i,typography:{name:d("text-foreground",s.typography.teamName),subtitle:d("text-muted-foreground",s.typography.metadata)}}}),t.jsxs("div",{className:"flex items-center gap-2",children:[o!=null&&t.jsx("span",{className:d("text-xs px-1.5 py-0.5 rounded",n?"bg-green-100 dark:bg-green-900/30 text-green-700 dark:text-green-400 font-bold":"text-muted-foreground"),children:o}),r!==null&&t.jsx("span",{className:d("text-foreground",s.typography.score),children:r})]})]}):t.jsx("div",{className:l==="right"?"justify-self-end":"justify-self-start",children:t.jsx(G,{name:e.name,mobileName:e.shortName,imageUrl:e.logo?.url,subtitle:e.subtitle,orientation:l==="right"?"rtl":"ltr",styles:{imageSize:i,typography:{name:d("text-foreground",s.typography.teamName),subtitle:d("text-muted-foreground",s.typography.metadata)},gap:"2",textAlign:l==="right"?"right":"left"}})})}function Js({competitorOneScore:e,competitorTwoScore:r,competitorOnePenalty:o,competitorTwoPenalty:n,winner:a,classes:s,isLive:i,liveIndicator:l,statusText:u,period:c}){const m=o!==null||n!==null;return t.jsxs("div",{className:"flex items-center gap-2 sm:gap-3 shrink-0",children:[t.jsxs("div",{className:"flex items-center gap-1.5",children:[m&&o!==null&&o!==void 0&&t.jsx("span",{className:d("text-xs px-1.5 py-0.5 rounded",a==="competitorOne"?"bg-muted-foreground text-muted font-bold":"bg-muted text-muted-foreground"),children:o}),e!==null&&t.jsx("span",{className:d("text-foreground",s.typography.score),children:e})]}),u?t.jsxs("div",{className:"flex flex-col items-center",children:[i&&l&&t.jsx("div",{className:d("w-2 h-2 rounded-full mb-1 animate-pulse",l.color||"bg-primary-500")}),t.jsx("span",{className:d(s.typography.status,"text-muted-foreground whitespace-nowrap"),children:u}),c?.current&&!i&&t.jsx("span",{className:d(s.typography.metadata,"text-muted-foreground"),children:c.current})]}):t.jsx("span",{className:d("text-muted-foreground",s.typography.score),children:"-"}),t.jsxs("div",{className:"flex items-center gap-1.5",children:[r!==null&&t.jsx("span",{className:d("text-foreground",s.typography.score),children:r}),m&&n!==null&&n!==void 0&&t.jsx("span",{className:d("text-xs px-1.5 py-0.5 rounded",a==="competitorTwo"?"bg-muted-foreground text-muted font-bold":"bg-muted text-muted-foreground"),children:n})]})]})}function _r({odds:e,operator:r,styles:o={}}){const{container:n="",padding:a="md",typography:s="md",mode:i="default",flashInterval:l=3e3}=o,[u,c]=A.useState(!0);A.useEffect(()=>{if(i!=="flash")return;const g=setInterval(()=>{c(x=>!x)},l);return()=>clearInterval(g)},[i,l]);const m=()=>{const g={none:"",sm:"px-1.5 py-1",md:"px-2 py-1.5",lg:"px-3 py-2"};return g[a]||g.md},p=()=>{const g={sm:"text-xs",md:"text-xs",lg:"text-sm"};return g[s]||g.md},j=g=>!g||g==="none"?null:t.jsx("span",{className:d("ml-0.5",g==="up"?"text-green-500":"text-red-500"),children:g==="up"?"↑":"↓"}),v=(g,x=!1)=>{const y=m(),P=p(),_=t.jsxs("div",{className:d("flex items-center cursor-pointer justify-between",P),children:[t.jsx("span",{className:"text-muted-foreground",children:g.label}),t.jsxs("span",{className:"font-bold",children:[g.value,j(g.change)]})]}),B=d(x?"":"flex-1","bg-muted hover:bg-muted/60 text-foreground rounded transition-colors",y),E=b=>{b.stopPropagation(),g.onClick&&(b.preventDefault(),g.onClick(g))};return g.url?t.jsx("a",{href:g.url,target:"_blank",rel:"noopener noreferrer",className:B,onClick:E,children:_},g.label):t.jsx("button",{className:B,onClick:E,children:_},g.label)},k=g=>{g.stopPropagation(),r?.onClick&&(g.preventDefault(),r.onClick(r))},N=(g="")=>{if(!r)return null;const x=m();return t.jsx("a",{href:r.url,target:"_blank",rel:"noopener noreferrer",className:d("flex items-center justify-center bg-muted/50 hover:bg-muted/70 rounded transition-colors",x,g),style:{backgroundColor:r.backgroundColor},onClick:k,children:r.logo?t.jsx("img",{src:r.logo.url,alt:r.name,className:"h-4 w-auto object-contain"}):t.jsx("span",{className:"text-xs font-semibold",style:{color:r.textColor},children:r.name})})},S=e.length>3;return i==="flash"?t.jsx("div",{className:d(S?"space-y-1":"flex gap-1",n),children:u&&r?N("flex-1"):S?t.jsx("div",{className:"grid grid-cols-3 gap-1",children:e.map(g=>v(g,!0))}):t.jsx(t.Fragment,{children:e.map(g=>v(g,!1))})}):S?t.jsxs("div",{className:d("space-y-1",n),children:[N(),t.jsx("div",{className:"grid grid-cols-3 gap-1",children:e.map(g=>v(g,!0))})]}):t.jsxs("div",{className:d("flex gap-1",n),children:[N("w-full max-w-[110px]"),e.map(g=>v(g,!1))]})}function Ir({match:e,styles:r,primaryCta:o,secondaryCta:n}){const a=Ve(r,"scoreCard"),{isClickable:s,handleClick:i}=Fe(e),l=e.status==="live",u=!!e.odds,c=o||n,m=ae(e.competitorOne.score),p=ae(e.competitorTwo.score),j=e.metadata?.winner;return t.jsx("article",{className:d(a.background,a.container,s&&"cursor-pointer"),onClick:i,children:t.jsxs("div",{className:a.padding,children:[t.jsxs("div",{className:"flex items-center justify-between mb-2",children:[l&&e.liveIndicator?t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("div",{className:d("w-2 h-2 rounded-full animate-pulse",e.liveIndicator.color||"bg-primary-500")}),t.jsx("span",{className:d("text-foreground",a.typography.status),children:"LIVE"})]}):t.jsx("span",{className:d("text-foreground py-1",a.typography.status),children:e.period?.label||e.metadata?.time||""}),l&&e.period?.current&&t.jsx("span",{className:d("text-foreground",a.typography.metadata),children:e.period.current})]}),t.jsxs("div",{className:d("space-y-2",!!(u||c)&&"mb-3"),children:[t.jsx(Ee,{team:e.competitorOne,score:H(e.competitorOne.score),penaltyScore:m,isWinner:j==="competitorOne",variant:"scoreCard",classes:a,logoSize:a.logoSizeValue}),t.jsx(Ee,{team:e.competitorTwo,score:H(e.competitorTwo.score),penaltyScore:p,isWinner:j==="competitorTwo",variant:"scoreCard",classes:a,logoSize:a.logoSizeValue})]}),u&&t.jsx("div",{className:d("pt-2 border-t border-border",!!c&&"mb-3"),children:t.jsx(_r,{odds:e.odds.odds,operator:e.odds.operator,label:e.odds.label,styles:{padding:r?.padding==="xl"?"lg":r?.padding}})}),c&&t.jsx("div",{className:"pt-2 border-t border-border",children:t.jsxs("div",{className:"flex flex-col sm:flex-row gap-2",children:[o,n]})})]})})}function zr({match:e,styles:r}){const o=Ve(r,"scoreLine"),{isClickable:n,handleClick:a}=Fe(e),s=e.status==="live",i=s&&e.period?.current?e.period.current:e.period?.label||e.status.toUpperCase(),l=ae(e.competitorOne.score),u=ae(e.competitorTwo.score),c=e.metadata?.winner;return t.jsx("article",{className:d(o.background,o.container,n&&"cursor-pointer",o.isHoverable&&"transition-opacity hover:opacity-90"),onClick:a,children:t.jsxs("div",{className:d(o.padding,"grid grid-cols-[1fr_auto_1fr] items-center gap-4"),children:[t.jsx(Ee,{team:e.competitorOne,score:null,variant:"scoreLine",classes:o,logoSize:o.logoSizeValue}),t.jsx(Js,{competitorOneScore:H(e.competitorOne.score),competitorTwoScore:H(e.competitorTwo.score),competitorOnePenalty:l,competitorTwoPenalty:u,winner:c,classes:o,isLive:s,liveIndicator:e.liveIndicator,statusText:i,period:e.period}),t.jsx(Ee,{team:e.competitorTwo,score:null,variant:"scoreLine",classes:o,logoSize:o.logoSizeValue,align:"right"})]})})}const en={xs:"xs",sm:"xs",md:"sm",lg:"md",xl:"lg","2xl":"xl","3xl":"2xl"},Ft={square:"sm",round:"full"};function tn(e,r){switch(e.status){case"scheduled":return e.metadata?.date||"-";case"live":return e.period?.current||"LIVE";case"final":return r==="date"?e.metadata?.date||e.period?.label||"FT":e.period?.label||"FT";case"postponed":return"PPD";case"cancelled":return"CAN";case"suspended":return"SUS";default:return e.period?.label||"-"}}function rn({match:e,styles:r}){const o=Ve(r,"embedded"),{isClickable:n,handleClick:a}=Fe(e),s=e.status==="live",i=e.liveIndicator?.color||"bg-red-500",l=H(e.competitorOne.score),u=H(e.competitorTwo.score),c=ae(e.competitorOne.score),m=ae(e.competitorTwo.score),p=c!==null||m!==null,j=e.metadata?.winner,v=e.status==="scheduled",k=e.metadata?.time||e.period?.label||"-",N=tn(e,r?.finishedStatusDisplay),S=r?.statusColumnWidth||"w-[60px]",g=r?.typography?.status||"text-xs font-medium",x=en[r?.logoSize||"md"],y=Ft[e.competitorOne.logoShape||"square"],P=Ft[e.competitorTwo.logoShape||"square"],_={imageSize:x,gap:"2",typography:{name:o.typography.teamName}};return t.jsxs("article",{className:d("flex items-center w-full",o.padding,n&&"cursor-pointer",r?.container),onClick:a,children:[t.jsxs("div",{className:d("shrink-0 flex items-center justify-start gap-1.5",S,g,s?"text-danger":"text-muted-foreground"),children:[s&&t.jsx("div",{className:d("w-2 h-2 rounded-full animate-pulse shrink-0",i)}),t.jsx("span",{children:N})]}),t.jsxs("div",{className:"flex-1 flex items-center justify-center min-w-0",children:[t.jsx("div",{className:"flex-1 min-w-0 flex justify-end",children:t.jsx(G,{name:e.competitorOne.name,imageUrl:e.competitorOne.logo?.url,orientation:"rtl",truncate:!0,styles:{..._,imageBorderRadius:y,textAlign:"right"}})}),t.jsx("div",{className:"shrink-0 px-3 text-center min-w-[70px]",children:v?t.jsx("span",{className:d(o.typography.score,"text-muted-foreground"),children:k}):t.jsxs("div",{className:"flex items-center justify-center gap-1",children:[p&&c!==null&&t.jsx("span",{className:d("text-[10px] px-1 py-0.5 rounded",j==="competitorOne"?"bg-muted-foreground text-muted font-bold":"bg-muted text-muted-foreground"),children:c}),t.jsxs("span",{className:d(o.typography.score,s&&"text-danger"),children:[l," - ",u]}),p&&m!==null&&t.jsx("span",{className:d("text-[10px] px-1 py-0.5 rounded",j==="competitorTwo"?"bg-muted-foreground text-muted font-bold":"bg-muted text-muted-foreground"),children:m})]})}),t.jsx("div",{className:"flex-1 min-w-0 flex justify-start",children:t.jsx(G,{name:e.competitorTwo.name,imageUrl:e.competitorTwo.logo?.url,orientation:"ltr",truncate:!0,styles:{..._,imageBorderRadius:P,textAlign:"left"}})})]})]})}function z({match:e,variant:r,styles:o,primaryCta:n,secondaryCta:a}){switch(r||"scoreCard"){case"inline":return t.jsx(Pr,{match:e,styles:o});case"scoreLine":return t.jsx(zr,{match:e,styles:o});case"embedded":return t.jsx(rn,{match:e,styles:o});case"scoreCard":default:return t.jsx(Ir,{match:e,styles:o,primaryCta:n,secondaryCta:a})}}const ye={borderRadius:"lg",shadow:"none",padding:"md",borderWidth:"1",logoSize:"md"},Ne={borderRadius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl","3xl":"rounded-3xl"},shadow:{none:"shadow-none",sm:"shadow-sm",md:"shadow-md",lg:"shadow-lg",xl:"shadow-xl","2xl":"shadow-2xl"},padding:{none:"p-0",sm:"p-2",md:"p-3 sm:p-4",lg:"p-4 sm:p-6",xl:"p-6 sm:p-8"},borderWidth:{0:"border-0",1:"border",2:"border-2",4:"border-4",8:"border-8"},logoSize:{xs:"w-4 h-4",sm:"w-6 h-6",md:"w-8 h-8",lg:"w-10 h-10",xl:"w-12 h-12","2xl":"w-16 h-16","3xl":"w-20 h-20"}},on={header:"text-xs uppercase font-bold text-muted-foreground",cell:"text-sm text-foreground",disclaimer:"text-xs text-muted-foreground",legend:"text-xs text-muted-foreground"};function sn(e){const r=e?.borderRadius||ye.borderRadius;return Ne.borderRadius[r]}function nn(e){const r=e?.shadow||ye.shadow;return Ne.shadow[r]}function an(e){const r=e?.padding||ye.padding;return Ne.padding[r]}function ln(e){const r=e?.borderWidth||ye.borderWidth;return Ne.borderWidth[r]}function dn(e){return e?.borderColor||"border-border"}function cn(e){const r=e?.logoSize||ye.logoSize;return Ne.logoSize[r]}function Be(e,r){return r?.typography?.[e]?r.typography[e]:on[e]}function un(e){return e?.background||"bg-card"}function mn(e){const r=[sn(e),nn(e),ln(e),dn(e),un(e)];return e?.container&&r.push(e.container),r.filter(Boolean).join(" ")}function pn(e){return A.useMemo(()=>({container:mn(e),padding:an(e),logoSize:cn(e),typography:{header:Be("header",e),cell:Be("cell",e),disclaimer:Be("disclaimer",e),legend:Be("legend",e)},table:e?.table||"",headerRow:e?.headerRow||"",bodyRow:e?.bodyRow||"",legendContainer:e?.legendContainer||"",isHoverable:e?.hoverable??!0}),[e])}function gn(e){switch(e){case"center":return"text-center";case"right":return"text-right";case"left":default:return"text-left"}}function Yt(e){switch(e){case"none":return"0";case"xs":return"28px";case"sm":return"36px";case"md":return"48px";case"lg":return"96px";case"xl":return"128px";case"2xl":return"160px";case"3xl":return"192px";case"4xl":return"256px";case"flex":return"1fr";case"auto":default:return"auto"}}function Br(e){return typeof e=="object"&&e!==null&&("mobile"in e||"desktop"in e)}function mt(e,r){return e.filter(o=>Br(o.width)?(r==="mobile"?o.width.mobile:o.width.desktop)!=="none":o.width!=="none")}function qt(e,r){const o=["4px"];return mt(e,r).forEach(a=>{if(Br(a.width)){const s=r==="mobile"?a.width.mobile:a.width.desktop;o.push(Yt(s))}else o.push(Yt(a.width))}),o.join(" ")}function Oe(e){const r=gn(e.align);return e.key==="entity"||e.key==="team"||e.key==="player"||e.key==="user"?d("flex items-center gap-1 min-w-0",e.className):d(r,e.className)}function xn({columns:e,rows:r,legend:o,showLegend:n,disclaimer:a,description:s,styles:i,onRowClick:l,filterRowIds:u}){const c=pn(i),m=A.useMemo(()=>{if(!u||u.length===0)return r;const x=new Set(u);return r.filter(y=>x.has(y.id))},[r,u]),p=A.useMemo(()=>{if(o)return o;const x=new Map;return m.forEach(y=>{if(y.zone){const P=`${y.zone.color}-${y.zone.label}`;x.has(P)||x.set(P,{color:y.zone.color,label:y.zone.label})}}),Array.from(x.values())},[m,o]),j=n!==void 0?n:p.length>0,v=A.useMemo(()=>mt(e,"mobile"),[e]),k=A.useMemo(()=>mt(e,"desktop"),[e]),N=A.useMemo(()=>qt(e,"mobile"),[e]),S=A.useMemo(()=>qt(e,"desktop"),[e]),g=i?.container||c.container;return t.jsx("div",{className:g,children:t.jsxs("div",{className:c.padding,children:[t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("ul",{className:c.table,children:[t.jsxs("li",{className:d("md:hidden grid items-center gap-1 border-b border-border pb-3",c.headerRow),style:{gridTemplateColumns:N},children:[t.jsx("div",{"aria-label":"Zone"}),v.map(x=>t.jsx("div",{className:d(c.typography.header,Oe(x)),children:x.header},x.key))]}),t.jsxs("li",{className:d("hidden md:grid items-center gap-1 border-b border-border pb-3 lg:px-2",c.headerRow),style:{gridTemplateColumns:S},children:[t.jsx("div",{"aria-label":"Zone"}),k.map(x=>t.jsx("div",{className:d(c.typography.header,Oe(x)),children:x.header},x.key))]}),m.map(x=>t.jsxs("li",{className:d("relative border-b border-border last:border-0",x.highlight&&"bg-muted",c.isHoverable&&l&&"hover:bg-muted/50 cursor-pointer transition-colors",c.bodyRow),onClick:()=>l?.(x),children:[x.zone&&t.jsx("div",{className:d("absolute left-0 top-0 bottom-0 w-1 rounded-r-sm",x.zone.color)}),t.jsxs("div",{className:"md:hidden grid items-center gap-1 py-3 pl-2",style:{gridTemplateColumns:N},children:[t.jsx("div",{}),v.map(y=>t.jsx("div",{className:d(c.typography.cell,Oe(y)),children:y.render?y.render(x[y.key],x):x[y.key]},y.key))]}),t.jsxs("div",{className:"hidden md:grid items-center gap-1 py-3 lg:px-2 pl-2",style:{gridTemplateColumns:S},children:[t.jsx("div",{}),k.map(y=>t.jsx("div",{className:d(c.typography.cell,Oe(y)),children:y.render?y.render(x[y.key],x):x[y.key]},y.key))]})]},x.id))]})}),s&&t.jsx("div",{className:d("mt-4",c.typography.disclaimer),children:s}),j&&p.length>0&&t.jsx("div",{className:d("mt-4 flex flex-wrap gap-4",c.legendContainer),children:p.map((x,y)=>t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("div",{className:d("w-3 h-4 rounded-sm",x.color)}),t.jsx("span",{className:c.typography.legend,children:x.label})]},y))}),a&&t.jsx("div",{className:d("mt-4",c.typography.disclaimer),children:a})]})})}const vt={borderRadius:"md",padding:"md",alignment:"left"},te={borderRadius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl","3xl":"rounded-3xl"},padding:{none:"p-0",sm:"p-2",md:"p-4",lg:"p-6",xl:"p-8"},alignment:{left:"text-left items-start",center:"text-center items-center",right:"text-right items-end"},gap:{none:"gap-0",xs:"gap-0.5",sm:"gap-1",md:"gap-2",lg:"gap-4",xl:"gap-6"},colsMobile:{1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6"},colsTablet:{1:"md:grid-cols-1",2:"md:grid-cols-2",3:"md:grid-cols-3",4:"md:grid-cols-4",5:"md:grid-cols-5",6:"md:grid-cols-6",8:"md:grid-cols-8",10:"md:grid-cols-10",11:"md:grid-cols-11",12:"md:grid-cols-12"},colsDesktop:{1:"lg:grid-cols-1",2:"lg:grid-cols-2",3:"lg:grid-cols-3",4:"lg:grid-cols-4",5:"lg:grid-cols-5",6:"lg:grid-cols-6",8:"lg:grid-cols-8",10:"lg:grid-cols-10",11:"lg:grid-cols-11",12:"lg:grid-cols-12"}},hn={default:{value:"text-2xl font-bold text-foreground",label:"text-xs font-medium text-foreground uppercase",secondaryLabel:"text-xs text-foreground"},stacked:{value:"text-2xl font-bold text-foreground",label:"text-[10px] font-medium text-foreground uppercase tracking-wider",secondaryLabel:"text-xs text-foreground"},horizontal:{value:"text-lg font-bold text-foreground",label:"text-sm text-foreground",secondaryLabel:"text-xs text-foreground"}};function fn(e){const r=e?.borderRadius||vt.borderRadius;return te.borderRadius[r]}function bn(e){const r=e?.padding||vt.padding;return te.padding[r]}function wt(e){const r=e?.alignment||vt.alignment;return te.alignment[r]}function jn(e){return e?.container||""}function ne(e,r,o){return r?.typography?.[e]?r.typography[e]:hn[o||"default"][e]}function vn(e){const r=e?.colsMobile||2,o=e?.colsTablet||3,n=e?.colsDesktop||3,a=e?.gap||"sm";return["grid",te.colsMobile[r],te.colsTablet[o],te.colsDesktop[n],te.gap[a]].join(" ")}function Or(e){return["flex flex-col",fn(e),bn(e),wt(e),jn(e)].filter(Boolean).join(" ")}function wn(e,r,o){return A.useMemo(()=>({grid:vn(e),item:{container:Or(r),alignment:wt(r),typography:{value:ne("value",r,o),label:ne("label",r,o),secondaryLabel:ne("secondaryLabel",r,o)}}}),[e,r,o])}function yt(e,r){return A.useMemo(()=>({container:Or(e),alignment:wt(e),typography:{value:ne("value",e,r),label:ne("label",e,r),secondaryLabel:ne("secondaryLabel",e,r)}}),[e,r])}function Dr({item:e,styles:r}){const o=yt(r,"default"),n=o.container;return t.jsxs("div",{className:n,children:[t.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.icon&&t.jsx("span",{className:"shrink-0",children:e.icon}),t.jsx("span",{className:o.typography.label,children:e.label})]}),t.jsx("div",{className:o.typography.value,children:e.value}),e.secondaryLabel&&t.jsx("div",{className:d("mt-1",o.typography.secondaryLabel),children:e.secondaryLabel})]})}function Er({item:e,styles:r}){const o=yt(r,"stacked"),n=o.container;return t.jsxs("div",{className:n,children:[e.icon&&t.jsx("div",{className:"mb-2",children:e.icon}),t.jsx("div",{className:d("mb-2",o.typography.label),children:e.label}),t.jsx("div",{className:o.typography.value,children:e.value}),e.secondaryLabel&&t.jsx("div",{className:d("mt-1",o.typography.secondaryLabel),children:e.secondaryLabel})]})}function $r({item:e,styles:r,orientation:o="ltr"}){const n=yt(r,"horizontal"),a=n.container,s=o==="ltr"?"items-start":"items-end",i=t.jsxs("div",{className:d("flex flex-col gap-1",s),children:[e.icon&&t.jsx("span",{className:"shrink-0",children:e.icon}),t.jsx("span",{className:n.typography.label,children:e.label}),e.secondaryLabel&&t.jsx("div",{className:n.typography.secondaryLabel,children:e.secondaryLabel})]}),l=t.jsx("div",{className:n.typography.value,children:e.value});return t.jsx("div",{className:a,children:t.jsx("div",{className:"flex items-center justify-between gap-4 w-full",children:o==="ltr"?t.jsxs(t.Fragment,{children:[i,l]}):t.jsxs(t.Fragment,{children:[l,i]})})})}function Gr({item:e,styles:r,variant:o="default",orientation:n}){const a={item:e,styles:r};switch(o){case"stacked":return t.jsx(Er,{...a});case"horizontal":return t.jsx($r,{...a,orientation:n});default:return t.jsx(Dr,{...a})}}function re({items:e=[],itemVariant:r="default",itemOrientation:o,styles:n}){const{container:a="",grid:s,item:i}=n||{},l=wn(s,i,r),u=a||l.grid;return t.jsx("div",{className:u,children:e.map(c=>t.jsx(Gr,{item:c,styles:i,variant:r,orientation:o},c.id))})}const Ye={padding:"none",itemSpacing:"md",borderRadius:"none",background:""},qe={leftBarColor:"bg-green-500",rightBarColor:"bg-blue-500",height:"md",borderRadius:"sm"},Ce={padding:{none:"p-0",sm:"p-2",md:"p-4",lg:"p-6",xl:"p-8"},itemSpacing:{none:"gap-0",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8"},borderRadius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl"},barHeight:{xs:"h-1",sm:"h-1.5",md:"h-2",lg:"h-3"},barBorderRadius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},yn={bar:{label:"text-sm font-medium text-foreground",leftValue:"text-sm font-semibold text-foreground",rightValue:"text-sm font-semibold text-foreground"},comparison:{label:"text-sm font-medium text-foreground",leftValue:"text-sm font-semibold text-foreground",rightValue:"text-sm font-semibold text-foreground"}};function Nn(e){const r=e?.padding||Ye.padding;return Ce.padding[r]}function Cn(e){const r=e?.itemSpacing||Ye.itemSpacing;return Ce.itemSpacing[r]}function kn(e){const r=e?.borderRadius||Ye.borderRadius;return Ce.borderRadius[r]}function Sn(e){return e?.background||Ye.background}function Hr(e){const r=e?.height||qe.height;return Ce.barHeight[r]}function Ur(e){const r=e?.borderRadius||qe.borderRadius;return Ce.barBorderRadius[r]}function Wr(e){return e?.leftBarColor||qe.leftBarColor}function Vr(e){return e?.rightBarColor||qe.rightBarColor}function nt(e,r,o="comparison"){return r?.typography?.[e]?r.typography[e]:yn[o][e]}function An(e){return["flex flex-col",Nn(e),Cn(e),kn(e),Sn(e)].filter(Boolean).join(" ")}function Nt(e,r="comparison"){return A.useMemo(()=>{const o=e?.bar;return{container:An(e),typography:{label:nt("label",e,r),leftValue:nt("leftValue",e,r),rightValue:nt("rightValue",e,r)},bar:{height:Hr(o),borderRadius:Ur(o),leftBarColor:Wr(o),rightBarColor:Vr(o)}}},[e,r])}function Fr(e,r){return A.useMemo(()=>{const o={...e,...r};return{height:Hr(o),borderRadius:Ur(o),leftBarColor:Wr(o),rightBarColor:Vr(o)}},[e,r])}function Yr({item:e,styles:r}){const o=Nt(r,"bar"),n=Fr(r?.bar,e.barStyles),a=typeof e.leftValue=="number"?e.leftValue:parseFloat(String(e.leftValue))||0,s=typeof e.rightValue=="number"?e.rightValue:parseFloat(String(e.rightValue))||0,i=a+s,l=i>0?a/i*100:50,u=i>0?s/i*100:50,c=e.leftDisplay??String(e.leftValue),m=e.rightDisplay??String(e.rightValue);return t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center justify-between mb-1",children:[t.jsx("span",{className:d(o.typography.leftValue,"w-12"),children:c}),t.jsxs("div",{className:"flex items-center justify-center gap-1 flex-1",children:[t.jsx("span",{className:o.typography.label,children:e.label}),e.icon&&t.jsx("span",{className:"shrink-0",children:e.icon}),e.description&&t.jsxs("span",{className:"text-xs text-muted-foreground",children:["(",e.description,")"]})]}),t.jsx("span",{className:d(o.typography.rightValue,"w-12 text-right"),children:m})]}),t.jsxs("div",{className:"flex w-full overflow-hidden gap-0.5",children:[t.jsx("div",{className:d(n.leftBarColor,n.height,n.borderRadius,"transition-all duration-300"),style:{width:`${l}%`}}),t.jsx("div",{className:d(n.rightBarColor,n.height,n.borderRadius,"transition-all duration-300"),style:{width:`${u}%`}})]})]})}function qr({item:e,styles:r}){const o=Nt(r,"comparison"),n=Fr(r?.bar,e.barStyles),a=typeof e.leftValue=="number"?e.leftValue:parseFloat(String(e.leftValue))||0,s=typeof e.rightValue=="number"?e.rightValue:parseFloat(String(e.rightValue))||0,i=a+s,l=i>0?a/i*100:50,u=i>0?s/i*100:50,c=e.leftDisplay??String(e.leftValue),m=e.rightDisplay??String(e.rightValue);return t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center justify-between mb-1",children:[t.jsx("span",{className:d(o.typography.leftValue,"w-12"),children:c}),t.jsxs("div",{className:"flex items-center justify-center gap-1 flex-1",children:[t.jsx("span",{className:o.typography.label,children:e.label}),e.icon&&t.jsx("span",{className:"shrink-0",children:e.icon}),e.description&&t.jsxs("span",{className:"text-xs text-muted-foreground",children:["(",e.description,")"]})]}),t.jsx("span",{className:d(o.typography.rightValue,"w-12 text-right"),children:m})]}),t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx("div",{className:d("flex-1 flex justify-end bg-muted",n.height,n.borderRadius),children:t.jsx("div",{className:d(n.leftBarColor,n.height,n.borderRadius,"transition-all duration-300"),style:{width:`${l}%`,minWidth:"2px"}})}),t.jsx("div",{className:d("flex-1 flex justify-start bg-muted",n.height,n.borderRadius),children:t.jsx("div",{className:d(n.rightBarColor,n.height,n.borderRadius,"transition-all duration-300"),style:{width:`${u}%`,minWidth:"2px"}})})]})]})}function Zr({item:e,styles:r}){const o={item:e,styles:r};switch(e.variant){case"bar":return t.jsx(Yr,{...o});case"comparison":default:return t.jsx(qr,{...o})}}function Ct({items:e=[],styles:r}){const o=Nt(r,"comparison"),n=r?.container||o.container;return t.jsx("div",{className:n,children:e.map(a=>t.jsx(Zr,{item:a,styles:r},a.id))})}const kt={win:"W",draw:"D",loss:"L",vs:"vs"};function Rn(e,r={}){const o={...kt,...r};switch(e){case"W":return o.win;case"D":return o.draw;case"L":return o.loss}}function Tn(e){switch(e){case"W":return"bg-green-600";case"D":return"bg-gray-500";case"L":return"bg-red-500"}}function Ln(e){switch(e){case"W":return t.jsx(_s,{height:13,width:13,strokeWidth:3,color:"#fff"});case"D":return t.jsx(Os,{height:13,width:13,strokeWidth:3,color:"#fff"});case"L":return t.jsx(Es,{height:13,width:13,strokeWidth:3,color:"#fff"});default:return null}}function St(e,r){if(r!==void 0){if(String(e.competitorOne?.id)===String(r))return e.competitorTwo;if(String(e.competitorTwo?.id)===String(r))return e.competitorOne}return e.competitorTwo}function Mn(e,r){if(r!==void 0){if(String(e.competitorOne?.id)===String(r))return e.competitorOne;if(String(e.competitorTwo?.id)===String(r))return e.competitorTwo}return e.competitorOne}function Pn(e,r){return St(e,r)?.name||"Unknown"}function Kr(e,r){const o=Mn(e,r),n=St(e,r);if(o?.score!==void 0&&n?.score!==void 0)return`${o.score}-${n.score}`}function Xr(e,r,o={}){const n={...kt,...o},a=[],s=Pn(e,r);a.push(`${n.vs} ${s}`);const i=Kr(e,r);return i&&a.push(i),e.date&&a.push(e.date),a.length===0?e.outcome==="W"?"Win":e.outcome==="D"?"Draw":"Loss":a.join(" • ")}const at={size:{xs:"w-4 h-4",sm:"w-5 h-5",md:"w-6 h-6",lg:"w-8 h-8",xl:"w-10 h-10"},borderRadius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl",full:"rounded-full"},gap:{1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4",6:"gap-6",8:"gap-8"}};function _n({form:e,teamId:r,maxItems:o=5,labels:n,matchSeparator:a,styles:s,onClick:i}){const l=e.slice(-o),u=n&&(n.win||n.draw||n.loss),c=(g,x)=>{if(i){const y=e.length-l.length+x;i(g,y)}},m=s?.container||"",p=at.gap[s?.gap||"1"],j=at.size[s?.item?.size||"sm"],v=at.borderRadius[s?.item?.borderRadius||"full"],k=s?.item?.background,N=s?.item?.container||"",S=s?.item?.typography?.label||"text-xs font-bold";return t.jsx("div",{className:d("flex items-center justify-end",p,m),children:l.map((g,x)=>{const y=x===0,P=x===l.length-1,_=t.jsx("div",{className:d("flex items-center justify-center",j,v,k||Tn(g.outcome),i&&"cursor-pointer hover:opacity-80 transition-opacity",N),onClick:()=>c(g,x),children:u?t.jsx("span",{className:d("text-white leading-none",S),children:Rn(g.outcome,n)}):Ln(g.outcome)}),E=g.competitorOne?.score!==void 0||g.competitorTwo?.score!==void 0||g.date!==void 0?t.jsx(be,{content:Xr(g,r,n),position:"top",children:_}):_;return t.jsxs(A.Fragment,{children:[a==="last"&&P&&l.length>1&&t.jsx("div",{className:"h-5 w-px bg-border mx-0.5","aria-hidden":"true"}),E,a==="first"&&y&&l.length>1&&t.jsx("div",{className:"h-5 w-px bg-border mx-0.5","aria-hidden":"true"})]},x)})})}function In(e){switch(e){case"W":return"border-t-green-600";case"D":return"border-t-gray-400";case"L":return"border-t-red-500"}}function zn(e){switch(e){case"W":return"bg-green-600 text-white";case"D":return"bg-gray-400 text-white";case"L":return"bg-red-500 text-white"}}const it={win:"WIN",draw:"DRAW",loss:"LOSS"};function Bn(e,r){switch(e){case"W":return r?.win||it.win;case"D":return r?.draw||it.draw;case"L":return r?.loss||it.loss}}const lt={gap:{1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4",6:"gap-6",8:"gap-8"},logoSize:{xs:"w-4 h-4",sm:"w-6 h-6",md:"w-8 h-8",lg:"w-10 h-10",xl:"w-12 h-12"},mode:{scroll:"flex overflow-x-auto",grid:"flex justify-between",responsive:"flex justify-between overflow-x-auto md:overflow-visible"}},dt={label:"text-xs font-semibold uppercase",score:"text-lg font-semibold",date:"text-xs"},On={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl",full:"rounded-full"};function Dn({form:e,teamId:r,maxItems:o=5,labels:n,mode:a,styles:s,onClick:i}){const l=e.slice(-o),u=(b,O)=>{if(i){const Q=e.length-l.length+O;i(b,Q)}},c=b=>{if(r!==void 0){if(String(b.competitorOne?.id)===String(r))return{ourTeam:b.competitorOne,opponent:b.competitorTwo};if(String(b.competitorTwo?.id)===String(r))return{ourTeam:b.competitorTwo,opponent:b.competitorOne}}return{ourTeam:b.competitorOne,opponent:b.competitorTwo}},m=s?.container||"",p=lt.gap[s?.gap||"3"],j=a||s?.mode||"scroll",v=lt.mode[j],k=s?.item?.padding??"px-4 py-3",N=s?.item?.background??"bg-card",S=s?.item?.border??"border border-border border-t-4",g=s?.item?.borderRadius?On[s.item.borderRadius]:"rounded-md",x=s?.item?.container??"",y=lt.logoSize[s?.item?.logoSize||"md"],P=s?.item?.typography?.label||dt.label,_=s?.item?.typography?.score||dt.score,B=s?.item?.typography?.date||dt.date,E=()=>j==="scroll"?"shrink-0":"";return t.jsx("div",{className:d("items-start",v,p,m),children:l.map((b,O)=>{const{date:Q,outcome:oe}=b,{ourTeam:$,opponent:U}=c(b),he=$.score??"-",K=U.score??"-";return t.jsxs("div",{className:d("flex flex-col items-center gap-2",E(),k,N,S,g,In(oe),i&&"cursor-pointer hover:bg-muted/50 transition-colors",x),onClick:()=>u(b,O),children:[t.jsx("span",{className:d("px-3 py-0.5 rounded-full",P,zn(oe)),children:Bn(oe,n)}),t.jsxs("div",{className:d("flex items-center gap-2 text-foreground",_),children:[t.jsx("span",{children:he}),t.jsx("span",{className:"text-muted-foreground",children:"-"}),t.jsx("span",{children:K})]}),t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx(be,{content:$.name,children:$.image?t.jsx("img",{src:$.image,alt:$.name,className:d(y,"object-contain")}):t.jsx("div",{className:d(y,"bg-muted rounded-full flex items-center justify-center text-xs text-muted-foreground"),children:$.name.charAt(0)})}),t.jsx(be,{content:U.name,children:U.image?t.jsx("img",{src:U.image,alt:U.name,className:d(y,"object-contain")}):t.jsx("div",{className:d(y,"bg-muted rounded-full flex items-center justify-center text-xs text-muted-foreground"),children:U.name.charAt(0)})})]}),Q&&t.jsx("span",{className:d(B,"text-muted-foreground"),children:Q})]},b.matchId)})})}const En=e=>{switch(e){case"W":return"text-green-600 dark:text-green-400";case"L":return"text-red-600 dark:text-red-400";case"D":default:return"text-gray-500 dark:text-gray-400"}},$n=(e,r)=>{const o=St(e,r);return o?.name?o.shortName||o.name.substring(0,3).toUpperCase():"???"};function Gn({form:e,teamId:r,maxItems:o=5,labels:n,styles:a,onClick:s}){const i=e.slice(-o),{container:l=""}=a||{},u=(c,m)=>{if(s){const p=e.length-i.length+m;s(c,p)}};return t.jsx("div",{className:d("overflow-x-auto",l),children:t.jsx("div",{className:"grid gap-1",style:{gridTemplateColumns:`repeat(${i.length}, minmax(48px, 1fr))`,minWidth:"100%"},children:i.map((c,m)=>{const p=t.jsxs("div",{className:d("flex flex-col items-center py-2 px-1 bg-muted rounded-lg",s?"cursor-pointer hover:bg-muted/80":"cursor-default"),onClick:()=>u(c,m),children:[t.jsx("span",{className:d("text-sm font-bold",En(c.outcome)),children:Kr(c,r)||"?-?"}),t.jsx("span",{className:"text-[10px] text-muted-foreground",children:$n(c,r)})]});return c.competitorOne?.name!==void 0||c.competitorTwo?.name!==void 0||c.date!==void 0?t.jsx(be,{content:Xr(c,r,n),position:"top",children:p},m):t.jsx("div",{children:p},m)})})})}function ke({variant:e="embedded",...r}){switch(e){case"detailed":return t.jsx(Dn,{...r});case"scoreCards":return t.jsx(Gn,{...r});case"embedded":default:return t.jsx(_n,{...r})}}const Hn={0:"p-0",2:"p-2",3:"p-3",4:"p-4",6:"p-6",8:"p-8"},Un={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl"},Wn={1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4"};function Se({entity:e,primaryCta:r,secondaryCta:o,layout:n="horizontal",ctaLayout:a="responsive",styles:s}){const{container:i="",background:l="",padding:u="4",borderRadius:c="none",ctaGap:m="2"}=s||{},p=Hn[u],j=Un[c],v=Wn[m],k=r||o,N={inline:"flex flex-row items-center",stacked:"flex flex-col",responsive:"flex flex-col sm:flex-row sm:items-center"},S={inline:"flex flex-row items-center justify-between gap-4",stacked:"flex flex-col gap-4",responsive:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4"};return n==="stacked"?t.jsxs("div",{className:d("flex flex-col items-center text-center gap-4",p,j,l,i),children:[t.jsxs("div",{className:"flex flex-col items-center gap-2",children:[e.imageUrl&&t.jsx("img",{src:e.imageUrl,alt:e.name,className:d("object-contain",Vn(e.styles?.imageSize),Fn(e.styles?.imageBorderRadius),e.styles?.imageBorder)}),t.jsxs("div",{className:"flex flex-col items-center",children:[t.jsx("span",{className:e.styles?.typography?.name||"font-semibold",children:e.name}),e.subtitle&&t.jsx("span",{className:e.styles?.typography?.subtitle||"text-xs text-muted-foreground",children:e.subtitle})]})]}),k&&t.jsxs("div",{className:d("flex flex-col items-center",v),children:[r,o]})]}):t.jsxs("div",{className:d(S[a],p,j,l,i),children:[t.jsx(G,{...e}),k&&t.jsxs("div",{className:d(N[a],v,"shrink-0"),children:[r,o]})]})}const Zt={xs:"w-8 h-8",sm:"w-12 h-12",md:"w-16 h-16",lg:"w-20 h-20",xl:"w-24 h-24","2xl":"w-32 h-32","3xl":"w-40 h-40"},Kt={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl",full:"rounded-full"};function Vn(e){return Zt[e]||Zt.md}function Fn(e){return Kt[e]||Kt.none}const Yn={2:"gap-2",3:"gap-3",4:"gap-4",6:"gap-6",8:"gap-8"},qn={xs:"w-8 h-8",sm:"w-12 h-12",md:"w-16 h-16",lg:"w-20 h-20",xl:"w-24 w-24","2xl":"w-28 h-28","3xl":"w-32 h-32"},Zn={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl",full:"rounded-full"};function Kn(e){const r=qn[e?.imageSize||"lg"],o=e?.imageBorderRadius?Zn[e.imageBorderRadius]:"",n=e?.imageBorder||"";return d(r,o,n)}function Xt({entity:e}){return t.jsxs("div",{className:"flex-1 flex flex-col items-center text-center",children:[e.imageUrl&&t.jsx("img",{src:e.imageUrl,alt:e.name,className:d(Kn(e.styles),"object-contain mb-3")}),t.jsx("span",{className:e.styles?.typography?.name||"text-lg font-semibold text-white",children:e.name}),e.subtitle&&t.jsx("span",{className:e.styles?.typography?.subtitle||"text-sm text-white/70",children:e.subtitle})]})}function Qt({content:e,typography:r}){return t.jsx("div",{className:"shrink-0",children:typeof e=="string"?t.jsx("span",{className:r,children:e}):e})}function At({leftEntity:e,rightEntity:r,centerContent:o,variant:n="inline",styles:a,leftBackground:s="",rightBackground:i="",overlay:l=""}){const{container:u="",background:c="",gap:m="4",centerTypography:p="text-sm text-muted-foreground font-medium"}=a||{},j=Yn[m];if(n==="stacked")return t.jsxs("div",{className:d("relative overflow-hidden rounded-xl",u),children:[t.jsxs("div",{className:"absolute inset-0 flex",children:[t.jsx("div",{className:d("flex-1",s)}),t.jsx("div",{className:d("flex-1",i)})]}),l&&t.jsx("div",{className:d("absolute inset-0",l)}),t.jsxs("div",{className:d("relative z-10 flex items-center justify-between px-8 py-6",j),children:[t.jsx(Xt,{entity:e}),o&&t.jsx(Qt,{content:o,typography:p}),t.jsx(Xt,{entity:r})]})]});const v={...e,orientation:"rtl",styles:{...e.styles,textAlign:"right"}},k={...r,orientation:"ltr",styles:{...r.styles,textAlign:"left"}};return t.jsxs("div",{className:d("flex items-center justify-between",j,c,u),children:[t.jsx("div",{className:"flex-1 flex justify-end",children:t.jsx(G,{...v})}),o&&t.jsx(Qt,{content:o,typography:p}),t.jsx("div",{className:"flex-1 flex justify-start",children:t.jsx(G,{...k})})]})}const Xn={1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4"};function R({entity:e,primaryCta:r,secondaryCta:o,styles:n}){const a=n?.ctaGap||"2",s=n?.container||"",i=Xn[a];return r||o?t.jsxs("div",{className:d("flex items-center justify-between gap-4",s),children:[t.jsx(G,{...e}),t.jsxs("div",{className:d("flex items-center shrink-0",i),children:[r,o]})]}):t.jsx("div",{className:s,children:t.jsx(G,{...e})})}const Qn={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl"},Qr={left:"text-left",center:"text-center",right:"text-right"},Jn={1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4"};function Jr(e){const r=e?.borderRadius?Qn[e.borderRadius]:"rounded-xl";return d("overflow-hidden",r,e?.container)}function eo(e){return Qr[e?.titlePosition||"left"]}function to(e){return Qr[e?.oddsLabelPosition||"left"]}function ro(e){return Jn[e?.oddsGap||"1"]}const Jt="text-xs font-semibold text-muted-foreground uppercase tracking-wider";function ea({matchupHeader:e,stats:r,title:o,bettingOdds:n,oddsLabel:a,styles:s}){const i=eo(s),l=to(s);return t.jsxs("div",{className:d("bg-card border border-muted shadow-sm",Jr(s)),children:[t.jsx("div",{className:d("bg-muted/30 p-4",s?.headerSection),children:t.jsx(At,{...e,variant:"inline"})}),t.jsxs("div",{className:d("p-4",s?.statsSection),children:[o&&t.jsx(R,{entity:{name:o,styles:{typography:{name:d(Jt,i)},container:"mb-2.5 mt-1"}}}),t.jsx(Ct,{...r})]}),n&&n.length>0&&t.jsxs("div",{className:d("p-4 pt-0",s?.oddsSection),children:[a&&t.jsx(R,{entity:{name:a,styles:{typography:{name:d(Jt,l)},container:"mb-2.5 mt-1"}}}),t.jsx("div",{className:d("flex flex-col",ro(s)),children:n.map((u,c)=>t.jsx("div",{children:u},c))})]})]})}const er="text-xs font-semibold text-muted-foreground uppercase tracking-wider";function ta({matchupHeader:e,stats:r,title:o,bettingOdds:n,oddsLabel:a,styles:s}){const i={...e,variant:"stacked"},l=eo(s),u=to(s);return t.jsxs("div",{className:d("shadow-lg",Jr(s)),children:[t.jsx(At,{...i}),t.jsxs("div",{className:d("bg-card p-6",s?.statsSection),children:[o&&t.jsx(R,{entity:{name:o,styles:{typography:{name:d(er,l)},container:"mb-2.5 mt-1"}}}),t.jsx(Ct,{...r})]}),n&&n.length>0&&t.jsxs("div",{className:d("bg-card p-6 pt-0",s?.oddsSection),children:[a&&t.jsx(R,{entity:{name:a,styles:{typography:{name:d(er,u)},container:"mb-2.5 mt-1"}}}),t.jsx("div",{className:d("flex flex-col",ro(s)),children:n.map((c,m)=>t.jsx("div",{children:c},m))})]})]})}function ra({variant:e="card",...r}){switch(e){case"hero":return t.jsx(ta,{...r});case"card":default:return t.jsx(ea,{...r})}}const oa={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl"},sa={left:"text-left",center:"text-center",right:"text-right"},na={1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4"};function Ze(e){const r=e?.borderRadius?oa[e.borderRadius]:"rounded-xl";return d("overflow-hidden",r,e?.container)}function Ke(e){return sa[e?.titlePosition||"left"]}function Xe(e){return na[e?.oddsGap||"1"]}const aa="text-xs font-semibold text-muted-foreground uppercase tracking-wider";function ia({profileHeader:e,stats:r,statsTitle:o,form:n,formTitle:a,featuredMatch:s,matchTitle:i,bettingOdds:l,oddsLabel:u,styles:c}){const m=Ke(c),p={typography:{name:d(aa,m)},container:"mb-1.5"};return t.jsxs("div",{className:d("bg-card border border-muted shadow-sm",Ze(c)),children:[t.jsx("div",{className:c?.headerSection,children:t.jsx(Se,{...e})}),r&&t.jsxs("div",{className:d("p-4",c?.statsSection),children:[o&&t.jsx(R,{entity:{name:o,styles:p}}),t.jsx(re,{...r})]}),n&&t.jsxs("div",{className:d("px-4 pb-4",c?.formSection),children:[a&&t.jsx(R,{entity:{name:a,styles:p}}),t.jsx(ke,{...n,variant:"scoreCards"})]}),s&&t.jsxs("div",{className:d("p-4 pt-0",c?.matchSection),children:[i&&t.jsx(R,{entity:{name:i,styles:p}}),t.jsx(z,{...s})]}),l&&l.length>0&&t.jsxs("div",{className:d("p-4 pt-0",c?.oddsSection),children:[u&&t.jsx(R,{entity:{name:u,styles:p}}),t.jsx("div",{className:d("flex flex-col",Xe(c)),children:l.map((j,v)=>t.jsx("div",{children:j},v))})]})]})}const la="text-xs font-semibold text-muted-foreground uppercase tracking-wider";function da({profileHeader:e,stats:r,statsTitle:o,form:n,formTitle:a,featuredMatch:s,matchTitle:i,bettingOdds:l,oddsLabel:u,styles:c}){const m=Ke(c),p={typography:{name:d(la,m)},container:"mb-1.5"};return t.jsxs("div",{className:d("shadow-lg",Ze(c)),children:[t.jsx("div",{className:c?.headerSection,children:t.jsx(Se,{...e})}),r&&t.jsxs("div",{className:d("bg-card p-5",c?.statsSection),children:[o&&t.jsx(R,{entity:{name:o,styles:p}}),t.jsx(re,{...r})]}),n&&t.jsxs("div",{className:d("bg-card px-4 pb-4",c?.formSection),children:[a&&t.jsx(R,{entity:{name:a,styles:p}}),t.jsx(ke,{...n,variant:"scoreCards"})]}),s&&t.jsxs("div",{className:d("bg-card p-4 pt-0",c?.matchSection),children:[i&&t.jsx(R,{entity:{name:i,styles:p}}),t.jsx(z,{...s})]}),l&&l.length>0&&t.jsxs("div",{className:d("bg-card p-4 pt-0",c?.oddsSection),children:[u&&t.jsx(R,{entity:{name:u,styles:p}}),t.jsx("div",{className:d("flex flex-col",Xe(c)),children:l.map((j,v)=>t.jsx("div",{children:j},v))})]})]})}const ca="text-xs font-semibold text-muted-foreground uppercase tracking-wider";function ua({profileHeader:e,stats:r,form:o,formTitle:n,matchTitle:a,featuredMatch:s,bettingOdds:i,oddsLabel:l,styles:u}){const c=Ke(u),m={typography:{name:d(ca,c)},container:"mb-1.5"};return t.jsxs("div",{className:d("bg-card border border-muted shadow-sm",Ze(u)),children:[t.jsx("div",{className:u?.headerSection,children:t.jsx(Se,{...e})}),r&&t.jsx("div",{className:d("p-3",u?.statsSection),children:t.jsx(re,{...r})}),o&&t.jsxs("div",{className:d("bg-card px-3 pb-3",u?.formSection),children:[n&&t.jsx(R,{entity:{name:n,styles:m}}),t.jsx("div",{className:"flex justify-start",children:t.jsx(ke,{...o,matchSeparator:"last",variant:"embedded"})})]}),s&&t.jsxs("div",{className:d("px-3 pb-3",u?.matchSection),children:[a&&t.jsx(R,{entity:{name:a,styles:m}}),t.jsx(z,{...s,styles:{logoSize:"sm",typography:{teamName:"text-sm uppercase"}}})]}),i&&i.length>0&&t.jsxs("div",{className:d("px-3 pb-3",u?.oddsSection),children:[l&&t.jsx(R,{entity:{name:l,styles:m}}),t.jsx("div",{className:d("flex flex-col",Xe(u)),children:i.map((p,j)=>t.jsx("div",{children:p},j))})]})]})}const ma="text-xs font-semibold text-muted-foreground uppercase tracking-wider";function pa({profileHeader:e,stats:r,statsTitle:o,form:n,formTitle:a,featuredMatch:s,matchTitle:i,bettingOdds:l,oddsLabel:u,styles:c}){const m=e.styles?.background||"bg-gradient-to-br from-primary-600 to-primary-800",p=e.styles?{...e.styles,background:void 0}:void 0,j=Ke(c),v={typography:{name:d(ma,j)},container:"mb-1.5"};return t.jsx("div",{className:d("shadow-lg",Ze(c)),children:t.jsxs("div",{className:"flex flex-col md:flex-row",children:[t.jsx("div",{className:d("w-full md:w-1/3 flex items-center justify-center",m,c?.headerSection),children:t.jsx(Se,{...e,styles:p,layout:"stacked",ctaLayout:"stacked"})}),t.jsxs("div",{className:"w-full md:flex-1 flex flex-col bg-card p-4 space-y-4",children:[r&&t.jsxs("div",{className:c?.statsSection,children:[o&&t.jsx(R,{entity:{name:o,styles:v}}),t.jsx(re,{...r})]}),n&&t.jsxs("div",{className:c?.formSection,children:[a&&t.jsx(R,{entity:{name:a,styles:v}}),t.jsx(ke,{...n,variant:"scoreCards"})]}),s&&t.jsxs("div",{className:c?.matchSection,children:[i&&t.jsx(R,{entity:{name:i,styles:v}}),t.jsx(z,{...s})]}),l&&l.length>0&&t.jsxs("div",{className:c?.oddsSection,children:[u&&t.jsx(R,{entity:{name:u,styles:v}}),t.jsx("div",{className:d("flex flex-col",Xe(c)),children:l.map((k,N)=>t.jsx("div",{children:k},N))})]})]})]})})}function ga({variant:e="card",...r}){switch(e){case"hero":return t.jsx(da,{...r});case"compact":return t.jsx(ua,{...r});case"horizontal":return t.jsx(pa,{...r});case"card":default:return t.jsx(ia,{...r})}}const xa={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl"},ha={none:"gap-0",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8"},fa={1:"grid-cols-1",2:"grid-cols-2"},ba={1:"md:grid-cols-1",2:"md:grid-cols-2",3:"md:grid-cols-3"},ja={1:"lg:grid-cols-1",2:"lg:grid-cols-2",3:"lg:grid-cols-3",4:"lg:grid-cols-4"},va={1:"xl:grid-cols-1",2:"xl:grid-cols-2",3:"xl:grid-cols-3",4:"xl:grid-cols-4",5:"xl:grid-cols-5",6:"xl:grid-cols-6"};function oo(e){const r=e?.borderRadius?xa[e.borderRadius]:"rounded-xl";return d("overflow-hidden",r,e?.background,e?.container)}function so(e){return ha[e?.gap||"md"]}function wa(e){const r=e?.sm||1,o=e?.md||2,n=e?.lg||3,a=e?.xl||4;return d(fa[r],ba[o],ja[n],va[a])}function ya({items:e,sectionHeader:r,cardVariant:o="standard",cardStyles:n,pagination:a,styles:s}){const i=so(s),l=wa(s?.columns);return t.jsxs("div",{className:oo(s),children:[r,t.jsx("div",{className:d("grid",l,i,s?.contentSection),children:e.map(u=>t.jsx(q,{content:u.content,variant:o,styles:n,primaryCta:u.primaryCta,secondaryCta:u.secondaryCta,bettingOdds:u.bettingOdds,matchScore:u.matchScore},u.content.id))}),a&&t.jsx("div",{className:d("mt-6 flex justify-center",s?.paginationSection),children:t.jsx(jt,{...a})})]})}function Na({items:e,sectionHeader:r,cardVariant:o="standardHorizontal",cardStyles:n,pagination:a,styles:s}){const i=so(s),l=o==="standard"?"standardHorizontal":o;return t.jsxs("div",{className:oo(s),children:[r,t.jsx("div",{className:d("flex flex-col",i,s?.contentSection),children:e.map(u=>t.jsx(q,{content:u.content,variant:l,styles:n,primaryCta:u.primaryCta,secondaryCta:u.secondaryCta,bettingOdds:u.bettingOdds,matchScore:u.matchScore},u.content.id))}),a&&t.jsx("div",{className:d("mt-6 flex justify-center",s?.paginationSection),children:t.jsx(jt,{...a})})]})}function Ca({variant:e="grid",...r}){switch(e){case"list":return t.jsx(Na,{...r});case"grid":default:return t.jsx(ya,{...r})}}const ka={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl"},Sa={none:"gap-0",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8"};function Rt(e){const r=e?.borderRadius?ka[e.borderRadius]:"";return d(r,e?.background,e?.container)}function Tt(e){return Sa[e?.gap||"md"]}const Aa={1:"grid-cols-1",2:"grid-cols-1 md:grid-cols-2",3:"grid-cols-1 md:grid-cols-2 lg:grid-cols-3",4:"grid-cols-1 md:grid-cols-2 lg:grid-cols-4"},Ra={1:{title:"text-xl md:text-3xl font-bold line-clamp-3",description:"text-sm md:text-base line-clamp-2",category:"text-sm",metadata:"text-sm opacity-80"},2:{title:"text-xl md:text-lg font-bold line-clamp-2",category:"text-xs",metadata:"text-xs opacity-80"},3:{title:"text-xl md:text-base font-semibold line-clamp-2",metadata:"text-xs opacity-80"},4:{title:"text-xl md:text-sm font-semibold line-clamp-2",metadata:"text-xs opacity-80"}};function Ta(e,r){return r<=1?e:{...e,content:{...e.content,description:void 0,category:r>=3?void 0:e.content.category}}}function ct({items:e,config:r,cardStyles:o,gapClass:n}){const a=Aa[r.columns],s=Ra[r.columns];return t.jsx("div",{className:d("grid",a,n),children:e.map(i=>{const l=Ta(i,r.columns);return t.jsx(q,{content:l.content,variant:"hero",styles:{...o,typography:{...s,...o?.typography}},bettingOdds:l.bettingOdds,matchScore:l.matchScore},l.content.id)})})}function La({items:e,sectionHeader:r,cardStyles:o,styles:n,stackedConfig:a}){const s=a?.row1||{columns:1},i=a?.row2||{columns:2},l=a?.row3||{columns:3},u=Tt(n),c=s.columns,m=i.columns,p=l.columns,j=e.slice(0,c),v=e.slice(c,c+m),k=e.slice(c+m,c+m+p);return t.jsxs("div",{className:Rt(n),children:[r,t.jsxs("div",{className:d("flex flex-col",u),children:[j.length>0&&t.jsx(ct,{items:j,config:s,cardStyles:o,gapClass:u}),v.length>0&&t.jsx(ct,{items:v,config:i,cardStyles:o,gapClass:u}),k.length>0&&t.jsx(ct,{items:k,config:l,cardStyles:o,gapClass:u})]})]})}const Ma={title:"text-xl md:text-lg font-bold line-clamp-2",category:"text-xs",metadata:"text-xs opacity-80"},Pa={title:"text-xl md:text-base font-semibold line-clamp-2",metadata:"text-xs opacity-80"};function tr(e,r=!1){return{...e,content:{...e.content,description:void 0,category:r?void 0:e.content.category}}}function _a({items:e,sectionHeader:r,cardStyles:o,styles:n}){const a=Tt(n),s=e[0],i=e.slice(1,3),l=e.slice(3,6);return s?t.jsxs("div",{className:Rt(n),children:[r,t.jsxs("div",{className:d("flex flex-col",a),children:[t.jsxs("div",{className:d("grid grid-cols-1 lg:grid-cols-3",a),children:[t.jsx("div",{className:"lg:col-span-2",children:t.jsx(q,{content:s.content,variant:"hero",styles:{...o,imageAspectRatio:"auto",container:d("h-full",o?.container),imageContainer:d("h-full",o?.imageContainer)},bettingOdds:s.bettingOdds,matchScore:s.matchScore})}),i.length>0&&t.jsx("div",{className:d("flex flex-col",a),children:i.map(u=>{const c=tr(u);return t.jsx(q,{content:c.content,variant:"hero",styles:{...o,container:d("flex-1",o?.container),typography:{...Ma,...o?.typography}},bettingOdds:c.bettingOdds,matchScore:c.matchScore},c.content.id)})})]}),l.length>0&&t.jsx("div",{className:d("grid grid-cols-1 md:grid-cols-3",a),children:l.map(u=>{const c=tr(u,!0);return t.jsx(q,{content:c.content,variant:"hero",styles:{...o,typography:{...Pa,...o?.typography}},bettingOdds:c.bettingOdds,matchScore:c.matchScore},c.content.id)})})]})]}):null}const Ia={title:"text-base font-semibold line-clamp-2",category:"text-xs",metadata:"text-xs opacity-80"};function za(e){return{...e,content:{...e.content,description:void 0}}}function Ba({items:e,sectionHeader:r,cardStyles:o,styles:n}){const a=Tt(n),s=e[0],i=e.slice(1);return s?t.jsxs("div",{className:Rt(n),children:[r,t.jsxs("div",{className:d("grid grid-cols-1 lg:grid-cols-2",a),children:[t.jsx("div",{className:"lg:h-full",children:t.jsx(q,{content:s.content,variant:"standard",styles:{...o,container:d("h-full",o?.container)},primaryCta:s.primaryCta,secondaryCta:s.secondaryCta,bettingOdds:s.bettingOdds,matchScore:s.matchScore})}),i.length>0&&t.jsx("div",{className:d("flex flex-col",a),children:i.map(l=>{const u=za(l);return t.jsx(q,{content:u.content,variant:"minimal",styles:{...o,typography:{...Ia,...o?.typography}},bettingOdds:u.bettingOdds,matchScore:u.matchScore},u.content.id)})})]})]}):null}function Oa({variant:e="stacked",...r}){switch(e){case"spotlight":return t.jsx(_a,{...r});case"highlight":return t.jsx(Ba,{...r});case"stacked":default:return t.jsx(La,{...r})}}const Lt={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl"},Da={none:"gap-0",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8"},no={none:"",sm:"px-2 py-1",md:"px-3 py-2",lg:"px-4 py-3"};function M(e){const r=e?.borderRadius?Lt[e.borderRadius]:"rounded-xl";return d("overflow-hidden",r,e?.background,e?.container)}function ao(e){return Da[e||"md"]}function rr(e){const r=e?.typography||"text-sm font-semibold text-muted-foreground",o=e?.background||"bg-muted",n=no[e?.padding||"md"],a=e?.borderRadius?Lt[e.borderRadius]:"";return d(r,o,n,a)}function Ea(e){const r=new Map;return e.forEach(o=>{const n=o.dateGroup||o.match.metadata?.date||"Unknown",a=r.get(n)||[];r.set(n,[...a,o])}),r}function $a(e){const r=new Map;return e.forEach(o=>{const n=o.roundGroup||o.match.metadata?.round||"Unknown",a=r.get(n)||[];r.set(n,[...a,o])}),r}function Z({message:e}){return t.jsx("div",{className:"flex items-center justify-center py-12 text-muted-foreground",children:t.jsx("p",{className:"text-sm",children:e})})}function io({title:e,styles:r,action:o}){return o?t.jsxs("div",{className:d("flex items-center justify-between",rr(r)),children:[t.jsx("span",{children:e}),o]}):t.jsx("div",{className:rr(r),children:e})}function Qe({title:e,subtitle:r,logo:o,action:n,styles:a}){const s=a?.typography||"text-sm font-semibold",i=a?.subtitleTypography||"text-xs text-muted-foreground",l=a?.background||"bg-muted",u=no[a?.padding||"md"],c=a?.borderRadius?Lt[a.borderRadius]:"";return t.jsxs("div",{className:d("flex items-center justify-between",l,u,c),children:[t.jsxs("div",{className:"flex items-center gap-2",children:[o&&t.jsx("img",{src:o,alt:e,className:"w-6 h-6 object-contain"}),t.jsxs("div",{children:[t.jsx("div",{className:s,children:e}),r&&t.jsx("div",{className:i,children:r})]})]}),n&&t.jsx("div",{children:n})]})}function Ae({children:e,bettingOdds:r,oddsColumnWidth:o="w-[360px]",hasOddsColumn:n=!1}){return n?t.jsxs("div",{className:"flex flex-col md:flex-row md:items-center gap-2 py-2 px-2",children:[t.jsx("div",{className:"flex-1 min-w-0",children:e}),t.jsx("div",{className:d("shrink-0 hidden md:block",o),children:r}),r&&t.jsx("div",{className:"md:hidden",children:r})]}):t.jsx("div",{className:"py-2 px-2",children:e})}function Re({items:e,styles:r,renderMatch:o,hasOddsColumn:n}){const a=n??e.some(s=>s.bettingOdds);return t.jsx("div",{className:"flex flex-col divide-y divide-border",children:e.map(s=>t.jsx(Ae,{bettingOdds:s.bettingOdds,oddsColumnWidth:r?.oddsColumnWidth,hasOddsColumn:a,children:o(s)},s.match.id))})}function or({items:e,styles:r,sectionHeader:o,emptyMessage:n="No matches found"}){if(e.length===0)return t.jsxs("div",{className:M(r),children:[o,t.jsx(Z,{message:n})]});const a=e.some(i=>i.bettingOdds),s=i=>i.competitionGroup||i.match.metadata?.competition||"Unknown";return t.jsxs("div",{className:M(r),children:[o,t.jsx("div",{className:"flex flex-col divide-y divide-border",children:e.map((i,l)=>{const u=s(i),c=l>0?s(e[l-1]):null,m=u!==c;return t.jsxs("div",{children:[m&&t.jsx(Qe,{title:u,subtitle:i.competitionSubtitle,logo:i.competitionLogo,action:i.groupAction,styles:r?.groupHeader}),t.jsx(Ae,{bettingOdds:i.bettingOdds,oddsColumnWidth:r?.oddsColumnWidth,hasOddsColumn:a,children:t.jsx(z,{match:i.match,variant:"embedded",styles:r?.matchScoreStyles})})]},i.match.id)})})]})}function Ga({items:e,styles:r,sectionHeader:o,emptyMessage:n="No matches found"}){if(e.length===0)return t.jsxs("div",{className:M(r),children:[o,t.jsx(Z,{message:n})]});const a=Ea(e),s=ao(r?.groupGap||"md"),i=e.some(l=>l.bettingOdds);return t.jsxs("div",{className:M(r),children:[o,t.jsx("div",{className:d("flex flex-col",s),children:Array.from(a.entries()).map(([l,u])=>{const c=u[0];return t.jsxs("div",{children:[t.jsx(io,{title:l,styles:r?.groupHeader,action:c.groupAction}),t.jsx(Re,{items:u,styles:r,hasOddsColumn:i,renderMatch:m=>t.jsx(z,{match:m.match,variant:"embedded",styles:r?.matchScoreStyles})})]},l)})})]})}function Ha({items:e,styles:r,sectionHeader:o,emptyMessage:n="No matches found",scrollToActiveRound:a=!1}){const s=A.useRef(null);if(A.useEffect(()=>{a&&s.current&&s.current.scrollIntoView({behavior:"smooth",block:"start"})},[a]),e.length===0)return t.jsxs("div",{className:M(r),children:[o,t.jsx(Z,{message:n})]});const i=$a(e),l=ao(r?.groupGap||"md"),u=e.some(c=>c.bettingOdds);return t.jsxs("div",{className:M(r),children:[o,t.jsx("div",{className:d("flex flex-col",l),children:Array.from(i.entries()).map(([c,m])=>{const p=m[0],j=m.some(v=>v.isActiveRound);return t.jsxs("div",{ref:j?s:void 0,children:[t.jsx(io,{title:c,styles:r?.groupHeader,action:p.groupAction}),t.jsx(Re,{items:m,styles:r,hasOddsColumn:u,renderMatch:v=>t.jsx(z,{match:v.match,variant:"embedded",styles:r?.matchScoreStyles})})]},c)})})]})}function Ua({items:e,styles:r,sectionHeader:o,emptyMessage:n="No matches found"}){if(e.length===0)return t.jsxs("div",{className:M(r),children:[o,t.jsx(Z,{message:n})]});const a={...r?.matchScoreStyles,finishedStatusDisplay:"date"};return t.jsxs("div",{className:M(r),children:[o,t.jsx(Re,{items:e,styles:r,renderMatch:s=>t.jsx(z,{match:s.match,variant:"embedded",styles:a})})]})}function Wa({items:e,styles:r,sectionHeader:o,emptyMessage:n="No matches found"}){if(e.length===0)return t.jsxs("div",{className:M(r),children:[o,t.jsx(Z,{message:n})]});const a=e.some(l=>l.bettingOdds),s=l=>l.competitionGroup||l.match.metadata?.competition||"Unknown",i={...r?.matchScoreStyles,finishedStatusDisplay:"date"};return t.jsxs("div",{className:M(r),children:[o,t.jsx("div",{className:"flex flex-col divide-y divide-border",children:e.map((l,u)=>{const c=s(l),m=u>0?s(e[u-1]):null,p=c!==m;return t.jsxs("div",{children:[p&&t.jsx(Qe,{title:c,subtitle:l.competitionSubtitle,logo:l.competitionLogo,action:l.groupAction,styles:r?.groupHeader}),t.jsx(Ae,{bettingOdds:l.bettingOdds,oddsColumnWidth:r?.oddsColumnWidth,hasOddsColumn:a,children:t.jsx(z,{match:l.match,variant:"embedded",styles:i})})]},l.match.id)})})]})}function Va({items:e,styles:r,sectionHeader:o,emptyMessage:n="No matches found"}){return e.length===0?t.jsxs("div",{className:M(r),children:[o,t.jsx(Z,{message:n})]}):t.jsxs("div",{className:M(r),children:[o,t.jsx(Re,{items:e,styles:r,renderMatch:a=>t.jsx(z,{match:a.match,variant:"embedded",styles:r?.matchScoreStyles})})]})}function Fa({items:e,styles:r,sectionHeader:o,emptyMessage:n="No matches found"}){if(e.length===0)return t.jsxs("div",{className:M(r),children:[o,t.jsx(Z,{message:n})]});const a=e.some(i=>i.bettingOdds),s=i=>i.competitionGroup||i.match.metadata?.competition||"Unknown";return t.jsxs("div",{className:M(r),children:[o,t.jsx("div",{className:"flex flex-col divide-y divide-border",children:e.map((i,l)=>{const u=s(i),c=l>0?s(e[l-1]):null,m=u!==c;return t.jsxs("div",{children:[m&&t.jsx(Qe,{title:u,subtitle:i.competitionSubtitle,logo:i.competitionLogo,action:i.groupAction,styles:r?.groupHeader}),t.jsx(Ae,{bettingOdds:i.bettingOdds,oddsColumnWidth:r?.oddsColumnWidth,hasOddsColumn:a,children:t.jsx(z,{match:i.match,variant:"embedded",styles:r?.matchScoreStyles})})]},i.match.id)})})]})}function Ya({items:e,styles:r,sectionHeader:o,emptyMessage:n="No matches found"}){if(e.length===0)return t.jsxs("div",{className:M(r),children:[o,t.jsx(Z,{message:n})]});const a=e.filter(l=>l.match.status!=="scheduled"),s=e.filter(l=>l.match.status==="scheduled"),i=[...a,...s];return t.jsxs("div",{className:M(r),children:[o,t.jsx(Re,{items:i,styles:r,renderMatch:l=>t.jsx(z,{match:l.match,variant:"embedded",styles:r?.matchScoreStyles})})]})}function qa({items:e,styles:r,sectionHeader:o,emptyMessage:n="No matches found"}){if(e.length===0)return t.jsxs("div",{className:M(r),children:[o,t.jsx(Z,{message:n})]});const a=e.some(l=>l.bettingOdds),s=l=>l.competitionGroup||l.match.metadata?.competition||"Unknown",i=l=>l.match.status!=="scheduled"?{...r?.matchScoreStyles,finishedStatusDisplay:"date"}:r?.matchScoreStyles;return t.jsxs("div",{className:M(r),children:[o,t.jsx("div",{className:"flex flex-col divide-y divide-border",children:e.map((l,u)=>{const c=s(l),m=u>0?s(e[u-1]):null,p=c!==m;return t.jsxs("div",{children:[p&&t.jsx(Qe,{title:c,subtitle:l.competitionSubtitle,logo:l.competitionLogo,action:l.groupAction,styles:r?.groupHeader}),t.jsx(Ae,{bettingOdds:l.bettingOdds,oddsColumnWidth:r?.oddsColumnWidth,hasOddsColumn:a,children:t.jsx(z,{match:l.match,variant:"embedded",styles:i(l)})})]},l.match.id)})})]})}function Za({variant:e="daily",...r}){switch(e){case"daily":return t.jsx(or,{...r});case"round":return t.jsx(Ga,{...r});case"competition":return t.jsx(Ha,{...r});case"teamResults":return t.jsx(Ua,{...r});case"teamResultsByCompetition":return t.jsx(Wa,{...r});case"teamFixtures":return t.jsx(Va,{...r});case"teamFixturesByCompetition":return t.jsx(Fa,{...r});case"teamMatches":return t.jsx(Ya,{...r});case"teamMatchesByCompetition":return t.jsx(qa,{...r});default:return t.jsx(or,{...r})}}const Ka="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' fill='%239ca3af'%3E%3Ccircle cx='50' cy='35' r='20'/%3E%3Cpath d='M20 95 Q20 60 50 60 Q80 60 80 95 Z'/%3E%3C/svg%3E";function Mt(e){return e.imageUrl||Ka}const Je={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl"},lo={none:"gap-0",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8"};function ie(e){const r=e?.borderRadius?Je[e.borderRadius]:"rounded-xl",o=e?.background||"bg-card";return d("overflow-hidden p-4",r,o,e?.container)}function le(e){const r=e?.header?.border??"border-b border-muted",o=e?.header?.padding??"pb-4";return d(r,o,e?.header?.container)}function de(e){return lo[e?.groupGap||"md"]}function ce(e){return lo[e?.memberGap||"sm"]}function Pt(e,r){const o=new Map;r&&r.forEach(s=>o.set(s.key,s));const n=new Map;e.forEach(s=>{const i=s.positionGroup;n.has(i)||n.set(i,[]),n.get(i).push(s)});const a=Array.from(n.entries()).map(([s,i])=>{const l=o.get(s);return{key:s,label:l?.label||s,order:l?.order??999,members:i}});return a.sort((s,i)=>s.order-i.order),a.map(({key:s,label:i,members:l})=>({key:s,label:i,members:l}))}function Xa(e,r){const o=[];return r?.showNumber&&e.jerseyNumber!==void 0&&o.push(`#${e.jerseyNumber}`),r?.showPosition&&e.position&&o.push(e.position),r?.showSubtitle&&e.subtitle&&o.push(e.subtitle),o.length>0?o.join(" • "):void 0}const Qa="text-sm font-semibold text-muted-foreground uppercase tracking-wider",sr={2:"grid-cols-1 sm:grid-cols-2",3:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",4:"grid-cols-2 sm:grid-cols-3 lg:grid-cols-4",5:"grid-cols-2 sm:grid-cols-3 lg:grid-cols-5",6:"grid-cols-2 sm:grid-cols-4 lg:grid-cols-6"};function nr({member:e,display:r,styles:o}){const n=o?.memberNameTypography||"font-semibold text-foreground",a=o?.memberSubtitleTypography||"text-xs text-muted-foreground",s=o?.memberCard,i=e.href||e.onClick,l=e.href?"a":"div",u=e.href?{href:e.href}:e.onClick?{onClick:e.onClick,role:"button",tabIndex:0}:{},c=s?.background||"bg-muted",m=s?.borderRadius?Je[s.borderRadius]:"rounded-lg",p=s?.padding||"p-3",j=s?.gap||"gap-3";return t.jsxs(l,{className:d(c,m,p,"flex flex-col",j,i&&"cursor-pointer hover:opacity-80 transition-opacity",s?.container),...u,children:[t.jsx(G,{name:e.name,mobileName:e.shortName,imageUrl:Mt(e),subtitle:Xa(e,r),styles:{imageBorderRadius:"full",imageSize:s?.entityDisplay?.imageSize||"xl",typography:{name:n,subtitle:a},gap:"3",...s?.entityDisplay}}),e.stats&&e.stats.length>0&&t.jsx(re,{items:e.stats,itemVariant:"stacked",styles:{grid:{colsMobile:3,colsTablet:3,colsDesktop:3,gap:"sm",...s?.statsGrid},item:{alignment:"center",padding:"sm",borderRadius:"md",container:"bg-foreground/5",typography:{value:"text-sm font-semibold text-foreground",label:"text-[9px] font-medium text-muted-foreground uppercase"},...s?.statsItem}}})]},e.id)}function Ja({members:e,groupByPosition:r=!0,positionGroups:o,display:n={showNumber:!0,showPosition:!0},header:a,styles:s}){const i=s?.groupHeaderTypography||Qa,l=s?.columns||3,u=sr[l]||sr[3];if(r){const c=Pt(e,o);return t.jsxs("div",{className:d(ie(s),"flex flex-col",de(s)),children:[a&&t.jsx("div",{className:le(s),children:a}),c.map(m=>t.jsxs("div",{className:"space-y-3",children:[t.jsx("div",{className:i,children:m.label}),t.jsx("div",{className:d("grid",u,ce(s)),children:m.members.map(p=>t.jsx(nr,{member:p,display:n,styles:s},p.id))})]},m.key))]})}return t.jsxs("div",{className:d(ie(s),"flex flex-col",de(s)),children:[a&&t.jsx("div",{className:le(s),children:a}),t.jsx("div",{className:d("grid",u,ce(s)),children:e.map(c=>t.jsx(nr,{member:c,display:n,styles:s},c.id))})]})}const ei="text-sm font-semibold text-muted-foreground uppercase tracking-wider",ar={1:"grid-cols-1",2:"grid-cols-1 sm:grid-cols-2"};function ti(e){const r=new Date(e),o=new Date;let n=o.getFullYear()-r.getFullYear();const a=o.getMonth()-r.getMonth();return(a<0||a===0&&o.getDate()<r.getDate())&&n--,n}function ri(e,r){const o=[];return r?.showPosition&&e.position&&o.push({label:"Position",value:e.position}),e.birthDate&&o.push({label:"Age",value:`${ti(e.birthDate)}`}),e.height&&o.push({label:"Height",value:e.height}),o}function ir({member:e,display:r,styles:o}){const n=ri(e,r),a=o?.memberCard,s=e.href||e.onClick,i=e.href?"a":"div",l=e.href?{href:e.href}:e.onClick?{onClick:e.onClick,role:"button",tabIndex:0}:{},u=a?.background||"bg-muted",c=a?.borderRadius?Je[a.borderRadius]:"rounded-xl";return t.jsxs(i,{className:d(u,c,"overflow-hidden flex flex-row",s&&"cursor-pointer hover:opacity-80 transition-opacity",a?.container),...l,children:[t.jsxs("div",{className:"relative w-40 sm:w-48 shrink-0 bg-linear-to-b from-primary-600/20 to-primary-800/20",children:[t.jsx("img",{src:Mt(e),alt:"","aria-hidden":"true",className:"absolute inset-0 w-full h-full object-cover object-top"}),r?.showNumber&&e.jerseyNumber&&t.jsx("div",{className:"absolute top-3 right-3 bg-background/90 backdrop-blur-sm rounded-lg px-2 py-1 font-bold text-sm text-foreground",children:e.jerseyNumber})]}),t.jsxs("div",{className:d("p-4 flex flex-col gap-3 flex-1 min-w-0",a?.padding,a?.gap),children:[t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center gap-2",children:[e.nationality?.flagUrl&&t.jsx("img",{src:e.nationality.flagUrl,alt:e.nationality.name,className:"w-6 h-4 object-cover rounded shadow-sm shrink-0"}),t.jsx("h3",{className:d("text-xl font-bold text-foreground truncate",o?.memberNameTypography),children:e.name})]}),e.subtitle&&t.jsx("p",{className:d("text-sm text-primary-600 font-medium",o?.memberSubtitleTypography),children:e.subtitle})]}),n.length>0&&t.jsx("div",{className:"flex flex-wrap gap-x-4 gap-y-1 text-sm",children:n.map(m=>t.jsxs("div",{className:"flex gap-1",children:[t.jsxs("span",{className:"text-muted-foreground",children:[m.label,":"]}),t.jsx("span",{className:"font-medium text-foreground",children:m.value})]},m.label))}),e.stats&&e.stats.length>0&&t.jsx(re,{items:e.stats,itemVariant:"stacked",styles:{grid:{colsMobile:3,colsTablet:3,colsDesktop:3,gap:"sm",...a?.statsGrid},item:{alignment:"center",padding:"sm",borderRadius:"lg",container:"bg-foreground/5",typography:{value:"text-lg font-bold text-foreground",label:"text-[10px] font-medium text-muted-foreground uppercase"},...a?.statsItem}}})]})]})}function oi({members:e,groupByPosition:r=!0,positionGroups:o,display:n={showNumber:!0,showPosition:!0},header:a,styles:s}){const i=s?.groupHeaderTypography||ei,l=s?.columns||2,u=ar[l]||ar[2];if(r){const c=Pt(e,o);return t.jsxs("div",{className:d(ie(s),"flex flex-col",de(s)),children:[a&&t.jsx("div",{className:le(s),children:a}),c.map(m=>t.jsxs("div",{className:"space-y-4",children:[t.jsx("div",{className:i,children:m.label}),t.jsx("div",{className:d("grid",u,ce(s)),children:m.members.map(p=>t.jsx(ir,{member:p,display:n,styles:s},p.id))})]},m.key))]})}return t.jsxs("div",{className:d(ie(s),"flex flex-col",de(s)),children:[a&&t.jsx("div",{className:le(s),children:a}),t.jsx("div",{className:d("grid",u,ce(s)),children:e.map(c=>t.jsx(ir,{member:c,display:n,styles:s},c.id))})]})}const si="text-sm font-semibold text-muted-foreground uppercase tracking-wider",lr={3:"grid-cols-2 sm:grid-cols-3",4:"grid-cols-2 sm:grid-cols-3 lg:grid-cols-4",5:"grid-cols-2 sm:grid-cols-3 lg:grid-cols-5",6:"grid-cols-3 sm:grid-cols-4 lg:grid-cols-6"};function dr({member:e,display:r,styles:o}){const n=o?.memberCard,a=e.href||e.onClick,s=e.href?"a":"div",i=e.href?{href:e.href}:e.onClick?{onClick:e.onClick,role:"button",tabIndex:0}:{},l=n?.borderRadius?Je[n.borderRadius]:"rounded-xl",u=n?.background||"bg-linear-to-b from-primary-500 to-primary-700",c=e.stats?.slice(0,6)||[];return t.jsxs(s,{className:d("relative overflow-hidden flex flex-col",l,u,a&&"cursor-pointer hover:scale-[1.02] transition-transform",n?.container),...i,children:[t.jsxs("div",{className:"flex items-center justify-between px-3 pt-3",children:[r?.showPosition&&e.position&&t.jsx("span",{className:"text-[10px] font-bold text-white/90 uppercase tracking-wider",children:e.positionGroup}),r?.showNumber&&e.jerseyNumber&&t.jsx("span",{className:"text-2xl font-black text-white/20",children:e.jerseyNumber})]}),t.jsxs("div",{className:"relative flex-1 flex items-end justify-center px-4 pb-2 min-h-[120px]",children:[t.jsx("img",{src:Mt(e),alt:"","aria-hidden":"true",className:"w-full max-w-[140px] aspect-square object-cover object-top rounded-full border-3 border-white/20"}),e.nationality?.flagUrl&&t.jsx("img",{src:e.nationality.flagUrl,alt:e.nationality.name,className:"absolute bottom-2 right-4 w-6 h-4 object-cover rounded shadow-sm"})]}),t.jsxs("div",{className:"bg-black/20 px-3 py-2 text-center",children:[t.jsx("h3",{className:d("text-sm font-bold text-white uppercase tracking-wide truncate",o?.memberNameTypography),children:e.shortName||e.name}),r?.showSubtitle&&e.subtitle&&t.jsx("p",{className:d("text-[10px] text-white/70 uppercase",o?.memberSubtitleTypography),children:e.subtitle})]}),c.length>0&&t.jsx("div",{className:"bg-black/30 px-2 py-2",children:t.jsx("div",{className:d("grid gap-1",(c.length<=3,"grid-cols-3")),children:c.map(m=>t.jsxs("div",{className:"flex flex-col items-center py-3",children:[t.jsx("span",{className:"text-base font-bold text-white leading-none",children:m.value}),t.jsx("span",{className:"text-[8px] font-medium text-white/60 uppercase tracking-wider mt-0.5",children:m.label})]},m.id))})})]})}function ni({members:e,groupByPosition:r=!0,positionGroups:o,display:n={showNumber:!0,showPosition:!0},header:a,styles:s}){const i=s?.groupHeaderTypography||si,l=s?.columns||4,u=lr[l]||lr[4];if(r){const c=Pt(e,o);return t.jsxs("div",{className:d(ie(s),"flex flex-col",de(s)),children:[a&&t.jsx("div",{className:le(s),children:a}),c.map(m=>t.jsxs("div",{className:"space-y-3",children:[t.jsx("div",{className:i,children:m.label}),t.jsx("div",{className:d("grid",u,ce(s)),children:m.members.map(p=>t.jsx(dr,{member:p,display:n,styles:s},p.id))})]},m.key))]})}return t.jsxs("div",{className:d(ie(s),"flex flex-col",de(s)),children:[a&&t.jsx("div",{className:le(s),children:a}),t.jsx("div",{className:d("grid",u,ce(s)),children:e.map(c=>t.jsx(dr,{member:c,display:n,styles:s},c.id))})]})}function ai({variant:e="card",...r}){switch(e){case"detailed":return t.jsx(oi,{...r});case"portrait":return t.jsx(ni,{...r});case"card":default:return t.jsx(Ja,{...r})}}exports.Badge=gt;exports.BadgeGroup=xt;exports.BarItem=Yr;exports.BettingOdds=_r;exports.CTAButton=ns;exports.CTAGroup=$e;exports.ComparisonItem=qr;exports.CompetitorProfileBlock=ga;exports.ContentCard=q;exports.ContentListBlock=Ca;exports.Countdown=yr;exports.DefaultStatItem=Dr;exports.EntityDisplay=G;exports.FORM_INDICATOR_DEFAULT_LABELS=kt;exports.FeaturedContentBlock=Oa;exports.FormIndicator=ke;exports.HeadToHeadBlock=ra;exports.HeadToHeadItem=Zr;exports.HeroCard=Cr;exports.HorizontalStatItem=$r;exports.InlineScore=Pr;exports.MatchListBlock=Za;exports.MatchScore=z;exports.MatchupHeader=At;exports.MinimalCard=Mr;exports.Pagination=jt;exports.ProfileHeader=Se;exports.PromoCard=Lr;exports.ScoreCard=Ir;exports.ScoreLine=zr;exports.SectionHeader=R;exports.SquadBlock=ai;exports.StackedStatItem=Er;exports.StandardCard=Tr;exports.StatItem=Gr;exports.StatsGrid=re;exports.StatsHeadToHead=Ct;exports.StatsTable=xn;exports.Tooltip=be;exports.cn=d;
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),A=require("react"),co=require("react-dom"),uo=(e,r)=>{const o=new Array(e.length+r.length);for(let n=0;n<e.length;n++)o[n]=e[n];for(let n=0;n<r.length;n++)o[e.length+n]=r[n];return o},mo=(e,r)=>({classGroupId:e,validator:r}),cr=(e=new Map,r=null,o)=>({nextPart:e,validators:r,classGroupId:o}),De="-",Dt=[],po="arbitrary..",go=e=>{const r=ho(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return xo(i);const l=i.split(De),u=l[0]===""&&l.length>1?1:0;return ur(l,u,r)},getConflictingClassGroupIds:(i,l)=>{if(l){const u=n[i],c=o[i];return u?c?uo(c,u):u:c||Dt}return o[i]||Dt}}},ur=(e,r,o)=>{if(e.length-r===0)return o.classGroupId;const a=e[r],s=o.nextPart.get(a);if(s){const c=ur(e,r+1,s);if(c)return c}const i=o.validators;if(i===null)return;const l=r===0?e.join(De):e.slice(r).join(De),u=i.length;for(let c=0;c<u;c++){const m=i[c];if(m.validator(l))return m.classGroupId}},xo=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const r=e.slice(1,-1),o=r.indexOf(":"),n=r.slice(0,o);return n?po+n:void 0})(),ho=e=>{const{theme:r,classGroups:o}=e;return fo(o,r)},fo=(e,r)=>{const o=cr();for(const n in e){const a=e[n];pt(a,o,n,r)}return o},pt=(e,r,o,n)=>{const a=e.length;for(let s=0;s<a;s++){const i=e[s];bo(i,r,o,n)}},bo=(e,r,o,n)=>{if(typeof e=="string"){jo(e,r,o);return}if(typeof e=="function"){vo(e,r,o,n);return}wo(e,r,o,n)},jo=(e,r,o)=>{const n=e===""?r:mr(r,e);n.classGroupId=o},vo=(e,r,o,n)=>{if(yo(e)){pt(e(n),r,o,n);return}r.validators===null&&(r.validators=[]),r.validators.push(mo(o,e))},wo=(e,r,o,n)=>{const a=Object.entries(e),s=a.length;for(let i=0;i<s;i++){const[l,u]=a[i];pt(u,mr(r,l),o,n)}},mr=(e,r)=>{let o=e;const n=r.split(De),a=n.length;for(let s=0;s<a;s++){const i=n[s];let l=o.nextPart.get(i);l||(l=cr(),o.nextPart.set(i,l)),o=l}return o},yo=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,No=e=>{if(e<1)return{get:()=>{},set:()=>{}};let r=0,o=Object.create(null),n=Object.create(null);const a=(s,i)=>{o[s]=i,r++,r>e&&(r=0,n=o,o=Object.create(null))};return{get(s){let i=o[s];if(i!==void 0)return i;if((i=n[s])!==void 0)return a(s,i),i},set(s,i){s in o?o[s]=i:a(s,i)}}},ut="!",Et=":",Co=[],$t=(e,r,o,n,a)=>({modifiers:e,hasImportantModifier:r,baseClassName:o,maybePostfixModifierPosition:n,isExternal:a}),ko=e=>{const{prefix:r,experimentalParseClassName:o}=e;let n=a=>{const s=[];let i=0,l=0,u=0,c;const m=a.length;for(let N=0;N<m;N++){const S=a[N];if(i===0&&l===0){if(S===Et){s.push(a.slice(u,N)),u=N+1;continue}if(S==="/"){c=N;continue}}S==="["?i++:S==="]"?i--:S==="("?l++:S===")"&&l--}const p=s.length===0?a:a.slice(u);let j=p,v=!1;p.endsWith(ut)?(j=p.slice(0,-1),v=!0):p.startsWith(ut)&&(j=p.slice(1),v=!0);const k=c&&c>u?c-u:void 0;return $t(s,v,j,k)};if(r){const a=r+Et,s=n;n=i=>i.startsWith(a)?s(i.slice(a.length)):$t(Co,!1,i,void 0,!0)}if(o){const a=n;n=s=>o({className:s,parseClassName:a})}return n},So=e=>{const r=new Map;return e.orderSensitiveModifiers.forEach((o,n)=>{r.set(o,1e6+n)}),o=>{const n=[];let a=[];for(let s=0;s<o.length;s++){const i=o[s],l=i[0]==="[",u=r.has(i);l||u?(a.length>0&&(a.sort(),n.push(...a),a=[]),n.push(i)):a.push(i)}return a.length>0&&(a.sort(),n.push(...a)),n}},Ao=e=>({cache:No(e.cacheSize),parseClassName:ko(e),sortModifiers:So(e),...go(e)}),Ro=/\s+/,To=(e,r)=>{const{parseClassName:o,getClassGroupId:n,getConflictingClassGroupIds:a,sortModifiers:s}=r,i=[],l=e.trim().split(Ro);let u="";for(let c=l.length-1;c>=0;c-=1){const m=l[c],{isExternal:p,modifiers:j,hasImportantModifier:v,baseClassName:k,maybePostfixModifierPosition:N}=o(m);if(p){u=m+(u.length>0?" "+u:u);continue}let S=!!N,g=n(S?k.substring(0,N):k);if(!g){if(!S){u=m+(u.length>0?" "+u:u);continue}if(g=n(k),!g){u=m+(u.length>0?" "+u:u);continue}S=!1}const x=j.length===0?"":j.length===1?j[0]:s(j).join(":"),y=v?x+ut:x,P=y+g;if(i.indexOf(P)>-1)continue;i.push(P);const _=a(g,S);for(let B=0;B<_.length;++B){const E=_[B];i.push(y+E)}u=m+(u.length>0?" "+u:u)}return u},Lo=(...e)=>{let r=0,o,n,a="";for(;r<e.length;)(o=e[r++])&&(n=pr(o))&&(a&&(a+=" "),a+=n);return a},pr=e=>{if(typeof e=="string")return e;let r,o="";for(let n=0;n<e.length;n++)e[n]&&(r=pr(e[n]))&&(o&&(o+=" "),o+=r);return o},Mo=(e,...r)=>{let o,n,a,s;const i=u=>{const c=r.reduce((m,p)=>p(m),e());return o=Ao(c),n=o.cache.get,a=o.cache.set,s=l,l(u)},l=u=>{const c=n(u);if(c)return c;const m=To(u,o);return a(u,m),m};return s=i,(...u)=>s(Lo(...u))},Po=[],T=e=>{const r=o=>o[e]||Po;return r.isThemeGetter=!0,r},gr=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,xr=/^\((?:(\w[\w-]*):)?(.+)\)$/i,_o=/^\d+\/\d+$/,Io=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,zo=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Bo=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Oo=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Do=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,se=e=>_o.test(e),C=e=>!!e&&!Number.isNaN(Number(e)),X=e=>!!e&&Number.isInteger(Number(e)),rt=e=>e.endsWith("%")&&C(e.slice(0,-1)),V=e=>Io.test(e),Eo=()=>!0,$o=e=>zo.test(e)&&!Bo.test(e),hr=()=>!1,Go=e=>Oo.test(e),Ho=e=>Do.test(e),Uo=e=>!h(e)&&!f(e),Wo=e=>ue(e,jr,hr),h=e=>gr.test(e),ee=e=>ue(e,vr,$o),ot=e=>ue(e,Zo,C),Gt=e=>ue(e,fr,hr),Vo=e=>ue(e,br,Ho),_e=e=>ue(e,wr,Go),f=e=>xr.test(e),fe=e=>me(e,vr),Fo=e=>me(e,Ko),Ht=e=>me(e,fr),Yo=e=>me(e,jr),qo=e=>me(e,br),Ie=e=>me(e,wr,!0),ue=(e,r,o)=>{const n=gr.exec(e);return n?n[1]?r(n[1]):o(n[2]):!1},me=(e,r,o=!1)=>{const n=xr.exec(e);return n?n[1]?r(n[1]):o:!1},fr=e=>e==="position"||e==="percentage",br=e=>e==="image"||e==="url",jr=e=>e==="length"||e==="size"||e==="bg-size",vr=e=>e==="length",Zo=e=>e==="number",Ko=e=>e==="family-name",wr=e=>e==="shadow",Xo=()=>{const e=T("color"),r=T("font"),o=T("text"),n=T("font-weight"),a=T("tracking"),s=T("leading"),i=T("breakpoint"),l=T("container"),u=T("spacing"),c=T("radius"),m=T("shadow"),p=T("inset-shadow"),j=T("text-shadow"),v=T("drop-shadow"),k=T("blur"),N=T("perspective"),S=T("aspect"),g=T("ease"),x=T("animate"),y=()=>["auto","avoid","all","avoid-page","page","left","right","column"],P=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],_=()=>[...P(),f,h],B=()=>["auto","hidden","clip","visible","scroll"],E=()=>["auto","contain","none"],b=()=>[f,h,u],O=()=>[se,"full","auto",...b()],Q=()=>[X,"none","subgrid",f,h],oe=()=>["auto",{span:["full",X,f,h]},X,f,h],$=()=>[X,"auto",f,h],U=()=>["auto","min","max","fr",f,h],he=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],K=()=>["start","end","center","stretch","center-safe","end-safe"],W=()=>["auto",...b()],J=()=>[se,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...b()],w=()=>[e,f,h],_t=()=>[...P(),Ht,Gt,{position:[f,h]}],It=()=>["no-repeat",{repeat:["","x","y","space","round"]}],zt=()=>["auto","cover","contain",Yo,Wo,{size:[f,h]}],et=()=>[rt,fe,ee],I=()=>["","none","full",c,f,h],D=()=>["",C,fe,ee],Te=()=>["solid","dashed","dotted","double"],Bt=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],L=()=>[C,rt,Ht,Gt],Ot=()=>["","none",k,f,h],Le=()=>["none",C,f,h],Me=()=>["none",C,f,h],tt=()=>[C,f,h],Pe=()=>[se,"full",...b()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[V],breakpoint:[V],color:[Eo],container:[V],"drop-shadow":[V],ease:["in","out","in-out"],font:[Uo],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[V],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[V],shadow:[V],spacing:["px",C],text:[V],"text-shadow":[V],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",se,h,f,S]}],container:["container"],columns:[{columns:[C,h,f,l]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:_()}],overflow:[{overflow:B()}],"overflow-x":[{"overflow-x":B()}],"overflow-y":[{"overflow-y":B()}],overscroll:[{overscroll:E()}],"overscroll-x":[{"overscroll-x":E()}],"overscroll-y":[{"overscroll-y":E()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:O()}],"inset-x":[{"inset-x":O()}],"inset-y":[{"inset-y":O()}],start:[{start:O()}],end:[{end:O()}],top:[{top:O()}],right:[{right:O()}],bottom:[{bottom:O()}],left:[{left:O()}],visibility:["visible","invisible","collapse"],z:[{z:[X,"auto",f,h]}],basis:[{basis:[se,"full","auto",l,...b()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[C,se,"auto","initial","none",h]}],grow:[{grow:["",C,f,h]}],shrink:[{shrink:["",C,f,h]}],order:[{order:[X,"first","last","none",f,h]}],"grid-cols":[{"grid-cols":Q()}],"col-start-end":[{col:oe()}],"col-start":[{"col-start":$()}],"col-end":[{"col-end":$()}],"grid-rows":[{"grid-rows":Q()}],"row-start-end":[{row:oe()}],"row-start":[{"row-start":$()}],"row-end":[{"row-end":$()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":U()}],"auto-rows":[{"auto-rows":U()}],gap:[{gap:b()}],"gap-x":[{"gap-x":b()}],"gap-y":[{"gap-y":b()}],"justify-content":[{justify:[...he(),"normal"]}],"justify-items":[{"justify-items":[...K(),"normal"]}],"justify-self":[{"justify-self":["auto",...K()]}],"align-content":[{content:["normal",...he()]}],"align-items":[{items:[...K(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...K(),{baseline:["","last"]}]}],"place-content":[{"place-content":he()}],"place-items":[{"place-items":[...K(),"baseline"]}],"place-self":[{"place-self":["auto",...K()]}],p:[{p:b()}],px:[{px:b()}],py:[{py:b()}],ps:[{ps:b()}],pe:[{pe:b()}],pt:[{pt:b()}],pr:[{pr:b()}],pb:[{pb:b()}],pl:[{pl:b()}],m:[{m:W()}],mx:[{mx:W()}],my:[{my:W()}],ms:[{ms:W()}],me:[{me:W()}],mt:[{mt:W()}],mr:[{mr:W()}],mb:[{mb:W()}],ml:[{ml:W()}],"space-x":[{"space-x":b()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":b()}],"space-y-reverse":["space-y-reverse"],size:[{size:J()}],w:[{w:[l,"screen",...J()]}],"min-w":[{"min-w":[l,"screen","none",...J()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[i]},...J()]}],h:[{h:["screen","lh",...J()]}],"min-h":[{"min-h":["screen","lh","none",...J()]}],"max-h":[{"max-h":["screen","lh",...J()]}],"font-size":[{text:["base",o,fe,ee]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,f,ot]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",rt,h]}],"font-family":[{font:[Fo,h,r]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[a,f,h]}],"line-clamp":[{"line-clamp":[C,"none",f,ot]}],leading:[{leading:[s,...b()]}],"list-image":[{"list-image":["none",f,h]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",f,h]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:w()}],"text-color":[{text:w()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Te(),"wavy"]}],"text-decoration-thickness":[{decoration:[C,"from-font","auto",f,ee]}],"text-decoration-color":[{decoration:w()}],"underline-offset":[{"underline-offset":[C,"auto",f,h]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:b()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",f,h]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",f,h]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:_t()}],"bg-repeat":[{bg:It()}],"bg-size":[{bg:zt()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},X,f,h],radial:["",f,h],conic:[X,f,h]},qo,Vo]}],"bg-color":[{bg:w()}],"gradient-from-pos":[{from:et()}],"gradient-via-pos":[{via:et()}],"gradient-to-pos":[{to:et()}],"gradient-from":[{from:w()}],"gradient-via":[{via:w()}],"gradient-to":[{to:w()}],rounded:[{rounded:I()}],"rounded-s":[{"rounded-s":I()}],"rounded-e":[{"rounded-e":I()}],"rounded-t":[{"rounded-t":I()}],"rounded-r":[{"rounded-r":I()}],"rounded-b":[{"rounded-b":I()}],"rounded-l":[{"rounded-l":I()}],"rounded-ss":[{"rounded-ss":I()}],"rounded-se":[{"rounded-se":I()}],"rounded-ee":[{"rounded-ee":I()}],"rounded-es":[{"rounded-es":I()}],"rounded-tl":[{"rounded-tl":I()}],"rounded-tr":[{"rounded-tr":I()}],"rounded-br":[{"rounded-br":I()}],"rounded-bl":[{"rounded-bl":I()}],"border-w":[{border:D()}],"border-w-x":[{"border-x":D()}],"border-w-y":[{"border-y":D()}],"border-w-s":[{"border-s":D()}],"border-w-e":[{"border-e":D()}],"border-w-t":[{"border-t":D()}],"border-w-r":[{"border-r":D()}],"border-w-b":[{"border-b":D()}],"border-w-l":[{"border-l":D()}],"divide-x":[{"divide-x":D()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":D()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Te(),"hidden","none"]}],"divide-style":[{divide:[...Te(),"hidden","none"]}],"border-color":[{border:w()}],"border-color-x":[{"border-x":w()}],"border-color-y":[{"border-y":w()}],"border-color-s":[{"border-s":w()}],"border-color-e":[{"border-e":w()}],"border-color-t":[{"border-t":w()}],"border-color-r":[{"border-r":w()}],"border-color-b":[{"border-b":w()}],"border-color-l":[{"border-l":w()}],"divide-color":[{divide:w()}],"outline-style":[{outline:[...Te(),"none","hidden"]}],"outline-offset":[{"outline-offset":[C,f,h]}],"outline-w":[{outline:["",C,fe,ee]}],"outline-color":[{outline:w()}],shadow:[{shadow:["","none",m,Ie,_e]}],"shadow-color":[{shadow:w()}],"inset-shadow":[{"inset-shadow":["none",p,Ie,_e]}],"inset-shadow-color":[{"inset-shadow":w()}],"ring-w":[{ring:D()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:w()}],"ring-offset-w":[{"ring-offset":[C,ee]}],"ring-offset-color":[{"ring-offset":w()}],"inset-ring-w":[{"inset-ring":D()}],"inset-ring-color":[{"inset-ring":w()}],"text-shadow":[{"text-shadow":["none",j,Ie,_e]}],"text-shadow-color":[{"text-shadow":w()}],opacity:[{opacity:[C,f,h]}],"mix-blend":[{"mix-blend":[...Bt(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Bt()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[C]}],"mask-image-linear-from-pos":[{"mask-linear-from":L()}],"mask-image-linear-to-pos":[{"mask-linear-to":L()}],"mask-image-linear-from-color":[{"mask-linear-from":w()}],"mask-image-linear-to-color":[{"mask-linear-to":w()}],"mask-image-t-from-pos":[{"mask-t-from":L()}],"mask-image-t-to-pos":[{"mask-t-to":L()}],"mask-image-t-from-color":[{"mask-t-from":w()}],"mask-image-t-to-color":[{"mask-t-to":w()}],"mask-image-r-from-pos":[{"mask-r-from":L()}],"mask-image-r-to-pos":[{"mask-r-to":L()}],"mask-image-r-from-color":[{"mask-r-from":w()}],"mask-image-r-to-color":[{"mask-r-to":w()}],"mask-image-b-from-pos":[{"mask-b-from":L()}],"mask-image-b-to-pos":[{"mask-b-to":L()}],"mask-image-b-from-color":[{"mask-b-from":w()}],"mask-image-b-to-color":[{"mask-b-to":w()}],"mask-image-l-from-pos":[{"mask-l-from":L()}],"mask-image-l-to-pos":[{"mask-l-to":L()}],"mask-image-l-from-color":[{"mask-l-from":w()}],"mask-image-l-to-color":[{"mask-l-to":w()}],"mask-image-x-from-pos":[{"mask-x-from":L()}],"mask-image-x-to-pos":[{"mask-x-to":L()}],"mask-image-x-from-color":[{"mask-x-from":w()}],"mask-image-x-to-color":[{"mask-x-to":w()}],"mask-image-y-from-pos":[{"mask-y-from":L()}],"mask-image-y-to-pos":[{"mask-y-to":L()}],"mask-image-y-from-color":[{"mask-y-from":w()}],"mask-image-y-to-color":[{"mask-y-to":w()}],"mask-image-radial":[{"mask-radial":[f,h]}],"mask-image-radial-from-pos":[{"mask-radial-from":L()}],"mask-image-radial-to-pos":[{"mask-radial-to":L()}],"mask-image-radial-from-color":[{"mask-radial-from":w()}],"mask-image-radial-to-color":[{"mask-radial-to":w()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":P()}],"mask-image-conic-pos":[{"mask-conic":[C]}],"mask-image-conic-from-pos":[{"mask-conic-from":L()}],"mask-image-conic-to-pos":[{"mask-conic-to":L()}],"mask-image-conic-from-color":[{"mask-conic-from":w()}],"mask-image-conic-to-color":[{"mask-conic-to":w()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:_t()}],"mask-repeat":[{mask:It()}],"mask-size":[{mask:zt()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",f,h]}],filter:[{filter:["","none",f,h]}],blur:[{blur:Ot()}],brightness:[{brightness:[C,f,h]}],contrast:[{contrast:[C,f,h]}],"drop-shadow":[{"drop-shadow":["","none",v,Ie,_e]}],"drop-shadow-color":[{"drop-shadow":w()}],grayscale:[{grayscale:["",C,f,h]}],"hue-rotate":[{"hue-rotate":[C,f,h]}],invert:[{invert:["",C,f,h]}],saturate:[{saturate:[C,f,h]}],sepia:[{sepia:["",C,f,h]}],"backdrop-filter":[{"backdrop-filter":["","none",f,h]}],"backdrop-blur":[{"backdrop-blur":Ot()}],"backdrop-brightness":[{"backdrop-brightness":[C,f,h]}],"backdrop-contrast":[{"backdrop-contrast":[C,f,h]}],"backdrop-grayscale":[{"backdrop-grayscale":["",C,f,h]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[C,f,h]}],"backdrop-invert":[{"backdrop-invert":["",C,f,h]}],"backdrop-opacity":[{"backdrop-opacity":[C,f,h]}],"backdrop-saturate":[{"backdrop-saturate":[C,f,h]}],"backdrop-sepia":[{"backdrop-sepia":["",C,f,h]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":b()}],"border-spacing-x":[{"border-spacing-x":b()}],"border-spacing-y":[{"border-spacing-y":b()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",f,h]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[C,"initial",f,h]}],ease:[{ease:["linear","initial",g,f,h]}],delay:[{delay:[C,f,h]}],animate:[{animate:["none",x,f,h]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[N,f,h]}],"perspective-origin":[{"perspective-origin":_()}],rotate:[{rotate:Le()}],"rotate-x":[{"rotate-x":Le()}],"rotate-y":[{"rotate-y":Le()}],"rotate-z":[{"rotate-z":Le()}],scale:[{scale:Me()}],"scale-x":[{"scale-x":Me()}],"scale-y":[{"scale-y":Me()}],"scale-z":[{"scale-z":Me()}],"scale-3d":["scale-3d"],skew:[{skew:tt()}],"skew-x":[{"skew-x":tt()}],"skew-y":[{"skew-y":tt()}],transform:[{transform:[f,h,"","none","gpu","cpu"]}],"transform-origin":[{origin:_()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Pe()}],"translate-x":[{"translate-x":Pe()}],"translate-y":[{"translate-y":Pe()}],"translate-z":[{"translate-z":Pe()}],"translate-none":["translate-none"],accent:[{accent:w()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:w()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",f,h]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":b()}],"scroll-mx":[{"scroll-mx":b()}],"scroll-my":[{"scroll-my":b()}],"scroll-ms":[{"scroll-ms":b()}],"scroll-me":[{"scroll-me":b()}],"scroll-mt":[{"scroll-mt":b()}],"scroll-mr":[{"scroll-mr":b()}],"scroll-mb":[{"scroll-mb":b()}],"scroll-ml":[{"scroll-ml":b()}],"scroll-p":[{"scroll-p":b()}],"scroll-px":[{"scroll-px":b()}],"scroll-py":[{"scroll-py":b()}],"scroll-ps":[{"scroll-ps":b()}],"scroll-pe":[{"scroll-pe":b()}],"scroll-pt":[{"scroll-pt":b()}],"scroll-pr":[{"scroll-pr":b()}],"scroll-pb":[{"scroll-pb":b()}],"scroll-pl":[{"scroll-pl":b()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",f,h]}],fill:[{fill:["none",...w()]}],"stroke-w":[{stroke:[C,fe,ee,ot]}],stroke:[{stroke:["none",...w()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Qo=Mo(Xo);function d(...e){return Qo(e.filter(Boolean).join(" "))}const Jo={default:"bg-neutral-700 text-white border-neutral-700",primary:"text-white bg-primary-500 border-primary-500",secondary:"text-white bg-secondary-500 border-secondary-500",danger:"bg-red-600 text-white border-red-700",warning:"bg-yellow-600 text-white border-yellow-700",success:"bg-green-600 text-white border-green-700",info:"bg-cyan-600 text-white border-cyan-700",custom:""};function gt({badge:e}){const r=e.variant||"default",o=r==="custom",n=Jo[r],a=e.styles?.container,s=o?a:d("inline-block text-xs font-semibold px-2 sm:px-3 py-1 rounded border",n,a);return t.jsx("span",{role:"status","aria-label":e.text,className:s,children:e.text})}const es={"top-left":"absolute top-2 sm:top-3 left-2 sm:left-3 flex flex-wrap gap-2 z-10","top-right":"absolute top-2 sm:top-3 right-2 sm:right-3 flex flex-wrap gap-2 justify-end z-10","bottom-left":"absolute bottom-2 sm:bottom-3 left-2 sm:left-3 flex flex-wrap gap-2 z-10","bottom-right":"absolute bottom-2 sm:bottom-3 right-2 sm:right-3 flex flex-wrap gap-2 justify-end z-10"};function xt({badges:e,positions:r=["top-left","top-right","bottom-left","bottom-right"],styles:o}){return!e||e.length===0?null:t.jsx(t.Fragment,{children:r.map(n=>{const a=e.filter(s=>s.position===n);return a.length===0?null:t.jsx("div",{className:d(es[n],o?.container),role:"group","aria-label":`${n} badges`,children:a.map((s,i)=>t.jsx(gt,{badge:s},`${n}-${i}`))},n)})})}const ts={gap:{none:"gap-0",sm:"gap-1",md:"gap-2",lg:"gap-3",xl:"gap-4"}},ht={cell:"backdrop-blur-md bg-black/10 rounded-lg px-2 py-1",gap:"md",typography:{value:"font-bold",label:"text-xs mt-1 opacity-90"}};function rs(e){return`${e?.cell??ht.cell} flex min-w-12 text-center items-center justify-center`}function os(e){return ts.gap[e?.gap??ht.gap]}function Ut(e,r){return r?.typography?.[e]??ht.typography[e]}const ze={days:"Days",hours:"Hours",minutes:"Mins",seconds:"Secs"};function Wt(e){const r=e.getTime()-new Date().getTime();return r<=0?{days:0,hours:0,minutes:0,seconds:0,total:0}:{days:Math.floor(r/(1e3*60*60*24)),hours:Math.floor(r/(1e3*60*60)%24),minutes:Math.floor(r/1e3/60%60),seconds:Math.floor(r/1e3%60),total:r}}function yr({targetDate:e,styles:r,labels:o}){const n=A.useMemo(()=>typeof e=="string"?new Date(e):e,[e]),[a,s]=A.useState(Wt(n)),i=rs(r),l=os(r),u=Ut("value",r),c=Ut("label",r),m={days:o?.days??ze.days,hours:o?.hours??ze.hours,minutes:o?.minutes??ze.minutes,seconds:o?.seconds??ze.seconds};return A.useEffect(()=>{const p=setInterval(()=>{s(Wt(n))},1e3);return()=>clearInterval(p)},[n]),t.jsxs("div",{className:d("flex",l,r?.container),role:"timer","aria-live":"polite",children:[a.days>0&&t.jsxs("div",{className:"flex flex-col items-center",children:[t.jsx("div",{className:d(i,u),children:a.days}),t.jsx("div",{className:c,children:m.days})]}),t.jsxs("div",{className:"flex flex-col items-center",children:[t.jsx("div",{className:d(i,u),children:String(a.hours).padStart(2,"0")}),t.jsx("div",{className:c,children:m.hours})]}),t.jsxs("div",{className:"flex flex-col items-center",children:[t.jsx("div",{className:d(i,u),children:String(a.minutes).padStart(2,"0")}),t.jsx("div",{className:c,children:m.minutes})]}),t.jsxs("div",{className:"flex flex-col items-center",children:[t.jsx("div",{className:d(i,u),children:String(a.seconds).padStart(2,"0")}),t.jsx("div",{className:c,children:m.seconds})]})]})}const ss={default:"bg-muted text-foreground hover:bg-muted/80 border border-transparent",primary:"bg-primary-500 text-white hover:bg-primary-600 border border-transparent",secondary:"bg-secondary-500 text-secondary-foreground hover:bg-secondary-500/80 border border-transparent",outline:"bg-transparent border border-current text-foreground hover:bg-muted",link:"bg-transparent text-primary-500 hover:underline border border-transparent px-0 py-0",custom:""};function ns({text:e,href:r,onClick:o,variant:n,styles:a}){const s=n==="custom",i=ss[n||"default"],l=a?.container,u=s?l:d("box-border w-full flex items-center justify-center px-4 py-2 rounded text-sm font-medium transition-colors whitespace-nowrap cursor-pointer",i,l),c=m=>{o&&(m.preventDefault(),m.stopPropagation(),o())};return r?t.jsx("a",{href:r,className:u,onClick:c,role:"link","aria-label":e,children:e}):t.jsx("button",{type:"button",className:u,onClick:c,"aria-label":e,children:e})}const as={vertical:"flex flex-col gap-2 sm:gap-1.5",horizontal:"flex flex-row gap-2 sm:gap-3",responsive:"flex flex-col sm:flex-row gap-1 sm:gap-2"};function $e({primaryCta:e,secondaryCta:r,layout:o="responsive",styles:n}){return!e&&!r?null:t.jsxs("div",{role:"group","aria-label":"Call to action buttons",className:d(as[o],n?.container),children:[e,r]})}const is={xs:"w-4 h-4",sm:"w-6 h-6",md:"w-8 h-8",lg:"w-10 h-10",xl:"w-12 h-12","2xl":"w-16 h-16","3xl":"w-20 h-20"},ls={1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4"},ds={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl",full:"rounded-full"};function G({name:e,mobileName:r,imageUrl:o,subtitle:n,orientation:a="ltr",truncate:s=!1,styles:i}){const l=i?.imageSize||"md",u=i?.imageBorderRadius||"md",c=i?.imageBorder||"",m=i?.gap||"2",p=i?.textAlign||"left",j=is[l],v=ds[u],k=ls[m],N=i?.typography?.name||"font-semibold leading-5",S=i?.typography?.subtitle||"text-xs text-muted-foreground",g=a==="rtl"?"flex-row-reverse":"flex-row",x=p==="right"?"text-right":"text-left";return t.jsxs("div",{className:d("flex items-center",g,k,i?.container),role:"group","aria-label":`${e}${n?` - ${n}`:""}`,children:[o&&t.jsx("img",{src:o,alt:"","aria-hidden":"true",className:d(j,v,"object-cover shrink-0",c)}),t.jsxs("div",{className:d("flex flex-col",x,s&&"min-w-0"),children:[r?t.jsxs("span",{className:d(N,s&&"truncate"),children:[t.jsx("span",{className:"sm:hidden",children:r}),t.jsx("span",{className:"hidden sm:inline",children:e})]}):t.jsx("span",{className:d(N,s&&"truncate"),children:e}),n&&t.jsx("span",{className:d(S,s&&"truncate"),children:n})]})]})}const pe={sm:{button:"px-2 py-1 text-xs min-w-[28px]",icon:"w-3 h-3",dot:"w-2 h-2"},md:{button:"px-3 py-1.5 text-sm min-w-[36px]",icon:"w-4 h-4",dot:"w-2.5 h-2.5"},lg:{button:"px-4 py-2 text-base min-w-[44px]",icon:"w-5 h-5",dot:"w-3 h-3"}},Ge={sm:"gap-1",md:"gap-2",lg:"gap-3"},He={previous:"Previous",next:"Next",first:"First",last:"Last",loadMore:"Load More",pageInfo:"Page {current} of {total}"},ft=({className:e})=>t.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 19l-7-7 7-7"})}),bt=({className:e})=>t.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})}),cs=({className:e})=>t.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11 19l-7-7 7-7M18 19l-7-7 7-7"})}),us=({className:e})=>t.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13 5l7 7-7 7M6 5l7 7-7 7"})});function F({onClick:e,disabled:r,active:o,size:n,styles:a,children:s,ariaLabel:i}){const l=pe[n],u="inline-flex items-center justify-center rounded-md transition-colors focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-1",c=r?"opacity-50 cursor-not-allowed bg-muted text-muted-foreground":o?d("cursor-pointer bg-primary-500 text-white",a?.typography?.activeButton):d("cursor-pointer bg-muted text-foreground hover:bg-muted/80",a?.typography?.button);return t.jsx("button",{type:"button",onClick:e,disabled:r,"aria-label":i,"aria-current":o?"page":void 0,className:d(u,l.button,c),children:s})}function ms(e,r,o){if(r<=o)return Array.from({length:r},(l,u)=>u+1);const n=Math.floor(o/2);let a=Math.max(1,e-n),s=Math.min(r,a+o-1);s-a+1<o&&(a=Math.max(1,s-o+1));const i=[];a>1&&(i.push(1),a>2&&i.push("ellipsis"));for(let l=a;l<=s;l++)l!==1&&l!==r&&i.push(l);return s<r&&(s<r-1&&i.push("ellipsis"),i.push(r)),i}function ps({currentPage:e,totalPages:r,onPageChange:o,disabled:n,size:a="md",icons:s,labels:i,styles:l,maxVisiblePages:u=5,showFirstLast:c=!1,showPrevNext:m=!0}){const p=pe[a],j={...He,...i},v=ms(e,r,u),k=Ge[l?.gap||"sm"];return t.jsxs("nav",{className:d("flex items-center",k,l?.container),"aria-label":"Pagination",children:[c&&t.jsx(F,{onClick:()=>o(1),disabled:n||e===1,size:a,styles:l,ariaLabel:j.first,children:s?.first||t.jsx(cs,{className:p.icon})}),m&&t.jsx(F,{onClick:()=>o(e-1),disabled:n||e===1,size:a,styles:l,ariaLabel:j.previous,children:s?.previous||t.jsx(ft,{className:p.icon})}),v.map((N,S)=>N==="ellipsis"?t.jsx("span",{className:"px-2 text-muted-foreground",children:"..."},`ellipsis-${S}`):t.jsx(F,{onClick:()=>o(N),disabled:n,active:N===e,size:a,styles:l,ariaLabel:`Page ${N}`,children:N},N)),m&&t.jsx(F,{onClick:()=>o(e+1),disabled:n||e===r,size:a,styles:l,ariaLabel:j.next,children:s?.next||t.jsx(bt,{className:p.icon})}),c&&t.jsx(F,{onClick:()=>o(r),disabled:n||e===r,size:a,styles:l,ariaLabel:j.last,children:s?.last||t.jsx(us,{className:p.icon})})]})}function gs({currentPage:e,totalPages:r,onPageChange:o,disabled:n,size:a="md",icons:s,labels:i,styles:l,showLabels:u=!0}){const c=pe[a],m={...He,...i},p=Ge[l?.gap||"md"];return t.jsxs("nav",{className:d("flex items-center",p,l?.container),"aria-label":"Pagination",children:[t.jsxs(F,{onClick:()=>o(e-1),disabled:n||e===1,size:a,styles:l,ariaLabel:m.previous,children:[s?.previous||t.jsx(ft,{className:c.icon}),u&&t.jsx("span",{className:"ml-1",children:m.previous})]}),t.jsxs(F,{onClick:()=>o(e+1),disabled:n||e===r,size:a,styles:l,ariaLabel:m.next,children:[u&&t.jsx("span",{className:"mr-1",children:m.next}),s?.next||t.jsx(bt,{className:c.icon})]})]})}function xs({currentPage:e,totalPages:r,onPageChange:o,disabled:n,size:a="md",icons:s,labels:i,styles:l}){const u=pe[a],c={...He,...i},m=Ge[l?.gap||"md"],p=c.pageInfo.replace("{current}",String(e)).replace("{total}",String(r));return t.jsxs("nav",{className:d("flex items-center",m,l?.container),"aria-label":"Pagination",children:[t.jsx(F,{onClick:()=>o(e-1),disabled:n||e===1,size:a,styles:l,ariaLabel:c.previous,children:s?.previous||t.jsx(ft,{className:u.icon})}),t.jsx("span",{className:d("px-2",l?.typography?.pageInfo||"text-sm text-muted-foreground"),children:p}),t.jsx(F,{onClick:()=>o(e+1),disabled:n||e===r,size:a,styles:l,ariaLabel:c.next,children:s?.next||t.jsx(bt,{className:u.icon})})]})}function hs({currentPage:e,totalPages:r,onPageChange:o,disabled:n,size:a="md",styles:s}){const i=pe[a],l=Ge[s?.gap||"sm"];return t.jsx("nav",{className:d("flex items-center",l,s?.container),"aria-label":"Pagination",children:Array.from({length:r},(u,c)=>c+1).map(u=>t.jsx("button",{type:"button",onClick:()=>o(u),disabled:n,"aria-label":`Page ${u}`,"aria-current":u===e?"page":void 0,className:d(i.dot,"rounded-full transition-colors focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-1",n?"opacity-50 cursor-not-allowed":"cursor-pointer",u===e?"bg-primary-500":"bg-muted hover:bg-muted-foreground/50")},u))})}function fs({totalPages:e,onPageChange:r,disabled:o,size:n="md",labels:a,styles:s,loading:i=!1,loadingLabel:l="Loading..."}){const u=pe[n],c={...He,...a},m=o||i||e<=1;return t.jsx("nav",{className:d("flex items-center justify-center",s?.container),"aria-label":"Load more",children:t.jsx("button",{type:"button",onClick:()=>r(2),disabled:m,"aria-label":i?l:c.loadMore,className:d("inline-flex items-center justify-center rounded-md transition-colors focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-1",u.button,m?"opacity-50 cursor-not-allowed bg-muted text-muted-foreground":"cursor-pointer bg-primary-500 text-white hover:bg-primary-600",s?.typography?.button),children:i?l:c.loadMore})})}function jt(e){switch(e.variant){case"numbered":return t.jsx(ps,{...e});case"simple":return t.jsx(gs,{...e});case"compact":return t.jsx(xs,{...e});case"dots":return t.jsx(hs,{...e});case"load-more":return t.jsx(fs,{...e});default:return null}}function be({content:e,children:r,position:o="top",styles:n}){const[a,s]=A.useState(!1),[i,l]=A.useState({top:0,left:0}),u=A.useRef(null),c=A.useId(),m=()=>{if(!u.current)return{top:0,left:0};const x=u.current.getBoundingClientRect();switch(o){case"top":return{top:x.top-8,left:x.left+x.width/2};case"bottom":return{top:x.bottom+8,left:x.left+x.width/2};case"left":return{top:x.top+x.height/2,left:x.left-8};case"right":return{top:x.top+x.height/2,left:x.right+8};default:return{top:0,left:0}}},p=()=>{l(m()),s(!0)},j=()=>{s(!1)},v=()=>{l(m()),s(!0)},k=()=>{s(!1)},N={top:"-translate-x-1/2 -translate-y-full",bottom:"-translate-x-1/2",left:"-translate-x-full -translate-y-1/2",right:"-translate-y-1/2"},S={top:"top-full left-1/2 -translate-x-1/2 border-l-transparent border-r-transparent border-b-transparent border-t-gray-900",bottom:"bottom-full left-1/2 -translate-x-1/2 border-l-transparent border-r-transparent border-t-transparent border-b-gray-900",left:"left-full top-1/2 -translate-y-1/2 border-t-transparent border-b-transparent border-r-transparent border-l-gray-900",right:"right-full top-1/2 -translate-y-1/2 border-t-transparent border-b-transparent border-l-transparent border-r-gray-900"},g=a&&t.jsx("div",{id:c,role:"tooltip","aria-hidden":!a,className:d("fixed z-9999 pointer-events-none",N[o],n?.container),style:{top:`${i.top}px`,left:`${i.left}px`},children:t.jsxs("div",{className:"bg-gray-900 text-white text-xs rounded-md py-1.5 px-2.5 whitespace-nowrap shadow-lg",children:[e,t.jsx("div",{className:d("absolute w-0 h-0 border-4",S[o]),"aria-hidden":"true"})]})});return t.jsxs(t.Fragment,{children:[t.jsx("div",{ref:u,className:"inline-block",onMouseEnter:p,onMouseLeave:j,onFocus:v,onBlur:k,"aria-describedby":a?c:void 0,children:r}),typeof document<"u"&&co.createPortal(g,document.body)]})}function Ue(e){const r=!!(e.onClick||e.link),o=A.useCallback(()=>{e.onClick?e.onClick():e.link&&(window.location.href=e.link)},[e]);return{isClickable:r,handleClick:r?o:void 0}}const je={borderRadius:"lg",shadow:"none",hoverShadow:"md",padding:"md",borderWidth:"1"},ve={borderRadius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl","3xl":"rounded-3xl",full:"rounded-full"},shadow:{none:"shadow-none",sm:"shadow-sm",md:"shadow-md",lg:"shadow-lg",xl:"shadow-xl","2xl":"shadow-2xl"},hoverShadow:{none:"hover:shadow-none",sm:"hover:shadow-sm",md:"hover:shadow-md",lg:"hover:shadow-lg",xl:"hover:shadow-xl","2xl":"hover:shadow-2xl"},padding:{none:"p-0",sm:"p-2 sm:p-3",md:"p-3 sm:p-4",lg:"p-4 sm:p-6",xl:"p-6 sm:p-8"},borderWidth:{0:"border-0",1:"border",2:"border-2",4:"border-4",8:"border-8"}},st={title:{hero:"text-lg sm:text-3xl font-bold",standard:"text-lg sm:text-base font-bold",compact:"text-sm sm:text-base font-bold",minimal:"text-sm sm:text-base font-bold",game:"text-lg sm:text-xl md:text-2xl font-bold",promo:"text-2xl sm:text-3xl md:text-4xl font-bold",social:"text-sm font-bold"},subtitle:"text-base sm:text-lg font-semibold",description:"text-sm",category:"text-xs font-semibold uppercase",metadata:"text-xs"};function Nr(e){const r=e?.borderRadius||je.borderRadius;return ve.borderRadius[r]}function bs(e){const r=e?.shadow||je.shadow;return ve.shadow[r]}function js(e){if(!(e?.hoverable??!0))return"";const o=e?.hoverShadow||je.hoverShadow;return ve.hoverShadow[o]}function vs(e){const r=e?.padding||je.padding;return ve.padding[r]}function ws(e){const r=e?.borderWidth||je.borderWidth;return ve.borderWidth[r]}function ys(e){return e?.borderColor||"border-border"}function Y(e,r,o){return r?.typography?.[e]?r.typography[e]:e==="title"&&o&&o in st.title?st.title[o]:st[e]}function Ns(e){const r=[Nr(e),bs(e),js(e),ws(e),ys(e)];return e?.container&&r.push(e.container),r.filter(Boolean).join(" ")}function Cs(e){const r=[Nr(e)];return e?.imageContainer&&r.push(e.imageContainer),r.filter(Boolean).join(" ")}function ks(e){return e?.background||""}const Ss={standard:{imageAspectRatio:"16/9"},standardHorizontal:{imageAspectRatio:"16/9"},hero:{imageAspectRatio:"16/9"},minimal:{imageAspectRatio:"1/1"},promo:{imageAspectRatio:"16/9"}};function we(e,r="standard"){return A.useMemo(()=>{const o=Ss[r],n=e?.imageAspectRatio||o.imageAspectRatio;return{container:Ns(e),imageContainer:Cs(e),padding:vs(e),background:ks(e),imageAspectRatio:n,typography:{title:Y("title",e,r),subtitle:Y("subtitle",e),description:Y("description",e),category:Y("category",e),metadata:Y("metadata",e)},isHoverable:e?.hoverable??!0}},[e,r])}function Cr({content:e,styles:r,primaryCta:o,secondaryCta:n,matchScore:a}){const s=e.image?.url,i=e.gradient||"linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 50%, transparent 100%)",{isClickable:l,handleClick:u}=Ue(e),c=we(r,"hero");return t.jsx("article",{className:d("dark group overflow-hidden",c.container,l&&"cursor-pointer"),onClick:u,children:t.jsxs("div",{className:d("relative overflow-hidden",c.background,c.imageContainer),style:{aspectRatio:c.imageAspectRatio},children:[s?t.jsx("img",{src:s,alt:e.image?.alt||e.title||"",className:"absolute inset-0 w-full h-full object-cover"}):t.jsx("div",{className:"absolute inset-0 bg-linear-to-br from-primary-600 to-primary-800"}),s&&t.jsx("div",{className:"absolute inset-0 z-0",style:{background:i}}),t.jsx(xt,{badges:e.badges,positions:["top-left","top-right"]}),t.jsx("div",{className:d("absolute inset-0 flex flex-col justify-end z-10",c.padding),children:t.jsxs("div",{className:"flex flex-col justify-between h-full",children:[t.jsx("div",{className:"flex-1"}),t.jsxs("div",{children:[a&&t.jsx("div",{className:"mb-1",children:a}),t.jsxs("div",{className:"hidden md:flex items-center justify-start space-x-3 ",children:[e.badges&&e.badges.filter(m=>m.position==="bottom-left").length>0&&t.jsx("div",{className:"mb-2 flex flex-wrap gap-2",children:e.badges.filter(m=>m.position==="bottom-left").map((m,p)=>t.jsx(gt,{badge:m},p))}),e.category&&t.jsx("div",{className:d(c.typography.category,"text-white/90 mb-2 uppercase tracking-wide"),children:e.category})]}),e.title&&t.jsxs("h3",{className:d(c.typography.title,"text-white mb-2",c.isHoverable&&"transition-colors"),children:[e.contextLabel&&t.jsx("div",{className:"text-black px-1 mr-2 mb-1 inline-block bg-white",children:e.contextLabel}),t.jsx("div",{children:e.title})]}),e.description&&t.jsx("p",{className:d(c.typography.description,"text-white/90 mb-2 max-w-3xl hidden md:block line-clamp-2"),children:e.description}),e.metadata?.time&&t.jsx("div",{className:d(c.typography.metadata,"text-white/70"),children:e.metadata.time})]}),t.jsx($e,{primaryCta:o,secondaryCta:n,layout:"responsive",styles:{container:"mt-4"}})]})})]})})}const As=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Rs=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(r,o,n)=>n?n.toUpperCase():o.toLowerCase()),Vt=e=>{const r=Rs(e);return r.charAt(0).toUpperCase()+r.slice(1)},kr=(...e)=>e.filter((r,o,n)=>!!r&&r.trim()!==""&&n.indexOf(r)===o).join(" ").trim(),Ts=e=>{for(const r in e)if(r.startsWith("aria-")||r==="role"||r==="title")return!0};var Ls={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"};const Ms=A.forwardRef(({color:e="currentColor",size:r=24,strokeWidth:o=2,absoluteStrokeWidth:n,className:a="",children:s,iconNode:i,...l},u)=>A.createElement("svg",{ref:u,...Ls,width:r,height:r,stroke:e,strokeWidth:n?Number(o)*24/Number(r):o,className:kr("lucide",a),...!s&&!Ts(l)&&{"aria-hidden":"true"},...l},[...i.map(([c,m])=>A.createElement(c,m)),...Array.isArray(s)?s:[s]]));const We=(e,r)=>{const o=A.forwardRef(({className:n,...a},s)=>A.createElement(Ms,{ref:s,iconNode:r,className:kr(`lucide-${As(Vt(e))}`,`lucide-${e}`,n),...a}));return o.displayName=Vt(e),o};const Ps=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],_s=We("check",Ps);const Is=[["path",{d:"M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z",key:"kmsa83"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],zs=We("circle-play",Is);const Bs=[["path",{d:"M5 12h14",key:"1ays0h"}]],Os=We("minus",Bs);const Ds=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Es=We("x",Ds),$s={sm:"w-8 h-8 sm:w-10 sm:h-10",md:"w-12 h-12 sm:w-16 sm:h-16",lg:"w-16 h-16 sm:w-20 sm:h-20 md:w-24 md:h-24",xl:"w-20 h-20 sm:w-24 sm:h-24 md:w-32 md:h-32","2xl":"w-24 h-24 sm:w-32 sm:h-32 md:w-40 md:h-40","3xl":"w-32 h-32 sm:w-40 sm:h-40 md:w-48 md:h-48","4xl":"w-40 h-40 sm:w-48 sm:h-48 md:w-56 md:h-56","5xl":"w-48 h-48 sm:w-56 sm:h-56 md:w-64 md:h-64"};function Sr({content:e,styles:r}){const o=r?.mainIconSize||"md",n=$s[o];return r?.mainIcon?t.jsx("div",{className:"absolute inset-0 flex items-center justify-center z-20",children:t.jsx("div",{className:n,children:r.mainIcon})}):e.type==="video"?t.jsx("div",{className:"absolute inset-0 flex items-center justify-center z-20",children:t.jsx(zs,{className:d(n,"text-white opacity-90")})}):null}function Ar({imageUrl:e,alt:r,aspectRatio:o,imageContainerClasses:n,content:a,styles:s,showBadges:i=!0,badgePositions:l=["top-left","top-right","bottom-left","bottom-right"],fallbackGradient:u=!1}){return t.jsxs("div",{className:d("relative w-full",n),style:{aspectRatio:o},children:[e?t.jsx("img",{src:e,alt:r||a.title||"",className:"absolute inset-0 w-full h-full object-cover"}):u?t.jsx("div",{className:"absolute inset-0 bg-linear-to-br from-primary-600 to-primary-800"}):null,i&&t.jsx(xt,{badges:a.badges,positions:l}),t.jsx(Sr,{content:a,styles:s})]})}function Rr({content:e,styles:r,isHoverable:o=!0,primaryCta:n,secondaryCta:a,ctaLayout:s="vertical",bettingOdds:i,matchScore:l}){const u=Y("title",r,"compact"),c=Y("category",r),m=Y("description",r),p=Y("metadata",r);return t.jsxs("div",{className:"flex flex-col justify-between h-full",children:[t.jsxs("div",{children:[l&&t.jsx("div",{className:"mb-1",children:l}),e.category&&t.jsx("div",{className:d(c,"text-muted-foreground mb-1"),children:e.category}),e.title&&t.jsxs("h3",{className:d(u,"text-foreground mb-1",o&&"group-hover:text-primary transition-colors"),children:[e.contextLabel&&t.jsx("div",{className:"text-white px-1 mr-2 mb-1 inline-block bg-neutral-700",children:e.contextLabel}),t.jsx("div",{children:e.title})]}),e.description&&t.jsx("p",{className:d(m,"text-muted-foreground mb-2"),children:e.description}),(e.metadata?.author||e.metadata?.time)&&t.jsxs("div",{className:d("flex items-center gap-2 text-muted-foreground",p),children:[e.metadata.author&&t.jsx("span",{children:e.metadata.author}),e.metadata.author&&e.metadata.time&&t.jsx("span",{children:"•"}),e.metadata.time&&t.jsx("span",{children:e.metadata.time})]})]}),(n||a||i)&&t.jsxs("div",{className:"flex flex-col space-y-0",children:[(n||a)&&t.jsxs("div",{className:d("flex mt-4",s==="horizontal"?"flex-col sm:flex-row gap-2 sm:gap-3":"flex-col gap-2"),children:[n&&t.jsx("div",{className:s==="horizontal"?"w-full sm:w-auto":"w-full",children:n}),a&&t.jsx("div",{className:s==="horizontal"?"w-full sm:w-auto":"w-full",children:a})]}),i&&t.jsx("div",{className:n||a?"mt-2":"mt-4",children:i})]})]})}function Tr({content:e,styles:r,primaryCta:o,secondaryCta:n,bettingOdds:a,matchScore:s}){const i=e.image?.url,{isClickable:l,handleClick:u}=Ue(e),c=we(r,"standard");return t.jsxs("article",{className:d("group bg-card text-card-foreground border-border overflow-hidden",c.container,c.background,l&&"cursor-pointer"),onClick:u,children:[i&&t.jsx(Ar,{imageUrl:i,alt:e.image?.alt,aspectRatio:c.imageAspectRatio,imageContainerClasses:c.imageContainer,content:e,styles:r}),t.jsx("div",{className:c.padding,children:t.jsx(Rr,{content:e,styles:r,isHoverable:c.isHoverable,primaryCta:o,secondaryCta:n,bettingOdds:a,matchScore:s})})]})}function Gs({content:e,styles:r,primaryCta:o,secondaryCta:n,bettingOdds:a,matchScore:s}){const i=e.image?.url,{isClickable:l,handleClick:u}=Ue(e),c=we(r,"standardHorizontal");return t.jsxs("article",{className:d("group bg-card text-card-foreground border-border overflow-hidden flex flex-col sm:flex-row",c.container,c.background,l&&"cursor-pointer"),onClick:u,children:[i&&t.jsx("div",{className:"relative w-full sm:w-2/5 shrink-0",children:t.jsx(Ar,{imageUrl:i,alt:e.image?.alt,aspectRatio:c.imageAspectRatio,imageContainerClasses:c.imageContainer,content:e,styles:r})}),t.jsx("div",{className:d("flex-1",c.padding),children:t.jsx(Rr,{content:e,styles:r,isHoverable:c.isHoverable,primaryCta:o,secondaryCta:n,ctaLayout:"horizontal",bettingOdds:a,matchScore:s})})]})}function Lr({content:e,styles:r,primaryCta:o,secondaryCta:n}){const a=e.coverImage?.url,s=!!e.gradient,i=e.textColor||"white",l=we(r,"promo");let u="",c={color:i};return l.background?u=l.background:a?c={backgroundImage:`url(${a})`,backgroundSize:"cover",backgroundPosition:"center",color:i}:s?c={background:e.gradient,color:i}:u="bg-gradient-to-br from-gray-500 to-gray-800",t.jsx("div",{className:d("dark overflow-hidden border-none",l.container),children:t.jsxs("div",{className:d("h-full flex flex-col justify-between",l.padding,u),style:c,children:[(e.image||e.subtitle)&&t.jsxs("div",{className:"flex flex-col md:flex-row md:justify-between md:items-center mb-4 gap-3",children:[e.image&&t.jsx("div",{className:"text-center md:text-left",children:t.jsx("img",{src:e.image.url,alt:e.image.alt||e.title||"",className:"h-12 sm:h-12 my-4 w-auto inline-block"})}),e.subtitle&&t.jsx("div",{className:d(l.typography.subtitle,"opacity-80 text-center md:text-left"),children:e.subtitle})]}),t.jsxs("div",{className:"flex flex-col md:flex-row items-center md:items-end justify-between gap-6",children:[t.jsxs("div",{className:"flex-1 text-center md:text-left",children:[e.title&&t.jsx("h3",{className:d(l.typography.title,"mb-2"),children:e.title}),e.description&&t.jsx("p",{className:d(l.typography.description,"opacity-90 max-w-xl"),children:e.description}),e.metrics&&e.metrics.length>0&&t.jsx("div",{className:"flex gap-6 mt-4 justify-center md:justify-start",children:e.metrics.map((m,p)=>t.jsxs("div",{className:"text-center md:text-left",children:[t.jsx("div",{className:"text-2xl font-bold",children:m.value}),t.jsx("div",{className:"text-xs opacity-80",children:m.label})]},p))}),e.countdownTo&&t.jsx("div",{className:"mt-4 flex justify-center md:justify-start",children:t.jsx(yr,{targetDate:e.countdownTo})})]}),(o||n||e.disclaimer)&&t.jsxs("div",{className:"flex flex-col items-center md:items-end gap-3 shrink-0",children:[t.jsx($e,{primaryCta:o,secondaryCta:n,layout:"horizontal"}),e.disclaimer&&t.jsx("p",{className:"text-xs opacity-70",children:e.disclaimer})]})]})]})})}function Mr({content:e,styles:r,primaryCta:o,secondaryCta:n,bettingOdds:a,matchScore:s}){const{isClickable:i,handleClick:l}=Ue(e),u=we(r,"minimal");return t.jsx("article",{className:d("group",u.container,i&&"cursor-pointer"),onClick:l,children:t.jsxs("div",{className:d("flex gap-3 sm:gap-4",u.padding,u.background),children:[e.image&&t.jsxs("div",{className:d("shrink-0 w-20 sm:w-24 overflow-hidden relative",u.imageContainer),style:{aspectRatio:u.imageAspectRatio},children:[t.jsx("img",{src:e.image.url,alt:e.image.alt||e.title||"",className:"w-full h-full object-cover"}),t.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:t.jsx(Sr,{content:e,styles:r})})]}),t.jsxs("div",{className:"flex-1 min-w-0 flex flex-col justify-between",children:[t.jsxs("div",{children:[s&&t.jsx("div",{className:"mb-2",children:s}),e.category&&t.jsx("div",{className:d(u.typography.category,"text-muted-foreground mb-1"),children:e.category}),e.title&&t.jsxs("h3",{className:d(u.typography.title,"text-foreground mb-1",u.isHoverable&&"group-hover:text-primary transition-colors"),children:[e.contextLabel&&t.jsx("span",{className:"text-white px-1 mr-1 mb-1 inline-block bg-neutral-700 rounded-sm",children:e.contextLabel}),e.title]}),(e.metadata?.author||e.metadata?.time)&&t.jsxs("div",{className:d("flex items-center gap-2 text-muted-foreground",u.typography.metadata),children:[e.metadata.author&&t.jsx("span",{children:e.metadata.author}),e.metadata.author&&e.metadata.time&&t.jsx("span",{children:"•"}),e.metadata.time&&t.jsx("span",{children:e.metadata.time})]})]}),t.jsxs("div",{children:[t.jsx($e,{primaryCta:o,secondaryCta:n,layout:"responsive",styles:{container:"mt-4"}}),a&&t.jsx("div",{className:"mt-2",children:a})]})]})]})})}function q({content:e,variant:r,styles:o,primaryCta:n,secondaryCta:a,bettingOdds:s,matchScore:i}){switch(r||"standard"){case"hero":return t.jsx(Cr,{content:e,styles:o,primaryCta:n,secondaryCta:a,matchScore:i});case"standardHorizontal":return t.jsx(Gs,{content:e,styles:o,primaryCta:n,secondaryCta:a,bettingOdds:s,matchScore:i});case"promo":return t.jsx(Lr,{content:e,styles:o,primaryCta:n,secondaryCta:a});case"minimal":return t.jsx(Mr,{content:e,styles:o,primaryCta:n,secondaryCta:a,bettingOdds:s,matchScore:i});case"standard":default:return t.jsx(Tr,{content:e,styles:o,primaryCta:n,secondaryCta:a,bettingOdds:s,matchScore:i})}}const ge={borderRadius:"lg",shadow:"none",hoverShadow:"md",padding:"md",borderWidth:"1",logoSize:"md"},xe={borderRadius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl","3xl":"rounded-3xl",full:"rounded-full"},shadow:{none:"shadow-none",sm:"shadow-sm",md:"shadow-md",lg:"shadow-lg",xl:"shadow-xl","2xl":"shadow-2xl"},hoverShadow:{none:"hover:shadow-none",sm:"hover:shadow-sm",md:"hover:shadow-md",lg:"hover:shadow-lg",xl:"hover:shadow-xl","2xl":"hover:shadow-2xl"},padding:{none:"p-0",sm:"p-2",md:"p-3 sm:p-4",lg:"p-4 sm:p-6",xl:"p-6 sm:p-8"},borderWidth:{0:"border-0",1:"border",2:"border-2",4:"border-4",8:"border-8"},logoSize:{xs:"w-4 h-4",sm:"w-6 h-6",md:"w-8 h-8",lg:"w-10 h-10",xl:"w-12 h-12","2xl":"w-16 h-16","3xl":"w-20 h-20"}};function Hs(e){const r=e?.borderRadius||ge.borderRadius;return xe.borderRadius[r]}function Us(e){const r=e?.shadow||ge.shadow;return xe.shadow[r]}function Ws(e){if(!(e?.hoverable??!0))return"";const o=e?.hoverShadow||ge.hoverShadow;return xe.hoverShadow[o]}function Vs(e){const r=e?.padding||ge.padding;return xe.padding[r]}function Fs(e){const r=e?.borderWidth||ge.borderWidth;return xe.borderWidth[r]}function Ys(e){return e?.borderColor||"border-border"}function qs(e){const r=e?.logoSize||ge.logoSize;return xe.logoSize[r]}function Zs(e){const r=[Hs(e),Us(e),Ws(e),Fs(e),Ys(e)];return e?.container&&r.push(e.container),r.filter(Boolean).join(" ")}function H(e){return e?.main??null}function ae(e){return e?.breakdown?.penalties?e.breakdown.penalties:null}const Ks={inline:"xs",scoreCard:"md",scoreLine:"md",embedded:"sm"},Xs={inline:{teamName:"text-sm text-foreground",score:"text-lg font-bold text-foreground",status:"text-xs text-foreground/90",metadata:"text-xs text-foreground/90"},scoreCard:{teamName:"text-sm sm:text-base font-semibold",score:"text-xl sm:text-2xl font-bold",status:"text-xs sm:text-sm font-medium",metadata:"text-xs"},scoreLine:{teamName:"text-sm sm:text-base font-semibold",score:"text-xl sm:text-2xl font-bold",status:"text-xs sm:text-sm font-medium",metadata:"text-xs"},embedded:{teamName:"text-sm font-medium",score:"text-sm font-bold",status:"text-xs font-medium",metadata:"text-xs"}},Qs={inline:{borderWidth:"0",borderRadius:"none",shadow:"none",hoverable:!1},scoreCard:{},scoreLine:{},embedded:{borderWidth:"0",borderRadius:"none",shadow:"none",padding:"none",hoverable:!1}};function Ve(e,r="scoreCard"){return A.useMemo(()=>{const o=Ks[r],n=e?.logoSize||o,s={...Qs[r],...e,logoSize:n},i=Xs[r];return{container:Zs(s),padding:Vs(s),background:s.background||(r==="inline"?"":"bg-card text-card-foreground"),logoSize:qs(s),logoSizeValue:n,typography:{teamName:e?.typography?.teamName||i.teamName,score:e?.typography?.score||i.score,status:e?.typography?.status||i.status,metadata:e?.typography?.metadata||i.metadata},isHoverable:s.hoverable??!0}},[e,r])}function Fe(e){const r=!!(e.onClick||e.link),o=A.useCallback(()=>{e.onClick?e.onClick():e.link&&(window.location.href=e.link)},[e]);return{isClickable:r,handleClick:r?o:void 0}}function Pr({match:e,styles:r}){const o=Ve(r,"inline"),{isClickable:n,handleClick:a}=Fe(e),s=e.competitorTwo.shortName||e.competitorTwo.name,i=e.competitorOne.shortName||e.competitorOne.name,l=e.period?.label??((e.period?.current?` ${e.period.current}`:"")||e.status.toUpperCase());return t.jsxs("div",{className:d("inline-flex items-center gap-1.5",o.container,n&&"cursor-pointer hover:opacity-80"),onClick:a,children:[t.jsx("span",{className:o.typography.teamName,children:s}),e.competitorTwo.logo&&t.jsx("img",{src:e.competitorTwo.logo.url,alt:e.competitorTwo.name,className:d(o.logoSize,"object-contain rounded-full")}),H(e.competitorTwo.score)!==null&&t.jsx("span",{className:o.typography.score,children:H(e.competitorTwo.score)}),t.jsx("span",{className:"mx-0.5 text-foreground",children:"-"}),H(e.competitorOne.score)!==null&&t.jsx("span",{className:o.typography.score,children:H(e.competitorOne.score)}),e.competitorOne.logo&&t.jsx("img",{src:e.competitorOne.logo.url,alt:e.competitorOne.name,className:d(o.logoSize,"object-contain rounded-full")}),t.jsx("span",{className:o.typography.teamName,children:i}),t.jsx("span",{className:d(o.typography.status,"ml-0.5"),children:l})]})}function Ee({team:e,score:r,penaltyScore:o,isWinner:n,variant:a,classes:s,logoSize:i="md",align:l="left"}){return a==="scoreCard"?t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx(G,{name:e.name,imageUrl:e.logo?.url,subtitle:e.subtitle,styles:{container:"flex-1",imageSize:i,typography:{name:d("text-foreground",s.typography.teamName),subtitle:d("text-muted-foreground",s.typography.metadata)}}}),t.jsxs("div",{className:"flex items-center gap-2",children:[o!=null&&t.jsx("span",{className:d("text-xs px-1.5 py-0.5 rounded",n?"bg-green-100 dark:bg-green-900/30 text-green-700 dark:text-green-400 font-bold":"text-muted-foreground"),children:o}),r!==null&&t.jsx("span",{className:d("text-foreground",s.typography.score),children:r})]})]}):t.jsx("div",{className:l==="right"?"justify-self-end":"justify-self-start",children:t.jsx(G,{name:e.name,mobileName:e.shortName,imageUrl:e.logo?.url,subtitle:e.subtitle,orientation:l==="right"?"rtl":"ltr",styles:{imageSize:i,typography:{name:d("text-foreground",s.typography.teamName),subtitle:d("text-muted-foreground",s.typography.metadata)},gap:"2",textAlign:l==="right"?"right":"left"}})})}function Js({competitorOneScore:e,competitorTwoScore:r,competitorOnePenalty:o,competitorTwoPenalty:n,winner:a,classes:s,isLive:i,liveIndicator:l,statusText:u,period:c}){const m=o!==null||n!==null;return t.jsxs("div",{className:"flex items-center gap-2 sm:gap-3 shrink-0",children:[t.jsxs("div",{className:"flex items-center gap-1.5",children:[m&&o!==null&&o!==void 0&&t.jsx("span",{className:d("text-xs px-1.5 py-0.5 rounded",a==="competitorOne"?"bg-muted-foreground text-muted font-bold":"bg-muted text-muted-foreground"),children:o}),e!==null&&t.jsx("span",{className:d("text-foreground",s.typography.score),children:e})]}),u?t.jsxs("div",{className:"flex flex-col items-center",children:[i&&l&&t.jsx("div",{className:d("w-2 h-2 rounded-full mb-1 animate-pulse",l.color||"bg-primary-500")}),t.jsx("span",{className:d(s.typography.status,"text-muted-foreground whitespace-nowrap"),children:u}),c?.current&&!i&&t.jsx("span",{className:d(s.typography.metadata,"text-muted-foreground"),children:c.current})]}):t.jsx("span",{className:d("text-muted-foreground",s.typography.score),children:"-"}),t.jsxs("div",{className:"flex items-center gap-1.5",children:[r!==null&&t.jsx("span",{className:d("text-foreground",s.typography.score),children:r}),m&&n!==null&&n!==void 0&&t.jsx("span",{className:d("text-xs px-1.5 py-0.5 rounded",a==="competitorTwo"?"bg-muted-foreground text-muted font-bold":"bg-muted text-muted-foreground"),children:n})]})]})}function _r({odds:e,operator:r,styles:o={}}){const{container:n="",padding:a="md",typography:s="md",mode:i="default",flashInterval:l=3e3}=o,[u,c]=A.useState(!0);A.useEffect(()=>{if(i!=="flash")return;const g=setInterval(()=>{c(x=>!x)},l);return()=>clearInterval(g)},[i,l]);const m=()=>{const g={none:"",sm:"px-1.5 py-1",md:"px-2 py-1.5",lg:"px-3 py-2"};return g[a]||g.md},p=()=>{const g={sm:"text-xs",md:"text-xs",lg:"text-sm"};return g[s]||g.md},j=g=>!g||g==="none"?null:t.jsx("span",{className:d("ml-0.5",g==="up"?"text-green-500":"text-red-500"),children:g==="up"?"↑":"↓"}),v=(g,x=!1)=>{const y=m(),P=p(),_=t.jsxs("div",{className:d("flex items-center cursor-pointer justify-between",P),children:[t.jsx("span",{className:"text-muted-foreground",children:g.label}),t.jsxs("span",{className:"font-bold",children:[g.value,j(g.change)]})]}),B=d(x?"":"flex-1","bg-muted hover:bg-muted/60 text-foreground rounded transition-colors",y),E=b=>{b.stopPropagation(),g.onClick&&(b.preventDefault(),g.onClick(g))};return g.url?t.jsx("a",{href:g.url,target:"_blank",rel:"noopener noreferrer",className:B,onClick:E,children:_},g.label):t.jsx("button",{className:B,onClick:E,children:_},g.label)},k=g=>{g.stopPropagation(),r?.onClick&&(g.preventDefault(),r.onClick(r))},N=(g="")=>{if(!r)return null;const x=m();return t.jsx("a",{href:r.url,target:"_blank",rel:"noopener noreferrer",className:d("flex items-center justify-center bg-muted/50 hover:bg-muted/70 rounded transition-colors",x,g),style:{backgroundColor:r.backgroundColor},onClick:k,children:r.logo?t.jsx("img",{src:r.logo.url,alt:r.name,className:"h-4 w-auto object-contain"}):t.jsx("span",{className:"text-xs font-semibold",style:{color:r.textColor},children:r.name})})},S=e.length>3;return i==="flash"?t.jsx("div",{className:d(S?"space-y-1":"flex gap-1",n),children:u&&r?N("flex-1"):S?t.jsx("div",{className:"grid grid-cols-3 gap-1",children:e.map(g=>v(g,!0))}):t.jsx(t.Fragment,{children:e.map(g=>v(g,!1))})}):S?t.jsxs("div",{className:d("space-y-1",n),children:[N(),t.jsx("div",{className:"grid grid-cols-3 gap-1",children:e.map(g=>v(g,!0))})]}):t.jsxs("div",{className:d("flex gap-1",n),children:[N("w-full max-w-[110px]"),e.map(g=>v(g,!1))]})}function Ir({match:e,styles:r,primaryCta:o,secondaryCta:n}){const a=Ve(r,"scoreCard"),{isClickable:s,handleClick:i}=Fe(e),l=e.status==="live",u=!!e.odds,c=o||n,m=ae(e.competitorOne.score),p=ae(e.competitorTwo.score),j=e.metadata?.winner;return t.jsx("article",{className:d(a.background,a.container,s&&"cursor-pointer"),onClick:i,children:t.jsxs("div",{className:a.padding,children:[t.jsxs("div",{className:"flex items-center justify-between mb-2",children:[l&&e.liveIndicator?t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("div",{className:d("w-2 h-2 rounded-full animate-pulse",e.liveIndicator.color||"bg-primary-500")}),t.jsx("span",{className:d("text-foreground",a.typography.status),children:"LIVE"})]}):t.jsx("span",{className:d("text-foreground py-1",a.typography.status),children:e.period?.label||e.metadata?.time||""}),l&&e.period?.current&&t.jsx("span",{className:d("text-foreground",a.typography.metadata),children:e.period.current})]}),t.jsxs("div",{className:d("space-y-2",!!(u||c)&&"mb-3"),children:[t.jsx(Ee,{team:e.competitorOne,score:H(e.competitorOne.score),penaltyScore:m,isWinner:j==="competitorOne",variant:"scoreCard",classes:a,logoSize:a.logoSizeValue}),t.jsx(Ee,{team:e.competitorTwo,score:H(e.competitorTwo.score),penaltyScore:p,isWinner:j==="competitorTwo",variant:"scoreCard",classes:a,logoSize:a.logoSizeValue})]}),u&&t.jsx("div",{className:d("pt-2 border-t border-border",!!c&&"mb-3"),children:t.jsx(_r,{odds:e.odds.odds,operator:e.odds.operator,label:e.odds.label,styles:{padding:r?.padding==="xl"?"lg":r?.padding}})}),c&&t.jsx("div",{className:"pt-2 border-t border-border",children:t.jsxs("div",{className:"flex flex-col sm:flex-row gap-2",children:[o,n]})})]})})}function zr({match:e,styles:r}){const o=Ve(r,"scoreLine"),{isClickable:n,handleClick:a}=Fe(e),s=e.status==="live",i=s&&e.period?.current?e.period.current:e.period?.label||e.status.toUpperCase(),l=ae(e.competitorOne.score),u=ae(e.competitorTwo.score),c=e.metadata?.winner;return t.jsx("article",{className:d(o.background,o.container,n&&"cursor-pointer",o.isHoverable&&"transition-opacity hover:opacity-90"),onClick:a,children:t.jsxs("div",{className:d(o.padding,"grid grid-cols-[1fr_auto_1fr] items-center gap-4"),children:[t.jsx(Ee,{team:e.competitorOne,score:null,variant:"scoreLine",classes:o,logoSize:o.logoSizeValue}),t.jsx(Js,{competitorOneScore:H(e.competitorOne.score),competitorTwoScore:H(e.competitorTwo.score),competitorOnePenalty:l,competitorTwoPenalty:u,winner:c,classes:o,isLive:s,liveIndicator:e.liveIndicator,statusText:i,period:e.period}),t.jsx(Ee,{team:e.competitorTwo,score:null,variant:"scoreLine",classes:o,logoSize:o.logoSizeValue,align:"right"})]})})}const en={xs:"xs",sm:"xs",md:"sm",lg:"md",xl:"lg","2xl":"xl","3xl":"2xl"},Ft={square:"sm",round:"full"};function tn(e,r){switch(e.status){case"scheduled":return e.metadata?.date||"-";case"live":return e.period?.current||"LIVE";case"final":return r==="date"?e.metadata?.date||e.period?.label||"FT":e.period?.label||"FT";case"postponed":return"PPD";case"cancelled":return"CAN";case"suspended":return"SUS";default:return e.period?.label||"-"}}function rn({match:e,styles:r}){const o=Ve(r,"embedded"),{isClickable:n,handleClick:a}=Fe(e),s=e.status==="live",i=e.liveIndicator?.color||"bg-red-500",l=H(e.competitorOne.score),u=H(e.competitorTwo.score),c=ae(e.competitorOne.score),m=ae(e.competitorTwo.score),p=c!==null||m!==null,j=e.metadata?.winner,v=e.status==="scheduled",k=e.metadata?.time||e.period?.label||"-",N=tn(e,r?.finishedStatusDisplay),S=r?.statusColumnWidth||"w-[60px]",g=r?.typography?.status||"text-xs font-medium",x=en[r?.logoSize||"md"],y=Ft[e.competitorOne.logoShape||"square"],P=Ft[e.competitorTwo.logoShape||"square"],_={imageSize:x,gap:"2",typography:{name:o.typography.teamName}};return t.jsxs("article",{className:d("flex items-center w-full",o.padding,n&&"cursor-pointer",r?.container),onClick:a,children:[t.jsxs("div",{className:d("shrink-0 flex items-center justify-start gap-1.5",S,g,s?"text-danger":"text-muted-foreground"),children:[s&&t.jsx("div",{className:d("w-2 h-2 rounded-full animate-pulse shrink-0",i)}),t.jsx("span",{children:N})]}),t.jsxs("div",{className:"flex-1 flex items-center justify-center min-w-0",children:[t.jsx("div",{className:"flex-1 min-w-0 flex justify-end",children:t.jsx(G,{name:e.competitorOne.name,imageUrl:e.competitorOne.logo?.url,orientation:"rtl",truncate:!0,styles:{..._,imageBorderRadius:y,textAlign:"right"}})}),t.jsx("div",{className:"shrink-0 px-3 text-center min-w-[70px]",children:v?t.jsx("span",{className:d(o.typography.score,"text-muted-foreground"),children:k}):t.jsxs("div",{className:"flex items-center justify-center gap-1",children:[p&&c!==null&&t.jsx("span",{className:d("text-[10px] px-1 py-0.5 rounded",j==="competitorOne"?"bg-muted-foreground text-muted font-bold":"bg-muted text-muted-foreground"),children:c}),t.jsxs("span",{className:d(o.typography.score,s&&"text-danger"),children:[l," - ",u]}),p&&m!==null&&t.jsx("span",{className:d("text-[10px] px-1 py-0.5 rounded",j==="competitorTwo"?"bg-muted-foreground text-muted font-bold":"bg-muted text-muted-foreground"),children:m})]})}),t.jsx("div",{className:"flex-1 min-w-0 flex justify-start",children:t.jsx(G,{name:e.competitorTwo.name,imageUrl:e.competitorTwo.logo?.url,orientation:"ltr",truncate:!0,styles:{..._,imageBorderRadius:P,textAlign:"left"}})})]})]})}function z({match:e,variant:r,styles:o,primaryCta:n,secondaryCta:a}){switch(r||"scoreCard"){case"inline":return t.jsx(Pr,{match:e,styles:o});case"scoreLine":return t.jsx(zr,{match:e,styles:o});case"embedded":return t.jsx(rn,{match:e,styles:o});case"scoreCard":default:return t.jsx(Ir,{match:e,styles:o,primaryCta:n,secondaryCta:a})}}const ye={borderRadius:"lg",shadow:"none",padding:"md",borderWidth:"1",logoSize:"md"},Ne={borderRadius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl","3xl":"rounded-3xl"},shadow:{none:"shadow-none",sm:"shadow-sm",md:"shadow-md",lg:"shadow-lg",xl:"shadow-xl","2xl":"shadow-2xl"},padding:{none:"p-0",sm:"p-2",md:"p-3 sm:p-4",lg:"p-4 sm:p-6",xl:"p-6 sm:p-8"},borderWidth:{0:"border-0",1:"border",2:"border-2",4:"border-4",8:"border-8"},logoSize:{xs:"w-4 h-4",sm:"w-6 h-6",md:"w-8 h-8",lg:"w-10 h-10",xl:"w-12 h-12","2xl":"w-16 h-16","3xl":"w-20 h-20"}},on={header:"text-xs uppercase font-bold text-muted-foreground",cell:"text-sm text-foreground",disclaimer:"text-xs text-muted-foreground",legend:"text-xs text-muted-foreground"};function sn(e){const r=e?.borderRadius||ye.borderRadius;return Ne.borderRadius[r]}function nn(e){const r=e?.shadow||ye.shadow;return Ne.shadow[r]}function an(e){const r=e?.padding||ye.padding;return Ne.padding[r]}function ln(e){const r=e?.borderWidth||ye.borderWidth;return Ne.borderWidth[r]}function dn(e){return e?.borderColor||"border-border"}function cn(e){const r=e?.logoSize||ye.logoSize;return Ne.logoSize[r]}function Be(e,r){return r?.typography?.[e]?r.typography[e]:on[e]}function un(e){return e?.background||"bg-card"}function mn(e){const r=[sn(e),nn(e),ln(e),dn(e),un(e)];return e?.container&&r.push(e.container),r.filter(Boolean).join(" ")}function pn(e){return A.useMemo(()=>({container:mn(e),padding:an(e),logoSize:cn(e),typography:{header:Be("header",e),cell:Be("cell",e),disclaimer:Be("disclaimer",e),legend:Be("legend",e)},table:e?.table||"",headerRow:e?.headerRow||"",bodyRow:e?.bodyRow||"",legendContainer:e?.legendContainer||"",isHoverable:e?.hoverable??!0}),[e])}function gn(e){switch(e){case"center":return"text-center";case"right":return"text-right";case"left":default:return"text-left"}}function Yt(e){switch(e){case"none":return"0";case"xs":return"28px";case"sm":return"36px";case"md":return"48px";case"lg":return"96px";case"xl":return"128px";case"2xl":return"160px";case"3xl":return"192px";case"4xl":return"256px";case"flex":return"1fr";case"auto":default:return"auto"}}function Br(e){return typeof e=="object"&&e!==null&&("mobile"in e||"desktop"in e)}function mt(e,r){return e.filter(o=>Br(o.width)?(r==="mobile"?o.width.mobile:o.width.desktop)!=="none":o.width!=="none")}function qt(e,r){const o=["4px"];return mt(e,r).forEach(a=>{if(Br(a.width)){const s=r==="mobile"?a.width.mobile:a.width.desktop;o.push(Yt(s))}else o.push(Yt(a.width))}),o.join(" ")}function Oe(e){const r=gn(e.align);return e.key==="entity"||e.key==="team"||e.key==="player"||e.key==="user"?d("flex items-center gap-1 min-w-0",e.className):d(r,e.className)}function xn({columns:e,rows:r,legend:o,showLegend:n,disclaimer:a,description:s,styles:i,onRowClick:l,filterRowIds:u}){const c=pn(i),m=A.useMemo(()=>{if(!u||u.length===0)return r;const x=new Set(u);return r.filter(y=>x.has(y.id))},[r,u]),p=A.useMemo(()=>{if(o)return o;const x=new Map;return m.forEach(y=>{if(y.zone){const P=`${y.zone.color}-${y.zone.label}`;x.has(P)||x.set(P,{color:y.zone.color,label:y.zone.label})}}),Array.from(x.values())},[m,o]),j=n!==void 0?n:p.length>0,v=A.useMemo(()=>mt(e,"mobile"),[e]),k=A.useMemo(()=>mt(e,"desktop"),[e]),N=A.useMemo(()=>qt(e,"mobile"),[e]),S=A.useMemo(()=>qt(e,"desktop"),[e]),g=i?.container||c.container;return t.jsx("div",{className:g,children:t.jsxs("div",{className:c.padding,children:[t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("ul",{className:c.table,children:[t.jsxs("li",{className:d("md:hidden grid items-center gap-1 border-b border-border pb-3",c.headerRow),style:{gridTemplateColumns:N},children:[t.jsx("div",{"aria-label":"Zone"}),v.map(x=>t.jsx("div",{className:d(c.typography.header,Oe(x)),children:x.header},x.key))]}),t.jsxs("li",{className:d("hidden md:grid items-center gap-1 border-b border-border pb-3 lg:px-2",c.headerRow),style:{gridTemplateColumns:S},children:[t.jsx("div",{"aria-label":"Zone"}),k.map(x=>t.jsx("div",{className:d(c.typography.header,Oe(x)),children:x.header},x.key))]}),m.map(x=>t.jsxs("li",{className:d("relative border-b border-border last:border-0",x.highlight&&"bg-muted",c.isHoverable&&l&&"hover:bg-muted/50 cursor-pointer transition-colors",c.bodyRow),onClick:()=>l?.(x),children:[x.zone&&t.jsx("div",{className:d("absolute left-0 top-0 bottom-0 w-1 rounded-r-sm",x.zone.color)}),t.jsxs("div",{className:"md:hidden grid items-center gap-1 py-3 pl-2",style:{gridTemplateColumns:N},children:[t.jsx("div",{}),v.map(y=>t.jsx("div",{className:d(c.typography.cell,Oe(y)),children:y.render?y.render(x[y.key],x):x[y.key]},y.key))]}),t.jsxs("div",{className:"hidden md:grid items-center gap-1 py-3 lg:px-2 pl-2",style:{gridTemplateColumns:S},children:[t.jsx("div",{}),k.map(y=>t.jsx("div",{className:d(c.typography.cell,Oe(y)),children:y.render?y.render(x[y.key],x):x[y.key]},y.key))]})]},x.id))]})}),s&&t.jsx("div",{className:d("mt-4",c.typography.disclaimer),children:s}),j&&p.length>0&&t.jsx("div",{className:d("mt-4 flex flex-wrap gap-4",c.legendContainer),children:p.map((x,y)=>t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("div",{className:d("w-3 h-4 rounded-sm",x.color)}),t.jsx("span",{className:c.typography.legend,children:x.label})]},y))}),a&&t.jsx("div",{className:d("mt-4",c.typography.disclaimer),children:a})]})})}const vt={borderRadius:"md",padding:"md",alignment:"left"},te={borderRadius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl","3xl":"rounded-3xl"},padding:{none:"p-0",sm:"p-2",md:"p-4",lg:"p-6",xl:"p-8"},alignment:{left:"text-left items-start",center:"text-center items-center",right:"text-right items-end"},gap:{none:"gap-0",xs:"gap-0.5",sm:"gap-1",md:"gap-2",lg:"gap-4",xl:"gap-6"},colsMobile:{1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6"},colsTablet:{1:"md:grid-cols-1",2:"md:grid-cols-2",3:"md:grid-cols-3",4:"md:grid-cols-4",5:"md:grid-cols-5",6:"md:grid-cols-6",8:"md:grid-cols-8",10:"md:grid-cols-10",11:"md:grid-cols-11",12:"md:grid-cols-12"},colsDesktop:{1:"lg:grid-cols-1",2:"lg:grid-cols-2",3:"lg:grid-cols-3",4:"lg:grid-cols-4",5:"lg:grid-cols-5",6:"lg:grid-cols-6",8:"lg:grid-cols-8",10:"lg:grid-cols-10",11:"lg:grid-cols-11",12:"lg:grid-cols-12"}},hn={default:{value:"text-2xl font-bold text-foreground",label:"text-xs font-medium text-foreground uppercase",secondaryLabel:"text-xs text-foreground"},stacked:{value:"text-2xl font-bold text-foreground",label:"text-[10px] font-medium text-foreground uppercase tracking-wider",secondaryLabel:"text-xs text-foreground"},horizontal:{value:"text-lg font-bold text-foreground",label:"text-sm text-foreground",secondaryLabel:"text-xs text-foreground"}};function fn(e){const r=e?.borderRadius||vt.borderRadius;return te.borderRadius[r]}function bn(e){const r=e?.padding||vt.padding;return te.padding[r]}function wt(e){const r=e?.alignment||vt.alignment;return te.alignment[r]}function jn(e){return e?.container||""}function ne(e,r,o){return r?.typography?.[e]?r.typography[e]:hn[o||"default"][e]}function vn(e){const r=e?.colsMobile||2,o=e?.colsTablet||3,n=e?.colsDesktop||3,a=e?.gap||"sm";return["grid",te.colsMobile[r],te.colsTablet[o],te.colsDesktop[n],te.gap[a]].join(" ")}function Or(e){return["flex flex-col",fn(e),bn(e),wt(e),jn(e)].filter(Boolean).join(" ")}function wn(e,r,o){return A.useMemo(()=>({grid:vn(e),item:{container:Or(r),alignment:wt(r),typography:{value:ne("value",r,o),label:ne("label",r,o),secondaryLabel:ne("secondaryLabel",r,o)}}}),[e,r,o])}function yt(e,r){return A.useMemo(()=>({container:Or(e),alignment:wt(e),typography:{value:ne("value",e,r),label:ne("label",e,r),secondaryLabel:ne("secondaryLabel",e,r)}}),[e,r])}function Dr({item:e,styles:r}){const o=yt(r,"default"),n=o.container;return t.jsxs("div",{className:n,children:[t.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.icon&&t.jsx("span",{className:"shrink-0",children:e.icon}),t.jsx("span",{className:o.typography.label,children:e.label})]}),t.jsx("div",{className:o.typography.value,children:e.value}),e.secondaryLabel&&t.jsx("div",{className:d("mt-1",o.typography.secondaryLabel),children:e.secondaryLabel})]})}function Er({item:e,styles:r}){const o=yt(r,"stacked"),n=o.container;return t.jsxs("div",{className:n,children:[e.icon&&t.jsx("div",{className:"mb-2",children:e.icon}),t.jsx("div",{className:d("mb-2",o.typography.label),children:e.label}),t.jsx("div",{className:o.typography.value,children:e.value}),e.secondaryLabel&&t.jsx("div",{className:d("mt-1",o.typography.secondaryLabel),children:e.secondaryLabel})]})}function $r({item:e,styles:r,orientation:o="ltr"}){const n=yt(r,"horizontal"),a=n.container,s=o==="ltr"?"items-start":"items-end",i=t.jsxs("div",{className:d("flex flex-col gap-1",s),children:[e.icon&&t.jsx("span",{className:"shrink-0",children:e.icon}),t.jsx("span",{className:n.typography.label,children:e.label}),e.secondaryLabel&&t.jsx("div",{className:n.typography.secondaryLabel,children:e.secondaryLabel})]}),l=t.jsx("div",{className:n.typography.value,children:e.value});return t.jsx("div",{className:a,children:t.jsx("div",{className:"flex items-center justify-between gap-4 w-full",children:o==="ltr"?t.jsxs(t.Fragment,{children:[i,l]}):t.jsxs(t.Fragment,{children:[l,i]})})})}function Gr({item:e,styles:r,variant:o="default",orientation:n}){const a={item:e,styles:r};switch(o){case"stacked":return t.jsx(Er,{...a});case"horizontal":return t.jsx($r,{...a,orientation:n});default:return t.jsx(Dr,{...a})}}function re({items:e=[],itemVariant:r="default",itemOrientation:o,styles:n}){const{container:a="",grid:s,item:i}=n||{},l=wn(s,i,r),u=a||l.grid;return t.jsx("div",{className:u,children:e.map(c=>t.jsx(Gr,{item:c,styles:i,variant:r,orientation:o},c.id))})}const Ye={padding:"none",itemSpacing:"md",borderRadius:"none",background:""},qe={leftBarColor:"bg-green-500",rightBarColor:"bg-blue-500",height:"md",borderRadius:"sm"},Ce={padding:{none:"p-0",sm:"p-2",md:"p-4",lg:"p-6",xl:"p-8"},itemSpacing:{none:"gap-0",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8"},borderRadius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl"},barHeight:{xs:"h-1",sm:"h-1.5",md:"h-2",lg:"h-3"},barBorderRadius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},yn={bar:{label:"text-sm font-medium text-foreground",leftValue:"text-sm font-semibold text-foreground",rightValue:"text-sm font-semibold text-foreground"},comparison:{label:"text-sm font-medium text-foreground",leftValue:"text-sm font-semibold text-foreground",rightValue:"text-sm font-semibold text-foreground"}};function Nn(e){const r=e?.padding||Ye.padding;return Ce.padding[r]}function Cn(e){const r=e?.itemSpacing||Ye.itemSpacing;return Ce.itemSpacing[r]}function kn(e){const r=e?.borderRadius||Ye.borderRadius;return Ce.borderRadius[r]}function Sn(e){return e?.background||Ye.background}function Hr(e){const r=e?.height||qe.height;return Ce.barHeight[r]}function Ur(e){const r=e?.borderRadius||qe.borderRadius;return Ce.barBorderRadius[r]}function Wr(e){return e?.leftBarColor||qe.leftBarColor}function Vr(e){return e?.rightBarColor||qe.rightBarColor}function nt(e,r,o="comparison"){return r?.typography?.[e]?r.typography[e]:yn[o][e]}function An(e){return["flex flex-col",Nn(e),Cn(e),kn(e),Sn(e)].filter(Boolean).join(" ")}function Nt(e,r="comparison"){return A.useMemo(()=>{const o=e?.bar;return{container:An(e),typography:{label:nt("label",e,r),leftValue:nt("leftValue",e,r),rightValue:nt("rightValue",e,r)},bar:{height:Hr(o),borderRadius:Ur(o),leftBarColor:Wr(o),rightBarColor:Vr(o)}}},[e,r])}function Fr(e,r){return A.useMemo(()=>{const o={...e,...r};return{height:Hr(o),borderRadius:Ur(o),leftBarColor:Wr(o),rightBarColor:Vr(o)}},[e,r])}function Yr({item:e,styles:r}){const o=Nt(r,"bar"),n=Fr(r?.bar,e.barStyles),a=typeof e.leftValue=="number"?e.leftValue:parseFloat(String(e.leftValue))||0,s=typeof e.rightValue=="number"?e.rightValue:parseFloat(String(e.rightValue))||0,i=a+s,l=i>0?a/i*100:50,u=i>0?s/i*100:50,c=e.leftDisplay??String(e.leftValue),m=e.rightDisplay??String(e.rightValue);return t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center justify-between mb-1",children:[t.jsx("span",{className:d(o.typography.leftValue,"w-12"),children:c}),t.jsxs("div",{className:"flex items-center justify-center gap-1 flex-1",children:[t.jsx("span",{className:o.typography.label,children:e.label}),e.icon&&t.jsx("span",{className:"shrink-0",children:e.icon}),e.description&&t.jsxs("span",{className:"text-xs text-muted-foreground",children:["(",e.description,")"]})]}),t.jsx("span",{className:d(o.typography.rightValue,"w-12 text-right"),children:m})]}),t.jsxs("div",{className:"flex w-full overflow-hidden gap-0.5",children:[t.jsx("div",{className:d(n.leftBarColor,n.height,n.borderRadius,"transition-all duration-300"),style:{width:`${l}%`}}),t.jsx("div",{className:d(n.rightBarColor,n.height,n.borderRadius,"transition-all duration-300"),style:{width:`${u}%`}})]})]})}function qr({item:e,styles:r}){const o=Nt(r,"comparison"),n=Fr(r?.bar,e.barStyles),a=typeof e.leftValue=="number"?e.leftValue:parseFloat(String(e.leftValue))||0,s=typeof e.rightValue=="number"?e.rightValue:parseFloat(String(e.rightValue))||0,i=a+s,l=i>0?a/i*100:50,u=i>0?s/i*100:50,c=e.leftDisplay??String(e.leftValue),m=e.rightDisplay??String(e.rightValue);return t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center justify-between mb-1",children:[t.jsx("span",{className:d(o.typography.leftValue,"w-12"),children:c}),t.jsxs("div",{className:"flex items-center justify-center gap-1 flex-1",children:[t.jsx("span",{className:o.typography.label,children:e.label}),e.icon&&t.jsx("span",{className:"shrink-0",children:e.icon}),e.description&&t.jsxs("span",{className:"text-xs text-muted-foreground",children:["(",e.description,")"]})]}),t.jsx("span",{className:d(o.typography.rightValue,"w-12 text-right"),children:m})]}),t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx("div",{className:d("flex-1 flex justify-end bg-muted",n.height,n.borderRadius),children:t.jsx("div",{className:d(n.leftBarColor,n.height,n.borderRadius,"transition-all duration-300"),style:{width:`${l}%`,minWidth:"2px"}})}),t.jsx("div",{className:d("flex-1 flex justify-start bg-muted",n.height,n.borderRadius),children:t.jsx("div",{className:d(n.rightBarColor,n.height,n.borderRadius,"transition-all duration-300"),style:{width:`${u}%`,minWidth:"2px"}})})]})]})}function Zr({item:e,styles:r}){const o={item:e,styles:r};switch(e.variant){case"bar":return t.jsx(Yr,{...o});case"comparison":default:return t.jsx(qr,{...o})}}function Ct({items:e=[],styles:r}){const o=Nt(r,"comparison"),n=r?.container||o.container;return t.jsx("div",{className:n,children:e.map(a=>t.jsx(Zr,{item:a,styles:r},a.id))})}const kt={win:"W",draw:"D",loss:"L",vs:"vs"};function Rn(e,r={}){const o={...kt,...r};switch(e){case"W":return o.win;case"D":return o.draw;case"L":return o.loss}}function Tn(e){switch(e){case"W":return"bg-green-600";case"D":return"bg-gray-500";case"L":return"bg-red-500"}}function Ln(e){switch(e){case"W":return t.jsx(_s,{height:13,width:13,strokeWidth:3,color:"#fff"});case"D":return t.jsx(Os,{height:13,width:13,strokeWidth:3,color:"#fff"});case"L":return t.jsx(Es,{height:13,width:13,strokeWidth:3,color:"#fff"});default:return null}}function St(e,r){if(r!==void 0){if(String(e.competitorOne?.id)===String(r))return e.competitorTwo;if(String(e.competitorTwo?.id)===String(r))return e.competitorOne}return e.competitorTwo}function Mn(e,r){if(r!==void 0){if(String(e.competitorOne?.id)===String(r))return e.competitorOne;if(String(e.competitorTwo?.id)===String(r))return e.competitorTwo}return e.competitorOne}function Pn(e,r){return St(e,r)?.name||"Unknown"}function Kr(e,r){const o=Mn(e,r),n=St(e,r);if(o?.score!==void 0&&n?.score!==void 0)return`${o.score}-${n.score}`}function Xr(e,r,o={}){const n={...kt,...o},a=[],s=Pn(e,r);a.push(`${n.vs} ${s}`);const i=Kr(e,r);return i&&a.push(i),e.date&&a.push(e.date),a.length===0?e.outcome==="W"?"Win":e.outcome==="D"?"Draw":"Loss":a.join(" • ")}const at={size:{xs:"w-4 h-4",sm:"w-5 h-5",md:"w-6 h-6",lg:"w-8 h-8",xl:"w-10 h-10"},borderRadius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl",full:"rounded-full"},gap:{1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4",6:"gap-6",8:"gap-8"}};function _n({form:e,teamId:r,maxItems:o=5,labels:n,matchSeparator:a,styles:s,onClick:i}){const l=e.slice(-o),u=n&&(n.win||n.draw||n.loss),c=(g,x)=>{if(i){const y=e.length-l.length+x;i(g,y)}},m=s?.container||"",p=at.gap[s?.gap||"1"],j=at.size[s?.item?.size||"sm"],v=at.borderRadius[s?.item?.borderRadius||"full"],k=s?.item?.background,N=s?.item?.container||"",S=s?.item?.typography?.label||"text-xs font-bold";return t.jsx("div",{className:d("flex items-center justify-end",p,m),children:l.map((g,x)=>{const y=x===0,P=x===l.length-1,_=t.jsx("div",{className:d("flex items-center justify-center",j,v,k||Tn(g.outcome),i&&"cursor-pointer hover:opacity-80 transition-opacity",N),onClick:()=>c(g,x),children:u?t.jsx("span",{className:d("text-white leading-none",S),children:Rn(g.outcome,n)}):Ln(g.outcome)}),E=g.competitorOne?.score!==void 0||g.competitorTwo?.score!==void 0||g.date!==void 0?t.jsx(be,{content:Xr(g,r,n),position:"top",children:_}):_;return t.jsxs(A.Fragment,{children:[a==="last"&&P&&l.length>1&&t.jsx("div",{className:"h-5 w-px bg-border mx-0.5","aria-hidden":"true"}),E,a==="first"&&y&&l.length>1&&t.jsx("div",{className:"h-5 w-px bg-border mx-0.5","aria-hidden":"true"})]},x)})})}function In(e){switch(e){case"W":return"border-t-green-600";case"D":return"border-t-gray-400";case"L":return"border-t-red-500"}}function zn(e){switch(e){case"W":return"bg-green-600 text-white";case"D":return"bg-gray-400 text-white";case"L":return"bg-red-500 text-white"}}const it={win:"WIN",draw:"DRAW",loss:"LOSS"};function Bn(e,r){switch(e){case"W":return r?.win||it.win;case"D":return r?.draw||it.draw;case"L":return r?.loss||it.loss}}const lt={gap:{1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4",6:"gap-6",8:"gap-8"},logoSize:{xs:"w-4 h-4",sm:"w-6 h-6",md:"w-8 h-8",lg:"w-10 h-10",xl:"w-12 h-12"},mode:{scroll:"flex overflow-x-auto",grid:"flex justify-between",responsive:"flex justify-between overflow-x-auto md:overflow-visible"}},dt={label:"text-xs font-semibold uppercase",score:"text-lg font-semibold",date:"text-xs"},On={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl",full:"rounded-full"};function Dn({form:e,teamId:r,maxItems:o=5,labels:n,mode:a,styles:s,onClick:i}){const l=e.slice(-o),u=(b,O)=>{if(i){const Q=e.length-l.length+O;i(b,Q)}},c=b=>{if(r!==void 0){if(String(b.competitorOne?.id)===String(r))return{ourTeam:b.competitorOne,opponent:b.competitorTwo};if(String(b.competitorTwo?.id)===String(r))return{ourTeam:b.competitorTwo,opponent:b.competitorOne}}return{ourTeam:b.competitorOne,opponent:b.competitorTwo}},m=s?.container||"",p=lt.gap[s?.gap||"3"],j=a||s?.mode||"scroll",v=lt.mode[j],k=s?.item?.padding??"px-4 py-3",N=s?.item?.background??"bg-card",S=s?.item?.border??"border border-border border-t-4",g=s?.item?.borderRadius?On[s.item.borderRadius]:"rounded-md",x=s?.item?.container??"",y=lt.logoSize[s?.item?.logoSize||"md"],P=s?.item?.typography?.label||dt.label,_=s?.item?.typography?.score||dt.score,B=s?.item?.typography?.date||dt.date,E=()=>j==="scroll"?"shrink-0":"";return t.jsx("div",{className:d("items-start",v,p,m),children:l.map((b,O)=>{const{date:Q,outcome:oe}=b,{ourTeam:$,opponent:U}=c(b),he=$.score??"-",K=U.score??"-";return t.jsxs("div",{className:d("flex flex-col items-center gap-2",E(),k,N,S,g,In(oe),i&&"cursor-pointer hover:bg-muted/50 transition-colors",x),onClick:()=>u(b,O),children:[t.jsx("span",{className:d("px-3 py-0.5 rounded-full",P,zn(oe)),children:Bn(oe,n)}),t.jsxs("div",{className:d("flex items-center gap-2 text-foreground",_),children:[t.jsx("span",{children:he}),t.jsx("span",{className:"text-muted-foreground",children:"-"}),t.jsx("span",{children:K})]}),t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx(be,{content:$.name,children:$.image?t.jsx("img",{src:$.image,alt:$.name,className:d(y,"object-contain")}):t.jsx("div",{className:d(y,"bg-muted rounded-full flex items-center justify-center text-xs text-muted-foreground"),children:$.name.charAt(0)})}),t.jsx(be,{content:U.name,children:U.image?t.jsx("img",{src:U.image,alt:U.name,className:d(y,"object-contain")}):t.jsx("div",{className:d(y,"bg-muted rounded-full flex items-center justify-center text-xs text-muted-foreground"),children:U.name.charAt(0)})})]}),Q&&t.jsx("span",{className:d(B,"text-muted-foreground"),children:Q})]},b.matchId)})})}const En=e=>{switch(e){case"W":return"text-green-600 dark:text-green-400";case"L":return"text-red-600 dark:text-red-400";case"D":default:return"text-gray-500 dark:text-gray-400"}},$n=(e,r)=>{const o=St(e,r);return o?.name?o.shortName||o.name.substring(0,3).toUpperCase():"???"};function Gn({form:e,teamId:r,maxItems:o=5,labels:n,styles:a,onClick:s}){const i=e.slice(-o),{container:l=""}=a||{},u=(c,m)=>{if(s){const p=e.length-i.length+m;s(c,p)}};return t.jsx("div",{className:d("overflow-x-auto",l),children:t.jsx("div",{className:"grid gap-1",style:{gridTemplateColumns:`repeat(${i.length}, minmax(48px, 1fr))`,minWidth:"100%"},children:i.map((c,m)=>{const p=t.jsxs("div",{className:d("flex flex-col items-center py-2 px-1 bg-muted rounded-lg",s?"cursor-pointer hover:bg-muted/80":"cursor-default"),onClick:()=>u(c,m),children:[t.jsx("span",{className:d("text-sm font-bold",En(c.outcome)),children:Kr(c,r)||"?-?"}),t.jsx("span",{className:"text-[10px] text-muted-foreground",children:$n(c,r)})]});return c.competitorOne?.name!==void 0||c.competitorTwo?.name!==void 0||c.date!==void 0?t.jsx(be,{content:Xr(c,r,n),position:"top",children:p},m):t.jsx("div",{children:p},m)})})})}function ke({variant:e="embedded",...r}){switch(e){case"detailed":return t.jsx(Dn,{...r});case"scoreCards":return t.jsx(Gn,{...r});case"embedded":default:return t.jsx(_n,{...r})}}const Hn={0:"p-0",2:"p-2",3:"p-3",4:"p-4",6:"p-6",8:"p-8"},Un={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl"},Wn={1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4"};function Se({entity:e,primaryCta:r,secondaryCta:o,layout:n="horizontal",ctaLayout:a="responsive",styles:s}){const{container:i="",background:l="",padding:u="4",borderRadius:c="none",ctaGap:m="2"}=s||{},p=Hn[u],j=Un[c],v=Wn[m],k=r||o,N={inline:"flex flex-row items-center",stacked:"flex flex-col",responsive:"flex flex-col sm:flex-row sm:items-center"},S={inline:"flex flex-row items-center justify-between gap-4",stacked:"flex flex-col gap-4",responsive:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4"};return n==="stacked"?t.jsxs("div",{className:d("flex flex-col items-center text-center gap-4",p,j,l,i),children:[t.jsxs("div",{className:"flex flex-col items-center gap-2",children:[e.imageUrl&&t.jsx("img",{src:e.imageUrl,alt:e.name,className:d("object-contain",Vn(e.styles?.imageSize),Fn(e.styles?.imageBorderRadius),e.styles?.imageBorder)}),t.jsxs("div",{className:"flex flex-col items-center",children:[t.jsx("span",{className:e.styles?.typography?.name||"font-semibold",children:e.name}),e.subtitle&&t.jsx("span",{className:e.styles?.typography?.subtitle||"text-xs text-muted-foreground",children:e.subtitle})]})]}),k&&t.jsxs("div",{className:d("flex flex-col items-center",v),children:[r,o]})]}):t.jsxs("div",{className:d(S[a],p,j,l,i),children:[t.jsx(G,{...e}),k&&t.jsxs("div",{className:d(N[a],v,"shrink-0"),children:[r,o]})]})}const Zt={xs:"w-8 h-8",sm:"w-12 h-12",md:"w-16 h-16",lg:"w-20 h-20",xl:"w-24 h-24","2xl":"w-32 h-32","3xl":"w-40 h-40"},Kt={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl",full:"rounded-full"};function Vn(e){return Zt[e]||Zt.md}function Fn(e){return Kt[e]||Kt.none}const Yn={2:"gap-2",3:"gap-3",4:"gap-4",6:"gap-6",8:"gap-8"},qn={xs:"w-8 h-8",sm:"w-12 h-12",md:"w-16 h-16",lg:"w-20 h-20",xl:"w-24 w-24","2xl":"w-28 h-28","3xl":"w-32 h-32"},Zn={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl",full:"rounded-full"};function Kn(e){const r=qn[e?.imageSize||"lg"],o=e?.imageBorderRadius?Zn[e.imageBorderRadius]:"",n=e?.imageBorder||"";return d(r,o,n)}function Xt({entity:e}){return t.jsxs("div",{className:"flex-1 flex flex-col items-center text-center",children:[e.imageUrl&&t.jsx("img",{src:e.imageUrl,alt:e.name,className:d(Kn(e.styles),"object-contain mb-3")}),t.jsx("span",{className:e.styles?.typography?.name||"text-lg font-semibold text-white",children:e.name}),e.subtitle&&t.jsx("span",{className:e.styles?.typography?.subtitle||"text-sm text-white/70",children:e.subtitle})]})}function Qt({content:e,typography:r}){return t.jsx("div",{className:"shrink-0",children:typeof e=="string"?t.jsx("span",{className:r,children:e}):e})}function At({leftEntity:e,rightEntity:r,centerContent:o,variant:n="inline",styles:a,leftBackground:s="",rightBackground:i="",overlay:l=""}){const{container:u="",background:c="",gap:m="4",centerTypography:p="text-sm text-muted-foreground font-medium"}=a||{},j=Yn[m];if(n==="stacked")return t.jsxs("div",{className:d("relative overflow-hidden rounded-xl",u),children:[t.jsxs("div",{className:"absolute inset-0 flex",children:[t.jsx("div",{className:d("flex-1",s)}),t.jsx("div",{className:d("flex-1",i)})]}),l&&t.jsx("div",{className:d("absolute inset-0",l)}),t.jsxs("div",{className:d("relative z-10 flex items-center justify-between px-8 py-6",j),children:[t.jsx(Xt,{entity:e}),o&&t.jsx(Qt,{content:o,typography:p}),t.jsx(Xt,{entity:r})]})]});const v={...e,orientation:"rtl",styles:{...e.styles,textAlign:"right"}},k={...r,orientation:"ltr",styles:{...r.styles,textAlign:"left"}};return t.jsxs("div",{className:d("flex items-center justify-between",j,c,u),children:[t.jsx("div",{className:"flex-1 flex justify-end",children:t.jsx(G,{...v})}),o&&t.jsx(Qt,{content:o,typography:p}),t.jsx("div",{className:"flex-1 flex justify-start",children:t.jsx(G,{...k})})]})}const Xn={1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4"};function R({entity:e,primaryCta:r,secondaryCta:o,styles:n}){const a=n?.ctaGap||"2",s=n?.container||"",i=Xn[a];return r||o?t.jsxs("div",{className:d("flex items-center justify-between gap-4",s),children:[t.jsx(G,{...e}),t.jsxs("div",{className:d("flex items-center shrink-0",i),children:[r,o]})]}):t.jsx("div",{className:s,children:t.jsx(G,{...e})})}const Qn={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl"},Qr={left:"text-left",center:"text-center",right:"text-right"},Jn={1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4"};function Jr(e){const r=e?.borderRadius?Qn[e.borderRadius]:"rounded-xl";return d("overflow-hidden",r,e?.container)}function eo(e){return Qr[e?.titlePosition||"left"]}function to(e){return Qr[e?.oddsLabelPosition||"left"]}function ro(e){return Jn[e?.oddsGap||"1"]}const Jt="text-xs font-semibold text-muted-foreground uppercase tracking-wider";function ea({matchupHeader:e,stats:r,title:o,bettingOdds:n,oddsLabel:a,styles:s}){const i=eo(s),l=to(s);return t.jsxs("div",{className:d("bg-card border border-muted shadow-sm",Jr(s)),children:[t.jsx("div",{className:d("bg-muted/30 p-4",s?.headerSection),children:t.jsx(At,{...e,variant:"inline"})}),t.jsxs("div",{className:d("p-4",s?.statsSection),children:[o&&t.jsx(R,{entity:{name:o,styles:{typography:{name:d(Jt,i)},container:"mb-2.5 mt-1"}}}),t.jsx(Ct,{...r})]}),n&&n.length>0&&t.jsxs("div",{className:d("p-4 pt-0",s?.oddsSection),children:[a&&t.jsx(R,{entity:{name:a,styles:{typography:{name:d(Jt,l)},container:"mb-2.5 mt-1"}}}),t.jsx("div",{className:d("flex flex-col",ro(s)),children:n.map((u,c)=>t.jsx("div",{children:u},c))})]})]})}const er="text-xs font-semibold text-muted-foreground uppercase tracking-wider";function ta({matchupHeader:e,stats:r,title:o,bettingOdds:n,oddsLabel:a,styles:s}){const i={...e,variant:"stacked"},l=eo(s),u=to(s);return t.jsxs("div",{className:d("shadow-lg",Jr(s)),children:[t.jsx(At,{...i}),t.jsxs("div",{className:d("bg-card p-6",s?.statsSection),children:[o&&t.jsx(R,{entity:{name:o,styles:{typography:{name:d(er,l)},container:"mb-2.5 mt-1"}}}),t.jsx(Ct,{...r})]}),n&&n.length>0&&t.jsxs("div",{className:d("bg-card p-6 pt-0",s?.oddsSection),children:[a&&t.jsx(R,{entity:{name:a,styles:{typography:{name:d(er,u)},container:"mb-2.5 mt-1"}}}),t.jsx("div",{className:d("flex flex-col",ro(s)),children:n.map((c,m)=>t.jsx("div",{children:c},m))})]})]})}function ra({variant:e="card",...r}){switch(e){case"hero":return t.jsx(ta,{...r});case"card":default:return t.jsx(ea,{...r})}}const oa={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl"},sa={left:"text-left",center:"text-center",right:"text-right"},na={1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4"};function Ze(e){const r=e?.borderRadius?oa[e.borderRadius]:"rounded-xl";return d("overflow-hidden",r,e?.container)}function Ke(e){return sa[e?.titlePosition||"left"]}function Xe(e){return na[e?.oddsGap||"1"]}const aa="text-xs font-semibold text-muted-foreground uppercase tracking-wider";function ia({profileHeader:e,stats:r,statsTitle:o,form:n,formTitle:a,featuredMatch:s,matchTitle:i,bettingOdds:l,oddsLabel:u,styles:c}){const m=Ke(c),p={typography:{name:d(aa,m)},container:"mb-1.5"};return t.jsxs("div",{className:d("bg-card border border-muted shadow-sm",Ze(c)),children:[t.jsx("div",{className:c?.headerSection,children:t.jsx(Se,{...e})}),r&&t.jsxs("div",{className:d("p-4",c?.statsSection),children:[o&&t.jsx(R,{entity:{name:o,styles:p}}),t.jsx(re,{...r})]}),n&&t.jsxs("div",{className:d("px-4 pb-4",c?.formSection),children:[a&&t.jsx(R,{entity:{name:a,styles:p}}),t.jsx(ke,{...n,variant:"scoreCards"})]}),s&&t.jsxs("div",{className:d("p-4 pt-0",c?.matchSection),children:[i&&t.jsx(R,{entity:{name:i,styles:p}}),t.jsx(z,{...s})]}),l&&l.length>0&&t.jsxs("div",{className:d("p-4 pt-0",c?.oddsSection),children:[u&&t.jsx(R,{entity:{name:u,styles:p}}),t.jsx("div",{className:d("flex flex-col",Xe(c)),children:l.map((j,v)=>t.jsx("div",{children:j},v))})]})]})}const la="text-xs font-semibold text-muted-foreground uppercase tracking-wider";function da({profileHeader:e,stats:r,statsTitle:o,form:n,formTitle:a,featuredMatch:s,matchTitle:i,bettingOdds:l,oddsLabel:u,styles:c}){const m=Ke(c),p={typography:{name:d(la,m)},container:"mb-1.5"};return t.jsxs("div",{className:d("shadow-lg",Ze(c)),children:[t.jsx("div",{className:c?.headerSection,children:t.jsx(Se,{...e})}),r&&t.jsxs("div",{className:d("bg-card p-5",c?.statsSection),children:[o&&t.jsx(R,{entity:{name:o,styles:p}}),t.jsx(re,{...r})]}),n&&t.jsxs("div",{className:d("bg-card px-4 pb-4",c?.formSection),children:[a&&t.jsx(R,{entity:{name:a,styles:p}}),t.jsx(ke,{...n,variant:"scoreCards"})]}),s&&t.jsxs("div",{className:d("bg-card p-4 pt-0",c?.matchSection),children:[i&&t.jsx(R,{entity:{name:i,styles:p}}),t.jsx(z,{...s})]}),l&&l.length>0&&t.jsxs("div",{className:d("bg-card p-4 pt-0",c?.oddsSection),children:[u&&t.jsx(R,{entity:{name:u,styles:p}}),t.jsx("div",{className:d("flex flex-col",Xe(c)),children:l.map((j,v)=>t.jsx("div",{children:j},v))})]})]})}const ca="text-xs font-semibold text-muted-foreground uppercase tracking-wider";function ua({profileHeader:e,stats:r,form:o,formTitle:n,matchTitle:a,featuredMatch:s,bettingOdds:i,oddsLabel:l,styles:u}){const c=Ke(u),m={typography:{name:d(ca,c)},container:"mb-1.5"};return t.jsxs("div",{className:d("bg-card border border-muted shadow-sm",Ze(u)),children:[t.jsx("div",{className:u?.headerSection,children:t.jsx(Se,{...e})}),r&&t.jsx("div",{className:d("p-3",u?.statsSection),children:t.jsx(re,{...r})}),o&&t.jsxs("div",{className:d("bg-card px-3 pb-3",u?.formSection),children:[n&&t.jsx(R,{entity:{name:n,styles:m}}),t.jsx("div",{className:"flex justify-start",children:t.jsx(ke,{...o,matchSeparator:"last",variant:"embedded"})})]}),s&&t.jsxs("div",{className:d("px-3 pb-3",u?.matchSection),children:[a&&t.jsx(R,{entity:{name:a,styles:m}}),t.jsx(z,{...s,styles:{logoSize:"sm",typography:{teamName:"text-sm uppercase"}}})]}),i&&i.length>0&&t.jsxs("div",{className:d("px-3 pb-3",u?.oddsSection),children:[l&&t.jsx(R,{entity:{name:l,styles:m}}),t.jsx("div",{className:d("flex flex-col",Xe(u)),children:i.map((p,j)=>t.jsx("div",{children:p},j))})]})]})}const ma="text-xs font-semibold text-muted-foreground uppercase tracking-wider";function pa({profileHeader:e,stats:r,statsTitle:o,form:n,formTitle:a,featuredMatch:s,matchTitle:i,bettingOdds:l,oddsLabel:u,styles:c}){const m=e.styles?.background||"bg-gradient-to-br from-primary-600 to-primary-800",p=e.styles?{...e.styles,background:void 0}:void 0,j=Ke(c),v={typography:{name:d(ma,j)},container:"mb-1.5"};return t.jsx("div",{className:d("shadow-lg",Ze(c)),children:t.jsxs("div",{className:"flex flex-col md:flex-row",children:[t.jsx("div",{className:d("w-full md:w-1/3 flex items-center justify-center",m,c?.headerSection),children:t.jsx(Se,{...e,styles:p,layout:"stacked",ctaLayout:"stacked"})}),t.jsxs("div",{className:"w-full md:flex-1 flex flex-col bg-card p-4 space-y-4",children:[r&&t.jsxs("div",{className:c?.statsSection,children:[o&&t.jsx(R,{entity:{name:o,styles:v}}),t.jsx(re,{...r})]}),n&&t.jsxs("div",{className:c?.formSection,children:[a&&t.jsx(R,{entity:{name:a,styles:v}}),t.jsx(ke,{...n,variant:"scoreCards"})]}),s&&t.jsxs("div",{className:c?.matchSection,children:[i&&t.jsx(R,{entity:{name:i,styles:v}}),t.jsx(z,{...s})]}),l&&l.length>0&&t.jsxs("div",{className:c?.oddsSection,children:[u&&t.jsx(R,{entity:{name:u,styles:v}}),t.jsx("div",{className:d("flex flex-col",Xe(c)),children:l.map((k,N)=>t.jsx("div",{children:k},N))})]})]})]})})}function ga({variant:e="card",...r}){switch(e){case"hero":return t.jsx(da,{...r});case"compact":return t.jsx(ua,{...r});case"horizontal":return t.jsx(pa,{...r});case"card":default:return t.jsx(ia,{...r})}}const xa={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl"},ha={none:"gap-0",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8"},fa={1:"grid-cols-1",2:"grid-cols-2"},ba={1:"md:grid-cols-1",2:"md:grid-cols-2",3:"md:grid-cols-3"},ja={1:"lg:grid-cols-1",2:"lg:grid-cols-2",3:"lg:grid-cols-3",4:"lg:grid-cols-4"},va={1:"xl:grid-cols-1",2:"xl:grid-cols-2",3:"xl:grid-cols-3",4:"xl:grid-cols-4",5:"xl:grid-cols-5",6:"xl:grid-cols-6"};function oo(e){const r=e?.borderRadius?xa[e.borderRadius]:"rounded-xl";return d("overflow-hidden",r,e?.background,e?.container)}function so(e){return ha[e?.gap||"md"]}function wa(e){const r=e?.sm||1,o=e?.md||2,n=e?.lg||3,a=e?.xl||4;return d(fa[r],ba[o],ja[n],va[a])}function ya({items:e,sectionHeader:r,cardVariant:o="standard",cardStyles:n,pagination:a,styles:s}){const i=so(s),l=wa(s?.columns);return t.jsxs("div",{className:oo(s),children:[r,t.jsx("div",{className:d("grid",l,i,s?.contentSection),children:e.map(u=>t.jsx(q,{content:u.content,variant:o,styles:n,primaryCta:u.primaryCta,secondaryCta:u.secondaryCta,bettingOdds:u.bettingOdds,matchScore:u.matchScore},u.content.id))}),a&&t.jsx("div",{className:d("mt-6 flex justify-center",s?.paginationSection),children:t.jsx(jt,{...a})})]})}function Na({items:e,sectionHeader:r,cardVariant:o="standardHorizontal",cardStyles:n,pagination:a,styles:s}){const i=so(s),l=o==="standard"?"standardHorizontal":o;return t.jsxs("div",{className:oo(s),children:[r,t.jsx("div",{className:d("flex flex-col",i,s?.contentSection),children:e.map(u=>t.jsx(q,{content:u.content,variant:l,styles:n,primaryCta:u.primaryCta,secondaryCta:u.secondaryCta,bettingOdds:u.bettingOdds,matchScore:u.matchScore},u.content.id))}),a&&t.jsx("div",{className:d("mt-6 flex justify-center",s?.paginationSection),children:t.jsx(jt,{...a})})]})}function Ca({variant:e="grid",...r}){switch(e){case"list":return t.jsx(Na,{...r});case"grid":default:return t.jsx(ya,{...r})}}const ka={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl"},Sa={none:"gap-0",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8"};function Rt(e){const r=e?.borderRadius?ka[e.borderRadius]:"";return d(r,e?.background,e?.container)}function Tt(e){return Sa[e?.gap||"md"]}const Aa={1:"grid-cols-1",2:"grid-cols-1 md:grid-cols-2",3:"grid-cols-1 md:grid-cols-2 lg:grid-cols-3",4:"grid-cols-1 md:grid-cols-2 lg:grid-cols-4"},Ra={1:{title:"text-xl md:text-3xl font-bold line-clamp-3",description:"text-sm md:text-base line-clamp-2",category:"text-sm",metadata:"text-sm opacity-80"},2:{title:"text-xl md:text-lg font-bold line-clamp-2",category:"text-xs",metadata:"text-xs opacity-80"},3:{title:"text-xl md:text-base font-semibold line-clamp-2",metadata:"text-xs opacity-80"},4:{title:"text-xl md:text-sm font-semibold line-clamp-2",metadata:"text-xs opacity-80"}};function Ta(e,r){return r<=1?e:{...e,content:{...e.content,description:void 0,category:r>=3?void 0:e.content.category}}}function ct({items:e,config:r,cardStyles:o,gapClass:n}){const a=Aa[r.columns],s=Ra[r.columns];return t.jsx("div",{className:d("grid",a,n),children:e.map(i=>{const l=Ta(i,r.columns);return t.jsx(q,{content:l.content,variant:"hero",styles:{...o,typography:{...s,...o?.typography}},bettingOdds:l.bettingOdds,matchScore:l.matchScore},l.content.id)})})}function La({items:e,sectionHeader:r,cardStyles:o,styles:n,stackedConfig:a}){const s=a?.row1||{columns:1},i=a?.row2||{columns:2},l=a?.row3||{columns:3},u=Tt(n),c=s.columns,m=i.columns,p=l.columns,j=e.slice(0,c),v=e.slice(c,c+m),k=e.slice(c+m,c+m+p);return t.jsxs("div",{className:Rt(n),children:[r,t.jsxs("div",{className:d("flex flex-col",u),children:[j.length>0&&t.jsx(ct,{items:j,config:s,cardStyles:o,gapClass:u}),v.length>0&&t.jsx(ct,{items:v,config:i,cardStyles:o,gapClass:u}),k.length>0&&t.jsx(ct,{items:k,config:l,cardStyles:o,gapClass:u})]})]})}const Ma={title:"text-xl md:text-lg font-bold line-clamp-2",category:"text-xs",metadata:"text-xs opacity-80"},Pa={title:"text-xl md:text-base font-semibold line-clamp-2",metadata:"text-xs opacity-80"};function tr(e,r=!1){return{...e,content:{...e.content,description:void 0,category:r?void 0:e.content.category}}}function _a({items:e,sectionHeader:r,cardStyles:o,styles:n}){const a=Tt(n),s=e[0],i=e.slice(1,3),l=e.slice(3,6);return s?t.jsxs("div",{className:Rt(n),children:[r,t.jsxs("div",{className:d("flex flex-col",a),children:[t.jsxs("div",{className:d("grid grid-cols-1 lg:grid-cols-3",a),children:[t.jsx("div",{className:"lg:col-span-2",children:t.jsx(q,{content:s.content,variant:"hero",styles:{...o,imageAspectRatio:"auto",container:d("h-full",o?.container),imageContainer:d("h-full",o?.imageContainer)},bettingOdds:s.bettingOdds,matchScore:s.matchScore})}),i.length>0&&t.jsx("div",{className:d("flex flex-col",a),children:i.map(u=>{const c=tr(u);return t.jsx(q,{content:c.content,variant:"hero",styles:{...o,container:d("flex-1",o?.container),typography:{...Ma,...o?.typography}},bettingOdds:c.bettingOdds,matchScore:c.matchScore},c.content.id)})})]}),l.length>0&&t.jsx("div",{className:d("grid grid-cols-1 md:grid-cols-3",a),children:l.map(u=>{const c=tr(u,!0);return t.jsx(q,{content:c.content,variant:"hero",styles:{...o,typography:{...Pa,...o?.typography}},bettingOdds:c.bettingOdds,matchScore:c.matchScore},c.content.id)})})]})]}):null}const Ia={title:"text-base font-semibold line-clamp-2",category:"text-xs",metadata:"text-xs opacity-80"};function za(e){return{...e,content:{...e.content,description:void 0}}}function Ba({items:e,sectionHeader:r,cardStyles:o,styles:n}){const a=Tt(n),s=e[0],i=e.slice(1);return s?t.jsxs("div",{className:Rt(n),children:[r,t.jsxs("div",{className:d("grid grid-cols-1 lg:grid-cols-2",a),children:[t.jsx("div",{className:"lg:h-full",children:t.jsx(q,{content:s.content,variant:"standard",styles:{...o,container:d("h-full",o?.container)},primaryCta:s.primaryCta,secondaryCta:s.secondaryCta,bettingOdds:s.bettingOdds,matchScore:s.matchScore})}),i.length>0&&t.jsx("div",{className:d("flex flex-col",a),children:i.map(l=>{const u=za(l);return t.jsx(q,{content:u.content,variant:"minimal",styles:{...o,typography:{...Ia,...o?.typography}},bettingOdds:u.bettingOdds,matchScore:u.matchScore},u.content.id)})})]})]}):null}function Oa({variant:e="stacked",...r}){switch(e){case"spotlight":return t.jsx(_a,{...r});case"highlight":return t.jsx(Ba,{...r});case"stacked":default:return t.jsx(La,{...r})}}const Lt={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl"},Da={none:"gap-0",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8"},no={none:"",sm:"px-2 py-1",md:"px-3 py-2",lg:"px-4 py-3"};function M(e){const r=e?.borderRadius?Lt[e.borderRadius]:"rounded-xl";return d("overflow-hidden",r,e?.background,e?.container)}function ao(e){return Da[e||"md"]}function rr(e){const r=e?.typography||"text-sm font-semibold text-muted-foreground",o=e?.background||"bg-muted",n=no[e?.padding||"md"],a=e?.borderRadius?Lt[e.borderRadius]:"";return d(r,o,n,a)}function Ea(e){const r=new Map;return e.forEach(o=>{const n=o.dateGroup||o.match.metadata?.date||"Unknown",a=r.get(n)||[];r.set(n,[...a,o])}),r}function $a(e){const r=new Map;return e.forEach(o=>{const n=o.roundGroup||o.match.metadata?.round||"Unknown",a=r.get(n)||[];r.set(n,[...a,o])}),r}function Z({message:e}){return t.jsx("div",{className:"flex items-center justify-center py-12 text-muted-foreground",children:t.jsx("p",{className:"text-sm",children:e})})}function io({title:e,styles:r,action:o}){return o?t.jsxs("div",{className:d("flex items-center justify-between",rr(r)),children:[t.jsx("span",{children:e}),o]}):t.jsx("div",{className:rr(r),children:e})}function Qe({title:e,subtitle:r,logo:o,action:n,styles:a}){const s=a?.typography||"text-sm font-semibold",i=a?.subtitleTypography||"text-xs text-muted-foreground",l=a?.background||"bg-muted",u=no[a?.padding||"md"],c=a?.borderRadius?Lt[a.borderRadius]:"";return t.jsxs("div",{className:d("flex items-center justify-between",l,u,c),children:[t.jsxs("div",{className:"flex items-center gap-2",children:[o&&t.jsx("img",{src:o,alt:e,className:"w-6 h-6 object-contain"}),t.jsxs("div",{children:[t.jsx("div",{className:s,children:e}),r&&t.jsx("div",{className:i,children:r})]})]}),n&&t.jsx("div",{children:n})]})}function Ae({children:e,bettingOdds:r,oddsColumnWidth:o="w-[360px]",hasOddsColumn:n=!1}){return n?t.jsxs("div",{className:"flex flex-col md:flex-row md:items-center gap-2 py-2 px-2",children:[t.jsx("div",{className:"flex-1 min-w-0",children:e}),t.jsx("div",{className:d("shrink-0 hidden md:block",o),children:r}),r&&t.jsx("div",{className:"md:hidden",children:r})]}):t.jsx("div",{className:"py-2 px-2",children:e})}function Re({items:e,styles:r,renderMatch:o,hasOddsColumn:n}){const a=n??e.some(s=>s.bettingOdds);return t.jsx("div",{className:"flex flex-col divide-y divide-border",children:e.map(s=>t.jsx(Ae,{bettingOdds:s.bettingOdds,oddsColumnWidth:r?.oddsColumnWidth,hasOddsColumn:a,children:o(s)},s.match.id))})}function or({items:e,styles:r,sectionHeader:o,emptyMessage:n="No matches found"}){if(e.length===0)return t.jsxs("div",{className:M(r),children:[o,t.jsx(Z,{message:n})]});const a=e.some(i=>i.bettingOdds),s=i=>i.competitionGroup||i.match.metadata?.competition||"Unknown";return t.jsxs("div",{className:M(r),children:[o,t.jsx("div",{className:"flex flex-col divide-y divide-border",children:e.map((i,l)=>{const u=s(i),c=l>0?s(e[l-1]):null,m=u!==c;return t.jsxs("div",{children:[m&&t.jsx(Qe,{title:u,subtitle:i.competitionSubtitle,logo:i.competitionLogo,action:i.groupAction,styles:r?.groupHeader}),t.jsx(Ae,{bettingOdds:i.bettingOdds,oddsColumnWidth:r?.oddsColumnWidth,hasOddsColumn:a,children:t.jsx(z,{match:i.match,variant:"embedded",styles:r?.matchScoreStyles})})]},i.match.id)})})]})}function Ga({items:e,styles:r,sectionHeader:o,emptyMessage:n="No matches found"}){if(e.length===0)return t.jsxs("div",{className:M(r),children:[o,t.jsx(Z,{message:n})]});const a=Ea(e),s=ao(r?.groupGap||"md"),i=e.some(l=>l.bettingOdds);return t.jsxs("div",{className:M(r),children:[o,t.jsx("div",{className:d("flex flex-col",s),children:Array.from(a.entries()).map(([l,u])=>{const c=u[0];return t.jsxs("div",{children:[t.jsx(io,{title:l,styles:r?.groupHeader,action:c.groupAction}),t.jsx(Re,{items:u,styles:r,hasOddsColumn:i,renderMatch:m=>t.jsx(z,{match:m.match,variant:"embedded",styles:r?.matchScoreStyles})})]},l)})})]})}function Ha({items:e,styles:r,sectionHeader:o,emptyMessage:n="No matches found",scrollToActiveRound:a=!1}){const s=A.useRef(null);if(A.useEffect(()=>{a&&s.current&&s.current.scrollIntoView({behavior:"smooth",block:"start"})},[a]),e.length===0)return t.jsxs("div",{className:M(r),children:[o,t.jsx(Z,{message:n})]});const i=$a(e),l=ao(r?.groupGap||"md"),u=e.some(c=>c.bettingOdds);return t.jsxs("div",{className:M(r),children:[o,t.jsx("div",{className:d("flex flex-col",l),children:Array.from(i.entries()).map(([c,m])=>{const p=m[0],j=m.some(v=>v.isActiveRound);return t.jsxs("div",{ref:j?s:void 0,children:[t.jsx(io,{title:c,styles:r?.groupHeader,action:p.groupAction}),t.jsx(Re,{items:m,styles:r,hasOddsColumn:u,renderMatch:v=>t.jsx(z,{match:v.match,variant:"embedded",styles:r?.matchScoreStyles})})]},c)})})]})}function Ua({items:e,styles:r,sectionHeader:o,emptyMessage:n="No matches found"}){if(e.length===0)return t.jsxs("div",{className:M(r),children:[o,t.jsx(Z,{message:n})]});const a={...r?.matchScoreStyles,finishedStatusDisplay:"date"};return t.jsxs("div",{className:M(r),children:[o,t.jsx(Re,{items:e,styles:r,renderMatch:s=>t.jsx(z,{match:s.match,variant:"embedded",styles:a})})]})}function Wa({items:e,styles:r,sectionHeader:o,emptyMessage:n="No matches found"}){if(e.length===0)return t.jsxs("div",{className:M(r),children:[o,t.jsx(Z,{message:n})]});const a=e.some(l=>l.bettingOdds),s=l=>l.competitionGroup||l.match.metadata?.competition||"Unknown",i={...r?.matchScoreStyles,finishedStatusDisplay:"date"};return t.jsxs("div",{className:M(r),children:[o,t.jsx("div",{className:"flex flex-col divide-y divide-border",children:e.map((l,u)=>{const c=s(l),m=u>0?s(e[u-1]):null,p=c!==m;return t.jsxs("div",{children:[p&&t.jsx(Qe,{title:c,subtitle:l.competitionSubtitle,logo:l.competitionLogo,action:l.groupAction,styles:r?.groupHeader}),t.jsx(Ae,{bettingOdds:l.bettingOdds,oddsColumnWidth:r?.oddsColumnWidth,hasOddsColumn:a,children:t.jsx(z,{match:l.match,variant:"embedded",styles:i})})]},l.match.id)})})]})}function Va({items:e,styles:r,sectionHeader:o,emptyMessage:n="No matches found"}){return e.length===0?t.jsxs("div",{className:M(r),children:[o,t.jsx(Z,{message:n})]}):t.jsxs("div",{className:M(r),children:[o,t.jsx(Re,{items:e,styles:r,renderMatch:a=>t.jsx(z,{match:a.match,variant:"embedded",styles:r?.matchScoreStyles})})]})}function Fa({items:e,styles:r,sectionHeader:o,emptyMessage:n="No matches found"}){if(e.length===0)return t.jsxs("div",{className:M(r),children:[o,t.jsx(Z,{message:n})]});const a=e.some(i=>i.bettingOdds),s=i=>i.competitionGroup||i.match.metadata?.competition||"Unknown";return t.jsxs("div",{className:M(r),children:[o,t.jsx("div",{className:"flex flex-col divide-y divide-border",children:e.map((i,l)=>{const u=s(i),c=l>0?s(e[l-1]):null,m=u!==c;return t.jsxs("div",{children:[m&&t.jsx(Qe,{title:u,subtitle:i.competitionSubtitle,logo:i.competitionLogo,action:i.groupAction,styles:r?.groupHeader}),t.jsx(Ae,{bettingOdds:i.bettingOdds,oddsColumnWidth:r?.oddsColumnWidth,hasOddsColumn:a,children:t.jsx(z,{match:i.match,variant:"embedded",styles:r?.matchScoreStyles})})]},i.match.id)})})]})}function Ya({items:e,styles:r,sectionHeader:o,emptyMessage:n="No matches found"}){if(e.length===0)return t.jsxs("div",{className:M(r),children:[o,t.jsx(Z,{message:n})]});const a=e.filter(l=>l.match.status!=="scheduled"),s=e.filter(l=>l.match.status==="scheduled"),i=[...a,...s];return t.jsxs("div",{className:M(r),children:[o,t.jsx(Re,{items:i,styles:r,renderMatch:l=>t.jsx(z,{match:l.match,variant:"embedded",styles:r?.matchScoreStyles})})]})}function qa({items:e,styles:r,sectionHeader:o,emptyMessage:n="No matches found"}){if(e.length===0)return t.jsxs("div",{className:M(r),children:[o,t.jsx(Z,{message:n})]});const a=e.some(l=>l.bettingOdds),s=l=>l.competitionGroup||l.match.metadata?.competition||"Unknown",i=l=>l.match.status!=="scheduled"?{...r?.matchScoreStyles,finishedStatusDisplay:"date"}:r?.matchScoreStyles;return t.jsxs("div",{className:M(r),children:[o,t.jsx("div",{className:"flex flex-col divide-y divide-border",children:e.map((l,u)=>{const c=s(l),m=u>0?s(e[u-1]):null,p=c!==m;return t.jsxs("div",{children:[p&&t.jsx(Qe,{title:c,subtitle:l.competitionSubtitle,logo:l.competitionLogo,action:l.groupAction,styles:r?.groupHeader}),t.jsx(Ae,{bettingOdds:l.bettingOdds,oddsColumnWidth:r?.oddsColumnWidth,hasOddsColumn:a,children:t.jsx(z,{match:l.match,variant:"embedded",styles:i(l)})})]},l.match.id)})})]})}function Za({variant:e="daily",...r}){switch(e){case"daily":return t.jsx(or,{...r});case"round":return t.jsx(Ga,{...r});case"competition":return t.jsx(Ha,{...r});case"teamResults":return t.jsx(Ua,{...r});case"teamResultsByCompetition":return t.jsx(Wa,{...r});case"teamFixtures":return t.jsx(Va,{...r});case"teamFixturesByCompetition":return t.jsx(Fa,{...r});case"teamMatches":return t.jsx(Ya,{...r});case"teamMatchesByCompetition":return t.jsx(qa,{...r});default:return t.jsx(or,{...r})}}const Ka="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' fill='%239ca3af'%3E%3Ccircle cx='50' cy='35' r='20'/%3E%3Cpath d='M20 95 Q20 60 50 60 Q80 60 80 95 Z'/%3E%3C/svg%3E";function Mt(e){return e.imageUrl||Ka}const Je={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl"},lo={none:"gap-0",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8"};function ie(e){const r=e?.borderRadius?Je[e.borderRadius]:"rounded-xl",o=e?.background||"bg-card";return d("overflow-hidden p-4",r,o,e?.container)}function le(e){const r=e?.header?.border??"border-b border-muted",o=e?.header?.padding??"pb-4";return d(r,o,e?.header?.container)}function de(e){return lo[e?.groupGap||"md"]}function ce(e){return lo[e?.memberGap||"sm"]}function Pt(e,r){const o=new Map;r&&r.forEach(s=>o.set(s.key,s));const n=new Map;e.forEach(s=>{const i=s.positionGroup;n.has(i)||n.set(i,[]),n.get(i).push(s)});const a=Array.from(n.entries()).map(([s,i])=>{const l=o.get(s);return{key:s,label:l?.label||s,order:l?.order??999,members:i}});return a.sort((s,i)=>s.order-i.order),a.map(({key:s,label:i,members:l})=>({key:s,label:i,members:l}))}function Xa(e,r){const o=[];return r?.showNumber&&e.jerseyNumber!==void 0&&o.push(`#${e.jerseyNumber}`),r?.showPosition&&e.position&&o.push(e.position),r?.showSubtitle&&e.subtitle&&o.push(e.subtitle),o.length>0?o.join(" • "):void 0}const Qa="text-sm font-semibold text-muted-foreground uppercase tracking-wider",sr={2:"grid-cols-1 sm:grid-cols-2",3:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",4:"grid-cols-2 sm:grid-cols-3 lg:grid-cols-4",5:"grid-cols-2 sm:grid-cols-3 lg:grid-cols-5",6:"grid-cols-2 sm:grid-cols-4 lg:grid-cols-6"};function nr({member:e,display:r,styles:o}){const n=o?.memberNameTypography||"font-semibold text-foreground",a=o?.memberSubtitleTypography||"text-xs text-muted-foreground",s=o?.memberCard,i=e.href||e.onClick,l=e.href?"a":"div",u=e.href?{href:e.href}:e.onClick?{onClick:e.onClick,role:"button",tabIndex:0}:{},c=s?.background||"bg-muted",m=s?.borderRadius?Je[s.borderRadius]:"rounded-lg",p=s?.padding||"p-3",j=s?.gap||"gap-3";return t.jsxs(l,{className:d(c,m,p,"flex flex-col",j,i&&"cursor-pointer hover:opacity-80 transition-opacity",s?.container),...u,children:[t.jsx(G,{name:e.name,mobileName:e.shortName,imageUrl:Mt(e),subtitle:Xa(e,r),styles:{imageBorderRadius:"full",imageSize:s?.entityDisplay?.imageSize||"xl",typography:{name:n,subtitle:a},gap:"3",...s?.entityDisplay}}),e.stats&&e.stats.length>0&&t.jsx(re,{items:e.stats,itemVariant:"stacked",styles:{grid:{colsMobile:3,colsTablet:3,colsDesktop:3,gap:"sm",...s?.statsGrid},item:{alignment:"center",padding:"sm",borderRadius:"md",container:"bg-foreground/5",typography:{value:"text-sm font-semibold text-foreground",label:"text-[9px] font-medium text-muted-foreground uppercase"},...s?.statsItem}}})]},e.id)}function Ja({members:e,groupByPosition:r=!0,positionGroups:o,display:n={showNumber:!0,showPosition:!0},header:a,styles:s}){const i=s?.groupHeaderTypography||Qa,l=s?.columns||3,u=sr[l]||sr[3];if(r){const c=Pt(e,o);return t.jsxs("div",{className:d(ie(s),"flex flex-col",de(s)),children:[a&&t.jsx("div",{className:le(s),children:a}),c.map(m=>t.jsxs("div",{className:"space-y-3",children:[t.jsx("div",{className:i,children:m.label}),t.jsx("div",{className:d("grid",u,ce(s)),children:m.members.map(p=>t.jsx(nr,{member:p,display:n,styles:s},p.id))})]},m.key))]})}return t.jsxs("div",{className:d(ie(s),"flex flex-col",de(s)),children:[a&&t.jsx("div",{className:le(s),children:a}),t.jsx("div",{className:d("grid",u,ce(s)),children:e.map(c=>t.jsx(nr,{member:c,display:n,styles:s},c.id))})]})}const ei="text-sm font-semibold text-muted-foreground uppercase tracking-wider",ar={1:"grid-cols-1",2:"grid-cols-1 sm:grid-cols-2"};function ti(e){const r=new Date(e),o=new Date;let n=o.getFullYear()-r.getFullYear();const a=o.getMonth()-r.getMonth();return(a<0||a===0&&o.getDate()<r.getDate())&&n--,n}function ri(e,r){const o=[];return r?.showPosition&&e.position&&o.push({label:"Position",value:e.position}),e.birthDate&&o.push({label:"Age",value:`${ti(e.birthDate)}`}),e.height&&o.push({label:"Height",value:e.height}),o}function ir({member:e,display:r,styles:o}){const n=ri(e,r),a=o?.memberCard,s=e.href||e.onClick,i=e.href?"a":"div",l=e.href?{href:e.href}:e.onClick?{onClick:e.onClick,role:"button",tabIndex:0}:{},u=a?.background||"bg-muted",c=a?.borderRadius?Je[a.borderRadius]:"rounded-xl";return t.jsxs(i,{className:d(u,c,"overflow-hidden flex flex-row",s&&"cursor-pointer hover:opacity-80 transition-opacity",a?.container),...l,children:[t.jsxs("div",{className:"relative w-40 sm:w-48 shrink-0 bg-linear-to-b from-primary-600/20 to-primary-800/20",children:[t.jsx("img",{src:Mt(e),alt:"","aria-hidden":"true",className:"absolute inset-0 w-full h-full object-cover object-top"}),r?.showNumber&&e.jerseyNumber&&t.jsx("div",{className:"absolute top-3 right-3 bg-background/90 backdrop-blur-sm rounded-lg px-2 py-1 font-bold text-sm text-foreground",children:e.jerseyNumber})]}),t.jsxs("div",{className:d("p-4 flex flex-col gap-3 flex-1 min-w-0",a?.padding,a?.gap),children:[t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center gap-2",children:[e.nationality?.flagUrl&&t.jsx("img",{src:e.nationality.flagUrl,alt:e.nationality.name,className:"w-6 h-4 object-cover rounded shadow-sm shrink-0"}),t.jsx("h3",{className:d("text-xl font-bold text-foreground truncate",o?.memberNameTypography),children:e.name})]}),e.subtitle&&t.jsx("p",{className:d("text-sm text-primary-600 font-medium",o?.memberSubtitleTypography),children:e.subtitle})]}),n.length>0&&t.jsx("div",{className:"flex flex-wrap gap-x-4 gap-y-1 text-sm",children:n.map(m=>t.jsxs("div",{className:"flex gap-1",children:[t.jsxs("span",{className:"text-muted-foreground",children:[m.label,":"]}),t.jsx("span",{className:"font-medium text-foreground",children:m.value})]},m.label))}),e.stats&&e.stats.length>0&&t.jsx(re,{items:e.stats,itemVariant:"stacked",styles:{grid:{colsMobile:3,colsTablet:3,colsDesktop:3,gap:"sm",...a?.statsGrid},item:{alignment:"center",padding:"sm",borderRadius:"lg",container:"bg-foreground/5",typography:{value:"text-lg font-bold text-foreground",label:"text-[10px] font-medium text-muted-foreground uppercase"},...a?.statsItem}}})]})]})}function oi({members:e,groupByPosition:r=!0,positionGroups:o,display:n={showNumber:!0,showPosition:!0},header:a,styles:s}){const i=s?.groupHeaderTypography||ei,l=s?.columns||2,u=ar[l]||ar[2];if(r){const c=Pt(e,o);return t.jsxs("div",{className:d(ie(s),"flex flex-col",de(s)),children:[a&&t.jsx("div",{className:le(s),children:a}),c.map(m=>t.jsxs("div",{className:"space-y-4",children:[t.jsx("div",{className:i,children:m.label}),t.jsx("div",{className:d("grid",u,ce(s)),children:m.members.map(p=>t.jsx(ir,{member:p,display:n,styles:s},p.id))})]},m.key))]})}return t.jsxs("div",{className:d(ie(s),"flex flex-col",de(s)),children:[a&&t.jsx("div",{className:le(s),children:a}),t.jsx("div",{className:d("grid",u,ce(s)),children:e.map(c=>t.jsx(ir,{member:c,display:n,styles:s},c.id))})]})}const si="text-sm font-semibold text-muted-foreground uppercase tracking-wider",lr={3:"grid-cols-2 sm:grid-cols-3",4:"grid-cols-2 sm:grid-cols-3 lg:grid-cols-4",5:"grid-cols-2 sm:grid-cols-3 lg:grid-cols-5",6:"grid-cols-3 sm:grid-cols-4 lg:grid-cols-6"};function dr({member:e,display:r,styles:o}){const n=o?.memberCard,a=e.href||e.onClick,s=e.href?"a":"div",i=e.href?{href:e.href}:e.onClick?{onClick:e.onClick,role:"button",tabIndex:0}:{},l=n?.borderRadius?Je[n.borderRadius]:"rounded-xl",u=n?.background||"bg-linear-to-b from-primary-500 to-primary-700",c=e.stats?.slice(0,6)||[];return t.jsxs(s,{className:d("relative overflow-hidden flex flex-col",l,u,a&&"cursor-pointer hover:scale-[1.02] transition-transform",n?.container),...i,children:[t.jsxs("div",{className:"flex items-center justify-between px-3 pt-3",children:[r?.showPosition&&e.position&&t.jsx("span",{className:"text-[10px] font-bold text-white/90 uppercase tracking-wider",children:e.positionGroup}),r?.showNumber&&e.jerseyNumber&&t.jsx("span",{className:"text-2xl font-black text-white/20",children:e.jerseyNumber})]}),t.jsxs("div",{className:"relative flex-1 flex items-end justify-center px-4 pb-2 min-h-[120px]",children:[t.jsx("img",{src:Mt(e),alt:"","aria-hidden":"true",className:"w-full max-w-[140px] aspect-square object-cover object-top rounded-full border-3 border-white/20"}),e.nationality?.flagUrl&&t.jsx("img",{src:e.nationality.flagUrl,alt:e.nationality.name,className:"absolute bottom-2 right-4 w-6 h-4 object-cover rounded shadow-sm"})]}),t.jsxs("div",{className:"bg-black/20 px-3 py-2 text-center",children:[t.jsx("h3",{className:d("text-sm font-bold text-white uppercase tracking-wide truncate",o?.memberNameTypography),children:e.shortName||e.name}),r?.showSubtitle&&e.subtitle&&t.jsx("p",{className:d("text-[10px] text-white/70 uppercase",o?.memberSubtitleTypography),children:e.subtitle})]}),c.length>0&&t.jsx("div",{className:"bg-black/30 px-2 py-2",children:t.jsx("div",{className:d("grid gap-1",(c.length<=3,"grid-cols-3")),children:c.map(m=>t.jsxs("div",{className:"flex flex-col items-center py-3",children:[t.jsx("span",{className:"text-base font-bold text-white leading-none",children:m.value}),t.jsx("span",{className:"text-[8px] font-medium text-white/60 uppercase tracking-wider mt-0.5",children:m.label})]},m.id))})})]})}function ni({members:e,groupByPosition:r=!0,positionGroups:o,display:n={showNumber:!0,showPosition:!0},header:a,styles:s}){const i=s?.groupHeaderTypography||si,l=s?.columns||4,u=lr[l]||lr[4];if(r){const c=Pt(e,o);return t.jsxs("div",{className:d(ie(s),"flex flex-col",de(s)),children:[a&&t.jsx("div",{className:le(s),children:a}),c.map(m=>t.jsxs("div",{className:"space-y-3",children:[t.jsx("div",{className:i,children:m.label}),t.jsx("div",{className:d("grid",u,ce(s)),children:m.members.map(p=>t.jsx(dr,{member:p,display:n,styles:s},p.id))})]},m.key))]})}return t.jsxs("div",{className:d(ie(s),"flex flex-col",de(s)),children:[a&&t.jsx("div",{className:le(s),children:a}),t.jsx("div",{className:d("grid",u,ce(s)),children:e.map(c=>t.jsx(dr,{member:c,display:n,styles:s},c.id))})]})}function ai({variant:e="card",...r}){switch(e){case"detailed":return t.jsx(oi,{...r});case"portrait":return t.jsx(ni,{...r});case"card":default:return t.jsx(Ja,{...r})}}exports.Badge=gt;exports.BadgeGroup=xt;exports.BarItem=Yr;exports.BettingOdds=_r;exports.CTAButton=ns;exports.CTAGroup=$e;exports.ComparisonItem=qr;exports.CompetitorProfileBlock=ga;exports.ContentCard=q;exports.ContentListBlock=Ca;exports.Countdown=yr;exports.DefaultStatItem=Dr;exports.EntityDisplay=G;exports.FORM_INDICATOR_DEFAULT_LABELS=kt;exports.FeaturedContentBlock=Oa;exports.FormIndicator=ke;exports.HeadToHeadBlock=ra;exports.HeadToHeadItem=Zr;exports.HeroCard=Cr;exports.HorizontalStatItem=$r;exports.InlineScore=Pr;exports.MatchListBlock=Za;exports.MatchScore=z;exports.MatchupHeader=At;exports.MinimalCard=Mr;exports.Pagination=jt;exports.ProfileHeader=Se;exports.PromoCard=Lr;exports.ScoreCard=Ir;exports.ScoreLine=zr;exports.SectionHeader=R;exports.SquadBlock=ai;exports.StackedStatItem=Er;exports.StandardCard=Tr;exports.StatItem=Gr;exports.StatsGrid=re;exports.StatsHeadToHead=Ct;exports.StatsTable=xn;exports.Tooltip=be;exports.cn=d;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|