sy-ui-lib 1.0.38 → 1.0.39
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.js +1 -1
- package/package.json +61 -61
package/dist/index.cjs
CHANGED
|
@@ -62,6 +62,6 @@ React keys must be passed directly to JSX without using spread:
|
|
|
62
62
|
${f?"border-secondary":""}
|
|
63
63
|
${o?"cursor-not-allowed":"cursor-pointer"}
|
|
64
64
|
`,children:f&&r.jsx("span",{className:"w-4 h-4 rounded-full bg-secondary"})}),r.jsx("span",{children:u.label})]},u.value.toString())})})},Fe=e=>{const{data:t,scrollSpeed:n=100,defaultTitle:s="No upcoming events. Stay tuned!"}=e,o=g.useRef(null),i=g.useRef(null);return g.useEffect(()=>{const a=o.current,l=i.current;if(a&&l){a.style.cursor="pointer";const C=a.offsetWidth,c=l.offsetWidth,u=(c+C)/n,f=[{transform:`translateX(${C}px)`},{transform:`translateX(-${c}px)`}],h=l.animate(f,{duration:u*1e3,iterations:Number.POSITIVE_INFINITY,easing:"linear"}),m=()=>h.pause(),x=()=>h.play();return a.addEventListener("mouseenter",m),a.addEventListener("mouseleave",x),()=>{h.cancel(),a.removeEventListener("mouseenter",m),a.removeEventListener("mouseleave",x)}}},[n]),r.jsx("div",{className:"overflow-hidden h-9 flex items-center bg-primary",ref:o,children:r.jsx("div",{ref:i,className:"whitespace-nowrap will-change-transform flex items-center",children:(t==null?void 0:t.length)>0?r.jsx(r.Fragment,{children:t==null?void 0:t.map((a,l)=>{var C;return r.jsxs("div",{className:"flex items-center mx-10",children:[r.jsx(j,{text:a==null?void 0:a.title,variant:"captionBold",color:"error"}),r.jsx(Y,{icon:a==null?void 0:a.iconName,size:24,color:"error",className:"ml-2 mr-15"}),((C=a==null?void 0:a.events)==null?void 0:C.length)>0&&a.events.map((c,d)=>r.jsxs("span",{className:"mr-10 whitespace-nowrap flex items-center",children:[r.jsx("span",{className:"mr-2",children:r.jsx(j,{text:c.timeLabel,variant:"caption",color:"secondary",underline:!0})}),r.jsx(j,{text:c.description,variant:"captionBold",color:"secondary"})]},`${d+1}-${c.timeLabel}`))]},`${l}${a==null?void 0:a.title}`)})}):r.jsx(j,{variant:"captionBold",text:s,color:"error"})})})},Be=e=>{const{titles:t,bets:n,showHeader:s=!1}=e,[o,i]=g.useState(!1),a={Back:{typeColor:"bg-babyBlue",bgColor:"bg-cloudBlue"},Lay:{typeColor:"bg-watermelonRed",bgColor:"bg-softRosePink"}},l=["Yes","Back","Even","Odd"],C=d=>{const{odds:u,showTitles:f=!1}=d;return r.jsx("div",{className:"flex items-center ml-auto justify-between min-w-32 lg:min-w-40",children:u==null?void 0:u.map(h=>r.jsx("div",{children:r.jsx(j,{variant:f?"caption":"captionBold",text:f?h.title:h.value})},h.title))})},c=({label:d,value:u})=>r.jsxs("div",{className:"flex items-center gap-1",children:[r.jsx(j,{variant:"caption",text:d,color:"slategray"}),r.jsx(j,{variant:"caption",text:u,color:"slategray"})]});return r.jsxs("div",{className:"w-full",children:[s&&r.jsx(A5,{variant:"EventTitle",title:t.slipTitle||""}),r.jsx("div",{className:"max-h-64 overflow-y-auto p-1 bg-tertiary",children:r.jsx("div",{className:"space-y-1",children:n==null?void 0:n.map(d=>{const u=l.includes(d.type)?"Back":"Lay",{typeColor:f,bgColor:h}=a[u];return o?r.jsxs("div",{children:[r.jsxs("div",{className:`py-1 px-2 flex items-center ${f}`,children:[r.jsx(j,{variant:"caption",text:`${d.type} ${d.type===C1.BACK?`(${t.betFor})`:`(${t.betAgainst})`}`}),r.jsx(C,{odds:d.oddsDetails,showTitles:!0})]}),r.jsxs("div",{className:h,children:[r.jsxs("div",{className:"p-1 gap-4 flex items-center",children:[r.jsx(c,{label:t.reference,value:d.reference}),r.jsx(c,{label:t.time,value:d.time})]}),r.jsx("hr",{className:`border-t ${f}`}),r.jsxs("div",{className:"flex p-1 gap-2",children:[r.jsxs("div",{children:[r.jsx(j,{variant:"captionBold",text:d.subTitle}),r.jsx(j,{variant:"caption",text:d.result,color:"slategray"})]}),r.jsx(C,{odds:d.oddsDetails})]})]})]},d.id):r.jsxs("div",{className:`px-2 py-1 flex items-center ${h} gap-2`,children:[r.jsx("div",{className:`flex items-center justify-center p-1 min-w-12 rounded-md ${f}`,children:r.jsx(j,{variant:"captionBold",text:d.type})}),r.jsxs("div",{children:[r.jsx(j,{variant:"captionBold",text:d.subTitle}),r.jsx(j,{variant:"smallMedium",text:d.result,color:"slategray"})]}),r.jsx(C,{odds:d.oddsDetails})]},d.id)})})}),r.jsxs("div",{className:"flex items-center gap-1 py-2 px-3 bg-tertiary rounded-b-lg",children:[(n==null?void 0:n.length)>0&&r.jsx(A2,{checked:o,onChange:d=>i(d.target.checked)}),r.jsx(j,{variant:"caption",text:(n==null?void 0:n.length)>0?t.betInfo:t.nullMessage})]})]})},$e=({slides:e,isLoading:t=!1,altImageUrl:n="",interval:s=3e3,loop:o=!0,pauseOnHover:i=!0,className:a=""})=>{const[l,C]=g.useState(0),c=g.useRef(null),[d,u]=g.useState(!1),f=g.useCallback(()=>{C(h=>h===e.length-1?o?0:h:h+1)},[e.length,o]);return g.useEffect(()=>{if(i&&d)return;function h(){f(),c.current=setTimeout(h,s)}return c.current=setTimeout(h,s),()=>{c.current&&clearTimeout(c.current)}},[d,s,i,f]),r.jsx("div",{className:`relative overflow-hidden w-full aspect-19/6 min-h-32 max-h-82.5 rounded-2xl shadow-lg z-level-0 ${a}`,onMouseEnter:()=>u(!0),onMouseLeave:()=>u(!1),children:t?r.jsx("div",{className:"flex justify-center items-center h-30 md:h-96",children:r.jsx(Z5,{className:"animate-spin w-30 md:w-full"})}):r.jsxs(r.Fragment,{children:[e==null?void 0:e.map((h,m)=>r.jsx("div",{className:`absolute inset-0 transition-opacity duration-700 ease-in-out ${m===l?"opacity-100 z-level-1":"opacity-0 z-level-0"}`,children:r.jsx("img",{src:h.imageURL||n,alt:h.alt||"slide image",className:"relative w-full h-full object-fill"})},h.id)),r.jsx("div",{className:"absolute z-level-2 bottom-4 left-1/2 transform -translate-x-1/2 flex space-x-2",children:e==null?void 0:e.map((h,m)=>r.jsx("button",{type:"button",onClick:()=>C(m),className:`h-1 md:h-2 bg-white rounded-full cursor-pointer transition-all duration-300 ${m===l?"w-4 md:w-8":"w-1 md:w-2"}`,"aria-label":`Go to slide ${m+1}`},h.id))})]})})},Te=({betSlipVariant:e,slipTitle:t,betSlipLabels:n,betDetails:s,betButtonAmounts:o=[],defaultStake:i=0,defaultOdds:a,minBet:l,maxBet:C,errorMessage:c,footerCTA:d,projectedPL:u,handleBetPlacement:f})=>{const h={Back:{primaryBg:"bg-babyBlue",secondaryBg:"bg-cloudBlue",border:"border-babyBlue"},Lay:{primaryBg:"bg-watermelonRed",secondaryBg:"bg-softRosePink",border:"border-watermelonRed"}},x=["Yes","Back","Even","Odd"].includes(e)?"Back":"Lay",{primaryBg:p,secondaryBg:y,border:M}=h[x],[w,b]=g.useState(i),[L,v]=g.useState(a);g.useEffect(()=>{b(i),v(a)},[i,a]);const S=g.useRef(f);g.useEffect(()=>{S.current=f},[f]),g.useEffect(()=>{S.current({stake:w,odds:L})},[w,L]);const N=E=>r.jsx("div",{className:"text-center",children:r.jsx(j,{variant:"caption",text:E})},E),Z=E=>{const H=Number(E.target.value),V=a-T1.LIMIT,D=a+T1.LIMIT;H<V||H>D||v(H)};return r.jsxs("div",{className:"pb-2 bg-brightgray",children:[r.jsxs("div",{className:`p-2 grid grid-cols-2 items-center ${p}`,children:[r.jsx(j,{variant:"caption",text:t}),r.jsxs("div",{className:"flex items-center justify-end mr-10",children:[N(n.pLValueTitle),r.jsx("div",{className:"mx-1 min-w-8 max-w-16 text-right",children:r.jsx(j,{variant:"captionBold",text:u})})]})]}),r.jsxs("div",{className:y,children:[r.jsxs("div",{className:"grid grid-cols-2 gap-4 pt-2",children:[r.jsxs("div",{className:"flex flex-col justify-center m-2",children:[r.jsx(j,{variant:"captionBold",text:s.betTitle}),r.jsx(j,{variant:"caption",text:s.betDescription})]}),r.jsxs("div",{className:"flex items-center gap-1 justify-end px-2",children:[r.jsxs("div",{className:"flex flex-col flex-start items-center gap-1",children:[N(n.oddsTitle),r.jsx("input",{type:"number",step:T1.NUMBER_FILED_STEPS,value:L,min:a-T1.LIMIT,max:a+T1.LIMIT,onChange:Z,onKeyDown:E=>E.preventDefault(),disabled:["Yes","No","Odd","Even"].includes(e),className:"min-w-12 max-w-14 h-10 rounded-sm p-1 bg-white border-0"})]}),r.jsxs("div",{className:"relative",children:[r.jsxs("div",{className:"flex flex-col items-center gap-1",children:[N(n.stakeTitle),r.jsx("input",{type:"text",value:w,onChange:E=>{const H=E.target.value;h3.NUMBER_INPUT_REGEX.test(H)&&b(Number(H))},className:"min-w-12 max-w-16 h-10 rounded-sm p-1 bg-white border-0"})]}),w<l.amount&&r.jsxs("div",{className:"z-level-1 absolute top-full left-0 mt-1 text-xs text-error bg-white border border-error rounded px-2 py-1 shadow-md",children:[l.errorMessage," ",l.amount]}),C&&w>C.amount&&r.jsxs("div",{className:"z-level-1 absolute top-full left-0 mt-1 text-xs text-error bg-white border border-error rounded px-2 py-1 shadow-md",children:[C.errorMessage," ",C.amount]})]})]})]}),r.jsx("div",{className:"h-auto flex flex-wrap gap-2 overflow-x-auto mt-4 mx-2 mb-2 whitespace-nowrap no-scrollbar",children:o.length>0&&o.map(E=>r.jsx(o1,{text:`+${X1(E)}`,size:"small",variant:"outline",onClick:()=>b(H=>H+E)},E))}),r.jsxs("div",{className:`h-6 flex items-center justify-end border-t border-b p-2 gap-4 ${M}`,children:[r.jsx(j,{variant:"captionBold",text:`${l.title}: ${l.amount}`}),C&&r.jsx(j,{variant:"captionBold",text:`${C.title}: ${C.amount}`})]})]}),c&&r.jsx("div",{className:"px-2 mt-1",children:r.jsx(j,{variant:"caption",color:"error",text:c})}),d&&r.jsxs("div",{className:"flex items-center justify-between px-2 py-1",children:[r.jsx(o1,{text:"Clear",variant:"ghost",size:"small",onClick:()=>{b(0)}}),r.jsx("div",{className:"flex items-center justify-end mt-1 mr-2 gap-2",children:d.map((E,H)=>r.jsx(o1,{...E},E.text||H))})]})]})},J2=[{code:"+1",shortName:"US",fullName:"United States"},{code:"+91",shortName:"IND",fullName:"India"},{code:"+44",shortName:"UK",fullName:"United Kingdom"},{code:"+61",shortName:"AUS",fullName:"Australia"},{code:"+81",shortName:"JPN",fullName:"Japan"},{code:"+49",shortName:"DE",fullName:"Germany"},{code:"+33",shortName:"FR",fullName:"France"},{code:"+39",shortName:"IT",fullName:"Italy"},{code:"+7",shortName:"RU",fullName:"Russia"},{code:"+55",shortName:"BR",fullName:"Brazil"},{code:"+27",shortName:"ZA",fullName:"South Africa"},{code:"+82",shortName:"KR",fullName:"South Korea"},{code:"+34",shortName:"ES",fullName:"Spain"},{code:"+46",shortName:"SE",fullName:"Sweden"},{code:"+31",shortName:"NL",fullName:"Netherlands"},{code:"+52",shortName:"MX",fullName:"Mexico"},{code:"+20",shortName:"EG",fullName:"Egypt"},{code:"+90",shortName:"TR",fullName:"Turkey"},{code:"+66",shortName:"TH",fullName:"Thailand"},{code:"+65",shortName:"SG",fullName:"Singapore"},{code:"+62",shortName:"ID",fullName:"Indonesia"},{code:"+98",shortName:"IR",fullName:"Iran"},{code:"+64",shortName:"NZ",fullName:"New Zealand"},{code:"+41",shortName:"CH",fullName:"Switzerland"},{code:"+351",shortName:"PT",fullName:"Portugal"},{code:"+353",shortName:"IE",fullName:"Ireland"}],Ie={true:"border-error focus-within:border-error",false:"border-brightgray focus-within:border-smokyblack"},Ae={true:"bg-brightgray",false:"bg-white"},We=e=>{const{label:t,id:n="",name:s="",value:o="",onChange:i=()=>{},placeholder:a="",isRequired:l=!1,className:C="",isDisabled:c=!1,hasError:d=!1,errorMessage:u="",size:f="md",theme:h="light",...m}=e,x={sm:"px-2 py-1.5",md:"px-4 py-2.5",lg:"px-6 py-3.5"},[p,y]=o.split("-"),[M,w]=g.useState(!1),b=J2.find(H=>H.code===p)||J2[0],L=g.useRef(null);g.useEffect(()=>{const H=V=>{L.current&&!L.current.contains(V.target)&&w(!1)};return document.addEventListener("click",H),()=>{document.removeEventListener("click",H)}},[]);const v=H=>{w(!1),i==null||i(`${H}-${y||""}`)},S=H=>{i==null||i(`${p||J2[0].code}-${H}`)},N=`${M?"relative":""} flex items-center border rounded-lg ${x[f]} ${Ie[`${d}`]} ${Ae[`${c}`]}`,Z=`flex-1 w-full font-roboto text-base text-smokyblack font-normal focus:outline-none focus:ring-0 focus:border-slategray text-black font-normal ${C}`,E=`${t}${l?"*":""}`;return r.jsxs("div",{className:"flex flex-col gap-2",children:[r.jsx(j,{variant:"body1",text:E,color:d?"error":h==="dark"?"white":"slategray"}),r.jsxs("div",{className:N,children:[r.jsxs("div",{className:"mr-2",ref:L,children:[r.jsxs("button",{type:"button",className:"flex items-center cursor-pointer gap-1",onClick:()=>!c&&w(!M),children:[r.jsx(j,{variant:"subtitle1",text:b.shortName,color:"smokyblack"}),r.jsx(Y,{icon:M?"caretUp":"caretDown",color:"smokyblack"}),r.jsx("div",{className:"h-7 border border-neutralGray"}),r.jsx(j,{variant:"subtitle1",text:b.code,color:"smokyblack"})]}),M&&r.jsx("ul",{className:"absolute top-full my-1 left-0 w-full bg-white border border-brightgray rounded-lg shadow-lg z-level-3 max-h-60 overflow-auto",children:J2.map((H,V)=>{const D=H.code===b.code,I=D?"white":"slategray";return r.jsx("li",{className:`px-3 py-2 flex items-center gap-2 cursor-pointer hover:bg-brightgray ${D?"bg-secondary text-white hover:bg-secondary/85":""}`,onClick:()=>v(H.code),onKeyUp:_=>{(_.key==="Enter"||_.key===" ")&&v(H.code)},children:r.jsx(j,{variant:"caption",text:`${H.code} ${H.fullName} (${H.shortName})`,color:I})},`${H.code}-${V}`)})})]}),r.jsx("input",{id:n,name:s,type:"tel",value:y||"",onChange:H=>{S(H.target.value)},placeholder:a,className:Z,disabled:c,...m})]}),d&&u&&r.jsx("div",{className:"flex justify-end",children:r.jsx(j,{variant:"caption",text:u,color:"error"})})]})},Ye=e=>{const{text:t,onClick:n,iconName:s,variant:o="default"}=e,i=o==="action";return r.jsx("button",{type:"button",onClick:n,className:`${i?"w-full py-3":"w-40 py-2"} px-5 flex items-center text-xs font-normal tracking-tight transition-all duration-200 rounded-lg hover:bg-brightgray cursor-pointer`,children:r.jsxs("div",{className:"flex justify-between items-center gap-2 w-full",children:[r.jsx(j,{variant:i?"subtitle2":"caption",text:t}),i&&s&&r.jsx(Y,{icon:s,color:"black"})]})})},ze=e=>{const{items:t,lastItem:n,variant:s="default"}=e,o=s==="action";return r.jsx("div",{className:`${o?"w-full":"w-fit shadow-md rounded-lg"} bg-white`,children:r.jsxs("ul",{className:"flex flex-col",children:[t.length===0?r.jsx("div",{className:`flex justify-center ${o?"w-full py-3":"w-40 py-2"}`,children:r.jsx(j,{variant:"caption",text:"No data available!",color:"slategray"})}):t.map(i=>r.jsx("li",{className:`${o?"border-b border-brightgray":""}`,children:r.jsx(Ye,{...i,variant:s})},i.text)),!!n&&r.jsx("li",{children:r.jsxs("button",{type:"button",onClick:n.onClick,className:`${o?"w-full py-3 border-b border-brightgray":"w-40 py-2"} px-5 flex items-center gap-3 hover:bg-offwhite border-t border-brightgray rounded-b-lg cursor-pointer`,children:[!!n.text&&r.jsx(j,{text:n.text,variant:"subtitle2",color:"techBlue"}),!!n.iconName&&r.jsx(Y,{icon:n.iconName,color:"techBlue"})]})})]})})},Ge=e=>{const{steps:t}=e;return r.jsx("div",{className:"flex items-center justify-between w-full",children:t==null?void 0:t.map((n,s)=>{var c;const o=s===t.length-1,i=(c=t[s+1])==null?void 0:c.status,a=n.status==="completed"?r.jsx("div",{className:"p-[6px] md:p-4 bg-secondary rounded-full flex items-center justify-center shadow-lg",children:r.jsx("div",{className:"p-[2px] md:p-1 bg-white/40 rounded-full flex items-center justify-center",children:r.jsx("div",{className:"p-[2px] md:p-[6px] bg-white/30 rounded-full flex items-center justify-center",children:r.jsx("div",{className:"flex items-center justify-center bg-secondary/60 rounded-full",children:r.jsx(Y,{icon:"doneFill",size:20,color:"white"})})})})}):n.status==="inProgress"?r.jsx("div",{className:"p-3 md:p-5 rounded-full bg-secondary flex items-center justify-center",children:r.jsx("div",{className:"p-1 md:p-2 bg-white/30 rounded-full flex items-center justify-center",children:r.jsx("div",{className:"w-2 h-2 md:w-4 md:h-4 bg-white rounded-full"})})}):r.jsx("div",{className:"p-5 md:p-9 rounded-full bg-brightgray flex"}),l=n.status&&i==="completed"?"bg-secondary":"bg-brightgray",C={...n.title,color:n.status==="pending"?"neutralGray":n.title.color};return r.jsxs("div",{className:"flex-1 flex flex-col items-center",children:[r.jsxs("div",{className:"relative flex items-center justify-center w-full",children:[r.jsx("div",{className:"flex justify-center",children:a}),!o&&r.jsx("div",{className:"absolute top-1/2 left-[calc(50%+20px)] md:left-[calc(50%+36px)] w-[calc(100%-20px)] md:w-[calc(100%-36px)]",children:r.jsx("div",{className:`h-[2px] w-full ${l}`})})]}),r.jsx("div",{className:"mt-2 md:mt-4 text-center",children:r.jsx(j,{variant:n.title.variant??"caption",...C})})]},`${s+1}`)})})},qe=e=>{const{walletData:t,footerCTA:n,redirectLinks:s}=e||{},{isMobile:o}=k1();return r.jsxs("div",{className:"max-w-56 rounded-md bg-primary shadow-md shadow-white p-2",children:[r.jsxs("div",{className:"pb-2",children:[t==null?void 0:t.map(i=>{var a,l,C;return r.jsxs("div",{className:"flex items-center justify-between gap-2",children:[r.jsx("div",{className:"flex-1",children:r.jsx(j,{text:(i==null?void 0:i.key)??"",variant:"caption",color:"white"})}),r.jsx("div",{className:"flex-1 text-left",children:r.jsx(j,{text:(i==null?void 0:i.value)??"",variant:"captionBold",color:(i==null?void 0:i.color)??"white"})}),!o&&((a=i==null?void 0:i.info)==null?void 0:a.title)&&r.jsx(o2,{title:(l=i==null?void 0:i.info)==null?void 0:l.title,position:(C=i==null?void 0:i.info)==null?void 0:C.position,children:r.jsx(Y,{icon:"info",color:"white"})})]},i.key)}),r.jsx("div",{className:"flex justify-between pt-2 px-3 gap-2 flex-wrap",children:n==null?void 0:n.map((i,a)=>r.jsx(o1,{text:(i==null?void 0:i.text)??"",variant:i==null?void 0:i.variant,size:"extraSmall",onClick:i==null?void 0:i.onClick,disabled:i==null?void 0:i.disabled},(i==null?void 0:i.text)??`${a+1}`))})]}),r.jsx("div",{className:"border-t border-brightgray pt-2 px-2",children:s==null?void 0:s.map((i,a)=>r.jsxs("button",{onClick:i==null?void 0:i.onClick,type:"button",className:"flex justify-between gap-2 py-1 w-full",children:[r.jsx(j,{text:(i==null?void 0:i.title)??"",variant:"caption",color:"white"}),r.jsx(Y,{icon:"caretRight",color:"white"})]},`${a+1}-${i==null?void 0:i.title}`))})]})},Ue=({id:e="",name:t="",label:n="",isRequired:s=!1,hasError:o=!1,errorMessage:i="",isDisabled:a=!1,onChange:l,instructionText:C,supportText:c,supportFormate:d,maxFiles:u=10,maxLimitMessage:f="Upload limit reached. Maximum allowed files",invalidFileMessage:h="Invalid file type.",maxFileSize:m=1,maxFileSizeMessage:x="File size exceeds the allowed limit."})=>{const[p,y]=g.useState(!1),[M,w]=g.useState([]),[b,L]=g.useState(null),v=g.useRef(null),S=d.map(F=>`.${F.toLowerCase().replace(h3.FILE_FORMAT_REGEX,"")}`).join(","),N=M.length>=u,Z=`${n}${s?" *":""}`,E=d.join(", ").toUpperCase(),H=o?"border-error":p?"border-secondary":"border-slategray",V=F=>{var R;return((R=F.name.split(".").pop())==null?void 0:R.toLowerCase())??""},D=F=>{l==null||l({target:{name:t,files:F},currentTarget:{name:t,files:F}})},I=F=>{L(F)},_=F=>{F.target.value=""},U=F=>{const R=V(F);return d.map(l1=>l1.toLowerCase()).includes(R)},g1=F=>F.size<=m*1024*1024,x1=F=>F.filter(R=>U(R)&&g1(R)),J=F=>{if(a)return;if(F.some(m1=>!U(m1))){I(h);return}if(F.some(m1=>!g1(m1))){I(x);return}const R=x1(F);if(R.length===0){I(h);return}const l1=[...M,...R].slice(0,u);w(l1),L(null),D(l1)},s1=F=>{if(a)return;const R=M.filter((l1,m1)=>m1!==F);w(R),D(R)},k=F=>{F.preventDefault(),F.stopPropagation(),!(a||N)&&y(F.type==="dragenter"||F.type==="dragover")},P=F=>{var R;F.preventDefault(),F.stopPropagation(),!a&&(y(!1),J(Array.from(((R=F.dataTransfer)==null?void 0:R.files)??[])))},G=F=>{var R;F.stopPropagation(),!(a||N)&&((R=v.current)==null||R.click())},$=F=>{var R;a||N||(F.key==="Enter"||F.key===" ")&&(F.preventDefault(),(R=v.current)==null||R.click())},h1=F=>{const R=Array.from(F.target.files??[]);R.length>0&&J(R),_(F)};return r.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[n&&r.jsx(j,{variant:"body1",text:Z,color:o?"error":"slategray"}),r.jsxs("div",{"aria-disabled":a,onClick:G,onKeyDown:$,onDragEnter:k,onDragOver:k,onDragLeave:k,onDrop:P,className:`border-2 border-dashed rounded-md transition-all duration-200 p-6 md:p-8 text-center focus:outline-none ${H} ${N||a?"cursor-not-allowed opacity-60":"cursor-pointer hover:border-secondary"}`,children:[r.jsx("input",{id:e,name:t,type:"file",ref:v,accept:S,multiple:!0,disabled:a,onChange:h1,className:"hidden"}),r.jsxs("div",{className:"flex flex-col items-center justify-center pointer-events-none",children:[r.jsx(Y,{icon:"upload"}),r.jsxs("div",{children:[r.jsx("div",{className:"flex gap-1 items-center justify-center",children:r.jsx(j,{variant:"subtitle2",text:C})}),r.jsxs("div",{className:"flex gap-2 justify-center my-2 flex-wrap",children:[r.jsx(j,{variant:"caption",text:`${c} :`}),r.jsx(j,{variant:"caption",text:`${E} (Max : ${m}MB)`})]}),(b||o)&&r.jsx(j,{variant:"caption",color:"error",text:b||i})]})]})]}),N&&f&&r.jsx(j,{variant:"caption",color:"error",text:f}),M.length>0&&r.jsx("div",{className:"mt-4 max-h-40 overflow-y-auto space-y-2 no-scrollbar bg-brightgray p-2 rounded-xl",children:M.map((F,R)=>{const l1=V(F);return r.jsxs("div",{className:"flex justify-between items-center rounded-md py-2 px-4 bg-offwhite",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(Y,{icon:l1||"file"}),r.jsx(j,{variant:"body2",text:`${F.name} (${(F.size/(1024*1024)).toFixed(2)} MB)`})]}),!a&&r.jsx(Y,{icon:"cancel",color:"slategray",size:20,onClick:()=>s1(R)})]},`${R+1}`)})})]})},Ke=()=>{const e=[{className:"z-n-20",label:"z-n-20 (-20)",usage:"Background utility / debugging"},{className:"z-n-10",label:"z-n-10 (-10)",usage:"Behind-base elements"},{className:"z-level-0",label:"z-level-0 (0)",usage:"Base layer / normal components"},{className:"z-level-1",label:"z-level-1 (100)",usage:"Swiper slide"},{className:"z-level-2",label:"z-level-2 (200)",usage:"Slide indicators"},{className:"z-level-3",label:"z-level-3 (300)",usage:"Dropdown / Multi-select dropdown / DatePicker"},{className:"z-level-4",label:"z-level-4 (400)",usage:"Reserved for minor overlays"},{className:"z-level-5",label:"z-level-5 (500)",usage:"Tooltips"},{className:"z-level-6",label:"z-level-6 (600)",usage:"Reserved overlay layer"},{className:"z-level-7",label:"z-level-7 (700)",usage:"Modal"},{className:"z-level-8",label:"z-level-8 (800)",usage:"High overlays (future use)"},{className:"z-level-9",label:"z-level-9 (900)",usage:"Snackbar"},{className:"z-level-10",label:"z-level-10 (999)",usage:"Loaders / Always on top"}],t=["bg-red-400","bg-orange-400","bg-yellow-400","bg-green-400","bg-emerald-400","bg-teal-400","bg-cyan-400","bg-sky-400","bg-blue-400","bg-indigo-400","bg-violet-400","bg-fuchsia-400","bg-pink-400"],n=150,s=n*.4,o=30,i=n+(e.length-1)*o+16;return r.jsx(r.Fragment,{children:r.jsxs("div",{className:"p-6 space-y-6",children:[r.jsx("div",{className:"relative overflow-visible rounded-lg",style:{height:i},children:e.map((a,l)=>{const C=l*s,c=l*o,d=t[l%t.length];return r.jsx("div",{className:`absolute ${a.className} ${d} text-white rounded-xl shadow-md flex justify-center p-3`,style:{width:n,height:n,left:C,top:c},children:r.jsx(j,{variant:"captionBold",text:a.label,color:"white"})},a.className)})}),r.jsxs("div",{className:"p-5 bg-gray-100 rounded-xl shadow-inner",children:[r.jsx(j,{variant:"captionBold",text:"Z-Index Usage Details"}),r.jsx("div",{className:"mt-3 space-y-1",children:e.map(a=>r.jsxs("div",{className:"flex items-start gap-2",children:[r.jsx("span",{className:"font-mono text-sm text-gray-700 w-40",children:a.label}),r.jsxs("span",{className:"text-gray-600 text-sm",children:["→ ",a.usage]})]},a.className))})]})]})})},Xe=({isOpen:e,onClose:t,betSlipVariant:n,slipTitle:s,betSlipLabels:o,betDetails:i,betButtonAmounts:a,defaultStake:l=0,defaultOdds:C,minBet:c,maxBet:d,projectedPL:u,footerCTA:f,errorMessage:h,handleBetPlacement:m})=>{const x={Back:{primaryBg:"bg-babyBlue",secondaryBg:"bg-cloudBlue",tertiaryBg:"bg-lavenderBlue",border:"border-pastelBlue"},Lay:{primaryBg:"bg-watermelonRed",secondaryBg:"bg-peachbloom",tertiaryBg:"bg-softRosePink",border:"border-peachyPink"}},y=["Yes","Back","Even","Odd"].includes(n)?"Back":"Lay",{primaryBg:M,tertiaryBg:w,secondaryBg:b,border:L}=x[y],[v,S]=g.useState(l),[N,Z]=g.useState(C);g.useEffect(()=>{S(l),Z(C)},[l,C]);const E=g.useRef(m);g.useEffect(()=>{E.current=m},[m]),g.useEffect(()=>{E.current({stake:v,odds:N})},[v,N]);const H=V=>{const D=Number(V.target.value),I=C-T1.LIMIT,_=C+T1.LIMIT;D<I||D>_||Z(D)};return e?r.jsx("div",{className:"fixed inset-0 z-level-6 flex items-start justify-center pointer-events-none",tabIndex:-1,children:r.jsxs("div",{className:"bg-white shadow-lg w-full pointer-events-auto",onMouseDown:V=>V.stopPropagation(),role:"presentation",children:[r.jsxs("div",{className:`flex items-center justify-between px-4 py-1 ${M}`,children:[r.jsx(j,{variant:"subtitle1",text:s,color:"white"}),r.jsx(Y,{size:16,icon:"cancel",color:"white",onClick:t})]}),r.jsxs("div",{className:`${b} flex flex-row justify-between py-1 px-4`,children:[r.jsxs("div",{children:[r.jsx(j,{variant:"captionBold",text:i==null?void 0:i.betTitle}),r.jsx(j,{variant:"caption",text:i==null?void 0:i.betDescription})]}),r.jsxs("div",{className:"text-right",children:[r.jsx(j,{text:o.pLValueTitle,variant:"subtitle2"}),r.jsx(j,{text:u,variant:"caption"})]})]}),r.jsx("div",{className:`${b} px-4 pb-2 flex flex-wrap gap-3`,children:a.map(V=>r.jsx(o1,{text:`+${V}`,size:"extraSmall",variant:"outline",onClick:()=>S(v+V)},V))}),r.jsxs("div",{className:`${b} px-3 pb-1`,children:[r.jsxs("div",{className:"grid grid-cols-2 text-center mb-2",children:[r.jsx(j,{text:o.oddsTitle,variant:"captionBold"}),r.jsx(j,{text:o.stakeTitle,variant:"captionBold"})]}),r.jsxs("div",{className:"px-4 pb-1 grid grid-cols-2 gap-4",children:[r.jsx("input",{type:"number",step:T1.NUMBER_FILED_STEPS,value:N,min:C-T1.LIMIT,max:C+T1.LIMIT,disabled:["Yes","No","Odd","Even"].includes(n),onChange:H,onKeyDown:V=>V.preventDefault(),className:"w-full px-4 py-2 bg-white rounded-md shadow-sm text-center text-black outline-none appearance-auto"}),r.jsx("input",{type:"text",value:v,onChange:V=>{const D=V.target.value;h3.NUMBER_INPUT_REGEX.test(D)&&S(Number(D))},className:"w-full px-4 py-2 bg-white rounded-md shadow-sm text-center text-black outline-none"})]}),d&&v>d.amount?r.jsx("div",{className:"px-5 flex justify-end",children:r.jsx(j,{text:`${d.errorMessage} ${d.amount}`,variant:"caption",color:"error"})}):c&&v<c.amount&&r.jsx("div",{className:" px-5 flex justify-end",children:r.jsx(j,{text:`${c.errorMessage} ${c.amount}`,variant:"caption",color:"error"})})]}),r.jsxs("div",{className:`flex justify-end gap-4 px-4 py-1 border-t border-b ${L} ${w}`,children:[r.jsx(j,{variant:"caption",text:`${c.title}: ${c.amount}`}),d&&r.jsx(j,{variant:"caption",text:`${d.title}: ${d.amount}`})]}),h&&r.jsx("div",{className:"px-2 mt-1",children:r.jsx(j,{variant:"caption",color:"error",text:h})}),f&&r.jsxs("div",{className:"flex items-center justify-between px-4 py-1",children:[r.jsx(o1,{text:"Clear",variant:"ghost",size:"small",onClick:()=>{S(0)}}),r.jsx("div",{className:"flex gap-3",children:f.map((V,D)=>r.jsx(o1,{...V},`${V==null?void 0:V.text}-${D}`))})]})]})}):null},Qe=e=>{const{isVisible:t,typographyProps:n,color:s="error"}=e;return t?r.jsx("div",{className:`flex justify-center rounded-lg border-4 border-double animate-pulse [animation-duration:0.6s] bg-${s} border-${s} bg-clip-padding p-2 md:px-4`,children:r.jsx(j,{text:n.text,variant:n.variant??"overline",color:n.color??"white"})}):null},Z4=({level:e=3})=>r.jsxs("div",{className:`${e===1?"flex gap-0.5 sm:gap-1":e===2?"flex gap-0.5 sm:gap-1 pr-13 lg:pr-17":"flex gap-1 pr-26 sm:pr-27 md:pr-29 lg:pr-34"}
|
|
65
|
-
`,children:[r.jsx("div",{className:"flex justify-center items-center min-w-11.5 min-[420px]:min-w-13 md:min-w-14 lg:min-w-18 h-7 bg-babyBlue rounded-t-lg",children:r.jsx(j,{text:e===1?"Back":"Back All",color:"black",variant:"captionBold"})}),r.jsx("div",{className:"flex justify-center items-center min-w-11.5 min-[420px]:min-w-13 md:min-w-14 lg:min-w-18 h-7 bg-watermelonRed rounded-t-lg",children:r.jsx(j,{text:e===1?"Lay":"Lay All",color:"black",variant:"captionBold"})})]}),A5=({title:e,variant:t,eventId:n="0",level:s=3,min:o=10,max:i=100,selectionCount:a=0,totalMatched:l=0,isSubHeader:C=!1,showBetsButton:c=!1,viewBetCTA:d,onClick:u,eventDetails:f="",onInfoClick:h})=>{const m=["1","X","2"].slice(0,s),{isMobile:x}=k1(),p=()=>r.jsxs("div",{className:"flex gap-1 bg-slategray px-1 md:px-2 py-1 rounded-md",children:[r.jsx(j,{color:"white",variant:"caption",text:"Min/Max:"}),r.jsx(j,{color:"white",variant:"caption",text:`${X1(o)}/${X1(i)}`})]});return t==="EventTitle"?r.jsxs("div",{className:"flex flex-col md:flex-row gap-1 bg-primary rounded-t-lg px-2 py-2 w-full justify-between",children:[r.jsxs("div",{className:"flex gap-2 justify-between",children:[r.jsx(j,{variant:"captionBold",text:e,color:"white"}),h&&r.jsx(Y,{icon:"info",onClick:h,cursorPointer:!0,color:"white"})]}),f&&r.jsxs("div",{className:"flex gap-1",children:[r.jsx(Y,{icon:"calendar",color:"white",size:16}),r.jsx("div",{className:"w-max",children:r.jsx(j,{color:"success",text:f,variant:"caption"})})]})]}):r.jsxs(r.Fragment,{children:[t!=="MatchOdds"?r.jsxs("div",{className:"bg-primary rounded-t-lg px-2 py-2 flex flex-row items-center gap-4 w-full justify-between",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[t==="MultiMarket"&&r.jsx("div",{className:"bg-success w-6 h-6 rounded flex items-center justify-center",children:r.jsx(Y,{icon:"pin"})}),r.jsx(j,{variant:"subtitle2",text:e,color:"white"})]}),t==="OtherMarket"&&c&&r.jsx(o1,{...d}),t==="FancyMarket"&&r.jsxs("div",{className:"flex md:gap-8 lg:mr-24 mr-18 gap-6",children:[r.jsx(j,{variant:"caption",text:"No",color:"white"}),r.jsx(j,{variant:"caption",text:"Yes",color:"white"})]}),t==="MultiMarket"&&r.jsx("div",{className:"ml-auto md:block",children:r.jsx(o1,{variant:"primary",size:"extraSmall",text:"Match Odds",onClick:()=>u==null?void 0:u(n)})})]}):r.jsxs("div",{className:"bg-brightgray flex justify-between gap-2 items-center pr-5",children:[r.jsx("div",{className:"flex gap-1 md:gap-3 items-center",children:r.jsx("div",{className:"bg-primary px-2 py-2",children:r.jsx(j,{color:"white",text:e,variant:"subtitle2"})})}),r.jsxs("div",{className:"hidden md:flex gap-2",children:[r.jsx(j,{color:"neutralGray",text:"Matched",variant:"subtitle2"}),r.jsx(j,{color:"black",text:`PTH ${l}`,variant:"subtitle2"})]})]}),t==="MultiMarket"&&r.jsxs("div",{className:"hidden md:flex max-full max-h-12 border border-brightgray mt-1 items-center justify-between px-4 pt-3",children:[r.jsx(j,{variant:"caption",text:`${a} Selections`}),!x&&r.jsx(Z4,{level:s})]}),t==="Sports"&&C&&r.jsxs("div",{className:"flex items-center justify-end bg-brightgray px-4 py-2",children:[r.jsx("div",{className:"min-w-10 px-2 text-center",children:r.jsx(j,{variant:"body1",color:"black",text:"Matched"})}),r.jsx("div",{className:"flex items-center justify-center",children:m.map(y=>r.jsx("div",{className:"min-w-36 mx-1 flex justify-center",children:r.jsx(j,{variant:"body1",color:"black",text:y})},y))}),r.jsx("div",{className:"w-9"})]}),(t==="OtherMarket"||t==="MatchOdds")&&r.jsxs("div",{className:"flex justify-between border border-b border-brightgray py-1 px-2",children:[p(),
|
|
65
|
+
`,children:[r.jsx("div",{className:"flex justify-center items-center min-w-11.5 min-[420px]:min-w-13 md:min-w-14 lg:min-w-18 h-7 bg-babyBlue rounded-t-lg",children:r.jsx(j,{text:e===1?"Back":"Back All",color:"black",variant:"captionBold"})}),r.jsx("div",{className:"flex justify-center items-center min-w-11.5 min-[420px]:min-w-13 md:min-w-14 lg:min-w-18 h-7 bg-watermelonRed rounded-t-lg",children:r.jsx(j,{text:e===1?"Lay":"Lay All",color:"black",variant:"captionBold"})})]}),A5=({title:e,variant:t,eventId:n="0",level:s=3,min:o=10,max:i=100,selectionCount:a=0,totalMatched:l=0,isSubHeader:C=!1,showBetsButton:c=!1,viewBetCTA:d,onClick:u,eventDetails:f="",onInfoClick:h})=>{const m=["1","X","2"].slice(0,s),{isMobile:x}=k1(),p=()=>r.jsxs("div",{className:"flex gap-1 bg-slategray px-1 md:px-2 py-1 rounded-md",children:[r.jsx(j,{color:"white",variant:"caption",text:"Min/Max:"}),r.jsx(j,{color:"white",variant:"caption",text:`${X1(o)}/${X1(i)}`})]});return t==="EventTitle"?r.jsxs("div",{className:"flex flex-col md:flex-row gap-1 bg-primary rounded-t-lg px-2 py-2 w-full justify-between",children:[r.jsxs("div",{className:"flex gap-2 justify-between",children:[r.jsx(j,{variant:"captionBold",text:e,color:"white"}),h&&r.jsx(Y,{icon:"info",onClick:h,cursorPointer:!0,color:"white"})]}),f&&r.jsxs("div",{className:"flex gap-1",children:[r.jsx(Y,{icon:"calendar",color:"white",size:16}),r.jsx("div",{className:"w-max",children:r.jsx(j,{color:"success",text:f,variant:"caption"})})]})]}):r.jsxs(r.Fragment,{children:[t!=="MatchOdds"?r.jsxs("div",{className:"bg-primary rounded-t-lg px-2 py-2 flex flex-row items-center gap-4 w-full justify-between",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[t==="MultiMarket"&&r.jsx("div",{className:"bg-success w-6 h-6 rounded flex items-center justify-center",children:r.jsx(Y,{icon:"pin"})}),r.jsx(j,{variant:"subtitle2",text:e,color:"white"})]}),t==="OtherMarket"&&c&&r.jsx(o1,{...d}),t==="FancyMarket"&&r.jsxs("div",{className:"flex md:gap-8 lg:mr-24 mr-18 gap-6",children:[r.jsx(j,{variant:"caption",text:"No",color:"white"}),r.jsx(j,{variant:"caption",text:"Yes",color:"white"})]}),t==="MultiMarket"&&r.jsx("div",{className:"ml-auto md:block",children:r.jsx(o1,{variant:"primary",size:"extraSmall",text:"Match Odds",onClick:()=>u==null?void 0:u(n)})})]}):r.jsxs("div",{className:"bg-brightgray flex justify-between gap-2 items-center pr-5",children:[r.jsx("div",{className:"flex gap-1 md:gap-3 items-center",children:r.jsx("div",{className:"bg-primary px-2 py-2",children:r.jsx(j,{color:"white",text:e,variant:"subtitle2"})})}),r.jsxs("div",{className:"hidden md:flex gap-2",children:[r.jsx(j,{color:"neutralGray",text:"Matched",variant:"subtitle2"}),r.jsx(j,{color:"black",text:`PTH ${l}`,variant:"subtitle2"})]})]}),t==="MultiMarket"&&r.jsxs("div",{className:"hidden md:flex max-full max-h-12 border border-brightgray mt-1 items-center justify-between px-4 pt-3",children:[r.jsx(j,{variant:"caption",text:`${a} Selections`}),!x&&r.jsx(Z4,{level:s})]}),t==="Sports"&&C&&r.jsxs("div",{className:"flex items-center justify-end bg-brightgray px-4 py-2",children:[r.jsx("div",{className:"min-w-10 px-2 text-center",children:r.jsx(j,{variant:"body1",color:"black",text:"Matched"})}),r.jsx("div",{className:"flex items-center justify-center",children:m.map(y=>r.jsx("div",{className:"min-w-36 mx-1 flex justify-center",children:r.jsx(j,{variant:"body1",color:"black",text:y})},y))}),r.jsx("div",{className:"w-9"})]}),(t==="OtherMarket"||t==="MatchOdds")&&r.jsxs("div",{className:"flex justify-between border border-b border-brightgray py-1 px-2",children:[p(),r.jsx("div",{className:"ml-1 max-[430px]:hidden",children:r.jsx(Z4,{level:s})})]}),t==="Racing"&&r.jsxs("div",{className:"flex justify-between border border-b border-brightgray py-1 px-1 md:px-1.5 lg:px-2",children:[p(),r.jsx("div",{className:"ml-1",children:r.jsx(Z4,{level:s})})]})]})},s2=({marketId:e,eventId:t,providerId:n,runnerId:s,runnerName:o,item:i,index:a,color:l,type:C,disabled:c,showSize:d,min:u,max:f,onClick:h})=>{const m=C===C1.BACK&&a===2||C===C1.LAY&&a===0,x=[C1.YES,C1.NO,C1.ODD,C1.EVEN].includes(C),p={marketId:e,eventId:t,providerId:n,runnerId:s,runnerName:o,type:C,odds:i==null?void 0:i.odds,size:(i==null?void 0:i.oddsSize)||0,min:u,max:f,acceptBestOdds:!(m||x)},[y,M]=g.useState(!1),w=g.useRef(i==null?void 0:i.odds);return g.useEffect(()=>{if(w.current!==(i==null?void 0:i.odds)){M(!0);const b=setTimeout(()=>{M(!1)},200);return w.current=i==null?void 0:i.odds,()=>clearTimeout(b)}},[i==null?void 0:i.odds]),r.jsxs("button",{type:"button",disabled:c||!(i!=null&&i.odds)||!(i!=null&&i.oddsSize),onClick:()=>(i==null?void 0:i.odds)&&(i==null?void 0:i.oddsSize)&&!c&&h(p),className:`min-[420px]:px-1 md:px-2 min-[420px]:py-1 rounded-xs w-11.5 min-[420px]:w-13 lg:w-16 min-h-8 text-center cursor-pointer disabled:cursor-not-allowed flex-1 ${l} transition-colors duration-300
|
|
66
66
|
${y?"bg-yellow":""}`,children:[r.jsx(j,{variant:"captionBold2",color:"black",text:i!=null&&i.odds?i.odds:"-"}),d&&r.jsx(j,{variant:"caption",color:"black",text:i!=null&&i.oddsSize?X1(i.oddsSize):"-"})]})},Je=({marketId:e="0",eventId:t="0",providerId:n="0",runnerId:s,runnerName:o="",currentValue:i=0,projectedValue:a=0,notes:l="",batb:C=[],batl:c=[],showOddsSize:d=!1,isFreezed:u=!1,isSuspended:f=!1,suspendedMsg:h="Suspended",min:m=10,max:x=100,isYesNO:p=!0,onRowClick:y=()=>{},onOddClick:M=()=>{}})=>{const w=u||f,b=a!==0,L=Math.max((C==null?void 0:C.length)??0,(c==null?void 0:c.length)??0,1),v=Array.from({length:L},(E,H)=>C[H]),S=Array.from({length:L},(E,H)=>c[H]),N=p?C1.YES:C1.EVEN,Z=p?C1.NO:C1.ODD;return r.jsx("div",{className:"w-full border-x border-b border-brightgray py-1 px-2 md:px-4",children:r.jsxs("div",{className:"flex items-start gap-2 justify-between align-center",children:[r.jsxs("div",{className:"flex justify-between w-full cursor-pointer",onClick:()=>y(s),onKeyDown:()=>y(s),children:[r.jsxs("div",{className:"break-all",children:[r.jsx(j,{variant:"subtitle2",color:"black",text:o}),l&&r.jsx(j,{variant:"smallMedium",color:"black",text:l})]}),(i||b)&&r.jsx(j,{text:Number((i+a).toFixed(2)),variant:"captionBold",isNumberTypography:!0})]}),r.jsxs("div",{className:"flex gap-1 md:gap-2 items-start",children:[r.jsxs("div",{className:"relative",children:[u&&r.jsx("div",{className:"absolute inset-0 bg-freeze-pattern rounded pointer-events-auto cursor-not-allowed"}),f&&r.jsx("div",{className:"absolute inset-0 flex items-center justify-center rounded border-2 border-error bg-white/30 backdrop-blur-sm",children:r.jsx(j,{variant:"captionBold",color:"error",text:h})}),r.jsxs("div",{className:"flex gap-1",children:[r.jsx("div",{className:"flex flex-col gap-1",children:S.map((E,H)=>r.jsx(s2,{marketId:e,eventId:t,providerId:n,runnerId:s,runnerName:o,item:E,index:H,color:p?A1.NO_COLOR:A1.ODD_COLOR,type:Z,disabled:w,showSize:d,min:m,max:x,onClick:M},n2(C1.NO)))}),r.jsx("div",{className:"flex flex-col gap-1",children:v.map((E,H)=>r.jsx(s2,{marketId:e,eventId:t,providerId:n,runnerId:s,runnerName:o,item:E,index:H,color:p?A1.YES_COLOR:A1.ODD_COLOR,type:N,disabled:w,showSize:d,min:m,max:x,onClick:M},n2(C1.YES)))})]})]}),r.jsxs("div",{className:"text-right w-14",children:[r.jsx(j,{variant:"smallMedium",text:"Min/Max"}),r.jsx(j,{variant:"smallMedium",text:`${X1(m)}/${X1(x)}`})]})]})]})})},e0=({marketId:e="0",eventId:t="0",providerId:n="0",runnerId:s,runnerName:o="",currentValue:i=0,projectedValue:a=0,batb:l=[],batl:C=[],level:c=3,showOddsSize:d=!1,isFreezed:u=!1,isSuspended:f=!1,suspendedMsg:h="Suspended",min:m=10,max:x=100,onOddClick:p=()=>{},notes:y=""})=>{const M=u||f,w=i!==0,b=a!==0,L=Array.from({length:c},(S,N)=>l[N]),v=Array.from({length:c},(S,N)=>C[N]);return r.jsxs("div",{className:"w-full border-x border-b border-brightgray py-1 px-1 md:px-4",children:[r.jsxs("div",{className:"flex flex-col min-[420px]:flex-row min-[420px]:items-center gap-2 min-[420px]:justify-between",children:[r.jsxs("div",{className:"flex min-[420px]:flex-col justify-between",children:[r.jsx("div",{className:"break-all",children:r.jsx(j,{text:o,variant:"subtitle2",color:"black"})}),!w&&!b?null:r.jsxs("div",{className:"flex gap-1 items-center",children:[(w||b)&&r.jsx(j,{variant:"captionBold",text:i,isNumberTypography:!0}),b&&r.jsxs(r.Fragment,{children:[r.jsx(Y,{icon:"forwardArrow",size:12,cursorPointer:!1}),r.jsx(j,{variant:"captionBold",isNumberTypography:!0,text:Number((i+a).toFixed(2))})]})]})]}),r.jsxs("div",{className:"relative flex gap-0.5 sm:gap-1",children:[u&&r.jsx("div",{className:"absolute inset-0 rounded bg-freeze-pattern pointer-events-auto cursor-not-allowed"}),f&&r.jsx("div",{className:"absolute inset-0 flex items-center justify-center rounded border-2 border-error bg-white/30 backdrop-blur-sm",children:r.jsx(j,{variant:"captionBold",color:"error",text:h})}),r.jsx("div",{className:"flex gap-0.5 sm:gap-1 flex-1",children:L.map((S,N)=>r.jsx(s2,{marketId:e,eventId:t,providerId:n,runnerId:s,runnerName:o,item:S,color:A1.BACK_COLORS[N],index:N,type:C1.BACK,disabled:M,showSize:d,min:m,max:x,onClick:p},`${s}-${e}-${N+1}`))}),r.jsx("div",{className:"flex gap-0.5 sm:gap-1 flex-1",children:v.map((S,N)=>r.jsx(s2,{runnerId:s,runnerName:o,marketId:e,eventId:t,providerId:n,item:S,index:N,color:A1.LAY_COLORS[N],type:C1.LAY,disabled:M,showSize:d,min:m,max:x,onClick:p},`${s}-${N+1}`))})]})]}),y&&r.jsx(j,{variant:"caption",color:"black",text:y})]})},t0=({id:e,eventName:t="",inPlay:n=!1,openDate:s="",showBookmakerIcon:o=!1,showFancyIcon:i=!1,showTotalMatched:a=!1,totalMatched:l=0,batb:C=[],batl:c=[],level:d=3,showOddsSize:u=!1,pinned:f=!1,isFreezed:h=!1,isSuspended:m=!1,suspendedMsg:x="Suspended",onClickRedirect:p=()=>{},onOddClick:y=()=>{},onPinClick:M=()=>{}})=>{const{isMobile:w}=k1(),b=Array.from({length:d},(L,v)=>({Back:C[v],Lay:c[v]}));return r.jsxs("div",{className:"flex flex-col md:flex-row md:items-center justify-between gap-2 w-full border-x border-b border-brightgray py-1 px-1 md:px-4",children:[r.jsxs("div",{className:`flex justify-between gap-1 ${n?"md:flex-col":"flex-col"}`,children:[r.jsx("button",{onClick:()=>p(e),type:"button",className:"cursor-pointer text-left",children:r.jsx("div",{className:"break-all",children:r.jsx(j,{variant:w?"captionBold":"body1",text:t,underline:!0,color:"techBlue"})})}),r.jsxs("div",{className:"flex gap-1 items-center",children:[r.jsxs("div",{className:"",children:[n&&r.jsx("div",{className:"hidden md:block",children:r.jsx(j,{variant:"caption",text:P3.IN_PLAY_MSG,color:"success"})}),s&&r.jsx(j,{variant:"caption",text:s,color:"neutralGray"})]}),r.jsxs("div",{className:"flex gap-1 items-center",children:[o&&r.jsx(Y,{icon:"letterB",size:16}),i&&r.jsx(Y,{icon:"letterF",size:16}),n&&r.jsxs("span",{className:"md:hidden relative flex size-3",children:[r.jsx("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-full bg-success opacity-75"}),r.jsx("span",{className:"relative inline-flex size-3 rounded-full bg-success"})]})]})]})]}),r.jsxs("div",{className:"flex flex-row md:items-center justify-between gap-1",children:[a&&!w&&r.jsx("div",{className:"min-w-10 px-2",children:r.jsx(j,{variant:"caption",color:"slategray",text:`${P3.MATCHED_POINTS} ${X1(l)}`})}),r.jsxs("div",{className:"relative flex gap-1 flex-1",children:[h&&r.jsx("div",{className:"absolute inset-0 z-level-1 rounded bg-freeze-pattern pointer-events-auto cursor-not-allowed"}),m&&r.jsx("div",{className:"absolute inset-0 z-level-1 flex items-center justify-center rounded border-2 border-error backdrop-blur-xs",children:r.jsx(j,{variant:"captionBold",color:"error",text:x})}),b.map(L=>r.jsx("div",{className:"flex gap-1 flex-1",children:[C1.BACK,C1.LAY].map(v=>{const S=L[v],N=v===C1.BACK,Z=N?"bg-babyBlue":"bg-peachyPink";return r.jsxs("button",{type:"button",disabled:!(S!=null&&S.odds)||h||m,onClick:()=>!h&&!m&&(y==null?void 0:y(N?C1.BACK:C1.LAY,S==null?void 0:S.odds)),className:`${Z} flex-1 min-[420px]:px-1 md:px-2 min-[420px]:py-1 rounded-xs min-w-10 min-[420px]:min-w-12 md:min-w-18 min-h-8 text-center cursor-pointer disabled:cursor-not-allowed`,children:[r.jsx(j,{variant:"captionBold2",color:"black",text:S!=null&&S.odds?S.odds:"-"}),u&&r.jsx(j,{variant:"caption",color:"black",text:S!=null&&S.oddsSize?X1(S.oddsSize):"-"})]},n2(v))})},n2("Pair_Odds")))]}),r.jsx("button",{type:"button",onClick:()=>M==null?void 0:M(!f),className:"sm:ml-2",children:r.jsx(Y,{icon:f?"pinned":"pin",color:f?"error":"slategray",size:w?20:24})})]})]})},n0=e=>{const{marketId:t="0",eventId:n="0",providerId:s="0",runnerId:o,serialNo:i,position:a,details:l=[],runnerName:C="",currentValue:c=0,projectedValue:d=0,batb:u=[],batl:f=[],level:h=3,showOddsSize:m=!1,isFreezed:x=!1,isSuspended:p=!1,suspendedMsg:y="Suspended",min:M=10,max:w=100,onOddClick:b=()=>{},notes:L=""}=e,v=x||p,S=c!==0,N=d!==0,[Z,E]=g.useState(!1),H=Array.from({length:h},(_,U)=>u[3-h+U]),V=Array.from({length:h},(_,U)=>f[U]),D=()=>!S&&!N?null:r.jsxs("div",{className:"flex gap-1 items-center",children:[(S||N)&&r.jsx(j,{variant:"captionBold",text:c,isNumberTypography:!0}),N&&r.jsxs(r.Fragment,{children:[r.jsx(Y,{icon:"forwardArrow",size:12,cursorPointer:!1}),r.jsx(j,{variant:"captionBold",isNumberTypography:!0,text:Number((c+d).toFixed(2))})]})]}),I=()=>!Z&&!l?null:r.jsx(r.Fragment,{children:l==null?void 0:l.map(_=>r.jsxs("div",{className:"flex gap-1 bg-brightgray px-1",children:[r.jsx(j,{text:_.label,variant:"captionBold",color:"black"}),r.jsx(j,{text:_.value,variant:"caption",color:"black"})]},_.label))});return r.jsxs("div",{className:"w-full border-x border-b border-brightgray py-1 px-1 md:px-4",children:[r.jsxs("div",{className:"flex flex-row items-center gap-2 justify-between",children:[r.jsx("div",{className:"flex items-center gap-2",children:r.jsxs("div",{className:"flex flex-col",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(j,{text:i,variant:"caption",color:"black"}),r.jsx("div",{className:"break-all",children:r.jsx(j,{text:C,variant:"subtitle2",color:"black"})}),r.jsx("div",{className:"flex md:hidden items-center",children:r.jsx(Y,{icon:Z?"caretUp":"caretDown",size:16,onClick:()=>E(_=>!_)})}),r.jsx("div",{className:"hidden md:block",children:D()})]}),r.jsxs("div",{className:"flex items-start gap-1",children:[r.jsx(j,{text:`(${a})`,variant:"caption",color:"black"}),r.jsx("div",{className:"hidden md:flex flex-wrap gap-1",children:I()}),r.jsx("div",{className:"block md:hidden",children:D()})]})]})}),r.jsxs("div",{className:"relative flex gap-0.5 sm:gap-1",children:[x&&r.jsx("div",{className:"absolute inset-0 rounded bg-freeze-pattern pointer-events-auto cursor-not-allowed"}),p&&r.jsx("div",{className:"absolute inset-0 flex items-center justify-center rounded border-2 border-error bg-white/30 backdrop-blur-sm",children:r.jsx(j,{variant:"captionBold",color:"error",text:y})}),r.jsx("div",{className:"flex gap-0.5 sm:gap-1 flex-1",children:H.map((_,U)=>r.jsx(s2,{marketId:t,eventId:n,providerId:s,runnerId:o,runnerName:C,item:_,color:A1.BACK_COLORS[3-h+U],index:3-h+U,type:C1.BACK,disabled:v,showSize:m,min:M,max:w,onClick:b},`${o}-${t}-${U+1}`))}),r.jsx("div",{className:"flex gap-0.5 sm:gap-1 flex-1",children:V.map((_,U)=>r.jsx(s2,{runnerId:o,runnerName:C,marketId:t,eventId:n,providerId:s,item:_,index:U,color:A1.LAY_COLORS[U],type:C1.LAY,disabled:v,showSize:m,min:M,max:w,onClick:b},`${o}-${U+1}`))})]})]}),r.jsx("div",{className:"block md:hidden",children:Z&&I()}),L&&r.jsx(j,{variant:"caption",color:"black",text:L})]})},r0=({marketId:e="0",eventId:t="0",providerId:n="0",runnerId:s,runnerName:o="",currentValue:i=0,projectedValue:a=0,iconName:l,batb:C=[],batl:c=[],level:d=3,showOddsSize:u=!1,isFreezed:f=!1,isSuspended:h=!1,suspendedMsg:m="Suspended",min:x=10,max:p=100,onOddClick:y=()=>{},notes:M=""})=>{const w=f||h,b=i!==0,L=a!==0,v=Array.from({length:d},(N,Z)=>C[3-d+Z]),S=Array.from({length:d},(N,Z)=>c[Z]);return r.jsxs("div",{className:"w-full border-x border-b border-brightgray py-1 px-1 md:px-4",children:[r.jsxs("div",{className:"flex flex-row items-center gap-2 justify-between",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(Y,{icon:l,cursorPointer:!1}),r.jsxs("div",{className:"flex flex-col min-[420px]:flex-row min-[420px]:gap-2",children:[r.jsx("div",{className:"break-all",children:r.jsx(j,{text:o,variant:"subtitle2",color:"black"})}),!b&&!L?null:r.jsxs("div",{className:"flex gap-1 items-center",children:[(b||L)&&r.jsx(j,{variant:"captionBold",text:i,isNumberTypography:!0}),L&&r.jsxs(r.Fragment,{children:[r.jsx(Y,{icon:"forwardArrow",size:12,cursorPointer:!1}),r.jsx(j,{variant:"captionBold",isNumberTypography:!0,text:Number((i+a).toFixed(2))})]})]})]})]}),r.jsxs("div",{className:"relative flex gap-0.5 sm:gap-1",children:[f&&r.jsx("div",{className:"absolute inset-0 rounded bg-freeze-pattern pointer-events-auto cursor-not-allowed"}),h&&r.jsx("div",{className:"absolute inset-0 flex items-center justify-center rounded border-2 border-error bg-white/30 backdrop-blur-sm",children:r.jsx(j,{variant:"captionBold",color:"error",text:m})}),r.jsx("div",{className:"flex gap-0.5 sm:gap-1 flex-1",children:v.map((N,Z)=>r.jsx(s2,{marketId:e,eventId:t,providerId:n,runnerId:s,runnerName:o,item:N,color:A1.BACK_COLORS[3-d+Z],index:3-d+Z,type:C1.BACK,disabled:w,showSize:u,min:x,max:p,onClick:y},`${s}-${e}-${Z+1}`))}),r.jsx("div",{className:"flex gap-0.5 sm:gap-1 flex-1",children:S.map((N,Z)=>r.jsx(s2,{runnerId:s,runnerName:o,marketId:e,eventId:t,providerId:n,item:N,index:Z,color:A1.LAY_COLORS[Z],type:C1.LAY,disabled:w,showSize:u,min:x,max:p,onClick:y},`${s}-${Z+1}`))})]})]}),M&&r.jsx(j,{variant:"caption",color:"black",text:M})]})},s0=e=>{const{id:t,eventName:n,racingEvents:s,isTV:o=!1,onClickRedirect:i=()=>{}}=e,{isMobile:a}=k1();return r.jsx(r.Fragment,{children:r.jsxs("div",{className:"flex border border-brightgray flex-col px-4 gap-1 py-1 md:flex-row md:px-10 md:gap-2 md:py-3",children:[r.jsxs("div",{className:"flex gap-2 md:min-w-80 shrink-0",children:[o&&r.jsx(Y,{icon:"tv"}),r.jsx("div",{className:"break-all",children:r.jsx(j,{variant:"subtitle1",text:n})})]}),r.jsx("div",{className:"flex gap-1 md:gap-2 flex-wrap",children:s&&s.length>0&&s.map(l=>r.jsx("button",{type:"button",onClick:()=>i(l.raceId,t),className:"bg-slategray py-1 px-3 rounded-sm cursor-pointer",children:r.jsx(j,{variant:a?"caption":"subtitle1",text:l.time,color:"white"})},n2(l.raceId)))})]})})},o0=e=>{switch(e.variant){case"fancy":return r.jsx(Je,{...e});case"layered":return r.jsx(e0,{...e});case"pair":return r.jsx(t0,{...e});case"racing":return r.jsx(s0,{...e});case"raceLayered":return r.jsx(r0,{...e});case"raceDetailsLayered":return r.jsx(n0,{...e});default:return null}},g3=e=>{var h,m;const{checked:t,onChange:n,disabled:s=!1,ariaLabel:o="Toggle",size:i="md",variant:a="default",content:l,disabledMessage:C}=e,c=()=>{s||n==null||n(!t)},d=t?((h=l==null?void 0:l.on)==null?void 0:h.color)??"secondary":((m=l==null?void 0:l.off)==null?void 0:m.color)??"primary",u=t?l==null?void 0:l.on:l==null?void 0:l.off,f=a==="compound"?r.jsxs("button",{type:"button",role:"switch","aria-checked":t,"aria-label":o,disabled:s,onClick:c,className:`relative ${i==="sm"?"w-16 h-6.5":"w-18 h-8"} rounded-full transition-colors duration-200 bg-white border border-offwhite shadow-lg ${s?"opacity-50 cursor-not-allowed":"cursor-pointer"}`,children:[r.jsx("span",{className:`absolute top-0 left-0 ${i==="sm"?"w-6 h-6":"w-7.5 h-7.5"} rounded-full transition-all duration-200 ease-in-out flex items-center justify-center bg-${d} ${t?i==="sm"?"translate-x-9.5":"translate-x-10":"translate-x-0"}`,children:r.jsx(Y,{icon:(u==null?void 0:u.icon)??(t?"current":"currentOff"),color:"white",size:i==="sm"?16:20})}),r.jsx("span",{className:`absolute top-1/2 -translate-y-1/2 text-xs ${t?"left-2":"right-2"}`,children:r.jsx(j,{text:(u==null?void 0:u.text)??(t?"ON":"OFF"),variant:"captionBold"})})]}):r.jsx("button",{type:"button",role:"switch","aria-checked":t,"aria-label":o,disabled:s,onClick:c,className:`relative ${i==="sm"?"w-12 h-6":"w-16 h-8"} rounded-full transition-colors duration-200 bg-offwhite border border-neutralGray ${s?"opacity-50 cursor-not-allowed":"cursor-pointer"}`,children:r.jsx("span",{className:`absolute top-0.75 left-1 ${i==="sm"?"w-4 h-4":"w-6 h-6"} rounded-full transition-all duration-200 ease-in-out bg-${d} ${t?i==="sm"?"translate-x-6":"translate-x-8":"translate-x-0"}`})});return s&&C?r.jsx(o2,{title:C,children:f}):f},i0=e=>{const{competition:t,startStatus:n,title:s,time:o,id:i,isLive:a,onClick:l}=e;return r.jsxs("div",{className:"w-full overflow-hidden rounded-xl border border-brightgray bg-white",children:[r.jsxs("div",{className:"flex items-center justify-between bg-primary px-7 py-2",children:[r.jsx(j,{variant:"body1",color:"secondary",text:t}),r.jsx(s4,{text:"Live",state:a?"active":"locked",variant:"filled"})]}),r.jsxs("div",{className:"py-6 md:py-4 flex flex-col gap-3 md:gap-4 pr-3 pl-7",children:[r.jsx(j,{variant:"h4",color:"black",text:s}),r.jsxs("div",{className:"flex items-center justify-between ",children:[r.jsxs("div",{className:"flex items-center gap-2 md:gap-3",children:[r.jsx(s4,{text:n,state:a?"active":"info",variant:"outlined",iconName:"timer"}),r.jsx(j,{variant:"caption",color:"slategray",text:o})]}),r.jsx("div",{children:r.jsx(o1,{variant:"ghost",text:"View",iconName:"caretRight",textColor:"techBlue",size:"small",onClick:()=>l==null?void 0:l(i)})})]})]})]})},a0={matchOdds:{supportsLimits:!0},bookmaker:{supportsLimits:!0},fancy:{supportsLimits:!1}},l0=e=>{const{eventId:t,eventName:n,eventStartTime:s,betTiming:o,betLimits:i,visible:a,onToggle:l,onEdit:C,onView:c}=e,{isMobile:d}=k1();return r.jsxs("div",{className:"w-full max-w-lg mx-auto bg-white rounded-xl shadow-sm border border-brightgray overflow-hidden",children:[r.jsxs("div",{className:"bg-primary p-2 flex flex-col md:flex-row justify-between items-start sm:items-center gap-1 md:gap-4",children:[r.jsxs("div",{className:"flex w-full justify-between md:flex-col",children:[r.jsx(j,{variant:d?"captionBold":"subtitle1",text:n,color:"white"}),r.jsx(j,{variant:"caption",text:s,color:"white"})]}),r.jsxs("div",{className:"flex flex-row-reverse w-full mt-1 md:w-auto md:flex-row justify-between gap-1 md:gap-4 items-center",children:[r.jsx(g3,{checked:a,onChange:u=>l(t,u)}),r.jsx(o1,{text:"Edit",iconName:"edit",variant:"secondary",iconPosition:"right",size:"small",onClick:()=>C(t)})]})]}),r.jsxs("div",{className:"py-1 md:py-2",children:[r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-1 md:gap-6 items-center px-2 py-1",children:[r.jsx(j,{variant:d?"captionBold":"subtitle1",text:"Bet Timer"}),r.jsx("div",{className:"col-span-1 md:col-span-3 grid grid-cols-3 gap-3 md:gap-6",children:o.map(({key:u,label:f,value:h})=>r.jsxs("div",{className:"flex flex-col items-center text-center space-y-1",children:[r.jsx(j,{variant:"caption",text:f,color:"smokyblack"}),r.jsx(j,{variant:d?"captionBold":"subtitle2",text:h,color:"smokyblack"})]},u))})]}),r.jsx("div",{className:"h-px w-full bg-brightgray"}),r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-1 md:gap-6 items-center px-2 py-1",children:[r.jsx(j,{variant:d?"captionBold":"subtitle1",text:"Bet Limits"}),r.jsx("div",{className:"col-span-1 md:col-span-3 grid grid-cols-3 gap-3 md:gap-6",children:Object.keys(a0).map(u=>{const f=i[u];return r.jsx("div",{className:"text-center space-y-1 md:space-y-2 flex justify-end flex-col",children:f?r.jsxs(r.Fragment,{children:[r.jsx(j,{variant:"caption",text:"Min / Max",color:"smokyblack"}),r.jsx(j,{variant:d?"captionBold":"subtitle2",text:`${f.min} / ${X1(f.max)}`,color:"black"})]}):r.jsx(o1,{size:"small",variant:"ghost",text:"View",textColor:"techBlue",iconName:"caretRight",onClick:()=>c(t)})},u)})})]})]})]})};var w1=function(e,t,n){if(n||arguments.length===2)for(var s=0,o=t.length,i;s<o;s++)(i||!(s in t))&&(i||(i=Array.prototype.slice.call(t,0,s)),i[s]=t[s]);return e.concat(i||Array.prototype.slice.call(t))},C0=["onCopy","onCut","onPaste"],c0=["onCompositionEnd","onCompositionStart","onCompositionUpdate"],d0=["onFocus","onBlur"],u0=["onInput","onInvalid","onReset","onSubmit"],f0=["onLoad","onError"],h0=["onKeyDown","onKeyPress","onKeyUp"],g0=["onAbort","onCanPlay","onCanPlayThrough","onDurationChange","onEmptied","onEncrypted","onEnded","onError","onLoadedData","onLoadedMetadata","onLoadStart","onPause","onPlay","onPlaying","onProgress","onRateChange","onSeeked","onSeeking","onStalled","onSuspend","onTimeUpdate","onVolumeChange","onWaiting"],m0=["onClick","onContextMenu","onDoubleClick","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp"],p0=["onDrag","onDragEnd","onDragEnter","onDragExit","onDragLeave","onDragOver","onDragStart","onDrop"],x0=["onSelect"],v0=["onTouchCancel","onTouchEnd","onTouchMove","onTouchStart"],w0=["onPointerDown","onPointerMove","onPointerUp","onPointerCancel","onGotPointerCapture","onLostPointerCapture","onPointerEnter","onPointerLeave","onPointerOver","onPointerOut"],j0=["onScroll"],y0=["onWheel"],M0=["onAnimationStart","onAnimationEnd","onAnimationIteration"],b0=["onTransitionEnd"],L0=["onToggle"],S0=["onChange"],k0=w1(w1(w1(w1(w1(w1(w1(w1(w1(w1(w1(w1(w1(w1(w1(w1(w1(w1([],C0,!0),c0,!0),d0,!0),u0,!0),f0,!0),h0,!0),g0,!0),m0,!0),p0,!0),x0,!0),v0,!0),w0,!0),j0,!0),y0,!0),M0,!0),b0,!0),S0,!0),L0,!0);function N0(e,t){var n={};return k0.forEach(function(s){var o=e[s];o&&(n[s]=o)}),n}function W5(e){var t,n,s="";if(typeof e=="string"||typeof e=="number")s+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=W5(e[t]))&&(s&&(s+=" "),s+=n)}else for(n in e)e[n]&&(s&&(s+=" "),s+=n);return s}function W2(){for(var e,t,n=0,s="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=W5(e))&&(s&&(s+=" "),s+=t);return s}function L1(e){if(e instanceof Date)return e.getHours();if(typeof e=="string"){var t=e.split(":");if(t.length>=2){var n=t[0];if(n){var s=parseInt(n,10);if(!isNaN(s))return s}}}throw new Error("Failed to get hours from date: ".concat(e,"."))}function K1(e){if(e instanceof Date)return e.getMinutes();if(typeof e=="string"){var t=e.split(":");if(t.length>=2){var n=t[1]||"0",s=parseInt(n,10);if(!isNaN(s))return s}}throw new Error("Failed to get minutes from date: ".concat(e,"."))}function h2(e){if(e instanceof Date)return e.getSeconds();if(typeof e=="string"){var t=e.split(":");if(t.length>=2){var n=t[2]||"0",s=parseInt(n,10);if(!isNaN(s))return s}}throw new Error("Failed to get seconds from date: ".concat(e,"."))}function O4(e){if(e instanceof Date)return e.getMilliseconds();if(typeof e=="string"){var t=e.split(":");if(t.length>=2){var n=t[2]||"0",s=n.split(".")[1]||"0",o=parseInt(s,10);if(!isNaN(o))return o}}throw new Error("Failed to get seconds from date: ".concat(e,"."))}function $2(e,t){t===void 0&&(t=2);var n="".concat(e);return n.length>=t?e:"0000".concat(n).slice(-t)}function Y5(e){var t=$2(L1(e)),n=$2(K1(e));return"".concat(t,":").concat(n)}function z5(e){var t=$2(L1(e)),n=$2(K1(e)),s=$2(h2(e));return"".concat(t,":").concat(n,":").concat(s)}function _4(e){var t=e.angle,n=t===void 0?0:t,s=e.name,o=e.length,i=o===void 0?100:o,a=e.oppositeLength,l=a===void 0?10:a,C=e.width,c=C===void 0?1:C;return r.jsx("div",{className:"react-clock__hand react-clock__".concat(s,"-hand"),style:{transform:"rotate(".concat(n,"deg)")},children:r.jsx("div",{className:"react-clock__hand__body react-clock__".concat(s,"-hand__body"),style:{width:"".concat(c,"px"),top:"".concat(50-i/2,"%"),bottom:"".concat(50-l/2,"%")}})})}var B3=g.memo(function(t){var n=t.angle,s=n===void 0?0:n,o=t.length,i=o===void 0?10:o,a=t.name,l=t.width,C=l===void 0?1:l;return r.jsx("div",{className:"react-clock__mark react-clock__".concat(a,"-mark"),style:{transform:"rotate(".concat(s,"deg)")},children:r.jsx("div",{className:"react-clock__mark__body react-clock__".concat(a,"-mark__body"),style:{width:"".concat(C,"px"),top:0,bottom:"".concat(100-i/2,"%")}})})}),H0=g.memo(function(t){var n=t.angle,s=n===void 0?0:n,o=t.length,i=o===void 0?10:o,a=t.name,l=t.number;return r.jsx("div",{className:"react-clock__mark react-clock__".concat(a,"-mark"),style:{transform:"rotate(".concat(s,"deg)")},children:r.jsx("div",{className:"react-clock__mark__number",style:{transform:"rotate(-".concat(s,"deg)"),top:"".concat(i/2,"%")},children:l})})}),D4,$3;function V0(){if($3)return D4;$3=1;const e=(C,c,d,u)=>{if(d==="length"||d==="prototype"||d==="arguments"||d==="caller")return;const f=Object.getOwnPropertyDescriptor(C,d),h=Object.getOwnPropertyDescriptor(c,d);!t(f,h)&&u||Object.defineProperty(C,d,h)},t=function(C,c){return C===void 0||C.configurable||C.writable===c.writable&&C.enumerable===c.enumerable&&C.configurable===c.configurable&&(C.writable||C.value===c.value)},n=(C,c)=>{const d=Object.getPrototypeOf(c);d!==Object.getPrototypeOf(C)&&Object.setPrototypeOf(C,d)},s=(C,c)=>`/* Wrapped ${C}*/
|
|
67
67
|
${c}`,o=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),i=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),a=(C,c,d)=>{const u=d===""?"":`with ${d.trim()}() `,f=s.bind(null,u,c.toString());Object.defineProperty(f,"name",i),Object.defineProperty(C,"toString",{...o,value:f})};return D4=(C,c,{ignoreNonConfigurable:d=!1}={})=>{const{name:u}=C;for(const f of Reflect.ownKeys(c))e(C,c,f,d);return n(C,c),a(C,c,u),C},D4}var F2={exports:{}},R4,T3;function E0(){return T3||(T3=1,R4=()=>{const e={};return e.promise=new Promise((t,n)=>{e.resolve=t,e.reject=n}),e}),R4}var e4=F2.exports,I3;function Z0(){return I3||(I3=1,(function(e,t){var n=e4&&e4.__awaiter||function(a,l,C,c){return new(C||(C=Promise))(function(d,u){function f(x){try{m(c.next(x))}catch(p){u(p)}}function h(x){try{m(c.throw(x))}catch(p){u(p)}}function m(x){x.done?d(x.value):new C(function(p){p(x.value)}).then(f,h)}m((c=c.apply(a,l||[])).next())})},s=e4&&e4.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(t,"__esModule",{value:!0});const o=s(E0());function i(a,l="maxAge"){let C,c,d;const u=()=>n(this,void 0,void 0,function*(){if(C!==void 0)return;const m=x=>n(this,void 0,void 0,function*(){d=o.default();const p=x[1][l]-Date.now();if(p<=0){a.delete(x[0]),d.resolve();return}return C=x[0],c=setTimeout(()=>{a.delete(x[0]),d&&d.resolve()},p),typeof c.unref=="function"&&c.unref(),d.promise});try{for(const x of a)yield m(x)}catch{}C=void 0}),f=()=>{C=void 0,c!==void 0&&(clearTimeout(c),c=void 0),d!==void 0&&(d.reject(void 0),d=void 0)},h=a.set.bind(a);return a.set=(m,x)=>{a.has(m)&&a.delete(m);const p=h(m,x);return C&&C===m&&f(),u(),p},u(),a}t.default=i,e.exports=i,e.exports.default=i})(F2,F2.exports)),F2.exports}var P4,A3;function O0(){if(A3)return P4;A3=1;const e=V0(),t=Z0(),n=new WeakMap,s=new WeakMap,o=(i,{cacheKey:a,cache:l=new Map,maxAge:C}={})=>{typeof C=="number"&&t(l);const c=function(...d){const u=a?a(d):d[0],f=l.get(u);if(f)return f.data;const h=i.apply(this,d);return l.set(u,{data:h,maxAge:C?Date.now()+C:Number.POSITIVE_INFINITY}),h};return e(c,i,{ignoreNonConfigurable:!0}),s.set(c,l),c};return o.decorator=(i={})=>(a,l,C)=>{const c=a[l];if(typeof c!="function")throw new TypeError("The decorated value must be a function");delete C.value,delete C.writable,C.get=function(){if(!n.has(this)){const d=o(c,i);return n.set(this,d),d}return n.get(this)}},o.clear=i=>{const a=s.get(i);if(!a)throw new TypeError("Can't clear a function that was not memoized!");if(typeof a.clear!="function")throw new TypeError("The cache Map can't be cleared!");a.clear()},P4=o,P4}var _0=O0();const G5=t5(_0);function D0(e){return typeof e=="string"}function R0(e,t,n){return n.indexOf(e)===t}function P0(e){return e.toLowerCase()===e}function W3(e){return e.indexOf(",")===-1?e:e.split(",")}function X4(e){if(!e)return e;if(e==="C"||e==="posix"||e==="POSIX")return"en-US";if(e.indexOf(".")!==-1){var t=e.split(".")[0],n=t===void 0?"":t;return X4(n)}if(e.indexOf("@")!==-1){var s=e.split("@")[0],n=s===void 0?"":s;return X4(n)}if(e.indexOf("-")===-1||!P0(e))return e;var o=e.split("-"),i=o[0],a=o[1],l=a===void 0?"":a;return"".concat(i,"-").concat(l.toUpperCase())}function F0(e){var t=e===void 0?{}:e,n=t.useFallbackLocale,s=n===void 0?!0:n,o=t.fallbackLocale,i=o===void 0?"en-US":o,a=[];if(typeof navigator<"u"){for(var l=navigator.languages||[],C=[],c=0,d=l;c<d.length;c++){var u=d[c];C=C.concat(W3(u))}var f=navigator.language,h=f&&W3(f);a=a.concat(C,h)}return s&&a.push(i),a.filter(D0).map(X4).filter(R0)}var B0=G5(F0,{cacheKey:JSON.stringify});function $0(e){return B0(e)[0]||null}var m3=G5($0,{cacheKey:JSON.stringify});function T0(e,t){return t.toLocaleString(e||m3()||void 0)}function I0(e){return e!==null&&e!==!1&&!Number.isNaN(Number(e))}function A0(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Math.max.apply(Math,e.filter(I0))}function W0(e){var t=e.className,n=e.formatHour,s=n===void 0?T0:n,o=e.hourHandLength,i=o===void 0?50:o,a=e.hourHandOppositeLength,l=e.hourHandWidth,C=l===void 0?4:l,c=e.hourMarksLength,d=c===void 0?10:c,u=e.hourMarksWidth,f=u===void 0?3:u,h=e.locale,m=e.minuteHandLength,x=m===void 0?70:m,p=e.minuteHandOppositeLength,y=e.minuteHandWidth,M=y===void 0?2:y,w=e.minuteMarksLength,b=w===void 0?6:w,L=e.minuteMarksWidth,v=L===void 0?1:L,S=e.renderHourMarks,N=S===void 0?!0:S,Z=e.renderMinuteHand,E=Z===void 0?!0:Z,H=e.renderMinuteMarks,V=H===void 0?!0:H,D=e.renderNumbers,I=e.renderSecondHand,_=I===void 0?!0:I,U=e.secondHandLength,g1=U===void 0?90:U,x1=e.secondHandOppositeLength,J=e.secondHandWidth,s1=J===void 0?1:J,k=e.size,P=k===void 0?150:k,G=e.useMillisecondPrecision,$=e.value;function h1(){if(!V)return null;for(var f1=[],i1=1;i1<=60;i1+=1){var Y1=N&&!(i1%5);Y1||f1.push(r.jsx(B3,{angle:i1*6,length:b,name:"minute",width:v},"minute_".concat(i1)))}return f1}function F(){if(!N)return null;for(var f1=[],i1=1;i1<=12;i1+=1)f1.push(r.jsx(B3,{angle:i1*30,length:d,name:"hour",width:f},"hour_".concat(i1)));return f1}function R(){if(!D)return null;for(var f1=[],i1=1;i1<=12;i1+=1)f1.push(r.jsx(H0,{angle:i1*30,length:A0(N&&d,V&&b,0),name:"number",number:s(h,i1)},"number_".concat(i1)));return f1}function l1(){return r.jsxs("div",{className:"react-clock__face",children:[h1(),F(),R()]})}function m1(){var f1=$?L1($)*30+K1($)/2+h2($)/120+(G?O4($)/12e4:0):0;return r.jsx(_4,{angle:f1,length:i,name:"hour",oppositeLength:a,width:C})}function u1(){if(!E)return null;var f1=$?L1($)*360+K1($)*6+h2($)/10+(G?O4($)/1e4:0):0;return r.jsx(_4,{angle:f1,length:x,name:"minute",oppositeLength:p,width:M})}function F1(){if(!_)return null;var f1=$?K1($)*360+h2($)*6+(G?O4($)*.006:0):0;return r.jsx(_4,{angle:f1,length:g1,name:"second",oppositeLength:x1,width:s1})}return r.jsxs("time",{className:W2("react-clock",t),dateTime:$ instanceof Date?$.toLocaleTimeString("en",{hourCycle:"h23",hour:"2-digit",minute:E?"2-digit":void 0,second:_?"2-digit":void 0}):$||void 0,style:{width:P,height:P},children:[l1(),m1(),u1(),F1()]})}function M1(e){return e.getBoundingClientRect()}function Y3(e,t){return{get collidedTop(){return M1(e).top<M1(t).top},get collidedBottom(){return M1(e).bottom>M1(t).bottom},get collidedLeft(){return M1(e).left<M1(t).left},get collidedRight(){return M1(e).right>M1(t).right},get overflowTop(){return M1(t).top-M1(e).top},get overflowBottom(){return M1(e).bottom-M1(t).bottom},get overflowLeft(){return M1(t).left-M1(e).left},get overflowRight(){return M1(e).right-M1(t).right}}}var F4,z3;function Y0(){if(z3)return F4;z3=1;var e=process.env.NODE_ENV!=="production",t=function(){};if(e){var n=function(o,i){var a=arguments.length;i=new Array(a>1?a-1:0);for(var l=1;l<a;l++)i[l-1]=arguments[l];var C=0,c="Warning: "+o.replace(/%s/g,function(){return i[C++]});typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}};t=function(s,o,i){var a=arguments.length;i=new Array(a>2?a-2:0);for(var l=2;l<a;l++)i[l-2]=arguments[l];if(o===void 0)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");s||n.apply(null,[o].concat(i))}}return F4=t,F4}var z0=Y0();const G3=t5(z0);var t2=function(){return t2=Object.assign||function(e){for(var t,n=1,s=arguments.length;n<s;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},t2.apply(this,arguments)},G0=function(e,t){var n={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,s=Object.getOwnPropertySymbols(e);o<s.length;o++)t.indexOf(s[o])<0&&Object.prototype.propertyIsEnumerable.call(e,s[o])&&(n[s[o]]=e[s[o]]);return n},q0=typeof document<"u",U0=q0&&"MutationObserver"in window;function t4(e){return e.charAt(0).toUpperCase()+e.slice(1)}function K0(e){for(var t=e.parentElement;t;){var n=window.getComputedStyle(t).overflow;if(n.split(" ").every(function(s){return s==="auto"||s==="scroll"}))return t;t=t.parentElement}return document.documentElement}function q5(e){var t=e.axis,n=e.container,s=e.element,o=e.invertAxis,i=e.scrollContainer,a=e.secondary,l=e.spacing,C=window.getComputedStyle(s),c=n.parentElement;if(!c)return;var d=Y3(c,i),u=Y3(c,document.documentElement),f=t==="x",h=f?"left":"top",m=f?"right":"bottom",x=f?"width":"height",p="overflow".concat(t4(h)),y="overflow".concat(t4(m)),M="scroll".concat(t4(h)),w=t4(x),b="offset".concat(w),L="client".concat(w),v="min-".concat(x),S=i[b]-i[L],N=typeof l=="object"?l[h]:l,Z=-Math.max(d[p],u[p]+document.documentElement[M])-N,E=typeof l=="object"?l[m]:l,H=-Math.max(d[y],u[y]-document.documentElement[M])-E-S;a&&(Z+=c[L],H+=c[L]);var V=s[b];function D(){s.style[h]="auto",s.style[m]=a?"0":"100%"}function I(){s.style[h]=a?"0":"100%",s.style[m]="auto"}function _(s1,k){var P=V<=s1;return P&&k(),P}function U(){return _(Z,D)}function g1(){return _(H,I)}function x1(){var s1=Z>H,k=C.getPropertyValue(v),P=k?parseInt(k,10):null;function G($){G3(!P||$>=P,"<Fit />'s child will not fit anywhere with its current ".concat(v," of ").concat(P,"px."));var h1=Math.max($,P||0);G3(!1,"<Fit />'s child needed to have its ".concat(x," decreased to ").concat(h1,"px.")),s.style[x]="".concat(h1,"px")}s1?(G(Z),D()):(G(H),I())}var J;o?J=U()||g1():J=g1()||U(),J||x1()}function X0(e){q5(e)}function Q0(e){q5(t2(t2({},e),{axis:e.axis==="x"?"y":"x",secondary:!0}))}function J0(e){var t=e.invertAxis,n=e.invertSecondaryAxis,s=G0(e,["invertAxis","invertSecondaryAxis"]);X0(t2(t2({},s),{invertAxis:t})),Q0(t2(t2({},s),{invertAxis:n}))}function et(e){var t=e.children,n=e.invertAxis,s=e.invertSecondaryAxis,o=e.mainAxis,i=o===void 0?"y":o,a=e.spacing,l=a===void 0?8:a,C=g.useRef(void 0),c=g.useRef(void 0),d=g.useRef(void 0),u=g.useRef(void 0),f=g.useRef(void 0),h=g.useCallback(function(){if(!(!f.current||!C.current||!c.current)){var p=c.current.clientWidth,y=c.current.clientHeight;if(!(d.current===p&&u.current===y)){d.current=p,u.current=y;var M=C.current.parentElement;if(M){var w=window.getComputedStyle(c.current),b=w.position;b!=="absolute"&&(c.current.style.position="absolute");var L=window.getComputedStyle(M),v=L.position;v!=="relative"&&v!=="absolute"&&(M.style.position="relative"),J0({axis:i,container:C.current,element:c.current,invertAxis:n,invertSecondaryAxis:s,scrollContainer:f.current,spacing:l})}}}},[n,s,i,l]),m=g.Children.only(t);g.useEffect(function(){h();function p(){h()}if(U0&&c.current){var y=new MutationObserver(p);y.observe(c.current,{attributes:!0,attributeFilter:["class","style"]})}},[h]);function x(p){!p||!(p instanceof HTMLElement)||(c.current=p,f.current=K0(p))}return r.jsx("span",{ref:function(p){if(p){C.current=p;var y=p==null?void 0:p.firstElementChild;x(y)}},style:{display:"contents"},children:m})}function tt(e){var t=e.children;return r.jsx("span",{className:"react-time-picker__inputGroup__divider",children:t})}var nt=["normal","small-caps"];function U5(e){if(!e)return"";var t=window.getComputedStyle(e);if(t.font)return t.font;var n=t.fontFamily!=="";if(!n)return"";var s=nt.includes(t.fontVariant)?t.fontVariant:"normal";return"".concat(t.fontStyle," ").concat(s," ").concat(t.fontWeight," ").concat(t.fontSize," / ").concat(t.lineHeight," ").concat(t.fontFamily)}var q3;function rt(e,t){var n=q3||(q3=document.createElement("canvas")),s=n.getContext("2d");if(!s)return null;s.font=t;var o=s.measureText(e).width;return Math.ceil(o)}function o4(e){if(typeof document>"u"||!e)return null;var t=U5(e),n=e.value||e.placeholder,s=rt(n,t);return s===null?null:(e.style.width="".concat(s,"px"),s)}var p3=typeof document<"u",st=p3?g.useLayoutEffect:g.useEffect,ot=p3&&/(MSIE|Trident\/|Edge\/)/.test(navigator.userAgent),it=p3&&/Firefox/.test(navigator.userAgent);function at(e){var t=e.target;ot?requestAnimationFrame(function(){return t.select()}):t.select()}function lt(e){if(document.readyState==="complete")return;function t(){o4(e)}window.addEventListener("load",t)}function Ct(e){if(!document.fonts)return;var t=U5(e);if(!t)return;var n=document.fonts.check(t);if(n)return;function s(){o4(e)}document.fonts.addEventListener("loadingdone",s)}function ct(e){if(e&&"selectionStart"in e&&e.selectionStart!==null&&"selectionEnd"in e&&e.selectionEnd!==null)return e.value.slice(e.selectionStart,e.selectionEnd);if("getSelection"in window){var t=window.getSelection();return t&&t.toString()}return null}function dt(e){if(e!==null)return function(n){if(!it){var s=n.key,o=n.target,i=o.value,a=s.length===1&&/\d/.test(s),l=ct(o);(!a||!(l||i.length<e))&&n.preventDefault()}}}function C4(e){var t=e.ariaLabel,n=e.autoFocus,s=e.className,o=e.disabled,i=e.inputRef,a=e.max,l=e.min,C=e.name,c=e.nameForClass,d=e.onChange,u=e.onKeyDown,f=e.onKeyUp,h=e.placeholder,m=h===void 0?"--":h,x=e.required,p=e.showLeadingZeros,y=e.step,M=e.value;st(function(){!i||!i.current||(o4(i.current),lt(i.current),Ct(i.current))},[i,M]);var w=p&&M&&Number(M)<10&&(M==="0"||!M.toString().startsWith("0")),b=a?a.toString().length:null;return r.jsxs(r.Fragment,{children:[w?r.jsx("span",{className:"".concat(s,"__leadingZero"),children:"0"}):null,r.jsx("input",{"aria-label":t,autoComplete:"off",autoFocus:n,className:W2("".concat(s,"__input"),"".concat(s,"__").concat(c||C),w&&"".concat(s,"__input--hasLeadingZero")),"data-input":"true",disabled:o,inputMode:"numeric",max:a,min:l,name:C,onChange:d,onFocus:at,onKeyDown:u,onKeyPress:dt(b),onKeyUp:function(L){o4(L.target),f&&f(L)},placeholder:m,ref:i,required:x,step:y,type:"number",value:M!==null?M:""})]})}function U3(e,t){var n=Number(e);return t==="am"&&n===12?n=0:t==="pm"&&n<12&&(n+=12),n}function M2(e){var t=Number(e)%12||12;return[t,Number(e)<12?"am":"pm"]}var B4=new Map;function K5(e){return function(n,s){var o=n||m3();B4.has(o)||B4.set(o,new Map);var i=B4.get(o);return i.has(e)||i.set(e,new Intl.DateTimeFormat(o||void 0,e).format),i.get(e)(s)}}var $4=new Map;function ut(e){return function(t,n){var s=t||m3();$4.has(s)||$4.set(s,new Map);var o=$4.get(s);return o.has(e)||o.set(e,new Intl.NumberFormat(s||void 0,e).format),o.get(e)(n)}}var ft=["9","٩"],K3=new RegExp("[".concat(ft.join(""),"]")),X3=K5({hour:"numeric"});function X5(e){var t=X3(e,new Date(2017,0,1,9)),n=X3(e,new Date(2017,0,1,21)),s=t.split(K3),o=s[0],i=s[1],a=n.split(K3),l=a[0],C=a[1];if(C!==void 0){if(o!==l)return[o,l].map(function(c){return c.trim()});if(i!==C)return[i,C].map(function(c){return c.trim()})}return["AM","PM"]}function Q5(e){return e!==null&&e!==!1&&!Number.isNaN(Number(e))}function c4(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Math.min.apply(Math,e.filter(Q5))}function d4(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Math.max.apply(Math,e.filter(Q5))}var Q4=function(){return Q4=Object.assign||function(e){for(var t,n=1,s=arguments.length;n<s;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},Q4.apply(this,arguments)},ht=function(e,t){var n={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,s=Object.getOwnPropertySymbols(e);o<s.length;o++)t.indexOf(s[o])<0&&Object.prototype.propertyIsEnumerable.call(e,s[o])&&(n[s[o]]=e[s[o]]);return n};function gt(e){var t=e.amPm,n=e.maxTime,s=e.minTime,o=e.value,i=ht(e,["amPm","maxTime","minTime","value"]),a=c4(12,n&&(function(){var c=M2(L1(n)),d=c[0],u=c[1];return u!==t?null:d})()),l=d4(1,s&&(function(){var c=M2(L1(s)),d=c[0],u=c[1];return u!==t||d===12?null:d})()),C=o?M2(o)[0].toString():"";return r.jsx(C4,Q4({max:a,min:l,name:"hour12",nameForClass:"hour",value:C},i))}var J4=function(){return J4=Object.assign||function(e){for(var t,n=1,s=arguments.length;n<s;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},J4.apply(this,arguments)},mt=function(e,t){var n={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,s=Object.getOwnPropertySymbols(e);o<s.length;o++)t.indexOf(s[o])<0&&Object.prototype.propertyIsEnumerable.call(e,s[o])&&(n[s[o]]=e[s[o]]);return n};function pt(e){var t=e.maxTime,n=e.minTime,s=mt(e,["maxTime","minTime"]),o=c4(23,t&&L1(t)),i=d4(0,n&&L1(n));return r.jsx(C4,J4({max:o,min:i,name:"hour24",nameForClass:"hour"},s))}var e3=function(){return e3=Object.assign||function(e){for(var t,n=1,s=arguments.length;n<s;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},e3.apply(this,arguments)},xt=function(e,t){var n={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,s=Object.getOwnPropertySymbols(e);o<s.length;o++)t.indexOf(s[o])<0&&Object.prototype.propertyIsEnumerable.call(e,s[o])&&(n[s[o]]=e[s[o]]);return n};function vt(e){var t=e.hour,n=e.maxTime,s=e.minTime,o=e.showLeadingZeros,i=o===void 0?!0:o,a=xt(e,["hour","maxTime","minTime","showLeadingZeros"]);function l(d){return t===L1(d).toString()}var C=c4(59,n&&l(n)&&K1(n)),c=d4(0,s&&l(s)&&K1(s));return r.jsx(C4,e3({max:C,min:c,name:"minute",showLeadingZeros:i},a))}var t3=function(){return t3=Object.assign||function(e){for(var t,n=1,s=arguments.length;n<s;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},t3.apply(this,arguments)},wt=function(e,t){var n={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,s=Object.getOwnPropertySymbols(e);o<s.length;o++)t.indexOf(s[o])<0&&Object.prototype.propertyIsEnumerable.call(e,s[o])&&(n[s[o]]=e[s[o]]);return n};function jt(e){var t=e.hour,n=e.maxTime,s=e.minTime,o=e.minute,i=e.showLeadingZeros,a=i===void 0?!0:i,l=wt(e,["hour","maxTime","minTime","minute","showLeadingZeros"]);function C(u){return t===L1(u).toString()&&o===K1(u).toString()}var c=c4(59,n&&C(n)&&h2(n)),d=d4(0,s&&C(s)&&h2(s));return r.jsx(C4,t3({max:c,min:d,name:"second",showLeadingZeros:a},l))}function yt(e){var t=e.ariaLabel,n=e.disabled,s=e.maxTime,o=e.minTime,i=e.name,a=e.onChange,l=e.required,C=e.value,c=e.valueType,d=(function(){switch(c){case"hour":return function(h){return"".concat(L1(h),":00")};case"minute":return Y5;case"second":return z5;default:throw new Error("Invalid valueType")}})(),u=(function(){switch(c){case"hour":return 3600;case"minute":return 60;case"second":return 1;default:throw new Error("Invalid valueType")}})();function f(h){h.stopPropagation()}return r.jsx("input",{"aria-label":t,disabled:n,hidden:!0,max:s?d(s):void 0,min:o?d(o):void 0,name:i,onChange:a,onFocus:f,required:l,step:u,style:{visibility:"hidden",position:"absolute",zIndex:"-999"},type:"time",value:C?d(C):""})}function Mt(e){var t=e.ariaLabel,n=e.autoFocus,s=e.className,o=e.disabled,i=e.inputRef,a=e.locale,l=e.maxTime,C=e.minTime,c=e.onChange,d=e.onKeyDown,u=e.required,f=e.value,h=C?M2(L1(C))[1]==="pm":!1,m=l?M2(L1(l))[1]==="am":!1,x="amPm",p=X5(a),y=p[0],M=p[1];return r.jsxs("select",{"aria-label":t,autoFocus:n,className:W2("".concat(s,"__input"),"".concat(s,"__").concat(x)),"data-input":"true","data-select":"true",disabled:o,name:x,onChange:c,onKeyDown:d,ref:i,required:u,value:f!==null?f:"",children:[!f&&r.jsx("option",{value:"",children:"--"}),r.jsx("option",{disabled:h,value:"am",children:y}),r.jsx("option",{disabled:m,value:"pm",children:M})]})}var u2=function(){return u2=Object.assign||function(e){for(var t,n=1,s=arguments.length;n<s;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},u2.apply(this,arguments)},Q3={},bt=["hour","minute","second"];function Lt(e){return e.dataset.input==="true"}function J3(e,t){var n=e;do n=n[t];while(n&&!Lt(n));return n}function T4(e){e&&e.focus()}function St(e,t,n){var s=[],o=new RegExp(Object.keys(t).map(function(a){return"".concat(a,"+")}).join("|"),"g"),i=e.match(o);return e.split(o).reduce(function(a,l,C){var c=l&&r.jsx(tt,{children:l},"separator_".concat(C));a.push(c);var d=i&&i[C];if(d){var u=t[d]||t[Object.keys(t).find(function(f){return d.match(f)})];if(!u)return a;!n&&s.includes(u)?a.push(d):(a.push(u(d,C)),s.push(u))}return a},[])}var n4=ut({useGrouping:!1});function kt(e){var t=e.amPmAriaLabel,n=e.autoFocus,s=e.className,o=e.disabled,i=e.format,a=e.hourAriaLabel,l=e.hourPlaceholder,C=e.isClockOpen,c=C===void 0?null:C,d=e.locale,u=e.maxDetail,f=u===void 0?"minute":u,h=e.maxTime,m=e.minTime,x=e.minuteAriaLabel,p=e.minutePlaceholder,y=e.name,M=y===void 0?"time":y,w=e.nativeInputAriaLabel,b=e.onChange,L=e.onInvalidChange,v=e.required,S=e.secondAriaLabel,N=e.secondPlaceholder,Z=e.value,E=g.useState(null),H=E[0],V=E[1],D=g.useState(null),I=D[0],_=D[1],U=g.useState(null),g1=U[0],x1=U[1],J=g.useState(null),s1=J[0],k=J[1],P=g.useState(null),G=P[0],$=P[1],h1=g.useRef(null),F=g.useRef(null),R=g.useRef(null),l1=g.useRef(null),m1=g.useRef(null),u1=g.useState(c),F1=u1[0],f1=u1[1],i1=g.useRef(void 0);g.useEffect(function(){f1(c)},[c]),g.useEffect(function(){var O=Z;O?(V(M2(L1(O))[1]),_(L1(O).toString()),x1(K1(O).toString()),k(h2(O).toString()),$(O)):(V(null),_(null),x1(null),k(null),$(null))},[Z,m,h,f,F1]);var Y1=f,O1=(function(){var O=bt.indexOf(f),q=Q3[O]||(function(){var t1={hour:"numeric"};return O>=1&&(t1.minute="numeric"),O>=2&&(t1.second="numeric"),Q3[O]=t1,t1})();return K5(q)})();function S2(O){var q=(function(){switch(Y1){case"hour":case"minute":return Y5;case"second":return z5;default:throw new Error("Invalid valueType")}})();return q(O)}var i2=i||(function(){var O=21,q=9,t1=13,a1=14,c2=new Date(2017,0,1,O,t1,a1);return O1(d,c2).replace(n4(d,q),"h").replace(n4(d,O),"H").replace(n4(d,t1),"mm").replace(n4(d,a1),"ss").replace(new RegExp(X5(d).join("|")),"a")})(),k2=(function(){var O=i2.match(/[^0-9a-z]/i);return O?O[0]:null})();function a2(O){if(O.target===O.currentTarget){var q=O.target.children[1];T4(q)}}function N2(O){switch(i1.current=O.key,O.key){case"ArrowLeft":case"ArrowRight":case k2:{O.preventDefault();var q=O.target,t1=O.key==="ArrowLeft"?"previousElementSibling":"nextElementSibling",a1=J3(q,t1);T4(a1);break}}}function m2(O){var q=O.key,t1=O.target,a1=i1.current===q;if(a1){var c2=!isNaN(Number(q));if(c2){var Q1=t1.getAttribute("max");if(Q1){var z=t1.value;if(Number(z)*10>Number(Q1)||z.length>=Q1.length){var X="nextElementSibling",T=J3(t1,X);T4(T)}}}}}function l2(){if(!b)return;function O(v1){return!!v1}var q=[h1.current,F.current,R.current,l1.current,m1.current].filter(O),t1=q.slice(1),a1={};q.forEach(function(v1){a1[v1.name]=v1.type==="number"?"valueAsNumber"in v1?v1.valueAsNumber:Number(v1.value):v1.value});var c2=t1.every(function(v1){return!v1.value});if(c2){b(null,!1);return}var Q1=q.every(function(v1){return v1.value}),z=q.every(function(v1){return v1.validity.valid});if(Q1&&z){var X=Number(a1.hour24||a1.hour12&&a1.amPm&&U3(a1.hour12,a1.amPm)||0),T=Number(a1.minute||0),Q=Number(a1.second||0),j1=function(v1){return"0".concat(v1).slice(-2)},K="".concat(j1(X),":").concat(j1(T),":").concat(j1(Q)),u4=S2(K);b(u4,!1);return}L&&L()}function z1(O){var q=O.target,t1=q.name,a1=q.value;switch(t1){case"amPm":V(a1);break;case"hour12":_(a1?U3(a1,H||"am").toString():"");break;case"hour24":_(a1);break;case"minute":x1(a1);break;case"second":k(a1);break}l2()}function C2(O){var q=O.target.value;if(b){var t1=q||null;b(t1,!1)}}var _1={className:s,disabled:o,maxTime:h,minTime:m,onChange:z1,onKeyDown:N2,onKeyUp:m2,required:!!(v||F1)};function H2(O,q){if(O&&O.length>2)throw new Error("Unsupported token: ".concat(O));var t1=O?O.length===2:!1;return r.jsx(gt,u2({},_1,{amPm:H,ariaLabel:a,autoFocus:q===0&&n,inputRef:F,placeholder:l,showLeadingZeros:t1,value:I}),"hour12")}function e1(O,q){if(O&&O.length>2)throw new Error("Unsupported token: ".concat(O));var t1=O?O.length===2:!1;return r.jsx(pt,u2({},_1,{ariaLabel:a,autoFocus:q===0&&n,inputRef:R,placeholder:l,showLeadingZeros:t1,value:I}),"hour24")}function c1(O,q){return/h/.test(O)?H2(O,q):e1(O,q)}function E1(O,q){if(O&&O.length>2)throw new Error("Unsupported token: ".concat(O));var t1=O?O.length===2:!1;return r.jsx(vt,u2({},_1,{ariaLabel:x,autoFocus:q===0&&n,hour:I,inputRef:l1,placeholder:p,showLeadingZeros:t1,value:g1}),"minute")}function B1(O,q){if(O&&O.length>2)throw new Error("Unsupported token: ".concat(O));var t1=O?O.length===2:!0;return r.jsx(jt,u2({},_1,{ariaLabel:S,autoFocus:q===0&&n,hour:I,inputRef:m1,minute:g1,placeholder:N,showLeadingZeros:t1,value:s1}),"second")}function p2(O,q){return r.jsx(Mt,u2({},_1,{ariaLabel:t,autoFocus:q===0&&n,inputRef:h1,locale:d,onChange:z1,value:H}),"ampm")}function V2(){var O={h:c1,H:c1,m:E1,s:B1,a:p2},q=typeof i<"u";return St(i2,O,q)}function x2(){return r.jsx(yt,{ariaLabel:w,disabled:o,maxTime:h,minTime:m,name:M,onChange:C2,required:v,value:G,valueType:Y1},"time")}return r.jsxs("div",{className:s,onClick:a2,children:[x2(),V2()]})}var g2=function(){return g2=Object.assign||function(e){for(var t,n=1,s=arguments.length;n<s;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},g2.apply(this,arguments)},Nt=function(e,t){var n={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,s=Object.getOwnPropertySymbols(e);o<s.length;o++)t.indexOf(s[o])<0&&Object.prototype.propertyIsEnumerable.call(e,s[o])&&(n[s[o]]=e[s[o]]);return n},S1="react-time-picker",Ht=["mousedown","focusin","touchstart"],J5={xmlns:"http://www.w3.org/2000/svg",width:19,height:19,viewBox:"0 0 19 19",stroke:"black",strokeWidth:2},Vt=r.jsxs("svg",g2({},J5,{className:"".concat(S1,"__clock-button__icon ").concat(S1,"__button__icon"),fill:"none",children:[r.jsx("circle",{cx:"9.5",cy:"9.5",r:"7.5"}),r.jsx("path",{d:"M9.5 4.5 v5 h4"})]})),Et=r.jsxs("svg",g2({},J5,{className:"".concat(S1,"__clear-button__icon ").concat(S1,"__button__icon"),children:[r.jsx("line",{x1:"4",x2:"15",y1:"4",y2:"15"}),r.jsx("line",{x1:"15",x2:"4",y1:"4",y2:"15"})]}));function Zt(e){var t=e.amPmAriaLabel,n=e.autoFocus,s=e.className,o=e.clearAriaLabel,i=e.clearIcon,a=i===void 0?Et:i,l=e.clockAriaLabel,C=e.clockIcon,c=C===void 0?Vt:C,d=e.closeClock,u=d===void 0?!0:d,f=e["data-testid"],h=e.hourAriaLabel,m=e.hourPlaceholder,x=e.disableClock,p=e.disabled,y=e.format,M=e.id,w=e.isOpen,b=w===void 0?null:w,L=e.locale,v=e.maxTime,S=e.maxDetail,N=S===void 0?"minute":S,Z=e.minTime,E=e.minuteAriaLabel,H=e.minutePlaceholder,V=e.name,D=V===void 0?"time":V,I=e.nativeInputAriaLabel,_=e.onClockClose,U=e.onClockOpen,g1=e.onChange,x1=e.onFocus,J=e.onInvalidChange,s1=e.openClockOnFocus,k=s1===void 0?!0:s1,P=e.required,G=e.value,$=e.secondAriaLabel,h1=e.secondPlaceholder,F=e.shouldCloseClock,R=e.shouldOpenClock,l1=Nt(e,["amPmAriaLabel","autoFocus","className","clearAriaLabel","clearIcon","clockAriaLabel","clockIcon","closeClock","data-testid","hourAriaLabel","hourPlaceholder","disableClock","disabled","format","id","isOpen","locale","maxTime","maxDetail","minTime","minuteAriaLabel","minutePlaceholder","name","nativeInputAriaLabel","onClockClose","onClockOpen","onChange","onFocus","onInvalidChange","openClockOnFocus","required","value","secondAriaLabel","secondPlaceholder","shouldCloseClock","shouldOpenClock"]),m1=g.useState(b),u1=m1[0],F1=m1[1],f1=g.useRef(null),i1=g.useRef(null);g.useEffect(function(){F1(b)},[b]);function Y1(e1){var c1=e1.reason;R&&!R({reason:c1})||(F1(!0),U&&U())}var O1=g.useCallback(function(e1){var c1=e1.reason;F&&!F({reason:c1})||(F1(!1),_&&_())},[_,F]);function S2(){u1?O1({reason:"buttonClick"}):Y1({reason:"buttonClick"})}function i2(e1,c1){c1===void 0&&(c1=u),c1&&O1({reason:"select"}),g1&&g1(e1)}function k2(e1){x1&&x1(e1),!(p||u1||!k||e1.target.dataset.select==="true")&&Y1({reason:"focus"})}var a2=g.useCallback(function(e1){e1.key==="Escape"&&O1({reason:"escape"})},[O1]);function N2(){i2(null)}function m2(e1){e1.stopPropagation()}var l2=g.useCallback(function(e1){var c1=f1.current,E1=i1.current,B1="composedPath"in e1?e1.composedPath()[0]:e1.target;B1&&c1&&!c1.contains(B1)&&(!E1||!E1.contains(B1))&&O1({reason:"outsideAction"})},[i1,O1,f1]),z1=g.useCallback(function(e1){e1===void 0&&(e1=u1),Ht.forEach(function(c1){e1?document.addEventListener(c1,l2):document.removeEventListener(c1,l2)}),e1?document.addEventListener("keydown",a2):document.removeEventListener("keydown",a2)},[u1,l2,a2]);g.useEffect(function(){return z1(),function(){z1(!1)}},[z1]);function C2(){var e1=(Array.isArray(G)?G:[G])[0],c1={amPmAriaLabel:t,hourAriaLabel:h,minuteAriaLabel:E,nativeInputAriaLabel:I,secondAriaLabel:$},E1={hourPlaceholder:m,minutePlaceholder:H,secondPlaceholder:h1};return r.jsxs("div",{className:"".concat(S1,"__wrapper"),children:[r.jsx(kt,g2({},c1,E1,{autoFocus:n,className:"".concat(S1,"__inputGroup"),disabled:p,format:y,isClockOpen:u1,locale:L,maxDetail:N,maxTime:v,minTime:Z,name:D,onChange:i2,onInvalidChange:J,required:P,value:e1})),a!==null&&r.jsx("button",{"aria-label":o,className:"".concat(S1,"__clear-button ").concat(S1,"__button"),disabled:p,onClick:N2,onFocus:m2,type:"button",children:typeof a=="function"?g.createElement(a):a}),c!==null&&!x&&r.jsx("button",{"aria-expanded":u1||!1,"aria-label":l,className:"".concat(S1,"__clock-button ").concat(S1,"__button"),disabled:p,onClick:S2,onFocus:m2,type:"button",children:typeof c=="function"?g.createElement(c):c})]})}function _1(){if(u1===null||x)return null;var e1=e.clockProps,c1=e.portalContainer,E1=e.value,B1="".concat(S1,"__clock"),p2=W2(B1,"".concat(B1,"--").concat(u1?"open":"closed")),V2=(Array.isArray(E1)?E1:[E1])[0],x2=r.jsx(W0,g2({locale:L,value:V2},e1));return c1?e5.createPortal(r.jsx("div",{ref:i1,className:p2,children:x2}),c1):r.jsx(et,{children:r.jsx("div",{ref:function(O){O&&!u1&&O.removeAttribute("style")},className:p2,children:x2})})}var H2=g.useMemo(function(){return N0(l1)},[l1]);return r.jsxs("div",g2({className:W2(S1,"".concat(S1,"--").concat(u1?"open":"closed"),"".concat(S1,"--").concat(p?"disabled":"enabled"),s),"data-testid":f,id:M},H2,{onFocus:k2,ref:f1,children:[C2(),_1()]}))}const Ot=e=>{const{title:t="Select Time",selectedTime:n,value:s,fullWidth:o,errorMessage:i="Invalid time range. Start time must be earlier than end time."}=e,[a,l]=g.useState(!1),[C,c]=g.useState(null),[d,u]=g.useState(null),[f,h]=g.useState(t),[m,x]=g.useState(!1),p=g.useRef(null);g.useEffect(()=>{c((s==null?void 0:s.from)??null),u((s==null?void 0:s.to)??null),!(s!=null&&s.from)&&!(s!=null&&s.to)&&h(t)},[s,t]),g.useEffect(()=>{const v=S=>{p.current&&!p.current.contains(S.target)&&l(!1)};return document.addEventListener("click",v),()=>document.removeEventListener("click",v)},[]);const y=()=>!C||!d?!0:new Date(`1970-01-01T${d}`).getTime()<new Date(`1970-01-01T${C}`).getTime(),M=v=>{const[S,N,Z]=v.split(":").map(Number);let E=S;const H=E>=12?"PM":"AM";return E=E%12,E===0&&(E=12),`${E.toString().padStart(2,"0")}:${N.toString().padStart(2,"0")}:${Z.toString().padStart(2,"0")} ${H}`},w=()=>{h(t),c(null),u(null),n({from:null,to:null})},b=()=>{if(!y()&&C&&d){const v=m?{from:C,to:d}:{from:M(C),to:M(d)};n(v),h(m?`${C} - ${d}`:`${M(C)} - ${M(d)}`),l(!1)}},L=(v,S)=>r.jsx(Zt,{onChange:N=>S(N),value:v,format:m?"HH:mm:ss":"hh:mm:ss a",locale:"en-US",maxDetail:"second",clearIcon:null,disableClock:!0,amPmAriaLabel:"Select AM/PM",className:m?"w-30":"min-w-max",hourPlaceholder:"hh",minutePlaceholder:"mm",secondPlaceholder:"ss"});return r.jsxs("div",{ref:p,className:`relative inline-block ${o?"w-full":""}`,children:[r.jsx("div",{className:o?"w-full":"w-auto",children:r.jsx(o1,{type:"button",variant:"outline",onClick:()=>l(v=>!v),text:f,iconName:"timer",fullWidth:o})}),a&&r.jsxs("div",{className:"absolute left-0 top-full z-level-3 mt-3 bg-white border border-brightgray shadow-2xl rounded-lg px-2 py-2 space-y-5 min-w-72 md:min-w-80 overflow-auto no-scrollbar",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx(j,{variant:"body1",text:"Select Time Range"}),r.jsx("button",{type:"button",onClick:()=>x(v=>!v),className:`cursor-pointer text-xs px-3 py-1 rounded-full border transition-all ${m?"bg-black text-white border-black":"bg-white text-gray-600 border-gray-300 hover:bg-gray-100"}`,children:m?"24H":"12H"})]}),r.jsxs("div",{className:`flex flex-row items-center justify-center ${m?"gap-2":"gap-1"}`,children:[r.jsx("div",{className:"flex items-center",children:L(C,c)}),r.jsx("div",{className:"flex items-center",children:r.jsx(j,{variant:"body1",text:"To"})}),r.jsx("div",{className:"flex items-center",children:L(d,u)})]}),C&&d&&y()&&r.jsx(j,{variant:"caption",color:"error",text:i}),r.jsxs("div",{className:"flex justify-between gap-3",children:[r.jsx(o1,{text:"Clear",size:"extraSmall",variant:"ghost",onClick:w}),r.jsxs("div",{className:"flex gap-2",children:[r.jsx(o1,{text:"Cancel",size:"extraSmall",variant:"outline",onClick:()=>l(!1)}),r.jsx(o1,{text:"Apply",size:"extraSmall",variant:"primary",disabled:y(),onClick:b})]})]})]})]})},_t=e=>{const{title:t,image:n,buttonProps:s,iconProps:o}=e;return r.jsx("div",{className:"w-full h-72 rounded-2xl bg-cover bg-center shadow-lg flex items-end px-5 py-10",style:{backgroundImage:`url(${n})`},children:r.jsxs("div",{className:"flex flex-col w-full items-center gap-2 sm:flex-row sm:justify-between",children:[r.jsxs("div",{className:"flex gap-2",children:[r.jsx(j,{variant:"subtitle2",text:t,color:"white"}),o&&r.jsx(Y,{...o})]}),s&&r.jsx(o1,{...s})]})})},Dt=e=>{const{imageUrl:t,title:n,onClick:s}=e,{isMobile:o}=k1();return r.jsxs("div",{onClick:s,onKeyDown:i=>i.key==="Enter"&&(s==null?void 0:s()),className:"w-26 md:w-40 cursor-pointer active:scale-95 transition shadow-md",children:[r.jsx("div",{className:"overflow-hidden h-26 md:h-40",children:r.jsx("img",{src:t,alt:n,className:"w-full object-cover"})}),r.jsx("div",{className:"bg-primary flex items-center justify-center p-0.5 md:p-1",children:r.jsx(j,{variant:o?"smallCaps":"captionBold",text:n,color:"white"})})]})},r4={approved:"APPROVED",pending:"PENDING",rejected:"REJECTED"},e6={[r4.approved]:"active",[r4.pending]:"pending",[r4.rejected]:"suspended"},Rt=({variant:e,title:t,amount:n,details:s,qrCode:o,status:i,toDelete:a,toggle:l,remark:C,remarkDesc:c,handleDelete:d})=>{const[u,f]=g.useState(null),h=async b=>{await navigator.clipboard.writeText(b),f(b),setTimeout(()=>{f(L=>L===b?null:L)},2e3)},m=e6[i]??"pending",x=e==="crypto",p=e==="bank",y=(e==="crypto"||e==="upi")&&o,M=x&&n,w=b=>{const L=p||x&&!b.copyable;return r.jsxs("div",{className:p?"grid grid-cols-[1fr_minmax(150px,auto)_auto] gap-3 items-center":"flex items-center justify-between gap-3",children:[L&&r.jsx(j,{variant:"body2",text:b.label,color:"white"}),r.jsx("div",{className:"break-all text-left",children:r.jsx(j,{variant:"body2",text:b.value,color:"white"})}),b.copyable?r.jsx(Y,{icon:u===b.value?"done":"copy",onClick:()=>h(b.value),size:24,color:"white",className:"transition-transform duration-100 active:scale-95"}):!x&&r.jsx("div",{className:"w-6"})]})};return r.jsxs("div",{className:"rounded-2xl bg-black text-white",children:[r.jsxs("div",{className:"flex items-center justify-between gap-2 pt-3 px-3 sm:px-6",children:[r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("div",{className:"size-10 flex items-center justify-center rounded-full bg-white",children:r.jsx(Y,{icon:"bank",color:"slategray"})}),r.jsx(j,{variant:"subtitle2",text:t,color:"white"})]}),M&&r.jsx(j,{variant:"subtitle2",text:n,color:"white"}),r.jsxs("div",{className:"flex items-center gap-2",children:[l&&r.jsx(g3,{...l,size:"sm"}),i&&r.jsx(s4,{variant:"outlined",text:i,state:m,size:"xs"}),a&&r.jsx(Y,{icon:"delete",color:"white",onClick:d})]})]}),r.jsx("div",{className:"mt-2 mb-3 sm:mt-3 sm:mb-4 border-b border-dashed border-slateGray"}),r.jsxs("div",{className:"px-3 sm:px-6 pb-3",children:[s.map(b=>r.jsx("div",{children:w(b)},b.label)),y&&r.jsx("div",{className:"flex justify-center pt-1",children:r.jsx("div",{className:"w-full sm:w-auto flex justify-center sm:justify-end",children:r.jsx("img",{src:o,alt:"QR",className:"w-24 h-24 md:w-36 md:h-36 object-contain bg-white"})})})]}),C&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"mb-3 sm:mb-4 border-b border-dashed border-slateGray"}),r.jsxs("div",{className:"px-3 sm:px-6 pb-4",children:[r.jsx(j,{variant:"subtitle2",text:"Remark",color:"white"}),r.jsx(j,{variant:"caption",text:c||"-",color:"white"})]})]})]})};exports.AdminBetSlip=Re;exports.Avatar=n3;exports.BankingDetailsCard=Rt;exports.BannerCard=_t;exports.BetSlip=Te;exports.BetSlipModal=Xe;exports.Button=o1;exports.CHIP_STATE_MAP=e6;exports.Checkbox=A2;exports.Chip=s4;exports.CommonMarketHeader=A5;exports.CommonMarketRow=o0;exports.DatePicker=l8;exports.Dropdown=C8;exports.EventCard=l0;exports.EventDisplayCard=Le;exports.EventInfoCard=i0;exports.FileUploader=Ue;exports.FlashNotification=Qe;exports.Icon=Y;exports.ImageCard=Dt;exports.InputField=W4;exports.Loader=Me;exports.MaintenancePage=De;exports.Menu=ze;exports.Modal=m8;exports.MultiSelectDropdown=Se;exports.NotFoundPage=_e;exports.NotificationBanner=Fe;exports.NullState=O5;exports.Pagination=j8;exports.PasswordFieldGroup=y8;exports.PaymentStatus=r4;exports.PhoneNumberInput=We;exports.ProgressBar=Ge;exports.RadioGroup=Pe;exports.SearchBar=M8;exports.Skeleton=P2;exports.SnackbarProvider=Oe;exports.StatsList=b8;exports.StatusDisplayCard=ye;exports.Swiper=$e;exports.TabList=we;exports.Table=xe;exports.TimePicker=Ot;exports.TitleBar=ke;exports.Toggle=g3;exports.Tooltip=be;exports.TooltipExt=o2;exports.Typography=j;exports.UserBetSlip=Be;exports.WalletInfo=qe;exports.ZIndexPreview=Ke;exports.snackbar=He;
|
package/dist/index.js
CHANGED
|
@@ -13376,7 +13376,7 @@ const D4 = {
|
|
|
13376
13376
|
] }),
|
|
13377
13377
|
(t === "OtherMarket" || t === "MatchOdds") && /* @__PURE__ */ r.jsxs("div", { className: "flex justify-between border border-b border-brightgray py-1 px-2", children: [
|
|
13378
13378
|
m(),
|
|
13379
|
-
|
|
13379
|
+
/* @__PURE__ */ r.jsx("div", { className: "ml-1 max-[430px]:hidden", children: /* @__PURE__ */ r.jsx(R4, { level: o }) })
|
|
13380
13380
|
] }),
|
|
13381
13381
|
t === "Racing" && /* @__PURE__ */ r.jsxs("div", { className: "flex justify-between border border-b border-brightgray py-1 px-1 md:px-1.5 lg:px-2", children: [
|
|
13382
13382
|
m(),
|
package/package.json
CHANGED
|
@@ -1,61 +1,61 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "sy-ui-lib",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"main": "dist/index.cjs",
|
|
5
|
-
"module": "dist/index.js",
|
|
6
|
-
"types": "dist/index.d.ts",
|
|
7
|
-
"files": ["dist"],
|
|
8
|
-
"exports": {
|
|
9
|
-
".": {
|
|
10
|
-
"import": "./dist/index.js",
|
|
11
|
-
"require": "./dist/index.cjs"
|
|
12
|
-
},
|
|
13
|
-
"./dist/index.css": "./dist/index.css"
|
|
14
|
-
},
|
|
15
|
-
"type": "module",
|
|
16
|
-
"scripts": {
|
|
17
|
-
"lint": "eslint .",
|
|
18
|
-
"preview": "vite preview",
|
|
19
|
-
"storybook": "storybook dev -p 6006",
|
|
20
|
-
"build-storybook": "storybook build",
|
|
21
|
-
"build": "vite build",
|
|
22
|
-
"prepare": "husky"
|
|
23
|
-
},
|
|
24
|
-
"dependencies": {
|
|
25
|
-
"@tailwindcss/vite": "^4.1.8",
|
|
26
|
-
"@tanstack/react-table": "^8.21.3",
|
|
27
|
-
"react": "^19.1.0",
|
|
28
|
-
"react-day-picker": "^9.7.0",
|
|
29
|
-
"react-dom": "^19.1.0",
|
|
30
|
-
"react-time-picker": "^7.0.0",
|
|
31
|
-
"yarn": "^1.22.22"
|
|
32
|
-
},
|
|
33
|
-
"devDependencies": {
|
|
34
|
-
"@biomejs/biome": "1.9.4",
|
|
35
|
-
"@chromatic-com/storybook": "^4.0.0",
|
|
36
|
-
"@eslint/js": "^9.25.0",
|
|
37
|
-
"@storybook/addon-a11y": "^9.0.4",
|
|
38
|
-
"@storybook/addon-docs": "^9.0.4",
|
|
39
|
-
"@storybook/addon-onboarding": "^9.0.4",
|
|
40
|
-
"@storybook/react-vite": "^9.0.4",
|
|
41
|
-
"@types/node": "^22.15.29",
|
|
42
|
-
"@types/react": "^19.1.6",
|
|
43
|
-
"@types/react-dom": "^19.1.6",
|
|
44
|
-
"@vitejs/plugin-react": "^4.4.1",
|
|
45
|
-
"autoprefixer": "^10.4.21",
|
|
46
|
-
"eslint-plugin-react-hooks": "^5.2.0",
|
|
47
|
-
"eslint-plugin-react-refresh": "^0.4.19",
|
|
48
|
-
"eslint-plugin-storybook": "^9.0.4",
|
|
49
|
-
"globals": "^16.0.0",
|
|
50
|
-
"husky": "^9.1.7",
|
|
51
|
-
"lint-staged": "^16.1.0",
|
|
52
|
-
"playwright": "^1.52.0",
|
|
53
|
-
"postcss": "^8.5.4",
|
|
54
|
-
"storybook": "^9.0.4",
|
|
55
|
-
"tailwindcss": "^4.1.8",
|
|
56
|
-
"typescript": "~5.8.3",
|
|
57
|
-
"typescript-eslint": "^8.30.1",
|
|
58
|
-
"vite": "^6.3.5",
|
|
59
|
-
"vite-plugin-dts": "^4.5.4"
|
|
60
|
-
}
|
|
61
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "sy-ui-lib",
|
|
3
|
+
"version": "1.0.39",
|
|
4
|
+
"main": "dist/index.cjs",
|
|
5
|
+
"module": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"files": ["dist"],
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"import": "./dist/index.js",
|
|
11
|
+
"require": "./dist/index.cjs"
|
|
12
|
+
},
|
|
13
|
+
"./dist/index.css": "./dist/index.css"
|
|
14
|
+
},
|
|
15
|
+
"type": "module",
|
|
16
|
+
"scripts": {
|
|
17
|
+
"lint": "eslint .",
|
|
18
|
+
"preview": "vite preview",
|
|
19
|
+
"storybook": "storybook dev -p 6006",
|
|
20
|
+
"build-storybook": "storybook build",
|
|
21
|
+
"build": "vite build",
|
|
22
|
+
"prepare": "husky"
|
|
23
|
+
},
|
|
24
|
+
"dependencies": {
|
|
25
|
+
"@tailwindcss/vite": "^4.1.8",
|
|
26
|
+
"@tanstack/react-table": "^8.21.3",
|
|
27
|
+
"react": "^19.1.0",
|
|
28
|
+
"react-day-picker": "^9.7.0",
|
|
29
|
+
"react-dom": "^19.1.0",
|
|
30
|
+
"react-time-picker": "^7.0.0",
|
|
31
|
+
"yarn": "^1.22.22"
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"@biomejs/biome": "1.9.4",
|
|
35
|
+
"@chromatic-com/storybook": "^4.0.0",
|
|
36
|
+
"@eslint/js": "^9.25.0",
|
|
37
|
+
"@storybook/addon-a11y": "^9.0.4",
|
|
38
|
+
"@storybook/addon-docs": "^9.0.4",
|
|
39
|
+
"@storybook/addon-onboarding": "^9.0.4",
|
|
40
|
+
"@storybook/react-vite": "^9.0.4",
|
|
41
|
+
"@types/node": "^22.15.29",
|
|
42
|
+
"@types/react": "^19.1.6",
|
|
43
|
+
"@types/react-dom": "^19.1.6",
|
|
44
|
+
"@vitejs/plugin-react": "^4.4.1",
|
|
45
|
+
"autoprefixer": "^10.4.21",
|
|
46
|
+
"eslint-plugin-react-hooks": "^5.2.0",
|
|
47
|
+
"eslint-plugin-react-refresh": "^0.4.19",
|
|
48
|
+
"eslint-plugin-storybook": "^9.0.4",
|
|
49
|
+
"globals": "^16.0.0",
|
|
50
|
+
"husky": "^9.1.7",
|
|
51
|
+
"lint-staged": "^16.1.0",
|
|
52
|
+
"playwright": "^1.52.0",
|
|
53
|
+
"postcss": "^8.5.4",
|
|
54
|
+
"storybook": "^9.0.4",
|
|
55
|
+
"tailwindcss": "^4.1.8",
|
|
56
|
+
"typescript": "~5.8.3",
|
|
57
|
+
"typescript-eslint": "^8.30.1",
|
|
58
|
+
"vite": "^6.3.5",
|
|
59
|
+
"vite-plugin-dts": "^4.5.4"
|
|
60
|
+
}
|
|
61
|
+
}
|