1import{PageBaseElement as te}from"./BLn_WgyR.js";import{PageUnknownElementModel as ie}from"./CeT_Qnur.js";import{PageElementBase as T}from"./CdQXFjpm.js";import{k as J,C as Y,ai as O,z as M,aX as ne}from"./C-O3A2g9.js";import{t as m}from"./CATxlt2j.js";import oe from"./BZbuF720.js";import se from"./CZ-nYAVu.js";import ae from"./aVhWRzDk.js";import le from"./DTTA7nHh.js";import{j as re,a as Z,k as de,l as ce,d as ue}from"./DJtwOGa7.js";import{canChildMoveUp as me,canChildMoveDown as pe,canChildBeDuplicated as ge,getChildSlot as he,getDisabledSlotsForElement as be,placeChild as ye,moveChild as fe,removeChild as Te,setChildSpan as we}from"./u49kvY5k.js";import{G as f}from"./DA0pkXRu.js";import{G as p}from"./D_6K3OQ2.js";import{G as h}from"./T-kpnD9n.js";import{TypographyModel as y}from"./C8oKskU6.js";import{u as A}from"./B-0UYO6A.js";import{d as k}from"./ghde6Rcn.js";import{v as P}from"./CXTOca8g.js";import Se from"./4fGFr_Ql.js";import ke from"./y1cm4C7m.js";import ve from"./e8iQccU3.js";import D from"./GS9NEydH.js";import N from"./CcQ4Ltus.js";import K from"./B0c4LWc_.js";import I from"./lgAEZglK.js";import _ from"./CuRSUCtI.js";import j from"./htjJv_e9.js";import{SectionTitleLineModel as V}from"./DhOWJ3tu.js";import{T as Ce}from"./CrX2__Gh.js";import Fe from"./DcETsEPX.js";import We from"./BK1JsQ3s.js";import Le from"./BpURsi__.js";import Ee from"./D6478maL.js";import Pe from"./BfKE1bdH.js";import Ie from"./Bt29GPQR.js";import xe from"./L8m2TwEm.js";import R from"./GG5iyjBi.js";import ze from"./CNEDWtBv.js";import Oe from"./BZo6O4P9.js";import Ae from"./ClTS2itX.js";import U from"./BOjFJon4.js";import Be from"./C9nnkEDV.js";import Me from"./De9jMikG.js";import De from"./DLcUWGK-.js";import Ne from"./s7gaP9ey.js";import Ke from"./B5ulabTB.js";import _e from"./BpRW2k11.js";import je from"./C-Rszw0S.js";import G from"./DgHbHOJ0.js";import Ve from"./Cqa1KDKc.js";import Re from"./BiWr48mA.js";import Ue from"./BVwINox9.js";import Ge from"./BvmnrlUg.js";import He from"./CjAY4cJ9.js";import $e from"./DqPNygpg.js";import Qe from"./Bb0IQZh5.js";import qe from"./CfDU3Yru.js";import Xe from"./C2NZXhd3.js";import H from"./DOhHzf7v.js";import $ from"./BzW64PDJ.js";import Je from"./Bi23kqdx.js";import Q from"./BujH5eF6.js";import Ye from"./DHH_Gw4K.js";import Ze from"./BRYouy3M.js";import q from"./uGD6IAsS.js";import X from"./BohrWp-R.js";import et from"./CIr5W_GL.js";import tt from"./BNxyff6A.js";import it from"./C10kLDhy.js";import{FOOTBALL_DEFAULT_ACTIVE_TABS as nt,FOOTBALL_TABS_FIXED_ORDER as ot,FOOTBALL_DEFAULT_TAB as st,FOOTBALL_DEFAULT_TAB_MOBILE as at,FOOTBALL_VIDEO_TAB_ID as lt,FOOTBALL_TABS as rt,FOOTBALL_DEFAULT_STATS as dt}from"./b49aVprM.js";import ct from"./BBTOY6hN.js";import ut from"./KIteMrn-.js";import mt from"./BFIkkT92.js";import pt from"./DRCQUJky.js";import gt from"./CS1bbVxq.js";import ht from"./Cty1UQyn.js";import bt from"./DDBafzLl.js";import yt from"./CnZFPqU6.js";import ft from"./0jGjGwFk.js";import Tt from"./KxAf6qe1.js";import wt from"./p3W1gOto.js";import St from"./lHDPO-0x.js";import kt from"./BGgzs7fT.js";import ee from"./dhFsplHZ.js";import x from"./9sUHxVVZ.js";import z from"./CeH0TzZH.js";import w from"./DWQxIKzf.js";import B from"./DExCVjPO.js";import vt from"./C19Jdq23.js";class v extends T{constructor(t="root",e,n=[],a="client"){const o=J();super(t,e),this.widgetType="Profile",this.widgetName="Profile Page",this.component="Profile",this.icon={icon:"participant",pack:"cms",color:{shade:"200",value:"sky"}},this.pseudoWidgetType="template-content",this.contents=[],this.style={},this.context="client",this.buildContentFields=i=>[{heading:"",noPadding:!0,type:"component-list",components:i.contents.map(s=>({id:s.uuid,name:s.widgetName,type:"",element:{},editable:!0,deletable:!1,hideToggle:!0,icon:s.icon})),options:[]}],this.sport=o.public.club.sport||"football",this.slug="",this.context=a,Object.assign(this,m(e)),e!=null&&e.contents&&(this.contents=this.generateContents(!1,this.context))}serializeElement(){return{...this.serializeBaseElement(),contents:this.contents.map(t=>t.serializeElementForFanside())}}generateContents(t=!1,e="client"){return this.contents.map(n=>{if(n)return b(n.widgetType,this.uuid,t?{...n,uuid:void 0}:n,e==="cms"?"return-unknown":"return-empty",this.contents,e)}).filter(n=>n!==void 0)}getSidebarTabs(t){return[{name:"Layout",disabled:!0,fields:this.buildLayoutFields()},{name:"Content",fields:this.buildContentFields(t),default:!0},{name:"Style",fields:this.buildStyleFields(),disabled:!0}]}
1duplicateElement(){return new v(this.parentID,k({...this,uuid:void 0}))}pageActionOverrides(){return{delete:{hidden:!0},copy:{hidden:!0},"move-up":{hidden:!0},"move-down":{hidden:!0}}}get elementMetadata(){return{customPadding:0,showLabel:!1,showLabelOnHover:!1}}}const dn=Object.freeze(Object.defineProperty({__proto__:null,ProfileModel:v},Symbol.toStringTag,{value:"Module"}));class C extends T{constructor(t="root",e,n=[],a="client"){if(super(t,e),this.widgetType="ContainerSplit",this.widgetName="Split Container",this.component="ContainerSplit",this.icon={icon:"split-container",pack:"cms"},this.pseudoWidgetType="row",this.split={x:1},this.description="",this.title=new y({tag:"h2"}),this.style=new p({theme:"unset"}),this.layout={title:{align:new h},children:{},carouselOnMobile:!1},this.contents=[],this.backgroundImage=new f,this.width="contained",this.context="client",this.serializeElementForFanside=(o=!1)=>{const i=this.serializeElement();return i.widgetType=this.component,o&&(i.uuid=P()),i},this.buildContentFields=o=>{var s;const{getElementById:i}=A();return[{noPadding:!0,options:[{type:"divider",label:"Row Settings",attributeKey:null}]},{heading:"Text",toggleable:!0,toggleAttributeKey:["title","show"],options:[{heading:"Title",type:"input",attributeKey:["title","content"],placeholder:"Enter Title"},{heading:"Description",type:"rich-text",attributeKey:["description"]}]},{noPadding:!0,options:[{type:"divider",label:"Row Contents",attributeKey:null}]},{type:"component-list",noPadding:!0,components:(s=o.contents)==null?void 0:s.map(r=>{let l;l=typeof r=="string"?i(r):r;const d=(c=>{if("title"in c){if(typeof c.title=="string"&&c.title.length)return c.title;if(typeof c.title=="object"&&"content"in c.title&&c.title.content.length)return c.title.content}return"widgetName"in c?c.widgetName:""})(l),E="sidebarIcon"in l?l.sidebarIcon:{icon:l.widgetType,pack:"cms"};return{id:l.uuid,name:d,type:"sidebarName"in l?l.sidebarName:l.widgetType,icon:E,element:l,toggleable:!1,editable:!0,deletable:!0,hideToggle:!0}}),options:[]}]},this.buildStyleFields=()=>[{heading:"Theme",options:[{type:"radio",subType:"list",attributeKey:["style","theme"],options:[{label:"Light",id:"light"},{label:"Dark",id:"dark"},{label:"Accent",id:"club"}]}]},{heading:"Text Colour",options:[{type:"color-input",attributeKey:["style","color"]}]},{heading:"Background",type:"tabs",tabsOptions:{variant:"fill"},tabs:[{title:"Colour",value:"color",index:0,options:[{type:"color-input",attributeKey:["style","backgroundColor"]}]},{title:"Image",value:"image",index:1,options:[{type:"image-picker",attributeKey:["backgroundImage"]}]}],options:[]}
1],this.getSidebarTabs=o=>[{name:"Layout",fields:this.buildLayoutFields()},{name:"Content",fields:this.buildContentFields(o),default:!0},{name:"Style",fields:this.buildStyleFields()}],this.canChildMoveUp=o=>me(this.layout.children,o.uuid),this.canChildMoveDown=o=>pe(this.layout.children,o.uuid,this.split.x),this.canChildBeDuplicated=o=>ge(this.layout.children,o.uuid,this.split.x),this.getElementCurrentPosition=o=>he(this.layout.children,o.uuid)??NaN,this.getDisabledSlotsForElement=o=>be(this.layout.children,o.uuid,this.split.x),this.context=a,e!=null&&e.widgetType&&!("version"in e)?Object.assign(this,this.normalizeLegacyElement(e,n)):Object.assign(this,m(e)),e==null?void 0:e.contents){const o=e.contents.map(i=>{if(i)return typeof i=="string"?i:i.uuid}).filter(i=>i!==void 0);a==="client"&&(this.contents=this.generateContents(o.filter(i=>i!==void 0),n)),a!=="cms"||e.contents.every(i=>typeof i=="string")||(this.contents=this.generateContents(o,e.contents,!1))}}generateContents(t,e,n=!1){const a=e??this.contents;return t.map(o=>{const i=a.find(s=>{var r,l;return s.uuid===o||"contents"in s&&Array.isArray(s.contents)&&((l=(r=s.contents)==null?void 0:r[0])==null?void 0:l.uuid)===o});if(i)return"version"in i?b(i.widgetType,i.parentID,n?{...i,uuid:void 0}:i,"return-unknown"):{...i,parentID:this.uuid}}).filter(o=>o!==void 0)}serializeElement(t=!1){let e=this.contents.map(a=>this.context==="client"?a:typeof a!="string"&&"serializeElement"in a?a.serializeElementForFanside():a),n=this.layout;if(t){const a=new Map;e=e.map(i=>{const s=typeof i=="string"?i:i.uuid,r=P();return s&&a.set(s,r),typeof i=="string"?r:{...i,uuid:r}});const o={};Object.entries(this.layout.children).forEach(([i,s])=>{o[Number(i)]={...s,childUuid:s.childUuid?a.get(s.childUuid)??null:null}}),n={...this.layout,children:o}}return{...super.serializeBaseElement(),title:this.title,description:this.description,split:this.split,style:this.style,layout:n,contents:e,backgroundImage:this.backgroundImage,width:this.width}}buildLayoutFields(){return[{heading:"Title",options:[{heading:"Alignment",type:"radio",subType:"row",options:[{id:"start",icon:{icon:"align-left",pack:"cms",size:10}},{id:"center",icon:{icon:"align-center",pack:"cms",size:10}},{id:"end",icon:{icon:"align-right",pack:"cms",size:10}}],attributeKey:["layout","title","align","horizontal"]}]},{heading:"Width",options:[{type:"radio",subType:"row",attributeKey:["width"],options:[{label:"Contained",id:"contained",imgSrc:"/assets/layout/widths/row/contained.png",size:"54px"},{label:"Full Width",id:"full",imgSrc:"/assets/layout/widths/row/full-width.png",size:"54px"}]}]},{heading:"Display",options:[{type:"checkbox-field",label:"Display as a carousel on smaller device screens.",attributeKey:["layout","carouselOnMobile"]}]}]}duplicateElement(){const t=P(),e=Y(k({...this.serializeElement(!0),uuid:t}));return e.contents=e.contents.map(n=>typeof n=="string"?n:{...n,parentID:t}),new C(this.parentID,e,void 0,"cms")}normalizeLegacyElement(t,e=[]){var n,a;return{uuid:t.uuid,title:new y({tag:"h2",content:typeof t.title=="string"?t.title:""}),description:typeof t.description=="string"?t.description:"",split:{x:de(t)},style:new p({theme:Z(t.style.theme)}),layout:{title:{align:new h({horizontal:t.align==="text-center items-center"?"center":"start"})},children:re(t,e),carouselOnMobile:!0},contents:t.contents.filter(o=>typeof o=="string"),backgroundImage:new f((a=(n=t.style)==null?void 0:n.background)==null?void 0:a.image),width:"contained"}}get sidebarIcon(){return{icon:`containers${this.split.x}`,pack:"cms",color:{value:"green",shade:"300"}}}get sidebarName(){return`${this.split.x} ${this.widgetName}`}getChildContentOptions(){const{getRootElementById:t}=useV2PageStore(),e=t(this.uuid);return e&&e.widgetType==="PageFooter"?["WidgetText","WidgetDivider","WidgetImage","WidgetNewsletterSignUp","WidgetSocials","WidgetSponsors","WidgetMenuLinks"]:[]}getDisabledChildSubContentOptions(){const t=O();return getLastSegment(t.path)==="footer"?["GalleryWidget","ImageLink"]:[]}updateLayoutForNewChild(t,e){this.layout.children=ye(this.layout.children,t.uuid,e)}updateLayoutForMovedChild(t,e){this.layout.children=fe(this.layout.children,t.uuid,e,this.split.x)}updateLayoutForRemovedChild(t){this.layout.children=Te(this.layout.children,t.uuid)}updateChildSpan(t,e){this.layout.children=we(this.layout.children,t.uuid,e,this.split.x)}}const cn=Object.freeze(Object.defineProperty({__proto__:null,default:C},Symbol.toStringTag,{value:"Module"}));class F extends T{constructor(t="root",e,n,a="client"){super(t,e),this.widgetType="PageFooter",this.widgetName="Footer",this.component="PageFooter",this.icon={icon:"cms-footer",pack:"cms"},this.pseudoWidgetType="template-content",this.contents=[],this.settings={backToTop:{show:!1,align:new h({horizontal:"center",vertical:"start"}),style:new p({theme:"dark"})},termsAndPolicies:{style:new p({theme:"dark"}),layout:"centered",links:[]}},this.backgroundImage=new f,this.style=new p({theme:"dark"}),this.context="client",this.buildContentFields=o=>{const{createElement:i}
1=useV2PageStore();return[{noPadding:!0,options:[{type:"divider",label:"Footer Contents",attributeKey:null}]},{heading:"",noPadding:!0,type:"component-list",components:o.contents.map(s=>({id:s.uuid,name:"widgetName"in s?s.widgetName:s.widgetType,type:s.widgetType,icon:"icon"in s?s.icon:{icon:s.widgetType,pack:"cms"},element:s,toggleable:!1,editable:!0,deletable:!0,hideToggle:!0})),options:[]},{noPadding:!0,options:[{type:"external-selector",label:"New Section",icon:"section",size:"md",buttonType:"quarternary",iconPack:"cms",iconSize:12,attributeKey:null,link:{type:"function",value:""},callback:()=>i("Section",this.uuid,this.contents.length)}]},{noPadding:!0,customStyleClasses:["my-1"],options:[{type:"divider",label:"Manage Links",attributeKey:null}]},{heading:"Manage Links",subHeading:"Manage Terms & Privacy Links",options:[{type:"modal-input",modalId:"manage-footer-links",modalComponent:"FooterLinksModal",buttonProps:{label:"Manage Links",size:"md",buttonType:"quarternary",icon:"link",iconPack:"cms",iconSize:12},attributeKey:["settings","termsAndPolicies","links"]}]}]},this.buildLayoutFields=o=>[{heading:"Back to Top",toggleable:!0,toggleAttributeKey:["settings","backToTop","show"],options:[{heading:"Placement",type:"radio",subType:"row",size:"sm",padded:!0,disabled:!o.settings.backToTop.show,attributeKey:["settings","backToTop","align","vertical"],options:[{label:"Top",id:"start"},{label:"Bottom",id:"end"}]},{heading:"Alignment",type:"radio",subType:"row",size:"sm",padded:!0,disabled:!o.settings.backToTop.show,attributeKey:["settings","backToTop","align","horizontal"],options:[{icon:{icon:"cms-align-x-left",pack:"cms",size:16},id:"start"},{icon:{icon:"cms-align-x-middle",pack:"cms",size:16},id:"center"},{icon:{icon:"cms-align-x-right",pack:"cms",size:16},id:"end"}]}]},{heading:"Terms & Policies",options:[{heading:"Layout",type:"radio",subType:"row",attributeKey:["settings","termsAndPolicies","layout"],useSvg:!0,options:[{label:"Inline",id:"inline",icon:{icon:"footer-align-left",pack:"cms",size:56,viewBox:"0 0 56 40"}},{label:"Centered",id:"centered",icon:{icon:"footer-align-right",pack:"cms",size:56,viewBox:"0 0 56 40"}}]}]}],this.buildStyleFields=o=>[{heading:"Theme",options:[{type:"radio",subType:"list",attributeKey:["style","theme"],options:[{label:"Light",id:"light"},{label:"Dark",id:"dark"},{label:"Accent",id:"club"}],callback:i=>{o.settings.backToTop.style.theme=i,o.settings.termsAndPolicies.style.theme=i}}]},{heading:"Text Colour",options:[{type:"color-input",label:"Text Colour",attributeKey:["style","color"],callback:i=>{o.settings.backToTop.style.color=i,o.settings.termsAndPolicies.style.color=i}}]},{heading:"Background",type:"tabs",tabsOptions:{variant:"fill"},tabs:[{title:"Colour",value:"color",index:0,options:[{type:"color-input",label:"Background Colour",attributeKey:["style","backgroundColor"],callback:i=>{o.settings.backToTop.style.backgroundColor=i,o.settings.termsAndPolicies.style.backgroundColor=i}}]},{title:"Image",value:"image",index:1,options:[{type:"image-picker",attributeKey:["backgroundImage"]}]}],options:[]}
1],this.getSidebarTabs=o=>[{name:"Layout",fields:this.buildLayoutFields(o)},{name:"Content",fields:this.buildContentFields(o),default:!0},{name:"Style",fields:this.buildStyleFields(o)}],Object.assign(this,m(e)),this.context=a,a==="cms"&&(this.contents=this.contents.map(o=>b(o.widgetType,this.uuid,o,"return-plain-object",n,a)).filter(o=>o!==void 0))}serializeElement(){const t=this.contents.map(e=>this.context==="client"?e:typeof e!="string"&&"serializeElement"in e?e.serializeElement():e);return{...super.serializeBaseElement(),contents:t,settings:this.settings,style:this.style,backgroundImage:this.backgroundImage}}duplicateElement(){return new F(this.parentID,k({...this,uuid:void 0}))}getChildContentOptions(){return["Section"]}}const un=Object.freeze(Object.defineProperty({__proto__:null,default:F},Symbol.toStringTag,{value:"Module"}));class g extends T{constructor(t="root",e,n,a="client"){var o;if(super(t,e),this.widgetType="Section",this.component="Section",this.widgetName="Section",this.icon={icon:"section",pack:"cms"},this.pseudoWidgetType="section",this.title=new y({tag:"h1",alignment:"start",textTransform:"none"}),this.contents=[],this.description=new y({font:"secondary",alignment:"start"}),this.buttons=Y([new Ce({type:"primary",display:!1})]),this.segmentation={logicBlocks:[{conditions:[]}]},this.style=new p,this.backgroundImage=new f,this.layout=g.defaultLayout(),this.activeSubElement=null,this.subElements={"title-and-buttons":{component:"TitleAndButtons",model:null},segmentation:{component:"Segmentation",model:null}},this.openInNewTab=[!1],this.context="client",this.buildContentFields=i=>{var r;const{getElementById:s}=A();return[{noPadding:!0,customStyleClasses:["mb-2"],options:[{type:"divider",label:"Section Settings",attributeKey:null},{type:"sub-element-editor",label:"Title and Buttons",icon:{icon:"title-buttons",pack:"cms"},elementType:"section",attributeKey:null,callback:()=>{i.activeSubElement="title-and-buttons"}}]},{noPadding:!0,customStyleClasses:["mb-2"],options:[{type:"divider",label:"Segmentation",attributeKey:null},{type:"sub-element-editor",label:"Segmentation",icon:{icon:"account",pack:"fan"},elementType:"section",attributeKey:null,callback:()=>{i.activeSubElement="segmentation"}}]},{noPadding:!0,options:[{type:"divider",label:"Section Contents",attributeKey:null}]},{type:"component-list",noPadding:!0,components:(r=i.contents)==null?void 0:r.map(l=>{let d;d=typeof l=="string"?s(l):l;const E=(u=>{if("title"in u){if(typeof u.title=="string"&&u.title.length)return u.title;if(typeof u.title=="object"&&"content"in u.title&&u.title.content.length)return u.title.content}return"widgetName"in u?u.widgetName:""})(d),c="sidebarIcon"in d?d.sidebarIcon:{icon:d.widgetType,pack:"cms"};return{id:d.uuid,name:E,type:"sidebarName"in d?d.sidebarName:d.widgetType,icon:c,element:d,toggleable:!1,editable:!0,deletable:!0,hideToggle:!0}}),options:[]}]},this.buildStyleFields=()=>[{heading:"Theme",options:[{type:"radio",subType:"list",attributeKey:["style","theme"],options:[{label:"Light",id:"light"},{label:"Dark",id:"dark"},{label:"Accent",id:"club"}]}]},{heading:"Text Colour",options:[{type:"color-selector",attributeKey:["style","color"]}]},{heading:"Line Colour",options:[{type:"color-selector",attributeKey:["layout","line","color"]}]},{heading:"Background",type:"tabs",tabsOptions:{variant:"fill"},tabs:[{title:"Colour",value:"color",index:0,options:[{type:"color-selector",attributeKey:["style","backgroundColor"]}]},{title:"Image",value:"image",index:1,options:[{type:"image-picker",attributeKey:["backgroundImage"]}]}],options:[]}
1],this.getSidebarTabs=i=>{var s;return i.activeSubElement&&"getSidebarTabs"in i.getActiveSubElementModel()?((s=i.getActiveSubElementModel())==null?void 0:s.getSidebarTabs(i))||[]:[{name:"Layout",fields:this.buildLayoutFields(i)},{name:"Content",fields:this.buildContentFields(i),default:!0},{name:"Style",fields:this.buildStyleFields()}]},this.context=a,a==="cms"&&(this.subElements["title-and-buttons"].model=new Fe(this.uuid),this.subElements.segmentation.model=new We(this.uuid)),e!=null&&e.widgetType&&!("version"in e)?Object.assign(this,this.normalizeLegacyElement(e)):(e&&!((o=e.segmentation)!=null&&o.logicBlocks)&&(e.segmentation={logicBlocks:[{conditions:[]}]}),Object.assign(this,m(e))),this.layout=g.normalizeLayout(this.layout),e==null?void 0:e.contents){const i=e.contents.map(s=>typeof s=="string"?s:s.uuid);a==="client"&&(this.contents=this.generateContents(i,n,!1,a)),a!=="cms"||e.contents.every(s=>typeof s=="string")||(this.contents=this.generateContents(i,void 0,!1,"cms"))}this.buttons.forEach((i,s)=>{this.openInNewTab[s]=i.target==="_blank"})}static defaultLayout(){return{title:{align:new h({horizontal:"start"})},line:new V,button:{align:new h({vertical:"start"})},container:!1,border:{top:"none"}}}static normalizeLayout(t){var n,a;const e=g.defaultLayout();return t?{...e,...m(t),title:{align:new h({...e.title.align,...m((n=t.title)==null?void 0:n.align)})},button:{align:new h({...e.button.align,...m((a=t.button)==null?void 0:a.align)})},line:new V(t.line),border:{...e.border,...m(t.border)}}:e}generateContents(t,e,n=!1,a="client"){const o=e??this.contents;return t.map(i=>{const s=o.find(r=>{var l,d;return r.uuid===i||"contents"in r&&Array.isArray(r.contents)&&((d=(l=r.contents)==null?void 0:l[0])==null?void 0:d.uuid)===i});if(s)return"version"in s||Ft.includes(s.widgetType)?b(s.widgetType,this.uuid,n?{...s,uuid:void 0}:s,a==="cms"?"return-unknown":"return-empty",o,a):{...s,parentID:this.uuid}}).filter(i=>i!==void 0)}serializeElement(){const t=this.contents.map(e=>this.context==="client"?e:typeof e!="string"&&"serializeElement"in e?e.serializeElementForFanside():e);return{...super.serializeBaseElement(),title:this.title,contents:t,description:this.description,buttons:this.buttons.map((e,n)=>({...e,target:this.openInNewTab[n]?"_blank":""})),segmentation:this.segmentation,style:this.style,backgroundImage:this.backgroundImage,layout:this.layout}}buildLayoutFields(t,e){var s,r,l,d;const n=M(),a=(s=n.$posthog)==null?void 0:s.call(n),o=((r=a==null?void 0:a.isFeatureEnabled)==null?void 0:r.call(a,"internal-user"))??!1,i=!!t&&this.isFirstSection(t);return i&&((d=(l=t==null?void 0:t.layout)==null?void 0:l.border)!=null&&d.top)&&t.layout.border.top!=="none"&&(t.layout.border.top="none"),[{heading:"Section Border",subHeading:"Apply a shaped border to the bottom of the section",disabled:i,hidden:!o,options:[{type:"select",attributeKey:["layout","border","top"],items:[{name:"None",id:"none",localImage:"/assets/images/layout/border-style/standard-border.png"},{name:"Chevron",id:"chevron",localImage:"/assets/images/layout/border-style/arrow-down.png"},{name:"Chevron Inverse",id:"chevron-inverse",localImage:"/assets/images/layout/border-style/arrow-up.png"},{name:"Curve",id:"curve",localImage:"/assets/images/layout/border-style/curved-down.png"},{name:"Curve Inverse",id:"curve-inverse",localImage:"/assets/images/layout/border-style/curved-up.png"},{name:"Diagonal",id:"diagonal",localImage:"/assets/images/layout/border-style/sloped-down.png"},{name:"Diagonal Inverse",id:"diagonal-inverse",localImage:"/assets/images/layout/border-style/sloped-up.png"}]}]}]}duplicateElement(){const t=this.contents,{getPageElementById:e}=useV2PageStore(),n=new g(this.parentID,k({...this,uuid:void 0,contents:[]})),a=t.map(o=>{const i=e(o.uuid).duplicateElement();return i.parentID=n.uuid,i});return n.contents=a,n}normalizeLegacyElement(t){var e,n;return{uuid:t.uuid,contents:t.contents,title:new y({tag:"h1",content:t.title||"",textTransform:"none"}),description:new y({font:"secondary",content:t.description||""}),buttons:ue(t.buttons,!t.description&&!t.title&&t.style.layout!=="top_bottom_centered"),backgroundImage:new f(((e=t.style.background)==null?void 0:e.image)||{}),style:new p({theme:Z(t.style.theme??"light"),backgroundColor:t.style.background?t.style.background.color:void 0,color:t.style.color?{value:t.style.color.value,shade:t.style.color.shade,opacity:t.style.color.opacity}:void 0}),layout:ce(t.style.layout,(n=t.layout)==null?void 0:n.container)}}getActiveSubElementModel(){var t;return this.activeSubElement&&((t=this.subElements[this.activeSubElement])==null?void 0:t.model)||null}onElementSelected(){this.activeSubElement=null}isFirstSection(t){const{pageContent:e}=ne(A());return e.value.filter(n=>n.widgetType==="Section").findIndex(n=>n.uuid===t.uuid)===0}getChildContentOptions(){var o,i;const t=O(),e=M(),n=(o=e.$posthog)==null?void 0:o.call(e),a=[{id:"WidgetText"},{id:"WidgetImage"},{id:"WidgetDivider"},{id:"WidgetNewsletterSignUp",hidden:!((i=n==null?void 0:n.isFeatureEnabled)!=null&&i.call(n,"newsletter-signup"))},{id:"WidgetSocials"},{id:"WidgetSponsors"},{id:"WidgetMenuLinks"},{id:"ContainerSplit"}];return getLastSegment(t.path)==="footer"?a.reduce((s,r)=>
1(r.hidden||s.push(r.id),s),[]):[]}getDisabledChildSubContentOptions(){const t=O();return getLastSegment(t.path)==="footer"?["GalleryWidget","ImageLink"]:[]}}const mn=Object.freeze(Object.defineProperty({__proto__:null,default:g},Symbol.toStringTag,{value:"Module"}));class W extends T{constructor(t="root",e,n,a="client"){super(t,e),this.widgetType="WidgetMatchCentreFootball",this.widgetName="Match Centre",this.component="WidgetMatchCentreFootball",this.icon={icon:"page",pack:"cms",color:{value:"sky",shade:"200"}},this.pseudoWidgetType="template-content",this.defaultActiveTabs=nt,this.defaultFixedOrder=ot,this.defaultTab=st,this.defaultTabMobile=at,this.defaultVideoTabId=lt,this.tabs={...rt},this.tabBehavior="grow",this.showVideosTab=!0,this.backLink="/matches",this.statsGraphs=dt,this.backgroundImage=new f,this.style=new p({theme:"dark"}),this.contents=[],this.context="client",this.buildContentFields=()=>{var o,i,s,r;return[{heading:"",noPadding:!0,type:"component-list",components:[{id:((o=this.tabs.tabs.find(l=>l.id==="Default"))==null?void 0:o.element)||"default",name:"Scoreboard",type:"",element:{},editable:!0,deletable:!1,hideToggle:!0,icon:{icon:"scores",pack:"cms",color:{value:"sky",shade:"200"}}},{id:((i=this.tabs.tabs.find(l=>l.id==="Lineups"))==null?void 0:i.element)||"lineups",name:"Lineups",type:"",element:{},editable:!0,deletable:!1,hideToggle:!0,icon:{icon:"lineups",pack:"cms",color:{value:"sky",shade:"200"}}},{id:((s=this.tabs.tabs.find(l=>l.id==="Stats"))==null?void 0:s.element)||"stats",name:"Stats",type:"",element:{},editable:!0,deletable:!1,hideToggle:!0,icon:{icon:"stats",pack:"cms",color:{value:"sky",shade:"200"}}},{id:((r=this.tabs.tabs.find(l=>l.id==="Table"))==null?void 0:r.element)||"scores-table",name:"Scores & Table",type:"",element:{},editable:!0,deletable:!1,hideToggle:!0,icon:{icon:"scores-table",pack:"cms",color:{value:"sky",shade:"200"}}},{id:"tab-bar",name:"Tab Bar",type:"",element:{},editable:!0,deletable:!0,hidden:!0,hideToggle:!0,icon:{icon:"cms-content-carousel-pagination",pack:"cms",color:{value:"sky",shade:"200"}}}],options:[]}]},this.buildStyleFields=()=>[{heading:"Theme",options:[{type:"radio",subType:"list",attributeKey:["style","theme"],options:[{label:"Light",id:"light"},{label:"Dark",id:"dark"},{label:"Accent",id:"club"}]}]},{heading:"Background",type:"tabs",tabsOptions:{variant:"fill"},tabs:[{title:"Colour",value:"color",index:0,options:[{type:"color-input",label:"Background Colour",attributeKey:["style","backgroundColor"]}]},{title:"Image",value:"image",index:1,options:[{type:"image-picker",attributeKey:["backgroundImage"]}]}],options:[]}
1],this.getSidebarTabs=()=>[{name:"Layout",disabled:!0,fields:this.buildLayoutFields()},{name:"Content",fields:this.buildContentFields(),default:!0},{name:"Style",fields:this.buildStyleFields()}],this.context=a,Object.assign(this,m(e)),e!=null&&e.contents&&(this.contents=this.generateContents(!1,a))}generateContents(t=!1,e="client"){return this.contents.map(n=>{if(n)return b(n.widgetType,this.uuid,t?{...n,uuid:void 0}:n,e==="cms"?"return-unknown":"return-empty",this.contents,e)}).filter(n=>n!==void 0)}serializeElement(){return{...super.serializeBaseElement(),defaultActiveTabs:this.defaultActiveTabs,defaultFixedOrder:this.defaultFixedOrder,defaultTab:this.defaultTab,defaultTabMobile:this.defaultTabMobile,defaultVideoTabId:this.defaultVideoTabId,tabs:this.tabs,tabBehavior:this.tabBehavior,showVideosTab:this.showVideosTab,backLink:this.backLink,statsGraphs:this.statsGraphs,backgroundImage:this.backgroundImage,teamName:this.teamName,seasonId:this.seasonId,matchId:this.matchId,contents:this.contents.map(t=>t.serializeElementForFanside()),style:this.style}}duplicateElement(){return new W(this.parentID,{...this,uuid:void 0})}}const pn=Object.freeze(Object.defineProperty({__proto__:null,default:W},Symbol.toStringTag,{value:"Module"}));class L extends T{constructor(t="root",e,n=[],a="client"){super(t,e),this.widgetType="ProfileRoot",this.widgetName="Profile",this.component="ProfileRoot",this.icon={icon:"participant",pack:"cms"},this.pseudoWidgetType="section",this.style=new p({theme:"unset"}),this.slots=[],this.contents=[],this.context="client",this.buildContentFields=o=>[{heading:"",noPadding:!0,type:"component-list",components:o.contents.map(i=>({id:i.uuid,name:i.widgetName,type:"",element:{},editable:!0,deletable:!1,hideToggle:!0,icon:i.icon})),options:[]}],this.buildStyleFields=()=>[{heading:"Theme",options:[{type:"radio",subType:"list",attributeKey:"theme",options:[{label:"Light",id:"light"},{label:"Dark",id:"dark"},{label:"Accent",id:"club"}]}]}],this.getSidebarTabs=o=>[{name:"Layout",fields:this.buildLayoutFields(),disabled:!0},{name:"Content",fields:this.buildContentFields(o),default:!0},{name:"Style",fields:this.buildStyleFields()}],this.context=a,Object.assign(this,m(e)),e!=null&&e.slots?this.contents=this.generateSlots(!1,this.context):e!=null&&e.contents&&(this.contents=this.generateContents(!1,this.context))}generateContents(t=!1,e="client"){return this.contents.map(n=>{if(n)return b(n.widgetType,this.uuid,t?{...n,uuid:void 0}:n,e==="cms"?"return-unknown":"return-empty",this.contents,e)}).filter(n=>n!==void 0)}generateSlots(t=!1,e="client"){return this.slots.map(n=>{if(n)return b(n.widgetType,this.uuid,t?{...n,uuid:void 0}:n,e==="cms"?"return-unknown":"return-empty",this.slots,e)}).filter(n=>n!==void 0)}serializeElement(){const t=J();return{...super.serializeBaseElement(),style:this.style,contents:this.contents.map(e=>e.serializeElementForFanside()),sport:t.public.sport}}duplicateElement(){return new L(this.parentID,{...this,uuid:void 0})}pageActionOverrides(){return{delete:{hidden:!0},copy:{hidden:!0},"move-up":{hidden:!0},"move-down":{hidden:!0}}}}const gn=Object.freeze(Object.defineProperty({__proto__:null,default:L},Symbol.toStringTag,{value:"Module"})),Ct={CardFixtureResult:oe,CardFixtureResultMultiClub:se,CardFixtureUpcoming:ae,CardFixtureUpcomingMultiClub:le,EventGrid:Se,EventRail:ke,HeroSimple:ee,HorizontalLineWidget:R,ImageLink:D,WidgetImageLink:D,WidgetMenuLinks:Je,WidgetImage:N,ImageWidget:N,ImpactCTA:K,MatchCentreFootballDefault:ct,PageFooter:F,PageStreamline:gt,ParticipantComparison:_,ParticipantRankings:j,Profile:v,ProfileRoot:L,ProfileHero:ht,ProfileBiography:bt,ProfileGallery:yt,ProfileMatches:ft,ProfileMedia:Tt,ProfileRetail:wt,ProfileSocial:St,ProfileStats:kt,QuoteWidget:U,Section:g,section:g,TextWidget:H,WidgetAdSnackMedia:Le,WidgetBraze:Ee,WidgetStorytellerStories:Pe,WidgetStorytellerClips:Ie,WidgetCardFixture:xe,WidgetDivider:R,AccordionComplex:G,WidgetEventTakeover:ve,WidgetImpactCTA:K,WidgetLeagueTable:I,WidgetV2LeagueTable:I,LeagueTableWidget:I,WidgetNewsletterSignUp:ze,WidgetParticipantCard:Oe,Wi
1dgetParticipantComparison:_,WidgetParticipantRankings:j,WidgetPDCStreamlineVideoCarousel:Ae,WidgetQuote:U,WidgetSocials:Be,WidgetSponsors:Me,WidgetStreamlineBannerTextFriendly:De,WidgetStreamlineCalendar:Ne,WidgetStreamlineCarousel:Ke,WidgetStreamlineCollection:_e,WidgetStreamlineContent:je,WidgetStreamlineFAQ:G,WidgetStreamlineNextLiveMatchHero:Ve,WidgetStreamlinePackages:Re,WidgetStreamlinePlayer:Ue,WidgetStreamlinePlayers:Ge,WidgetStreamlinePromo:He,WidgetStreamlineSchedule:Qe,WidgetStreamlineScheduleList:$e,WidgetStreamlineSimpleHero:qe,HeroSpotlight:Xe,WidgetStreamlineSpotlightSmall:$,WidgetVideoSpotlightSmall:$,WidgetText:H,WidgetEmbed:Q,EmbedWidget:Q,WidgetShorthandEmbed:Ye,WidgetStreamlineVideoMembership:Ze,ContainerSplit:C,FormWidget:q,WidgetForm:q,GalleryWidget:X,WidgetGallery:X,WidgetStreamlineFixtures:et,WidgetEPG:tt,WidgetStreamlinePlaylists:it,WidgetMatchCentreFootball:W,MatchCentreFootballLineups:ut,MatchCentreFootballStats:mt,MatchCentreFootballTable:pt,VideoCard:x,WidgetCardVideo:x,Videos:x,WidgetCardNews:z,NewsCard:z,News:z,Product:w,product:w,WidgetCardProduct:w,WidgetCardPromo:B,ListingsParticipant:vt},Ft=["HorizontalLineWidget","section","ImageWidget","TextWidget","QuoteWidget","EmbedWidget","FormWidget","GalleryWidget","VideoCard","NewsCard","News","Product","product","LeagueTableWidget"];function b(S,t="root",e={},n="return-plain-object",a,o="client"){const i=(function(s,r){if(r){const l=Wt[s],d=l==null?void 0:l[r];if(d)return d}return Ct[s]})(S,e==null?void 0:e.type);if(!i)switch(n){case"return-plain-object":return new te(t,e);case"return-unknown":return new ie(t,{...e,widgetName:S,widgetType:S});case"return-empty":return;default:throw new Error(`Element type "${S}" is not registered.`)}return new i(t,e,a,o)}const Wt={hero:{default:ee},row:{},promo:{product:w,promo:B},Promo:{product:w,promo:B}};export{cn as a,un as b,mn as c,pn as d,gn as e,b as g,dn as i};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.