courthive-components 0.9.9 → 0.9.10

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.
@@ -22858,7 +22858,7 @@ function T6(e) {
22858
22858
  }
22859
22859
  function w6(e) {
22860
22860
  const t = [];
22861
- return !e.flightsCount || Number.isNaN(e.flightsCount) || e.flightsCount <= 0 ? t.push("Number of flights must be a valid number greater than 0") : e.flightsCount < 2 ? t.push("Must have at least 2 flights") : e.flightsCount > 10 && t.push("Maximum 10 flights allowed"), e.scaleType === "RATING" && !e.scaleName && t.push("Rating system must be selected"), e.eventType || t.push("Event type must be specified"), t;
22861
+ return !e.flightsCount || Number.isNaN(e.flightsCount) || e.flightsCount <= 0 ? t.push("Number of flights must be a valid number greater than 0") : e.flightsCount < 2 ? t.push("Must have at least 2 flights") : e.flightsCount > 10 && t.push("Maximum 10 flights allowed"), e.scaleType === "RATING" && !e.scaleName && t.push("Rating system must be selected"), t;
22862
22862
  }
22863
22863
  const by = "flightsCount", HO = "namingType", zO = "customName", YO = "suffixType", KO = "scaleType", XO = "scaleName", D6 = "splitMethod";
