fansunited-sports-ui 0.0.2 → 0.0.3
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.d.ts +15 -3
- package/dist/index.es.js +748 -752
- 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"),ao=require("react-dom"),io=(e,r)=>{const o=new Array(e.length+r.length);for(let s=0;s<e.length;s++)o[s]=e[s];for(let s=0;s<r.length;s++)o[e.length+s]=r[s];return o},lo=(e,r)=>({classGroupId:e,validator:r}),sr=(e=new Map,r=null,o)=>({nextPart:e,validators:r,classGroupId:o}),Ie="-",_t=[],co="arbitrary..",uo=e=>{const r=po(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:s}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return mo(i);const l=i.split(Ie),u=l[0]===""&&l.length>1?1:0;return nr(l,u,r)},getConflictingClassGroupIds:(i,l)=>{if(l){const u=s[i],c=o[i];return u?c?io(c,u):u:c||_t}return o[i]||_t}}},nr=(e,r,o)=>{if(e.length-r===0)return o.classGroupId;const a=e[r],n=o.nextPart.get(a);if(n){const c=nr(e,r+1,n);if(c)return c}const i=o.validators;if(i===null)return;const l=r===0?e.join(Ie):e.slice(r).join(Ie),u=i.length;for(let c=0;c<u;c++){const m=i[c];if(m.validator(l))return m.classGroupId}},mo=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const r=e.slice(1,-1),o=r.indexOf(":"),s=r.slice(0,o);return s?co+s:void 0})(),po=e=>{const{theme:r,classGroups:o}=e;return go(o,r)},go=(e,r)=>{const o=sr();for(const s in e){const a=e[s];ct(a,o,s,r)}return o},ct=(e,r,o,s)=>{const a=e.length;for(let n=0;n<a;n++){const i=e[n];xo(i,r,o,s)}},xo=(e,r,o,s)=>{if(typeof e=="string"){ho(e,r,o);return}if(typeof e=="function"){fo(e,r,o,s);return}bo(e,r,o,s)},ho=(e,r,o)=>{const s=e===""?r:ar(r,e);s.classGroupId=o},fo=(e,r,o,s)=>{if(jo(e)){ct(e(s),r,o,s);return}r.validators===null&&(r.validators=[]),r.validators.push(lo(o,e))},bo=(e,r,o,s)=>{const a=Object.entries(e),n=a.length;for(let i=0;i<n;i++){const[l,u]=a[i];ct(u,ar(r,l),o,s)}},ar=(e,r)=>{let o=e;const s=r.split(Ie),a=s.length;for(let n=0;n<a;n++){const i=s[n];let l=o.nextPart.get(i);l||(l=sr(),o.nextPart.set(i,l)),o=l}return o},jo=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,vo=e=>{if(e<1)return{get:()=>{},set:()=>{}};let r=0,o=Object.create(null),s=Object.create(null);const a=(n,i)=>{o[n]=i,r++,r>e&&(r=0,s=o,o=Object.create(null))};return{get(n){let i=o[n];if(i!==void 0)return i;if((i=s[n])!==void 0)return a(n,i),i},set(n,i){n in o?o[n]=i:a(n,i)}}},lt="!",Pt=":",wo=[],Dt=(e,r,o,s,a)=>({modifiers:e,hasImportantModifier:r,baseClassName:o,maybePostfixModifierPosition:s,isExternal:a}),yo=e=>{const{prefix:r,experimentalParseClassName:o}=e;let s=a=>{const n=[];let i=0,l=0,u=0,c;const m=a.length;for(let v=0;v<m;v++){const N=a[v];if(i===0&&l===0){if(N===Pt){n.push(a.slice(u,v)),u=v+1;continue}if(N==="/"){c=v;continue}}N==="["?i++:N==="]"?i--:N==="("?l++:N===")"&&l--}const p=n.length===0?a:a.slice(u);let f=p,w=!1;p.endsWith(lt)?(f=p.slice(0,-1),w=!0):p.startsWith(lt)&&(f=p.slice(1),w=!0);const S=c&&c>u?c-u:void 0;return Dt(n,w,f,S)};if(r){const a=r+Pt,n=s;s=i=>i.startsWith(a)?n(i.slice(a.length)):Dt(wo,!1,i,void 0,!0)}if(o){const a=s;s=n=>o({className:n,parseClassName:a})}return s},No=e=>{const r=new Map;return e.orderSensitiveModifiers.forEach((o,s)=>{r.set(o,1e6+s)}),o=>{const s=[];let a=[];for(let n=0;n<o.length;n++){const i=o[n],l=i[0]==="[",u=r.has(i);l||u?(a.length>0&&(a.sort(),s.push(...a),a=[]),s.push(i)):a.push(i)}return a.length>0&&(a.sort(),s.push(...a)),s}},Co=e=>({cache:vo(e.cacheSize),parseClassName:yo(e),sortModifiers:No(e),...uo(e)}),ko=/\s+/,So=(e,r)=>{const{parseClassName:o,getClassGroupId:s,getConflictingClassGroupIds:a,sortModifiers:n}=r,i=[],l=e.trim().split(ko);let u="";for(let c=l.length-1;c>=0;c-=1){const m=l[c],{isExternal:p,modifiers:f,hasImportantModifier:w,baseClassName:S,maybePostfixModifierPosition:v}=o(m);if(p){u=m+(u.length>0?" "+u:u);continue}let N=!!v,b=s(N?S.substring(0,v):S);if(!b){if(!N){u=m+(u.length>0?" "+u:u);continue}if(b=s(S),!b){u=m+(u.length>0?" "+u:u);continue}N=!1}const h=f.length===0?"":f.length===1?f[0]:n(f).join(":"),k=w?h+lt:h,R=k+b;if(i.indexOf(R)>-1)continue;i.push(R);const M=a(b,N);for(let P=0;P<M.length;++P){const E=M[P];i.push(k+E)}u=m+(u.length>0?" "+u:u)}return u},Ao=(...e)=>{let r=0,o,s,a="";for(;r<e.length;)(o=e[r++])&&(s=ir(o))&&(a&&(a+=" "),a+=s);return a},ir=e=>{if(typeof e=="string")return e;let r,o="";for(let s=0;s<e.length;s++)e[s]&&(r=ir(e[s]))&&(o&&(o+=" "),o+=r);return o},Ro=(e,...r)=>{let o,s,a,n;const i=u=>{const c=r.reduce((m,p)=>p(m),e());return o=Co(c),s=o.cache.get,a=o.cache.set,n=l,l(u)},l=u=>{const c=s(u);if(c)return c;const m=So(u,o);return a(u,m),m};return n=i,(...u)=>n(Ao(...u))},To=[],L=e=>{const r=o=>o[e]||To;return r.isThemeGetter=!0,r},lr=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,dr=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Lo=/^\d+\/\d+$/,Mo=/^(\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$/,Io=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,_o=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Po=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ee=e=>Lo.test(e),C=e=>!!e&&!Number.isNaN(Number(e)),q=e=>!!e&&Number.isInteger(Number(e)),et=e=>e.endsWith("%")&&C(e.slice(0,-1)),H=e=>Mo.test(e),Do=()=>!0,Oo=e=>zo.test(e)&&!Io.test(e),cr=()=>!1,Bo=e=>_o.test(e),Eo=e=>Po.test(e),$o=e=>!g(e)&&!x(e),Go=e=>oe(e,pr,cr),g=e=>lr.test(e),K=e=>oe(e,gr,Oo),tt=e=>oe(e,Fo,C),Ot=e=>oe(e,ur,cr),Wo=e=>oe(e,mr,Eo),Ae=e=>oe(e,xr,Bo),x=e=>dr.test(e),le=e=>se(e,gr),Ho=e=>se(e,Yo),Bt=e=>se(e,ur),Vo=e=>se(e,pr),Uo=e=>se(e,mr),Re=e=>se(e,xr,!0),oe=(e,r,o)=>{const s=lr.exec(e);return s?s[1]?r(s[1]):o(s[2]):!1},se=(e,r,o=!1)=>{const s=dr.exec(e);return s?s[1]?r(s[1]):o:!1},ur=e=>e==="position"||e==="percentage",mr=e=>e==="image"||e==="url",pr=e=>e==="length"||e==="size"||e==="bg-size",gr=e=>e==="length",Fo=e=>e==="number",Yo=e=>e==="family-name",xr=e=>e==="shadow",qo=()=>{const e=L("color"),r=L("font"),o=L("text"),s=L("font-weight"),a=L("tracking"),n=L("leading"),i=L("breakpoint"),l=L("container"),u=L("spacing"),c=L("radius"),m=L("shadow"),p=L("inset-shadow"),f=L("text-shadow"),w=L("drop-shadow"),S=L("blur"),v=L("perspective"),N=L("aspect"),b=L("ease"),h=L("animate"),k=()=>["auto","avoid","all","avoid-page","page","left","right","column"],R=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],M=()=>[...R(),x,g],P=()=>["auto","hidden","clip","visible","scroll"],E=()=>["auto","contain","none"],j=()=>[x,g,u],_=()=>[ee,"full","auto",...j()],ve=()=>[q,"none","subgrid",x,g],we=()=>["auto",{span:["full",q,x,g]},q,x,g],ye=()=>[q,"auto",x,g],Rt=()=>["auto","min","max","fr",x,g],Xe=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],J=()=>["start","end","center","stretch","center-safe","end-safe"],W=()=>["auto",...j()],Z=()=>[ee,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...j()],y=()=>[e,x,g],Tt=()=>[...R(),Bt,Ot,{position:[x,g]}],Lt=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Mt=()=>["auto","cover","contain",Vo,Go,{size:[x,g]}],Qe=()=>[et,le,K],D=()=>["","none","full",c,x,g],B=()=>["",C,le,K],Ne=()=>["solid","dashed","dotted","double"],zt=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],z=()=>[C,et,Bt,Ot],It=()=>["","none",S,x,g],Ce=()=>["none",C,x,g],ke=()=>["none",C,x,g],Je=()=>[C,x,g],Se=()=>[ee,"full",...j()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[H],breakpoint:[H],color:[Do],container:[H],"drop-shadow":[H],ease:["in","out","in-out"],font:[$o],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[H],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[H],shadow:[H],spacing:["px",C],text:[H],"text-shadow":[H],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ee,g,x,N]}],container:["container"],columns:[{columns:[C,g,x,l]}],"break-after":[{"break-after":k()}],"break-before":[{"break-before":k()}],"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:M()}],overflow:[{overflow:P()}],"overflow-x":[{"overflow-x":P()}],"overflow-y":[{"overflow-y":P()}],overscroll:[{overscroll:E()}],"overscroll-x":[{"overscroll-x":E()}],"overscroll-y":[{"overscroll-y":E()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:_()}],"inset-x":[{"inset-x":_()}],"inset-y":[{"inset-y":_()}],start:[{start:_()}],end:[{end:_()}],top:[{top:_()}],right:[{right:_()}],bottom:[{bottom:_()}],left:[{left:_()}],visibility:["visible","invisible","collapse"],z:[{z:[q,"auto",x,g]}],basis:[{basis:[ee,"full","auto",l,...j()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[C,ee,"auto","initial","none",g]}],grow:[{grow:["",C,x,g]}],shrink:[{shrink:["",C,x,g]}],order:[{order:[q,"first","last","none",x,g]}],"grid-cols":[{"grid-cols":ve()}],"col-start-end":[{col:we()}],"col-start":[{"col-start":ye()}],"col-end":[{"col-end":ye()}],"grid-rows":[{"grid-rows":ve()}],"row-start-end":[{row:we()}],"row-start":[{"row-start":ye()}],"row-end":[{"row-end":ye()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Rt()}],"auto-rows":[{"auto-rows":Rt()}],gap:[{gap:j()}],"gap-x":[{"gap-x":j()}],"gap-y":[{"gap-y":j()}],"justify-content":[{justify:[...Xe(),"normal"]}],"justify-items":[{"justify-items":[...J(),"normal"]}],"justify-self":[{"justify-self":["auto",...J()]}],"align-content":[{content:["normal",...Xe()]}],"align-items":[{items:[...J(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...J(),{baseline:["","last"]}]}],"place-content":[{"place-content":Xe()}],"place-items":[{"place-items":[...J(),"baseline"]}],"place-self":[{"place-self":["auto",...J()]}],p:[{p:j()}],px:[{px:j()}],py:[{py:j()}],ps:[{ps:j()}],pe:[{pe:j()}],pt:[{pt:j()}],pr:[{pr:j()}],pb:[{pb:j()}],pl:[{pl:j()}],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":j()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":j()}],"space-y-reverse":["space-y-reverse"],size:[{size:Z()}],w:[{w:[l,"screen",...Z()]}],"min-w":[{"min-w":[l,"screen","none",...Z()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[i]},...Z()]}],h:[{h:["screen","lh",...Z()]}],"min-h":[{"min-h":["screen","lh","none",...Z()]}],"max-h":[{"max-h":["screen","lh",...Z()]}],"font-size":[{text:["base",o,le,K]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,x,tt]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",et,g]}],"font-family":[{font:[Ho,g,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,x,g]}],"line-clamp":[{"line-clamp":[C,"none",x,tt]}],leading:[{leading:[n,...j()]}],"list-image":[{"list-image":["none",x,g]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",x,g]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:y()}],"text-color":[{text:y()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Ne(),"wavy"]}],"text-decoration-thickness":[{decoration:[C,"from-font","auto",x,K]}],"text-decoration-color":[{decoration:y()}],"underline-offset":[{"underline-offset":[C,"auto",x,g]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:j()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",x,g]}],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",x,g]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Tt()}],"bg-repeat":[{bg:Lt()}],"bg-size":[{bg:Mt()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},q,x,g],radial:["",x,g],conic:[q,x,g]},Uo,Wo]}],"bg-color":[{bg:y()}],"gradient-from-pos":[{from:Qe()}],"gradient-via-pos":[{via:Qe()}],"gradient-to-pos":[{to:Qe()}],"gradient-from":[{from:y()}],"gradient-via":[{via:y()}],"gradient-to":[{to:y()}],rounded:[{rounded:D()}],"rounded-s":[{"rounded-s":D()}],"rounded-e":[{"rounded-e":D()}],"rounded-t":[{"rounded-t":D()}],"rounded-r":[{"rounded-r":D()}],"rounded-b":[{"rounded-b":D()}],"rounded-l":[{"rounded-l":D()}],"rounded-ss":[{"rounded-ss":D()}],"rounded-se":[{"rounded-se":D()}],"rounded-ee":[{"rounded-ee":D()}],"rounded-es":[{"rounded-es":D()}],"rounded-tl":[{"rounded-tl":D()}],"rounded-tr":[{"rounded-tr":D()}],"rounded-br":[{"rounded-br":D()}],"rounded-bl":[{"rounded-bl":D()}],"border-w":[{border:B()}],"border-w-x":[{"border-x":B()}],"border-w-y":[{"border-y":B()}],"border-w-s":[{"border-s":B()}],"border-w-e":[{"border-e":B()}],"border-w-t":[{"border-t":B()}],"border-w-r":[{"border-r":B()}],"border-w-b":[{"border-b":B()}],"border-w-l":[{"border-l":B()}],"divide-x":[{"divide-x":B()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":B()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Ne(),"hidden","none"]}],"divide-style":[{divide:[...Ne(),"hidden","none"]}],"border-color":[{border:y()}],"border-color-x":[{"border-x":y()}],"border-color-y":[{"border-y":y()}],"border-color-s":[{"border-s":y()}],"border-color-e":[{"border-e":y()}],"border-color-t":[{"border-t":y()}],"border-color-r":[{"border-r":y()}],"border-color-b":[{"border-b":y()}],"border-color-l":[{"border-l":y()}],"divide-color":[{divide:y()}],"outline-style":[{outline:[...Ne(),"none","hidden"]}],"outline-offset":[{"outline-offset":[C,x,g]}],"outline-w":[{outline:["",C,le,K]}],"outline-color":[{outline:y()}],shadow:[{shadow:["","none",m,Re,Ae]}],"shadow-color":[{shadow:y()}],"inset-shadow":[{"inset-shadow":["none",p,Re,Ae]}],"inset-shadow-color":[{"inset-shadow":y()}],"ring-w":[{ring:B()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:y()}],"ring-offset-w":[{"ring-offset":[C,K]}],"ring-offset-color":[{"ring-offset":y()}],"inset-ring-w":[{"inset-ring":B()}],"inset-ring-color":[{"inset-ring":y()}],"text-shadow":[{"text-shadow":["none",f,Re,Ae]}],"text-shadow-color":[{"text-shadow":y()}],opacity:[{opacity:[C,x,g]}],"mix-blend":[{"mix-blend":[...zt(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":zt()}],"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":z()}],"mask-image-linear-to-pos":[{"mask-linear-to":z()}],"mask-image-linear-from-color":[{"mask-linear-from":y()}],"mask-image-linear-to-color":[{"mask-linear-to":y()}],"mask-image-t-from-pos":[{"mask-t-from":z()}],"mask-image-t-to-pos":[{"mask-t-to":z()}],"mask-image-t-from-color":[{"mask-t-from":y()}],"mask-image-t-to-color":[{"mask-t-to":y()}],"mask-image-r-from-pos":[{"mask-r-from":z()}],"mask-image-r-to-pos":[{"mask-r-to":z()}],"mask-image-r-from-color":[{"mask-r-from":y()}],"mask-image-r-to-color":[{"mask-r-to":y()}],"mask-image-b-from-pos":[{"mask-b-from":z()}],"mask-image-b-to-pos":[{"mask-b-to":z()}],"mask-image-b-from-color":[{"mask-b-from":y()}],"mask-image-b-to-color":[{"mask-b-to":y()}],"mask-image-l-from-pos":[{"mask-l-from":z()}],"mask-image-l-to-pos":[{"mask-l-to":z()}],"mask-image-l-from-color":[{"mask-l-from":y()}],"mask-image-l-to-color":[{"mask-l-to":y()}],"mask-image-x-from-pos":[{"mask-x-from":z()}],"mask-image-x-to-pos":[{"mask-x-to":z()}],"mask-image-x-from-color":[{"mask-x-from":y()}],"mask-image-x-to-color":[{"mask-x-to":y()}],"mask-image-y-from-pos":[{"mask-y-from":z()}],"mask-image-y-to-pos":[{"mask-y-to":z()}],"mask-image-y-from-color":[{"mask-y-from":y()}],"mask-image-y-to-color":[{"mask-y-to":y()}],"mask-image-radial":[{"mask-radial":[x,g]}],"mask-image-radial-from-pos":[{"mask-radial-from":z()}],"mask-image-radial-to-pos":[{"mask-radial-to":z()}],"mask-image-radial-from-color":[{"mask-radial-from":y()}],"mask-image-radial-to-color":[{"mask-radial-to":y()}],"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":R()}],"mask-image-conic-pos":[{"mask-conic":[C]}],"mask-image-conic-from-pos":[{"mask-conic-from":z()}],"mask-image-conic-to-pos":[{"mask-conic-to":z()}],"mask-image-conic-from-color":[{"mask-conic-from":y()}],"mask-image-conic-to-color":[{"mask-conic-to":y()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Tt()}],"mask-repeat":[{mask:Lt()}],"mask-size":[{mask:Mt()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",x,g]}],filter:[{filter:["","none",x,g]}],blur:[{blur:It()}],brightness:[{brightness:[C,x,g]}],contrast:[{contrast:[C,x,g]}],"drop-shadow":[{"drop-shadow":["","none",w,Re,Ae]}],"drop-shadow-color":[{"drop-shadow":y()}],grayscale:[{grayscale:["",C,x,g]}],"hue-rotate":[{"hue-rotate":[C,x,g]}],invert:[{invert:["",C,x,g]}],saturate:[{saturate:[C,x,g]}],sepia:[{sepia:["",C,x,g]}],"backdrop-filter":[{"backdrop-filter":["","none",x,g]}],"backdrop-blur":[{"backdrop-blur":It()}],"backdrop-brightness":[{"backdrop-brightness":[C,x,g]}],"backdrop-contrast":[{"backdrop-contrast":[C,x,g]}],"backdrop-grayscale":[{"backdrop-grayscale":["",C,x,g]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[C,x,g]}],"backdrop-invert":[{"backdrop-invert":["",C,x,g]}],"backdrop-opacity":[{"backdrop-opacity":[C,x,g]}],"backdrop-saturate":[{"backdrop-saturate":[C,x,g]}],"backdrop-sepia":[{"backdrop-sepia":["",C,x,g]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":j()}],"border-spacing-x":[{"border-spacing-x":j()}],"border-spacing-y":[{"border-spacing-y":j()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",x,g]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[C,"initial",x,g]}],ease:[{ease:["linear","initial",b,x,g]}],delay:[{delay:[C,x,g]}],animate:[{animate:["none",h,x,g]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[v,x,g]}],"perspective-origin":[{"perspective-origin":M()}],rotate:[{rotate:Ce()}],"rotate-x":[{"rotate-x":Ce()}],"rotate-y":[{"rotate-y":Ce()}],"rotate-z":[{"rotate-z":Ce()}],scale:[{scale:ke()}],"scale-x":[{"scale-x":ke()}],"scale-y":[{"scale-y":ke()}],"scale-z":[{"scale-z":ke()}],"scale-3d":["scale-3d"],skew:[{skew:Je()}],"skew-x":[{"skew-x":Je()}],"skew-y":[{"skew-y":Je()}],transform:[{transform:[x,g,"","none","gpu","cpu"]}],"transform-origin":[{origin:M()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Se()}],"translate-x":[{"translate-x":Se()}],"translate-y":[{"translate-y":Se()}],"translate-z":[{"translate-z":Se()}],"translate-none":["translate-none"],accent:[{accent:y()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:y()}],"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",x,g]}],"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":j()}],"scroll-mx":[{"scroll-mx":j()}],"scroll-my":[{"scroll-my":j()}],"scroll-ms":[{"scroll-ms":j()}],"scroll-me":[{"scroll-me":j()}],"scroll-mt":[{"scroll-mt":j()}],"scroll-mr":[{"scroll-mr":j()}],"scroll-mb":[{"scroll-mb":j()}],"scroll-ml":[{"scroll-ml":j()}],"scroll-p":[{"scroll-p":j()}],"scroll-px":[{"scroll-px":j()}],"scroll-py":[{"scroll-py":j()}],"scroll-ps":[{"scroll-ps":j()}],"scroll-pe":[{"scroll-pe":j()}],"scroll-pt":[{"scroll-pt":j()}],"scroll-pr":[{"scroll-pr":j()}],"scroll-pb":[{"scroll-pb":j()}],"scroll-pl":[{"scroll-pl":j()}],"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",x,g]}],fill:[{fill:["none",...y()]}],"stroke-w":[{stroke:[C,le,K,tt]}],stroke:[{stroke:["none",...y()]}],"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"]}},Zo=Ro(qo);function d(...e){return Zo(e.filter(Boolean).join(" "))}const Ko={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 ut({badge:e}){const r=e.variant||"default",o=r==="custom",s=Ko[r],a=e.styles?.container,n=o?a:d("inline-block text-xs font-semibold px-2 sm:px-3 py-1 rounded border",s,a);return t.jsx("span",{role:"status","aria-label":e.text,className:n,children:e.text})}const Xo={"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 mt({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(s=>{const a=e.filter(n=>n.position===s);return a.length===0?null:t.jsx("div",{className:d(Xo[s],o?.container),role:"group","aria-label":`${s} badges`,children:a.map((n,i)=>t.jsx(ut,{badge:n},`${s}-${i}`))},s)})})}const Qo={gap:{none:"gap-0",sm:"gap-1",md:"gap-2",lg:"gap-3",xl:"gap-4"}},pt={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 Jo(e){return`${e?.cell??pt.cell} flex min-w-12 text-center items-center justify-center`}function es(e){return Qo.gap[e?.gap??pt.gap]}function Et(e,r){return r?.typography?.[e]??pt.typography[e]}const Te={days:"Days",hours:"Hours",minutes:"Mins",seconds:"Secs"};function $t(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 hr({targetDate:e,styles:r,labels:o}){const s=A.useMemo(()=>typeof e=="string"?new Date(e):e,[e]),[a,n]=A.useState($t(s)),i=Jo(r),l=es(r),u=Et("value",r),c=Et("label",r),m={days:o?.days??Te.days,hours:o?.hours??Te.hours,minutes:o?.minutes??Te.minutes,seconds:o?.seconds??Te.seconds};return A.useEffect(()=>{const p=setInterval(()=>{n($t(s))},1e3);return()=>clearInterval(p)},[s]),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 ts={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 rs({cta:e}){const r=e.variant==="custom",o=ts[e.variant||"default"],s=e.styles?.container,a=r?s: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",o,s),n=i=>{e.onClick&&(i.preventDefault(),i.stopPropagation(),e.onClick())};return e.href?t.jsx("a",{href:e.href,className:a,onClick:n,role:"link","aria-label":e.text,children:e.text}):t.jsx("button",{type:"button",className:a,onClick:n,"aria-label":e.text,children:e.text})}const os={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 Oe({primaryCta:e,secondaryCta:r,layout:o="responsive",styles:s}){return!e&&!r?null:t.jsxs("div",{role:"group","aria-label":"Call to action buttons",className:d(os[o],s?.container),children:[e,r]})}const ss={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"},ns={1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4"},as={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl",full:"rounded-full"};function $({name:e,mobileName:r,imageUrl:o,subtitle:s,orientation:a="ltr",truncate:n=!1,styles:i}){const l=i?.imageSize||"md",u=i?.imageBorderRadius||"md",c=i?.imageBorder||"",m=i?.gap||"2",p=i?.textAlign||"left",f=ss[l],w=as[u],S=ns[m],v=i?.typography?.name||"font-semibold leading-5",N=i?.typography?.subtitle||"text-xs text-muted-foreground",b=a==="rtl"?"flex-row-reverse":"flex-row",h=p==="right"?"text-right":"text-left";return t.jsxs("div",{className:d("flex items-center",b,S,i?.container),role:"group","aria-label":`${e}${s?` - ${s}`:""}`,children:[o&&t.jsx("img",{src:o,alt:"","aria-hidden":"true",className:d(f,w,"object-cover shrink-0",c)}),t.jsxs("div",{className:d("flex flex-col",h,n&&"min-w-0"),children:[r?t.jsxs("span",{className:d(v,n&&"truncate"),children:[t.jsx("span",{className:"sm:hidden",children:r}),t.jsx("span",{className:"hidden sm:inline",children:e})]}):t.jsx("span",{className:d(v,n&&"truncate"),children:e}),s&&t.jsx("span",{className:d(N,n&&"truncate"),children:s})]})]})}const ne={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"}},Be={sm:"gap-1",md:"gap-2",lg:"gap-3"},Ee={previous:"Previous",next:"Next",first:"First",last:"Last",loadMore:"Load More",pageInfo:"Page {current} of {total}"},gt=({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"})}),xt=({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"})}),is=({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"})}),ls=({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 V({onClick:e,disabled:r,active:o,size:s,styles:a,children:n,ariaLabel:i}){const l=ne[s],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:n})}function ds(e,r,o){if(r<=o)return Array.from({length:r},(l,u)=>u+1);const s=Math.floor(o/2);let a=Math.max(1,e-s),n=Math.min(r,a+o-1);n-a+1<o&&(a=Math.max(1,n-o+1));const i=[];a>1&&(i.push(1),a>2&&i.push("ellipsis"));for(let l=a;l<=n;l++)l!==1&&l!==r&&i.push(l);return n<r&&(n<r-1&&i.push("ellipsis"),i.push(r)),i}function cs({currentPage:e,totalPages:r,onPageChange:o,disabled:s,size:a="md",icons:n,labels:i,styles:l,maxVisiblePages:u=5,showFirstLast:c=!1,showPrevNext:m=!0}){const p=ne[a],f={...Ee,...i},w=ds(e,r,u),S=Be[l?.gap||"sm"];return t.jsxs("nav",{className:d("flex items-center",S,l?.container),"aria-label":"Pagination",children:[c&&t.jsx(V,{onClick:()=>o(1),disabled:s||e===1,size:a,styles:l,ariaLabel:f.first,children:n?.first||t.jsx(is,{className:p.icon})}),m&&t.jsx(V,{onClick:()=>o(e-1),disabled:s||e===1,size:a,styles:l,ariaLabel:f.previous,children:n?.previous||t.jsx(gt,{className:p.icon})}),w.map((v,N)=>v==="ellipsis"?t.jsx("span",{className:"px-2 text-muted-foreground",children:"..."},`ellipsis-${N}`):t.jsx(V,{onClick:()=>o(v),disabled:s,active:v===e,size:a,styles:l,ariaLabel:`Page ${v}`,children:v},v)),m&&t.jsx(V,{onClick:()=>o(e+1),disabled:s||e===r,size:a,styles:l,ariaLabel:f.next,children:n?.next||t.jsx(xt,{className:p.icon})}),c&&t.jsx(V,{onClick:()=>o(r),disabled:s||e===r,size:a,styles:l,ariaLabel:f.last,children:n?.last||t.jsx(ls,{className:p.icon})})]})}function us({currentPage:e,totalPages:r,onPageChange:o,disabled:s,size:a="md",icons:n,labels:i,styles:l,showLabels:u=!0}){const c=ne[a],m={...Ee,...i},p=Be[l?.gap||"md"];return t.jsxs("nav",{className:d("flex items-center",p,l?.container),"aria-label":"Pagination",children:[t.jsxs(V,{onClick:()=>o(e-1),disabled:s||e===1,size:a,styles:l,ariaLabel:m.previous,children:[n?.previous||t.jsx(gt,{className:c.icon}),u&&t.jsx("span",{className:"ml-1",children:m.previous})]}),t.jsxs(V,{onClick:()=>o(e+1),disabled:s||e===r,size:a,styles:l,ariaLabel:m.next,children:[u&&t.jsx("span",{className:"mr-1",children:m.next}),n?.next||t.jsx(xt,{className:c.icon})]})]})}function ms({currentPage:e,totalPages:r,onPageChange:o,disabled:s,size:a="md",icons:n,labels:i,styles:l}){const u=ne[a],c={...Ee,...i},m=Be[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(V,{onClick:()=>o(e-1),disabled:s||e===1,size:a,styles:l,ariaLabel:c.previous,children:n?.previous||t.jsx(gt,{className:u.icon})}),t.jsx("span",{className:d("px-2",l?.typography?.pageInfo||"text-sm text-muted-foreground"),children:p}),t.jsx(V,{onClick:()=>o(e+1),disabled:s||e===r,size:a,styles:l,ariaLabel:c.next,children:n?.next||t.jsx(xt,{className:u.icon})})]})}function ps({currentPage:e,totalPages:r,onPageChange:o,disabled:s,size:a="md",styles:n}){const i=ne[a],l=Be[n?.gap||"sm"];return t.jsx("nav",{className:d("flex items-center",l,n?.container),"aria-label":"Pagination",children:Array.from({length:r},(u,c)=>c+1).map(u=>t.jsx("button",{type:"button",onClick:()=>o(u),disabled:s,"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",s?"opacity-50 cursor-not-allowed":"cursor-pointer",u===e?"bg-primary-500":"bg-muted hover:bg-muted-foreground/50")},u))})}function gs({totalPages:e,onPageChange:r,disabled:o,size:s="md",labels:a,styles:n,loading:i=!1,loadingLabel:l="Loading..."}){const u=ne[s],c={...Ee,...a},m=o||i||e<=1;return t.jsx("nav",{className:d("flex items-center justify-center",n?.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",n?.typography?.button),children:i?l:c.loadMore})})}function ht(e){switch(e.variant){case"numbered":return t.jsx(cs,{...e});case"simple":return t.jsx(us,{...e});case"compact":return t.jsx(ms,{...e});case"dots":return t.jsx(ps,{...e});case"load-more":return t.jsx(gs,{...e});default:return null}}function de({content:e,children:r,position:o="top",styles:s}){const[a,n]=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 h=u.current.getBoundingClientRect();switch(o){case"top":return{top:h.top-8,left:h.left+h.width/2};case"bottom":return{top:h.bottom+8,left:h.left+h.width/2};case"left":return{top:h.top+h.height/2,left:h.left-8};case"right":return{top:h.top+h.height/2,left:h.right+8};default:return{top:0,left:0}}},p=()=>{l(m()),n(!0)},f=()=>{n(!1)},w=()=>{l(m()),n(!0)},S=()=>{n(!1)},v={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"},N={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"},b=a&&t.jsx("div",{id:c,role:"tooltip","aria-hidden":!a,className:d("fixed z-9999 pointer-events-none",v[o],s?.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",N[o]),"aria-hidden":"true"})]})});return t.jsxs(t.Fragment,{children:[t.jsx("div",{ref:u,className:"inline-block",onMouseEnter:p,onMouseLeave:f,onFocus:w,onBlur:S,"aria-describedby":a?c:void 0,children:r}),typeof document<"u"&&ao.createPortal(b,document.body)]})}function $e(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 ce={borderRadius:"lg",shadow:"none",hoverShadow:"md",padding:"md",borderWidth:"1"},ue={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"}},rt={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 fr(e){const r=e?.borderRadius||ce.borderRadius;return ue.borderRadius[r]}function xs(e){const r=e?.shadow||ce.shadow;return ue.shadow[r]}function hs(e){if(!(e?.hoverable??!0))return"";const o=e?.hoverShadow||ce.hoverShadow;return ue.hoverShadow[o]}function fs(e){const r=e?.padding||ce.padding;return ue.padding[r]}function bs(e){const r=e?.borderWidth||ce.borderWidth;return ue.borderWidth[r]}function js(e){return e?.borderColor||"border-border"}function U(e,r,o){return r?.typography?.[e]?r.typography[e]:e==="title"&&o&&o in rt.title?rt.title[o]:rt[e]}function vs(e){const r=[fr(e),xs(e),hs(e),bs(e),js(e)];return e?.container&&r.push(e.container),r.filter(Boolean).join(" ")}function ws(e){const r=[fr(e)];return e?.imageContainer&&r.push(e.imageContainer),r.filter(Boolean).join(" ")}function ys(e){return e?.background||""}const Ns={standard:{imageAspectRatio:"16/9"},standardHorizontal:{imageAspectRatio:"16/9"},hero:{imageAspectRatio:"16/9"},minimal:{imageAspectRatio:"1/1"},promo:{imageAspectRatio:"16/9"}};function me(e,r="standard"){return A.useMemo(()=>{const o=Ns[r],s=e?.imageAspectRatio||o.imageAspectRatio;return{container:vs(e),imageContainer:ws(e),padding:fs(e),background:ys(e),imageAspectRatio:s,typography:{title:U("title",e,r),subtitle:U("subtitle",e),description:U("description",e),category:U("category",e),metadata:U("metadata",e)},isHoverable:e?.hoverable??!0}},[e,r])}function br({content:e,styles:r,primaryCta:o,secondaryCta:s,matchScore:a}){const n=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}=$e(e),c=me(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:[n?t.jsx("img",{src:n,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"}),n&&t.jsx("div",{className:"absolute inset-0 z-0",style:{background:i}}),t.jsx(mt,{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(ut,{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(Oe,{primaryCta:o,secondaryCta:s,layout:"responsive",styles:{container:"mt-4"}})]})})]})})}const Cs=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),ks=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(r,o,s)=>s?s.toUpperCase():o.toLowerCase()),Gt=e=>{const r=ks(e);return r.charAt(0).toUpperCase()+r.slice(1)},jr=(...e)=>e.filter((r,o,s)=>!!r&&r.trim()!==""&&s.indexOf(r)===o).join(" ").trim(),Ss=e=>{for(const r in e)if(r.startsWith("aria-")||r==="role"||r==="title")return!0};var As={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 Rs=A.forwardRef(({color:e="currentColor",size:r=24,strokeWidth:o=2,absoluteStrokeWidth:s,className:a="",children:n,iconNode:i,...l},u)=>A.createElement("svg",{ref:u,...As,width:r,height:r,stroke:e,strokeWidth:s?Number(o)*24/Number(r):o,className:jr("lucide",a),...!n&&!Ss(l)&&{"aria-hidden":"true"},...l},[...i.map(([c,m])=>A.createElement(c,m)),...Array.isArray(n)?n:[n]]));const Ge=(e,r)=>{const o=A.forwardRef(({className:s,...a},n)=>A.createElement(Rs,{ref:n,iconNode:r,className:jr(`lucide-${Cs(Gt(e))}`,`lucide-${e}`,s),...a}));return o.displayName=Gt(e),o};const Ts=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Ls=Ge("check",Ts);const Ms=[["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=Ge("circle-play",Ms);const Is=[["path",{d:"M5 12h14",key:"1ays0h"}]],_s=Ge("minus",Is);const Ps=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ds=Ge("x",Ps),Os={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 vr({content:e,styles:r}){const o=r?.mainIconSize||"md",s=Os[o];return r?.mainIcon?t.jsx("div",{className:"absolute inset-0 flex items-center justify-center z-20",children:t.jsx("div",{className:s,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(s,"text-white opacity-90")})}):null}function wr({imageUrl:e,alt:r,aspectRatio:o,imageContainerClasses:s,content:a,styles:n,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",s),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(mt,{badges:a.badges,positions:l}),t.jsx(vr,{content:a,styles:n})]})}function yr({content:e,styles:r,isHoverable:o=!0,primaryCta:s,secondaryCta:a,ctaLayout:n="vertical",bettingOdds:i,matchScore:l}){const u=U("title",r,"compact"),c=U("category",r),m=U("description",r),p=U("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})]})]}),(s||a||i)&&t.jsxs("div",{className:"flex flex-col space-y-0",children:[(s||a)&&t.jsxs("div",{className:d("flex mt-4",n==="horizontal"?"flex-col sm:flex-row gap-2 sm:gap-3":"flex-col gap-2"),children:[s&&t.jsx("div",{className:n==="horizontal"?"w-full sm:w-auto":"w-full",children:s}),a&&t.jsx("div",{className:n==="horizontal"?"w-full sm:w-auto":"w-full",children:a})]}),i&&t.jsx("div",{className:s||a?"mt-2":"mt-4",children:i})]})]})}function Nr({content:e,styles:r,primaryCta:o,secondaryCta:s,bettingOdds:a,matchScore:n}){const i=e.image?.url,{isClickable:l,handleClick:u}=$e(e),c=me(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(wr,{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(yr,{content:e,styles:r,isHoverable:c.isHoverable,primaryCta:o,secondaryCta:s,bettingOdds:a,matchScore:n})})]})}function Bs({content:e,styles:r,primaryCta:o,secondaryCta:s,bettingOdds:a,matchScore:n}){const i=e.image?.url,{isClickable:l,handleClick:u}=$e(e),c=me(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(wr,{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(yr,{content:e,styles:r,isHoverable:c.isHoverable,primaryCta:o,secondaryCta:s,ctaLayout:"horizontal",bettingOdds:a,matchScore:n})})]})}function Cr({content:e,styles:r,primaryCta:o,secondaryCta:s}){const a=e.coverImage?.url,n=!!e.gradient,i=e.textColor||"white",l=me(r,"promo");let u="",c={color:i};return l.background?u=l.background:a?c={backgroundImage:`url(${a})`,backgroundSize:"cover",backgroundPosition:"center",color:i}:n?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(hr,{targetDate:e.countdownTo})})]}),(o||s||e.disclaimer)&&t.jsxs("div",{className:"flex flex-col items-center md:items-end gap-3 shrink-0",children:[t.jsx(Oe,{primaryCta:o,secondaryCta:s,layout:"horizontal"}),e.disclaimer&&t.jsx("p",{className:"text-xs opacity-70",children:e.disclaimer})]})]})]})})}function kr({content:e,styles:r,primaryCta:o,secondaryCta:s,bettingOdds:a,matchScore:n}){const{isClickable:i,handleClick:l}=$e(e),u=me(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(vr,{content:e,styles:r})})]}),t.jsxs("div",{className:"flex-1 min-w-0 flex flex-col justify-between",children:[t.jsxs("div",{children:[n&&t.jsx("div",{className:"mb-2",children:n}),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(Oe,{primaryCta:o,secondaryCta:s,layout:"responsive",styles:{container:"mt-4"}}),a&&t.jsx("div",{className:"mt-2",children:a})]})]})]})})}function F({content:e,variant:r,styles:o,primaryCta:s,secondaryCta:a,bettingOdds:n,matchScore:i}){switch(r||"standard"){case"hero":return t.jsx(br,{content:e,styles:o,primaryCta:s,secondaryCta:a,matchScore:i});case"standardHorizontal":return t.jsx(Bs,{content:e,styles:o,primaryCta:s,secondaryCta:a,bettingOdds:n,matchScore:i});case"promo":return t.jsx(Cr,{content:e,styles:o,primaryCta:s,secondaryCta:a});case"minimal":return t.jsx(kr,{content:e,styles:o,primaryCta:s,secondaryCta:a,bettingOdds:n,matchScore:i});case"standard":default:return t.jsx(Nr,{content:e,styles:o,primaryCta:s,secondaryCta:a,bettingOdds:n,matchScore:i})}}const ae={borderRadius:"lg",shadow:"none",hoverShadow:"md",padding:"md",borderWidth:"1",logoSize:"md"},ie={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 Es(e){const r=e?.borderRadius||ae.borderRadius;return ie.borderRadius[r]}function $s(e){const r=e?.shadow||ae.shadow;return ie.shadow[r]}function Gs(e){if(!(e?.hoverable??!0))return"";const o=e?.hoverShadow||ae.hoverShadow;return ie.hoverShadow[o]}function Ws(e){const r=e?.padding||ae.padding;return ie.padding[r]}function Hs(e){const r=e?.borderWidth||ae.borderWidth;return ie.borderWidth[r]}function Vs(e){return e?.borderColor||"border-border"}function Us(e){const r=e?.logoSize||ae.logoSize;return ie.logoSize[r]}function Fs(e){const r=[Es(e),$s(e),Gs(e),Hs(e),Vs(e)];return e?.container&&r.push(e.container),r.filter(Boolean).join(" ")}function G(e){return e?.main??null}function re(e){return e?.breakdown?.penalties?e.breakdown.penalties:null}const Ys={inline:"xs",scoreCard:"md",scoreLine:"md",embedded:"sm"},qs={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"}},Zs={inline:{borderWidth:"0",borderRadius:"none",shadow:"none",hoverable:!1},scoreCard:{},scoreLine:{},embedded:{borderWidth:"0",borderRadius:"none",shadow:"none",padding:"none",hoverable:!1}};function We(e,r="scoreCard"){return A.useMemo(()=>{const o=Ys[r],s=e?.logoSize||o,n={...Zs[r],...e,logoSize:s},i=qs[r];return{container:Fs(n),padding:Ws(n),background:n.background||(r==="inline"?"":"bg-card text-card-foreground"),logoSize:Us(n),logoSizeValue:s,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:n.hoverable??!0}},[e,r])}function He(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 Sr({match:e,styles:r}){const o=We(r,"inline"),{isClickable:s,handleClick:a}=He(e),n=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,s&&"cursor-pointer hover:opacity-80"),onClick:a,children:[t.jsx("span",{className:o.typography.teamName,children:n}),e.competitorTwo.logo&&t.jsx("img",{src:e.competitorTwo.logo.url,alt:e.competitorTwo.name,className:d(o.logoSize,"object-contain rounded-full")}),G(e.competitorTwo.score)!==null&&t.jsx("span",{className:o.typography.score,children:G(e.competitorTwo.score)}),t.jsx("span",{className:"mx-0.5 text-foreground",children:"-"}),G(e.competitorOne.score)!==null&&t.jsx("span",{className:o.typography.score,children:G(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 _e({team:e,score:r,penaltyScore:o,isWinner:s,variant:a,classes:n,logoSize:i="md",align:l="left"}){return a==="scoreCard"?t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx($,{name:e.name,imageUrl:e.logo?.url,subtitle:e.subtitle,styles:{container:"flex-1",imageSize:i,typography:{name:d("text-foreground",n.typography.teamName),subtitle:d("text-muted-foreground",n.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",s?"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",n.typography.score),children:r})]})]}):t.jsx("div",{className:l==="right"?"justify-self-end":"justify-self-start",children:t.jsx($,{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",n.typography.teamName),subtitle:d("text-muted-foreground",n.typography.metadata)},gap:"2",textAlign:l==="right"?"right":"left"}})})}function Ks({competitorOneScore:e,competitorTwoScore:r,competitorOnePenalty:o,competitorTwoPenalty:s,winner:a,classes:n,isLive:i,liveIndicator:l,statusText:u,period:c}){const m=o!==null||s!==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",n.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(n.typography.status,"text-muted-foreground whitespace-nowrap"),children:u}),c?.current&&!i&&t.jsx("span",{className:d(n.typography.metadata,"text-muted-foreground"),children:c.current})]}):t.jsx("span",{className:d("text-muted-foreground",n.typography.score),children:"-"}),t.jsxs("div",{className:"flex items-center gap-1.5",children:[r!==null&&t.jsx("span",{className:d("text-foreground",n.typography.score),children:r}),m&&s!==null&&s!==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:s})]})]})}function Ar({odds:e,operator:r,styles:o={}}){const{container:s="",padding:a="md",typography:n="md",mode:i="default",flashInterval:l=3e3}=o,[u,c]=A.useState(!0);A.useEffect(()=>{if(i!=="flash")return;const b=setInterval(()=>{c(h=>!h)},l);return()=>clearInterval(b)},[i,l]);const m=()=>{const b={none:"",sm:"px-1.5 py-1",md:"px-2 py-1.5",lg:"px-3 py-2"};return b[a]||b.md},p=()=>{const b={sm:"text-xs",md:"text-xs",lg:"text-sm"};return b[n]||b.md},f=b=>!b||b==="none"?null:t.jsx("span",{className:d("ml-0.5",b==="up"?"text-green-500":"text-red-500"),children:b==="up"?"↑":"↓"}),w=(b,h=!1)=>{const k=m(),R=p(),M=t.jsxs("div",{className:d("flex items-center cursor-pointer justify-between",R),children:[t.jsx("span",{className:"text-muted-foreground",children:b.label}),t.jsxs("span",{className:"font-bold",children:[b.value,f(b.change)]})]}),P=d(h?"":"flex-1","bg-muted hover:bg-muted/60 text-foreground rounded transition-colors",k),E=j=>{j.stopPropagation(),b.onClick&&(j.preventDefault(),b.onClick(b))};return b.url?t.jsx("a",{href:b.url,target:"_blank",rel:"noopener noreferrer",className:P,onClick:E,children:M},b.label):t.jsx("button",{className:P,onClick:E,children:M},b.label)},S=b=>{b.stopPropagation(),r?.onClick&&(b.preventDefault(),r.onClick(r))},v=(b="")=>{if(!r)return null;const h=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",h,b),style:{backgroundColor:r.backgroundColor},onClick:S,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})})},N=e.length>3;return i==="flash"?t.jsx("div",{className:d(N?"space-y-1":"flex gap-1",s),children:u&&r?v("flex-1"):N?t.jsx("div",{className:"grid grid-cols-3 gap-1",children:e.map(b=>w(b,!0))}):t.jsx(t.Fragment,{children:e.map(b=>w(b,!1))})}):N?t.jsxs("div",{className:d("space-y-1",s),children:[v(),t.jsx("div",{className:"grid grid-cols-3 gap-1",children:e.map(b=>w(b,!0))})]}):t.jsxs("div",{className:d("flex gap-1",s),children:[v("w-full max-w-[110px]"),e.map(b=>w(b,!1))]})}function Rr({match:e,styles:r,primaryCta:o,secondaryCta:s}){const a=We(r,"scoreCard"),{isClickable:n,handleClick:i}=He(e),l=e.status==="live",u=!!e.odds,c=o||s,m=re(e.competitorOne.score),p=re(e.competitorTwo.score),f=e.metadata?.winner;return t.jsx("article",{className:d(a.background,a.container,n&&"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(_e,{team:e.competitorOne,score:G(e.competitorOne.score),penaltyScore:m,isWinner:f==="competitorOne",variant:"scoreCard",classes:a,logoSize:a.logoSizeValue}),t.jsx(_e,{team:e.competitorTwo,score:G(e.competitorTwo.score),penaltyScore:p,isWinner:f==="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(Ar,{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,s]})})]})})}function Tr({match:e,styles:r}){const o=We(r,"scoreLine"),{isClickable:s,handleClick:a}=He(e),n=e.status==="live",i=n&&e.period?.current?e.period.current:e.period?.label||e.status.toUpperCase(),l=re(e.competitorOne.score),u=re(e.competitorTwo.score),c=e.metadata?.winner;return t.jsx("article",{className:d(o.background,o.container,s&&"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(_e,{team:e.competitorOne,score:null,variant:"scoreLine",classes:o,logoSize:o.logoSizeValue}),t.jsx(Ks,{competitorOneScore:G(e.competitorOne.score),competitorTwoScore:G(e.competitorTwo.score),competitorOnePenalty:l,competitorTwoPenalty:u,winner:c,classes:o,isLive:n,liveIndicator:e.liveIndicator,statusText:i,period:e.period}),t.jsx(_e,{team:e.competitorTwo,score:null,variant:"scoreLine",classes:o,logoSize:o.logoSizeValue,align:"right"})]})})}const Xs={xs:"xs",sm:"xs",md:"sm",lg:"md",xl:"lg","2xl":"xl","3xl":"2xl"},Wt={square:"sm",round:"full"};function Qs(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 Js({match:e,styles:r}){const o=We(r,"embedded"),{isClickable:s,handleClick:a}=He(e),n=e.status==="live",i=e.liveIndicator?.color||"bg-red-500",l=G(e.competitorOne.score),u=G(e.competitorTwo.score),c=re(e.competitorOne.score),m=re(e.competitorTwo.score),p=c!==null||m!==null,f=e.metadata?.winner,w=e.status==="scheduled",S=e.metadata?.time||e.period?.label||"-",v=Qs(e,r?.finishedStatusDisplay),N=r?.statusColumnWidth||"w-[60px]",b=r?.typography?.status||"text-xs font-medium",h=Xs[r?.logoSize||"md"],k=Wt[e.competitorOne.logoShape||"square"],R=Wt[e.competitorTwo.logoShape||"square"],M={imageSize:h,gap:"2",typography:{name:o.typography.teamName}};return t.jsxs("article",{className:d("flex items-center w-full",o.padding,s&&"cursor-pointer",r?.container),onClick:a,children:[t.jsxs("div",{className:d("shrink-0 flex items-center justify-start gap-1.5",N,b,n?"text-danger":"text-muted-foreground"),children:[n&&t.jsx("div",{className:d("w-2 h-2 rounded-full animate-pulse shrink-0",i)}),t.jsx("span",{children:v})]}),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($,{name:e.competitorOne.name,imageUrl:e.competitorOne.logo?.url,orientation:"rtl",truncate:!0,styles:{...M,imageBorderRadius:k,textAlign:"right"}})}),t.jsx("div",{className:"shrink-0 px-3 text-center min-w-[70px]",children:w?t.jsx("span",{className:d(o.typography.score,"text-muted-foreground"),children:S}):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",f==="competitorOne"?"bg-muted-foreground text-muted font-bold":"bg-muted text-muted-foreground"),children:c}),t.jsxs("span",{className:d(o.typography.score,n&&"text-danger"),children:[l," - ",u]}),p&&m!==null&&t.jsx("span",{className:d("text-[10px] px-1 py-0.5 rounded",f==="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($,{name:e.competitorTwo.name,imageUrl:e.competitorTwo.logo?.url,orientation:"ltr",truncate:!0,styles:{...M,imageBorderRadius:R,textAlign:"left"}})})]})]})}function O({match:e,variant:r,styles:o,primaryCta:s,secondaryCta:a}){switch(r||"scoreCard"){case"inline":return t.jsx(Sr,{match:e,styles:o});case"scoreLine":return t.jsx(Tr,{match:e,styles:o});case"embedded":return t.jsx(Js,{match:e,styles:o});case"scoreCard":default:return t.jsx(Rr,{match:e,styles:o,primaryCta:s,secondaryCta:a})}}const pe={borderRadius:"lg",shadow:"none",padding:"md",borderWidth:"1",logoSize:"md"},ge={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"}},en={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 tn(e){const r=e?.borderRadius||pe.borderRadius;return ge.borderRadius[r]}function rn(e){const r=e?.shadow||pe.shadow;return ge.shadow[r]}function on(e){const r=e?.padding||pe.padding;return ge.padding[r]}function sn(e){const r=e?.borderWidth||pe.borderWidth;return ge.borderWidth[r]}function nn(e){return e?.borderColor||"border-border"}function an(e){const r=e?.logoSize||pe.logoSize;return ge.logoSize[r]}function Le(e,r){return r?.typography?.[e]?r.typography[e]:en[e]}function ln(e){return e?.background||"bg-card"}function dn(e){const r=[tn(e),rn(e),sn(e),nn(e),ln(e)];return e?.container&&r.push(e.container),r.filter(Boolean).join(" ")}function cn(e){return A.useMemo(()=>({container:dn(e),padding:on(e),logoSize:an(e),typography:{header:Le("header",e),cell:Le("cell",e),disclaimer:Le("disclaimer",e),legend:Le("legend",e)},table:e?.table||"",headerRow:e?.headerRow||"",bodyRow:e?.bodyRow||"",legendContainer:e?.legendContainer||"",isHoverable:e?.hoverable??!0}),[e])}function un(e){switch(e){case"center":return"text-center";case"right":return"text-right";case"left":default:return"text-left"}}function Ht(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 Lr(e){return typeof e=="object"&&e!==null&&("mobile"in e||"desktop"in e)}function dt(e,r){return e.filter(o=>Lr(o.width)?(r==="mobile"?o.width.mobile:o.width.desktop)!=="none":o.width!=="none")}function Vt(e,r){const o=["4px"];return dt(e,r).forEach(a=>{if(Lr(a.width)){const n=r==="mobile"?a.width.mobile:a.width.desktop;o.push(Ht(n))}else o.push(Ht(a.width))}),o.join(" ")}function Me(e){const r=un(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 mn({columns:e,rows:r,legend:o,showLegend:s,disclaimer:a,description:n,styles:i,onRowClick:l,filterRowIds:u}){const c=cn(i),m=A.useMemo(()=>{if(!u||u.length===0)return r;const h=new Set(u);return r.filter(k=>h.has(k.id))},[r,u]),p=A.useMemo(()=>{if(o)return o;const h=new Map;return m.forEach(k=>{if(k.zone){const R=`${k.zone.color}-${k.zone.label}`;h.has(R)||h.set(R,{color:k.zone.color,label:k.zone.label})}}),Array.from(h.values())},[m,o]),f=s!==void 0?s:p.length>0,w=A.useMemo(()=>dt(e,"mobile"),[e]),S=A.useMemo(()=>dt(e,"desktop"),[e]),v=A.useMemo(()=>Vt(e,"mobile"),[e]),N=A.useMemo(()=>Vt(e,"desktop"),[e]),b=i?.container||c.container;return t.jsx("div",{className:b,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:v},children:[t.jsx("div",{"aria-label":"Zone"}),w.map(h=>t.jsx("div",{className:d(c.typography.header,Me(h)),children:h.header},h.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:N},children:[t.jsx("div",{"aria-label":"Zone"}),S.map(h=>t.jsx("div",{className:d(c.typography.header,Me(h)),children:h.header},h.key))]}),m.map(h=>t.jsxs("li",{className:d("relative border-b border-border last:border-0",h.highlight&&"bg-muted",c.isHoverable&&l&&"hover:bg-muted/50 cursor-pointer transition-colors",c.bodyRow),onClick:()=>l?.(h),children:[h.zone&&t.jsx("div",{className:d("absolute left-0 top-0 bottom-0 w-1 rounded-r-sm",h.zone.color)}),t.jsxs("div",{className:"md:hidden grid items-center gap-1 py-3 pl-2",style:{gridTemplateColumns:v},children:[t.jsx("div",{}),w.map(k=>t.jsx("div",{className:d(c.typography.cell,Me(k)),children:k.render?k.render(h[k.key],h):h[k.key]},k.key))]}),t.jsxs("div",{className:"hidden md:grid items-center gap-1 py-3 lg:px-2 pl-2",style:{gridTemplateColumns:N},children:[t.jsx("div",{}),S.map(k=>t.jsx("div",{className:d(c.typography.cell,Me(k)),children:k.render?k.render(h[k.key],h):h[k.key]},k.key))]})]},h.id))]})}),n&&t.jsx("div",{className:d("mt-4",c.typography.disclaimer),children:n}),f&&p.length>0&&t.jsx("div",{className:d("mt-4 flex flex-wrap gap-4",c.legendContainer),children:p.map((h,k)=>t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("div",{className:d("w-3 h-4 rounded-sm",h.color)}),t.jsx("span",{className:c.typography.legend,children:h.label})]},k))}),a&&t.jsx("div",{className:d("mt-4",c.typography.disclaimer),children:a})]})})}const Ve={borderRadius:"md",padding:"md",alignment:"left",background:"bg-muted"},X={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"}},pn={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 gn(e){const r=e?.borderRadius||Ve.borderRadius;return X.borderRadius[r]}function xn(e){const r=e?.padding||Ve.padding;return X.padding[r]}function ft(e){const r=e?.alignment||Ve.alignment;return X.alignment[r]}function hn(e){return e?.background||Ve.background}function te(e,r,o){return r?.typography?.[e]?r.typography[e]:pn[o||"default"][e]}function fn(e){const r=e?.colsMobile||2,o=e?.colsTablet||3,s=e?.colsDesktop||3,a=e?.gap||"sm";return["grid",X.colsMobile[r],X.colsTablet[o],X.colsDesktop[s],X.gap[a]].join(" ")}function Mr(e){return[gn(e),xn(e),hn(e),ft(e),"flex flex-col"].join(" ")}function bn(e,r,o){return A.useMemo(()=>({grid:fn(e),item:{container:Mr(r),alignment:ft(r),typography:{value:te("value",r,o),label:te("label",r,o),secondaryLabel:te("secondaryLabel",r,o)}}}),[e,r,o])}function bt(e,r){return A.useMemo(()=>({container:Mr(e),alignment:ft(e),typography:{value:te("value",e,r),label:te("label",e,r),secondaryLabel:te("secondaryLabel",e,r)}}),[e,r])}function zr({item:e,styles:r}){const o=bt(r,"default"),s=o.container;return t.jsxs("div",{className:s,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 Ir({item:e,styles:r}){const o=bt(r,"stacked"),s=o.container;return t.jsxs("div",{className:s,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 s=bt(r,"horizontal"),a=s.container,n=o==="ltr"?"items-start":"items-end",i=t.jsxs("div",{className:d("flex flex-col gap-1",n),children:[e.icon&&t.jsx("span",{className:"shrink-0",children:e.icon}),t.jsx("span",{className:s.typography.label,children:e.label}),e.secondaryLabel&&t.jsx("div",{className:s.typography.secondaryLabel,children:e.secondaryLabel})]}),l=t.jsx("div",{className:s.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 Pr({item:e,styles:r,variant:o="default",orientation:s}){const a={item:e,styles:r};switch(o){case"stacked":return t.jsx(Ir,{...a});case"horizontal":return t.jsx(_r,{...a,orientation:s});default:return t.jsx(zr,{...a})}}function Q({items:e=[],itemVariant:r="default",itemOrientation:o,styles:s}){const{container:a="",grid:n,item:i}=s||{},l=bn(n,i,r),u=a||l.grid;return t.jsx("div",{className:u,children:e.map(c=>t.jsx(Pr,{item:c,styles:i,variant:r,orientation:o},c.id))})}const Ue={padding:"none",itemSpacing:"md",borderRadius:"none",background:""},Fe={leftBarColor:"bg-green-500",rightBarColor:"bg-blue-500",height:"md",borderRadius:"sm"},xe={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"}},jn={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 vn(e){const r=e?.padding||Ue.padding;return xe.padding[r]}function wn(e){const r=e?.itemSpacing||Ue.itemSpacing;return xe.itemSpacing[r]}function yn(e){const r=e?.borderRadius||Ue.borderRadius;return xe.borderRadius[r]}function Nn(e){return e?.background||Ue.background}function Dr(e){const r=e?.height||Fe.height;return xe.barHeight[r]}function Or(e){const r=e?.borderRadius||Fe.borderRadius;return xe.barBorderRadius[r]}function Br(e){return e?.leftBarColor||Fe.leftBarColor}function Er(e){return e?.rightBarColor||Fe.rightBarColor}function ot(e,r,o="comparison"){return r?.typography?.[e]?r.typography[e]:jn[o][e]}function Cn(e){return["flex flex-col",vn(e),wn(e),yn(e),Nn(e)].filter(Boolean).join(" ")}function jt(e,r="comparison"){return A.useMemo(()=>{const o=e?.bar;return{container:Cn(e),typography:{label:ot("label",e,r),leftValue:ot("leftValue",e,r),rightValue:ot("rightValue",e,r)},bar:{height:Dr(o),borderRadius:Or(o),leftBarColor:Br(o),rightBarColor:Er(o)}}},[e,r])}function $r(e,r){return A.useMemo(()=>{const o={...e,...r};return{height:Dr(o),borderRadius:Or(o),leftBarColor:Br(o),rightBarColor:Er(o)}},[e,r])}function Gr({item:e,styles:r}){const o=jt(r,"bar"),s=$r(r?.bar,e.barStyles),a=typeof e.leftValue=="number"?e.leftValue:parseFloat(String(e.leftValue))||0,n=typeof e.rightValue=="number"?e.rightValue:parseFloat(String(e.rightValue))||0,i=a+n,l=i>0?a/i*100:50,u=i>0?n/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(s.leftBarColor,s.height,s.borderRadius,"transition-all duration-300"),style:{width:`${l}%`}}),t.jsx("div",{className:d(s.rightBarColor,s.height,s.borderRadius,"transition-all duration-300"),style:{width:`${u}%`}})]})]})}function Wr({item:e,styles:r}){const o=jt(r,"comparison"),s=$r(r?.bar,e.barStyles),a=typeof e.leftValue=="number"?e.leftValue:parseFloat(String(e.leftValue))||0,n=typeof e.rightValue=="number"?e.rightValue:parseFloat(String(e.rightValue))||0,i=a+n,l=i>0?a/i*100:50,u=i>0?n/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",s.height,s.borderRadius),children:t.jsx("div",{className:d(s.leftBarColor,s.height,s.borderRadius,"transition-all duration-300"),style:{width:`${l}%`,minWidth:"2px"}})}),t.jsx("div",{className:d("flex-1 flex justify-start bg-muted",s.height,s.borderRadius),children:t.jsx("div",{className:d(s.rightBarColor,s.height,s.borderRadius,"transition-all duration-300"),style:{width:`${u}%`,minWidth:"2px"}})})]})]})}function Hr({item:e,styles:r}){const o={item:e,styles:r};switch(e.variant){case"bar":return t.jsx(Gr,{...o});case"comparison":default:return t.jsx(Wr,{...o})}}function vt({items:e=[],styles:r}){const o=jt(r,"comparison"),s=r?.container||o.container;return t.jsx("div",{className:s,children:e.map(a=>t.jsx(Hr,{item:a,styles:r},a.id))})}const wt={win:"W",draw:"D",loss:"L",vs:"vs"};function kn(e,r={}){const o={...wt,...r};switch(e){case"W":return o.win;case"D":return o.draw;case"L":return o.loss}}function Sn(e){switch(e){case"W":return"bg-green-600";case"D":return"bg-gray-500";case"L":return"bg-red-500"}}function An(e){switch(e){case"W":return t.jsx(Ls,{height:13,width:13,strokeWidth:3,color:"#fff"});case"D":return t.jsx(_s,{height:13,width:13,strokeWidth:3,color:"#fff"});case"L":return t.jsx(Ds,{height:13,width:13,strokeWidth:3,color:"#fff"});default:return null}}function yt(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 Rn(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 Tn(e,r){return yt(e,r)?.name||"Unknown"}function Vr(e,r){const o=Rn(e,r),s=yt(e,r);if(o?.score!==void 0&&s?.score!==void 0)return`${o.score}-${s.score}`}function Ur(e,r,o={}){const s={...wt,...o},a=[],n=Tn(e,r);a.push(`${s.vs} ${n}`);const i=Vr(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 ze={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"},textSize:{xs:"text-xs",sm:"text-sm",md:"text-base",lg:"text-lg"},fontWeight:{normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold"}};function Ln({form:e,teamId:r,maxItems:o=5,labels:s,matchSeparator:a,styles:n,onClick:i}){const l=e.slice(-o),u=s&&(s.win||s.draw||s.loss),c=(v,N)=>{if(i){const b=e.length-l.length+N;i(v,b)}},m=n?.container||"",p=ze.size[n?.indicator?.size||"sm"],f=ze.borderRadius[n?.indicator?.borderRadius||"full"],w=ze.textSize[n?.indicator?.textSize||"xs"],S=ze.fontWeight[n?.indicator?.fontWeight||"bold"];return t.jsx("div",{className:d("flex items-center gap-1 justify-end",m),children:l.map((v,N)=>{const b=N===0,h=N===l.length-1,k=t.jsx("div",{className:d("flex items-center justify-center",p,f,Sn(v.outcome),i&&"cursor-pointer hover:opacity-80 transition-opacity"),onClick:()=>c(v,N),children:u?t.jsx("span",{className:d("text-white leading-none",w,S),children:kn(v.outcome,s)}):An(v.outcome)}),M=v.competitorOne?.score!==void 0||v.competitorTwo?.score!==void 0||v.date!==void 0?t.jsx(de,{content:Ur(v,r,s),position:"top",children:k}):k;return t.jsxs(A.Fragment,{children:[a==="last"&&h&&l.length>1&&t.jsx("div",{className:"h-5 w-px bg-border mx-0.5","aria-hidden":"true"}),M,a==="first"&&b&&l.length>1&&t.jsx("div",{className:"h-5 w-px bg-border mx-0.5","aria-hidden":"true"})]},N)})})}function Mn(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 st={win:"WIN",draw:"DRAW",loss:"LOSS"};function In(e,r){switch(e){case"W":return r?.win||st.win;case"D":return r?.draw||st.draw;case"L":return r?.loss||st.loss}}const nt={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"},layout:{scroll:"flex overflow-x-auto",grid:"grid",responsive:"flex md:grid overflow-x-auto md:overflow-visible"}},at={badge:"text-xs font-semibold uppercase",score:"text-lg font-semibold",date:"text-xs mt-2"};function _n({form:e,teamId:r,maxItems:o=5,labels:s,layout:a,styles:n,onClick:i}){const l=e.slice(-o),u=(R,M)=>{if(i){const P=e.length-l.length+M;i(R,P)}},c=R=>{if(r!==void 0){if(String(R.competitorOne?.id)===String(r))return{ourTeam:R.competitorOne,opponent:R.competitorTwo};if(String(R.competitorTwo?.id)===String(r))return{ourTeam:R.competitorTwo,opponent:R.competitorOne}}return{ourTeam:R.competitorOne,opponent:R.competitorTwo}},m=n?.container||"",p=nt.gap[n?.gap||"3"],f=nt.logoSize[n?.logoSize||"md"],w=n?.typography?.badge||at.badge,S=n?.typography?.score||at.score,v=n?.typography?.date||at.date,N=a||n?.layout||"scroll",b=nt.layout[N],h=()=>N==="scroll"?"shrink-0":N==="grid"?"min-w-0":"shrink-0 md:shrink md:min-w-0",k=N==="scroll"?void 0:{gridTemplateColumns:`repeat(${l.length}, minmax(0, 1fr))`};return t.jsx("div",{className:d("items-start",b,p,m),style:k,children:l.map((R,M)=>{const{date:P,outcome:E}=R,{ourTeam:j,opponent:_}=c(R),ve=j.score??"-",we=_.score??"-";return t.jsx("div",{className:d("flex flex-col items-center gap-1",h()),children:t.jsxs("div",{className:d("flex flex-col items-center gap-2 px-4 py-3","bg-card border border-border rounded-md border-t-4",Mn(E),i&&"cursor-pointer hover:bg-muted/50 transition-colors"),onClick:()=>u(R,M),children:[t.jsx("span",{className:d("px-3 py-0.5 rounded-full",w,zn(E)),children:In(E,s)}),t.jsxs("div",{className:d("flex items-center gap-2 text-foreground",S),children:[t.jsx("span",{children:ve}),t.jsx("span",{className:"text-muted-foreground",children:"-"}),t.jsx("span",{children:we})]}),t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx(de,{content:j.name,children:j.image?t.jsx("img",{src:j.image,alt:j.name,className:d(f,"object-contain")}):t.jsx("div",{className:d(f,"bg-muted rounded-full flex items-center justify-center text-xs text-muted-foreground"),children:j.name.charAt(0)})}),t.jsx(de,{content:_.name,children:_.image?t.jsx("img",{src:_.image,alt:_.name,className:d(f,"object-contain")}):t.jsx("div",{className:d(f,"bg-muted rounded-full flex items-center justify-center text-xs text-muted-foreground"),children:_.name.charAt(0)})})]}),P&&t.jsx("span",{className:d(v,"text-muted-foreground"),children:P})]})},R.matchId)})})}const Pn=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"}},Dn=(e,r)=>{const o=yt(e,r);return o?.name?o.shortName||o.name.substring(0,3).toUpperCase():"???"};function On({form:e,teamId:r,maxItems:o=5,labels:s,styles:a,onClick:n}){const i=e.slice(-o),{container:l=""}=a||{},u=(c,m)=>{if(n){const p=e.length-i.length+m;n(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",n?"cursor-pointer hover:bg-muted/80":"cursor-default"),onClick:()=>u(c,m),children:[t.jsx("span",{className:d("text-sm font-bold",Pn(c.outcome)),children:Vr(c,r)||"?-?"}),t.jsx("span",{className:"text-[10px] text-muted-foreground",children:Dn(c,r)})]});return c.competitorOne?.name!==void 0||c.competitorTwo?.name!==void 0||c.date!==void 0?t.jsx(de,{content:Ur(c,r,s),position:"top",children:p},m):t.jsx("div",{children:p},m)})})})}function he({variant:e="embedded",...r}){switch(e){case"detailed":return t.jsx(_n,{...r});case"scoreCards":return t.jsx(On,{...r});case"embedded":default:return t.jsx(Ln,{...r})}}const Bn={0:"p-0",2:"p-2",3:"p-3",4:"p-4",6:"p-6",8:"p-8"},En={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl"},$n={1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4"};function fe({entity:e,primaryCta:r,secondaryCta:o,layout:s="horizontal",ctaLayout:a="responsive",styles:n}){const{container:i="",background:l="",padding:u="4",borderRadius:c="none",ctaGap:m="2"}=n||{},p=Bn[u],f=En[c],w=$n[m],S=r||o,v={inline:"flex flex-row items-center",stacked:"flex flex-col",responsive:"flex flex-col sm:flex-row sm:items-center"},N={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 s==="stacked"?t.jsxs("div",{className:d("flex flex-col items-center text-center gap-4",p,f,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",Gn(e.styles?.imageSize),Wn(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})]})]}),S&&t.jsxs("div",{className:d("flex flex-col items-center",w),children:[r,o]})]}):t.jsxs("div",{className:d(N[a],p,f,l,i),children:[t.jsx($,{...e}),S&&t.jsxs("div",{className:d(v[a],w,"shrink-0"),children:[r,o]})]})}const Ut={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"},Ft={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl",full:"rounded-full"};function Gn(e){return Ut[e]||Ut.md}function Wn(e){return Ft[e]||Ft.none}const Hn={2:"gap-2",3:"gap-3",4:"gap-4",6:"gap-6",8:"gap-8"},Vn={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"},Un={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl",full:"rounded-full"};function Fn(e){const r=Vn[e?.imageSize||"lg"],o=e?.imageBorderRadius?Un[e.imageBorderRadius]:"",s=e?.imageBorder||"";return d(r,o,s)}function Yt({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(Fn(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 Nt({leftEntity:e,rightEntity:r,centerContent:o,variant:s="inline",styles:a,leftBackground:n="",rightBackground:i="",overlay:l=""}){const{container:u="",background:c="",gap:m="4",centerTypography:p="text-sm text-muted-foreground font-medium"}=a||{},f=Hn[m];if(s==="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",n)}),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",f),children:[t.jsx(Yt,{entity:e}),o&&t.jsx(qt,{content:o,typography:p}),t.jsx(Yt,{entity:r})]})]});const w={...e,orientation:"rtl",styles:{...e.styles,textAlign:"right"}},S={...r,orientation:"ltr",styles:{...r.styles,textAlign:"left"}};return t.jsxs("div",{className:d("flex items-center justify-between",f,c,u),children:[t.jsx("div",{className:"flex-1 flex justify-end",children:t.jsx($,{...w})}),o&&t.jsx(qt,{content:o,typography:p}),t.jsx("div",{className:"flex-1 flex justify-start",children:t.jsx($,{...S})})]})}const Yn={1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4"};function T({entity:e,primaryCta:r,secondaryCta:o,styles:s}){const a=s?.ctaGap||"2",n=s?.container||"",i=Yn[a];return r||o?t.jsxs("div",{className:d("flex items-center justify-between gap-4",n),children:[t.jsx($,{...e}),t.jsxs("div",{className:d("flex items-center shrink-0",i),children:[r,o]})]}):t.jsx("div",{className:n,children:t.jsx($,{...e})})}const qn={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl"},Fr={left:"text-left",center:"text-center",right:"text-right"},Zn={1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4"};function Yr(e){const r=e?.borderRadius?qn[e.borderRadius]:"rounded-xl";return d("overflow-hidden",r,e?.container)}function qr(e){return Fr[e?.titlePosition||"left"]}function Zr(e){return Fr[e?.oddsLabelPosition||"left"]}function Kr(e){return Zn[e?.oddsGap||"1"]}const Zt="text-xs font-semibold text-muted-foreground uppercase tracking-wider";function Kn({matchupHeader:e,stats:r,title:o,bettingOdds:s,oddsLabel:a,styles:n}){const i=qr(n),l=Zr(n);return t.jsxs("div",{className:d("bg-card border border-muted shadow-sm",Yr(n)),children:[t.jsx("div",{className:d("bg-muted/30 p-4",n?.headerSection),children:t.jsx(Nt,{...e,variant:"inline"})}),t.jsxs("div",{className:d("p-4",n?.statsSection),children:[o&&t.jsx(T,{entity:{name:o,styles:{typography:{name:d(Zt,i)},container:"mb-2.5 mt-1"}}}),t.jsx(vt,{...r})]}),s&&s.length>0&&t.jsxs("div",{className:d("p-4 pt-0",n?.oddsSection),children:[a&&t.jsx(T,{entity:{name:a,styles:{typography:{name:d(Zt,l)},container:"mb-2.5 mt-1"}}}),t.jsx("div",{className:d("flex flex-col",Kr(n)),children:s.map((u,c)=>t.jsx("div",{children:u},c))})]})]})}const Kt="text-xs font-semibold text-muted-foreground uppercase tracking-wider";function Xn({matchupHeader:e,stats:r,title:o,bettingOdds:s,oddsLabel:a,styles:n}){const i={...e,variant:"stacked"},l=qr(n),u=Zr(n);return t.jsxs("div",{className:d("shadow-lg",Yr(n)),children:[t.jsx(Nt,{...i}),t.jsxs("div",{className:d("bg-card p-6",n?.statsSection),children:[o&&t.jsx(T,{entity:{name:o,styles:{typography:{name:d(Kt,l)},container:"mb-2.5 mt-1"}}}),t.jsx(vt,{...r})]}),s&&s.length>0&&t.jsxs("div",{className:d("bg-card p-6 pt-0",n?.oddsSection),children:[a&&t.jsx(T,{entity:{name:a,styles:{typography:{name:d(Kt,u)},container:"mb-2.5 mt-1"}}}),t.jsx("div",{className:d("flex flex-col",Kr(n)),children:s.map((c,m)=>t.jsx("div",{children:c},m))})]})]})}function Qn({variant:e="card",...r}){switch(e){case"hero":return t.jsx(Xn,{...r});case"card":default:return t.jsx(Kn,{...r})}}const Jn={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl"},ea={left:"text-left",center:"text-center",right:"text-right"},ta={1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4"};function Ye(e){const r=e?.borderRadius?Jn[e.borderRadius]:"rounded-xl";return d("overflow-hidden",r,e?.container)}function qe(e){return ea[e?.titlePosition||"left"]}function Ze(e){return ta[e?.oddsGap||"1"]}const ra="text-xs font-semibold text-muted-foreground uppercase tracking-wider";function oa({profileHeader:e,stats:r,statsTitle:o,form:s,formTitle:a,featuredMatch:n,matchTitle:i,bettingOdds:l,oddsLabel:u,styles:c}){const m=qe(c),p={typography:{name:d(ra,m)},container:"mb-1.5"};return t.jsxs("div",{className:d("bg-card border border-muted shadow-sm",Ye(c)),children:[t.jsx("div",{className:c?.headerSection,children:t.jsx(fe,{...e})}),r&&t.jsxs("div",{className:d("p-4",c?.statsSection),children:[o&&t.jsx(T,{entity:{name:o,styles:p}}),t.jsx(Q,{...r})]}),s&&t.jsxs("div",{className:d("px-4 pb-4",c?.formSection),children:[a&&t.jsx(T,{entity:{name:a,styles:p}}),t.jsx(he,{...s,variant:"scoreCards"})]}),n&&t.jsxs("div",{className:d("p-4 pt-0",c?.matchSection),children:[i&&t.jsx(T,{entity:{name:i,styles:p}}),t.jsx(O,{...n})]}),l&&l.length>0&&t.jsxs("div",{className:d("p-4 pt-0",c?.oddsSection),children:[u&&t.jsx(T,{entity:{name:u,styles:p}}),t.jsx("div",{className:d("flex flex-col",Ze(c)),children:l.map((f,w)=>t.jsx("div",{children:f},w))})]})]})}const sa="text-xs font-semibold text-muted-foreground uppercase tracking-wider";function na({profileHeader:e,stats:r,statsTitle:o,form:s,formTitle:a,featuredMatch:n,matchTitle:i,bettingOdds:l,oddsLabel:u,styles:c}){const m=qe(c),p={typography:{name:d(sa,m)},container:"mb-1.5"};return t.jsxs("div",{className:d("shadow-lg",Ye(c)),children:[t.jsx("div",{className:c?.headerSection,children:t.jsx(fe,{...e})}),r&&t.jsxs("div",{className:d("bg-card p-5",c?.statsSection),children:[o&&t.jsx(T,{entity:{name:o,styles:p}}),t.jsx(Q,{...r})]}),s&&t.jsxs("div",{className:d("bg-card px-4 pb-4",c?.formSection),children:[a&&t.jsx(T,{entity:{name:a,styles:p}}),t.jsx(he,{...s,variant:"scoreCards"})]}),n&&t.jsxs("div",{className:d("bg-card p-4 pt-0",c?.matchSection),children:[i&&t.jsx(T,{entity:{name:i,styles:p}}),t.jsx(O,{...n})]}),l&&l.length>0&&t.jsxs("div",{className:d("bg-card p-4 pt-0",c?.oddsSection),children:[u&&t.jsx(T,{entity:{name:u,styles:p}}),t.jsx("div",{className:d("flex flex-col",Ze(c)),children:l.map((f,w)=>t.jsx("div",{children:f},w))})]})]})}const aa="text-xs font-semibold text-muted-foreground uppercase tracking-wider";function ia({profileHeader:e,stats:r,form:o,formTitle:s,matchTitle:a,featuredMatch:n,bettingOdds:i,oddsLabel:l,styles:u}){const c=qe(u),m={typography:{name:d(aa,c)},container:"mb-1.5"};return t.jsxs("div",{className:d("bg-card border border-muted shadow-sm",Ye(u)),children:[t.jsx("div",{className:u?.headerSection,children:t.jsx(fe,{...e})}),r&&t.jsx("div",{className:d("p-3",u?.statsSection),children:t.jsx(Q,{...r})}),o&&t.jsxs("div",{className:d("bg-card px-3 pb-3",u?.formSection),children:[s&&t.jsx(T,{entity:{name:s,styles:m}}),t.jsx("div",{className:"flex justify-start",children:t.jsx(he,{...o,matchSeparator:"last",variant:"embedded"})})]}),n&&t.jsxs("div",{className:d("px-3 pb-3",u?.matchSection),children:[a&&t.jsx(T,{entity:{name:a,styles:m}}),t.jsx(O,{...n,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(T,{entity:{name:l,styles:m}}),t.jsx("div",{className:d("flex flex-col",Ze(u)),children:i.map((p,f)=>t.jsx("div",{children:p},f))})]})]})}const la="text-xs font-semibold text-muted-foreground uppercase tracking-wider";function da({profileHeader:e,stats:r,statsTitle:o,form:s,formTitle:a,featuredMatch:n,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,f=qe(c),w={typography:{name:d(la,f)},container:"mb-1.5"};return t.jsx("div",{className:d("shadow-lg",Ye(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(fe,{...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(T,{entity:{name:o,styles:w}}),t.jsx(Q,{...r})]}),s&&t.jsxs("div",{className:c?.formSection,children:[a&&t.jsx(T,{entity:{name:a,styles:w}}),t.jsx(he,{...s,variant:"scoreCards"})]}),n&&t.jsxs("div",{className:c?.matchSection,children:[i&&t.jsx(T,{entity:{name:i,styles:w}}),t.jsx(O,{...n})]}),l&&l.length>0&&t.jsxs("div",{className:c?.oddsSection,children:[u&&t.jsx(T,{entity:{name:u,styles:w}}),t.jsx("div",{className:d("flex flex-col",Ze(c)),children:l.map((S,v)=>t.jsx("div",{children:S},v))})]})]})]})})}function ca({variant:e="card",...r}){switch(e){case"hero":return t.jsx(na,{...r});case"compact":return t.jsx(ia,{...r});case"horizontal":return t.jsx(da,{...r});case"card":default:return t.jsx(oa,{...r})}}const ua={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl"},ma={none:"gap-0",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8"},pa={1:"grid-cols-1",2:"grid-cols-2"},ga={1:"md:grid-cols-1",2:"md:grid-cols-2",3:"md:grid-cols-3"},xa={1:"lg:grid-cols-1",2:"lg:grid-cols-2",3:"lg:grid-cols-3",4:"lg:grid-cols-4"},ha={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 Xr(e){const r=e?.borderRadius?ua[e.borderRadius]:"rounded-xl";return d("overflow-hidden",r,e?.background,e?.container)}function Qr(e){return ma[e?.gap||"md"]}function fa(e){const r=e?.sm||1,o=e?.md||2,s=e?.lg||3,a=e?.xl||4;return d(pa[r],ga[o],xa[s],ha[a])}function ba({items:e,sectionHeader:r,cardVariant:o="standard",cardStyles:s,pagination:a,styles:n}){const i=Qr(n),l=fa(n?.columns);return t.jsxs("div",{className:Xr(n),children:[r,t.jsx("div",{className:d("grid",l,i,n?.contentSection),children:e.map(u=>t.jsx(F,{content:u.content,variant:o,styles:s,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",n?.paginationSection),children:t.jsx(ht,{...a})})]})}function ja({items:e,sectionHeader:r,cardVariant:o="standardHorizontal",cardStyles:s,pagination:a,styles:n}){const i=Qr(n),l=o==="standard"?"standardHorizontal":o;return t.jsxs("div",{className:Xr(n),children:[r,t.jsx("div",{className:d("flex flex-col",i,n?.contentSection),children:e.map(u=>t.jsx(F,{content:u.content,variant:l,styles:s,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",n?.paginationSection),children:t.jsx(ht,{...a})})]})}function va({variant:e="grid",...r}){switch(e){case"list":return t.jsx(ja,{...r});case"grid":default:return t.jsx(ba,{...r})}}const wa={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl"},ya={none:"gap-0",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8"};function Ct(e){const r=e?.borderRadius?wa[e.borderRadius]:"";return d(r,e?.background,e?.container)}function kt(e){return ya[e?.gap||"md"]}const Na={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"},Ca={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 ka(e,r){return r<=1?e:{...e,content:{...e.content,description:void 0,category:r>=3?void 0:e.content.category}}}function it({items:e,config:r,cardStyles:o,gapClass:s}){const a=Na[r.columns],n=Ca[r.columns];return t.jsx("div",{className:d("grid",a,s),children:e.map(i=>{const l=ka(i,r.columns);return t.jsx(F,{content:l.content,variant:"hero",styles:{...o,typography:{...n,...o?.typography}},bettingOdds:l.bettingOdds,matchScore:l.matchScore},l.content.id)})})}function Sa({items:e,sectionHeader:r,cardStyles:o,styles:s,stackedConfig:a}){const n=a?.row1||{columns:1},i=a?.row2||{columns:2},l=a?.row3||{columns:3},u=kt(s),c=n.columns,m=i.columns,p=l.columns,f=e.slice(0,c),w=e.slice(c,c+m),S=e.slice(c+m,c+m+p);return t.jsxs("div",{className:Ct(s),children:[r,t.jsxs("div",{className:d("flex flex-col",u),children:[f.length>0&&t.jsx(it,{items:f,config:n,cardStyles:o,gapClass:u}),w.length>0&&t.jsx(it,{items:w,config:i,cardStyles:o,gapClass:u}),S.length>0&&t.jsx(it,{items:S,config:l,cardStyles:o,gapClass:u})]})]})}const Aa={title:"text-xl md:text-lg font-bold line-clamp-2",category:"text-xs",metadata:"text-xs opacity-80"},Ra={title:"text-xl md:text-base font-semibold line-clamp-2",metadata:"text-xs opacity-80"};function Xt(e,r=!1){return{...e,content:{...e.content,description:void 0,category:r?void 0:e.content.category}}}function Ta({items:e,sectionHeader:r,cardStyles:o,styles:s}){const a=kt(s),n=e[0],i=e.slice(1,3),l=e.slice(3,6);return n?t.jsxs("div",{className:Ct(s),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(F,{content:n.content,variant:"hero",styles:{...o,imageAspectRatio:"auto",container:d("h-full",o?.container),imageContainer:d("h-full",o?.imageContainer)},bettingOdds:n.bettingOdds,matchScore:n.matchScore})}),i.length>0&&t.jsx("div",{className:d("flex flex-col",a),children:i.map(u=>{const c=Xt(u);return t.jsx(F,{content:c.content,variant:"hero",styles:{...o,container:d("flex-1",o?.container),typography:{...Aa,...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=Xt(u,!0);return t.jsx(F,{content:c.content,variant:"hero",styles:{...o,typography:{...Ra,...o?.typography}},bettingOdds:c.bettingOdds,matchScore:c.matchScore},c.content.id)})})]})]}):null}const La={title:"text-base font-semibold line-clamp-2",category:"text-xs",metadata:"text-xs opacity-80"};function Ma(e){return{...e,content:{...e.content,description:void 0}}}function za({items:e,sectionHeader:r,cardStyles:o,styles:s}){const a=kt(s),n=e[0],i=e.slice(1);return n?t.jsxs("div",{className:Ct(s),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(F,{content:n.content,variant:"standard",styles:{...o,container:d("h-full",o?.container)},primaryCta:n.primaryCta,secondaryCta:n.secondaryCta,bettingOdds:n.bettingOdds,matchScore:n.matchScore})}),i.length>0&&t.jsx("div",{className:d("flex flex-col",a),children:i.map(l=>{const u=Ma(l);return t.jsx(F,{content:u.content,variant:"minimal",styles:{...o,typography:{...La,...o?.typography}},bettingOdds:u.bettingOdds,matchScore:u.matchScore},u.content.id)})})]})]}):null}function Ia({variant:e="stacked",...r}){switch(e){case"spotlight":return t.jsx(Ta,{...r});case"highlight":return t.jsx(za,{...r});case"stacked":default:return t.jsx(Sa,{...r})}}const St={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl"},_a={none:"gap-0",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8"},Jr={none:"",sm:"px-2 py-1",md:"px-3 py-2",lg:"px-4 py-3"};function I(e){const r=e?.borderRadius?St[e.borderRadius]:"rounded-xl";return d("overflow-hidden",r,e?.background,e?.container)}function eo(e){return _a[e||"md"]}function Qt(e){const r=e?.typography||"text-sm font-semibold text-muted-foreground",o=e?.background||"bg-muted",s=Jr[e?.padding||"md"],a=e?.borderRadius?St[e.borderRadius]:"";return d(r,o,s,a)}function Pa(e){const r=new Map;return e.forEach(o=>{const s=o.dateGroup||o.match.metadata?.date||"Unknown",a=r.get(s)||[];r.set(s,[...a,o])}),r}function Da(e){const r=new Map;return e.forEach(o=>{const s=o.roundGroup||o.match.metadata?.round||"Unknown",a=r.get(s)||[];r.set(s,[...a,o])}),r}function Y({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 to({title:e,styles:r,action:o}){return o?t.jsxs("div",{className:d("flex items-center justify-between",Qt(r)),children:[t.jsx("span",{children:e}),o]}):t.jsx("div",{className:Qt(r),children:e})}function Ke({title:e,subtitle:r,logo:o,action:s,styles:a}){const n=a?.typography||"text-sm font-semibold",i=a?.subtitleTypography||"text-xs text-muted-foreground",l=a?.background||"bg-muted",u=Jr[a?.padding||"md"],c=a?.borderRadius?St[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:n,children:e}),r&&t.jsx("div",{className:i,children:r})]})]}),s&&t.jsx("div",{children:s})]})}function be({children:e,bettingOdds:r,oddsColumnWidth:o="w-[360px]",hasOddsColumn:s=!1}){return s?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 je({items:e,styles:r,renderMatch:o,hasOddsColumn:s}){const a=s??e.some(n=>n.bettingOdds);return t.jsx("div",{className:"flex flex-col divide-y divide-border",children:e.map(n=>t.jsx(be,{bettingOdds:n.bettingOdds,oddsColumnWidth:r?.oddsColumnWidth,hasOddsColumn:a,children:o(n)},n.match.id))})}function Jt({items:e,styles:r,sectionHeader:o,emptyMessage:s="No matches found"}){if(e.length===0)return t.jsxs("div",{className:I(r),children:[o,t.jsx(Y,{message:s})]});const a=e.some(i=>i.bettingOdds),n=i=>i.competitionGroup||i.match.metadata?.competition||"Unknown";return t.jsxs("div",{className:I(r),children:[o,t.jsx("div",{className:"flex flex-col divide-y divide-border",children:e.map((i,l)=>{const u=n(i),c=l>0?n(e[l-1]):null,m=u!==c;return t.jsxs("div",{children:[m&&t.jsx(Ke,{title:u,subtitle:i.competitionSubtitle,logo:i.competitionLogo,action:i.groupAction,styles:r?.groupHeader}),t.jsx(be,{bettingOdds:i.bettingOdds,oddsColumnWidth:r?.oddsColumnWidth,hasOddsColumn:a,children:t.jsx(O,{match:i.match,variant:"embedded",styles:r?.matchScoreStyles})})]},i.match.id)})})]})}function Oa({items:e,styles:r,sectionHeader:o,emptyMessage:s="No matches found"}){if(e.length===0)return t.jsxs("div",{className:I(r),children:[o,t.jsx(Y,{message:s})]});const a=Pa(e),n=eo(r?.groupGap||"md"),i=e.some(l=>l.bettingOdds);return t.jsxs("div",{className:I(r),children:[o,t.jsx("div",{className:d("flex flex-col",n),children:Array.from(a.entries()).map(([l,u])=>{const c=u[0];return t.jsxs("div",{children:[t.jsx(to,{title:l,styles:r?.groupHeader,action:c.groupAction}),t.jsx(je,{items:u,styles:r,hasOddsColumn:i,renderMatch:m=>t.jsx(O,{match:m.match,variant:"embedded",styles:r?.matchScoreStyles})})]},l)})})]})}function Ba({items:e,styles:r,sectionHeader:o,emptyMessage:s="No matches found",scrollToActiveRound:a=!1}){const n=A.useRef(null);if(A.useEffect(()=>{a&&n.current&&n.current.scrollIntoView({behavior:"smooth",block:"start"})},[a]),e.length===0)return t.jsxs("div",{className:I(r),children:[o,t.jsx(Y,{message:s})]});const i=Da(e),l=eo(r?.groupGap||"md"),u=e.some(c=>c.bettingOdds);return t.jsxs("div",{className:I(r),children:[o,t.jsx("div",{className:d("flex flex-col",l),children:Array.from(i.entries()).map(([c,m])=>{const p=m[0],f=m.some(w=>w.isActiveRound);return t.jsxs("div",{ref:f?n:void 0,children:[t.jsx(to,{title:c,styles:r?.groupHeader,action:p.groupAction}),t.jsx(je,{items:m,styles:r,hasOddsColumn:u,renderMatch:w=>t.jsx(O,{match:w.match,variant:"embedded",styles:r?.matchScoreStyles})})]},c)})})]})}function Ea({items:e,styles:r,sectionHeader:o,emptyMessage:s="No matches found"}){if(e.length===0)return t.jsxs("div",{className:I(r),children:[o,t.jsx(Y,{message:s})]});const a={...r?.matchScoreStyles,finishedStatusDisplay:"date"};return t.jsxs("div",{className:I(r),children:[o,t.jsx(je,{items:e,styles:r,renderMatch:n=>t.jsx(O,{match:n.match,variant:"embedded",styles:a})})]})}function $a({items:e,styles:r,sectionHeader:o,emptyMessage:s="No matches found"}){if(e.length===0)return t.jsxs("div",{className:I(r),children:[o,t.jsx(Y,{message:s})]});const a=e.some(l=>l.bettingOdds),n=l=>l.competitionGroup||l.match.metadata?.competition||"Unknown",i={...r?.matchScoreStyles,finishedStatusDisplay:"date"};return t.jsxs("div",{className:I(r),children:[o,t.jsx("div",{className:"flex flex-col divide-y divide-border",children:e.map((l,u)=>{const c=n(l),m=u>0?n(e[u-1]):null,p=c!==m;return t.jsxs("div",{children:[p&&t.jsx(Ke,{title:c,subtitle:l.competitionSubtitle,logo:l.competitionLogo,action:l.groupAction,styles:r?.groupHeader}),t.jsx(be,{bettingOdds:l.bettingOdds,oddsColumnWidth:r?.oddsColumnWidth,hasOddsColumn:a,children:t.jsx(O,{match:l.match,variant:"embedded",styles:i})})]},l.match.id)})})]})}function Ga({items:e,styles:r,sectionHeader:o,emptyMessage:s="No matches found"}){return e.length===0?t.jsxs("div",{className:I(r),children:[o,t.jsx(Y,{message:s})]}):t.jsxs("div",{className:I(r),children:[o,t.jsx(je,{items:e,styles:r,renderMatch:a=>t.jsx(O,{match:a.match,variant:"embedded",styles:r?.matchScoreStyles})})]})}function Wa({items:e,styles:r,sectionHeader:o,emptyMessage:s="No matches found"}){if(e.length===0)return t.jsxs("div",{className:I(r),children:[o,t.jsx(Y,{message:s})]});const a=e.some(i=>i.bettingOdds),n=i=>i.competitionGroup||i.match.metadata?.competition||"Unknown";return t.jsxs("div",{className:I(r),children:[o,t.jsx("div",{className:"flex flex-col divide-y divide-border",children:e.map((i,l)=>{const u=n(i),c=l>0?n(e[l-1]):null,m=u!==c;return t.jsxs("div",{children:[m&&t.jsx(Ke,{title:u,subtitle:i.competitionSubtitle,logo:i.competitionLogo,action:i.groupAction,styles:r?.groupHeader}),t.jsx(be,{bettingOdds:i.bettingOdds,oddsColumnWidth:r?.oddsColumnWidth,hasOddsColumn:a,children:t.jsx(O,{match:i.match,variant:"embedded",styles:r?.matchScoreStyles})})]},i.match.id)})})]})}function Ha({items:e,styles:r,sectionHeader:o,emptyMessage:s="No matches found"}){if(e.length===0)return t.jsxs("div",{className:I(r),children:[o,t.jsx(Y,{message:s})]});const a=e.filter(l=>l.match.status!=="scheduled"),n=e.filter(l=>l.match.status==="scheduled"),i=[...a,...n];return t.jsxs("div",{className:I(r),children:[o,t.jsx(je,{items:i,styles:r,renderMatch:l=>t.jsx(O,{match:l.match,variant:"embedded",styles:r?.matchScoreStyles})})]})}function Va({items:e,styles:r,sectionHeader:o,emptyMessage:s="No matches found"}){if(e.length===0)return t.jsxs("div",{className:I(r),children:[o,t.jsx(Y,{message:s})]});const a=e.some(l=>l.bettingOdds),n=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:I(r),children:[o,t.jsx("div",{className:"flex flex-col divide-y divide-border",children:e.map((l,u)=>{const c=n(l),m=u>0?n(e[u-1]):null,p=c!==m;return t.jsxs("div",{children:[p&&t.jsx(Ke,{title:c,subtitle:l.competitionSubtitle,logo:l.competitionLogo,action:l.groupAction,styles:r?.groupHeader}),t.jsx(be,{bettingOdds:l.bettingOdds,oddsColumnWidth:r?.oddsColumnWidth,hasOddsColumn:a,children:t.jsx(O,{match:l.match,variant:"embedded",styles:i(l)})})]},l.match.id)})})]})}function Ua({variant:e="daily",...r}){switch(e){case"daily":return t.jsx(Jt,{...r});case"round":return t.jsx(Oa,{...r});case"competition":return t.jsx(Ba,{...r});case"teamResults":return t.jsx(Ea,{...r});case"teamResultsByCompetition":return t.jsx($a,{...r});case"teamFixtures":return t.jsx(Ga,{...r});case"teamFixturesByCompetition":return t.jsx(Wa,{...r});case"teamMatches":return t.jsx(Ha,{...r});case"teamMatchesByCompetition":return t.jsx(Va,{...r});default:return t.jsx(Jt,{...r})}}const Fa="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 ro(e){return e.imageUrl||Fa}const At={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl"},oo={none:"gap-0",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8"};function Pe(e){const r=e?.borderRadius?At[e.borderRadius]:"rounded-xl",o=e?.background||"bg-card";return d("overflow-hidden",r,o,e?.container)}function so(e){return oo[e?.groupGap||"md"]}function De(e){return oo[e?.memberGap||"sm"]}function no(e,r){const o=new Map;r&&r.forEach(n=>o.set(n.key,n));const s=new Map;e.forEach(n=>{const i=n.positionGroup;s.has(i)||s.set(i,[]),s.get(i).push(n)});const a=Array.from(s.entries()).map(([n,i])=>{const l=o.get(n);return{key:n,label:l?.label||n,order:l?.order??999,members:i}});return a.sort((n,i)=>n.order-i.order),a.map(({key:n,label:i,members:l})=>({key:n,label:i,members:l}))}function Ya(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",er={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 tr({member:e,display:r,styles:o}){const s=o?.memberNameTypography||"font-semibold text-foreground",a=o?.memberSubtitleTypography||"text-xs text-muted-foreground",n=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=n?.background||"bg-muted",m=n?.borderRadius?At[n.borderRadius]:"rounded-lg",p=n?.padding||"p-3",f=n?.gap||"gap-3";return t.jsxs(l,{className:d(c,m,p,"flex flex-col",f,i&&"cursor-pointer hover:opacity-80 transition-opacity",n?.container),...u,children:[t.jsx($,{name:e.name,mobileName:e.shortName,imageUrl:ro(e),subtitle:Ya(e,r),styles:{imageBorderRadius:"full",imageSize:n?.entityDisplay?.imageSize||"xl",typography:{name:s,subtitle:a},gap:"3",...n?.entityDisplay}}),e.stats&&e.stats.length>0&&t.jsx(Q,{items:e.stats,itemVariant:"stacked",styles:{grid:{colsMobile:3,colsTablet:3,colsDesktop:3,gap:"sm",...n?.statsGrid},item:{alignment:"center",padding:"sm",borderRadius:"md",background:"bg-foreground/5",typography:{value:"text-sm font-semibold text-foreground",label:"text-[9px] font-medium text-muted-foreground uppercase"},...n?.statsItem}}})]},e.id)}function Za({members:e,groupByPosition:r=!0,positionGroups:o,display:s={showNumber:!0,showPosition:!0},header:a,styles:n}){const i=n?.groupHeaderTypography||qa,l=n?.columns||3,u=er[l]||er[3];if(r){const c=no(e,o);return t.jsxs("div",{className:Pe(n),children:[a&&t.jsx("div",{className:"p-4 border-b border-muted",children:a}),t.jsx("div",{className:d("p-4 flex flex-col",so(n)),children: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,De(n)),children:m.members.map(p=>t.jsx(tr,{member:p,display:s,styles:n},p.id))})]},m.key))})]})}return t.jsxs("div",{className:Pe(n),children:[a&&t.jsx("div",{className:"p-4 border-b border-muted",children:a}),t.jsx("div",{className:"p-4",children:t.jsx("div",{className:d("grid",u,De(n)),children:e.map(c=>t.jsx(tr,{member:c,display:s,styles:n},c.id))})})]})}const Ka="text-sm font-semibold text-muted-foreground uppercase tracking-wider",rr={1:"grid-cols-1",2:"grid-cols-1 sm:grid-cols-2"};function Xa(e){const r=new Date(e),o=new Date;let s=o.getFullYear()-r.getFullYear();const a=o.getMonth()-r.getMonth();return(a<0||a===0&&o.getDate()<r.getDate())&&s--,s}function Qa(e,r){const o=[];if(r?.showPosition&&e.position&&o.push({label:"Position",value:e.position}),e.birthDate&&o.push({label:"Age",value:`${Xa(e.birthDate)}`}),e.height&&o.push({label:"Height",value:e.height}),e.contractEnd){const s=new Date(e.contractEnd).getFullYear();o.push({label:"Contract",value:`${s}`})}return e.marketValue&&o.push({label:"Value",value:e.marketValue}),o}function or({member:e,display:r,styles:o}){const s=Qa(e,r),a=o?.memberCard,n=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?At[a.borderRadius]:"rounded-xl";return t.jsxs(i,{className:d(u,c,"overflow-hidden flex flex-row",n&&"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:ro(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})]}),s.length>0&&t.jsx("div",{className:"flex flex-wrap gap-x-4 gap-y-1 text-sm",children:s.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(Q,{items:e.stats,itemVariant:"stacked",styles:{grid:{colsMobile:3,colsTablet:3,colsDesktop:3,gap:"sm",...a?.statsGrid},item:{alignment:"center",padding:"sm",borderRadius:"lg",background:"bg-foreground/5",typography:{value:"text-lg font-bold text-foreground",label:"text-[10px] font-medium text-muted-foreground uppercase"},...a?.statsItem}}})]})]})}function Ja({members:e,groupByPosition:r=!0,positionGroups:o,display:s={showNumber:!0,showPosition:!0},header:a,styles:n}){const i=n?.groupHeaderTypography||Ka,l=n?.columns||2,u=rr[l]||rr[2];if(r){const c=no(e,o);return t.jsxs("div",{className:Pe(n),children:[a&&t.jsx("div",{className:"p-4 border-b border-muted",children:a}),t.jsx("div",{className:d("p-4 flex flex-col",so(n)),children: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,De(n)),children:m.members.map(p=>t.jsx(or,{member:p,display:s,styles:n},p.id))})]},m.key))})]})}return t.jsxs("div",{className:Pe(n),children:[a&&t.jsx("div",{className:"p-4 border-b border-muted",children:a}),t.jsx("div",{className:"p-4",children:t.jsx("div",{className:d("grid",u,De(n)),children:e.map(c=>t.jsx(or,{member:c,display:s,styles:n},c.id))})})]})}function ei({variant:e="card",...r}){switch(e){case"detailed":return t.jsx(Ja,{...r});case"card":default:return t.jsx(Za,{...r})}}exports.Badge=ut;exports.BadgeGroup=mt;exports.BarItem=Gr;exports.BettingOdds=Ar;exports.CTAButton=rs;exports.CTAGroup=Oe;exports.ComparisonItem=Wr;exports.CompetitorProfileBlock=ca;exports.ContentCard=F;exports.ContentListBlock=va;exports.Countdown=hr;exports.DefaultStatItem=zr;exports.EntityDisplay=$;exports.FORM_INDICATOR_DEFAULT_LABELS=wt;exports.FeaturedContentBlock=Ia;exports.FormIndicator=he;exports.HeadToHeadBlock=Qn;exports.HeadToHeadItem=Hr;exports.HeroCard=br;exports.HorizontalStatItem=_r;exports.InlineScore=Sr;exports.MatchListBlock=Ua;exports.MatchScore=O;exports.MatchupHeader=Nt;exports.MinimalCard=kr;exports.Pagination=ht;exports.ProfileHeader=fe;exports.PromoCard=Cr;exports.ScoreCard=Rr;exports.ScoreLine=Tr;exports.SectionHeader=T;exports.SquadBlock=ei;exports.StackedStatItem=Ir;exports.StandardCard=Nr;exports.StatItem=Pr;exports.StatsGrid=Q;exports.StatsHeadToHead=vt;exports.StatsTable=mn;exports.Tooltip=de;exports.cn=d;
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),A=require("react"),io=require("react-dom"),lo=(e,r)=>{const o=new Array(e.length+r.length);for(let s=0;s<e.length;s++)o[s]=e[s];for(let s=0;s<r.length;s++)o[e.length+s]=r[s];return o},co=(e,r)=>({classGroupId:e,validator:r}),ar=(e=new Map,r=null,o)=>({nextPart:e,validators:r,classGroupId:o}),Ie="-",Dt=[],uo="arbitrary..",mo=e=>{const r=po(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:s}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return go(i);const l=i.split(Ie),u=l[0]===""&&l.length>1?1:0;return ir(l,u,r)},getConflictingClassGroupIds:(i,l)=>{if(l){const u=s[i],c=o[i];return u?c?lo(c,u):u:c||Dt}return o[i]||Dt}}},ir=(e,r,o)=>{if(e.length-r===0)return o.classGroupId;const a=e[r],n=o.nextPart.get(a);if(n){const c=ir(e,r+1,n);if(c)return c}const i=o.validators;if(i===null)return;const l=r===0?e.join(Ie):e.slice(r).join(Ie),u=i.length;for(let c=0;c<u;c++){const m=i[c];if(m.validator(l))return m.classGroupId}},go=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const r=e.slice(1,-1),o=r.indexOf(":"),s=r.slice(0,o);return s?uo+s:void 0})(),po=e=>{const{theme:r,classGroups:o}=e;return xo(o,r)},xo=(e,r)=>{const o=ar();for(const s in e){const a=e[s];mt(a,o,s,r)}return o},mt=(e,r,o,s)=>{const a=e.length;for(let n=0;n<a;n++){const i=e[n];ho(i,r,o,s)}},ho=(e,r,o,s)=>{if(typeof e=="string"){fo(e,r,o);return}if(typeof e=="function"){bo(e,r,o,s);return}jo(e,r,o,s)},fo=(e,r,o)=>{const s=e===""?r:lr(r,e);s.classGroupId=o},bo=(e,r,o,s)=>{if(vo(e)){mt(e(s),r,o,s);return}r.validators===null&&(r.validators=[]),r.validators.push(co(o,e))},jo=(e,r,o,s)=>{const a=Object.entries(e),n=a.length;for(let i=0;i<n;i++){const[l,u]=a[i];mt(u,lr(r,l),o,s)}},lr=(e,r)=>{let o=e;const s=r.split(Ie),a=s.length;for(let n=0;n<a;n++){const i=s[n];let l=o.nextPart.get(i);l||(l=ar(),o.nextPart.set(i,l)),o=l}return o},vo=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,wo=e=>{if(e<1)return{get:()=>{},set:()=>{}};let r=0,o=Object.create(null),s=Object.create(null);const a=(n,i)=>{o[n]=i,r++,r>e&&(r=0,s=o,o=Object.create(null))};return{get(n){let i=o[n];if(i!==void 0)return i;if((i=s[n])!==void 0)return a(n,i),i},set(n,i){n in o?o[n]=i:a(n,i)}}},ct="!",Ot=":",yo=[],Bt=(e,r,o,s,a)=>({modifiers:e,hasImportantModifier:r,baseClassName:o,maybePostfixModifierPosition:s,isExternal:a}),No=e=>{const{prefix:r,experimentalParseClassName:o}=e;let s=a=>{const n=[];let i=0,l=0,u=0,c;const m=a.length;for(let v=0;v<m;v++){const N=a[v];if(i===0&&l===0){if(N===Ot){n.push(a.slice(u,v)),u=v+1;continue}if(N==="/"){c=v;continue}}N==="["?i++:N==="]"?i--:N==="("?l++:N===")"&&l--}const g=n.length===0?a:a.slice(u);let f=g,w=!1;g.endsWith(ct)?(f=g.slice(0,-1),w=!0):g.startsWith(ct)&&(f=g.slice(1),w=!0);const S=c&&c>u?c-u:void 0;return Bt(n,w,f,S)};if(r){const a=r+Ot,n=s;s=i=>i.startsWith(a)?n(i.slice(a.length)):Bt(yo,!1,i,void 0,!0)}if(o){const a=s;s=n=>o({className:n,parseClassName:a})}return s},Co=e=>{const r=new Map;return e.orderSensitiveModifiers.forEach((o,s)=>{r.set(o,1e6+s)}),o=>{const s=[];let a=[];for(let n=0;n<o.length;n++){const i=o[n],l=i[0]==="[",u=r.has(i);l||u?(a.length>0&&(a.sort(),s.push(...a),a=[]),s.push(i)):a.push(i)}return a.length>0&&(a.sort(),s.push(...a)),s}},ko=e=>({cache:wo(e.cacheSize),parseClassName:No(e),sortModifiers:Co(e),...mo(e)}),So=/\s+/,Ao=(e,r)=>{const{parseClassName:o,getClassGroupId:s,getConflictingClassGroupIds:a,sortModifiers:n}=r,i=[],l=e.trim().split(So);let u="";for(let c=l.length-1;c>=0;c-=1){const m=l[c],{isExternal:g,modifiers:f,hasImportantModifier:w,baseClassName:S,maybePostfixModifierPosition:v}=o(m);if(g){u=m+(u.length>0?" "+u:u);continue}let N=!!v,b=s(N?S.substring(0,v):S);if(!b){if(!N){u=m+(u.length>0?" "+u:u);continue}if(b=s(S),!b){u=m+(u.length>0?" "+u:u);continue}N=!1}const h=f.length===0?"":f.length===1?f[0]:n(f).join(":"),k=w?h+ct:h,R=k+b;if(i.indexOf(R)>-1)continue;i.push(R);const M=a(b,N);for(let P=0;P<M.length;++P){const E=M[P];i.push(k+E)}u=m+(u.length>0?" "+u:u)}return u},Ro=(...e)=>{let r=0,o,s,a="";for(;r<e.length;)(o=e[r++])&&(s=dr(o))&&(a&&(a+=" "),a+=s);return a},dr=e=>{if(typeof e=="string")return e;let r,o="";for(let s=0;s<e.length;s++)e[s]&&(r=dr(e[s]))&&(o&&(o+=" "),o+=r);return o},To=(e,...r)=>{let o,s,a,n;const i=u=>{const c=r.reduce((m,g)=>g(m),e());return o=ko(c),s=o.cache.get,a=o.cache.set,n=l,l(u)},l=u=>{const c=s(u);if(c)return c;const m=Ao(u,o);return a(u,m),m};return n=i,(...u)=>n(Ro(...u))},Lo=[],L=e=>{const r=o=>o[e]||Lo;return r.isThemeGetter=!0,r},cr=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ur=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Mo=/^\d+\/\d+$/,zo=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Io=/\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$/,_o=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Po=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Do=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ee=e=>Mo.test(e),C=e=>!!e&&!Number.isNaN(Number(e)),q=e=>!!e&&Number.isInteger(Number(e)),rt=e=>e.endsWith("%")&&C(e.slice(0,-1)),H=e=>zo.test(e),Oo=()=>!0,Bo=e=>Io.test(e)&&!_o.test(e),mr=()=>!1,Eo=e=>Po.test(e),$o=e=>Do.test(e),Go=e=>!p(e)&&!x(e),Wo=e=>oe(e,xr,mr),p=e=>cr.test(e),K=e=>oe(e,hr,Bo),ot=e=>oe(e,Yo,C),Et=e=>oe(e,gr,mr),Ho=e=>oe(e,pr,$o),Ae=e=>oe(e,fr,Eo),x=e=>ur.test(e),le=e=>se(e,hr),Vo=e=>se(e,qo),$t=e=>se(e,gr),Uo=e=>se(e,xr),Fo=e=>se(e,pr),Re=e=>se(e,fr,!0),oe=(e,r,o)=>{const s=cr.exec(e);return s?s[1]?r(s[1]):o(s[2]):!1},se=(e,r,o=!1)=>{const s=ur.exec(e);return s?s[1]?r(s[1]):o:!1},gr=e=>e==="position"||e==="percentage",pr=e=>e==="image"||e==="url",xr=e=>e==="length"||e==="size"||e==="bg-size",hr=e=>e==="length",Yo=e=>e==="number",qo=e=>e==="family-name",fr=e=>e==="shadow",Zo=()=>{const e=L("color"),r=L("font"),o=L("text"),s=L("font-weight"),a=L("tracking"),n=L("leading"),i=L("breakpoint"),l=L("container"),u=L("spacing"),c=L("radius"),m=L("shadow"),g=L("inset-shadow"),f=L("text-shadow"),w=L("drop-shadow"),S=L("blur"),v=L("perspective"),N=L("aspect"),b=L("ease"),h=L("animate"),k=()=>["auto","avoid","all","avoid-page","page","left","right","column"],R=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],M=()=>[...R(),x,p],P=()=>["auto","hidden","clip","visible","scroll"],E=()=>["auto","contain","none"],j=()=>[x,p,u],_=()=>[ee,"full","auto",...j()],ve=()=>[q,"none","subgrid",x,p],we=()=>["auto",{span:["full",q,x,p]},q,x,p],ye=()=>[q,"auto",x,p],Lt=()=>["auto","min","max","fr",x,p],Je=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],J=()=>["start","end","center","stretch","center-safe","end-safe"],W=()=>["auto",...j()],Z=()=>[ee,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...j()],y=()=>[e,x,p],Mt=()=>[...R(),$t,Et,{position:[x,p]}],zt=()=>["no-repeat",{repeat:["","x","y","space","round"]}],It=()=>["auto","cover","contain",Uo,Wo,{size:[x,p]}],et=()=>[rt,le,K],D=()=>["","none","full",c,x,p],B=()=>["",C,le,K],Ne=()=>["solid","dashed","dotted","double"],_t=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],z=()=>[C,rt,$t,Et],Pt=()=>["","none",S,x,p],Ce=()=>["none",C,x,p],ke=()=>["none",C,x,p],tt=()=>[C,x,p],Se=()=>[ee,"full",...j()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[H],breakpoint:[H],color:[Oo],container:[H],"drop-shadow":[H],ease:["in","out","in-out"],font:[Go],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[H],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[H],shadow:[H],spacing:["px",C],text:[H],"text-shadow":[H],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ee,p,x,N]}],container:["container"],columns:[{columns:[C,p,x,l]}],"break-after":[{"break-after":k()}],"break-before":[{"break-before":k()}],"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:M()}],overflow:[{overflow:P()}],"overflow-x":[{"overflow-x":P()}],"overflow-y":[{"overflow-y":P()}],overscroll:[{overscroll:E()}],"overscroll-x":[{"overscroll-x":E()}],"overscroll-y":[{"overscroll-y":E()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:_()}],"inset-x":[{"inset-x":_()}],"inset-y":[{"inset-y":_()}],start:[{start:_()}],end:[{end:_()}],top:[{top:_()}],right:[{right:_()}],bottom:[{bottom:_()}],left:[{left:_()}],visibility:["visible","invisible","collapse"],z:[{z:[q,"auto",x,p]}],basis:[{basis:[ee,"full","auto",l,...j()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[C,ee,"auto","initial","none",p]}],grow:[{grow:["",C,x,p]}],shrink:[{shrink:["",C,x,p]}],order:[{order:[q,"first","last","none",x,p]}],"grid-cols":[{"grid-cols":ve()}],"col-start-end":[{col:we()}],"col-start":[{"col-start":ye()}],"col-end":[{"col-end":ye()}],"grid-rows":[{"grid-rows":ve()}],"row-start-end":[{row:we()}],"row-start":[{"row-start":ye()}],"row-end":[{"row-end":ye()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Lt()}],"auto-rows":[{"auto-rows":Lt()}],gap:[{gap:j()}],"gap-x":[{"gap-x":j()}],"gap-y":[{"gap-y":j()}],"justify-content":[{justify:[...Je(),"normal"]}],"justify-items":[{"justify-items":[...J(),"normal"]}],"justify-self":[{"justify-self":["auto",...J()]}],"align-content":[{content:["normal",...Je()]}],"align-items":[{items:[...J(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...J(),{baseline:["","last"]}]}],"place-content":[{"place-content":Je()}],"place-items":[{"place-items":[...J(),"baseline"]}],"place-self":[{"place-self":["auto",...J()]}],p:[{p:j()}],px:[{px:j()}],py:[{py:j()}],ps:[{ps:j()}],pe:[{pe:j()}],pt:[{pt:j()}],pr:[{pr:j()}],pb:[{pb:j()}],pl:[{pl:j()}],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":j()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":j()}],"space-y-reverse":["space-y-reverse"],size:[{size:Z()}],w:[{w:[l,"screen",...Z()]}],"min-w":[{"min-w":[l,"screen","none",...Z()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[i]},...Z()]}],h:[{h:["screen","lh",...Z()]}],"min-h":[{"min-h":["screen","lh","none",...Z()]}],"max-h":[{"max-h":["screen","lh",...Z()]}],"font-size":[{text:["base",o,le,K]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,x,ot]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",rt,p]}],"font-family":[{font:[Vo,p,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,x,p]}],"line-clamp":[{"line-clamp":[C,"none",x,ot]}],leading:[{leading:[n,...j()]}],"list-image":[{"list-image":["none",x,p]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",x,p]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:y()}],"text-color":[{text:y()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Ne(),"wavy"]}],"text-decoration-thickness":[{decoration:[C,"from-font","auto",x,K]}],"text-decoration-color":[{decoration:y()}],"underline-offset":[{"underline-offset":[C,"auto",x,p]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:j()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",x,p]}],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",x,p]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Mt()}],"bg-repeat":[{bg:zt()}],"bg-size":[{bg:It()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},q,x,p],radial:["",x,p],conic:[q,x,p]},Fo,Ho]}],"bg-color":[{bg:y()}],"gradient-from-pos":[{from:et()}],"gradient-via-pos":[{via:et()}],"gradient-to-pos":[{to:et()}],"gradient-from":[{from:y()}],"gradient-via":[{via:y()}],"gradient-to":[{to:y()}],rounded:[{rounded:D()}],"rounded-s":[{"rounded-s":D()}],"rounded-e":[{"rounded-e":D()}],"rounded-t":[{"rounded-t":D()}],"rounded-r":[{"rounded-r":D()}],"rounded-b":[{"rounded-b":D()}],"rounded-l":[{"rounded-l":D()}],"rounded-ss":[{"rounded-ss":D()}],"rounded-se":[{"rounded-se":D()}],"rounded-ee":[{"rounded-ee":D()}],"rounded-es":[{"rounded-es":D()}],"rounded-tl":[{"rounded-tl":D()}],"rounded-tr":[{"rounded-tr":D()}],"rounded-br":[{"rounded-br":D()}],"rounded-bl":[{"rounded-bl":D()}],"border-w":[{border:B()}],"border-w-x":[{"border-x":B()}],"border-w-y":[{"border-y":B()}],"border-w-s":[{"border-s":B()}],"border-w-e":[{"border-e":B()}],"border-w-t":[{"border-t":B()}],"border-w-r":[{"border-r":B()}],"border-w-b":[{"border-b":B()}],"border-w-l":[{"border-l":B()}],"divide-x":[{"divide-x":B()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":B()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Ne(),"hidden","none"]}],"divide-style":[{divide:[...Ne(),"hidden","none"]}],"border-color":[{border:y()}],"border-color-x":[{"border-x":y()}],"border-color-y":[{"border-y":y()}],"border-color-s":[{"border-s":y()}],"border-color-e":[{"border-e":y()}],"border-color-t":[{"border-t":y()}],"border-color-r":[{"border-r":y()}],"border-color-b":[{"border-b":y()}],"border-color-l":[{"border-l":y()}],"divide-color":[{divide:y()}],"outline-style":[{outline:[...Ne(),"none","hidden"]}],"outline-offset":[{"outline-offset":[C,x,p]}],"outline-w":[{outline:["",C,le,K]}],"outline-color":[{outline:y()}],shadow:[{shadow:["","none",m,Re,Ae]}],"shadow-color":[{shadow:y()}],"inset-shadow":[{"inset-shadow":["none",g,Re,Ae]}],"inset-shadow-color":[{"inset-shadow":y()}],"ring-w":[{ring:B()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:y()}],"ring-offset-w":[{"ring-offset":[C,K]}],"ring-offset-color":[{"ring-offset":y()}],"inset-ring-w":[{"inset-ring":B()}],"inset-ring-color":[{"inset-ring":y()}],"text-shadow":[{"text-shadow":["none",f,Re,Ae]}],"text-shadow-color":[{"text-shadow":y()}],opacity:[{opacity:[C,x,p]}],"mix-blend":[{"mix-blend":[..._t(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":_t()}],"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":z()}],"mask-image-linear-to-pos":[{"mask-linear-to":z()}],"mask-image-linear-from-color":[{"mask-linear-from":y()}],"mask-image-linear-to-color":[{"mask-linear-to":y()}],"mask-image-t-from-pos":[{"mask-t-from":z()}],"mask-image-t-to-pos":[{"mask-t-to":z()}],"mask-image-t-from-color":[{"mask-t-from":y()}],"mask-image-t-to-color":[{"mask-t-to":y()}],"mask-image-r-from-pos":[{"mask-r-from":z()}],"mask-image-r-to-pos":[{"mask-r-to":z()}],"mask-image-r-from-color":[{"mask-r-from":y()}],"mask-image-r-to-color":[{"mask-r-to":y()}],"mask-image-b-from-pos":[{"mask-b-from":z()}],"mask-image-b-to-pos":[{"mask-b-to":z()}],"mask-image-b-from-color":[{"mask-b-from":y()}],"mask-image-b-to-color":[{"mask-b-to":y()}],"mask-image-l-from-pos":[{"mask-l-from":z()}],"mask-image-l-to-pos":[{"mask-l-to":z()}],"mask-image-l-from-color":[{"mask-l-from":y()}],"mask-image-l-to-color":[{"mask-l-to":y()}],"mask-image-x-from-pos":[{"mask-x-from":z()}],"mask-image-x-to-pos":[{"mask-x-to":z()}],"mask-image-x-from-color":[{"mask-x-from":y()}],"mask-image-x-to-color":[{"mask-x-to":y()}],"mask-image-y-from-pos":[{"mask-y-from":z()}],"mask-image-y-to-pos":[{"mask-y-to":z()}],"mask-image-y-from-color":[{"mask-y-from":y()}],"mask-image-y-to-color":[{"mask-y-to":y()}],"mask-image-radial":[{"mask-radial":[x,p]}],"mask-image-radial-from-pos":[{"mask-radial-from":z()}],"mask-image-radial-to-pos":[{"mask-radial-to":z()}],"mask-image-radial-from-color":[{"mask-radial-from":y()}],"mask-image-radial-to-color":[{"mask-radial-to":y()}],"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":R()}],"mask-image-conic-pos":[{"mask-conic":[C]}],"mask-image-conic-from-pos":[{"mask-conic-from":z()}],"mask-image-conic-to-pos":[{"mask-conic-to":z()}],"mask-image-conic-from-color":[{"mask-conic-from":y()}],"mask-image-conic-to-color":[{"mask-conic-to":y()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Mt()}],"mask-repeat":[{mask:zt()}],"mask-size":[{mask:It()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",x,p]}],filter:[{filter:["","none",x,p]}],blur:[{blur:Pt()}],brightness:[{brightness:[C,x,p]}],contrast:[{contrast:[C,x,p]}],"drop-shadow":[{"drop-shadow":["","none",w,Re,Ae]}],"drop-shadow-color":[{"drop-shadow":y()}],grayscale:[{grayscale:["",C,x,p]}],"hue-rotate":[{"hue-rotate":[C,x,p]}],invert:[{invert:["",C,x,p]}],saturate:[{saturate:[C,x,p]}],sepia:[{sepia:["",C,x,p]}],"backdrop-filter":[{"backdrop-filter":["","none",x,p]}],"backdrop-blur":[{"backdrop-blur":Pt()}],"backdrop-brightness":[{"backdrop-brightness":[C,x,p]}],"backdrop-contrast":[{"backdrop-contrast":[C,x,p]}],"backdrop-grayscale":[{"backdrop-grayscale":["",C,x,p]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[C,x,p]}],"backdrop-invert":[{"backdrop-invert":["",C,x,p]}],"backdrop-opacity":[{"backdrop-opacity":[C,x,p]}],"backdrop-saturate":[{"backdrop-saturate":[C,x,p]}],"backdrop-sepia":[{"backdrop-sepia":["",C,x,p]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":j()}],"border-spacing-x":[{"border-spacing-x":j()}],"border-spacing-y":[{"border-spacing-y":j()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",x,p]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[C,"initial",x,p]}],ease:[{ease:["linear","initial",b,x,p]}],delay:[{delay:[C,x,p]}],animate:[{animate:["none",h,x,p]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[v,x,p]}],"perspective-origin":[{"perspective-origin":M()}],rotate:[{rotate:Ce()}],"rotate-x":[{"rotate-x":Ce()}],"rotate-y":[{"rotate-y":Ce()}],"rotate-z":[{"rotate-z":Ce()}],scale:[{scale:ke()}],"scale-x":[{"scale-x":ke()}],"scale-y":[{"scale-y":ke()}],"scale-z":[{"scale-z":ke()}],"scale-3d":["scale-3d"],skew:[{skew:tt()}],"skew-x":[{"skew-x":tt()}],"skew-y":[{"skew-y":tt()}],transform:[{transform:[x,p,"","none","gpu","cpu"]}],"transform-origin":[{origin:M()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Se()}],"translate-x":[{"translate-x":Se()}],"translate-y":[{"translate-y":Se()}],"translate-z":[{"translate-z":Se()}],"translate-none":["translate-none"],accent:[{accent:y()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:y()}],"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",x,p]}],"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":j()}],"scroll-mx":[{"scroll-mx":j()}],"scroll-my":[{"scroll-my":j()}],"scroll-ms":[{"scroll-ms":j()}],"scroll-me":[{"scroll-me":j()}],"scroll-mt":[{"scroll-mt":j()}],"scroll-mr":[{"scroll-mr":j()}],"scroll-mb":[{"scroll-mb":j()}],"scroll-ml":[{"scroll-ml":j()}],"scroll-p":[{"scroll-p":j()}],"scroll-px":[{"scroll-px":j()}],"scroll-py":[{"scroll-py":j()}],"scroll-ps":[{"scroll-ps":j()}],"scroll-pe":[{"scroll-pe":j()}],"scroll-pt":[{"scroll-pt":j()}],"scroll-pr":[{"scroll-pr":j()}],"scroll-pb":[{"scroll-pb":j()}],"scroll-pl":[{"scroll-pl":j()}],"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",x,p]}],fill:[{fill:["none",...y()]}],"stroke-w":[{stroke:[C,le,K,ot]}],stroke:[{stroke:["none",...y()]}],"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"]}},Ko=To(Zo);function d(...e){return Ko(e.filter(Boolean).join(" "))}const Xo={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",s=Xo[r],a=e.styles?.container,n=o?a:d("inline-block text-xs font-semibold px-2 sm:px-3 py-1 rounded border",s,a);return t.jsx("span",{role:"status","aria-label":e.text,className:n,children:e.text})}const Qo={"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 pt({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(s=>{const a=e.filter(n=>n.position===s);return a.length===0?null:t.jsx("div",{className:d(Qo[s],o?.container),role:"group","aria-label":`${s} badges`,children:a.map((n,i)=>t.jsx(gt,{badge:n},`${s}-${i}`))},s)})})}const Jo={gap:{none:"gap-0",sm:"gap-1",md:"gap-2",lg:"gap-3",xl:"gap-4"}},xt={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 es(e){return`${e?.cell??xt.cell} flex min-w-12 text-center items-center justify-center`}function ts(e){return Jo.gap[e?.gap??xt.gap]}function Gt(e,r){return r?.typography?.[e]??xt.typography[e]}const Te={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 br({targetDate:e,styles:r,labels:o}){const s=A.useMemo(()=>typeof e=="string"?new Date(e):e,[e]),[a,n]=A.useState(Wt(s)),i=es(r),l=ts(r),u=Gt("value",r),c=Gt("label",r),m={days:o?.days??Te.days,hours:o?.hours??Te.hours,minutes:o?.minutes??Te.minutes,seconds:o?.seconds??Te.seconds};return A.useEffect(()=>{const g=setInterval(()=>{n(Wt(s))},1e3);return()=>clearInterval(g)},[s]),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 rs={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 os({cta:e}){const r=e.variant==="custom",o=rs[e.variant||"default"],s=e.styles?.container,a=r?s: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",o,s),n=i=>{e.onClick&&(i.preventDefault(),i.stopPropagation(),e.onClick())};return e.href?t.jsx("a",{href:e.href,className:a,onClick:n,role:"link","aria-label":e.text,children:e.text}):t.jsx("button",{type:"button",className:a,onClick:n,"aria-label":e.text,children:e.text})}const ss={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 Ee({primaryCta:e,secondaryCta:r,layout:o="responsive",styles:s}){return!e&&!r?null:t.jsxs("div",{role:"group","aria-label":"Call to action buttons",className:d(ss[o],s?.container),children:[e,r]})}const ns={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"},as={1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4"},is={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl",full:"rounded-full"};function $({name:e,mobileName:r,imageUrl:o,subtitle:s,orientation:a="ltr",truncate:n=!1,styles:i}){const l=i?.imageSize||"md",u=i?.imageBorderRadius||"md",c=i?.imageBorder||"",m=i?.gap||"2",g=i?.textAlign||"left",f=ns[l],w=is[u],S=as[m],v=i?.typography?.name||"font-semibold leading-5",N=i?.typography?.subtitle||"text-xs text-muted-foreground",b=a==="rtl"?"flex-row-reverse":"flex-row",h=g==="right"?"text-right":"text-left";return t.jsxs("div",{className:d("flex items-center",b,S,i?.container),role:"group","aria-label":`${e}${s?` - ${s}`:""}`,children:[o&&t.jsx("img",{src:o,alt:"","aria-hidden":"true",className:d(f,w,"object-cover shrink-0",c)}),t.jsxs("div",{className:d("flex flex-col",h,n&&"min-w-0"),children:[r?t.jsxs("span",{className:d(v,n&&"truncate"),children:[t.jsx("span",{className:"sm:hidden",children:r}),t.jsx("span",{className:"hidden sm:inline",children:e})]}):t.jsx("span",{className:d(v,n&&"truncate"),children:e}),s&&t.jsx("span",{className:d(N,n&&"truncate"),children:s})]})]})}const ne={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"}},$e={sm:"gap-1",md:"gap-2",lg:"gap-3"},Ge={previous:"Previous",next:"Next",first:"First",last:"Last",loadMore:"Load More",pageInfo:"Page {current} of {total}"},ht=({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"})}),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:"M9 5l7 7-7 7"})}),ls=({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"})}),ds=({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 V({onClick:e,disabled:r,active:o,size:s,styles:a,children:n,ariaLabel:i}){const l=ne[s],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:n})}function cs(e,r,o){if(r<=o)return Array.from({length:r},(l,u)=>u+1);const s=Math.floor(o/2);let a=Math.max(1,e-s),n=Math.min(r,a+o-1);n-a+1<o&&(a=Math.max(1,n-o+1));const i=[];a>1&&(i.push(1),a>2&&i.push("ellipsis"));for(let l=a;l<=n;l++)l!==1&&l!==r&&i.push(l);return n<r&&(n<r-1&&i.push("ellipsis"),i.push(r)),i}function us({currentPage:e,totalPages:r,onPageChange:o,disabled:s,size:a="md",icons:n,labels:i,styles:l,maxVisiblePages:u=5,showFirstLast:c=!1,showPrevNext:m=!0}){const g=ne[a],f={...Ge,...i},w=cs(e,r,u),S=$e[l?.gap||"sm"];return t.jsxs("nav",{className:d("flex items-center",S,l?.container),"aria-label":"Pagination",children:[c&&t.jsx(V,{onClick:()=>o(1),disabled:s||e===1,size:a,styles:l,ariaLabel:f.first,children:n?.first||t.jsx(ls,{className:g.icon})}),m&&t.jsx(V,{onClick:()=>o(e-1),disabled:s||e===1,size:a,styles:l,ariaLabel:f.previous,children:n?.previous||t.jsx(ht,{className:g.icon})}),w.map((v,N)=>v==="ellipsis"?t.jsx("span",{className:"px-2 text-muted-foreground",children:"..."},`ellipsis-${N}`):t.jsx(V,{onClick:()=>o(v),disabled:s,active:v===e,size:a,styles:l,ariaLabel:`Page ${v}`,children:v},v)),m&&t.jsx(V,{onClick:()=>o(e+1),disabled:s||e===r,size:a,styles:l,ariaLabel:f.next,children:n?.next||t.jsx(ft,{className:g.icon})}),c&&t.jsx(V,{onClick:()=>o(r),disabled:s||e===r,size:a,styles:l,ariaLabel:f.last,children:n?.last||t.jsx(ds,{className:g.icon})})]})}function ms({currentPage:e,totalPages:r,onPageChange:o,disabled:s,size:a="md",icons:n,labels:i,styles:l,showLabels:u=!0}){const c=ne[a],m={...Ge,...i},g=$e[l?.gap||"md"];return t.jsxs("nav",{className:d("flex items-center",g,l?.container),"aria-label":"Pagination",children:[t.jsxs(V,{onClick:()=>o(e-1),disabled:s||e===1,size:a,styles:l,ariaLabel:m.previous,children:[n?.previous||t.jsx(ht,{className:c.icon}),u&&t.jsx("span",{className:"ml-1",children:m.previous})]}),t.jsxs(V,{onClick:()=>o(e+1),disabled:s||e===r,size:a,styles:l,ariaLabel:m.next,children:[u&&t.jsx("span",{className:"mr-1",children:m.next}),n?.next||t.jsx(ft,{className:c.icon})]})]})}function gs({currentPage:e,totalPages:r,onPageChange:o,disabled:s,size:a="md",icons:n,labels:i,styles:l}){const u=ne[a],c={...Ge,...i},m=$e[l?.gap||"md"],g=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(V,{onClick:()=>o(e-1),disabled:s||e===1,size:a,styles:l,ariaLabel:c.previous,children:n?.previous||t.jsx(ht,{className:u.icon})}),t.jsx("span",{className:d("px-2",l?.typography?.pageInfo||"text-sm text-muted-foreground"),children:g}),t.jsx(V,{onClick:()=>o(e+1),disabled:s||e===r,size:a,styles:l,ariaLabel:c.next,children:n?.next||t.jsx(ft,{className:u.icon})})]})}function ps({currentPage:e,totalPages:r,onPageChange:o,disabled:s,size:a="md",styles:n}){const i=ne[a],l=$e[n?.gap||"sm"];return t.jsx("nav",{className:d("flex items-center",l,n?.container),"aria-label":"Pagination",children:Array.from({length:r},(u,c)=>c+1).map(u=>t.jsx("button",{type:"button",onClick:()=>o(u),disabled:s,"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",s?"opacity-50 cursor-not-allowed":"cursor-pointer",u===e?"bg-primary-500":"bg-muted hover:bg-muted-foreground/50")},u))})}function xs({totalPages:e,onPageChange:r,disabled:o,size:s="md",labels:a,styles:n,loading:i=!1,loadingLabel:l="Loading..."}){const u=ne[s],c={...Ge,...a},m=o||i||e<=1;return t.jsx("nav",{className:d("flex items-center justify-center",n?.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",n?.typography?.button),children:i?l:c.loadMore})})}function bt(e){switch(e.variant){case"numbered":return t.jsx(us,{...e});case"simple":return t.jsx(ms,{...e});case"compact":return t.jsx(gs,{...e});case"dots":return t.jsx(ps,{...e});case"load-more":return t.jsx(xs,{...e});default:return null}}function de({content:e,children:r,position:o="top",styles:s}){const[a,n]=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 h=u.current.getBoundingClientRect();switch(o){case"top":return{top:h.top-8,left:h.left+h.width/2};case"bottom":return{top:h.bottom+8,left:h.left+h.width/2};case"left":return{top:h.top+h.height/2,left:h.left-8};case"right":return{top:h.top+h.height/2,left:h.right+8};default:return{top:0,left:0}}},g=()=>{l(m()),n(!0)},f=()=>{n(!1)},w=()=>{l(m()),n(!0)},S=()=>{n(!1)},v={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"},N={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"},b=a&&t.jsx("div",{id:c,role:"tooltip","aria-hidden":!a,className:d("fixed z-9999 pointer-events-none",v[o],s?.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",N[o]),"aria-hidden":"true"})]})});return t.jsxs(t.Fragment,{children:[t.jsx("div",{ref:u,className:"inline-block",onMouseEnter:g,onMouseLeave:f,onFocus:w,onBlur:S,"aria-describedby":a?c:void 0,children:r}),typeof document<"u"&&io.createPortal(b,document.body)]})}function We(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 ce={borderRadius:"lg",shadow:"none",hoverShadow:"md",padding:"md",borderWidth:"1"},ue={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 jr(e){const r=e?.borderRadius||ce.borderRadius;return ue.borderRadius[r]}function hs(e){const r=e?.shadow||ce.shadow;return ue.shadow[r]}function fs(e){if(!(e?.hoverable??!0))return"";const o=e?.hoverShadow||ce.hoverShadow;return ue.hoverShadow[o]}function bs(e){const r=e?.padding||ce.padding;return ue.padding[r]}function js(e){const r=e?.borderWidth||ce.borderWidth;return ue.borderWidth[r]}function vs(e){return e?.borderColor||"border-border"}function U(e,r,o){return r?.typography?.[e]?r.typography[e]:e==="title"&&o&&o in st.title?st.title[o]:st[e]}function ws(e){const r=[jr(e),hs(e),fs(e),js(e),vs(e)];return e?.container&&r.push(e.container),r.filter(Boolean).join(" ")}function ys(e){const r=[jr(e)];return e?.imageContainer&&r.push(e.imageContainer),r.filter(Boolean).join(" ")}function Ns(e){return e?.background||""}const Cs={standard:{imageAspectRatio:"16/9"},standardHorizontal:{imageAspectRatio:"16/9"},hero:{imageAspectRatio:"16/9"},minimal:{imageAspectRatio:"1/1"},promo:{imageAspectRatio:"16/9"}};function me(e,r="standard"){return A.useMemo(()=>{const o=Cs[r],s=e?.imageAspectRatio||o.imageAspectRatio;return{container:ws(e),imageContainer:ys(e),padding:bs(e),background:Ns(e),imageAspectRatio:s,typography:{title:U("title",e,r),subtitle:U("subtitle",e),description:U("description",e),category:U("category",e),metadata:U("metadata",e)},isHoverable:e?.hoverable??!0}},[e,r])}function vr({content:e,styles:r,primaryCta:o,secondaryCta:s,matchScore:a}){const n=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}=We(e),c=me(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:[n?t.jsx("img",{src:n,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"}),n&&t.jsx("div",{className:"absolute inset-0 z-0",style:{background:i}}),t.jsx(pt,{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,g)=>t.jsx(gt,{badge:m},g))}),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(Ee,{primaryCta:o,secondaryCta:s,layout:"responsive",styles:{container:"mt-4"}})]})})]})})}const ks=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Ss=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(r,o,s)=>s?s.toUpperCase():o.toLowerCase()),Ht=e=>{const r=Ss(e);return r.charAt(0).toUpperCase()+r.slice(1)},wr=(...e)=>e.filter((r,o,s)=>!!r&&r.trim()!==""&&s.indexOf(r)===o).join(" ").trim(),As=e=>{for(const r in e)if(r.startsWith("aria-")||r==="role"||r==="title")return!0};var Rs={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 Ts=A.forwardRef(({color:e="currentColor",size:r=24,strokeWidth:o=2,absoluteStrokeWidth:s,className:a="",children:n,iconNode:i,...l},u)=>A.createElement("svg",{ref:u,...Rs,width:r,height:r,stroke:e,strokeWidth:s?Number(o)*24/Number(r):o,className:wr("lucide",a),...!n&&!As(l)&&{"aria-hidden":"true"},...l},[...i.map(([c,m])=>A.createElement(c,m)),...Array.isArray(n)?n:[n]]));const He=(e,r)=>{const o=A.forwardRef(({className:s,...a},n)=>A.createElement(Ts,{ref:n,iconNode:r,className:wr(`lucide-${ks(Ht(e))}`,`lucide-${e}`,s),...a}));return o.displayName=Ht(e),o};const Ls=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Ms=He("check",Ls);const zs=[["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"}]],Is=He("circle-play",zs);const _s=[["path",{d:"M5 12h14",key:"1ays0h"}]],Ps=He("minus",_s);const Ds=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Os=He("x",Ds),Bs={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 yr({content:e,styles:r}){const o=r?.mainIconSize||"md",s=Bs[o];return r?.mainIcon?t.jsx("div",{className:"absolute inset-0 flex items-center justify-center z-20",children:t.jsx("div",{className:s,children:r.mainIcon})}):e.type==="video"?t.jsx("div",{className:"absolute inset-0 flex items-center justify-center z-20",children:t.jsx(Is,{className:d(s,"text-white opacity-90")})}):null}function Nr({imageUrl:e,alt:r,aspectRatio:o,imageContainerClasses:s,content:a,styles:n,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",s),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(pt,{badges:a.badges,positions:l}),t.jsx(yr,{content:a,styles:n})]})}function Cr({content:e,styles:r,isHoverable:o=!0,primaryCta:s,secondaryCta:a,ctaLayout:n="vertical",bettingOdds:i,matchScore:l}){const u=U("title",r,"compact"),c=U("category",r),m=U("description",r),g=U("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",g),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})]})]}),(s||a||i)&&t.jsxs("div",{className:"flex flex-col space-y-0",children:[(s||a)&&t.jsxs("div",{className:d("flex mt-4",n==="horizontal"?"flex-col sm:flex-row gap-2 sm:gap-3":"flex-col gap-2"),children:[s&&t.jsx("div",{className:n==="horizontal"?"w-full sm:w-auto":"w-full",children:s}),a&&t.jsx("div",{className:n==="horizontal"?"w-full sm:w-auto":"w-full",children:a})]}),i&&t.jsx("div",{className:s||a?"mt-2":"mt-4",children:i})]})]})}function kr({content:e,styles:r,primaryCta:o,secondaryCta:s,bettingOdds:a,matchScore:n}){const i=e.image?.url,{isClickable:l,handleClick:u}=We(e),c=me(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(Nr,{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(Cr,{content:e,styles:r,isHoverable:c.isHoverable,primaryCta:o,secondaryCta:s,bettingOdds:a,matchScore:n})})]})}function Es({content:e,styles:r,primaryCta:o,secondaryCta:s,bettingOdds:a,matchScore:n}){const i=e.image?.url,{isClickable:l,handleClick:u}=We(e),c=me(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(Nr,{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(Cr,{content:e,styles:r,isHoverable:c.isHoverable,primaryCta:o,secondaryCta:s,ctaLayout:"horizontal",bettingOdds:a,matchScore:n})})]})}function Sr({content:e,styles:r,primaryCta:o,secondaryCta:s}){const a=e.coverImage?.url,n=!!e.gradient,i=e.textColor||"white",l=me(r,"promo");let u="",c={color:i};return l.background?u=l.background:a?c={backgroundImage:`url(${a})`,backgroundSize:"cover",backgroundPosition:"center",color:i}:n?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,g)=>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})]},g))}),e.countdownTo&&t.jsx("div",{className:"mt-4 flex justify-center md:justify-start",children:t.jsx(br,{targetDate:e.countdownTo})})]}),(o||s||e.disclaimer)&&t.jsxs("div",{className:"flex flex-col items-center md:items-end gap-3 shrink-0",children:[t.jsx(Ee,{primaryCta:o,secondaryCta:s,layout:"horizontal"}),e.disclaimer&&t.jsx("p",{className:"text-xs opacity-70",children:e.disclaimer})]})]})]})})}function Ar({content:e,styles:r,primaryCta:o,secondaryCta:s,bettingOdds:a,matchScore:n}){const{isClickable:i,handleClick:l}=We(e),u=me(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(yr,{content:e,styles:r})})]}),t.jsxs("div",{className:"flex-1 min-w-0 flex flex-col justify-between",children:[t.jsxs("div",{children:[n&&t.jsx("div",{className:"mb-2",children:n}),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(Ee,{primaryCta:o,secondaryCta:s,layout:"responsive",styles:{container:"mt-4"}}),a&&t.jsx("div",{className:"mt-2",children:a})]})]})]})})}function F({content:e,variant:r,styles:o,primaryCta:s,secondaryCta:a,bettingOdds:n,matchScore:i}){switch(r||"standard"){case"hero":return t.jsx(vr,{content:e,styles:o,primaryCta:s,secondaryCta:a,matchScore:i});case"standardHorizontal":return t.jsx(Es,{content:e,styles:o,primaryCta:s,secondaryCta:a,bettingOdds:n,matchScore:i});case"promo":return t.jsx(Sr,{content:e,styles:o,primaryCta:s,secondaryCta:a});case"minimal":return t.jsx(Ar,{content:e,styles:o,primaryCta:s,secondaryCta:a,bettingOdds:n,matchScore:i});case"standard":default:return t.jsx(kr,{content:e,styles:o,primaryCta:s,secondaryCta:a,bettingOdds:n,matchScore:i})}}const ae={borderRadius:"lg",shadow:"none",hoverShadow:"md",padding:"md",borderWidth:"1",logoSize:"md"},ie={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 $s(e){const r=e?.borderRadius||ae.borderRadius;return ie.borderRadius[r]}function Gs(e){const r=e?.shadow||ae.shadow;return ie.shadow[r]}function Ws(e){if(!(e?.hoverable??!0))return"";const o=e?.hoverShadow||ae.hoverShadow;return ie.hoverShadow[o]}function Hs(e){const r=e?.padding||ae.padding;return ie.padding[r]}function Vs(e){const r=e?.borderWidth||ae.borderWidth;return ie.borderWidth[r]}function Us(e){return e?.borderColor||"border-border"}function Fs(e){const r=e?.logoSize||ae.logoSize;return ie.logoSize[r]}function Ys(e){const r=[$s(e),Gs(e),Ws(e),Vs(e),Us(e)];return e?.container&&r.push(e.container),r.filter(Boolean).join(" ")}function G(e){return e?.main??null}function re(e){return e?.breakdown?.penalties?e.breakdown.penalties:null}const qs={inline:"xs",scoreCard:"md",scoreLine:"md",embedded:"sm"},Zs={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"}},Ks={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=qs[r],s=e?.logoSize||o,n={...Ks[r],...e,logoSize:s},i=Zs[r];return{container:Ys(n),padding:Hs(n),background:n.background||(r==="inline"?"":"bg-card text-card-foreground"),logoSize:Fs(n),logoSizeValue:s,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:n.hoverable??!0}},[e,r])}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}}function Rr({match:e,styles:r}){const o=Ve(r,"inline"),{isClickable:s,handleClick:a}=Ue(e),n=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,s&&"cursor-pointer hover:opacity-80"),onClick:a,children:[t.jsx("span",{className:o.typography.teamName,children:n}),e.competitorTwo.logo&&t.jsx("img",{src:e.competitorTwo.logo.url,alt:e.competitorTwo.name,className:d(o.logoSize,"object-contain rounded-full")}),G(e.competitorTwo.score)!==null&&t.jsx("span",{className:o.typography.score,children:G(e.competitorTwo.score)}),t.jsx("span",{className:"mx-0.5 text-foreground",children:"-"}),G(e.competitorOne.score)!==null&&t.jsx("span",{className:o.typography.score,children:G(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 _e({team:e,score:r,penaltyScore:o,isWinner:s,variant:a,classes:n,logoSize:i="md",align:l="left"}){return a==="scoreCard"?t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx($,{name:e.name,imageUrl:e.logo?.url,subtitle:e.subtitle,styles:{container:"flex-1",imageSize:i,typography:{name:d("text-foreground",n.typography.teamName),subtitle:d("text-muted-foreground",n.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",s?"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",n.typography.score),children:r})]})]}):t.jsx("div",{className:l==="right"?"justify-self-end":"justify-self-start",children:t.jsx($,{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",n.typography.teamName),subtitle:d("text-muted-foreground",n.typography.metadata)},gap:"2",textAlign:l==="right"?"right":"left"}})})}function Xs({competitorOneScore:e,competitorTwoScore:r,competitorOnePenalty:o,competitorTwoPenalty:s,winner:a,classes:n,isLive:i,liveIndicator:l,statusText:u,period:c}){const m=o!==null||s!==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",n.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(n.typography.status,"text-muted-foreground whitespace-nowrap"),children:u}),c?.current&&!i&&t.jsx("span",{className:d(n.typography.metadata,"text-muted-foreground"),children:c.current})]}):t.jsx("span",{className:d("text-muted-foreground",n.typography.score),children:"-"}),t.jsxs("div",{className:"flex items-center gap-1.5",children:[r!==null&&t.jsx("span",{className:d("text-foreground",n.typography.score),children:r}),m&&s!==null&&s!==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:s})]})]})}function Tr({odds:e,operator:r,styles:o={}}){const{container:s="",padding:a="md",typography:n="md",mode:i="default",flashInterval:l=3e3}=o,[u,c]=A.useState(!0);A.useEffect(()=>{if(i!=="flash")return;const b=setInterval(()=>{c(h=>!h)},l);return()=>clearInterval(b)},[i,l]);const m=()=>{const b={none:"",sm:"px-1.5 py-1",md:"px-2 py-1.5",lg:"px-3 py-2"};return b[a]||b.md},g=()=>{const b={sm:"text-xs",md:"text-xs",lg:"text-sm"};return b[n]||b.md},f=b=>!b||b==="none"?null:t.jsx("span",{className:d("ml-0.5",b==="up"?"text-green-500":"text-red-500"),children:b==="up"?"↑":"↓"}),w=(b,h=!1)=>{const k=m(),R=g(),M=t.jsxs("div",{className:d("flex items-center cursor-pointer justify-between",R),children:[t.jsx("span",{className:"text-muted-foreground",children:b.label}),t.jsxs("span",{className:"font-bold",children:[b.value,f(b.change)]})]}),P=d(h?"":"flex-1","bg-muted hover:bg-muted/60 text-foreground rounded transition-colors",k),E=j=>{j.stopPropagation(),b.onClick&&(j.preventDefault(),b.onClick(b))};return b.url?t.jsx("a",{href:b.url,target:"_blank",rel:"noopener noreferrer",className:P,onClick:E,children:M},b.label):t.jsx("button",{className:P,onClick:E,children:M},b.label)},S=b=>{b.stopPropagation(),r?.onClick&&(b.preventDefault(),r.onClick(r))},v=(b="")=>{if(!r)return null;const h=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",h,b),style:{backgroundColor:r.backgroundColor},onClick:S,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})})},N=e.length>3;return i==="flash"?t.jsx("div",{className:d(N?"space-y-1":"flex gap-1",s),children:u&&r?v("flex-1"):N?t.jsx("div",{className:"grid grid-cols-3 gap-1",children:e.map(b=>w(b,!0))}):t.jsx(t.Fragment,{children:e.map(b=>w(b,!1))})}):N?t.jsxs("div",{className:d("space-y-1",s),children:[v(),t.jsx("div",{className:"grid grid-cols-3 gap-1",children:e.map(b=>w(b,!0))})]}):t.jsxs("div",{className:d("flex gap-1",s),children:[v("w-full max-w-[110px]"),e.map(b=>w(b,!1))]})}function Lr({match:e,styles:r,primaryCta:o,secondaryCta:s}){const a=Ve(r,"scoreCard"),{isClickable:n,handleClick:i}=Ue(e),l=e.status==="live",u=!!e.odds,c=o||s,m=re(e.competitorOne.score),g=re(e.competitorTwo.score),f=e.metadata?.winner;return t.jsx("article",{className:d(a.background,a.container,n&&"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(_e,{team:e.competitorOne,score:G(e.competitorOne.score),penaltyScore:m,isWinner:f==="competitorOne",variant:"scoreCard",classes:a,logoSize:a.logoSizeValue}),t.jsx(_e,{team:e.competitorTwo,score:G(e.competitorTwo.score),penaltyScore:g,isWinner:f==="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(Tr,{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,s]})})]})})}function Mr({match:e,styles:r}){const o=Ve(r,"scoreLine"),{isClickable:s,handleClick:a}=Ue(e),n=e.status==="live",i=n&&e.period?.current?e.period.current:e.period?.label||e.status.toUpperCase(),l=re(e.competitorOne.score),u=re(e.competitorTwo.score),c=e.metadata?.winner;return t.jsx("article",{className:d(o.background,o.container,s&&"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(_e,{team:e.competitorOne,score:null,variant:"scoreLine",classes:o,logoSize:o.logoSizeValue}),t.jsx(Xs,{competitorOneScore:G(e.competitorOne.score),competitorTwoScore:G(e.competitorTwo.score),competitorOnePenalty:l,competitorTwoPenalty:u,winner:c,classes:o,isLive:n,liveIndicator:e.liveIndicator,statusText:i,period:e.period}),t.jsx(_e,{team:e.competitorTwo,score:null,variant:"scoreLine",classes:o,logoSize:o.logoSizeValue,align:"right"})]})})}const Qs={xs:"xs",sm:"xs",md:"sm",lg:"md",xl:"lg","2xl":"xl","3xl":"2xl"},Vt={square:"sm",round:"full"};function Js(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 en({match:e,styles:r}){const o=Ve(r,"embedded"),{isClickable:s,handleClick:a}=Ue(e),n=e.status==="live",i=e.liveIndicator?.color||"bg-red-500",l=G(e.competitorOne.score),u=G(e.competitorTwo.score),c=re(e.competitorOne.score),m=re(e.competitorTwo.score),g=c!==null||m!==null,f=e.metadata?.winner,w=e.status==="scheduled",S=e.metadata?.time||e.period?.label||"-",v=Js(e,r?.finishedStatusDisplay),N=r?.statusColumnWidth||"w-[60px]",b=r?.typography?.status||"text-xs font-medium",h=Qs[r?.logoSize||"md"],k=Vt[e.competitorOne.logoShape||"square"],R=Vt[e.competitorTwo.logoShape||"square"],M={imageSize:h,gap:"2",typography:{name:o.typography.teamName}};return t.jsxs("article",{className:d("flex items-center w-full",o.padding,s&&"cursor-pointer",r?.container),onClick:a,children:[t.jsxs("div",{className:d("shrink-0 flex items-center justify-start gap-1.5",N,b,n?"text-danger":"text-muted-foreground"),children:[n&&t.jsx("div",{className:d("w-2 h-2 rounded-full animate-pulse shrink-0",i)}),t.jsx("span",{children:v})]}),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($,{name:e.competitorOne.name,imageUrl:e.competitorOne.logo?.url,orientation:"rtl",truncate:!0,styles:{...M,imageBorderRadius:k,textAlign:"right"}})}),t.jsx("div",{className:"shrink-0 px-3 text-center min-w-[70px]",children:w?t.jsx("span",{className:d(o.typography.score,"text-muted-foreground"),children:S}):t.jsxs("div",{className:"flex items-center justify-center gap-1",children:[g&&c!==null&&t.jsx("span",{className:d("text-[10px] px-1 py-0.5 rounded",f==="competitorOne"?"bg-muted-foreground text-muted font-bold":"bg-muted text-muted-foreground"),children:c}),t.jsxs("span",{className:d(o.typography.score,n&&"text-danger"),children:[l," - ",u]}),g&&m!==null&&t.jsx("span",{className:d("text-[10px] px-1 py-0.5 rounded",f==="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($,{name:e.competitorTwo.name,imageUrl:e.competitorTwo.logo?.url,orientation:"ltr",truncate:!0,styles:{...M,imageBorderRadius:R,textAlign:"left"}})})]})]})}function O({match:e,variant:r,styles:o,primaryCta:s,secondaryCta:a}){switch(r||"scoreCard"){case"inline":return t.jsx(Rr,{match:e,styles:o});case"scoreLine":return t.jsx(Mr,{match:e,styles:o});case"embedded":return t.jsx(en,{match:e,styles:o});case"scoreCard":default:return t.jsx(Lr,{match:e,styles:o,primaryCta:s,secondaryCta:a})}}const ge={borderRadius:"lg",shadow:"none",padding:"md",borderWidth:"1",logoSize:"md"},pe={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"}},tn={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 rn(e){const r=e?.borderRadius||ge.borderRadius;return pe.borderRadius[r]}function on(e){const r=e?.shadow||ge.shadow;return pe.shadow[r]}function sn(e){const r=e?.padding||ge.padding;return pe.padding[r]}function nn(e){const r=e?.borderWidth||ge.borderWidth;return pe.borderWidth[r]}function an(e){return e?.borderColor||"border-border"}function ln(e){const r=e?.logoSize||ge.logoSize;return pe.logoSize[r]}function Le(e,r){return r?.typography?.[e]?r.typography[e]:tn[e]}function dn(e){return e?.background||"bg-card"}function cn(e){const r=[rn(e),on(e),nn(e),an(e),dn(e)];return e?.container&&r.push(e.container),r.filter(Boolean).join(" ")}function un(e){return A.useMemo(()=>({container:cn(e),padding:sn(e),logoSize:ln(e),typography:{header:Le("header",e),cell:Le("cell",e),disclaimer:Le("disclaimer",e),legend:Le("legend",e)},table:e?.table||"",headerRow:e?.headerRow||"",bodyRow:e?.bodyRow||"",legendContainer:e?.legendContainer||"",isHoverable:e?.hoverable??!0}),[e])}function mn(e){switch(e){case"center":return"text-center";case"right":return"text-right";case"left":default:return"text-left"}}function Ut(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 zr(e){return typeof e=="object"&&e!==null&&("mobile"in e||"desktop"in e)}function ut(e,r){return e.filter(o=>zr(o.width)?(r==="mobile"?o.width.mobile:o.width.desktop)!=="none":o.width!=="none")}function Ft(e,r){const o=["4px"];return ut(e,r).forEach(a=>{if(zr(a.width)){const n=r==="mobile"?a.width.mobile:a.width.desktop;o.push(Ut(n))}else o.push(Ut(a.width))}),o.join(" ")}function Me(e){const r=mn(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 gn({columns:e,rows:r,legend:o,showLegend:s,disclaimer:a,description:n,styles:i,onRowClick:l,filterRowIds:u}){const c=un(i),m=A.useMemo(()=>{if(!u||u.length===0)return r;const h=new Set(u);return r.filter(k=>h.has(k.id))},[r,u]),g=A.useMemo(()=>{if(o)return o;const h=new Map;return m.forEach(k=>{if(k.zone){const R=`${k.zone.color}-${k.zone.label}`;h.has(R)||h.set(R,{color:k.zone.color,label:k.zone.label})}}),Array.from(h.values())},[m,o]),f=s!==void 0?s:g.length>0,w=A.useMemo(()=>ut(e,"mobile"),[e]),S=A.useMemo(()=>ut(e,"desktop"),[e]),v=A.useMemo(()=>Ft(e,"mobile"),[e]),N=A.useMemo(()=>Ft(e,"desktop"),[e]),b=i?.container||c.container;return t.jsx("div",{className:b,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:v},children:[t.jsx("div",{"aria-label":"Zone"}),w.map(h=>t.jsx("div",{className:d(c.typography.header,Me(h)),children:h.header},h.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:N},children:[t.jsx("div",{"aria-label":"Zone"}),S.map(h=>t.jsx("div",{className:d(c.typography.header,Me(h)),children:h.header},h.key))]}),m.map(h=>t.jsxs("li",{className:d("relative border-b border-border last:border-0",h.highlight&&"bg-muted",c.isHoverable&&l&&"hover:bg-muted/50 cursor-pointer transition-colors",c.bodyRow),onClick:()=>l?.(h),children:[h.zone&&t.jsx("div",{className:d("absolute left-0 top-0 bottom-0 w-1 rounded-r-sm",h.zone.color)}),t.jsxs("div",{className:"md:hidden grid items-center gap-1 py-3 pl-2",style:{gridTemplateColumns:v},children:[t.jsx("div",{}),w.map(k=>t.jsx("div",{className:d(c.typography.cell,Me(k)),children:k.render?k.render(h[k.key],h):h[k.key]},k.key))]}),t.jsxs("div",{className:"hidden md:grid items-center gap-1 py-3 lg:px-2 pl-2",style:{gridTemplateColumns:N},children:[t.jsx("div",{}),S.map(k=>t.jsx("div",{className:d(c.typography.cell,Me(k)),children:k.render?k.render(h[k.key],h):h[k.key]},k.key))]})]},h.id))]})}),n&&t.jsx("div",{className:d("mt-4",c.typography.disclaimer),children:n}),f&&g.length>0&&t.jsx("div",{className:d("mt-4 flex flex-wrap gap-4",c.legendContainer),children:g.map((h,k)=>t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("div",{className:d("w-3 h-4 rounded-sm",h.color)}),t.jsx("span",{className:c.typography.legend,children:h.label})]},k))}),a&&t.jsx("div",{className:d("mt-4",c.typography.disclaimer),children:a})]})})}const Fe={borderRadius:"md",padding:"md",alignment:"left",background:"bg-muted"},X={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"}},pn={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 xn(e){const r=e?.borderRadius||Fe.borderRadius;return X.borderRadius[r]}function hn(e){const r=e?.padding||Fe.padding;return X.padding[r]}function jt(e){const r=e?.alignment||Fe.alignment;return X.alignment[r]}function fn(e){return e?.background||Fe.background}function te(e,r,o){return r?.typography?.[e]?r.typography[e]:pn[o||"default"][e]}function bn(e){const r=e?.colsMobile||2,o=e?.colsTablet||3,s=e?.colsDesktop||3,a=e?.gap||"sm";return["grid",X.colsMobile[r],X.colsTablet[o],X.colsDesktop[s],X.gap[a]].join(" ")}function Ir(e){return[xn(e),hn(e),fn(e),jt(e),"flex flex-col"].join(" ")}function jn(e,r,o){return A.useMemo(()=>({grid:bn(e),item:{container:Ir(r),alignment:jt(r),typography:{value:te("value",r,o),label:te("label",r,o),secondaryLabel:te("secondaryLabel",r,o)}}}),[e,r,o])}function vt(e,r){return A.useMemo(()=>({container:Ir(e),alignment:jt(e),typography:{value:te("value",e,r),label:te("label",e,r),secondaryLabel:te("secondaryLabel",e,r)}}),[e,r])}function _r({item:e,styles:r}){const o=vt(r,"default"),s=o.container;return t.jsxs("div",{className:s,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 Pr({item:e,styles:r}){const o=vt(r,"stacked"),s=o.container;return t.jsxs("div",{className:s,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 Dr({item:e,styles:r,orientation:o="ltr"}){const s=vt(r,"horizontal"),a=s.container,n=o==="ltr"?"items-start":"items-end",i=t.jsxs("div",{className:d("flex flex-col gap-1",n),children:[e.icon&&t.jsx("span",{className:"shrink-0",children:e.icon}),t.jsx("span",{className:s.typography.label,children:e.label}),e.secondaryLabel&&t.jsx("div",{className:s.typography.secondaryLabel,children:e.secondaryLabel})]}),l=t.jsx("div",{className:s.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 Or({item:e,styles:r,variant:o="default",orientation:s}){const a={item:e,styles:r};switch(o){case"stacked":return t.jsx(Pr,{...a});case"horizontal":return t.jsx(Dr,{...a,orientation:s});default:return t.jsx(_r,{...a})}}function Q({items:e=[],itemVariant:r="default",itemOrientation:o,styles:s}){const{container:a="",grid:n,item:i}=s||{},l=jn(n,i,r),u=a||l.grid;return t.jsx("div",{className:u,children:e.map(c=>t.jsx(Or,{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"},xe={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"}},vn={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 wn(e){const r=e?.padding||Ye.padding;return xe.padding[r]}function yn(e){const r=e?.itemSpacing||Ye.itemSpacing;return xe.itemSpacing[r]}function Nn(e){const r=e?.borderRadius||Ye.borderRadius;return xe.borderRadius[r]}function Cn(e){return e?.background||Ye.background}function Br(e){const r=e?.height||qe.height;return xe.barHeight[r]}function Er(e){const r=e?.borderRadius||qe.borderRadius;return xe.barBorderRadius[r]}function $r(e){return e?.leftBarColor||qe.leftBarColor}function Gr(e){return e?.rightBarColor||qe.rightBarColor}function nt(e,r,o="comparison"){return r?.typography?.[e]?r.typography[e]:vn[o][e]}function kn(e){return["flex flex-col",wn(e),yn(e),Nn(e),Cn(e)].filter(Boolean).join(" ")}function wt(e,r="comparison"){return A.useMemo(()=>{const o=e?.bar;return{container:kn(e),typography:{label:nt("label",e,r),leftValue:nt("leftValue",e,r),rightValue:nt("rightValue",e,r)},bar:{height:Br(o),borderRadius:Er(o),leftBarColor:$r(o),rightBarColor:Gr(o)}}},[e,r])}function Wr(e,r){return A.useMemo(()=>{const o={...e,...r};return{height:Br(o),borderRadius:Er(o),leftBarColor:$r(o),rightBarColor:Gr(o)}},[e,r])}function Hr({item:e,styles:r}){const o=wt(r,"bar"),s=Wr(r?.bar,e.barStyles),a=typeof e.leftValue=="number"?e.leftValue:parseFloat(String(e.leftValue))||0,n=typeof e.rightValue=="number"?e.rightValue:parseFloat(String(e.rightValue))||0,i=a+n,l=i>0?a/i*100:50,u=i>0?n/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(s.leftBarColor,s.height,s.borderRadius,"transition-all duration-300"),style:{width:`${l}%`}}),t.jsx("div",{className:d(s.rightBarColor,s.height,s.borderRadius,"transition-all duration-300"),style:{width:`${u}%`}})]})]})}function Vr({item:e,styles:r}){const o=wt(r,"comparison"),s=Wr(r?.bar,e.barStyles),a=typeof e.leftValue=="number"?e.leftValue:parseFloat(String(e.leftValue))||0,n=typeof e.rightValue=="number"?e.rightValue:parseFloat(String(e.rightValue))||0,i=a+n,l=i>0?a/i*100:50,u=i>0?n/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",s.height,s.borderRadius),children:t.jsx("div",{className:d(s.leftBarColor,s.height,s.borderRadius,"transition-all duration-300"),style:{width:`${l}%`,minWidth:"2px"}})}),t.jsx("div",{className:d("flex-1 flex justify-start bg-muted",s.height,s.borderRadius),children:t.jsx("div",{className:d(s.rightBarColor,s.height,s.borderRadius,"transition-all duration-300"),style:{width:`${u}%`,minWidth:"2px"}})})]})]})}function Ur({item:e,styles:r}){const o={item:e,styles:r};switch(e.variant){case"bar":return t.jsx(Hr,{...o});case"comparison":default:return t.jsx(Vr,{...o})}}function yt({items:e=[],styles:r}){const o=wt(r,"comparison"),s=r?.container||o.container;return t.jsx("div",{className:s,children:e.map(a=>t.jsx(Ur,{item:a,styles:r},a.id))})}const Nt={win:"W",draw:"D",loss:"L",vs:"vs"};function Sn(e,r={}){const o={...Nt,...r};switch(e){case"W":return o.win;case"D":return o.draw;case"L":return o.loss}}function An(e){switch(e){case"W":return"bg-green-600";case"D":return"bg-gray-500";case"L":return"bg-red-500"}}function Rn(e){switch(e){case"W":return t.jsx(Ms,{height:13,width:13,strokeWidth:3,color:"#fff"});case"D":return t.jsx(Ps,{height:13,width:13,strokeWidth:3,color:"#fff"});case"L":return t.jsx(Os,{height:13,width:13,strokeWidth:3,color:"#fff"});default:return null}}function Ct(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 Tn(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 Ln(e,r){return Ct(e,r)?.name||"Unknown"}function Fr(e,r){const o=Tn(e,r),s=Ct(e,r);if(o?.score!==void 0&&s?.score!==void 0)return`${o.score}-${s.score}`}function Yr(e,r,o={}){const s={...Nt,...o},a=[],n=Ln(e,r);a.push(`${s.vs} ${n}`);const i=Fr(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 ze={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"},textSize:{xs:"text-xs",sm:"text-sm",md:"text-base",lg:"text-lg"},fontWeight:{normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold"}};function Mn({form:e,teamId:r,maxItems:o=5,labels:s,matchSeparator:a,styles:n,onClick:i}){const l=e.slice(-o),u=s&&(s.win||s.draw||s.loss),c=(v,N)=>{if(i){const b=e.length-l.length+N;i(v,b)}},m=n?.container||"",g=ze.size[n?.indicator?.size||"sm"],f=ze.borderRadius[n?.indicator?.borderRadius||"full"],w=ze.textSize[n?.indicator?.textSize||"xs"],S=ze.fontWeight[n?.indicator?.fontWeight||"bold"];return t.jsx("div",{className:d("flex items-center gap-1 justify-end",m),children:l.map((v,N)=>{const b=N===0,h=N===l.length-1,k=t.jsx("div",{className:d("flex items-center justify-center",g,f,An(v.outcome),i&&"cursor-pointer hover:opacity-80 transition-opacity"),onClick:()=>c(v,N),children:u?t.jsx("span",{className:d("text-white leading-none",w,S),children:Sn(v.outcome,s)}):Rn(v.outcome)}),M=v.competitorOne?.score!==void 0||v.competitorTwo?.score!==void 0||v.date!==void 0?t.jsx(de,{content:Yr(v,r,s),position:"top",children:k}):k;return t.jsxs(A.Fragment,{children:[a==="last"&&h&&l.length>1&&t.jsx("div",{className:"h-5 w-px bg-border mx-0.5","aria-hidden":"true"}),M,a==="first"&&b&&l.length>1&&t.jsx("div",{className:"h-5 w-px bg-border mx-0.5","aria-hidden":"true"})]},N)})})}function zn(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 In(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 at={win:"WIN",draw:"DRAW",loss:"LOSS"};function _n(e,r){switch(e){case"W":return r?.win||at.win;case"D":return r?.draw||at.draw;case"L":return r?.loss||at.loss}}const it={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"},layout:{scroll:"flex overflow-x-auto",grid:"grid",responsive:"flex md:grid overflow-x-auto md:overflow-visible"}},lt={badge:"text-xs font-semibold uppercase",score:"text-lg font-semibold",date:"text-xs mt-2"};function Pn({form:e,teamId:r,maxItems:o=5,labels:s,layout:a,styles:n,onClick:i}){const l=e.slice(-o),u=(R,M)=>{if(i){const P=e.length-l.length+M;i(R,P)}},c=R=>{if(r!==void 0){if(String(R.competitorOne?.id)===String(r))return{ourTeam:R.competitorOne,opponent:R.competitorTwo};if(String(R.competitorTwo?.id)===String(r))return{ourTeam:R.competitorTwo,opponent:R.competitorOne}}return{ourTeam:R.competitorOne,opponent:R.competitorTwo}},m=n?.container||"",g=it.gap[n?.gap||"3"],f=it.logoSize[n?.logoSize||"md"],w=n?.typography?.badge||lt.badge,S=n?.typography?.score||lt.score,v=n?.typography?.date||lt.date,N=a||n?.layout||"scroll",b=it.layout[N],h=()=>N==="scroll"?"shrink-0":N==="grid"?"min-w-0":"shrink-0 md:shrink md:min-w-0",k=N==="scroll"?void 0:{gridTemplateColumns:`repeat(${l.length}, minmax(0, 1fr))`};return t.jsx("div",{className:d("items-start",b,g,m),style:k,children:l.map((R,M)=>{const{date:P,outcome:E}=R,{ourTeam:j,opponent:_}=c(R),ve=j.score??"-",we=_.score??"-";return t.jsx("div",{className:d("flex flex-col items-center gap-1",h()),children:t.jsxs("div",{className:d("flex flex-col items-center gap-2 px-4 py-3","bg-card border border-border rounded-md border-t-4",zn(E),i&&"cursor-pointer hover:bg-muted/50 transition-colors"),onClick:()=>u(R,M),children:[t.jsx("span",{className:d("px-3 py-0.5 rounded-full",w,In(E)),children:_n(E,s)}),t.jsxs("div",{className:d("flex items-center gap-2 text-foreground",S),children:[t.jsx("span",{children:ve}),t.jsx("span",{className:"text-muted-foreground",children:"-"}),t.jsx("span",{children:we})]}),t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx(de,{content:j.name,children:j.image?t.jsx("img",{src:j.image,alt:j.name,className:d(f,"object-contain")}):t.jsx("div",{className:d(f,"bg-muted rounded-full flex items-center justify-center text-xs text-muted-foreground"),children:j.name.charAt(0)})}),t.jsx(de,{content:_.name,children:_.image?t.jsx("img",{src:_.image,alt:_.name,className:d(f,"object-contain")}):t.jsx("div",{className:d(f,"bg-muted rounded-full flex items-center justify-center text-xs text-muted-foreground"),children:_.name.charAt(0)})})]}),P&&t.jsx("span",{className:d(v,"text-muted-foreground"),children:P})]})},R.matchId)})})}const Dn=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"}},On=(e,r)=>{const o=Ct(e,r);return o?.name?o.shortName||o.name.substring(0,3).toUpperCase():"???"};function Bn({form:e,teamId:r,maxItems:o=5,labels:s,styles:a,onClick:n}){const i=e.slice(-o),{container:l=""}=a||{},u=(c,m)=>{if(n){const g=e.length-i.length+m;n(c,g)}};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 g=t.jsxs("div",{className:d("flex flex-col items-center py-2 px-1 bg-muted rounded-lg",n?"cursor-pointer hover:bg-muted/80":"cursor-default"),onClick:()=>u(c,m),children:[t.jsx("span",{className:d("text-sm font-bold",Dn(c.outcome)),children:Fr(c,r)||"?-?"}),t.jsx("span",{className:"text-[10px] text-muted-foreground",children:On(c,r)})]});return c.competitorOne?.name!==void 0||c.competitorTwo?.name!==void 0||c.date!==void 0?t.jsx(de,{content:Yr(c,r,s),position:"top",children:g},m):t.jsx("div",{children:g},m)})})})}function he({variant:e="embedded",...r}){switch(e){case"detailed":return t.jsx(Pn,{...r});case"scoreCards":return t.jsx(Bn,{...r});case"embedded":default:return t.jsx(Mn,{...r})}}const En={0:"p-0",2:"p-2",3:"p-3",4:"p-4",6:"p-6",8:"p-8"},$n={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl"},Gn={1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4"};function fe({entity:e,primaryCta:r,secondaryCta:o,layout:s="horizontal",ctaLayout:a="responsive",styles:n}){const{container:i="",background:l="",padding:u="4",borderRadius:c="none",ctaGap:m="2"}=n||{},g=En[u],f=$n[c],w=Gn[m],S=r||o,v={inline:"flex flex-row items-center",stacked:"flex flex-col",responsive:"flex flex-col sm:flex-row sm:items-center"},N={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 s==="stacked"?t.jsxs("div",{className:d("flex flex-col items-center text-center gap-4",g,f,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",Wn(e.styles?.imageSize),Hn(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})]})]}),S&&t.jsxs("div",{className:d("flex flex-col items-center",w),children:[r,o]})]}):t.jsxs("div",{className:d(N[a],g,f,l,i),children:[t.jsx($,{...e}),S&&t.jsxs("div",{className:d(v[a],w,"shrink-0"),children:[r,o]})]})}const Yt={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"},qt={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl",full:"rounded-full"};function Wn(e){return Yt[e]||Yt.md}function Hn(e){return qt[e]||qt.none}const Vn={2:"gap-2",3:"gap-3",4:"gap-4",6:"gap-6",8:"gap-8"},Un={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"},Fn={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl",full:"rounded-full"};function Yn(e){const r=Un[e?.imageSize||"lg"],o=e?.imageBorderRadius?Fn[e.imageBorderRadius]:"",s=e?.imageBorder||"";return d(r,o,s)}function Zt({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(Yn(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 Kt({content:e,typography:r}){return t.jsx("div",{className:"shrink-0",children:typeof e=="string"?t.jsx("span",{className:r,children:e}):e})}function kt({leftEntity:e,rightEntity:r,centerContent:o,variant:s="inline",styles:a,leftBackground:n="",rightBackground:i="",overlay:l=""}){const{container:u="",background:c="",gap:m="4",centerTypography:g="text-sm text-muted-foreground font-medium"}=a||{},f=Vn[m];if(s==="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",n)}),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",f),children:[t.jsx(Zt,{entity:e}),o&&t.jsx(Kt,{content:o,typography:g}),t.jsx(Zt,{entity:r})]})]});const w={...e,orientation:"rtl",styles:{...e.styles,textAlign:"right"}},S={...r,orientation:"ltr",styles:{...r.styles,textAlign:"left"}};return t.jsxs("div",{className:d("flex items-center justify-between",f,c,u),children:[t.jsx("div",{className:"flex-1 flex justify-end",children:t.jsx($,{...w})}),o&&t.jsx(Kt,{content:o,typography:g}),t.jsx("div",{className:"flex-1 flex justify-start",children:t.jsx($,{...S})})]})}const qn={1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4"};function T({entity:e,primaryCta:r,secondaryCta:o,styles:s}){const a=s?.ctaGap||"2",n=s?.container||"",i=qn[a];return r||o?t.jsxs("div",{className:d("flex items-center justify-between gap-4",n),children:[t.jsx($,{...e}),t.jsxs("div",{className:d("flex items-center shrink-0",i),children:[r,o]})]}):t.jsx("div",{className:n,children:t.jsx($,{...e})})}const Zn={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"},Kn={1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4"};function Zr(e){const r=e?.borderRadius?Zn[e.borderRadius]:"rounded-xl";return d("overflow-hidden",r,e?.container)}function Kr(e){return qr[e?.titlePosition||"left"]}function Xr(e){return qr[e?.oddsLabelPosition||"left"]}function Qr(e){return Kn[e?.oddsGap||"1"]}const Xt="text-xs font-semibold text-muted-foreground uppercase tracking-wider";function Xn({matchupHeader:e,stats:r,title:o,bettingOdds:s,oddsLabel:a,styles:n}){const i=Kr(n),l=Xr(n);return t.jsxs("div",{className:d("bg-card border border-muted shadow-sm",Zr(n)),children:[t.jsx("div",{className:d("bg-muted/30 p-4",n?.headerSection),children:t.jsx(kt,{...e,variant:"inline"})}),t.jsxs("div",{className:d("p-4",n?.statsSection),children:[o&&t.jsx(T,{entity:{name:o,styles:{typography:{name:d(Xt,i)},container:"mb-2.5 mt-1"}}}),t.jsx(yt,{...r})]}),s&&s.length>0&&t.jsxs("div",{className:d("p-4 pt-0",n?.oddsSection),children:[a&&t.jsx(T,{entity:{name:a,styles:{typography:{name:d(Xt,l)},container:"mb-2.5 mt-1"}}}),t.jsx("div",{className:d("flex flex-col",Qr(n)),children:s.map((u,c)=>t.jsx("div",{children:u},c))})]})]})}const Qt="text-xs font-semibold text-muted-foreground uppercase tracking-wider";function Qn({matchupHeader:e,stats:r,title:o,bettingOdds:s,oddsLabel:a,styles:n}){const i={...e,variant:"stacked"},l=Kr(n),u=Xr(n);return t.jsxs("div",{className:d("shadow-lg",Zr(n)),children:[t.jsx(kt,{...i}),t.jsxs("div",{className:d("bg-card p-6",n?.statsSection),children:[o&&t.jsx(T,{entity:{name:o,styles:{typography:{name:d(Qt,l)},container:"mb-2.5 mt-1"}}}),t.jsx(yt,{...r})]}),s&&s.length>0&&t.jsxs("div",{className:d("bg-card p-6 pt-0",n?.oddsSection),children:[a&&t.jsx(T,{entity:{name:a,styles:{typography:{name:d(Qt,u)},container:"mb-2.5 mt-1"}}}),t.jsx("div",{className:d("flex flex-col",Qr(n)),children:s.map((c,m)=>t.jsx("div",{children:c},m))})]})]})}function Jn({variant:e="card",...r}){switch(e){case"hero":return t.jsx(Qn,{...r});case"card":default:return t.jsx(Xn,{...r})}}const ea={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl"},ta={left:"text-left",center:"text-center",right:"text-right"},ra={1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4"};function Ze(e){const r=e?.borderRadius?ea[e.borderRadius]:"rounded-xl";return d("overflow-hidden",r,e?.container)}function Ke(e){return ta[e?.titlePosition||"left"]}function Xe(e){return ra[e?.oddsGap||"1"]}const oa="text-xs font-semibold text-muted-foreground uppercase tracking-wider";function sa({profileHeader:e,stats:r,statsTitle:o,form:s,formTitle:a,featuredMatch:n,matchTitle:i,bettingOdds:l,oddsLabel:u,styles:c}){const m=Ke(c),g={typography:{name:d(oa,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(fe,{...e})}),r&&t.jsxs("div",{className:d("p-4",c?.statsSection),children:[o&&t.jsx(T,{entity:{name:o,styles:g}}),t.jsx(Q,{...r})]}),s&&t.jsxs("div",{className:d("px-4 pb-4",c?.formSection),children:[a&&t.jsx(T,{entity:{name:a,styles:g}}),t.jsx(he,{...s,variant:"scoreCards"})]}),n&&t.jsxs("div",{className:d("p-4 pt-0",c?.matchSection),children:[i&&t.jsx(T,{entity:{name:i,styles:g}}),t.jsx(O,{...n})]}),l&&l.length>0&&t.jsxs("div",{className:d("p-4 pt-0",c?.oddsSection),children:[u&&t.jsx(T,{entity:{name:u,styles:g}}),t.jsx("div",{className:d("flex flex-col",Xe(c)),children:l.map((f,w)=>t.jsx("div",{children:f},w))})]})]})}const na="text-xs font-semibold text-muted-foreground uppercase tracking-wider";function aa({profileHeader:e,stats:r,statsTitle:o,form:s,formTitle:a,featuredMatch:n,matchTitle:i,bettingOdds:l,oddsLabel:u,styles:c}){const m=Ke(c),g={typography:{name:d(na,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(fe,{...e})}),r&&t.jsxs("div",{className:d("bg-card p-5",c?.statsSection),children:[o&&t.jsx(T,{entity:{name:o,styles:g}}),t.jsx(Q,{...r})]}),s&&t.jsxs("div",{className:d("bg-card px-4 pb-4",c?.formSection),children:[a&&t.jsx(T,{entity:{name:a,styles:g}}),t.jsx(he,{...s,variant:"scoreCards"})]}),n&&t.jsxs("div",{className:d("bg-card p-4 pt-0",c?.matchSection),children:[i&&t.jsx(T,{entity:{name:i,styles:g}}),t.jsx(O,{...n})]}),l&&l.length>0&&t.jsxs("div",{className:d("bg-card p-4 pt-0",c?.oddsSection),children:[u&&t.jsx(T,{entity:{name:u,styles:g}}),t.jsx("div",{className:d("flex flex-col",Xe(c)),children:l.map((f,w)=>t.jsx("div",{children:f},w))})]})]})}const ia="text-xs font-semibold text-muted-foreground uppercase tracking-wider";function la({profileHeader:e,stats:r,form:o,formTitle:s,matchTitle:a,featuredMatch:n,bettingOdds:i,oddsLabel:l,styles:u}){const c=Ke(u),m={typography:{name:d(ia,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(fe,{...e})}),r&&t.jsx("div",{className:d("p-3",u?.statsSection),children:t.jsx(Q,{...r})}),o&&t.jsxs("div",{className:d("bg-card px-3 pb-3",u?.formSection),children:[s&&t.jsx(T,{entity:{name:s,styles:m}}),t.jsx("div",{className:"flex justify-start",children:t.jsx(he,{...o,matchSeparator:"last",variant:"embedded"})})]}),n&&t.jsxs("div",{className:d("px-3 pb-3",u?.matchSection),children:[a&&t.jsx(T,{entity:{name:a,styles:m}}),t.jsx(O,{...n,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(T,{entity:{name:l,styles:m}}),t.jsx("div",{className:d("flex flex-col",Xe(u)),children:i.map((g,f)=>t.jsx("div",{children:g},f))})]})]})}const da="text-xs font-semibold text-muted-foreground uppercase tracking-wider";function ca({profileHeader:e,stats:r,statsTitle:o,form:s,formTitle:a,featuredMatch:n,matchTitle:i,bettingOdds:l,oddsLabel:u,styles:c}){const m=e.styles?.background||"bg-gradient-to-br from-primary-600 to-primary-800",g=e.styles?{...e.styles,background:void 0}:void 0,f=Ke(c),w={typography:{name:d(da,f)},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(fe,{...e,styles:g,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(T,{entity:{name:o,styles:w}}),t.jsx(Q,{...r})]}),s&&t.jsxs("div",{className:c?.formSection,children:[a&&t.jsx(T,{entity:{name:a,styles:w}}),t.jsx(he,{...s,variant:"scoreCards"})]}),n&&t.jsxs("div",{className:c?.matchSection,children:[i&&t.jsx(T,{entity:{name:i,styles:w}}),t.jsx(O,{...n})]}),l&&l.length>0&&t.jsxs("div",{className:c?.oddsSection,children:[u&&t.jsx(T,{entity:{name:u,styles:w}}),t.jsx("div",{className:d("flex flex-col",Xe(c)),children:l.map((S,v)=>t.jsx("div",{children:S},v))})]})]})]})})}function ua({variant:e="card",...r}){switch(e){case"hero":return t.jsx(aa,{...r});case"compact":return t.jsx(la,{...r});case"horizontal":return t.jsx(ca,{...r});case"card":default:return t.jsx(sa,{...r})}}const ma={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl"},ga={none:"gap-0",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8"},pa={1:"grid-cols-1",2:"grid-cols-2"},xa={1:"md:grid-cols-1",2:"md:grid-cols-2",3:"md:grid-cols-3"},ha={1:"lg:grid-cols-1",2:"lg:grid-cols-2",3:"lg:grid-cols-3",4:"lg:grid-cols-4"},fa={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 Jr(e){const r=e?.borderRadius?ma[e.borderRadius]:"rounded-xl";return d("overflow-hidden",r,e?.background,e?.container)}function eo(e){return ga[e?.gap||"md"]}function ba(e){const r=e?.sm||1,o=e?.md||2,s=e?.lg||3,a=e?.xl||4;return d(pa[r],xa[o],ha[s],fa[a])}function ja({items:e,sectionHeader:r,cardVariant:o="standard",cardStyles:s,pagination:a,styles:n}){const i=eo(n),l=ba(n?.columns);return t.jsxs("div",{className:Jr(n),children:[r,t.jsx("div",{className:d("grid",l,i,n?.contentSection),children:e.map(u=>t.jsx(F,{content:u.content,variant:o,styles:s,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",n?.paginationSection),children:t.jsx(bt,{...a})})]})}function va({items:e,sectionHeader:r,cardVariant:o="standardHorizontal",cardStyles:s,pagination:a,styles:n}){const i=eo(n),l=o==="standard"?"standardHorizontal":o;return t.jsxs("div",{className:Jr(n),children:[r,t.jsx("div",{className:d("flex flex-col",i,n?.contentSection),children:e.map(u=>t.jsx(F,{content:u.content,variant:l,styles:s,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",n?.paginationSection),children:t.jsx(bt,{...a})})]})}function wa({variant:e="grid",...r}){switch(e){case"list":return t.jsx(va,{...r});case"grid":default:return t.jsx(ja,{...r})}}const ya={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl"},Na={none:"gap-0",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8"};function St(e){const r=e?.borderRadius?ya[e.borderRadius]:"";return d(r,e?.background,e?.container)}function At(e){return Na[e?.gap||"md"]}const Ca={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"},ka={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 Sa(e,r){return r<=1?e:{...e,content:{...e.content,description:void 0,category:r>=3?void 0:e.content.category}}}function dt({items:e,config:r,cardStyles:o,gapClass:s}){const a=Ca[r.columns],n=ka[r.columns];return t.jsx("div",{className:d("grid",a,s),children:e.map(i=>{const l=Sa(i,r.columns);return t.jsx(F,{content:l.content,variant:"hero",styles:{...o,typography:{...n,...o?.typography}},bettingOdds:l.bettingOdds,matchScore:l.matchScore},l.content.id)})})}function Aa({items:e,sectionHeader:r,cardStyles:o,styles:s,stackedConfig:a}){const n=a?.row1||{columns:1},i=a?.row2||{columns:2},l=a?.row3||{columns:3},u=At(s),c=n.columns,m=i.columns,g=l.columns,f=e.slice(0,c),w=e.slice(c,c+m),S=e.slice(c+m,c+m+g);return t.jsxs("div",{className:St(s),children:[r,t.jsxs("div",{className:d("flex flex-col",u),children:[f.length>0&&t.jsx(dt,{items:f,config:n,cardStyles:o,gapClass:u}),w.length>0&&t.jsx(dt,{items:w,config:i,cardStyles:o,gapClass:u}),S.length>0&&t.jsx(dt,{items:S,config:l,cardStyles:o,gapClass:u})]})]})}const Ra={title:"text-xl md:text-lg font-bold line-clamp-2",category:"text-xs",metadata:"text-xs opacity-80"},Ta={title:"text-xl md:text-base font-semibold line-clamp-2",metadata:"text-xs opacity-80"};function Jt(e,r=!1){return{...e,content:{...e.content,description:void 0,category:r?void 0:e.content.category}}}function La({items:e,sectionHeader:r,cardStyles:o,styles:s}){const a=At(s),n=e[0],i=e.slice(1,3),l=e.slice(3,6);return n?t.jsxs("div",{className:St(s),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(F,{content:n.content,variant:"hero",styles:{...o,imageAspectRatio:"auto",container:d("h-full",o?.container),imageContainer:d("h-full",o?.imageContainer)},bettingOdds:n.bettingOdds,matchScore:n.matchScore})}),i.length>0&&t.jsx("div",{className:d("flex flex-col",a),children:i.map(u=>{const c=Jt(u);return t.jsx(F,{content:c.content,variant:"hero",styles:{...o,container:d("flex-1",o?.container),typography:{...Ra,...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=Jt(u,!0);return t.jsx(F,{content:c.content,variant:"hero",styles:{...o,typography:{...Ta,...o?.typography}},bettingOdds:c.bettingOdds,matchScore:c.matchScore},c.content.id)})})]})]}):null}const Ma={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 Ia({items:e,sectionHeader:r,cardStyles:o,styles:s}){const a=At(s),n=e[0],i=e.slice(1);return n?t.jsxs("div",{className:St(s),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(F,{content:n.content,variant:"standard",styles:{...o,container:d("h-full",o?.container)},primaryCta:n.primaryCta,secondaryCta:n.secondaryCta,bettingOdds:n.bettingOdds,matchScore:n.matchScore})}),i.length>0&&t.jsx("div",{className:d("flex flex-col",a),children:i.map(l=>{const u=za(l);return t.jsx(F,{content:u.content,variant:"minimal",styles:{...o,typography:{...Ma,...o?.typography}},bettingOdds:u.bettingOdds,matchScore:u.matchScore},u.content.id)})})]})]}):null}function _a({variant:e="stacked",...r}){switch(e){case"spotlight":return t.jsx(La,{...r});case"highlight":return t.jsx(Ia,{...r});case"stacked":default:return t.jsx(Aa,{...r})}}const Rt={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl"},Pa={none:"gap-0",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8"},to={none:"",sm:"px-2 py-1",md:"px-3 py-2",lg:"px-4 py-3"};function I(e){const r=e?.borderRadius?Rt[e.borderRadius]:"rounded-xl";return d("overflow-hidden",r,e?.background,e?.container)}function ro(e){return Pa[e||"md"]}function er(e){const r=e?.typography||"text-sm font-semibold text-muted-foreground",o=e?.background||"bg-muted",s=to[e?.padding||"md"],a=e?.borderRadius?Rt[e.borderRadius]:"";return d(r,o,s,a)}function Da(e){const r=new Map;return e.forEach(o=>{const s=o.dateGroup||o.match.metadata?.date||"Unknown",a=r.get(s)||[];r.set(s,[...a,o])}),r}function Oa(e){const r=new Map;return e.forEach(o=>{const s=o.roundGroup||o.match.metadata?.round||"Unknown",a=r.get(s)||[];r.set(s,[...a,o])}),r}function Y({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 oo({title:e,styles:r,action:o}){return o?t.jsxs("div",{className:d("flex items-center justify-between",er(r)),children:[t.jsx("span",{children:e}),o]}):t.jsx("div",{className:er(r),children:e})}function Qe({title:e,subtitle:r,logo:o,action:s,styles:a}){const n=a?.typography||"text-sm font-semibold",i=a?.subtitleTypography||"text-xs text-muted-foreground",l=a?.background||"bg-muted",u=to[a?.padding||"md"],c=a?.borderRadius?Rt[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:n,children:e}),r&&t.jsx("div",{className:i,children:r})]})]}),s&&t.jsx("div",{children:s})]})}function be({children:e,bettingOdds:r,oddsColumnWidth:o="w-[360px]",hasOddsColumn:s=!1}){return s?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 je({items:e,styles:r,renderMatch:o,hasOddsColumn:s}){const a=s??e.some(n=>n.bettingOdds);return t.jsx("div",{className:"flex flex-col divide-y divide-border",children:e.map(n=>t.jsx(be,{bettingOdds:n.bettingOdds,oddsColumnWidth:r?.oddsColumnWidth,hasOddsColumn:a,children:o(n)},n.match.id))})}function tr({items:e,styles:r,sectionHeader:o,emptyMessage:s="No matches found"}){if(e.length===0)return t.jsxs("div",{className:I(r),children:[o,t.jsx(Y,{message:s})]});const a=e.some(i=>i.bettingOdds),n=i=>i.competitionGroup||i.match.metadata?.competition||"Unknown";return t.jsxs("div",{className:I(r),children:[o,t.jsx("div",{className:"flex flex-col divide-y divide-border",children:e.map((i,l)=>{const u=n(i),c=l>0?n(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(be,{bettingOdds:i.bettingOdds,oddsColumnWidth:r?.oddsColumnWidth,hasOddsColumn:a,children:t.jsx(O,{match:i.match,variant:"embedded",styles:r?.matchScoreStyles})})]},i.match.id)})})]})}function Ba({items:e,styles:r,sectionHeader:o,emptyMessage:s="No matches found"}){if(e.length===0)return t.jsxs("div",{className:I(r),children:[o,t.jsx(Y,{message:s})]});const a=Da(e),n=ro(r?.groupGap||"md"),i=e.some(l=>l.bettingOdds);return t.jsxs("div",{className:I(r),children:[o,t.jsx("div",{className:d("flex flex-col",n),children:Array.from(a.entries()).map(([l,u])=>{const c=u[0];return t.jsxs("div",{children:[t.jsx(oo,{title:l,styles:r?.groupHeader,action:c.groupAction}),t.jsx(je,{items:u,styles:r,hasOddsColumn:i,renderMatch:m=>t.jsx(O,{match:m.match,variant:"embedded",styles:r?.matchScoreStyles})})]},l)})})]})}function Ea({items:e,styles:r,sectionHeader:o,emptyMessage:s="No matches found",scrollToActiveRound:a=!1}){const n=A.useRef(null);if(A.useEffect(()=>{a&&n.current&&n.current.scrollIntoView({behavior:"smooth",block:"start"})},[a]),e.length===0)return t.jsxs("div",{className:I(r),children:[o,t.jsx(Y,{message:s})]});const i=Oa(e),l=ro(r?.groupGap||"md"),u=e.some(c=>c.bettingOdds);return t.jsxs("div",{className:I(r),children:[o,t.jsx("div",{className:d("flex flex-col",l),children:Array.from(i.entries()).map(([c,m])=>{const g=m[0],f=m.some(w=>w.isActiveRound);return t.jsxs("div",{ref:f?n:void 0,children:[t.jsx(oo,{title:c,styles:r?.groupHeader,action:g.groupAction}),t.jsx(je,{items:m,styles:r,hasOddsColumn:u,renderMatch:w=>t.jsx(O,{match:w.match,variant:"embedded",styles:r?.matchScoreStyles})})]},c)})})]})}function $a({items:e,styles:r,sectionHeader:o,emptyMessage:s="No matches found"}){if(e.length===0)return t.jsxs("div",{className:I(r),children:[o,t.jsx(Y,{message:s})]});const a={...r?.matchScoreStyles,finishedStatusDisplay:"date"};return t.jsxs("div",{className:I(r),children:[o,t.jsx(je,{items:e,styles:r,renderMatch:n=>t.jsx(O,{match:n.match,variant:"embedded",styles:a})})]})}function Ga({items:e,styles:r,sectionHeader:o,emptyMessage:s="No matches found"}){if(e.length===0)return t.jsxs("div",{className:I(r),children:[o,t.jsx(Y,{message:s})]});const a=e.some(l=>l.bettingOdds),n=l=>l.competitionGroup||l.match.metadata?.competition||"Unknown",i={...r?.matchScoreStyles,finishedStatusDisplay:"date"};return t.jsxs("div",{className:I(r),children:[o,t.jsx("div",{className:"flex flex-col divide-y divide-border",children:e.map((l,u)=>{const c=n(l),m=u>0?n(e[u-1]):null,g=c!==m;return t.jsxs("div",{children:[g&&t.jsx(Qe,{title:c,subtitle:l.competitionSubtitle,logo:l.competitionLogo,action:l.groupAction,styles:r?.groupHeader}),t.jsx(be,{bettingOdds:l.bettingOdds,oddsColumnWidth:r?.oddsColumnWidth,hasOddsColumn:a,children:t.jsx(O,{match:l.match,variant:"embedded",styles:i})})]},l.match.id)})})]})}function Wa({items:e,styles:r,sectionHeader:o,emptyMessage:s="No matches found"}){return e.length===0?t.jsxs("div",{className:I(r),children:[o,t.jsx(Y,{message:s})]}):t.jsxs("div",{className:I(r),children:[o,t.jsx(je,{items:e,styles:r,renderMatch:a=>t.jsx(O,{match:a.match,variant:"embedded",styles:r?.matchScoreStyles})})]})}function Ha({items:e,styles:r,sectionHeader:o,emptyMessage:s="No matches found"}){if(e.length===0)return t.jsxs("div",{className:I(r),children:[o,t.jsx(Y,{message:s})]});const a=e.some(i=>i.bettingOdds),n=i=>i.competitionGroup||i.match.metadata?.competition||"Unknown";return t.jsxs("div",{className:I(r),children:[o,t.jsx("div",{className:"flex flex-col divide-y divide-border",children:e.map((i,l)=>{const u=n(i),c=l>0?n(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(be,{bettingOdds:i.bettingOdds,oddsColumnWidth:r?.oddsColumnWidth,hasOddsColumn:a,children:t.jsx(O,{match:i.match,variant:"embedded",styles:r?.matchScoreStyles})})]},i.match.id)})})]})}function Va({items:e,styles:r,sectionHeader:o,emptyMessage:s="No matches found"}){if(e.length===0)return t.jsxs("div",{className:I(r),children:[o,t.jsx(Y,{message:s})]});const a=e.filter(l=>l.match.status!=="scheduled"),n=e.filter(l=>l.match.status==="scheduled"),i=[...a,...n];return t.jsxs("div",{className:I(r),children:[o,t.jsx(je,{items:i,styles:r,renderMatch:l=>t.jsx(O,{match:l.match,variant:"embedded",styles:r?.matchScoreStyles})})]})}function Ua({items:e,styles:r,sectionHeader:o,emptyMessage:s="No matches found"}){if(e.length===0)return t.jsxs("div",{className:I(r),children:[o,t.jsx(Y,{message:s})]});const a=e.some(l=>l.bettingOdds),n=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:I(r),children:[o,t.jsx("div",{className:"flex flex-col divide-y divide-border",children:e.map((l,u)=>{const c=n(l),m=u>0?n(e[u-1]):null,g=c!==m;return t.jsxs("div",{children:[g&&t.jsx(Qe,{title:c,subtitle:l.competitionSubtitle,logo:l.competitionLogo,action:l.groupAction,styles:r?.groupHeader}),t.jsx(be,{bettingOdds:l.bettingOdds,oddsColumnWidth:r?.oddsColumnWidth,hasOddsColumn:a,children:t.jsx(O,{match:l.match,variant:"embedded",styles:i(l)})})]},l.match.id)})})]})}function Fa({variant:e="daily",...r}){switch(e){case"daily":return t.jsx(tr,{...r});case"round":return t.jsx(Ba,{...r});case"competition":return t.jsx(Ea,{...r});case"teamResults":return t.jsx($a,{...r});case"teamResultsByCompetition":return t.jsx(Ga,{...r});case"teamFixtures":return t.jsx(Wa,{...r});case"teamFixturesByCompetition":return t.jsx(Ha,{...r});case"teamMatches":return t.jsx(Va,{...r});case"teamMatchesByCompetition":return t.jsx(Ua,{...r});default:return t.jsx(tr,{...r})}}const Ya="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 so(e){return e.imageUrl||Ya}const Tt={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl"},no={none:"gap-0",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8"};function Pe(e){const r=e?.borderRadius?Tt[e.borderRadius]:"rounded-xl",o=e?.background||"bg-card";return d("overflow-hidden p-4",r,o,e?.container)}function De(e){const r=e?.header?.border??"border-b border-muted",o=e?.header?.padding??"pb-4";return d(r,o,e?.header?.container)}function Oe(e){return no[e?.groupGap||"md"]}function Be(e){return no[e?.memberGap||"sm"]}function ao(e,r){const o=new Map;r&&r.forEach(n=>o.set(n.key,n));const s=new Map;e.forEach(n=>{const i=n.positionGroup;s.has(i)||s.set(i,[]),s.get(i).push(n)});const a=Array.from(s.entries()).map(([n,i])=>{const l=o.get(n);return{key:n,label:l?.label||n,order:l?.order??999,members:i}});return a.sort((n,i)=>n.order-i.order),a.map(({key:n,label:i,members:l})=>({key:n,label:i,members:l}))}function qa(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 Za="text-sm font-semibold text-muted-foreground uppercase tracking-wider",rr={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 or({member:e,display:r,styles:o}){const s=o?.memberNameTypography||"font-semibold text-foreground",a=o?.memberSubtitleTypography||"text-xs text-muted-foreground",n=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=n?.background||"bg-muted",m=n?.borderRadius?Tt[n.borderRadius]:"rounded-lg",g=n?.padding||"p-3",f=n?.gap||"gap-3";return t.jsxs(l,{className:d(c,m,g,"flex flex-col",f,i&&"cursor-pointer hover:opacity-80 transition-opacity",n?.container),...u,children:[t.jsx($,{name:e.name,mobileName:e.shortName,imageUrl:so(e),subtitle:qa(e,r),styles:{imageBorderRadius:"full",imageSize:n?.entityDisplay?.imageSize||"xl",typography:{name:s,subtitle:a},gap:"3",...n?.entityDisplay}}),e.stats&&e.stats.length>0&&t.jsx(Q,{items:e.stats,itemVariant:"stacked",styles:{grid:{colsMobile:3,colsTablet:3,colsDesktop:3,gap:"sm",...n?.statsGrid},item:{alignment:"center",padding:"sm",borderRadius:"md",background:"bg-foreground/5",typography:{value:"text-sm font-semibold text-foreground",label:"text-[9px] font-medium text-muted-foreground uppercase"},...n?.statsItem}}})]},e.id)}function Ka({members:e,groupByPosition:r=!0,positionGroups:o,display:s={showNumber:!0,showPosition:!0},header:a,styles:n}){const i=n?.groupHeaderTypography||Za,l=n?.columns||3,u=rr[l]||rr[3];if(r){const c=ao(e,o);return t.jsxs("div",{className:d(Pe(n),"flex flex-col",Oe(n)),children:[a&&t.jsx("div",{className:De(n),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,Be(n)),children:m.members.map(g=>t.jsx(or,{member:g,display:s,styles:n},g.id))})]},m.key))]})}return t.jsxs("div",{className:d(Pe(n),"flex flex-col",Oe(n)),children:[a&&t.jsx("div",{className:De(n),children:a}),t.jsx("div",{className:d("grid",u,Be(n)),children:e.map(c=>t.jsx(or,{member:c,display:s,styles:n},c.id))})]})}const Xa="text-sm font-semibold text-muted-foreground uppercase tracking-wider",sr={1:"grid-cols-1",2:"grid-cols-1 sm:grid-cols-2"};function Qa(e){const r=new Date(e),o=new Date;let s=o.getFullYear()-r.getFullYear();const a=o.getMonth()-r.getMonth();return(a<0||a===0&&o.getDate()<r.getDate())&&s--,s}function Ja(e,r){const o=[];if(r?.showPosition&&e.position&&o.push({label:"Position",value:e.position}),e.birthDate&&o.push({label:"Age",value:`${Qa(e.birthDate)}`}),e.height&&o.push({label:"Height",value:e.height}),e.contractEnd){const s=new Date(e.contractEnd).getFullYear();o.push({label:"Contract",value:`${s}`})}return e.marketValue&&o.push({label:"Value",value:e.marketValue}),o}function nr({member:e,display:r,styles:o}){const s=Ja(e,r),a=o?.memberCard,n=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?Tt[a.borderRadius]:"rounded-xl";return t.jsxs(i,{className:d(u,c,"overflow-hidden flex flex-row",n&&"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:so(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})]}),s.length>0&&t.jsx("div",{className:"flex flex-wrap gap-x-4 gap-y-1 text-sm",children:s.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(Q,{items:e.stats,itemVariant:"stacked",styles:{grid:{colsMobile:3,colsTablet:3,colsDesktop:3,gap:"sm",...a?.statsGrid},item:{alignment:"center",padding:"sm",borderRadius:"lg",background:"bg-foreground/5",typography:{value:"text-lg font-bold text-foreground",label:"text-[10px] font-medium text-muted-foreground uppercase"},...a?.statsItem}}})]})]})}function ei({members:e,groupByPosition:r=!0,positionGroups:o,display:s={showNumber:!0,showPosition:!0},header:a,styles:n}){const i=n?.groupHeaderTypography||Xa,l=n?.columns||2,u=sr[l]||sr[2];if(r){const c=ao(e,o);return t.jsxs("div",{className:d(Pe(n),"flex flex-col",Oe(n)),children:[a&&t.jsx("div",{className:De(n),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,Be(n)),children:m.members.map(g=>t.jsx(nr,{member:g,display:s,styles:n},g.id))})]},m.key))]})}return t.jsxs("div",{className:d(Pe(n),"flex flex-col",Oe(n)),children:[a&&t.jsx("div",{className:De(n),children:a}),t.jsx("div",{className:d("grid",u,Be(n)),children:e.map(c=>t.jsx(nr,{member:c,display:s,styles:n},c.id))})]})}function ti({variant:e="card",...r}){switch(e){case"detailed":return t.jsx(ei,{...r});case"card":default:return t.jsx(Ka,{...r})}}exports.Badge=gt;exports.BadgeGroup=pt;exports.BarItem=Hr;exports.BettingOdds=Tr;exports.CTAButton=os;exports.CTAGroup=Ee;exports.ComparisonItem=Vr;exports.CompetitorProfileBlock=ua;exports.ContentCard=F;exports.ContentListBlock=wa;exports.Countdown=br;exports.DefaultStatItem=_r;exports.EntityDisplay=$;exports.FORM_INDICATOR_DEFAULT_LABELS=Nt;exports.FeaturedContentBlock=_a;exports.FormIndicator=he;exports.HeadToHeadBlock=Jn;exports.HeadToHeadItem=Ur;exports.HeroCard=vr;exports.HorizontalStatItem=Dr;exports.InlineScore=Rr;exports.MatchListBlock=Fa;exports.MatchScore=O;exports.MatchupHeader=kt;exports.MinimalCard=Ar;exports.Pagination=bt;exports.ProfileHeader=fe;exports.PromoCard=Sr;exports.ScoreCard=Lr;exports.ScoreLine=Mr;exports.SectionHeader=T;exports.SquadBlock=ti;exports.StackedStatItem=Pr;exports.StandardCard=kr;exports.StatItem=Or;exports.StatsGrid=Q;exports.StatsHeadToHead=yt;exports.StatsTable=gn;exports.Tooltip=de;exports.cn=d;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|