22864
22864
  function P6({
@@ -22920,7 +22920,7 @@ function P6({
22920
22920
  },
22921
22921
  {
22922
22922
  placeholder: "Flight",
22923
- label: t.labels?.customNameLabel || "Root Wor",
22923
+ label: t.labels?.customNameLabel || "Root Word",
22924
22924
  visible: i.namingType === "custom",
22925
22925
  value: i.customName,
22926
22926
  selectOnFocus: !0,
@@ -27860,7 +27860,7 @@ function nK(e) {
27860
27860
  }), So.show(), So.setProps({ interactive: !0 })), So;
27861
27861
  }
27862
27862
  function aK() {
27863
- return "0.9.9";
27863
+ return "0.9.10";
27864
27864
  }
27865
27865
  const oK = {
27866
27866
  // Best of 3 sets
@@ -101,7 +101,7 @@
101
101
  <div style="padding: 0.75em; background-color: #ffe8e8; border-left: 4px solid #ff4444; border-radius: 4px; color: #000;">
102
102
  <strong style="color: #000;">Error:</strong> ${U?.message||"Failed to calculate age details"}
103
103
  </div>
104
- `}}},u=document.createElement("div");Vu(u,[{label:n.labels?.categoryNameLabel||"Category Name",field:"categoryName",placeholder:"e.g., Boys U18, Open Singles, 3.5-4.0",value:a.categoryName,focus:!0,onChange:S=>{a.categoryName=S.target.value}},{label:n.labels?.typeLabel||"Category Type",field:"type",options:[{label:"Select type...",value:"",selected:!a.type},...(n.options?.types||[]).map(S=>({label:S,value:S,selected:S===a.type}))],onChange:S=>{const U=S.target.value;a.type=U,y()}},{label:n.labels?.ballTypeLabel||"Ball Type",field:"ballType",options:[{label:"None",value:"",selected:!a.ballType},...(n.options?.ballTypes||[]).map(S=>({label:S,value:S,selected:S===a.ballType}))],onChange:S=>{const U=S.target.value;a.ballType=U||void 0}},{label:n.labels?.notesLabel||"Notes",field:"notes",placeholder:"Additional information...",value:a.notes,onChange:S=>{a.notes=S.target.value}}]),s.appendChild(u);const l=document.createElement("div");l.id="ageCategorySection",l.style.display=a.type==="AGE"||a.type==="BOTH"?"block":"none";const d=document.createElement("label");d.textContent=n.labels?.ageCategoryCodeLabel||"Age Category Code",d.style.display="block",d.style.marginBottom="0.5em",d.style.fontWeight="bold",d.style.fontSize="0.9em",d.style.color="#000",l.appendChild(d);const p=document.createElement("div");p.style.display="flex",p.style.alignItems="center",p.style.gap="0.5em";const f=document.createElement("div");f.id="ageCategoryValue",f.style.padding="0.5em",f.style.border="1px solid #b5b5b5",f.style.borderRadius="4px",f.style.backgroundColor="#f5f5f5",f.style.flex="1",f.style.minHeight="2.5em",f.style.display="flex",f.style.alignItems="center",f.style.color="#000",f.textContent=a.ageCategoryCode||"Not set",p.appendChild(f);const m=document.createElement("button");m.className="button is-info is-small",m.textContent=a.ageCategoryCode?"Edit":"Set",m.onclick=()=>{UO({existingAgeCategoryCode:a.ageCategoryCode,editorConfig:{defaultConsideredDate:o},callback:S=>{a.ageCategoryCode=S.ageCategoryCode,f.textContent=S.ageCategoryCode||"Not set",m.textContent=S.ageCategoryCode?"Edit":"Set",c()}})},p.appendChild(m),l.appendChild(p);const h=document.createElement("div");h.id="ageDetailsPanel",h.style.marginTop="0.5em",h.style.display="none",l.appendChild(h),s.appendChild(l);const g=document.createElement("div");g.id="ratingSection",g.style.display=a.type==="RATING"||a.type==="BOTH"?"block":"none";const I=document.createElement("div");Vu(I,[{label:n.labels?.ratingTypeLabel||"Rating Type",field:"ratingType",options:[{label:"Select rating type...",value:"",selected:!a.ratingType},...(n.options?.ratingTypes||[]).map(S=>({label:S,value:S,selected:S===a.ratingType}))],onChange:S=>{const U=S.target.value;a.ratingType=U||void 0}},{label:n.labels?.ratingMinLabel||"Minimum Rating",field:"ratingMin",type:"number",placeholder:"Min",value:a.ratingMin?.toString()||"",onChange:S=>{const U=S.target.value;a.ratingMin=U?Number.parseFloat(U):void 0},fieldPair:{label:n.labels?.ratingMaxLabel||"Maximum Rating",field:"ratingMax",type:"number",placeholder:"Max",value:a.ratingMax?.toString()||"",onChange:S=>{const U=S.target.value;a.ratingMax=U?Number.parseFloat(U):void 0}}}]),g.appendChild(I),s.appendChild(g);const y=()=>{const S=a.type==="AGE"||a.type==="BOTH",U=a.type==="RATING"||a.type==="BOTH";l.style.display=S?"block":"none",g.style.display=U?"block":"none",S&&c()};setTimeout(()=>{y(),c()},0);const b=[{label:"Cancel",close:!0},{label:"OK",intent:"is-success",close:!0,onClick:()=>{N6(i)&&i(a)}}],v={...n.modalConfig};return Oa.open({title:n.labels?.title||"Category",content:s,buttons:b,config:v})}function R6(e){if(e===""||e===null||e===void 0)return!1;const t=Number(e);return!isNaN(t)&&Number.isInteger(t)&&t>=0}const TO=(e,t)=>r=>R6(r)&&Number(r)>=e&&Number(r)<=t,wO=["Blue","Red","Green","Orange","Purple","Yellow","Pink","Gold","Silver","Bronze"],A6=["WTN","UTR","TRN","NTRP","DUPR"],C6=[{value:"WATERFALL",label:"Waterfall",description:"Distributes evenly: 1→2→3→1→2→3 (like dealing cards)"},{value:"LEVEL_BASED",label:"Level Based",description:"Groups by skill tiers: [1-5], [6-10], [11-15]"},{value:"SHUTTLE",label:"Shuttle",description:"Alternating direction: 1→2→3→3→2→1→1→2→3 (like a loom shuttle)"}];function k6(e){const{flightsCount:t,namingType:r,customName:i,suffixType:n}=e,a=[];for(let o=0;o<t;o++)if(r==="colors")a.push(wO[o]||`Flight ${o+1}`);else{const s=n==="letters"?String.fromCodePoint(65+o):(o+1).toString();a.push(`${i||"Flight"} ${s}`)}return a}function O6(e){const t={scaleType:e.scaleType};return e.eventType&&(t.eventType=e.eventType),e.scaleType==="RATING"&&e.scaleName&&(t.scaleName=e.scaleName),t}function x6(e){return{WATERFALL:"splitWaterfall",LEVEL_BASED:"splitLevelBased",SHUTTLE:"splitShuttle"}[e]||"splitLevelBased"}function F6(e){const t=[];return!e.flightsCount||Number.isNaN(e.flightsCount)||e.flightsCount<=0?t.push("Number of flights must be a valid number greater than 0"):e.flightsCount<2?t.push("Must have at least 2 flights"):e.flightsCount>10&&t.push("Maximum 10 flights allowed"),e.scaleType==="RATING"&&!e.scaleName&&t.push("Rating system must be selected"),e.eventType||t.push("Event type must be specified"),t}const BU="flightsCount",DO="namingType",PO="customName",EO="suffixType",NO="scaleType",MO="scaleName",L6="splitMethod";function _6({existingProfile:e,editorConfig:t={}}={}){const r=!!e,i={flightsCount:2,namingType:"colors",customName:"Flight",suffixType:"numbers",scaleType:"RATING",scaleName:"WTN",splitMethod:"LEVEL_BASED"};if(r&&e){const{flights:a,scaleAttributes:o,splitMethod:s}=e;if(a&&a.length>0){i.flightsCount=a.length;const c=a[0].drawName;if(wO.includes(c))i.namingType="colors";else{const u=c.match(/^(.+?)\s+([A-Z]|\d+)$/);u&&(i.namingType="custom",i.customName=u[1],i.suffixType=/[A-Z]/.test(u[2])?"letters":"numbers")}}if(o&&(i.scaleType=o.scaleType||"RATING",i.scaleName=o.scaleName),s){const c={splitWaterfall:"WATERFALL",splitLevelBased:"LEVEL_BASED",splitShuttle:"SHUTTLE"};i.splitMethod=c[s]||"LEVEL_BASED"}}return[{error:"Must be in range 2-10",placeholder:"2",validator:TO(2,10),value:i.flightsCount,label:t.labels?.flightsCountLabel||"Number of Flights (2-10)",field:BU,selectOnFocus:!0,hide:r,type:"number",focus:!0},{options:[{label:"Color Names",value:"colors",selected:i.namingType==="colors"},{label:"Root Word",value:"custom",selected:i.namingType==="custom"}],label:t.labels?.namingTypeLabel||"Naming Strategy",value:i.namingType,field:DO,hide:r},{placeholder:"Flight",label:t.labels?.customNameLabel||"Root Wor",visible:i.namingType==="custom",value:i.customName,selectOnFocus:!0,field:PO,hide:r,fieldPair:{options:[{label:"Letters (A, B, C)",value:"letters",selected:i.suffixType==="letters"},{label:"Numbers (1, 2, 3)",value:"numbers",selected:i.suffixType==="numbers"}],label:t.labels?.suffixTypeLabel||"Suffix Style",visible:i.namingType==="custom",value:i.suffixType,field:EO}},{options:[{label:"Rating",value:"RATING",selected:i.scaleType==="RATING"},{label:"Ranking",value:"RANKING",selected:i.scaleType==="RANKING"}],label:t.labels?.scaleTypeLabel||"Flighting Strategy",field:NO,value:i.scaleType,hide:r},{options:A6.map(a=>({label:a,value:a,selected:a===i.scaleName})),label:t.labels?.scaleNameLabel||"Rating System",field:MO,value:i.scaleName,visible:i.scaleType==="RATING",hide:r},{label:t.labels?.splitMethodLabel||"Split Method",field:L6,value:i.splitMethod,radio:!0,options:C6.map(a=>({text:a.label,value:a.value,checked:a.value===i.splitMethod})),hide:r}]}const VU="none";function B6(){const e=({inputs:n})=>{const a=document.getElementById("flightProfileOk");if(!a)return;const o=n[BU]?.value,s=TO(2,10)(o);a.disabled=!s,a.style.opacity=s?"1":"0.5",a.style.cursor=s?"pointer":"not-allowed"};return[{onInput:({inputs:n})=>{e({inputs:n})},control:BU},{onChange:({e:n,fields:a})=>{const o=n.target.value;if(a){const s=o==="custom";a[PO].style.display=s?"":VU,a[EO].style.display=s?"":VU}},control:DO},{onChange:({e:n,fields:a})=>{const o=n.target.value;if(a){const s=o==="RATING";a[MO].style.display=s?"":VU}},control:NO}]}function RO(e){return typeof e=="function"}function V6(e){const{existingFlightProfile:t,editorConfig:r={},callback:i}=e,n=!!t;let a;const o=d=>{if(n){const h=document.createElement("div");h.className="notification is-info is-light",h.innerHTML='<strong style="color: #000;">Note:</strong> Flight split has already been performed. You can only rename the flights.',d.appendChild(h)}const p=_6({existingProfile:t,editorConfig:r}),f=B6(),m=document.createElement("div");if(d.appendChild(m),a=Vu(m,p,f),n&&t?.flights){const h=document.createElement("div");h.className="field",h.innerHTML=`
104
+ `}}},u=document.createElement("div");Vu(u,[{label:n.labels?.categoryNameLabel||"Category Name",field:"categoryName",placeholder:"e.g., Boys U18, Open Singles, 3.5-4.0",value:a.categoryName,focus:!0,onChange:S=>{a.categoryName=S.target.value}},{label:n.labels?.typeLabel||"Category Type",field:"type",options:[{label:"Select type...",value:"",selected:!a.type},...(n.options?.types||[]).map(S=>({label:S,value:S,selected:S===a.type}))],onChange:S=>{const U=S.target.value;a.type=U,y()}},{label:n.labels?.ballTypeLabel||"Ball Type",field:"ballType",options:[{label:"None",value:"",selected:!a.ballType},...(n.options?.ballTypes||[]).map(S=>({label:S,value:S,selected:S===a.ballType}))],onChange:S=>{const U=S.target.value;a.ballType=U||void 0}},{label:n.labels?.notesLabel||"Notes",field:"notes",placeholder:"Additional information...",value:a.notes,onChange:S=>{a.notes=S.target.value}}]),s.appendChild(u);const l=document.createElement("div");l.id="ageCategorySection",l.style.display=a.type==="AGE"||a.type==="BOTH"?"block":"none";const d=document.createElement("label");d.textContent=n.labels?.ageCategoryCodeLabel||"Age Category Code",d.style.display="block",d.style.marginBottom="0.5em",d.style.fontWeight="bold",d.style.fontSize="0.9em",d.style.color="#000",l.appendChild(d);const p=document.createElement("div");p.style.display="flex",p.style.alignItems="center",p.style.gap="0.5em";const f=document.createElement("div");f.id="ageCategoryValue",f.style.padding="0.5em",f.style.border="1px solid #b5b5b5",f.style.borderRadius="4px",f.style.backgroundColor="#f5f5f5",f.style.flex="1",f.style.minHeight="2.5em",f.style.display="flex",f.style.alignItems="center",f.style.color="#000",f.textContent=a.ageCategoryCode||"Not set",p.appendChild(f);const m=document.createElement("button");m.className="button is-info is-small",m.textContent=a.ageCategoryCode?"Edit":"Set",m.onclick=()=>{UO({existingAgeCategoryCode:a.ageCategoryCode,editorConfig:{defaultConsideredDate:o},callback:S=>{a.ageCategoryCode=S.ageCategoryCode,f.textContent=S.ageCategoryCode||"Not set",m.textContent=S.ageCategoryCode?"Edit":"Set",c()}})},p.appendChild(m),l.appendChild(p);const h=document.createElement("div");h.id="ageDetailsPanel",h.style.marginTop="0.5em",h.style.display="none",l.appendChild(h),s.appendChild(l);const g=document.createElement("div");g.id="ratingSection",g.style.display=a.type==="RATING"||a.type==="BOTH"?"block":"none";const I=document.createElement("div");Vu(I,[{label:n.labels?.ratingTypeLabel||"Rating Type",field:"ratingType",options:[{label:"Select rating type...",value:"",selected:!a.ratingType},...(n.options?.ratingTypes||[]).map(S=>({label:S,value:S,selected:S===a.ratingType}))],onChange:S=>{const U=S.target.value;a.ratingType=U||void 0}},{label:n.labels?.ratingMinLabel||"Minimum Rating",field:"ratingMin",type:"number",placeholder:"Min",value:a.ratingMin?.toString()||"",onChange:S=>{const U=S.target.value;a.ratingMin=U?Number.parseFloat(U):void 0},fieldPair:{label:n.labels?.ratingMaxLabel||"Maximum Rating",field:"ratingMax",type:"number",placeholder:"Max",value:a.ratingMax?.toString()||"",onChange:S=>{const U=S.target.value;a.ratingMax=U?Number.parseFloat(U):void 0}}}]),g.appendChild(I),s.appendChild(g);const y=()=>{const S=a.type==="AGE"||a.type==="BOTH",U=a.type==="RATING"||a.type==="BOTH";l.style.display=S?"block":"none",g.style.display=U?"block":"none",S&&c()};setTimeout(()=>{y(),c()},0);const b=[{label:"Cancel",close:!0},{label:"OK",intent:"is-success",close:!0,onClick:()=>{N6(i)&&i(a)}}],v={...n.modalConfig};return Oa.open({title:n.labels?.title||"Category",content:s,buttons:b,config:v})}function R6(e){if(e===""||e===null||e===void 0)return!1;const t=Number(e);return!isNaN(t)&&Number.isInteger(t)&&t>=0}const TO=(e,t)=>r=>R6(r)&&Number(r)>=e&&Number(r)<=t,wO=["Blue","Red","Green","Orange","Purple","Yellow","Pink","Gold","Silver","Bronze"],A6=["WTN","UTR","TRN","NTRP","DUPR"],C6=[{value:"WATERFALL",label:"Waterfall",description:"Distributes evenly: 1→2→3→1→2→3 (like dealing cards)"},{value:"LEVEL_BASED",label:"Level Based",description:"Groups by skill tiers: [1-5], [6-10], [11-15]"},{value:"SHUTTLE",label:"Shuttle",description:"Alternating direction: 1→2→3→3→2→1→1→2→3 (like a loom shuttle)"}];function k6(e){const{flightsCount:t,namingType:r,customName:i,suffixType:n}=e,a=[];for(let o=0;o<t;o++)if(r==="colors")a.push(wO[o]||`Flight ${o+1}`);else{const s=n==="letters"?String.fromCodePoint(65+o):(o+1).toString();a.push(`${i||"Flight"} ${s}`)}return a}function O6(e){const t={scaleType:e.scaleType};return e.eventType&&(t.eventType=e.eventType),e.scaleType==="RATING"&&e.scaleName&&(t.scaleName=e.scaleName),t}function x6(e){return{WATERFALL:"splitWaterfall",LEVEL_BASED:"splitLevelBased",SHUTTLE:"splitShuttle"}[e]||"splitLevelBased"}function F6(e){const t=[];return!e.flightsCount||Number.isNaN(e.flightsCount)||e.flightsCount<=0?t.push("Number of flights must be a valid number greater than 0"):e.flightsCount<2?t.push("Must have at least 2 flights"):e.flightsCount>10&&t.push("Maximum 10 flights allowed"),e.scaleType==="RATING"&&!e.scaleName&&t.push("Rating system must be selected"),t}const BU="flightsCount",DO="namingType",PO="customName",EO="suffixType",NO="scaleType",MO="scaleName",L6="splitMethod";function _6({existingProfile:e,editorConfig:t={}}={}){const r=!!e,i={flightsCount:2,namingType:"colors",customName:"Flight",suffixType:"numbers",scaleType:"RATING",scaleName:"WTN",splitMethod:"LEVEL_BASED"};if(r&&e){const{flights:a,scaleAttributes:o,splitMethod:s}=e;if(a&&a.length>0){i.flightsCount=a.length;const c=a[0].drawName;if(wO.includes(c))i.namingType="colors";else{const u=c.match(/^(.+?)\s+([A-Z]|\d+)$/);u&&(i.namingType="custom",i.customName=u[1],i.suffixType=/[A-Z]/.test(u[2])?"letters":"numbers")}}if(o&&(i.scaleType=o.scaleType||"RATING",i.scaleName=o.scaleName),s){const c={splitWaterfall:"WATERFALL",splitLevelBased:"LEVEL_BASED",splitShuttle:"SHUTTLE"};i.splitMethod=c[s]||"LEVEL_BASED"}}return[{error:"Must be in range 2-10",placeholder:"2",validator:TO(2,10),value:i.flightsCount,label:t.labels?.flightsCountLabel||"Number of Flights (2-10)",field:BU,selectOnFocus:!0,hide:r,type:"number",focus:!0},{options:[{label:"Color Names",value:"colors",selected:i.namingType==="colors"},{label:"Root Word",value:"custom",selected:i.namingType==="custom"}],label:t.labels?.namingTypeLabel||"Naming Strategy",value:i.namingType,field:DO,hide:r},{placeholder:"Flight",label:t.labels?.customNameLabel||"Root Word",visible:i.namingType==="custom",value:i.customName,selectOnFocus:!0,field:PO,hide:r,fieldPair:{options:[{label:"Letters (A, B, C)",value:"letters",selected:i.suffixType==="letters"},{label:"Numbers (1, 2, 3)",value:"numbers",selected:i.suffixType==="numbers"}],label:t.labels?.suffixTypeLabel||"Suffix Style",visible:i.namingType==="custom",value:i.suffixType,field:EO}},{options:[{label:"Rating",value:"RATING",selected:i.scaleType==="RATING"},{label:"Ranking",value:"RANKING",selected:i.scaleType==="RANKING"}],label:t.labels?.scaleTypeLabel||"Flighting Strategy",field:NO,value:i.scaleType,hide:r},{options:A6.map(a=>({label:a,value:a,selected:a===i.scaleName})),label:t.labels?.scaleNameLabel||"Rating System",field:MO,value:i.scaleName,visible:i.scaleType==="RATING",hide:r},{label:t.labels?.splitMethodLabel||"Split Method",field:L6,value:i.splitMethod,radio:!0,options:C6.map(a=>({text:a.label,value:a.value,checked:a.value===i.splitMethod})),hide:r}]}const VU="none";function B6(){const e=({inputs:n})=>{const a=document.getElementById("flightProfileOk");if(!a)return;const o=n[BU]?.value,s=TO(2,10)(o);a.disabled=!s,a.style.opacity=s?"1":"0.5",a.style.cursor=s?"pointer":"not-allowed"};return[{onInput:({inputs:n})=>{e({inputs:n})},control:BU},{onChange:({e:n,fields:a})=>{const o=n.target.value;if(a){const s=o==="custom";a[PO].style.display=s?"":VU,a[EO].style.display=s?"":VU}},control:DO},{onChange:({e:n,fields:a})=>{const o=n.target.value;if(a){const s=o==="RATING";a[MO].style.display=s?"":VU}},control:NO}]}function RO(e){return typeof e=="function"}function V6(e){const{existingFlightProfile:t,editorConfig:r={},callback:i}=e,n=!!t;let a;const o=d=>{if(n){const h=document.createElement("div");h.className="notification is-info is-light",h.innerHTML='<strong style="color: #000;">Note:</strong> Flight split has already been performed. You can only rename the flights.',d.appendChild(h)}const p=_6({existingProfile:t,editorConfig:r}),f=B6(),m=document.createElement("div");if(d.appendChild(m),a=Vu(m,p,f),n&&t?.flights){const h=document.createElement("div");h.className="field",h.innerHTML=`
105
105
  <label class="label">${r.labels?.flightNamesLabel||"Flight Names"}</label>
106
106
  `,t.flights.forEach((g,I)=>{const y=document.createElement("div");y.className="field",y.innerHTML=`
107
107
  <div class="control">
@@ -189,4 +189,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
189
189
  `,"Instead, pass the .innerHTML of the element, or use a function that","returns a cloned version of the element instead.",`
190
190
 
191
191
  `,`1) content: element.innerHTML
192
- `,"2) content: () => element.cloneNode(true)"].join(" "))}var s=n.reduce(function(c,u){var l=u&&nK(u,i);return l&&c.push(l),c},[]);return xp(e)?s[0]:s}Lp.defaultProps=un,Lp.setDefaultProps=eK,Lp.currentInput=Ca,Object.assign({},hx,{effect:function(t){var r=t.state,i={popper:{position:r.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(r.elements.popper.style,i.popper),r.styles=i,r.elements.arrow&&Object.assign(r.elements.arrow.style,i.arrow)}}),Lp.setDefaultProps({render:Qx});function wT(e){return typeof e=="function"}let as;function _p(e){as&&(as?.destroy(!0),as=void 0),e?.remove&&e.remove()}function aK(e){const{title:t,options:r,menuItems:i=[],coords:n,callback:a,config:o}=e;let{target:s,items:c}=e;if(!r?.length&&!c?.length&&!i)return;_p();const u=document.createElement("div");let l;const d=()=>{c=c?.filter(m=>!m.hide&&!m.disabled).map(m=>({...m,onClick:()=>{_p(u),wT(m.onClick)&&m.onClick()}}))||r?.filter(m=>!m.hide&&!m.disabled).map(m=>({text:typeof m=="object"?m.option:m,style:m.style,onClick:()=>{m.subMenu?as.setContent("IMPLEMENT SUB MENU"):wT(m.onClick)?(_p(u),m.onClick()):wT(a)&&a&&(_p(u),a(typeof m=="object"?{...m,coords:n}:m))}}));const p=[{text:t,items:c},...i];return l=dx(u,p).focusElement,u};return s=s||n?.evt?.target,s&&(as=Lp(s,{content:d,theme:"light-border",trigger:"click",onShown:()=>{l&&setTimeout(()=>l?.focus(),0)},...o}),as.show(),as.setProps({interactive:!0})),as}function oK(){return"0.9.9"}const sK={SET3_S6_TB7:"SET3-S:6/TB7",SET3_S6_TB7_F_TB10:"SET3-S:6/TB7-F:TB10",SET3_S6_TB10:"SET3-S:6/TB10",SET3_S6_F_TB10:"SET3-S:6-F:TB10",SET3_S6_TB7_NOAD:"SET3-S:6/TB7NOAD",SET3_S8_TB7:"SET3-S:8/TB7",SET3_S8_TB7_AT7:"SET3-S:8/TB7@7",SET3_S4_TB7:"SET3-S:4/TB7",SET3_S4_TB7_F_TB10:"SET3-S:4/TB7-F:TB10",SET3_S4_TB5_AT3_F_TB10:"SET3-S:4/TB5@3-F:TB10",SET5_S6_TB7:"SET5-S:6/TB7",SET5_S6_TB7_F_TB10:"SET5-S:6/TB7-F:TB10",SET1_S6_TB7:"SET1-S:6/TB7",SET1_S6_TB10:"SET1-S:6/TB10",SET1_S6_TB7_AT5:"SET1-S:6/TB7@5",SET1_S8_TB7:"SET1-S:8/TB7",SET1_S4_TB7:"SET1-S:4/TB7",SET1_S5_TB9_AT4:"SET1-S:5/TB9@4",SET1_S_TB7:"SET1-S:T7",SET1_S_TB10:"SET1-S:TB10",SET1_S_TB21:"SET1-S:T21",SET1_S8:"SET1-S:8",SET1_S10:"SET1-S:10",FAST4:"SET5-S:4/NOAD",SET3X_T10A_TB1:"SET3X-S:T10A-F:TB1",SET3X_T10A_TB1_NOAD:"SET3X-S:T10A-F:TB1NOAD",SET4X_T10A_TB1:"SET4X-S:T10A-F:TB1"};function cK(e,t,r){if(!e)return{elements:{}};const i={};for(const n of t||[]){if(!n?.label||n.hide)continue;const a=document.createElement("button");n.id&&(i[n.id]=a,a.id=n.id),a.style.marginRight=".5em",a.className="button font-medium",n.intent&&a.classList.add(n.intent),a.innerHTML=n.label,n.disabled&&(a.disabled=!0),a.onclick=o=>{o.stopPropagation(),!o.target.disabled&&dn(n.onClick)&&n.onClick(),r&&dn(r)&&r()},e.appendChild(a)}return{elements:i}}qe.MATCH_FORMATS=sK,qe.buildSetScore=HO,qe.cModal=Oa,qe.calculateComplement=GO,qe.compositions=uc,qe.courthiveComponentsVersion=oK,qe.destroyTipster=_p,qe.drawer=w4,qe.getAgeCategoryModal=UO,qe.getCategoryModal=M6,qe.getFlightProfileModal=V6,qe.getMatchUpFormatModal=gO,qe.getMatchWinner=j5,qe.getMaxAllowedScore=$O,qe.getMockParticipantsModal=m6,qe.getScoringConfig=bp,qe.getSetFormatForIndex=mc,qe.getSetWinner=jO,qe.initDrawer=D4,qe.isMatchComplete=uo,qe.isSetComplete=ZU,qe.isSetTiebreakOnly=Up,qe.isSetTimed=ug,qe.renderButtons=cK,qe.renderContainer=o6,qe.renderField=Nc,qe.renderForm=Vu,qe.renderMatchUp=lp,qe.renderMenu=dx,qe.renderOptions=bw,qe.renderParticipant=Hk,qe.renderParticipantInput=Uw,qe.renderRound=rO,qe.renderRoundHeader=zk,qe.renderStructure=a6,qe.resetScoringConfig=_5,qe.scoringModal=H5,qe.setScoringConfig=L5,qe.shouldApplySmartComplement=WO,qe.shouldCreateNextSet=G5,qe.shouldShowTiebreak=qO,qe.tipster=aK,qe.validator=Sw,Object.defineProperty(qe,Symbol.toStringTag,{value:"Module"})}));
192
+ `,"2) content: () => element.cloneNode(true)"].join(" "))}var s=n.reduce(function(c,u){var l=u&&nK(u,i);return l&&c.push(l),c},[]);return xp(e)?s[0]:s}Lp.defaultProps=un,Lp.setDefaultProps=eK,Lp.currentInput=Ca,Object.assign({},hx,{effect:function(t){var r=t.state,i={popper:{position:r.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(r.elements.popper.style,i.popper),r.styles=i,r.elements.arrow&&Object.assign(r.elements.arrow.style,i.arrow)}}),Lp.setDefaultProps({render:Qx});function wT(e){return typeof e=="function"}let as;function _p(e){as&&(as?.destroy(!0),as=void 0),e?.remove&&e.remove()}function aK(e){const{title:t,options:r,menuItems:i=[],coords:n,callback:a,config:o}=e;let{target:s,items:c}=e;if(!r?.length&&!c?.length&&!i)return;_p();const u=document.createElement("div");let l;const d=()=>{c=c?.filter(m=>!m.hide&&!m.disabled).map(m=>({...m,onClick:()=>{_p(u),wT(m.onClick)&&m.onClick()}}))||r?.filter(m=>!m.hide&&!m.disabled).map(m=>({text:typeof m=="object"?m.option:m,style:m.style,onClick:()=>{m.subMenu?as.setContent("IMPLEMENT SUB MENU"):wT(m.onClick)?(_p(u),m.onClick()):wT(a)&&a&&(_p(u),a(typeof m=="object"?{...m,coords:n}:m))}}));const p=[{text:t,items:c},...i];return l=dx(u,p).focusElement,u};return s=s||n?.evt?.target,s&&(as=Lp(s,{content:d,theme:"light-border",trigger:"click",onShown:()=>{l&&setTimeout(()=>l?.focus(),0)},...o}),as.show(),as.setProps({interactive:!0})),as}function oK(){return"0.9.10"}const sK={SET3_S6_TB7:"SET3-S:6/TB7",SET3_S6_TB7_F_TB10:"SET3-S:6/TB7-F:TB10",SET3_S6_TB10:"SET3-S:6/TB10",SET3_S6_F_TB10:"SET3-S:6-F:TB10",SET3_S6_TB7_NOAD:"SET3-S:6/TB7NOAD",SET3_S8_TB7:"SET3-S:8/TB7",SET3_S8_TB7_AT7:"SET3-S:8/TB7@7",SET3_S4_TB7:"SET3-S:4/TB7",SET3_S4_TB7_F_TB10:"SET3-S:4/TB7-F:TB10",SET3_S4_TB5_AT3_F_TB10:"SET3-S:4/TB5@3-F:TB10",SET5_S6_TB7:"SET5-S:6/TB7",SET5_S6_TB7_F_TB10:"SET5-S:6/TB7-F:TB10",SET1_S6_TB7:"SET1-S:6/TB7",SET1_S6_TB10:"SET1-S:6/TB10",SET1_S6_TB7_AT5:"SET1-S:6/TB7@5",SET1_S8_TB7:"SET1-S:8/TB7",SET1_S4_TB7:"SET1-S:4/TB7",SET1_S5_TB9_AT4:"SET1-S:5/TB9@4",SET1_S_TB7:"SET1-S:T7",SET1_S_TB10:"SET1-S:TB10",SET1_S_TB21:"SET1-S:T21",SET1_S8:"SET1-S:8",SET1_S10:"SET1-S:10",FAST4:"SET5-S:4/NOAD",SET3X_T10A_TB1:"SET3X-S:T10A-F:TB1",SET3X_T10A_TB1_NOAD:"SET3X-S:T10A-F:TB1NOAD",SET4X_T10A_TB1:"SET4X-S:T10A-F:TB1"};function cK(e,t,r){if(!e)return{elements:{}};const i={};for(const n of t||[]){if(!n?.label||n.hide)continue;const a=document.createElement("button");n.id&&(i[n.id]=a,a.id=n.id),a.style.marginRight=".5em",a.className="button font-medium",n.intent&&a.classList.add(n.intent),a.innerHTML=n.label,n.disabled&&(a.disabled=!0),a.onclick=o=>{o.stopPropagation(),!o.target.disabled&&dn(n.onClick)&&n.onClick(),r&&dn(r)&&r()},e.appendChild(a)}return{elements:i}}qe.MATCH_FORMATS=sK,qe.buildSetScore=HO,qe.cModal=Oa,qe.calculateComplement=GO,qe.compositions=uc,qe.courthiveComponentsVersion=oK,qe.destroyTipster=_p,qe.drawer=w4,qe.getAgeCategoryModal=UO,qe.getCategoryModal=M6,qe.getFlightProfileModal=V6,qe.getMatchUpFormatModal=gO,qe.getMatchWinner=j5,qe.getMaxAllowedScore=$O,qe.getMockParticipantsModal=m6,qe.getScoringConfig=bp,qe.getSetFormatForIndex=mc,qe.getSetWinner=jO,qe.initDrawer=D4,qe.isMatchComplete=uo,qe.isSetComplete=ZU,qe.isSetTiebreakOnly=Up,qe.isSetTimed=ug,qe.renderButtons=cK,qe.renderContainer=o6,qe.renderField=Nc,qe.renderForm=Vu,qe.renderMatchUp=lp,qe.renderMenu=dx,qe.renderOptions=bw,qe.renderParticipant=Hk,qe.renderParticipantInput=Uw,qe.renderRound=rO,qe.renderRoundHeader=zk,qe.renderStructure=a6,qe.resetScoringConfig=_5,qe.scoringModal=H5,qe.setScoringConfig=L5,qe.shouldApplySmartComplement=WO,qe.shouldCreateNextSet=G5,qe.shouldShowTiebreak=qO,qe.tipster=aK,qe.validator=Sw,Object.defineProperty(qe,Symbol.toStringTag,{value:"Module"})}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "courthive-components",
3
- "version": "0.9.9",
3
+ "version": "0.9.10",
4
4
  "engines": {
5
5
  "node": ">=16.16.0 < 25"
6
6
  },