sy-ui-lib 1.0.17 → 1.0.18
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 +2 -2
- package/dist/index.js +7 -3
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -25,7 +25,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
25
25
|
${f?"w-full":""}
|
|
26
26
|
${m?d?"":C6[t]:d?"":l6[t]}
|
|
27
27
|
${s?c6:`${i6[n]} hover:brightness-85`}
|
|
28
|
-
`,p=s?"neutralGray":u??p3[n],y=m?24:void 0,M=u??(m?a6[n]:p3[n]);return o.jsx("button",{type:"button",className:x,disabled:s||c,onClick:l,...h,children:c?o.jsxs(o.Fragment,{children:[o.jsx(q,{icon:"loader",color:M,className:"animate-spin",size:t==="extraSmall"?16:y}),r&&o.jsx(j,{variant:t==="extraSmall"?"caption":"subtitle2",text:r,color:p,component:"span"})]}):o.jsxs(o.Fragment,{children:[a&&o.jsx(J4,{size:"sm",...a}),i&&r&&C==="left"&&o.jsx(q,{icon:i,size:t==="extraSmall"?16:y,color:s?"neutralGray":M,cursorPointer:!s}),r&&o.jsx(j,{variant:t==="extraSmall"?"caption":"subtitle2",text:r,color:p,component:"span"}),i&&(!r||C==="right")&&o.jsx(q,{icon:i,size:t==="extraSmall"?16:y,color:s?"neutralGray":M,cursorPointer:!s})]})})},J3=6048e5,u6=864e5,x3=Symbol.for("constructDateFrom");function p1(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&x3 in e?e[x3](t):e instanceof Date?new e.constructor(t):new Date(t)}function n1(e,t){return p1(t||e,e)}function e5(e,t,n){const r=n1(e,n==null?void 0:n.in);return isNaN(t)?p1(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function t5(e,t,n){const r=n1(e,n==null?void 0:n.in);if(isNaN(t))return p1(e,NaN);if(!t)return r;const s=r.getDate(),i=p1(e,r.getTime());i.setMonth(r.getMonth()+t+1,0);const a=i.getDate();return s>=a?i:(r.setFullYear(i.getFullYear(),i.getMonth(),s),r)}let d6={};function A2(){return d6}function j2(e,t){var l,C,c,u;const n=A2(),r=(t==null?void 0:t.weekStartsOn)??((C=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:C.weekStartsOn)??n.weekStartsOn??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.weekStartsOn)??0,s=n1(e,t==null?void 0:t.in),i=s.getDay(),a=(i<r?7:0)+i-r;return s.setDate(s.getDate()-a),s.setHours(0,0,0,0),s}function B2(e,t){return j2(e,{...t,weekStartsOn:1})}function n5(e,t){const n=n1(e,t==null?void 0:t.in),r=n.getFullYear(),s=p1(n,0);s.setFullYear(r+1,0,4),s.setHours(0,0,0,0);const i=B2(s),a=p1(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const l=B2(a);return n.getTime()>=i.getTime()?r+1:n.getTime()>=l.getTime()?r:r-1}function v3(e){const t=n1(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function M2(e,...t){const n=p1.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function $2(e,t){const n=n1(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function e3(e,t,n){const[r,s]=M2(n==null?void 0:n.in,e,t),i=$2(r),a=$2(s),l=+i-v3(i),C=+a-v3(a);return Math.round((l-C)/u6)}function f6(e,t){const n=n5(e,t),r=p1(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),B2(r)}function h6(e,t,n){return e5(e,t*7,n)}function g6(e,t,n){return t5(e,t*12,n)}function m6(e,t){let n,r=t==null?void 0:t.in;return e.forEach(s=>{!r&&typeof s=="object"&&(r=p1.bind(null,s));const i=n1(s,r);(!n||n<i||isNaN(+i))&&(n=i)}),p1(r,n||NaN)}function p6(e,t){let n,r=t==null?void 0:t.in;return e.forEach(s=>{!r&&typeof s=="object"&&(r=p1.bind(null,s));const i=n1(s,r);(!n||n>i||isNaN(+i))&&(n=i)}),p1(r,n||NaN)}function x6(e,t,n){const[r,s]=M2(n==null?void 0:n.in,e,t);return+$2(r)==+$2(s)}function r5(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function v6(e){return!(!r5(e)&&typeof e!="number"||isNaN(+n1(e)))}function o5(e,t,n){const[r,s]=M2(n==null?void 0:n.in,e,t),i=r.getFullYear()-s.getFullYear(),a=r.getMonth()-s.getMonth();return i*12+a}function w6(e,t){const n=n1(e,t==null?void 0:t.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function s5(e,t){const[n,r]=M2(e,t.start,t.end);return{start:n,end:r}}function y6(e,t){const{start:n,end:r}=s5(t==null?void 0:t.in,e);let s=+n>+r;const i=s?+n:+r,a=s?r:n;a.setHours(0,0,0,0),a.setDate(1);let l=1;const C=[];for(;+a<=i;)C.push(p1(n,a)),a.setMonth(a.getMonth()+l);return s?C.reverse():C}function j6(e,t){const n=n1(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function M6(e,t){const n=n1(e,t==null?void 0:t.in),r=n.getFullYear();return n.setFullYear(r+1,0,0),n.setHours(23,59,59,999),n}function i5(e,t){const n=n1(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function b6(e,t){const{start:n,end:r}=s5(t==null?void 0:t.in,e);let s=+n>+r;const i=s?+n:+r,a=s?r:n;a.setHours(0,0,0,0),a.setMonth(0,1);let l=1;const C=[];for(;+a<=i;)C.push(p1(n,a)),a.setFullYear(a.getFullYear()+l);return s?C.reverse():C}function a5(e,t){var l,C,c,u;const n=A2(),r=(t==null?void 0:t.weekStartsOn)??((C=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:C.weekStartsOn)??n.weekStartsOn??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.weekStartsOn)??0,s=n1(e,t==null?void 0:t.in),i=s.getDay(),a=(i<r?-7:0)+6-(i-r);return s.setDate(s.getDate()+a),s.setHours(23,59,59,999),s}function L6(e,t){return a5(e,{...t,weekStartsOn:1})}const S6={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},k6=(e,t,n)=>{let r;const s=S6[e];return typeof s=="string"?r=s:t===1?r=s.one:r=s.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function f4(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const N6={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},H6={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},V6={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},E6={date:f4({formats:N6,defaultWidth:"full"}),time:f4({formats:H6,defaultWidth:"full"}),dateTime:f4({formats:V6,defaultWidth:"full"})},O6={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Z6=(e,t,n,r)=>O6[e];function E2(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let s;if(r==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,l=n!=null&&n.width?String(n.width):a;s=e.formattingValues[l]||e.formattingValues[a]}else{const a=e.defaultWidth,l=n!=null&&n.width?String(n.width):e.defaultWidth;s=e.values[l]||e.values[a]}const i=e.argumentCallback?e.argumentCallback(t):t;return s[i]}}const _6={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},D6={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},R6={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},P6={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},F6={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},B6={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},$6=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},T6={ordinalNumber:$6,era:E2({values:_6,defaultWidth:"wide"}),quarter:E2({values:D6,defaultWidth:"wide",argumentCallback:e=>e-1}),month:E2({values:R6,defaultWidth:"wide"}),day:E2({values:P6,defaultWidth:"wide"}),dayPeriod:E2({values:F6,defaultWidth:"wide",formattingValues:B6,defaultFormattingWidth:"wide"})};function O2(e){return(t,n={})=>{const r=n.width,s=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(s);if(!i)return null;const a=i[0],l=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],C=Array.isArray(l)?A6(l,f=>f.test(a)):I6(l,f=>f.test(a));let c;c=e.valueCallback?e.valueCallback(C):C,c=n.valueCallback?n.valueCallback(c):c;const u=t.slice(a.length);return{value:c,rest:u}}}function I6(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function A6(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function W6(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const s=r[0],i=t.match(e.parsePattern);if(!i)return null;let a=e.valueCallback?e.valueCallback(i[0]):i[0];a=n.valueCallback?n.valueCallback(a):a;const l=t.slice(s.length);return{value:a,rest:l}}}const Y6=/^(\d+)(th|st|nd|rd)?/i,z6=/\d+/i,G6={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},q6={any:[/^b/i,/^(a|c)/i]},U6={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},K6={any:[/1/i,/2/i,/3/i,/4/i]},X6={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Q6={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},J6={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},ee={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},te={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},ne={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},re={ordinalNumber:W6({matchPattern:Y6,parsePattern:z6,valueCallback:e=>parseInt(e,10)}),era:O2({matchPatterns:G6,defaultMatchWidth:"wide",parsePatterns:q6,defaultParseWidth:"any"}),quarter:O2({matchPatterns:U6,defaultMatchWidth:"wide",parsePatterns:K6,defaultParseWidth:"any",valueCallback:e=>e+1}),month:O2({matchPatterns:X6,defaultMatchWidth:"wide",parsePatterns:Q6,defaultParseWidth:"any"}),day:O2({matchPatterns:J6,defaultMatchWidth:"wide",parsePatterns:ee,defaultParseWidth:"any"}),dayPeriod:O2({matchPatterns:te,defaultMatchWidth:"any",parsePatterns:ne,defaultParseWidth:"any"})},x2={code:"en-US",formatDistance:k6,formatLong:E6,formatRelative:Z6,localize:T6,match:re,options:{weekStartsOn:0,firstWeekContainsDate:1}};function oe(e,t){const n=n1(e,t==null?void 0:t.in);return e3(n,i5(n))+1}function t3(e,t){const n=n1(e,t==null?void 0:t.in),r=+B2(n)-+f6(n);return Math.round(r/J3)+1}function l5(e,t){var u,f,d,h;const n=n1(e,t==null?void 0:t.in),r=n.getFullYear(),s=A2(),i=(t==null?void 0:t.firstWeekContainsDate)??((f=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:f.firstWeekContainsDate)??s.firstWeekContainsDate??((h=(d=s.locale)==null?void 0:d.options)==null?void 0:h.firstWeekContainsDate)??1,a=p1((t==null?void 0:t.in)||e,0);a.setFullYear(r+1,0,i),a.setHours(0,0,0,0);const l=j2(a,t),C=p1((t==null?void 0:t.in)||e,0);C.setFullYear(r,0,i),C.setHours(0,0,0,0);const c=j2(C,t);return+n>=+l?r+1:+n>=+c?r:r-1}function se(e,t){var l,C,c,u;const n=A2(),r=(t==null?void 0:t.firstWeekContainsDate)??((C=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:C.firstWeekContainsDate)??n.firstWeekContainsDate??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.firstWeekContainsDate)??1,s=l5(e,t),i=p1((t==null?void 0:t.in)||e,0);return i.setFullYear(s,0,r),i.setHours(0,0,0,0),j2(i,t)}function n3(e,t){const n=n1(e,t==null?void 0:t.in),r=+j2(n,t)-+se(n,t);return Math.round(r/J3)+1}function t1(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Q1={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return t1(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):t1(n+1,2)},d(e,t){return t1(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return t1(e.getHours()%12||12,t.length)},H(e,t){return t1(e.getHours(),t.length)},m(e,t){return t1(e.getMinutes(),t.length)},s(e,t){return t1(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),s=Math.trunc(r*Math.pow(10,n-3));return t1(s,t.length)}},m2={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},w3={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),s=r>0?r:1-r;return n.ordinalNumber(s,{unit:"year"})}return Q1.y(e,t)},Y:function(e,t,n,r){const s=l5(e,r),i=s>0?s:1-s;if(t==="YY"){const a=i%100;return t1(a,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):t1(i,t.length)},R:function(e,t){const n=n5(e);return t1(n,t.length)},u:function(e,t){const n=e.getFullYear();return t1(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return t1(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return t1(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Q1.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return t1(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const s=n3(e,r);return t==="wo"?n.ordinalNumber(s,{unit:"week"}):t1(s,t.length)},I:function(e,t,n){const r=t3(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):t1(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Q1.d(e,t)},D:function(e,t,n){const r=oe(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):t1(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const s=e.getDay(),i=(s-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return t1(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(s,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(s,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(s,{width:"short",context:"formatting"});case"eeee":default:return n.day(s,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const s=e.getDay(),i=(s-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return t1(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(s,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(s,{width:"narrow",context:"standalone"});case"cccccc":return n.day(s,{width:"short",context:"standalone"});case"cccc":default:return n.day(s,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),s=r===0?7:r;switch(t){case"i":return String(s);case"ii":return t1(s,t.length);case"io":return n.ordinalNumber(s,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const s=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let s;switch(r===12?s=m2.noon:r===0?s=m2.midnight:s=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let s;switch(r>=17?s=m2.evening:r>=12?s=m2.afternoon:r>=4?s=m2.morning:s=m2.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Q1.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Q1.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):t1(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):t1(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Q1.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Q1.s(e,t)},S:function(e,t){return Q1.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return j3(r);case"XXXX":case"XX":return a2(r);case"XXXXX":case"XXX":default:return a2(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return j3(r);case"xxxx":case"xx":return a2(r);case"xxxxx":case"xxx":default:return a2(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+y3(r,":");case"OOOO":default:return"GMT"+a2(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+y3(r,":");case"zzzz":default:return"GMT"+a2(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return t1(r,t.length)},T:function(e,t,n){return t1(+e,t.length)}};function y3(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),s=Math.trunc(r/60),i=r%60;return i===0?n+String(s):n+String(s)+t+t1(i,2)}function j3(e,t){return e%60===0?(e>0?"-":"+")+t1(Math.abs(e)/60,2):a2(e,t)}function a2(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),s=t1(Math.trunc(r/60),2),i=t1(r%60,2);return n+s+t+i}const M3=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},C5=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},ie=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],s=n[2];if(!s)return M3(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;case"PPPP":default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",M3(r,t)).replace("{{time}}",C5(s,t))},ae={p:C5,P:ie},le=/^D+$/,Ce=/^Y+$/,ce=["D","DD","YY","YYYY"];function ue(e){return le.test(e)}function de(e){return Ce.test(e)}function fe(e,t,n){const r=he(e,t,n);if(console.warn(r),ce.includes(e))throw new RangeError(r)}function he(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const ge=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,me=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,pe=/^'([^]*?)'?$/,xe=/''/g,ve=/[a-zA-Z]/;function v2(e,t,n){var u,f,d,h,m,x,p,y;const r=A2(),s=(n==null?void 0:n.locale)??r.locale??x2,i=(n==null?void 0:n.firstWeekContainsDate)??((f=(u=n==null?void 0:n.locale)==null?void 0:u.options)==null?void 0:f.firstWeekContainsDate)??r.firstWeekContainsDate??((h=(d=r.locale)==null?void 0:d.options)==null?void 0:h.firstWeekContainsDate)??1,a=(n==null?void 0:n.weekStartsOn)??((x=(m=n==null?void 0:n.locale)==null?void 0:m.options)==null?void 0:x.weekStartsOn)??r.weekStartsOn??((y=(p=r.locale)==null?void 0:p.options)==null?void 0:y.weekStartsOn)??0,l=n1(e,n==null?void 0:n.in);if(!v6(l))throw new RangeError("Invalid time value");let C=t.match(me).map(M=>{const v=M[0];if(v==="p"||v==="P"){const k=ae[v];return k(M,s.formatLong)}return M}).join("").match(ge).map(M=>{if(M==="''")return{isToken:!1,value:"'"};const v=M[0];if(v==="'")return{isToken:!1,value:we(M)};if(w3[v])return{isToken:!0,value:M};if(v.match(ve))throw new RangeError("Format string contains an unescaped latin alphabet character `"+v+"`");return{isToken:!1,value:M}});s.localize.preprocessor&&(C=s.localize.preprocessor(l,C));const c={firstWeekContainsDate:i,weekStartsOn:a,locale:s};return C.map(M=>{if(!M.isToken)return M.value;const v=M.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&de(v)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&ue(v))&&fe(v,t,String(e));const k=w3[v[0]];return k(l,v,s.localize,c)}).join("")}function we(e){const t=e.match(pe);return t?t[1].replace(xe,"'"):e}function ye(e,t){const n=n1(e,t==null?void 0:t.in),r=n.getFullYear(),s=n.getMonth(),i=p1(n,0);return i.setFullYear(r,s+1,0),i.setHours(0,0,0,0),i.getDate()}function je(e,t){return n1(e,t==null?void 0:t.in).getMonth()}function Me(e,t){return n1(e,t==null?void 0:t.in).getFullYear()}function be(e,t){return+n1(e)>+n1(t)}function Le(e,t){return+n1(e)<+n1(t)}function Se(e,t,n){const[r,s]=M2(n==null?void 0:n.in,e,t);return r.getFullYear()===s.getFullYear()&&r.getMonth()===s.getMonth()}function ke(e,t,n){const[r,s]=M2(n==null?void 0:n.in,e,t);return r.getFullYear()===s.getFullYear()}function Ne(e,t,n){const r=n1(e,n==null?void 0:n.in),s=r.getFullYear(),i=r.getDate(),a=p1(e,0);a.setFullYear(s,t,15),a.setHours(0,0,0,0);const l=ye(a);return r.setMonth(t,Math.min(i,l)),r}function He(e,t,n){const r=n1(e,n==null?void 0:n.in);return isNaN(+r)?p1(e,NaN):(r.setFullYear(t),r)}function Ve(e,t,n="long"){return new Intl.DateTimeFormat("en-US",{hour:"numeric",timeZone:e,timeZoneName:n}).format(t).split(/\s/g).slice(2).join(" ")}const h4={},_2={};function C2(e,t){try{const r=(h4[e]||(h4[e]=new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"longOffset"}).format))(t).split("GMT")[1];return r in _2?_2[r]:b3(r,r.split(":"))}catch{if(e in _2)return _2[e];const n=e==null?void 0:e.match(Ee);return n?b3(e,n.slice(1)):NaN}}const Ee=/([+-]\d\d):?(\d\d)?/;function b3(e,t){const n=+(t[0]||0),r=+(t[1]||0),s=+(t[2]||0)/60;return _2[e]=n*60+r>0?n*60+r+s:n*60-r-s}class I1 extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(C2(this.timeZone,this))?this.setTime(NaN):t.length?typeof t[0]=="number"&&(t.length===1||t.length===2&&typeof t[1]!="number")?this.setTime(t[0]):typeof t[0]=="string"?this.setTime(+new Date(t[0])):t[0]instanceof Date?this.setTime(+t[0]):(this.setTime(+new Date(...t)),c5(this),B4(this)):this.setTime(Date.now())}static tz(t,...n){return n.length?new I1(...n,t):new I1(Date.now(),t)}withTimeZone(t){return new I1(+this,t)}getTimezoneOffset(){const t=-C2(this.timeZone,this);return t>0?Math.floor(t):Math.ceil(t)}setTime(t){return Date.prototype.setTime.apply(this,arguments),B4(this),+this}[Symbol.for("constructDateFrom")](t){return new I1(+new Date(t),this.timeZone)}}const L3=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!L3.test(e))return;const t=e.replace(L3,"$1UTC");I1.prototype[t]&&(e.startsWith("get")?I1.prototype[e]=function(){return this.internal[t]()}:(I1.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),Oe(this),+this},I1.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),B4(this),+this}))});function B4(e){e.internal.setTime(+e),e.internal.setUTCSeconds(e.internal.getUTCSeconds()-Math.round(-C2(e.timeZone,e)*60))}function Oe(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),c5(e)}function c5(e){const t=C2(e.timeZone,e),n=t>0?Math.floor(t):Math.ceil(t),r=new Date(+e);r.setUTCHours(r.getUTCHours()-1);const s=-new Date(+e).getTimezoneOffset(),i=-new Date(+r).getTimezoneOffset(),a=s-i,l=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();a&&l&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+a);const C=s-n;C&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+C);const c=new Date(+e);c.setUTCSeconds(0);const u=s>0?c.getSeconds():(c.getSeconds()-60)%60,f=Math.round(-(C2(e.timeZone,e)*60))%60;(f||u)&&(e.internal.setUTCSeconds(e.internal.getUTCSeconds()+f),Date.prototype.setUTCSeconds.call(e,Date.prototype.getUTCSeconds.call(e)+f+u));const d=C2(e.timeZone,e),h=d>0?Math.floor(d):Math.ceil(d),x=-new Date(+e).getTimezoneOffset()-h,p=h!==n,y=x-C;if(p&&y){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+y);const M=C2(e.timeZone,e),v=M>0?Math.floor(M):Math.ceil(M),k=h-v;k&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+k),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+k))}}class b1 extends I1{static tz(t,...n){return n.length?new b1(...n,t):new b1(Date.now(),t)}toISOString(){const[t,n,r]=this.tzComponents(),s=`${t}${n}:${r}`;return this.internal.toISOString().slice(0,-1)+s}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[t,n,r,s]=this.internal.toUTCString().split(" ");return`${t==null?void 0:t.slice(0,-1)} ${r} ${n} ${s}`}toTimeString(){const t=this.internal.toUTCString().split(" ")[4],[n,r,s]=this.tzComponents();return`${t} GMT${n}${r}${s} (${Ve(this.timeZone,this)})`}toLocaleString(t,n){return Date.prototype.toLocaleString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}toLocaleDateString(t,n){return Date.prototype.toLocaleDateString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}toLocaleTimeString(t,n){return Date.prototype.toLocaleTimeString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}tzComponents(){const t=this.getTimezoneOffset(),n=t>0?"-":"+",r=String(Math.floor(Math.abs(t)/60)).padStart(2,"0"),s=String(Math.abs(t)%60).padStart(2,"0");return[n,r,s]}withTimeZone(t){return new b1(+this,t)}[Symbol.for("constructDateFrom")](t){return new b1(+new Date(t),this.timeZone)}}const S3=5,Ze=4;function _e(e,t){const n=t.startOfMonth(e),r=n.getDay()>0?n.getDay():7,s=t.addDays(e,-r+1),i=t.addDays(s,S3*7-1);return t.getMonth(e)===t.getMonth(i)?S3:Ze}function u5(e,t){const n=t.startOfMonth(e),r=n.getDay();return r===1?n:r===0?t.addDays(n,-6):t.addDays(n,-1*(r-1))}function De(e,t){const n=u5(e,t),r=_e(e,t);return t.addDays(n,r*7-1)}const d5={...x2,labels:{labelDayButton:(e,t,n,r)=>{let s;r&&typeof r.format=="function"?s=r.format.bind(r):s=(a,l)=>v2(a,l,{locale:x2,...n});let i=s(e,"PPPP");return t.today&&(i=`Today, ${i}`),t.selected&&(i=`${i}, selected`),i},labelMonthDropdown:"Choose the Month",labelNext:"Go to the Next Month",labelPrevious:"Go to the Previous Month",labelWeekNumber:e=>`Week ${e}`,labelYearDropdown:"Choose the Year",labelGrid:(e,t,n)=>{let r;return n&&typeof n.format=="function"?r=n.format.bind(n):r=(s,i)=>v2(s,i,{locale:x2,...t}),r(e,"LLLL yyyy")},labelGridcell:(e,t,n,r)=>{let s;r&&typeof r.format=="function"?s=r.format.bind(r):s=(a,l)=>v2(a,l,{locale:x2,...n});let i=s(e,"PPPP");return t!=null&&t.today&&(i=`Today, ${i}`),i},labelNav:"Navigation bar",labelWeekNumberHeader:"Week Number",labelWeekday:(e,t,n)=>{let r;return n&&typeof n.format=="function"?r=n.format.bind(n):r=(s,i)=>v2(s,i,{locale:x2,...t}),r(e,"cccc")}}};class N1{constructor(t,n){this.Date=Date,this.today=()=>{var r;return(r=this.overrides)!=null&&r.today?this.overrides.today():this.options.timeZone?b1.tz(this.options.timeZone):new this.Date},this.newDate=(r,s,i)=>{var a;return(a=this.overrides)!=null&&a.newDate?this.overrides.newDate(r,s,i):this.options.timeZone?new b1(r,s,i,this.options.timeZone):new Date(r,s,i)},this.addDays=(r,s)=>{var i;return(i=this.overrides)!=null&&i.addDays?this.overrides.addDays(r,s):e5(r,s)},this.addMonths=(r,s)=>{var i;return(i=this.overrides)!=null&&i.addMonths?this.overrides.addMonths(r,s):t5(r,s)},this.addWeeks=(r,s)=>{var i;return(i=this.overrides)!=null&&i.addWeeks?this.overrides.addWeeks(r,s):h6(r,s)},this.addYears=(r,s)=>{var i;return(i=this.overrides)!=null&&i.addYears?this.overrides.addYears(r,s):g6(r,s)},this.differenceInCalendarDays=(r,s)=>{var i;return(i=this.overrides)!=null&&i.differenceInCalendarDays?this.overrides.differenceInCalendarDays(r,s):e3(r,s)},this.differenceInCalendarMonths=(r,s)=>{var i;return(i=this.overrides)!=null&&i.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(r,s):o5(r,s)},this.eachMonthOfInterval=r=>{var s;return(s=this.overrides)!=null&&s.eachMonthOfInterval?this.overrides.eachMonthOfInterval(r):y6(r)},this.eachYearOfInterval=r=>{var l;const s=(l=this.overrides)!=null&&l.eachYearOfInterval?this.overrides.eachYearOfInterval(r):b6(r),i=new Set(s.map(C=>this.getYear(C)));if(i.size===s.length)return s;const a=[];return i.forEach(C=>{a.push(new Date(C,0,1))}),a},this.endOfBroadcastWeek=r=>{var s;return(s=this.overrides)!=null&&s.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(r):De(r,this)},this.endOfISOWeek=r=>{var s;return(s=this.overrides)!=null&&s.endOfISOWeek?this.overrides.endOfISOWeek(r):L6(r)},this.endOfMonth=r=>{var s;return(s=this.overrides)!=null&&s.endOfMonth?this.overrides.endOfMonth(r):w6(r)},this.endOfWeek=(r,s)=>{var i;return(i=this.overrides)!=null&&i.endOfWeek?this.overrides.endOfWeek(r,s):a5(r,this.options)},this.endOfYear=r=>{var s;return(s=this.overrides)!=null&&s.endOfYear?this.overrides.endOfYear(r):M6(r)},this.format=(r,s,i)=>{var l;const a=(l=this.overrides)!=null&&l.format?this.overrides.format(r,s,this.options):v2(r,s,this.options);return this.options.numerals&&this.options.numerals!=="latn"?this.replaceDigits(a):a},this.getISOWeek=r=>{var s;return(s=this.overrides)!=null&&s.getISOWeek?this.overrides.getISOWeek(r):t3(r)},this.getMonth=(r,s)=>{var i;return(i=this.overrides)!=null&&i.getMonth?this.overrides.getMonth(r,this.options):je(r,this.options)},this.getYear=(r,s)=>{var i;return(i=this.overrides)!=null&&i.getYear?this.overrides.getYear(r,this.options):Me(r,this.options)},this.getWeek=(r,s)=>{var i;return(i=this.overrides)!=null&&i.getWeek?this.overrides.getWeek(r,this.options):n3(r,this.options)},this.isAfter=(r,s)=>{var i;return(i=this.overrides)!=null&&i.isAfter?this.overrides.isAfter(r,s):be(r,s)},this.isBefore=(r,s)=>{var i;return(i=this.overrides)!=null&&i.isBefore?this.overrides.isBefore(r,s):Le(r,s)},this.isDate=r=>{var s;return(s=this.overrides)!=null&&s.isDate?this.overrides.isDate(r):r5(r)},this.isSameDay=(r,s)=>{var i;return(i=this.overrides)!=null&&i.isSameDay?this.overrides.isSameDay(r,s):x6(r,s)},this.isSameMonth=(r,s)=>{var i;return(i=this.overrides)!=null&&i.isSameMonth?this.overrides.isSameMonth(r,s):Se(r,s)},this.isSameYear=(r,s)=>{var i;return(i=this.overrides)!=null&&i.isSameYear?this.overrides.isSameYear(r,s):ke(r,s)},this.max=r=>{var s;return(s=this.overrides)!=null&&s.max?this.overrides.max(r):m6(r)},this.min=r=>{var s;return(s=this.overrides)!=null&&s.min?this.overrides.min(r):p6(r)},this.setMonth=(r,s)=>{var i;return(i=this.overrides)!=null&&i.setMonth?this.overrides.setMonth(r,s):Ne(r,s)},this.setYear=(r,s)=>{var i;return(i=this.overrides)!=null&&i.setYear?this.overrides.setYear(r,s):He(r,s)},this.startOfBroadcastWeek=(r,s)=>{var i;return(i=this.overrides)!=null&&i.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(r,this):u5(r,this)},this.startOfDay=r=>{var s;return(s=this.overrides)!=null&&s.startOfDay?this.overrides.startOfDay(r):$2(r)},this.startOfISOWeek=r=>{var s;return(s=this.overrides)!=null&&s.startOfISOWeek?this.overrides.startOfISOWeek(r):B2(r)},this.startOfMonth=r=>{var s;return(s=this.overrides)!=null&&s.startOfMonth?this.overrides.startOfMonth(r):j6(r)},this.startOfWeek=(r,s)=>{var i;return(i=this.overrides)!=null&&i.startOfWeek?this.overrides.startOfWeek(r,this.options):j2(r,this.options)},this.startOfYear=r=>{var s;return(s=this.overrides)!=null&&s.startOfYear?this.overrides.startOfYear(r):i5(r)},this.options={locale:d5,...t},this.overrides=n}getDigitMap(){const{numerals:t="latn"}=this.options,n=new Intl.NumberFormat("en-US",{numberingSystem:t}),r={};for(let s=0;s<10;s++)r[s.toString()]=n.format(s);return r}replaceDigits(t){const n=this.getDigitMap();return t.replace(/\d/g,r=>n[r]||r)}formatNumber(t){return this.replaceDigits(t.toString())}getMonthYearOrder(){var n;const t=(n=this.options.locale)==null?void 0:n.code;return t&&N1.yearFirstLocales.has(t)?"year-first":"month-first"}formatMonthYear(t){const{locale:n,timeZone:r,numerals:s}=this.options,i=n==null?void 0:n.code;if(i&&N1.yearFirstLocales.has(i))try{return new Intl.DateTimeFormat(i,{month:"long",year:"numeric",timeZone:r,numberingSystem:s}).format(t)}catch{}const a=this.getMonthYearOrder()==="year-first"?"y LLLL":"LLLL y";return this.format(t,a)}}N1.yearFirstLocales=new Set(["eu","hu","ja","ja-Hira","ja-JP","ko","ko-KR","lt","lt-LT","lv","lv-LV","mn","mn-MN","zh","zh-CN","zh-HK","zh-TW"]);const A1=new N1;class f5{constructor(t,n,r=A1){this.date=t,this.displayMonth=n,this.outside=!!(n&&!r.isSameMonth(t,n)),this.dateLib=r,this.isoDate=r.format(t,"yyyy-MM-dd"),this.displayMonthId=r.format(n,"yyyy-MM"),this.dateMonthId=r.format(t,"yyyy-MM")}isEqualTo(t){return this.dateLib.isSameDay(t.date,this.date)&&this.dateLib.isSameMonth(t.displayMonth,this.displayMonth)}}class Re{constructor(t,n){this.date=t,this.weeks=n}}class Pe{constructor(t,n){this.days=n,this.weekNumber=t}}function Fe(e){return g.createElement("button",{...e})}function Be(e){return g.createElement("span",{...e})}function $e(e){const{size:t=24,orientation:n="left",className:r}=e;return g.createElement("svg",{className:r,width:t,height:t,viewBox:"0 0 24 24"},n==="up"&&g.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),n==="down"&&g.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),n==="left"&&g.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),n==="right"&&g.createElement("polygon",{points:"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"}))}function Te(e){const{day:t,modifiers:n,...r}=e;return g.createElement("td",{...r})}function Ie(e){const{day:t,modifiers:n,...r}=e,s=g.useRef(null);return g.useEffect(()=>{var i;n.focused&&((i=s.current)==null||i.focus())},[n.focused]),g.createElement("button",{ref:s,...r})}var P;(function(e){e.Root="root",e.Chevron="chevron",e.Day="day",e.DayButton="day_button",e.CaptionLabel="caption_label",e.Dropdowns="dropdowns",e.Dropdown="dropdown",e.DropdownRoot="dropdown_root",e.Footer="footer",e.MonthGrid="month_grid",e.MonthCaption="month_caption",e.MonthsDropdown="months_dropdown",e.Month="month",e.Months="months",e.Nav="nav",e.NextMonthButton="button_next",e.PreviousMonthButton="button_previous",e.Week="week",e.Weeks="weeks",e.Weekday="weekday",e.Weekdays="weekdays",e.WeekNumber="week_number",e.WeekNumberHeader="week_number_header",e.YearsDropdown="years_dropdown"})(P||(P={}));var C1;(function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"})(C1||(C1={}));var R1;(function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"})(R1||(R1={}));var k1;(function(e){e.weeks_before_enter="weeks_before_enter",e.weeks_before_exit="weeks_before_exit",e.weeks_after_enter="weeks_after_enter",e.weeks_after_exit="weeks_after_exit",e.caption_after_enter="caption_after_enter",e.caption_after_exit="caption_after_exit",e.caption_before_enter="caption_before_enter",e.caption_before_exit="caption_before_exit"})(k1||(k1={}));function Ae(e){const{options:t,className:n,components:r,classNames:s,...i}=e,a=[s[P.Dropdown],n].join(" "),l=t==null?void 0:t.find(({value:C})=>C===i.value);return g.createElement("span",{"data-disabled":i.disabled,className:s[P.DropdownRoot]},g.createElement(r.Select,{className:a,...i},t==null?void 0:t.map(({value:C,label:c,disabled:u})=>g.createElement(r.Option,{key:C,value:C,disabled:u},c))),g.createElement("span",{className:s[P.CaptionLabel],"aria-hidden":!0},l==null?void 0:l.label,g.createElement(r.Chevron,{orientation:"down",size:18,className:s[P.Chevron]})))}function We(e){return g.createElement("div",{...e})}function Ye(e){return g.createElement("div",{...e})}function ze(e){const{calendarMonth:t,displayIndex:n,...r}=e;return g.createElement("div",{...r},e.children)}function Ge(e){const{calendarMonth:t,displayIndex:n,...r}=e;return g.createElement("div",{...r})}function qe(e){return g.createElement("table",{...e})}function Ue(e){return g.createElement("div",{...e})}const h5=g.createContext(void 0);function W2(){const e=g.useContext(h5);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function Ke(e){const{components:t}=W2();return g.createElement(t.Dropdown,{...e})}function Xe(e){const{onPreviousClick:t,onNextClick:n,previousMonth:r,nextMonth:s,...i}=e,{components:a,classNames:l,labels:{labelPrevious:C,labelNext:c}}=W2(),u=g.useCallback(d=>{s&&(n==null||n(d))},[s,n]),f=g.useCallback(d=>{r&&(t==null||t(d))},[r,t]);return g.createElement("nav",{...i},g.createElement(a.PreviousMonthButton,{type:"button",className:l[P.PreviousMonthButton],tabIndex:r?void 0:-1,"aria-disabled":r?void 0:!0,"aria-label":C(r),onClick:f},g.createElement(a.Chevron,{disabled:r?void 0:!0,className:l[P.Chevron],orientation:"left"})),g.createElement(a.NextMonthButton,{type:"button",className:l[P.NextMonthButton],tabIndex:s?void 0:-1,"aria-disabled":s?void 0:!0,"aria-label":c(s),onClick:u},g.createElement(a.Chevron,{disabled:s?void 0:!0,orientation:"right",className:l[P.Chevron]})))}function Qe(e){const{components:t}=W2();return g.createElement(t.Button,{...e})}function Je(e){return g.createElement("option",{...e})}function e9(e){const{components:t}=W2();return g.createElement(t.Button,{...e})}function t9(e){const{rootRef:t,...n}=e;return g.createElement("div",{...n,ref:t})}function n9(e){return g.createElement("select",{...e})}function r9(e){const{week:t,...n}=e;return g.createElement("tr",{...n})}function o9(e){return g.createElement("th",{...e})}function s9(e){return g.createElement("thead",{"aria-hidden":!0},g.createElement("tr",{...e}))}function i9(e){const{week:t,...n}=e;return g.createElement("th",{...n})}function a9(e){return g.createElement("th",{...e})}function l9(e){return g.createElement("tbody",{...e})}function C9(e){const{components:t}=W2();return g.createElement(t.Dropdown,{...e})}const c9=Object.freeze(Object.defineProperty({__proto__:null,Button:Fe,CaptionLabel:Be,Chevron:$e,Day:Te,DayButton:Ie,Dropdown:Ae,DropdownNav:We,Footer:Ye,Month:ze,MonthCaption:Ge,MonthGrid:qe,Months:Ue,MonthsDropdown:Ke,Nav:Xe,NextMonthButton:Qe,Option:Je,PreviousMonthButton:e9,Root:t9,Select:n9,Week:r9,WeekNumber:i9,WeekNumberHeader:a9,Weekday:o9,Weekdays:s9,Weeks:l9,YearsDropdown:C9},Symbol.toStringTag,{value:"Module"}));function G1(e,t,n=!1,r=A1){let{from:s,to:i}=e;const{differenceInCalendarDays:a,isSameDay:l}=r;return s&&i?(a(i,s)<0&&([s,i]=[i,s]),a(t,s)>=(n?1:0)&&a(i,t)>=(n?1:0)):!n&&i?l(i,t):!n&&s?l(s,t):!1}function r3(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function r4(e){return!!(e&&typeof e=="object"&&"from"in e)}function o3(e){return!!(e&&typeof e=="object"&&"after"in e)}function s3(e){return!!(e&&typeof e=="object"&&"before"in e)}function g5(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function m5(e,t){return Array.isArray(e)&&e.every(t.isDate)}function q1(e,t,n=A1){const r=Array.isArray(t)?t:[t],{isSameDay:s,differenceInCalendarDays:i,isAfter:a}=n;return r.some(l=>{if(typeof l=="boolean")return l;if(n.isDate(l))return s(e,l);if(m5(l,n))return l.some(C=>s(e,C));if(r4(l))return G1(l,e,!1,n);if(g5(l))return Array.isArray(l.dayOfWeek)?l.dayOfWeek.includes(e.getDay()):l.dayOfWeek===e.getDay();if(r3(l)){const C=i(l.before,e),c=i(l.after,e),u=C>0,f=c<0;return a(l.before,l.after)?f&&u:u||f}return o3(l)?i(e,l.after)>0:s3(l)?i(l.before,e)>0:typeof l=="function"?l(e):!1})}function u9(e,t,n,r,s){const{disabled:i,hidden:a,modifiers:l,showOutsideDays:C,broadcastCalendar:c,today:u=s.today()}=t,{isSameDay:f,isSameMonth:d,startOfMonth:h,isBefore:m,endOfMonth:x,isAfter:p}=s,y=n&&h(n),M=r&&x(r),v={[C1.focused]:[],[C1.outside]:[],[C1.disabled]:[],[C1.hidden]:[],[C1.today]:[]},k={};for(const b of e){const{date:w,displayMonth:N}=b,L=!!(N&&!d(w,N)),E=!!(y&&m(w,y)),H=!!(M&&p(w,M)),Z=!!(i&&q1(w,i,s)),V=!!(a&&q1(w,a,s))||E||H||!c&&!C&&L||c&&C===!1&&L,F=f(w,u);L&&v.outside.push(b),Z&&v.disabled.push(b),V&&v.hidden.push(b),F&&v.today.push(b),l&&Object.keys(l).forEach(z=>{const W=l==null?void 0:l[z];W&&q1(w,W,s)&&(k[z]?k[z].push(b):k[z]=[b])})}return b=>{const w={[C1.focused]:!1,[C1.disabled]:!1,[C1.hidden]:!1,[C1.outside]:!1,[C1.today]:!1},N={};for(const L in v){const E=v[L];w[L]=E.some(H=>H===b)}for(const L in k)N[L]=k[L].some(E=>E===b);return{...w,...N}}}function d9(e,t,n={}){return Object.entries(e).filter(([,s])=>s===!0).reduce((s,[i])=>(n[i]?s.push(n[i]):t[C1[i]]?s.push(t[C1[i]]):t[R1[i]]&&s.push(t[R1[i]]),s),[t[P.Day]])}function f9(e){return{...c9,...e}}function h9(e){const t={"data-mode":e.mode??void 0,"data-required":"required"in e?e.required:void 0,"data-multiple-months":e.numberOfMonths&&e.numberOfMonths>1||void 0,"data-week-numbers":e.showWeekNumber||void 0,"data-broadcast-calendar":e.broadcastCalendar||void 0,"data-nav-layout":e.navLayout||void 0};return Object.entries(e).forEach(([n,r])=>{n.startsWith("data-")&&(t[n]=r)}),t}function g9(){const e={};for(const t in P)e[P[t]]=`rdp-${P[t]}`;for(const t in C1)e[C1[t]]=`rdp-${C1[t]}`;for(const t in R1)e[R1[t]]=`rdp-${R1[t]}`;for(const t in k1)e[k1[t]]=`rdp-${k1[t]}`;return e}function p5(e,t,n){return(n??new N1(t)).formatMonthYear(e)}const m9=p5;function p9(e,t,n){return(n??new N1(t)).format(e,"d")}function x9(e,t=A1){return t.format(e,"LLLL")}function v9(e,t,n){return(n??new N1(t)).format(e,"cccccc")}function w9(e,t=A1){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function y9(){return""}function x5(e,t=A1){return t.format(e,"yyyy")}const j9=x5,M9=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:p5,formatDay:p9,formatMonthCaption:m9,formatMonthDropdown:x9,formatWeekNumber:w9,formatWeekNumberHeader:y9,formatWeekdayName:v9,formatYearCaption:j9,formatYearDropdown:x5},Symbol.toStringTag,{value:"Module"}));function b9(e){return e!=null&&e.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),e!=null&&e.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{...M9,...e}}function i3(e,t,n,r){let s=(r??new N1(n)).format(e,"PPPP");return t.today&&(s=`Today, ${s}`),t.selected&&(s=`${s}, selected`),s}const L9=i3;function a3(e,t,n){return(n??new N1(t)).formatMonthYear(e)}const S9=a3;function v5(e,t,n,r){let s=(r??new N1(n)).format(e,"PPPP");return t!=null&&t.today&&(s=`Today, ${s}`),s}function w5(e){return"Choose the Month"}function y5(){return""}const k9="Go to the Next Month";function j5(e,t){return k9}function M5(e){return"Go to the Previous Month"}function b5(e,t,n){return(n??new N1(t)).format(e,"cccc")}function L5(e,t){return`Week ${e}`}function S5(e){return"Week Number"}function k5(e){return"Choose the Year"}const N9=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:S9,labelDay:L9,labelDayButton:i3,labelGrid:a3,labelGridcell:v5,labelMonthDropdown:w5,labelNav:y5,labelNext:j5,labelPrevious:M5,labelWeekNumber:L5,labelWeekNumberHeader:S5,labelWeekday:b5,labelYearDropdown:k5},Symbol.toStringTag,{value:"Module"})),D1=(e,t,n)=>t||(n?typeof n=="function"?n:(...r)=>n:e);function H9(e,t){var r;const n=((r=t.locale)==null?void 0:r.labels)??{};return{...N9,...e??{},labelDayButton:D1(i3,e==null?void 0:e.labelDayButton,n.labelDayButton),labelMonthDropdown:D1(w5,e==null?void 0:e.labelMonthDropdown,n.labelMonthDropdown),labelNext:D1(j5,e==null?void 0:e.labelNext,n.labelNext),labelPrevious:D1(M5,e==null?void 0:e.labelPrevious,n.labelPrevious),labelWeekNumber:D1(L5,e==null?void 0:e.labelWeekNumber,n.labelWeekNumber),labelYearDropdown:D1(k5,e==null?void 0:e.labelYearDropdown,n.labelYearDropdown),labelGrid:D1(a3,e==null?void 0:e.labelGrid,n.labelGrid),labelGridcell:D1(v5,e==null?void 0:e.labelGridcell,n.labelGridcell),labelNav:D1(y5,e==null?void 0:e.labelNav,n.labelNav),labelWeekNumberHeader:D1(S5,e==null?void 0:e.labelWeekNumberHeader,n.labelWeekNumberHeader),labelWeekday:D1(b5,e==null?void 0:e.labelWeekday,n.labelWeekday)}}function V9(e,t,n,r,s){const{startOfMonth:i,startOfYear:a,endOfYear:l,eachMonthOfInterval:C,getMonth:c}=s;return C({start:a(e),end:l(e)}).map(d=>{const h=r.formatMonthDropdown(d,s),m=c(d),x=t&&d<i(t)||n&&d>i(n)||!1;return{value:m,label:h,disabled:x}})}function E9(e,t={},n={}){let r={...t==null?void 0:t[P.Day]};return Object.entries(e).filter(([,s])=>s===!0).forEach(([s])=>{r={...r,...n==null?void 0:n[s]}}),r}function O9(e,t,n,r){const s=r??e.today(),i=n?e.startOfBroadcastWeek(s,e):t?e.startOfISOWeek(s):e.startOfWeek(s),a=[];for(let l=0;l<7;l++){const C=e.addDays(i,l);a.push(C)}return a}function Z9(e,t,n,r,s=!1){if(!e||!t)return;const{startOfYear:i,endOfYear:a,eachYearOfInterval:l,getYear:C}=r,c=i(e),u=a(t),f=l({start:c,end:u});return s&&f.reverse(),f.map(d=>{const h=n.formatYearDropdown(d,r);return{value:C(d),label:h,disabled:!1}})}function _9(e,t={}){var l;const{weekStartsOn:n,locale:r}=t,s=n??((l=r==null?void 0:r.options)==null?void 0:l.weekStartsOn)??0,i=C=>{const c=typeof C=="number"||typeof C=="string"?new Date(C):C;return new b1(c.getFullYear(),c.getMonth(),c.getDate(),12,0,0,e)},a=C=>{const c=i(C);return new Date(c.getFullYear(),c.getMonth(),c.getDate(),0,0,0,0)};return{today:()=>i(b1.tz(e)),newDate:(C,c,u)=>new b1(C,c,u,12,0,0,e),startOfDay:C=>i(C),startOfWeek:(C,c)=>{const u=i(C),f=(c==null?void 0:c.weekStartsOn)??s,d=(u.getDay()-f+7)%7;return u.setDate(u.getDate()-d),u},startOfISOWeek:C=>{const c=i(C),u=(c.getDay()-1+7)%7;return c.setDate(c.getDate()-u),c},startOfMonth:C=>{const c=i(C);return c.setDate(1),c},startOfYear:C=>{const c=i(C);return c.setMonth(0,1),c},endOfWeek:(C,c)=>{const u=i(C),h=((((c==null?void 0:c.weekStartsOn)??s)+6)%7-u.getDay()+7)%7;return u.setDate(u.getDate()+h),u},endOfISOWeek:C=>{const c=i(C),u=(7-c.getDay())%7;return c.setDate(c.getDate()+u),c},endOfMonth:C=>{const c=i(C);return c.setMonth(c.getMonth()+1,0),c},endOfYear:C=>{const c=i(C);return c.setMonth(11,31),c},eachMonthOfInterval:C=>{const c=i(C.start),u=i(C.end),f=[],d=new b1(c.getFullYear(),c.getMonth(),1,12,0,0,e),h=u.getFullYear()*12+u.getMonth();for(;d.getFullYear()*12+d.getMonth()<=h;)f.push(new b1(d,e)),d.setMonth(d.getMonth()+1,1);return f},addDays:(C,c)=>{const u=i(C);return u.setDate(u.getDate()+c),u},addWeeks:(C,c)=>{const u=i(C);return u.setDate(u.getDate()+c*7),u},addMonths:(C,c)=>{const u=i(C);return u.setMonth(u.getMonth()+c),u},addYears:(C,c)=>{const u=i(C);return u.setFullYear(u.getFullYear()+c),u},eachYearOfInterval:C=>{const c=i(C.start),u=i(C.end),f=[],d=new b1(c.getFullYear(),0,1,12,0,0,e);for(;d.getFullYear()<=u.getFullYear();)f.push(new b1(d,e)),d.setFullYear(d.getFullYear()+1,0,1);return f},getWeek:(C,c)=>{var f;const u=a(C);return n3(u,{weekStartsOn:(c==null?void 0:c.weekStartsOn)??s,firstWeekContainsDate:(c==null?void 0:c.firstWeekContainsDate)??((f=r==null?void 0:r.options)==null?void 0:f.firstWeekContainsDate)??1})},getISOWeek:C=>{const c=a(C);return t3(c)},differenceInCalendarDays:(C,c)=>{const u=a(C),f=a(c);return e3(u,f)},differenceInCalendarMonths:(C,c)=>{const u=a(C),f=a(c);return o5(u,f)}}}const Y2=e=>e instanceof HTMLElement?e:null,g4=e=>[...e.querySelectorAll("[data-animated-month]")??[]],D9=e=>Y2(e.querySelector("[data-animated-month]")),m4=e=>Y2(e.querySelector("[data-animated-caption]")),p4=e=>Y2(e.querySelector("[data-animated-weeks]")),R9=e=>Y2(e.querySelector("[data-animated-nav]")),P9=e=>Y2(e.querySelector("[data-animated-weekdays]"));function F9(e,t,{classNames:n,months:r,focused:s,dateLib:i}){const a=g.useRef(null),l=g.useRef(r),C=g.useRef(!1);g.useLayoutEffect(()=>{const c=l.current;if(l.current=r,!t||!e.current||!(e.current instanceof HTMLElement)||r.length===0||c.length===0||r.length!==c.length)return;const u=i.isSameMonth(r[0].date,c[0].date),f=i.isAfter(r[0].date,c[0].date),d=f?n[k1.caption_after_enter]:n[k1.caption_before_enter],h=f?n[k1.weeks_after_enter]:n[k1.weeks_before_enter],m=a.current,x=e.current.cloneNode(!0);if(x instanceof HTMLElement?(g4(x).forEach(v=>{if(!(v instanceof HTMLElement))return;const k=D9(v);k&&v.contains(k)&&v.removeChild(k);const b=m4(v);b&&b.classList.remove(d);const w=p4(v);w&&w.classList.remove(h)}),a.current=x):a.current=null,C.current||u||s)return;const p=m instanceof HTMLElement?g4(m):[],y=g4(e.current);if(y!=null&&y.every(M=>M instanceof HTMLElement)&&p&&p.every(M=>M instanceof HTMLElement)){C.current=!0,e.current.style.isolation="isolate";const M=R9(e.current);M&&(M.style.zIndex="1"),y.forEach((v,k)=>{const b=p[k];if(!b)return;v.style.position="relative",v.style.overflow="hidden";const w=m4(v);w&&w.classList.add(d);const N=p4(v);N&&N.classList.add(h);const L=()=>{C.current=!1,e.current&&(e.current.style.isolation=""),M&&(M.style.zIndex=""),w&&w.classList.remove(d),N&&N.classList.remove(h),v.style.position="",v.style.overflow="",v.contains(b)&&v.removeChild(b)};b.style.pointerEvents="none",b.style.position="absolute",b.style.overflow="hidden",b.setAttribute("aria-hidden","true");const E=P9(b);E&&(E.style.opacity="0");const H=m4(b);H&&(H.classList.add(f?n[k1.caption_before_exit]:n[k1.caption_after_exit]),H.addEventListener("animationend",L));const Z=p4(b);Z&&Z.classList.add(f?n[k1.weeks_before_exit]:n[k1.weeks_after_exit]),v.insertBefore(b,v.firstChild)})}})}function B9(e,t,n,r){const s=e[0],i=e[e.length-1],{ISOWeek:a,fixedWeeks:l,broadcastCalendar:C}=n??{},{addDays:c,differenceInCalendarDays:u,differenceInCalendarMonths:f,endOfBroadcastWeek:d,endOfISOWeek:h,endOfMonth:m,endOfWeek:x,isAfter:p,startOfBroadcastWeek:y,startOfISOWeek:M,startOfWeek:v}=r,k=C?y(s,r):a?M(s):v(s),b=C?d(i):a?h(m(i)):x(m(i)),w=t&&(C?d(t):a?h(t):x(t)),N=w&&p(b,w)?w:b,L=u(N,k),E=f(i,s)+1,H=[];for(let F=0;F<=L;F++){const z=c(k,F);H.push(z)}const V=(C?35:42)*E;if(l&&H.length<V){const F=V-H.length;for(let z=0;z<F;z++){const W=c(H[H.length-1],1);H.push(W)}}return H}function $9(e){const t=[];return e.reduce((n,r)=>{const s=r.weeks.reduce((i,a)=>i.concat(a.days.slice()),t.slice());return n.concat(s.slice())},t.slice())}function T9(e,t,n,r){const{numberOfMonths:s=1}=n,i=[];for(let a=0;a<s;a++){const l=r.addMonths(e,a);if(t&&l>t)break;i.push(l)}return i}function k3(e,t,n,r){const{month:s,defaultMonth:i,today:a=r.today(),numberOfMonths:l=1}=e;let C=s||i||a;const{differenceInCalendarMonths:c,addMonths:u,startOfMonth:f}=r;if(n&&c(n,C)<l-1){const d=-1*(l-1);C=u(n,d)}return t&&c(C,t)<0&&(C=t),f(C)}function I9(e,t,n,r){const{addDays:s,endOfBroadcastWeek:i,endOfISOWeek:a,endOfMonth:l,endOfWeek:C,getISOWeek:c,getWeek:u,startOfBroadcastWeek:f,startOfISOWeek:d,startOfWeek:h}=r,m=e.reduce((x,p)=>{const y=n.broadcastCalendar?f(p,r):n.ISOWeek?d(p):h(p),M=n.broadcastCalendar?i(p):n.ISOWeek?a(l(p)):C(l(p)),v=t.filter(N=>N>=y&&N<=M),k=n.broadcastCalendar?35:42;if(n.fixedWeeks&&v.length<k){const N=t.filter(L=>{const E=k-v.length;return L>M&&L<=s(M,E)});v.push(...N)}const b=v.reduce((N,L)=>{const E=n.ISOWeek?c(L):u(L),H=N.find(V=>V.weekNumber===E),Z=new f5(L,p,r);return H?H.days.push(Z):N.push(new Pe(E,[Z])),N},[]),w=new Re(p,b);return x.push(w),x},[]);return n.reverseMonths?m.reverse():m}function A9(e,t){let{startMonth:n,endMonth:r}=e;const{startOfYear:s,startOfDay:i,startOfMonth:a,endOfMonth:l,addYears:C,endOfYear:c,newDate:u,today:f}=t,{fromYear:d,toYear:h,fromMonth:m,toMonth:x}=e;!n&&m&&(n=m),!n&&d&&(n=t.newDate(d,0,1)),!r&&x&&(r=x),!r&&h&&(r=u(h,11,31));const p=e.captionLayout==="dropdown"||e.captionLayout==="dropdown-years";return n?n=a(n):d?n=u(d,0,1):!n&&p&&(n=s(C(e.today??f(),-100))),r?r=l(r):h?r=u(h,11,31):!r&&p&&(r=c(e.today??f())),[n&&i(n),r&&i(r)]}function W9(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:s,numberOfMonths:i=1}=n,{startOfMonth:a,addMonths:l,differenceInCalendarMonths:C}=r,c=s?i:1,u=a(e);if(!t)return l(u,c);if(!(C(t,e)<i))return l(u,c)}function Y9(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:s,numberOfMonths:i}=n,{startOfMonth:a,addMonths:l,differenceInCalendarMonths:C}=r,c=s?i??1:1,u=a(e);if(!t)return l(u,-c);if(!(C(u,t)<=0))return l(u,-c)}function z9(e){const t=[];return e.reduce((n,r)=>n.concat(r.weeks.slice()),t.slice())}function o4(e,t){const[n,r]=g.useState(e);return[t===void 0?n:t,r]}function G9(e,t){var k;const[n,r]=A9(e,t),{startOfMonth:s,endOfMonth:i}=t,a=k3(e,n,r,t),[l,C]=o4(a,e.month?a:void 0);g.useEffect(()=>{const b=k3(e,n,r,t);C(b)},[e.timeZone]);const{months:c,weeks:u,days:f,previousMonth:d,nextMonth:h}=g.useMemo(()=>{const b=T9(l,r,{numberOfMonths:e.numberOfMonths},t),w=B9(b,e.endMonth?i(e.endMonth):void 0,{ISOWeek:e.ISOWeek,fixedWeeks:e.fixedWeeks,broadcastCalendar:e.broadcastCalendar},t),N=I9(b,w,{broadcastCalendar:e.broadcastCalendar,fixedWeeks:e.fixedWeeks,ISOWeek:e.ISOWeek,reverseMonths:e.reverseMonths},t),L=z9(N),E=$9(N),H=Y9(l,n,e,t),Z=W9(l,r,e,t);return{months:N,weeks:L,days:E,previousMonth:H,nextMonth:Z}},[t,l.getTime(),r==null?void 0:r.getTime(),n==null?void 0:n.getTime(),e.disableNavigation,e.broadcastCalendar,(k=e.endMonth)==null?void 0:k.getTime(),e.fixedWeeks,e.ISOWeek,e.numberOfMonths,e.pagedNavigation,e.reverseMonths]),{disableNavigation:m,onMonthChange:x}=e,p=b=>u.some(w=>w.days.some(N=>N.isEqualTo(b))),y=b=>{if(m)return;let w=s(b);n&&w<s(n)&&(w=s(n)),r&&w>s(r)&&(w=s(r)),C(w),x==null||x(w)};return{months:c,weeks:u,days:f,navStart:n,navEnd:r,previousMonth:d,nextMonth:h,goToMonth:y,goToDay:b=>{p(b)||y(b.date)}}}var $1;(function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"})($1||($1={}));function N3(e){return!e[C1.disabled]&&!e[C1.hidden]&&!e[C1.outside]}function q9(e,t,n,r){let s,i=-1;for(const a of e){const l=t(a);N3(l)&&(l[C1.focused]&&i<$1.FocusedModifier?(s=a,i=$1.FocusedModifier):r!=null&&r.isEqualTo(a)&&i<$1.LastFocused?(s=a,i=$1.LastFocused):n(a.date)&&i<$1.Selected?(s=a,i=$1.Selected):l[C1.today]&&i<$1.Today&&(s=a,i=$1.Today))}return s||(s=e.find(a=>N3(t(a)))),s}function U9(e,t,n,r,s,i,a){const{ISOWeek:l,broadcastCalendar:C}=i,{addDays:c,addMonths:u,addWeeks:f,addYears:d,endOfBroadcastWeek:h,endOfISOWeek:m,endOfWeek:x,max:p,min:y,startOfBroadcastWeek:M,startOfISOWeek:v,startOfWeek:k}=a;let w={day:c,week:f,month:u,year:d,startOfWeek:N=>C?M(N,a):l?v(N):k(N),endOfWeek:N=>C?h(N):l?m(N):x(N)}[e](n,t==="after"?1:-1);return t==="before"&&r?w=p([r,w]):t==="after"&&s&&(w=y([s,w])),w}function N5(e,t,n,r,s,i,a,l=0){if(l>365)return;const C=U9(e,t,n.date,r,s,i,a),c=!!(i.disabled&&q1(C,i.disabled,a)),u=!!(i.hidden&&q1(C,i.hidden,a)),f=C,d=new f5(C,f,a);return!c&&!u?d:N5(e,t,d,r,s,i,a,l+1)}function K9(e,t,n,r,s){const{autoFocus:i}=e,[a,l]=g.useState(),C=q9(t.days,n,r||(()=>!1),a),[c,u]=g.useState(i?C:void 0);return{isFocusTarget:x=>!!(C!=null&&C.isEqualTo(x)),setFocused:u,focused:c,blur:()=>{l(c),u(void 0)},moveFocus:(x,p)=>{if(!c)return;const y=N5(x,p,c,t.navStart,t.navEnd,e,s);y&&(e.disableNavigation&&!t.days.some(v=>v.isEqualTo(y))||(t.goToDay(y),u(y)))}}}function X9(e,t){const{selected:n,required:r,onSelect:s}=e,[i,a]=o4(n,s?n:void 0),l=s?n:i,{isSameDay:C}=t,c=h=>(l==null?void 0:l.some(m=>C(m,h)))??!1,{min:u,max:f}=e;return{selected:l,select:(h,m,x)=>{let p=[...l??[]];if(c(h)){if((l==null?void 0:l.length)===u||r&&(l==null?void 0:l.length)===1)return;p=l==null?void 0:l.filter(y=>!C(y,h))}else(l==null?void 0:l.length)===f?p=[h]:p=[...p,h];return s||a(p),s==null||s(p,h,m,x),p},isSelected:c}}function Q9(e,t,n=0,r=0,s=!1,i=A1){const{from:a,to:l}=t||{},{isSameDay:C,isAfter:c,isBefore:u}=i;let f;if(!a&&!l)f={from:e,to:n>0?void 0:e};else if(a&&!l)C(a,e)?n===0?f={from:a,to:e}:s?f={from:a,to:void 0}:f=void 0:u(e,a)?f={from:e,to:a}:f={from:a,to:e};else if(a&&l)if(C(a,e)&&C(l,e))s?f={from:a,to:l}:f=void 0;else if(C(a,e))f={from:a,to:n>0?void 0:e};else if(C(l,e))f={from:e,to:n>0?void 0:e};else if(u(e,a))f={from:e,to:l};else if(c(e,a))f={from:a,to:e};else if(c(e,l))f={from:a,to:e};else throw new Error("Invalid range");if(f!=null&&f.from&&(f!=null&&f.to)){const d=i.differenceInCalendarDays(f.to,f.from);r>0&&d>r?f={from:e,to:void 0}:n>1&&d<n&&(f={from:e,to:void 0})}return f}function J9(e,t,n=A1){const r=Array.isArray(t)?t:[t];let s=e.from;const i=n.differenceInCalendarDays(e.to,e.from),a=Math.min(i,6);for(let l=0;l<=a;l++){if(r.includes(s.getDay()))return!0;s=n.addDays(s,1)}return!1}function H3(e,t,n=A1){return G1(e,t.from,!1,n)||G1(e,t.to,!1,n)||G1(t,e.from,!1,n)||G1(t,e.to,!1,n)}function e8(e,t,n=A1){const r=Array.isArray(t)?t:[t];if(r.filter(l=>typeof l!="function").some(l=>typeof l=="boolean"?l:n.isDate(l)?G1(e,l,!1,n):m5(l,n)?l.some(C=>G1(e,C,!1,n)):r4(l)?l.from&&l.to?H3(e,{from:l.from,to:l.to},n):!1:g5(l)?J9(e,l.dayOfWeek,n):r3(l)?n.isAfter(l.before,l.after)?H3(e,{from:n.addDays(l.after,1),to:n.addDays(l.before,-1)},n):q1(e.from,l,n)||q1(e.to,l,n):o3(l)||s3(l)?q1(e.from,l,n)||q1(e.to,l,n):!1))return!0;const a=r.filter(l=>typeof l=="function");if(a.length){let l=e.from;const C=n.differenceInCalendarDays(e.to,e.from);for(let c=0;c<=C;c++){if(a.some(u=>u(l)))return!0;l=n.addDays(l,1)}}return!1}function t8(e,t){const{disabled:n,excludeDisabled:r,selected:s,required:i,onSelect:a}=e,[l,C]=o4(s,a?s:void 0),c=a?s:l;return{selected:c,select:(d,h,m)=>{const{min:x,max:p}=e,y=d?Q9(d,c,x,p,i,t):void 0;return r&&n&&(y!=null&&y.from)&&y.to&&e8({from:y.from,to:y.to},n,t)&&(y.from=d,y.to=void 0),a||C(y),a==null||a(y,d,h,m),y},isSelected:d=>c&&G1(c,d,!1,t)}}function n8(e,t){const{selected:n,required:r,onSelect:s}=e,[i,a]=o4(n,s?n:void 0),l=s?n:i,{isSameDay:C}=t;return{selected:l,select:(f,d,h)=>{let m=f;return!r&&l&&l&&C(f,l)&&(m=void 0),s||a(m),s==null||s(m,f,d,h),m},isSelected:f=>l?C(l,f):!1}}function r8(e,t){const n=n8(e,t),r=X9(e,t),s=t8(e,t);switch(e.mode){case"single":return n;case"multiple":return r;case"range":return s;default:return}}function E1(e,t){return e instanceof b1&&e.timeZone===t?e:new b1(e,t)}function p2(e,t,n){return E1(e,t)}function V3(e,t,n){return typeof e=="boolean"||typeof e=="function"?e:e instanceof Date?p2(e,t):Array.isArray(e)?e.map(r=>r instanceof Date?p2(r,t):r):r4(e)?{...e,from:e.from?E1(e.from,t):e.from,to:e.to?E1(e.to,t):e.to}:r3(e)?{before:p2(e.before,t),after:p2(e.after,t)}:o3(e)?{after:p2(e.after,t)}:s3(e)?{before:p2(e.before,t)}:e}function x4(e,t,n){return e&&(Array.isArray(e)?e.map(r=>V3(r,t)):V3(e,t))}function o8(e){var X1;let t=e;const n=t.timeZone;if(n&&(t={...e,timeZone:n},t.today&&(t.today=E1(t.today,n)),t.month&&(t.month=E1(t.month,n)),t.defaultMonth&&(t.defaultMonth=E1(t.defaultMonth,n)),t.startMonth&&(t.startMonth=E1(t.startMonth,n)),t.endMonth&&(t.endMonth=E1(t.endMonth,n)),t.mode==="single"&&t.selected?t.selected=E1(t.selected,n):t.mode==="multiple"&&t.selected?t.selected=(X1=t.selected)==null?void 0:X1.map(A=>E1(A,n)):t.mode==="range"&&t.selected&&(t.selected={from:t.selected.from?E1(t.selected.from,n):t.selected.from,to:t.selected.to?E1(t.selected.to,n):t.selected.to}),t.disabled!==void 0&&(t.disabled=x4(t.disabled,n)),t.hidden!==void 0&&(t.hidden=x4(t.hidden,n)),t.modifiers)){const A={};Object.keys(t.modifiers).forEach(K=>{var $;A[K]=x4(($=t.modifiers)==null?void 0:$[K],n)}),t.modifiers=A}const{components:r,formatters:s,labels:i,dateLib:a,locale:l,classNames:C}=g.useMemo(()=>{const A={...d5,...t.locale},K=t.broadcastCalendar?1:t.weekStartsOn,$=t.noonSafe&&t.timeZone?_9(t.timeZone,{weekStartsOn:K,locale:A}):void 0,X=t.dateLib&&$?{...$,...t.dateLib}:t.dateLib??$,y1=new N1({locale:A,weekStartsOn:K,firstWeekContainsDate:t.firstWeekContainsDate,useAdditionalWeekYearTokens:t.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:t.useAdditionalDayOfYearTokens,timeZone:t.timeZone,numerals:t.numerals},X);return{dateLib:y1,components:f9(t.components),formatters:b9(t.formatters),labels:H9(t.labels,y1.options),locale:A,classNames:{...g9(),...t.classNames}}},[t.locale,t.broadcastCalendar,t.weekStartsOn,t.firstWeekContainsDate,t.useAdditionalWeekYearTokens,t.useAdditionalDayOfYearTokens,t.timeZone,t.numerals,t.dateLib,t.noonSafe,t.components,t.formatters,t.labels,t.classNames]);t.today||(t={...t,today:a.today()});const{captionLayout:c,mode:u,navLayout:f,numberOfMonths:d=1,onDayBlur:h,onDayClick:m,onDayFocus:x,onDayKeyDown:p,onDayMouseEnter:y,onDayMouseLeave:M,onNextClick:v,onPrevClick:k,showWeekNumber:b,styles:w}=t,{formatCaption:N,formatDay:L,formatMonthDropdown:E,formatWeekNumber:H,formatWeekNumberHeader:Z,formatWeekdayName:V,formatYearDropdown:F}=s,z=G9(t,a),{days:W,months:c1,navStart:h1,navEnd:x1,previousMonth:Q,nextMonth:r1,goToMonth:S}=z,D=u9(W,t,h1,x1,a),{isSelected:Y,select:B,selected:f1}=r8(t,a)??{},{blur:R,focused:_,isFocusTarget:a1,moveFocus:g1,setFocused:u1}=K9(t,z,D,Y??(()=>!1),a),{labelDayButton:F1,labelGridcell:d1,labelGrid:s1,labelMonthDropdown:W1,labelNav:Z1,labelPrevious:b2,labelNext:n2,labelWeekday:L2,labelWeekNumber:r2,labelWeekNumberHeader:S2,labelYearDropdown:f2}=i,o2=g.useMemo(()=>O9(a,t.ISOWeek,t.broadcastCalendar,t.today),[a,t.ISOWeek,t.broadcastCalendar,t.today]),Y1=u!==void 0||m!==void 0,s2=g.useCallback(()=>{Q&&(S(Q),k==null||k(Q))},[Q,S,k]),_1=g.useCallback(()=>{r1&&(S(r1),v==null||v(r1))},[S,r1,v]),k2=g.useCallback((A,K)=>$=>{$.preventDefault(),$.stopPropagation(),u1(A),!K.disabled&&(B==null||B(A.date,K,$),m==null||m(A.date,K,$))},[B,m,u1]),J=g.useCallback((A,K)=>$=>{u1(A),x==null||x(A.date,K,$)},[x,u1]),l1=g.useCallback((A,K)=>$=>{R(),h==null||h(A.date,K,$)},[R,h]),V1=g.useCallback((A,K)=>$=>{const X={ArrowLeft:[$.shiftKey?"month":"day",t.dir==="rtl"?"after":"before"],ArrowRight:[$.shiftKey?"month":"day",t.dir==="rtl"?"before":"after"],ArrowDown:[$.shiftKey?"year":"week","after"],ArrowUp:[$.shiftKey?"year":"week","before"],PageUp:[$.shiftKey?"year":"month","before"],PageDown:[$.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(X[$.key]){$.preventDefault(),$.stopPropagation();const[y1,U]=X[$.key];g1(y1,U)}p==null||p(A.date,K,$)},[g1,p,t.dir]),B1=g.useCallback((A,K)=>$=>{y==null||y(A.date,K,$)},[y]),h2=g.useCallback((A,K)=>$=>{M==null||M(A.date,K,$)},[M]),N2=g.useCallback(A=>K=>{const $=Number(K.target.value),X=a.setMonth(a.startOfMonth(A),$);S(X)},[a,S]),g2=g.useCallback(A=>K=>{const $=Number(K.target.value),X=a.setYear(a.startOfMonth(A),$);S(X)},[a,S]),{className:O,style:G}=g.useMemo(()=>({className:[C[P.Root],t.className].filter(Boolean).join(" "),style:{...w==null?void 0:w[P.Root],...t.style}}),[C,t.className,t.style,w]),e1=h9(t),i1=g.useRef(null);F9(i1,!!t.animate,{classNames:C,months:c1,focused:_,dateLib:a});const i2={dayPickerProps:t,selected:f1,select:B,isSelected:Y,months:c1,nextMonth:r1,previousMonth:Q,goToMonth:S,getModifiers:D,components:r,classNames:C,styles:w,labels:i,formatters:s};return g.createElement(h5.Provider,{value:i2},g.createElement(r.Root,{rootRef:t.animate?i1:void 0,className:O,style:G,dir:t.dir,id:t.id,lang:t.lang,nonce:t.nonce,title:t.title,role:t.role,"aria-label":t["aria-label"],"aria-labelledby":t["aria-labelledby"],...e1},g.createElement(r.Months,{className:C[P.Months],style:w==null?void 0:w[P.Months]},!t.hideNavigation&&!f&&g.createElement(r.Nav,{"data-animated-nav":t.animate?"true":void 0,className:C[P.Nav],style:w==null?void 0:w[P.Nav],"aria-label":Z1(),onPreviousClick:s2,onNextClick:_1,previousMonth:Q,nextMonth:r1}),c1.map((A,K)=>g.createElement(r.Month,{"data-animated-month":t.animate?"true":void 0,className:C[P.Month],style:w==null?void 0:w[P.Month],key:K,displayIndex:K,calendarMonth:A},f==="around"&&!t.hideNavigation&&K===0&&g.createElement(r.PreviousMonthButton,{type:"button",className:C[P.PreviousMonthButton],tabIndex:Q?void 0:-1,"aria-disabled":Q?void 0:!0,"aria-label":b2(Q),onClick:s2,"data-animated-button":t.animate?"true":void 0},g.createElement(r.Chevron,{disabled:Q?void 0:!0,className:C[P.Chevron],orientation:t.dir==="rtl"?"right":"left"})),g.createElement(r.MonthCaption,{"data-animated-caption":t.animate?"true":void 0,className:C[P.MonthCaption],style:w==null?void 0:w[P.MonthCaption],calendarMonth:A,displayIndex:K},c!=null&&c.startsWith("dropdown")?g.createElement(r.DropdownNav,{className:C[P.Dropdowns],style:w==null?void 0:w[P.Dropdowns]},(()=>{const $=c==="dropdown"||c==="dropdown-months"?g.createElement(r.MonthsDropdown,{key:"month",className:C[P.MonthsDropdown],"aria-label":W1(),classNames:C,components:r,disabled:!!t.disableNavigation,onChange:N2(A.date),options:V9(A.date,h1,x1,s,a),style:w==null?void 0:w[P.Dropdown],value:a.getMonth(A.date)}):g.createElement("span",{key:"month"},E(A.date,a)),X=c==="dropdown"||c==="dropdown-years"?g.createElement(r.YearsDropdown,{key:"year",className:C[P.YearsDropdown],"aria-label":f2(a.options),classNames:C,components:r,disabled:!!t.disableNavigation,onChange:g2(A.date),options:Z9(h1,x1,s,a,!!t.reverseYears),style:w==null?void 0:w[P.Dropdown],value:a.getYear(A.date)}):g.createElement("span",{key:"year"},F(A.date,a));return a.getMonthYearOrder()==="year-first"?[X,$]:[$,X]})(),g.createElement("span",{role:"status","aria-live":"polite",style:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"}},N(A.date,a.options,a))):g.createElement(r.CaptionLabel,{className:C[P.CaptionLabel],role:"status","aria-live":"polite"},N(A.date,a.options,a))),f==="around"&&!t.hideNavigation&&K===d-1&&g.createElement(r.NextMonthButton,{type:"button",className:C[P.NextMonthButton],tabIndex:r1?void 0:-1,"aria-disabled":r1?void 0:!0,"aria-label":n2(r1),onClick:_1,"data-animated-button":t.animate?"true":void 0},g.createElement(r.Chevron,{disabled:r1?void 0:!0,className:C[P.Chevron],orientation:t.dir==="rtl"?"left":"right"})),K===d-1&&f==="after"&&!t.hideNavigation&&g.createElement(r.Nav,{"data-animated-nav":t.animate?"true":void 0,className:C[P.Nav],style:w==null?void 0:w[P.Nav],"aria-label":Z1(),onPreviousClick:s2,onNextClick:_1,previousMonth:Q,nextMonth:r1}),g.createElement(r.MonthGrid,{role:"grid","aria-multiselectable":u==="multiple"||u==="range","aria-label":s1(A.date,a.options,a)||void 0,className:C[P.MonthGrid],style:w==null?void 0:w[P.MonthGrid]},!t.hideWeekdays&&g.createElement(r.Weekdays,{"data-animated-weekdays":t.animate?"true":void 0,className:C[P.Weekdays],style:w==null?void 0:w[P.Weekdays]},b&&g.createElement(r.WeekNumberHeader,{"aria-label":S2(a.options),className:C[P.WeekNumberHeader],style:w==null?void 0:w[P.WeekNumberHeader],scope:"col"},Z()),o2.map($=>g.createElement(r.Weekday,{"aria-label":L2($,a.options,a),className:C[P.Weekday],key:String($),style:w==null?void 0:w[P.Weekday],scope:"col"},V($,a.options,a)))),g.createElement(r.Weeks,{"data-animated-weeks":t.animate?"true":void 0,className:C[P.Weeks],style:w==null?void 0:w[P.Weeks]},A.weeks.map($=>g.createElement(r.Week,{className:C[P.Week],key:$.weekNumber,style:w==null?void 0:w[P.Week],week:$},b&&g.createElement(r.WeekNumber,{week:$,style:w==null?void 0:w[P.WeekNumber],"aria-label":r2($.weekNumber,{locale:l}),className:C[P.WeekNumber],scope:"row",role:"rowheader"},H($.weekNumber,a)),$.days.map(X=>{const{date:y1}=X,U=D(X);if(U[C1.focused]=!U.hidden&&!!(_!=null&&_.isEqualTo(X)),U[R1.selected]=(Y==null?void 0:Y(y1))||U.selected,r4(f1)){const{from:u4,to:d4}=f1;U[R1.range_start]=!!(u4&&d4&&a.isSameDay(y1,u4)),U[R1.range_end]=!!(u4&&d4&&a.isSameDay(y1,d4)),U[R1.range_middle]=G1(f1,y1,!0,a)}const c4=E9(U,w,t.modifiersStyles),v1=d9(U,C,t.modifiersClassNames),Q5=!Y1&&!U.hidden?d1(y1,U,a.options,a):void 0;return g.createElement(r.Day,{key:`${X.isoDate}_${X.displayMonthId}`,day:X,modifiers:U,className:v1.join(" "),style:c4,role:"gridcell","aria-selected":U.selected||void 0,"aria-label":Q5,"data-day":X.isoDate,"data-month":X.outside?X.dateMonthId:void 0,"data-selected":U.selected||void 0,"data-disabled":U.disabled||void 0,"data-hidden":U.hidden||void 0,"data-outside":X.outside||void 0,"data-focused":U.focused||void 0,"data-today":U.today||void 0},!U.hidden&&Y1?g.createElement(r.DayButton,{className:C[P.DayButton],style:w==null?void 0:w[P.DayButton],type:"button",day:X,modifiers:U,disabled:!U.focused&&U.disabled||void 0,"aria-disabled":U.focused&&U.disabled||void 0,tabIndex:a1(X)?0:-1,"aria-label":F1(y1,U,a.options,a),onClick:k2(X,U),onBlur:l1(X,U),onFocus:J(X,U),onKeyDown:V1(X,U),onMouseEnter:B1(X,U),onMouseLeave:h2(X,U)},L(y1,a.options,a)):!U.hidden&&L(X.date,a.options,a))})))))))),t.footer&&g.createElement(r.Footer,{className:C[P.Footer],style:w==null?void 0:w[P.Footer],role:"status","aria-live":"polite"},t.footer)))}const s8=({title:e="Date",variant:t="single",value:n,fromDate:r,toDate:s,onChange:i,onFromChange:a,onToChange:l,size:C="sm",height:c="lg",maxPastDays:u,maxRangeDays:f,currentSelected:d=!1,rangeDays:h=0})=>{const[m,x]=g.useState(null),p=g.useRef(null),y=g.useCallback(V=>{p.current&&!p.current.contains(V.target)&&x(null)},[]);g.useEffect(()=>(document.addEventListener("click",y),()=>{document.removeEventListener("click",y)}),[y]),g.useEffect(()=>{if(!d)return;const V=new Date;if(t==="single"&&!n&&(i==null||i(V)),t==="range"){const F=new Date;F.setDate(V.getDate()-h);const z=V;r||a==null||a(F),s||l==null||l(z)}},[d,t,n,r,s,h,i,a,l]);const M=(V,F)=>{const z=new Date;if(V>z)return!0;if(u){const W=new Date;if(W.setDate(z.getDate()-u),V<W)return!0}if(F==="to"&&r&&V<r||F==="from"&&s&&V>s)return!0;if(f){if(F==="to"&&r){const W=new Date(r);if(W.setDate(W.getDate()+f),V>W)return!0}if(F==="from"&&s){const W=new Date(s);if(W.setDate(W.getDate()-f),V<W)return!0}}return!1};g.useEffect(()=>{const V=()=>{m&&x(null)};return m&&window.addEventListener("scroll",V),()=>{window.removeEventListener("scroll",V)}},[m]);const v=(V,F)=>{V&&(F==="single"&&(i==null||i(V),x(null)),F==="from"&&(a==null||a(V),x(null)),F==="to"&&(l==null||l(V),x(null)))},k={sm:"min-w-28 w-auto",lg:"min-w-64 w-auto",full:"w-full"},b={sm:"h-10",lg:"min-h-12"},w=C==="sm"?"px-3":"py-3 px-5",N=`
|
|
28
|
+
`,p=s?"neutralGray":u??p3[n],y=m?24:void 0,M=u??(m?a6[n]:p3[n]);return o.jsx("button",{type:"button",className:x,disabled:s||c,onClick:l,...h,children:c?o.jsxs(o.Fragment,{children:[o.jsx(q,{icon:"loader",color:M,className:"animate-spin",size:t==="extraSmall"?16:y}),r&&o.jsx(j,{variant:t==="extraSmall"?"caption":"subtitle2",text:r,color:p,component:"span"})]}):o.jsxs(o.Fragment,{children:[a&&o.jsx(J4,{size:"sm",...a}),i&&r&&C==="left"&&o.jsx(q,{icon:i,size:t==="extraSmall"?16:y,color:s?"neutralGray":M,cursorPointer:!s}),r&&o.jsx(j,{variant:t==="extraSmall"?"caption":"subtitle2",text:r,color:p,component:"span"}),i&&(!r||C==="right")&&o.jsx(q,{icon:i,size:t==="extraSmall"?16:y,color:s?"neutralGray":M,cursorPointer:!s})]})})},J3=6048e5,u6=864e5,x3=Symbol.for("constructDateFrom");function p1(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&x3 in e?e[x3](t):e instanceof Date?new e.constructor(t):new Date(t)}function n1(e,t){return p1(t||e,e)}function e5(e,t,n){const r=n1(e,n==null?void 0:n.in);return isNaN(t)?p1(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function t5(e,t,n){const r=n1(e,n==null?void 0:n.in);if(isNaN(t))return p1(e,NaN);if(!t)return r;const s=r.getDate(),i=p1(e,r.getTime());i.setMonth(r.getMonth()+t+1,0);const a=i.getDate();return s>=a?i:(r.setFullYear(i.getFullYear(),i.getMonth(),s),r)}let d6={};function A2(){return d6}function j2(e,t){var l,C,c,u;const n=A2(),r=(t==null?void 0:t.weekStartsOn)??((C=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:C.weekStartsOn)??n.weekStartsOn??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.weekStartsOn)??0,s=n1(e,t==null?void 0:t.in),i=s.getDay(),a=(i<r?7:0)+i-r;return s.setDate(s.getDate()-a),s.setHours(0,0,0,0),s}function B2(e,t){return j2(e,{...t,weekStartsOn:1})}function n5(e,t){const n=n1(e,t==null?void 0:t.in),r=n.getFullYear(),s=p1(n,0);s.setFullYear(r+1,0,4),s.setHours(0,0,0,0);const i=B2(s),a=p1(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const l=B2(a);return n.getTime()>=i.getTime()?r+1:n.getTime()>=l.getTime()?r:r-1}function v3(e){const t=n1(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function M2(e,...t){const n=p1.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function $2(e,t){const n=n1(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function e3(e,t,n){const[r,s]=M2(n==null?void 0:n.in,e,t),i=$2(r),a=$2(s),l=+i-v3(i),C=+a-v3(a);return Math.round((l-C)/u6)}function f6(e,t){const n=n5(e,t),r=p1(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),B2(r)}function h6(e,t,n){return e5(e,t*7,n)}function g6(e,t,n){return t5(e,t*12,n)}function m6(e,t){let n,r=t==null?void 0:t.in;return e.forEach(s=>{!r&&typeof s=="object"&&(r=p1.bind(null,s));const i=n1(s,r);(!n||n<i||isNaN(+i))&&(n=i)}),p1(r,n||NaN)}function p6(e,t){let n,r=t==null?void 0:t.in;return e.forEach(s=>{!r&&typeof s=="object"&&(r=p1.bind(null,s));const i=n1(s,r);(!n||n>i||isNaN(+i))&&(n=i)}),p1(r,n||NaN)}function x6(e,t,n){const[r,s]=M2(n==null?void 0:n.in,e,t);return+$2(r)==+$2(s)}function r5(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function v6(e){return!(!r5(e)&&typeof e!="number"||isNaN(+n1(e)))}function o5(e,t,n){const[r,s]=M2(n==null?void 0:n.in,e,t),i=r.getFullYear()-s.getFullYear(),a=r.getMonth()-s.getMonth();return i*12+a}function w6(e,t){const n=n1(e,t==null?void 0:t.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function s5(e,t){const[n,r]=M2(e,t.start,t.end);return{start:n,end:r}}function y6(e,t){const{start:n,end:r}=s5(t==null?void 0:t.in,e);let s=+n>+r;const i=s?+n:+r,a=s?r:n;a.setHours(0,0,0,0),a.setDate(1);let l=1;const C=[];for(;+a<=i;)C.push(p1(n,a)),a.setMonth(a.getMonth()+l);return s?C.reverse():C}function j6(e,t){const n=n1(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function M6(e,t){const n=n1(e,t==null?void 0:t.in),r=n.getFullYear();return n.setFullYear(r+1,0,0),n.setHours(23,59,59,999),n}function i5(e,t){const n=n1(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function b6(e,t){const{start:n,end:r}=s5(t==null?void 0:t.in,e);let s=+n>+r;const i=s?+n:+r,a=s?r:n;a.setHours(0,0,0,0),a.setMonth(0,1);let l=1;const C=[];for(;+a<=i;)C.push(p1(n,a)),a.setFullYear(a.getFullYear()+l);return s?C.reverse():C}function a5(e,t){var l,C,c,u;const n=A2(),r=(t==null?void 0:t.weekStartsOn)??((C=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:C.weekStartsOn)??n.weekStartsOn??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.weekStartsOn)??0,s=n1(e,t==null?void 0:t.in),i=s.getDay(),a=(i<r?-7:0)+6-(i-r);return s.setDate(s.getDate()+a),s.setHours(23,59,59,999),s}function L6(e,t){return a5(e,{...t,weekStartsOn:1})}const S6={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},k6=(e,t,n)=>{let r;const s=S6[e];return typeof s=="string"?r=s:t===1?r=s.one:r=s.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function f4(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const N6={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},H6={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},V6={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},E6={date:f4({formats:N6,defaultWidth:"full"}),time:f4({formats:H6,defaultWidth:"full"}),dateTime:f4({formats:V6,defaultWidth:"full"})},O6={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Z6=(e,t,n,r)=>O6[e];function E2(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let s;if(r==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,l=n!=null&&n.width?String(n.width):a;s=e.formattingValues[l]||e.formattingValues[a]}else{const a=e.defaultWidth,l=n!=null&&n.width?String(n.width):e.defaultWidth;s=e.values[l]||e.values[a]}const i=e.argumentCallback?e.argumentCallback(t):t;return s[i]}}const _6={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},D6={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},R6={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},P6={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},F6={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},B6={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},$6=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},T6={ordinalNumber:$6,era:E2({values:_6,defaultWidth:"wide"}),quarter:E2({values:D6,defaultWidth:"wide",argumentCallback:e=>e-1}),month:E2({values:R6,defaultWidth:"wide"}),day:E2({values:P6,defaultWidth:"wide"}),dayPeriod:E2({values:F6,defaultWidth:"wide",formattingValues:B6,defaultFormattingWidth:"wide"})};function O2(e){return(t,n={})=>{const r=n.width,s=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(s);if(!i)return null;const a=i[0],l=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],C=Array.isArray(l)?A6(l,f=>f.test(a)):I6(l,f=>f.test(a));let c;c=e.valueCallback?e.valueCallback(C):C,c=n.valueCallback?n.valueCallback(c):c;const u=t.slice(a.length);return{value:c,rest:u}}}function I6(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function A6(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function W6(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const s=r[0],i=t.match(e.parsePattern);if(!i)return null;let a=e.valueCallback?e.valueCallback(i[0]):i[0];a=n.valueCallback?n.valueCallback(a):a;const l=t.slice(s.length);return{value:a,rest:l}}}const Y6=/^(\d+)(th|st|nd|rd)?/i,z6=/\d+/i,G6={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},q6={any:[/^b/i,/^(a|c)/i]},U6={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},K6={any:[/1/i,/2/i,/3/i,/4/i]},X6={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Q6={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},J6={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},ee={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},te={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},ne={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},re={ordinalNumber:W6({matchPattern:Y6,parsePattern:z6,valueCallback:e=>parseInt(e,10)}),era:O2({matchPatterns:G6,defaultMatchWidth:"wide",parsePatterns:q6,defaultParseWidth:"any"}),quarter:O2({matchPatterns:U6,defaultMatchWidth:"wide",parsePatterns:K6,defaultParseWidth:"any",valueCallback:e=>e+1}),month:O2({matchPatterns:X6,defaultMatchWidth:"wide",parsePatterns:Q6,defaultParseWidth:"any"}),day:O2({matchPatterns:J6,defaultMatchWidth:"wide",parsePatterns:ee,defaultParseWidth:"any"}),dayPeriod:O2({matchPatterns:te,defaultMatchWidth:"any",parsePatterns:ne,defaultParseWidth:"any"})},x2={code:"en-US",formatDistance:k6,formatLong:E6,formatRelative:Z6,localize:T6,match:re,options:{weekStartsOn:0,firstWeekContainsDate:1}};function oe(e,t){const n=n1(e,t==null?void 0:t.in);return e3(n,i5(n))+1}function t3(e,t){const n=n1(e,t==null?void 0:t.in),r=+B2(n)-+f6(n);return Math.round(r/J3)+1}function l5(e,t){var u,f,d,h;const n=n1(e,t==null?void 0:t.in),r=n.getFullYear(),s=A2(),i=(t==null?void 0:t.firstWeekContainsDate)??((f=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:f.firstWeekContainsDate)??s.firstWeekContainsDate??((h=(d=s.locale)==null?void 0:d.options)==null?void 0:h.firstWeekContainsDate)??1,a=p1((t==null?void 0:t.in)||e,0);a.setFullYear(r+1,0,i),a.setHours(0,0,0,0);const l=j2(a,t),C=p1((t==null?void 0:t.in)||e,0);C.setFullYear(r,0,i),C.setHours(0,0,0,0);const c=j2(C,t);return+n>=+l?r+1:+n>=+c?r:r-1}function se(e,t){var l,C,c,u;const n=A2(),r=(t==null?void 0:t.firstWeekContainsDate)??((C=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:C.firstWeekContainsDate)??n.firstWeekContainsDate??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.firstWeekContainsDate)??1,s=l5(e,t),i=p1((t==null?void 0:t.in)||e,0);return i.setFullYear(s,0,r),i.setHours(0,0,0,0),j2(i,t)}function n3(e,t){const n=n1(e,t==null?void 0:t.in),r=+j2(n,t)-+se(n,t);return Math.round(r/J3)+1}function t1(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Q1={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return t1(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):t1(n+1,2)},d(e,t){return t1(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return t1(e.getHours()%12||12,t.length)},H(e,t){return t1(e.getHours(),t.length)},m(e,t){return t1(e.getMinutes(),t.length)},s(e,t){return t1(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),s=Math.trunc(r*Math.pow(10,n-3));return t1(s,t.length)}},m2={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},w3={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),s=r>0?r:1-r;return n.ordinalNumber(s,{unit:"year"})}return Q1.y(e,t)},Y:function(e,t,n,r){const s=l5(e,r),i=s>0?s:1-s;if(t==="YY"){const a=i%100;return t1(a,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):t1(i,t.length)},R:function(e,t){const n=n5(e);return t1(n,t.length)},u:function(e,t){const n=e.getFullYear();return t1(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return t1(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return t1(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Q1.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return t1(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const s=n3(e,r);return t==="wo"?n.ordinalNumber(s,{unit:"week"}):t1(s,t.length)},I:function(e,t,n){const r=t3(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):t1(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Q1.d(e,t)},D:function(e,t,n){const r=oe(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):t1(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const s=e.getDay(),i=(s-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return t1(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(s,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(s,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(s,{width:"short",context:"formatting"});case"eeee":default:return n.day(s,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const s=e.getDay(),i=(s-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return t1(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(s,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(s,{width:"narrow",context:"standalone"});case"cccccc":return n.day(s,{width:"short",context:"standalone"});case"cccc":default:return n.day(s,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),s=r===0?7:r;switch(t){case"i":return String(s);case"ii":return t1(s,t.length);case"io":return n.ordinalNumber(s,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const s=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let s;switch(r===12?s=m2.noon:r===0?s=m2.midnight:s=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let s;switch(r>=17?s=m2.evening:r>=12?s=m2.afternoon:r>=4?s=m2.morning:s=m2.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Q1.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Q1.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):t1(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):t1(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Q1.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Q1.s(e,t)},S:function(e,t){return Q1.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return j3(r);case"XXXX":case"XX":return a2(r);case"XXXXX":case"XXX":default:return a2(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return j3(r);case"xxxx":case"xx":return a2(r);case"xxxxx":case"xxx":default:return a2(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+y3(r,":");case"OOOO":default:return"GMT"+a2(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+y3(r,":");case"zzzz":default:return"GMT"+a2(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return t1(r,t.length)},T:function(e,t,n){return t1(+e,t.length)}};function y3(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),s=Math.trunc(r/60),i=r%60;return i===0?n+String(s):n+String(s)+t+t1(i,2)}function j3(e,t){return e%60===0?(e>0?"-":"+")+t1(Math.abs(e)/60,2):a2(e,t)}function a2(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),s=t1(Math.trunc(r/60),2),i=t1(r%60,2);return n+s+t+i}const M3=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},C5=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},ie=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],s=n[2];if(!s)return M3(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;case"PPPP":default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",M3(r,t)).replace("{{time}}",C5(s,t))},ae={p:C5,P:ie},le=/^D+$/,Ce=/^Y+$/,ce=["D","DD","YY","YYYY"];function ue(e){return le.test(e)}function de(e){return Ce.test(e)}function fe(e,t,n){const r=he(e,t,n);if(console.warn(r),ce.includes(e))throw new RangeError(r)}function he(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const ge=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,me=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,pe=/^'([^]*?)'?$/,xe=/''/g,ve=/[a-zA-Z]/;function v2(e,t,n){var u,f,d,h,m,x,p,y;const r=A2(),s=(n==null?void 0:n.locale)??r.locale??x2,i=(n==null?void 0:n.firstWeekContainsDate)??((f=(u=n==null?void 0:n.locale)==null?void 0:u.options)==null?void 0:f.firstWeekContainsDate)??r.firstWeekContainsDate??((h=(d=r.locale)==null?void 0:d.options)==null?void 0:h.firstWeekContainsDate)??1,a=(n==null?void 0:n.weekStartsOn)??((x=(m=n==null?void 0:n.locale)==null?void 0:m.options)==null?void 0:x.weekStartsOn)??r.weekStartsOn??((y=(p=r.locale)==null?void 0:p.options)==null?void 0:y.weekStartsOn)??0,l=n1(e,n==null?void 0:n.in);if(!v6(l))throw new RangeError("Invalid time value");let C=t.match(me).map(M=>{const v=M[0];if(v==="p"||v==="P"){const k=ae[v];return k(M,s.formatLong)}return M}).join("").match(ge).map(M=>{if(M==="''")return{isToken:!1,value:"'"};const v=M[0];if(v==="'")return{isToken:!1,value:we(M)};if(w3[v])return{isToken:!0,value:M};if(v.match(ve))throw new RangeError("Format string contains an unescaped latin alphabet character `"+v+"`");return{isToken:!1,value:M}});s.localize.preprocessor&&(C=s.localize.preprocessor(l,C));const c={firstWeekContainsDate:i,weekStartsOn:a,locale:s};return C.map(M=>{if(!M.isToken)return M.value;const v=M.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&de(v)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&ue(v))&&fe(v,t,String(e));const k=w3[v[0]];return k(l,v,s.localize,c)}).join("")}function we(e){const t=e.match(pe);return t?t[1].replace(xe,"'"):e}function ye(e,t){const n=n1(e,t==null?void 0:t.in),r=n.getFullYear(),s=n.getMonth(),i=p1(n,0);return i.setFullYear(r,s+1,0),i.setHours(0,0,0,0),i.getDate()}function je(e,t){return n1(e,t==null?void 0:t.in).getMonth()}function Me(e,t){return n1(e,t==null?void 0:t.in).getFullYear()}function be(e,t){return+n1(e)>+n1(t)}function Le(e,t){return+n1(e)<+n1(t)}function Se(e,t,n){const[r,s]=M2(n==null?void 0:n.in,e,t);return r.getFullYear()===s.getFullYear()&&r.getMonth()===s.getMonth()}function ke(e,t,n){const[r,s]=M2(n==null?void 0:n.in,e,t);return r.getFullYear()===s.getFullYear()}function Ne(e,t,n){const r=n1(e,n==null?void 0:n.in),s=r.getFullYear(),i=r.getDate(),a=p1(e,0);a.setFullYear(s,t,15),a.setHours(0,0,0,0);const l=ye(a);return r.setMonth(t,Math.min(i,l)),r}function He(e,t,n){const r=n1(e,n==null?void 0:n.in);return isNaN(+r)?p1(e,NaN):(r.setFullYear(t),r)}function Ve(e,t,n="long"){return new Intl.DateTimeFormat("en-US",{hour:"numeric",timeZone:e,timeZoneName:n}).format(t).split(/\s/g).slice(2).join(" ")}const h4={},_2={};function C2(e,t){try{const r=(h4[e]||(h4[e]=new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"longOffset"}).format))(t).split("GMT")[1];return r in _2?_2[r]:b3(r,r.split(":"))}catch{if(e in _2)return _2[e];const n=e==null?void 0:e.match(Ee);return n?b3(e,n.slice(1)):NaN}}const Ee=/([+-]\d\d):?(\d\d)?/;function b3(e,t){const n=+(t[0]||0),r=+(t[1]||0),s=+(t[2]||0)/60;return _2[e]=n*60+r>0?n*60+r+s:n*60-r-s}class I1 extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(C2(this.timeZone,this))?this.setTime(NaN):t.length?typeof t[0]=="number"&&(t.length===1||t.length===2&&typeof t[1]!="number")?this.setTime(t[0]):typeof t[0]=="string"?this.setTime(+new Date(t[0])):t[0]instanceof Date?this.setTime(+t[0]):(this.setTime(+new Date(...t)),c5(this),B4(this)):this.setTime(Date.now())}static tz(t,...n){return n.length?new I1(...n,t):new I1(Date.now(),t)}withTimeZone(t){return new I1(+this,t)}getTimezoneOffset(){const t=-C2(this.timeZone,this);return t>0?Math.floor(t):Math.ceil(t)}setTime(t){return Date.prototype.setTime.apply(this,arguments),B4(this),+this}[Symbol.for("constructDateFrom")](t){return new I1(+new Date(t),this.timeZone)}}const L3=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!L3.test(e))return;const t=e.replace(L3,"$1UTC");I1.prototype[t]&&(e.startsWith("get")?I1.prototype[e]=function(){return this.internal[t]()}:(I1.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),Oe(this),+this},I1.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),B4(this),+this}))});function B4(e){e.internal.setTime(+e),e.internal.setUTCSeconds(e.internal.getUTCSeconds()-Math.round(-C2(e.timeZone,e)*60))}function Oe(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),c5(e)}function c5(e){const t=C2(e.timeZone,e),n=t>0?Math.floor(t):Math.ceil(t),r=new Date(+e);r.setUTCHours(r.getUTCHours()-1);const s=-new Date(+e).getTimezoneOffset(),i=-new Date(+r).getTimezoneOffset(),a=s-i,l=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();a&&l&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+a);const C=s-n;C&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+C);const c=new Date(+e);c.setUTCSeconds(0);const u=s>0?c.getSeconds():(c.getSeconds()-60)%60,f=Math.round(-(C2(e.timeZone,e)*60))%60;(f||u)&&(e.internal.setUTCSeconds(e.internal.getUTCSeconds()+f),Date.prototype.setUTCSeconds.call(e,Date.prototype.getUTCSeconds.call(e)+f+u));const d=C2(e.timeZone,e),h=d>0?Math.floor(d):Math.ceil(d),x=-new Date(+e).getTimezoneOffset()-h,p=h!==n,y=x-C;if(p&&y){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+y);const M=C2(e.timeZone,e),v=M>0?Math.floor(M):Math.ceil(M),k=h-v;k&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+k),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+k))}}class b1 extends I1{static tz(t,...n){return n.length?new b1(...n,t):new b1(Date.now(),t)}toISOString(){const[t,n,r]=this.tzComponents(),s=`${t}${n}:${r}`;return this.internal.toISOString().slice(0,-1)+s}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[t,n,r,s]=this.internal.toUTCString().split(" ");return`${t==null?void 0:t.slice(0,-1)} ${r} ${n} ${s}`}toTimeString(){const t=this.internal.toUTCString().split(" ")[4],[n,r,s]=this.tzComponents();return`${t} GMT${n}${r}${s} (${Ve(this.timeZone,this)})`}toLocaleString(t,n){return Date.prototype.toLocaleString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}toLocaleDateString(t,n){return Date.prototype.toLocaleDateString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}toLocaleTimeString(t,n){return Date.prototype.toLocaleTimeString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}tzComponents(){const t=this.getTimezoneOffset(),n=t>0?"-":"+",r=String(Math.floor(Math.abs(t)/60)).padStart(2,"0"),s=String(Math.abs(t)%60).padStart(2,"0");return[n,r,s]}withTimeZone(t){return new b1(+this,t)}[Symbol.for("constructDateFrom")](t){return new b1(+new Date(t),this.timeZone)}}const S3=5,Ze=4;function _e(e,t){const n=t.startOfMonth(e),r=n.getDay()>0?n.getDay():7,s=t.addDays(e,-r+1),i=t.addDays(s,S3*7-1);return t.getMonth(e)===t.getMonth(i)?S3:Ze}function u5(e,t){const n=t.startOfMonth(e),r=n.getDay();return r===1?n:r===0?t.addDays(n,-6):t.addDays(n,-1*(r-1))}function De(e,t){const n=u5(e,t),r=_e(e,t);return t.addDays(n,r*7-1)}const d5={...x2,labels:{labelDayButton:(e,t,n,r)=>{let s;r&&typeof r.format=="function"?s=r.format.bind(r):s=(a,l)=>v2(a,l,{locale:x2,...n});let i=s(e,"PPPP");return t.today&&(i=`Today, ${i}`),t.selected&&(i=`${i}, selected`),i},labelMonthDropdown:"Choose the Month",labelNext:"Go to the Next Month",labelPrevious:"Go to the Previous Month",labelWeekNumber:e=>`Week ${e}`,labelYearDropdown:"Choose the Year",labelGrid:(e,t,n)=>{let r;return n&&typeof n.format=="function"?r=n.format.bind(n):r=(s,i)=>v2(s,i,{locale:x2,...t}),r(e,"LLLL yyyy")},labelGridcell:(e,t,n,r)=>{let s;r&&typeof r.format=="function"?s=r.format.bind(r):s=(a,l)=>v2(a,l,{locale:x2,...n});let i=s(e,"PPPP");return t!=null&&t.today&&(i=`Today, ${i}`),i},labelNav:"Navigation bar",labelWeekNumberHeader:"Week Number",labelWeekday:(e,t,n)=>{let r;return n&&typeof n.format=="function"?r=n.format.bind(n):r=(s,i)=>v2(s,i,{locale:x2,...t}),r(e,"cccc")}}};class N1{constructor(t,n){this.Date=Date,this.today=()=>{var r;return(r=this.overrides)!=null&&r.today?this.overrides.today():this.options.timeZone?b1.tz(this.options.timeZone):new this.Date},this.newDate=(r,s,i)=>{var a;return(a=this.overrides)!=null&&a.newDate?this.overrides.newDate(r,s,i):this.options.timeZone?new b1(r,s,i,this.options.timeZone):new Date(r,s,i)},this.addDays=(r,s)=>{var i;return(i=this.overrides)!=null&&i.addDays?this.overrides.addDays(r,s):e5(r,s)},this.addMonths=(r,s)=>{var i;return(i=this.overrides)!=null&&i.addMonths?this.overrides.addMonths(r,s):t5(r,s)},this.addWeeks=(r,s)=>{var i;return(i=this.overrides)!=null&&i.addWeeks?this.overrides.addWeeks(r,s):h6(r,s)},this.addYears=(r,s)=>{var i;return(i=this.overrides)!=null&&i.addYears?this.overrides.addYears(r,s):g6(r,s)},this.differenceInCalendarDays=(r,s)=>{var i;return(i=this.overrides)!=null&&i.differenceInCalendarDays?this.overrides.differenceInCalendarDays(r,s):e3(r,s)},this.differenceInCalendarMonths=(r,s)=>{var i;return(i=this.overrides)!=null&&i.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(r,s):o5(r,s)},this.eachMonthOfInterval=r=>{var s;return(s=this.overrides)!=null&&s.eachMonthOfInterval?this.overrides.eachMonthOfInterval(r):y6(r)},this.eachYearOfInterval=r=>{var l;const s=(l=this.overrides)!=null&&l.eachYearOfInterval?this.overrides.eachYearOfInterval(r):b6(r),i=new Set(s.map(C=>this.getYear(C)));if(i.size===s.length)return s;const a=[];return i.forEach(C=>{a.push(new Date(C,0,1))}),a},this.endOfBroadcastWeek=r=>{var s;return(s=this.overrides)!=null&&s.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(r):De(r,this)},this.endOfISOWeek=r=>{var s;return(s=this.overrides)!=null&&s.endOfISOWeek?this.overrides.endOfISOWeek(r):L6(r)},this.endOfMonth=r=>{var s;return(s=this.overrides)!=null&&s.endOfMonth?this.overrides.endOfMonth(r):w6(r)},this.endOfWeek=(r,s)=>{var i;return(i=this.overrides)!=null&&i.endOfWeek?this.overrides.endOfWeek(r,s):a5(r,this.options)},this.endOfYear=r=>{var s;return(s=this.overrides)!=null&&s.endOfYear?this.overrides.endOfYear(r):M6(r)},this.format=(r,s,i)=>{var l;const a=(l=this.overrides)!=null&&l.format?this.overrides.format(r,s,this.options):v2(r,s,this.options);return this.options.numerals&&this.options.numerals!=="latn"?this.replaceDigits(a):a},this.getISOWeek=r=>{var s;return(s=this.overrides)!=null&&s.getISOWeek?this.overrides.getISOWeek(r):t3(r)},this.getMonth=(r,s)=>{var i;return(i=this.overrides)!=null&&i.getMonth?this.overrides.getMonth(r,this.options):je(r,this.options)},this.getYear=(r,s)=>{var i;return(i=this.overrides)!=null&&i.getYear?this.overrides.getYear(r,this.options):Me(r,this.options)},this.getWeek=(r,s)=>{var i;return(i=this.overrides)!=null&&i.getWeek?this.overrides.getWeek(r,this.options):n3(r,this.options)},this.isAfter=(r,s)=>{var i;return(i=this.overrides)!=null&&i.isAfter?this.overrides.isAfter(r,s):be(r,s)},this.isBefore=(r,s)=>{var i;return(i=this.overrides)!=null&&i.isBefore?this.overrides.isBefore(r,s):Le(r,s)},this.isDate=r=>{var s;return(s=this.overrides)!=null&&s.isDate?this.overrides.isDate(r):r5(r)},this.isSameDay=(r,s)=>{var i;return(i=this.overrides)!=null&&i.isSameDay?this.overrides.isSameDay(r,s):x6(r,s)},this.isSameMonth=(r,s)=>{var i;return(i=this.overrides)!=null&&i.isSameMonth?this.overrides.isSameMonth(r,s):Se(r,s)},this.isSameYear=(r,s)=>{var i;return(i=this.overrides)!=null&&i.isSameYear?this.overrides.isSameYear(r,s):ke(r,s)},this.max=r=>{var s;return(s=this.overrides)!=null&&s.max?this.overrides.max(r):m6(r)},this.min=r=>{var s;return(s=this.overrides)!=null&&s.min?this.overrides.min(r):p6(r)},this.setMonth=(r,s)=>{var i;return(i=this.overrides)!=null&&i.setMonth?this.overrides.setMonth(r,s):Ne(r,s)},this.setYear=(r,s)=>{var i;return(i=this.overrides)!=null&&i.setYear?this.overrides.setYear(r,s):He(r,s)},this.startOfBroadcastWeek=(r,s)=>{var i;return(i=this.overrides)!=null&&i.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(r,this):u5(r,this)},this.startOfDay=r=>{var s;return(s=this.overrides)!=null&&s.startOfDay?this.overrides.startOfDay(r):$2(r)},this.startOfISOWeek=r=>{var s;return(s=this.overrides)!=null&&s.startOfISOWeek?this.overrides.startOfISOWeek(r):B2(r)},this.startOfMonth=r=>{var s;return(s=this.overrides)!=null&&s.startOfMonth?this.overrides.startOfMonth(r):j6(r)},this.startOfWeek=(r,s)=>{var i;return(i=this.overrides)!=null&&i.startOfWeek?this.overrides.startOfWeek(r,this.options):j2(r,this.options)},this.startOfYear=r=>{var s;return(s=this.overrides)!=null&&s.startOfYear?this.overrides.startOfYear(r):i5(r)},this.options={locale:d5,...t},this.overrides=n}getDigitMap(){const{numerals:t="latn"}=this.options,n=new Intl.NumberFormat("en-US",{numberingSystem:t}),r={};for(let s=0;s<10;s++)r[s.toString()]=n.format(s);return r}replaceDigits(t){const n=this.getDigitMap();return t.replace(/\d/g,r=>n[r]||r)}formatNumber(t){return this.replaceDigits(t.toString())}getMonthYearOrder(){var n;const t=(n=this.options.locale)==null?void 0:n.code;return t&&N1.yearFirstLocales.has(t)?"year-first":"month-first"}formatMonthYear(t){const{locale:n,timeZone:r,numerals:s}=this.options,i=n==null?void 0:n.code;if(i&&N1.yearFirstLocales.has(i))try{return new Intl.DateTimeFormat(i,{month:"long",year:"numeric",timeZone:r,numberingSystem:s}).format(t)}catch{}const a=this.getMonthYearOrder()==="year-first"?"y LLLL":"LLLL y";return this.format(t,a)}}N1.yearFirstLocales=new Set(["eu","hu","ja","ja-Hira","ja-JP","ko","ko-KR","lt","lt-LT","lv","lv-LV","mn","mn-MN","zh","zh-CN","zh-HK","zh-TW"]);const A1=new N1;class f5{constructor(t,n,r=A1){this.date=t,this.displayMonth=n,this.outside=!!(n&&!r.isSameMonth(t,n)),this.dateLib=r,this.isoDate=r.format(t,"yyyy-MM-dd"),this.displayMonthId=r.format(n,"yyyy-MM"),this.dateMonthId=r.format(t,"yyyy-MM")}isEqualTo(t){return this.dateLib.isSameDay(t.date,this.date)&&this.dateLib.isSameMonth(t.displayMonth,this.displayMonth)}}class Re{constructor(t,n){this.date=t,this.weeks=n}}class Pe{constructor(t,n){this.days=n,this.weekNumber=t}}function Fe(e){return g.createElement("button",{...e})}function Be(e){return g.createElement("span",{...e})}function $e(e){const{size:t=24,orientation:n="left",className:r}=e;return g.createElement("svg",{className:r,width:t,height:t,viewBox:"0 0 24 24"},n==="up"&&g.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),n==="down"&&g.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),n==="left"&&g.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),n==="right"&&g.createElement("polygon",{points:"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"}))}function Te(e){const{day:t,modifiers:n,...r}=e;return g.createElement("td",{...r})}function Ie(e){const{day:t,modifiers:n,...r}=e,s=g.useRef(null);return g.useEffect(()=>{var i;n.focused&&((i=s.current)==null||i.focus())},[n.focused]),g.createElement("button",{ref:s,...r})}var P;(function(e){e.Root="root",e.Chevron="chevron",e.Day="day",e.DayButton="day_button",e.CaptionLabel="caption_label",e.Dropdowns="dropdowns",e.Dropdown="dropdown",e.DropdownRoot="dropdown_root",e.Footer="footer",e.MonthGrid="month_grid",e.MonthCaption="month_caption",e.MonthsDropdown="months_dropdown",e.Month="month",e.Months="months",e.Nav="nav",e.NextMonthButton="button_next",e.PreviousMonthButton="button_previous",e.Week="week",e.Weeks="weeks",e.Weekday="weekday",e.Weekdays="weekdays",e.WeekNumber="week_number",e.WeekNumberHeader="week_number_header",e.YearsDropdown="years_dropdown"})(P||(P={}));var C1;(function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"})(C1||(C1={}));var R1;(function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"})(R1||(R1={}));var k1;(function(e){e.weeks_before_enter="weeks_before_enter",e.weeks_before_exit="weeks_before_exit",e.weeks_after_enter="weeks_after_enter",e.weeks_after_exit="weeks_after_exit",e.caption_after_enter="caption_after_enter",e.caption_after_exit="caption_after_exit",e.caption_before_enter="caption_before_enter",e.caption_before_exit="caption_before_exit"})(k1||(k1={}));function Ae(e){const{options:t,className:n,components:r,classNames:s,...i}=e,a=[s[P.Dropdown],n].join(" "),l=t==null?void 0:t.find(({value:C})=>C===i.value);return g.createElement("span",{"data-disabled":i.disabled,className:s[P.DropdownRoot]},g.createElement(r.Select,{className:a,...i},t==null?void 0:t.map(({value:C,label:c,disabled:u})=>g.createElement(r.Option,{key:C,value:C,disabled:u},c))),g.createElement("span",{className:s[P.CaptionLabel],"aria-hidden":!0},l==null?void 0:l.label,g.createElement(r.Chevron,{orientation:"down",size:18,className:s[P.Chevron]})))}function We(e){return g.createElement("div",{...e})}function Ye(e){return g.createElement("div",{...e})}function ze(e){const{calendarMonth:t,displayIndex:n,...r}=e;return g.createElement("div",{...r},e.children)}function Ge(e){const{calendarMonth:t,displayIndex:n,...r}=e;return g.createElement("div",{...r})}function qe(e){return g.createElement("table",{...e})}function Ue(e){return g.createElement("div",{...e})}const h5=g.createContext(void 0);function W2(){const e=g.useContext(h5);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function Ke(e){const{components:t}=W2();return g.createElement(t.Dropdown,{...e})}function Xe(e){const{onPreviousClick:t,onNextClick:n,previousMonth:r,nextMonth:s,...i}=e,{components:a,classNames:l,labels:{labelPrevious:C,labelNext:c}}=W2(),u=g.useCallback(d=>{s&&(n==null||n(d))},[s,n]),f=g.useCallback(d=>{r&&(t==null||t(d))},[r,t]);return g.createElement("nav",{...i},g.createElement(a.PreviousMonthButton,{type:"button",className:l[P.PreviousMonthButton],tabIndex:r?void 0:-1,"aria-disabled":r?void 0:!0,"aria-label":C(r),onClick:f},g.createElement(a.Chevron,{disabled:r?void 0:!0,className:l[P.Chevron],orientation:"left"})),g.createElement(a.NextMonthButton,{type:"button",className:l[P.NextMonthButton],tabIndex:s?void 0:-1,"aria-disabled":s?void 0:!0,"aria-label":c(s),onClick:u},g.createElement(a.Chevron,{disabled:s?void 0:!0,orientation:"right",className:l[P.Chevron]})))}function Qe(e){const{components:t}=W2();return g.createElement(t.Button,{...e})}function Je(e){return g.createElement("option",{...e})}function e9(e){const{components:t}=W2();return g.createElement(t.Button,{...e})}function t9(e){const{rootRef:t,...n}=e;return g.createElement("div",{...n,ref:t})}function n9(e){return g.createElement("select",{...e})}function r9(e){const{week:t,...n}=e;return g.createElement("tr",{...n})}function o9(e){return g.createElement("th",{...e})}function s9(e){return g.createElement("thead",{"aria-hidden":!0},g.createElement("tr",{...e}))}function i9(e){const{week:t,...n}=e;return g.createElement("th",{...n})}function a9(e){return g.createElement("th",{...e})}function l9(e){return g.createElement("tbody",{...e})}function C9(e){const{components:t}=W2();return g.createElement(t.Dropdown,{...e})}const c9=Object.freeze(Object.defineProperty({__proto__:null,Button:Fe,CaptionLabel:Be,Chevron:$e,Day:Te,DayButton:Ie,Dropdown:Ae,DropdownNav:We,Footer:Ye,Month:ze,MonthCaption:Ge,MonthGrid:qe,Months:Ue,MonthsDropdown:Ke,Nav:Xe,NextMonthButton:Qe,Option:Je,PreviousMonthButton:e9,Root:t9,Select:n9,Week:r9,WeekNumber:i9,WeekNumberHeader:a9,Weekday:o9,Weekdays:s9,Weeks:l9,YearsDropdown:C9},Symbol.toStringTag,{value:"Module"}));function G1(e,t,n=!1,r=A1){let{from:s,to:i}=e;const{differenceInCalendarDays:a,isSameDay:l}=r;return s&&i?(a(i,s)<0&&([s,i]=[i,s]),a(t,s)>=(n?1:0)&&a(i,t)>=(n?1:0)):!n&&i?l(i,t):!n&&s?l(s,t):!1}function r3(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function r4(e){return!!(e&&typeof e=="object"&&"from"in e)}function o3(e){return!!(e&&typeof e=="object"&&"after"in e)}function s3(e){return!!(e&&typeof e=="object"&&"before"in e)}function g5(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function m5(e,t){return Array.isArray(e)&&e.every(t.isDate)}function q1(e,t,n=A1){const r=Array.isArray(t)?t:[t],{isSameDay:s,differenceInCalendarDays:i,isAfter:a}=n;return r.some(l=>{if(typeof l=="boolean")return l;if(n.isDate(l))return s(e,l);if(m5(l,n))return l.some(C=>s(e,C));if(r4(l))return G1(l,e,!1,n);if(g5(l))return Array.isArray(l.dayOfWeek)?l.dayOfWeek.includes(e.getDay()):l.dayOfWeek===e.getDay();if(r3(l)){const C=i(l.before,e),c=i(l.after,e),u=C>0,f=c<0;return a(l.before,l.after)?f&&u:u||f}return o3(l)?i(e,l.after)>0:s3(l)?i(l.before,e)>0:typeof l=="function"?l(e):!1})}function u9(e,t,n,r,s){const{disabled:i,hidden:a,modifiers:l,showOutsideDays:C,broadcastCalendar:c,today:u=s.today()}=t,{isSameDay:f,isSameMonth:d,startOfMonth:h,isBefore:m,endOfMonth:x,isAfter:p}=s,y=n&&h(n),M=r&&x(r),v={[C1.focused]:[],[C1.outside]:[],[C1.disabled]:[],[C1.hidden]:[],[C1.today]:[]},k={};for(const b of e){const{date:w,displayMonth:N}=b,L=!!(N&&!d(w,N)),E=!!(y&&m(w,y)),H=!!(M&&p(w,M)),Z=!!(i&&q1(w,i,s)),V=!!(a&&q1(w,a,s))||E||H||!c&&!C&&L||c&&C===!1&&L,F=f(w,u);L&&v.outside.push(b),Z&&v.disabled.push(b),V&&v.hidden.push(b),F&&v.today.push(b),l&&Object.keys(l).forEach(z=>{const W=l==null?void 0:l[z];W&&q1(w,W,s)&&(k[z]?k[z].push(b):k[z]=[b])})}return b=>{const w={[C1.focused]:!1,[C1.disabled]:!1,[C1.hidden]:!1,[C1.outside]:!1,[C1.today]:!1},N={};for(const L in v){const E=v[L];w[L]=E.some(H=>H===b)}for(const L in k)N[L]=k[L].some(E=>E===b);return{...w,...N}}}function d9(e,t,n={}){return Object.entries(e).filter(([,s])=>s===!0).reduce((s,[i])=>(n[i]?s.push(n[i]):t[C1[i]]?s.push(t[C1[i]]):t[R1[i]]&&s.push(t[R1[i]]),s),[t[P.Day]])}function f9(e){return{...c9,...e}}function h9(e){const t={"data-mode":e.mode??void 0,"data-required":"required"in e?e.required:void 0,"data-multiple-months":e.numberOfMonths&&e.numberOfMonths>1||void 0,"data-week-numbers":e.showWeekNumber||void 0,"data-broadcast-calendar":e.broadcastCalendar||void 0,"data-nav-layout":e.navLayout||void 0};return Object.entries(e).forEach(([n,r])=>{n.startsWith("data-")&&(t[n]=r)}),t}function g9(){const e={};for(const t in P)e[P[t]]=`rdp-${P[t]}`;for(const t in C1)e[C1[t]]=`rdp-${C1[t]}`;for(const t in R1)e[R1[t]]=`rdp-${R1[t]}`;for(const t in k1)e[k1[t]]=`rdp-${k1[t]}`;return e}function p5(e,t,n){return(n??new N1(t)).formatMonthYear(e)}const m9=p5;function p9(e,t,n){return(n??new N1(t)).format(e,"d")}function x9(e,t=A1){return t.format(e,"LLLL")}function v9(e,t,n){return(n??new N1(t)).format(e,"cccccc")}function w9(e,t=A1){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function y9(){return""}function x5(e,t=A1){return t.format(e,"yyyy")}const j9=x5,M9=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:p5,formatDay:p9,formatMonthCaption:m9,formatMonthDropdown:x9,formatWeekNumber:w9,formatWeekNumberHeader:y9,formatWeekdayName:v9,formatYearCaption:j9,formatYearDropdown:x5},Symbol.toStringTag,{value:"Module"}));function b9(e){return e!=null&&e.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),e!=null&&e.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{...M9,...e}}function i3(e,t,n,r){let s=(r??new N1(n)).format(e,"PPPP");return t.today&&(s=`Today, ${s}`),t.selected&&(s=`${s}, selected`),s}const L9=i3;function a3(e,t,n){return(n??new N1(t)).formatMonthYear(e)}const S9=a3;function v5(e,t,n,r){let s=(r??new N1(n)).format(e,"PPPP");return t!=null&&t.today&&(s=`Today, ${s}`),s}function w5(e){return"Choose the Month"}function y5(){return""}const k9="Go to the Next Month";function j5(e,t){return k9}function M5(e){return"Go to the Previous Month"}function b5(e,t,n){return(n??new N1(t)).format(e,"cccc")}function L5(e,t){return`Week ${e}`}function S5(e){return"Week Number"}function k5(e){return"Choose the Year"}const N9=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:S9,labelDay:L9,labelDayButton:i3,labelGrid:a3,labelGridcell:v5,labelMonthDropdown:w5,labelNav:y5,labelNext:j5,labelPrevious:M5,labelWeekNumber:L5,labelWeekNumberHeader:S5,labelWeekday:b5,labelYearDropdown:k5},Symbol.toStringTag,{value:"Module"})),D1=(e,t,n)=>t||(n?typeof n=="function"?n:(...r)=>n:e);function H9(e,t){var r;const n=((r=t.locale)==null?void 0:r.labels)??{};return{...N9,...e??{},labelDayButton:D1(i3,e==null?void 0:e.labelDayButton,n.labelDayButton),labelMonthDropdown:D1(w5,e==null?void 0:e.labelMonthDropdown,n.labelMonthDropdown),labelNext:D1(j5,e==null?void 0:e.labelNext,n.labelNext),labelPrevious:D1(M5,e==null?void 0:e.labelPrevious,n.labelPrevious),labelWeekNumber:D1(L5,e==null?void 0:e.labelWeekNumber,n.labelWeekNumber),labelYearDropdown:D1(k5,e==null?void 0:e.labelYearDropdown,n.labelYearDropdown),labelGrid:D1(a3,e==null?void 0:e.labelGrid,n.labelGrid),labelGridcell:D1(v5,e==null?void 0:e.labelGridcell,n.labelGridcell),labelNav:D1(y5,e==null?void 0:e.labelNav,n.labelNav),labelWeekNumberHeader:D1(S5,e==null?void 0:e.labelWeekNumberHeader,n.labelWeekNumberHeader),labelWeekday:D1(b5,e==null?void 0:e.labelWeekday,n.labelWeekday)}}function V9(e,t,n,r,s){const{startOfMonth:i,startOfYear:a,endOfYear:l,eachMonthOfInterval:C,getMonth:c}=s;return C({start:a(e),end:l(e)}).map(d=>{const h=r.formatMonthDropdown(d,s),m=c(d),x=t&&d<i(t)||n&&d>i(n)||!1;return{value:m,label:h,disabled:x}})}function E9(e,t={},n={}){let r={...t==null?void 0:t[P.Day]};return Object.entries(e).filter(([,s])=>s===!0).forEach(([s])=>{r={...r,...n==null?void 0:n[s]}}),r}function O9(e,t,n,r){const s=r??e.today(),i=n?e.startOfBroadcastWeek(s,e):t?e.startOfISOWeek(s):e.startOfWeek(s),a=[];for(let l=0;l<7;l++){const C=e.addDays(i,l);a.push(C)}return a}function Z9(e,t,n,r,s=!1){if(!e||!t)return;const{startOfYear:i,endOfYear:a,eachYearOfInterval:l,getYear:C}=r,c=i(e),u=a(t),f=l({start:c,end:u});return s&&f.reverse(),f.map(d=>{const h=n.formatYearDropdown(d,r);return{value:C(d),label:h,disabled:!1}})}function _9(e,t={}){var l;const{weekStartsOn:n,locale:r}=t,s=n??((l=r==null?void 0:r.options)==null?void 0:l.weekStartsOn)??0,i=C=>{const c=typeof C=="number"||typeof C=="string"?new Date(C):C;return new b1(c.getFullYear(),c.getMonth(),c.getDate(),12,0,0,e)},a=C=>{const c=i(C);return new Date(c.getFullYear(),c.getMonth(),c.getDate(),0,0,0,0)};return{today:()=>i(b1.tz(e)),newDate:(C,c,u)=>new b1(C,c,u,12,0,0,e),startOfDay:C=>i(C),startOfWeek:(C,c)=>{const u=i(C),f=(c==null?void 0:c.weekStartsOn)??s,d=(u.getDay()-f+7)%7;return u.setDate(u.getDate()-d),u},startOfISOWeek:C=>{const c=i(C),u=(c.getDay()-1+7)%7;return c.setDate(c.getDate()-u),c},startOfMonth:C=>{const c=i(C);return c.setDate(1),c},startOfYear:C=>{const c=i(C);return c.setMonth(0,1),c},endOfWeek:(C,c)=>{const u=i(C),h=((((c==null?void 0:c.weekStartsOn)??s)+6)%7-u.getDay()+7)%7;return u.setDate(u.getDate()+h),u},endOfISOWeek:C=>{const c=i(C),u=(7-c.getDay())%7;return c.setDate(c.getDate()+u),c},endOfMonth:C=>{const c=i(C);return c.setMonth(c.getMonth()+1,0),c},endOfYear:C=>{const c=i(C);return c.setMonth(11,31),c},eachMonthOfInterval:C=>{const c=i(C.start),u=i(C.end),f=[],d=new b1(c.getFullYear(),c.getMonth(),1,12,0,0,e),h=u.getFullYear()*12+u.getMonth();for(;d.getFullYear()*12+d.getMonth()<=h;)f.push(new b1(d,e)),d.setMonth(d.getMonth()+1,1);return f},addDays:(C,c)=>{const u=i(C);return u.setDate(u.getDate()+c),u},addWeeks:(C,c)=>{const u=i(C);return u.setDate(u.getDate()+c*7),u},addMonths:(C,c)=>{const u=i(C);return u.setMonth(u.getMonth()+c),u},addYears:(C,c)=>{const u=i(C);return u.setFullYear(u.getFullYear()+c),u},eachYearOfInterval:C=>{const c=i(C.start),u=i(C.end),f=[],d=new b1(c.getFullYear(),0,1,12,0,0,e);for(;d.getFullYear()<=u.getFullYear();)f.push(new b1(d,e)),d.setFullYear(d.getFullYear()+1,0,1);return f},getWeek:(C,c)=>{var f;const u=a(C);return n3(u,{weekStartsOn:(c==null?void 0:c.weekStartsOn)??s,firstWeekContainsDate:(c==null?void 0:c.firstWeekContainsDate)??((f=r==null?void 0:r.options)==null?void 0:f.firstWeekContainsDate)??1})},getISOWeek:C=>{const c=a(C);return t3(c)},differenceInCalendarDays:(C,c)=>{const u=a(C),f=a(c);return e3(u,f)},differenceInCalendarMonths:(C,c)=>{const u=a(C),f=a(c);return o5(u,f)}}}const Y2=e=>e instanceof HTMLElement?e:null,g4=e=>[...e.querySelectorAll("[data-animated-month]")??[]],D9=e=>Y2(e.querySelector("[data-animated-month]")),m4=e=>Y2(e.querySelector("[data-animated-caption]")),p4=e=>Y2(e.querySelector("[data-animated-weeks]")),R9=e=>Y2(e.querySelector("[data-animated-nav]")),P9=e=>Y2(e.querySelector("[data-animated-weekdays]"));function F9(e,t,{classNames:n,months:r,focused:s,dateLib:i}){const a=g.useRef(null),l=g.useRef(r),C=g.useRef(!1);g.useLayoutEffect(()=>{const c=l.current;if(l.current=r,!t||!e.current||!(e.current instanceof HTMLElement)||r.length===0||c.length===0||r.length!==c.length)return;const u=i.isSameMonth(r[0].date,c[0].date),f=i.isAfter(r[0].date,c[0].date),d=f?n[k1.caption_after_enter]:n[k1.caption_before_enter],h=f?n[k1.weeks_after_enter]:n[k1.weeks_before_enter],m=a.current,x=e.current.cloneNode(!0);if(x instanceof HTMLElement?(g4(x).forEach(v=>{if(!(v instanceof HTMLElement))return;const k=D9(v);k&&v.contains(k)&&v.removeChild(k);const b=m4(v);b&&b.classList.remove(d);const w=p4(v);w&&w.classList.remove(h)}),a.current=x):a.current=null,C.current||u||s)return;const p=m instanceof HTMLElement?g4(m):[],y=g4(e.current);if(y!=null&&y.every(M=>M instanceof HTMLElement)&&p&&p.every(M=>M instanceof HTMLElement)){C.current=!0,e.current.style.isolation="isolate";const M=R9(e.current);M&&(M.style.zIndex="1"),y.forEach((v,k)=>{const b=p[k];if(!b)return;v.style.position="relative",v.style.overflow="hidden";const w=m4(v);w&&w.classList.add(d);const N=p4(v);N&&N.classList.add(h);const L=()=>{C.current=!1,e.current&&(e.current.style.isolation=""),M&&(M.style.zIndex=""),w&&w.classList.remove(d),N&&N.classList.remove(h),v.style.position="",v.style.overflow="",v.contains(b)&&v.removeChild(b)};b.style.pointerEvents="none",b.style.position="absolute",b.style.overflow="hidden",b.setAttribute("aria-hidden","true");const E=P9(b);E&&(E.style.opacity="0");const H=m4(b);H&&(H.classList.add(f?n[k1.caption_before_exit]:n[k1.caption_after_exit]),H.addEventListener("animationend",L));const Z=p4(b);Z&&Z.classList.add(f?n[k1.weeks_before_exit]:n[k1.weeks_after_exit]),v.insertBefore(b,v.firstChild)})}})}function B9(e,t,n,r){const s=e[0],i=e[e.length-1],{ISOWeek:a,fixedWeeks:l,broadcastCalendar:C}=n??{},{addDays:c,differenceInCalendarDays:u,differenceInCalendarMonths:f,endOfBroadcastWeek:d,endOfISOWeek:h,endOfMonth:m,endOfWeek:x,isAfter:p,startOfBroadcastWeek:y,startOfISOWeek:M,startOfWeek:v}=r,k=C?y(s,r):a?M(s):v(s),b=C?d(i):a?h(m(i)):x(m(i)),w=t&&(C?d(t):a?h(t):x(t)),N=w&&p(b,w)?w:b,L=u(N,k),E=f(i,s)+1,H=[];for(let F=0;F<=L;F++){const z=c(k,F);H.push(z)}const V=(C?35:42)*E;if(l&&H.length<V){const F=V-H.length;for(let z=0;z<F;z++){const W=c(H[H.length-1],1);H.push(W)}}return H}function $9(e){const t=[];return e.reduce((n,r)=>{const s=r.weeks.reduce((i,a)=>i.concat(a.days.slice()),t.slice());return n.concat(s.slice())},t.slice())}function T9(e,t,n,r){const{numberOfMonths:s=1}=n,i=[];for(let a=0;a<s;a++){const l=r.addMonths(e,a);if(t&&l>t)break;i.push(l)}return i}function k3(e,t,n,r){const{month:s,defaultMonth:i,today:a=r.today(),numberOfMonths:l=1}=e;let C=s||i||a;const{differenceInCalendarMonths:c,addMonths:u,startOfMonth:f}=r;if(n&&c(n,C)<l-1){const d=-1*(l-1);C=u(n,d)}return t&&c(C,t)<0&&(C=t),f(C)}function I9(e,t,n,r){const{addDays:s,endOfBroadcastWeek:i,endOfISOWeek:a,endOfMonth:l,endOfWeek:C,getISOWeek:c,getWeek:u,startOfBroadcastWeek:f,startOfISOWeek:d,startOfWeek:h}=r,m=e.reduce((x,p)=>{const y=n.broadcastCalendar?f(p,r):n.ISOWeek?d(p):h(p),M=n.broadcastCalendar?i(p):n.ISOWeek?a(l(p)):C(l(p)),v=t.filter(N=>N>=y&&N<=M),k=n.broadcastCalendar?35:42;if(n.fixedWeeks&&v.length<k){const N=t.filter(L=>{const E=k-v.length;return L>M&&L<=s(M,E)});v.push(...N)}const b=v.reduce((N,L)=>{const E=n.ISOWeek?c(L):u(L),H=N.find(V=>V.weekNumber===E),Z=new f5(L,p,r);return H?H.days.push(Z):N.push(new Pe(E,[Z])),N},[]),w=new Re(p,b);return x.push(w),x},[]);return n.reverseMonths?m.reverse():m}function A9(e,t){let{startMonth:n,endMonth:r}=e;const{startOfYear:s,startOfDay:i,startOfMonth:a,endOfMonth:l,addYears:C,endOfYear:c,newDate:u,today:f}=t,{fromYear:d,toYear:h,fromMonth:m,toMonth:x}=e;!n&&m&&(n=m),!n&&d&&(n=t.newDate(d,0,1)),!r&&x&&(r=x),!r&&h&&(r=u(h,11,31));const p=e.captionLayout==="dropdown"||e.captionLayout==="dropdown-years";return n?n=a(n):d?n=u(d,0,1):!n&&p&&(n=s(C(e.today??f(),-100))),r?r=l(r):h?r=u(h,11,31):!r&&p&&(r=c(e.today??f())),[n&&i(n),r&&i(r)]}function W9(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:s,numberOfMonths:i=1}=n,{startOfMonth:a,addMonths:l,differenceInCalendarMonths:C}=r,c=s?i:1,u=a(e);if(!t)return l(u,c);if(!(C(t,e)<i))return l(u,c)}function Y9(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:s,numberOfMonths:i}=n,{startOfMonth:a,addMonths:l,differenceInCalendarMonths:C}=r,c=s?i??1:1,u=a(e);if(!t)return l(u,-c);if(!(C(u,t)<=0))return l(u,-c)}function z9(e){const t=[];return e.reduce((n,r)=>n.concat(r.weeks.slice()),t.slice())}function o4(e,t){const[n,r]=g.useState(e);return[t===void 0?n:t,r]}function G9(e,t){var k;const[n,r]=A9(e,t),{startOfMonth:s,endOfMonth:i}=t,a=k3(e,n,r,t),[l,C]=o4(a,e.month?a:void 0);g.useEffect(()=>{const b=k3(e,n,r,t);C(b)},[e.timeZone]);const{months:c,weeks:u,days:f,previousMonth:d,nextMonth:h}=g.useMemo(()=>{const b=T9(l,r,{numberOfMonths:e.numberOfMonths},t),w=B9(b,e.endMonth?i(e.endMonth):void 0,{ISOWeek:e.ISOWeek,fixedWeeks:e.fixedWeeks,broadcastCalendar:e.broadcastCalendar},t),N=I9(b,w,{broadcastCalendar:e.broadcastCalendar,fixedWeeks:e.fixedWeeks,ISOWeek:e.ISOWeek,reverseMonths:e.reverseMonths},t),L=z9(N),E=$9(N),H=Y9(l,n,e,t),Z=W9(l,r,e,t);return{months:N,weeks:L,days:E,previousMonth:H,nextMonth:Z}},[t,l.getTime(),r==null?void 0:r.getTime(),n==null?void 0:n.getTime(),e.disableNavigation,e.broadcastCalendar,(k=e.endMonth)==null?void 0:k.getTime(),e.fixedWeeks,e.ISOWeek,e.numberOfMonths,e.pagedNavigation,e.reverseMonths]),{disableNavigation:m,onMonthChange:x}=e,p=b=>u.some(w=>w.days.some(N=>N.isEqualTo(b))),y=b=>{if(m)return;let w=s(b);n&&w<s(n)&&(w=s(n)),r&&w>s(r)&&(w=s(r)),C(w),x==null||x(w)};return{months:c,weeks:u,days:f,navStart:n,navEnd:r,previousMonth:d,nextMonth:h,goToMonth:y,goToDay:b=>{p(b)||y(b.date)}}}var $1;(function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"})($1||($1={}));function N3(e){return!e[C1.disabled]&&!e[C1.hidden]&&!e[C1.outside]}function q9(e,t,n,r){let s,i=-1;for(const a of e){const l=t(a);N3(l)&&(l[C1.focused]&&i<$1.FocusedModifier?(s=a,i=$1.FocusedModifier):r!=null&&r.isEqualTo(a)&&i<$1.LastFocused?(s=a,i=$1.LastFocused):n(a.date)&&i<$1.Selected?(s=a,i=$1.Selected):l[C1.today]&&i<$1.Today&&(s=a,i=$1.Today))}return s||(s=e.find(a=>N3(t(a)))),s}function U9(e,t,n,r,s,i,a){const{ISOWeek:l,broadcastCalendar:C}=i,{addDays:c,addMonths:u,addWeeks:f,addYears:d,endOfBroadcastWeek:h,endOfISOWeek:m,endOfWeek:x,max:p,min:y,startOfBroadcastWeek:M,startOfISOWeek:v,startOfWeek:k}=a;let w={day:c,week:f,month:u,year:d,startOfWeek:N=>C?M(N,a):l?v(N):k(N),endOfWeek:N=>C?h(N):l?m(N):x(N)}[e](n,t==="after"?1:-1);return t==="before"&&r?w=p([r,w]):t==="after"&&s&&(w=y([s,w])),w}function N5(e,t,n,r,s,i,a,l=0){if(l>365)return;const C=U9(e,t,n.date,r,s,i,a),c=!!(i.disabled&&q1(C,i.disabled,a)),u=!!(i.hidden&&q1(C,i.hidden,a)),f=C,d=new f5(C,f,a);return!c&&!u?d:N5(e,t,d,r,s,i,a,l+1)}function K9(e,t,n,r,s){const{autoFocus:i}=e,[a,l]=g.useState(),C=q9(t.days,n,r||(()=>!1),a),[c,u]=g.useState(i?C:void 0);return{isFocusTarget:x=>!!(C!=null&&C.isEqualTo(x)),setFocused:u,focused:c,blur:()=>{l(c),u(void 0)},moveFocus:(x,p)=>{if(!c)return;const y=N5(x,p,c,t.navStart,t.navEnd,e,s);y&&(e.disableNavigation&&!t.days.some(v=>v.isEqualTo(y))||(t.goToDay(y),u(y)))}}}function X9(e,t){const{selected:n,required:r,onSelect:s}=e,[i,a]=o4(n,s?n:void 0),l=s?n:i,{isSameDay:C}=t,c=h=>(l==null?void 0:l.some(m=>C(m,h)))??!1,{min:u,max:f}=e;return{selected:l,select:(h,m,x)=>{let p=[...l??[]];if(c(h)){if((l==null?void 0:l.length)===u||r&&(l==null?void 0:l.length)===1)return;p=l==null?void 0:l.filter(y=>!C(y,h))}else(l==null?void 0:l.length)===f?p=[h]:p=[...p,h];return s||a(p),s==null||s(p,h,m,x),p},isSelected:c}}function Q9(e,t,n=0,r=0,s=!1,i=A1){const{from:a,to:l}=t||{},{isSameDay:C,isAfter:c,isBefore:u}=i;let f;if(!a&&!l)f={from:e,to:n>0?void 0:e};else if(a&&!l)C(a,e)?n===0?f={from:a,to:e}:s?f={from:a,to:void 0}:f=void 0:u(e,a)?f={from:e,to:a}:f={from:a,to:e};else if(a&&l)if(C(a,e)&&C(l,e))s?f={from:a,to:l}:f=void 0;else if(C(a,e))f={from:a,to:n>0?void 0:e};else if(C(l,e))f={from:e,to:n>0?void 0:e};else if(u(e,a))f={from:e,to:l};else if(c(e,a))f={from:a,to:e};else if(c(e,l))f={from:a,to:e};else throw new Error("Invalid range");if(f!=null&&f.from&&(f!=null&&f.to)){const d=i.differenceInCalendarDays(f.to,f.from);r>0&&d>r?f={from:e,to:void 0}:n>1&&d<n&&(f={from:e,to:void 0})}return f}function J9(e,t,n=A1){const r=Array.isArray(t)?t:[t];let s=e.from;const i=n.differenceInCalendarDays(e.to,e.from),a=Math.min(i,6);for(let l=0;l<=a;l++){if(r.includes(s.getDay()))return!0;s=n.addDays(s,1)}return!1}function H3(e,t,n=A1){return G1(e,t.from,!1,n)||G1(e,t.to,!1,n)||G1(t,e.from,!1,n)||G1(t,e.to,!1,n)}function e8(e,t,n=A1){const r=Array.isArray(t)?t:[t];if(r.filter(l=>typeof l!="function").some(l=>typeof l=="boolean"?l:n.isDate(l)?G1(e,l,!1,n):m5(l,n)?l.some(C=>G1(e,C,!1,n)):r4(l)?l.from&&l.to?H3(e,{from:l.from,to:l.to},n):!1:g5(l)?J9(e,l.dayOfWeek,n):r3(l)?n.isAfter(l.before,l.after)?H3(e,{from:n.addDays(l.after,1),to:n.addDays(l.before,-1)},n):q1(e.from,l,n)||q1(e.to,l,n):o3(l)||s3(l)?q1(e.from,l,n)||q1(e.to,l,n):!1))return!0;const a=r.filter(l=>typeof l=="function");if(a.length){let l=e.from;const C=n.differenceInCalendarDays(e.to,e.from);for(let c=0;c<=C;c++){if(a.some(u=>u(l)))return!0;l=n.addDays(l,1)}}return!1}function t8(e,t){const{disabled:n,excludeDisabled:r,selected:s,required:i,onSelect:a}=e,[l,C]=o4(s,a?s:void 0),c=a?s:l;return{selected:c,select:(d,h,m)=>{const{min:x,max:p}=e,y=d?Q9(d,c,x,p,i,t):void 0;return r&&n&&(y!=null&&y.from)&&y.to&&e8({from:y.from,to:y.to},n,t)&&(y.from=d,y.to=void 0),a||C(y),a==null||a(y,d,h,m),y},isSelected:d=>c&&G1(c,d,!1,t)}}function n8(e,t){const{selected:n,required:r,onSelect:s}=e,[i,a]=o4(n,s?n:void 0),l=s?n:i,{isSameDay:C}=t;return{selected:l,select:(f,d,h)=>{let m=f;return!r&&l&&l&&C(f,l)&&(m=void 0),s||a(m),s==null||s(m,f,d,h),m},isSelected:f=>l?C(l,f):!1}}function r8(e,t){const n=n8(e,t),r=X9(e,t),s=t8(e,t);switch(e.mode){case"single":return n;case"multiple":return r;case"range":return s;default:return}}function E1(e,t){return e instanceof b1&&e.timeZone===t?e:new b1(e,t)}function p2(e,t,n){return E1(e,t)}function V3(e,t,n){return typeof e=="boolean"||typeof e=="function"?e:e instanceof Date?p2(e,t):Array.isArray(e)?e.map(r=>r instanceof Date?p2(r,t):r):r4(e)?{...e,from:e.from?E1(e.from,t):e.from,to:e.to?E1(e.to,t):e.to}:r3(e)?{before:p2(e.before,t),after:p2(e.after,t)}:o3(e)?{after:p2(e.after,t)}:s3(e)?{before:p2(e.before,t)}:e}function x4(e,t,n){return e&&(Array.isArray(e)?e.map(r=>V3(r,t)):V3(e,t))}function o8(e){var X1;let t=e;const n=t.timeZone;if(n&&(t={...e,timeZone:n},t.today&&(t.today=E1(t.today,n)),t.month&&(t.month=E1(t.month,n)),t.defaultMonth&&(t.defaultMonth=E1(t.defaultMonth,n)),t.startMonth&&(t.startMonth=E1(t.startMonth,n)),t.endMonth&&(t.endMonth=E1(t.endMonth,n)),t.mode==="single"&&t.selected?t.selected=E1(t.selected,n):t.mode==="multiple"&&t.selected?t.selected=(X1=t.selected)==null?void 0:X1.map(A=>E1(A,n)):t.mode==="range"&&t.selected&&(t.selected={from:t.selected.from?E1(t.selected.from,n):t.selected.from,to:t.selected.to?E1(t.selected.to,n):t.selected.to}),t.disabled!==void 0&&(t.disabled=x4(t.disabled,n)),t.hidden!==void 0&&(t.hidden=x4(t.hidden,n)),t.modifiers)){const A={};Object.keys(t.modifiers).forEach(K=>{var $;A[K]=x4(($=t.modifiers)==null?void 0:$[K],n)}),t.modifiers=A}const{components:r,formatters:s,labels:i,dateLib:a,locale:l,classNames:C}=g.useMemo(()=>{const A={...d5,...t.locale},K=t.broadcastCalendar?1:t.weekStartsOn,$=t.noonSafe&&t.timeZone?_9(t.timeZone,{weekStartsOn:K,locale:A}):void 0,X=t.dateLib&&$?{...$,...t.dateLib}:t.dateLib??$,y1=new N1({locale:A,weekStartsOn:K,firstWeekContainsDate:t.firstWeekContainsDate,useAdditionalWeekYearTokens:t.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:t.useAdditionalDayOfYearTokens,timeZone:t.timeZone,numerals:t.numerals},X);return{dateLib:y1,components:f9(t.components),formatters:b9(t.formatters),labels:H9(t.labels,y1.options),locale:A,classNames:{...g9(),...t.classNames}}},[t.locale,t.broadcastCalendar,t.weekStartsOn,t.firstWeekContainsDate,t.useAdditionalWeekYearTokens,t.useAdditionalDayOfYearTokens,t.timeZone,t.numerals,t.dateLib,t.noonSafe,t.components,t.formatters,t.labels,t.classNames]);t.today||(t={...t,today:a.today()});const{captionLayout:c,mode:u,navLayout:f,numberOfMonths:d=1,onDayBlur:h,onDayClick:m,onDayFocus:x,onDayKeyDown:p,onDayMouseEnter:y,onDayMouseLeave:M,onNextClick:v,onPrevClick:k,showWeekNumber:b,styles:w}=t,{formatCaption:N,formatDay:L,formatMonthDropdown:E,formatWeekNumber:H,formatWeekNumberHeader:Z,formatWeekdayName:V,formatYearDropdown:F}=s,z=G9(t,a),{days:W,months:c1,navStart:h1,navEnd:x1,previousMonth:Q,nextMonth:r1,goToMonth:S}=z,D=u9(W,t,h1,x1,a),{isSelected:Y,select:B,selected:f1}=r8(t,a)??{},{blur:R,focused:_,isFocusTarget:a1,moveFocus:g1,setFocused:u1}=K9(t,z,D,Y??(()=>!1),a),{labelDayButton:F1,labelGridcell:d1,labelGrid:s1,labelMonthDropdown:W1,labelNav:Z1,labelPrevious:b2,labelNext:n2,labelWeekday:L2,labelWeekNumber:r2,labelWeekNumberHeader:S2,labelYearDropdown:f2}=i,o2=g.useMemo(()=>O9(a,t.ISOWeek,t.broadcastCalendar,t.today),[a,t.ISOWeek,t.broadcastCalendar,t.today]),Y1=u!==void 0||m!==void 0,s2=g.useCallback(()=>{Q&&(S(Q),k==null||k(Q))},[Q,S,k]),_1=g.useCallback(()=>{r1&&(S(r1),v==null||v(r1))},[S,r1,v]),k2=g.useCallback((A,K)=>$=>{$.preventDefault(),$.stopPropagation(),u1(A),!K.disabled&&(B==null||B(A.date,K,$),m==null||m(A.date,K,$))},[B,m,u1]),J=g.useCallback((A,K)=>$=>{u1(A),x==null||x(A.date,K,$)},[x,u1]),l1=g.useCallback((A,K)=>$=>{R(),h==null||h(A.date,K,$)},[R,h]),V1=g.useCallback((A,K)=>$=>{const X={ArrowLeft:[$.shiftKey?"month":"day",t.dir==="rtl"?"after":"before"],ArrowRight:[$.shiftKey?"month":"day",t.dir==="rtl"?"before":"after"],ArrowDown:[$.shiftKey?"year":"week","after"],ArrowUp:[$.shiftKey?"year":"week","before"],PageUp:[$.shiftKey?"year":"month","before"],PageDown:[$.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(X[$.key]){$.preventDefault(),$.stopPropagation();const[y1,U]=X[$.key];g1(y1,U)}p==null||p(A.date,K,$)},[g1,p,t.dir]),B1=g.useCallback((A,K)=>$=>{y==null||y(A.date,K,$)},[y]),h2=g.useCallback((A,K)=>$=>{M==null||M(A.date,K,$)},[M]),N2=g.useCallback(A=>K=>{const $=Number(K.target.value),X=a.setMonth(a.startOfMonth(A),$);S(X)},[a,S]),g2=g.useCallback(A=>K=>{const $=Number(K.target.value),X=a.setYear(a.startOfMonth(A),$);S(X)},[a,S]),{className:O,style:G}=g.useMemo(()=>({className:[C[P.Root],t.className].filter(Boolean).join(" "),style:{...w==null?void 0:w[P.Root],...t.style}}),[C,t.className,t.style,w]),e1=h9(t),i1=g.useRef(null);F9(i1,!!t.animate,{classNames:C,months:c1,focused:_,dateLib:a});const i2={dayPickerProps:t,selected:f1,select:B,isSelected:Y,months:c1,nextMonth:r1,previousMonth:Q,goToMonth:S,getModifiers:D,components:r,classNames:C,styles:w,labels:i,formatters:s};return g.createElement(h5.Provider,{value:i2},g.createElement(r.Root,{rootRef:t.animate?i1:void 0,className:O,style:G,dir:t.dir,id:t.id,lang:t.lang,nonce:t.nonce,title:t.title,role:t.role,"aria-label":t["aria-label"],"aria-labelledby":t["aria-labelledby"],...e1},g.createElement(r.Months,{className:C[P.Months],style:w==null?void 0:w[P.Months]},!t.hideNavigation&&!f&&g.createElement(r.Nav,{"data-animated-nav":t.animate?"true":void 0,className:C[P.Nav],style:w==null?void 0:w[P.Nav],"aria-label":Z1(),onPreviousClick:s2,onNextClick:_1,previousMonth:Q,nextMonth:r1}),c1.map((A,K)=>g.createElement(r.Month,{"data-animated-month":t.animate?"true":void 0,className:C[P.Month],style:w==null?void 0:w[P.Month],key:K,displayIndex:K,calendarMonth:A},f==="around"&&!t.hideNavigation&&K===0&&g.createElement(r.PreviousMonthButton,{type:"button",className:C[P.PreviousMonthButton],tabIndex:Q?void 0:-1,"aria-disabled":Q?void 0:!0,"aria-label":b2(Q),onClick:s2,"data-animated-button":t.animate?"true":void 0},g.createElement(r.Chevron,{disabled:Q?void 0:!0,className:C[P.Chevron],orientation:t.dir==="rtl"?"right":"left"})),g.createElement(r.MonthCaption,{"data-animated-caption":t.animate?"true":void 0,className:C[P.MonthCaption],style:w==null?void 0:w[P.MonthCaption],calendarMonth:A,displayIndex:K},c!=null&&c.startsWith("dropdown")?g.createElement(r.DropdownNav,{className:C[P.Dropdowns],style:w==null?void 0:w[P.Dropdowns]},(()=>{const $=c==="dropdown"||c==="dropdown-months"?g.createElement(r.MonthsDropdown,{key:"month",className:C[P.MonthsDropdown],"aria-label":W1(),classNames:C,components:r,disabled:!!t.disableNavigation,onChange:N2(A.date),options:V9(A.date,h1,x1,s,a),style:w==null?void 0:w[P.Dropdown],value:a.getMonth(A.date)}):g.createElement("span",{key:"month"},E(A.date,a)),X=c==="dropdown"||c==="dropdown-years"?g.createElement(r.YearsDropdown,{key:"year",className:C[P.YearsDropdown],"aria-label":f2(a.options),classNames:C,components:r,disabled:!!t.disableNavigation,onChange:g2(A.date),options:Z9(h1,x1,s,a,!!t.reverseYears),style:w==null?void 0:w[P.Dropdown],value:a.getYear(A.date)}):g.createElement("span",{key:"year"},F(A.date,a));return a.getMonthYearOrder()==="year-first"?[X,$]:[$,X]})(),g.createElement("span",{role:"status","aria-live":"polite",style:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"}},N(A.date,a.options,a))):g.createElement(r.CaptionLabel,{className:C[P.CaptionLabel],role:"status","aria-live":"polite"},N(A.date,a.options,a))),f==="around"&&!t.hideNavigation&&K===d-1&&g.createElement(r.NextMonthButton,{type:"button",className:C[P.NextMonthButton],tabIndex:r1?void 0:-1,"aria-disabled":r1?void 0:!0,"aria-label":n2(r1),onClick:_1,"data-animated-button":t.animate?"true":void 0},g.createElement(r.Chevron,{disabled:r1?void 0:!0,className:C[P.Chevron],orientation:t.dir==="rtl"?"left":"right"})),K===d-1&&f==="after"&&!t.hideNavigation&&g.createElement(r.Nav,{"data-animated-nav":t.animate?"true":void 0,className:C[P.Nav],style:w==null?void 0:w[P.Nav],"aria-label":Z1(),onPreviousClick:s2,onNextClick:_1,previousMonth:Q,nextMonth:r1}),g.createElement(r.MonthGrid,{role:"grid","aria-multiselectable":u==="multiple"||u==="range","aria-label":s1(A.date,a.options,a)||void 0,className:C[P.MonthGrid],style:w==null?void 0:w[P.MonthGrid]},!t.hideWeekdays&&g.createElement(r.Weekdays,{"data-animated-weekdays":t.animate?"true":void 0,className:C[P.Weekdays],style:w==null?void 0:w[P.Weekdays]},b&&g.createElement(r.WeekNumberHeader,{"aria-label":S2(a.options),className:C[P.WeekNumberHeader],style:w==null?void 0:w[P.WeekNumberHeader],scope:"col"},Z()),o2.map($=>g.createElement(r.Weekday,{"aria-label":L2($,a.options,a),className:C[P.Weekday],key:String($),style:w==null?void 0:w[P.Weekday],scope:"col"},V($,a.options,a)))),g.createElement(r.Weeks,{"data-animated-weeks":t.animate?"true":void 0,className:C[P.Weeks],style:w==null?void 0:w[P.Weeks]},A.weeks.map($=>g.createElement(r.Week,{className:C[P.Week],key:$.weekNumber,style:w==null?void 0:w[P.Week],week:$},b&&g.createElement(r.WeekNumber,{week:$,style:w==null?void 0:w[P.WeekNumber],"aria-label":r2($.weekNumber,{locale:l}),className:C[P.WeekNumber],scope:"row",role:"rowheader"},H($.weekNumber,a)),$.days.map(X=>{const{date:y1}=X,U=D(X);if(U[C1.focused]=!U.hidden&&!!(_!=null&&_.isEqualTo(X)),U[R1.selected]=(Y==null?void 0:Y(y1))||U.selected,r4(f1)){const{from:u4,to:d4}=f1;U[R1.range_start]=!!(u4&&d4&&a.isSameDay(y1,u4)),U[R1.range_end]=!!(u4&&d4&&a.isSameDay(y1,d4)),U[R1.range_middle]=G1(f1,y1,!0,a)}const c4=E9(U,w,t.modifiersStyles),v1=d9(U,C,t.modifiersClassNames),Q5=!Y1&&!U.hidden?d1(y1,U,a.options,a):void 0;return g.createElement(r.Day,{key:`${X.isoDate}_${X.displayMonthId}`,day:X,modifiers:U,className:v1.join(" "),style:c4,role:"gridcell","aria-selected":U.selected||void 0,"aria-label":Q5,"data-day":X.isoDate,"data-month":X.outside?X.dateMonthId:void 0,"data-selected":U.selected||void 0,"data-disabled":U.disabled||void 0,"data-hidden":U.hidden||void 0,"data-outside":X.outside||void 0,"data-focused":U.focused||void 0,"data-today":U.today||void 0},!U.hidden&&Y1?g.createElement(r.DayButton,{className:C[P.DayButton],style:w==null?void 0:w[P.DayButton],type:"button",day:X,modifiers:U,disabled:!U.focused&&U.disabled||void 0,"aria-disabled":U.focused&&U.disabled||void 0,tabIndex:a1(X)?0:-1,"aria-label":F1(y1,U,a.options,a),onClick:k2(X,U),onBlur:l1(X,U),onFocus:J(X,U),onKeyDown:V1(X,U),onMouseEnter:B1(X,U),onMouseLeave:h2(X,U)},L(y1,a.options,a)):!U.hidden&&L(X.date,a.options,a))})))))))),t.footer&&g.createElement(r.Footer,{className:C[P.Footer],style:w==null?void 0:w[P.Footer],role:"status","aria-live":"polite"},t.footer)))}const s8=({title:e="Date",variant:t="single",value:n,fromDate:r,toDate:s,onChange:i,onFromChange:a,onToChange:l,size:C="sm",height:c="lg",maxPastDays:u,maxRangeDays:f,currentSelected:d=!1,rangeDays:h=0})=>{const[m,x]=g.useState(null),p=g.useRef(null),y=g.useCallback(V=>{p.current&&!p.current.contains(V.target)&&x(null)},[]);g.useEffect(()=>(document.addEventListener("click",y),()=>{document.removeEventListener("click",y)}),[y]),g.useEffect(()=>{if(!d)return;const V=new Date;if(t==="single"&&!n&&(i==null||i(V)),t==="range"){const F=new Date;F.setDate(V.getDate()-h);const z=V;r||a==null||a(F),s||l==null||l(z)}},[d,t,n,r,s,h,i,a,l]);const M=(V,F)=>{const z=new Date;if(V>z)return!0;if(u){const W=new Date;if(W.setDate(z.getDate()-u),V<W)return!0}if(F==="to"&&r&&V<r||F==="from"&&s&&V>s)return!0;if(f){if(F==="to"&&r){const W=new Date(r);if(W.setDate(W.getDate()+f),V>W)return!0}if(F==="from"&&s){const W=new Date(s);if(W.setDate(W.getDate()-f),V<W)return!0}}return!1};g.useEffect(()=>{const V=()=>{m&&x(null)};return m&&window.addEventListener("scroll",V),()=>{window.removeEventListener("scroll",V)}},[m]);const v=(V,F)=>{if(!V){x(null);return}F==="single"&&(i==null||i(V),x(null)),F==="from"&&(a==null||a(V),x(null)),F==="to"&&(l==null||l(V),x(null))},k={sm:"min-w-28 w-auto",lg:"min-w-64 w-auto",full:"w-full"},b={sm:"h-10",lg:"min-h-12"},w=C==="sm"?"px-3":"py-3 px-5",N=`
|
|
29
29
|
w-full flex justify-between items-center gap-2
|
|
30
30
|
${b[c]}
|
|
31
31
|
bg-white border border-brightgray
|
|
@@ -61,6 +61,6 @@ React keys must be passed directly to JSX without using spread:
|
|
|
61
61
|
transition-colors duration-200
|
|
62
62
|
${d?"border-secondary":""}
|
|
63
63
|
${s?"cursor-not-allowed":"cursor-pointer"}
|
|
64
|
-
`,children:d&&o.jsx("span",{className:"w-4 h-4 rounded-full bg-secondary"})}),o.jsx("span",{children:f.label})]},f.value.toString())})})},P7=e=>{const{data:t,scrollSpeed:n=100,defaultTitle:r="No upcoming events. Stay tuned!"}=e,s=g.useRef(null),i=g.useRef(null);return g.useEffect(()=>{const a=s.current,l=i.current;if(a&&l){a.style.cursor="pointer";const C=a.offsetWidth,c=l.offsetWidth,f=(c+C)/n,d=[{transform:`translateX(${C}px)`},{transform:`translateX(-${c}px)`}],h=l.animate(d,{duration:f*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]),o.jsx("div",{className:"overflow-hidden h-9 flex items-center bg-primary",ref:s,children:o.jsx("div",{ref:i,className:"whitespace-nowrap will-change-transform flex items-center",children:(t==null?void 0:t.length)>0?o.jsx(o.Fragment,{children:t==null?void 0:t.map((a,l)=>{var C;return o.jsxs("div",{className:"flex items-center mx-10",children:[o.jsx(j,{text:a==null?void 0:a.title,variant:"captionBold",color:"error"}),o.jsx(q,{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,u)=>o.jsxs("span",{className:"mr-10 whitespace-nowrap flex items-center",children:[o.jsx("span",{className:"mr-2",children:o.jsx(j,{text:c.timeLabel,variant:"caption",color:"secondary",underline:!0})}),o.jsx(j,{text:c.description,variant:"captionBold",color:"secondary"})]},`${u+1}-${c.timeLabel}`))]},`${l}${a==null?void 0:a.title}`)})}):o.jsx(j,{variant:"captionBold",text:r,color:"error"})})})},F7=e=>{const{titles:t,bets:n,showHeader:r=!1}=e,[s,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=u=>{const{odds:f,showTitles:d=!1}=u;return o.jsx("div",{className:"flex items-center ml-auto justify-between min-w-32 lg:min-w-40",children:f==null?void 0:f.map(h=>o.jsx("div",{children:o.jsx(j,{variant:d?"caption":"captionBold",text:d?h.title:h.value})},h.title))})},c=({label:u,value:f})=>o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx(j,{variant:"caption",text:u,color:"slategray"}),o.jsx(j,{variant:"caption",text:f,color:"slategray"})]});return o.jsxs("div",{className:"w-full",children:[r&&o.jsx($5,{variant:"EventTitle",title:t.slipTitle||""}),o.jsx("div",{className:"max-h-64 overflow-y-auto p-1 bg-tertiary",children:o.jsx("div",{className:"space-y-1",children:n==null?void 0:n.map(u=>{const f=l.includes(u.type)?"Back":"Lay",{typeColor:d,bgColor:h}=a[f];return s?o.jsxs("div",{children:[o.jsxs("div",{className:`py-1 px-2 flex items-center ${d}`,children:[o.jsx(j,{variant:"caption",text:`${u.type} ${u.type===m1.BACK?`(${t.betFor})`:`(${t.betAgainst})`}`}),o.jsx(C,{odds:u.oddsDetails,showTitles:!0})]}),o.jsxs("div",{className:h,children:[o.jsxs("div",{className:"p-1 gap-4 flex items-center",children:[o.jsx(c,{label:t.reference,value:u.reference}),o.jsx(c,{label:t.time,value:u.time})]}),o.jsx("hr",{className:`border-t ${d}`}),o.jsxs("div",{className:"flex p-1 gap-2",children:[o.jsxs("div",{children:[o.jsx(j,{variant:"captionBold",text:u.subTitle}),o.jsx(j,{variant:"caption",text:u.result,color:"slategray"})]}),o.jsx(C,{odds:u.oddsDetails})]})]})]},u.id):o.jsxs("div",{className:`px-2 py-1 flex items-center ${h} gap-2`,children:[o.jsx("div",{className:`flex items-center justify-center p-1 min-w-12 rounded-md ${d}`,children:o.jsx(j,{variant:"captionBold",text:u.type})}),o.jsxs("div",{children:[o.jsx(j,{variant:"captionBold",text:u.subTitle}),o.jsx(j,{variant:"smallMedium",text:u.result,color:"slategray"})]}),o.jsx(C,{odds:u.oddsDetails})]},u.id)})})}),o.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&&o.jsx(T2,{checked:s,onChange:u=>i(u.target.checked)}),o.jsx(j,{variant:"caption",text:(n==null?void 0:n.length)>0?t.betInfo:t.nullMessage})]})]})},B7=({slides:e,isLoading:t=!1,altImageUrl:n="",interval:r=3e3,loop:s=!0,pauseOnHover:i=!0,className:a=""})=>{const[l,C]=g.useState(0),c=g.useRef(null),[u,f]=g.useState(!1),d=g.useCallback(()=>{C(h=>h===e.length-1?s?0:h:h+1)},[e.length,s]);return g.useEffect(()=>{if(i&&u)return;function h(){d(),c.current=setTimeout(h,r)}return c.current=setTimeout(h,r),()=>{c.current&&clearTimeout(c.current)}},[u,r,i,d]),o.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:()=>f(!0),onMouseLeave:()=>f(!1),children:t?o.jsx("div",{className:"flex justify-center items-center h-30 md:h-96",children:o.jsx(H5,{className:"animate-spin w-30 md:w-full"})}):o.jsxs(o.Fragment,{children:[e==null?void 0:e.map((h,m)=>o.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:o.jsx("img",{src:h.imageURL||n,alt:h.alt||"slide image",className:"relative w-full h-full object-fill"})},h.id)),o.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)=>o.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))})]})})},$7=({betSlipVariant:e,slipTitle:t,betSlipLabels:n,betDetails:r,betButtonAmounts:s=[],defaultStake:i=0,defaultOdds:a,minBet:l,maxBet:C,errorMessage:c,footerCTA:u,projectedPL:f,handleBetPlacement:d})=>{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],[v,k]=g.useState(i),[b,w]=g.useState(a);g.useEffect(()=>{k(i),w(a)},[i,a]);const N=g.useRef(d);g.useEffect(()=>{N.current=d},[d]),g.useEffect(()=>{N.current({stake:v,odds:b})},[v,b]);const L=H=>o.jsx("div",{className:"text-center",children:o.jsx(j,{variant:"caption",text:H})},H),E=H=>{const Z=Number(H.target.value),V=a-T1.LIMIT,F=a+T1.LIMIT;Z<V||Z>F||w(Z)};return o.jsxs("div",{className:"pb-2 bg-brightgray",children:[o.jsxs("div",{className:`p-2 grid grid-cols-2 items-center ${p}`,children:[o.jsx(j,{variant:"caption",text:t}),o.jsxs("div",{className:"flex items-center justify-end mr-10",children:[L(n.pLValueTitle),o.jsx("div",{className:"mx-1 min-w-8 max-w-16 text-right",children:o.jsx(j,{variant:"captionBold",text:f})})]})]}),o.jsxs("div",{className:y,children:[o.jsxs("div",{className:"grid grid-cols-2 gap-4 pt-2",children:[o.jsxs("div",{className:"flex flex-col justify-center m-2",children:[o.jsx(j,{variant:"captionBold",text:r.betTitle}),o.jsx(j,{variant:"caption",text:r.betDescription})]}),o.jsxs("div",{className:"flex items-center gap-1 justify-end px-2",children:[o.jsxs("div",{className:"flex flex-col flex-start items-center gap-1",children:[L(n.oddsTitle),o.jsx("input",{type:"number",step:T1.NUMBER_FILED_STEPS,value:b,min:a-T1.LIMIT,max:a+T1.LIMIT,onChange:E,onKeyDown:H=>H.preventDefault(),disabled:["Yes","No","Odd","Even"].includes(e),className:"min-w-12 max-w-14 h-10 rounded-sm px-1 bg-white border-0"})]}),o.jsxs("div",{className:"relative",children:[o.jsxs("div",{className:"flex flex-col items-center gap-1",children:[L(n.stakeTitle),o.jsx("input",{type:"text",value:v,onChange:H=>{const Z=H.target.value;u3.NUMBER_INPUT_REGEX.test(Z)&&k(Number(Z))},className:"min-w-12 max-w-16 h-10 rounded-sm p-2 bg-white border-0"})]}),v<l.amount&&o.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&&v>C.amount&&o.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]})]})]})]}),o.jsx("div",{className:"h-auto flex flex-wrap gap-2 overflow-x-auto mt-4 mx-2 mb-2 whitespace-nowrap no-scrollbar",children:s.length>0&&s.map(H=>o.jsx(o1,{text:`+${K1(H)}`,size:"small",variant:"outline",onClick:()=>k(Z=>Z+H)},H))}),o.jsxs("div",{className:`h-6 flex items-center justify-end border-t border-b p-2 gap-4 ${M}`,children:[o.jsx(j,{variant:"captionBold",text:`${l.title}: ${l.amount}`}),C&&o.jsx(j,{variant:"captionBold",text:`${C.title}: ${C.amount}`})]})]}),c&&o.jsx("div",{className:"px-2 mt-1",children:o.jsx(j,{variant:"caption",color:"error",text:c})}),u&&o.jsxs("div",{className:"flex items-center justify-between px-2 py-1",children:[o.jsx(o1,{text:"Clear",variant:"ghost",size:"small",onClick:()=>{k(0)}}),o.jsx("div",{className:"flex items-center justify-end mt-1 mr-2 gap-2",children:u.map((H,Z)=>o.jsx(o1,{...H},H.text||Z))})]})]})},X2=[{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"}],T7={true:"border-error focus-within:border-error",false:"border-brightgray focus-within:border-smokyblack"},I7={true:"bg-brightgray",false:"bg-white"},A7=e=>{const{label:t,id:n="",name:r="",value:s="",onChange:i=()=>{},placeholder:a="",isRequired:l=!1,className:C="",isDisabled:c=!1,hasError:u=!1,errorMessage:f="",...d}=e,[h,m]=s.split("-"),[x,p]=g.useState(!1),y=X2.find(L=>L.code===h)||X2[0],M=g.useRef(null);g.useEffect(()=>{const L=E=>{M.current&&!M.current.contains(E.target)&&p(!1)};return document.addEventListener("click",L),()=>{document.removeEventListener("click",L)}},[]);const v=L=>{p(!1),i==null||i(`${L}-${m||""}`)},k=L=>{i==null||i(`${h||X2[0].code}-${L}`)},b=`${x?"relative":""} flex items-center border rounded-lg px-7 py-4 min-h-16 ${T7[`${u}`]} ${I7[`${c}`]}`,w=`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}`,N=`${t}${l?"*":""}`;return o.jsxs("div",{className:"flex flex-col gap-2",children:[o.jsx(j,{variant:"body1",text:N,color:u?"error":"slategray"}),o.jsxs("div",{className:b,children:[o.jsxs("div",{className:"mr-2",ref:M,children:[o.jsxs("button",{type:"button",className:"flex items-center cursor-pointer gap-1",onClick:()=>!c&&p(!x),children:[o.jsx(j,{variant:"subtitle1",text:y.shortName,color:"smokyblack"}),o.jsx(q,{icon:x?"caretUp":"caretDown",color:"smokyblack"}),o.jsx("div",{className:"h-7 border border-neutralGray"}),o.jsx(j,{variant:"subtitle1",text:y.code,color:"smokyblack"})]}),x&&o.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:X2.map((L,E)=>{const H=L.code===y.code,Z=H?"white":"slategray";return o.jsx("li",{className:`px-3 py-2 flex items-center gap-2 cursor-pointer hover:bg-brightgray ${H?"bg-secondary text-white hover:bg-secondary/85":""}`,onClick:()=>v(L.code),onKeyUp:V=>{(V.key==="Enter"||V.key===" ")&&v(L.code)},children:o.jsx(j,{variant:"caption",text:`${L.code} ${L.fullName} (${L.shortName})`,color:Z})},`${L.code}-${E}`)})})]}),o.jsx("input",{id:n,name:r,type:"tel",value:m||"",onChange:L=>{k(L.target.value)},placeholder:a,className:w,disabled:c,...d})]}),u&&f&&o.jsx("div",{className:"flex justify-end",children:o.jsx(j,{variant:"caption",text:f,color:"error"})})]})},W7=e=>{const{text:t,onClick:n,iconName:r,variant:s="default"}=e,i=s==="action";return o.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:o.jsxs("div",{className:"flex justify-between items-center gap-2 w-full",children:[o.jsx(j,{variant:i?"subtitle2":"caption",text:t}),i&&r&&o.jsx(q,{icon:r,color:"black"})]})})},Y7=e=>{const{items:t,lastItem:n,variant:r="default"}=e,s=r==="action";return o.jsx("div",{className:`${s?"w-full":"w-fit shadow-md rounded-lg"} bg-white`,children:o.jsxs("ul",{className:"flex flex-col",children:[t.length===0?o.jsx("div",{className:`flex justify-center ${s?"w-full py-3":"w-40 py-2"}`,children:o.jsx(j,{variant:"caption",text:"No data available!",color:"slategray"})}):t.map(i=>o.jsx("li",{className:`${s?"border-b border-brightgray":""}`,children:o.jsx(W7,{...i,variant:r})},i.text)),!!n&&o.jsx("li",{children:o.jsxs("button",{type:"button",onClick:n.onClick,className:`${s?"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&&o.jsx(j,{text:n.text,variant:"subtitle2",color:"techBlue"}),!!n.iconName&&o.jsx(q,{icon:n.iconName,color:"techBlue"})]})})]})})},z7=e=>{const{steps:t}=e;return o.jsx("div",{className:"flex items-center justify-between w-full",children:t==null?void 0:t.map((n,r)=>{var c;const s=r===t.length-1,i=(c=t[r+1])==null?void 0:c.status,a=n.status==="completed"?o.jsx("div",{className:"p-[6px] md:p-4 bg-secondary rounded-full flex items-center justify-center shadow-lg",children:o.jsx("div",{className:"p-[2px] md:p-1 bg-white/40 rounded-full flex items-center justify-center",children:o.jsx("div",{className:"p-[2px] md:p-[6px] bg-white/30 rounded-full flex items-center justify-center",children:o.jsx("div",{className:"flex items-center justify-center bg-secondary/60 rounded-full",children:o.jsx(q,{icon:"doneFill",size:20,color:"white"})})})})}):n.status==="inProgress"?o.jsx("div",{className:"p-3 md:p-5 rounded-full bg-secondary flex items-center justify-center",children:o.jsx("div",{className:"p-1 md:p-2 bg-white/30 rounded-full flex items-center justify-center",children:o.jsx("div",{className:"w-2 h-2 md:w-4 md:h-4 bg-white rounded-full"})})}):o.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 o.jsxs("div",{className:"flex-1 flex flex-col items-center",children:[o.jsxs("div",{className:"relative flex items-center justify-center w-full",children:[o.jsx("div",{className:"flex justify-center",children:a}),!s&&o.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:o.jsx("div",{className:`h-[2px] w-full ${l}`})})]}),o.jsx("div",{className:"mt-2 md:mt-4 text-center",children:o.jsx(j,{variant:n.title.variant??"caption",...C})})]},`${r+1}`)})})},G7=e=>{const{walletData:t,footerCTA:n,redirectLinks:r}=e||{},{isMobile:s}=O1();return o.jsxs("div",{className:"max-w-56 rounded-md bg-primary shadow-md shadow-white p-2",children:[o.jsxs("div",{className:"pb-2",children:[t==null?void 0:t.map(i=>{var a,l,C;return o.jsxs("div",{className:"flex items-center justify-between gap-2",children:[o.jsx("div",{className:"flex-1",children:o.jsx(j,{text:(i==null?void 0:i.key)??"",variant:"caption",color:"white"})}),o.jsx("div",{className:"flex-1 text-left",children:o.jsx(j,{text:(i==null?void 0:i.value)??"",variant:"captionBold",color:(i==null?void 0:i.color)??"white"})}),!s&&((a=i==null?void 0:i.info)==null?void 0:a.title)&&o.jsx(C4,{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:o.jsx(q,{icon:"info",color:"white"})})]},i.key)}),o.jsx("div",{className:"flex justify-between pt-2 px-3 gap-2 flex-wrap",children:n==null?void 0:n.map((i,a)=>o.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}`))})]}),o.jsx("div",{className:"border-t border-brightgray pt-2 px-2",children:r==null?void 0:r.map((i,a)=>o.jsxs("button",{onClick:i==null?void 0:i.onClick,type:"button",className:"flex justify-between gap-2 py-1 w-full",children:[o.jsx(j,{text:(i==null?void 0:i.title)??"",variant:"caption",color:"white"}),o.jsx(q,{icon:"caretRight",color:"white"})]},`${a+1}-${i==null?void 0:i.title}`))})]})},q7=({id:e="",name:t="",label:n="",isRequired:r=!1,hasError:s=!1,errorMessage:i="",isDisabled:a=!1,onChange:l,instructionText:C,supportText:c,supportFormate:u,maxFiles:f=10,maxLimitMessage:d="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,v]=g.useState([]),[k,b]=g.useState(null),w=g.useRef(null),N=u.map(R=>`.${R.toLowerCase().replace(u3.FILE_FORMAT_REGEX,"")}`).join(","),L=M.length>=f,E=`${n}${r?" *":""}`,H=u.join(", ").toUpperCase(),Z=s?"border-error":p?"border-secondary":"border-slategray",V=R=>{var _;return((_=R.name.split(".").pop())==null?void 0:_.toLowerCase())??""},F=R=>{l==null||l({target:{name:t,files:R},currentTarget:{name:t,files:R}})},z=R=>{b(R)},W=R=>{R.target.value=""},c1=R=>{const _=V(R);return u.map(a1=>a1.toLowerCase()).includes(_)},h1=R=>R.size<=m*1024*1024,x1=R=>R.filter(_=>c1(_)&&h1(_)),Q=R=>{if(a)return;if(R.some(g1=>!c1(g1))){z(h);return}if(R.some(g1=>!h1(g1))){z(x);return}const _=x1(R);if(_.length===0){z(h);return}const a1=[...M,..._].slice(0,f);v(a1),b(null),F(a1)},r1=R=>{if(a)return;const _=M.filter((a1,g1)=>g1!==R);v(_),F(_)},S=R=>{R.preventDefault(),R.stopPropagation(),!(a||L)&&y(R.type==="dragenter"||R.type==="dragover")},D=R=>{var _;R.preventDefault(),R.stopPropagation(),!a&&(y(!1),Q(Array.from(((_=R.dataTransfer)==null?void 0:_.files)??[])))},Y=R=>{var _;R.stopPropagation(),!(a||L)&&((_=w.current)==null||_.click())},B=R=>{var _;a||L||(R.key==="Enter"||R.key===" ")&&(R.preventDefault(),(_=w.current)==null||_.click())},f1=R=>{const _=Array.from(R.target.files??[]);_.length>0&&Q(_),W(R)};return o.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[n&&o.jsx(j,{variant:"body1",text:E,color:s?"error":"slategray"}),o.jsxs("div",{"aria-disabled":a,onClick:Y,onKeyDown:B,onDragEnter:S,onDragOver:S,onDragLeave:S,onDrop:D,className:`border-2 border-dashed rounded-md transition-all duration-200 p-6 md:p-8 text-center focus:outline-none ${Z} ${L||a?"cursor-not-allowed opacity-60":"cursor-pointer hover:border-secondary"}`,children:[o.jsx("input",{id:e,name:t,type:"file",ref:w,accept:N,multiple:!0,disabled:a,onChange:f1,className:"hidden"}),o.jsxs("div",{className:"flex flex-col items-center justify-center pointer-events-none",children:[o.jsx(q,{icon:"upload"}),o.jsxs("div",{children:[o.jsx("div",{className:"flex gap-1 items-center justify-center",children:o.jsx(j,{variant:"subtitle2",text:C})}),o.jsxs("div",{className:"flex gap-2 justify-center my-2 flex-wrap",children:[o.jsx(j,{variant:"caption",text:`${c} :`}),o.jsx(j,{variant:"caption",text:`${H} (Max : ${m}MB)`})]}),(k||s)&&o.jsx(j,{variant:"caption",color:"error",text:k||i})]})]})]}),L&&d&&o.jsx(j,{variant:"caption",color:"error",text:d}),M.length>0&&o.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((R,_)=>{const a1=V(R);return o.jsxs("div",{className:"flex justify-between items-center rounded-md py-2 px-4 bg-offwhite",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(q,{icon:a1||"file"}),o.jsx(j,{variant:"body2",text:`${R.name} (${(R.size/(1024*1024)).toFixed(2)} MB)`})]}),!a&&o.jsx(q,{icon:"cancel",color:"slategray",size:20,onClick:()=>r1(_)})]},`${_+1}`)})})]})},U7=()=>{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,r=n*.4,s=30,i=n+(e.length-1)*s+16;return o.jsx(o.Fragment,{children:o.jsxs("div",{className:"p-6 space-y-6",children:[o.jsx("div",{className:"relative overflow-visible rounded-lg",style:{height:i},children:e.map((a,l)=>{const C=l*r,c=l*s,u=t[l%t.length];return o.jsx("div",{className:`absolute ${a.className} ${u} text-white rounded-xl shadow-md flex justify-center p-3`,style:{width:n,height:n,left:C,top:c},children:o.jsx(j,{variant:"captionBold",text:a.label,color:"white"})},a.className)})}),o.jsxs("div",{className:"p-5 bg-gray-100 rounded-xl shadow-inner",children:[o.jsx(j,{variant:"captionBold",text:"Z-Index Usage Details"}),o.jsx("div",{className:"mt-3 space-y-1",children:e.map(a=>o.jsxs("div",{className:"flex items-start gap-2",children:[o.jsx("span",{className:"font-mono text-sm text-gray-700 w-40",children:a.label}),o.jsxs("span",{className:"text-gray-600 text-sm",children:["→ ",a.usage]})]},a.className))})]})]})})},K7=({isOpen:e,onClose:t,betSlipVariant:n,slipTitle:r,betSlipLabels:s,betDetails:i,betButtonAmounts:a,defaultStake:l=0,defaultOdds:C,minBet:c,maxBet:u,projectedPL:f,footerCTA:d,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:v,secondaryBg:k,border:b}=x[y],[w,N]=g.useState(l),[L,E]=g.useState(C);g.useEffect(()=>{N(l),E(C)},[l,C]);const H=g.useRef(m);g.useEffect(()=>{H.current=m},[m]),g.useEffect(()=>{H.current({stake:w,odds:L})},[w,L]);const Z=V=>{const F=Number(V.target.value),z=C-T1.LIMIT,W=C+T1.LIMIT;F<z||F>W||E(F)};return e?o.jsx("div",{className:"fixed inset-0 z-level-6 flex items-start justify-center pointer-events-none",tabIndex:-1,children:o.jsxs("div",{className:"bg-white shadow-lg w-full pointer-events-auto",onMouseDown:V=>V.stopPropagation(),role:"presentation",children:[o.jsxs("div",{className:`flex items-center justify-between px-4 py-1 ${M}`,children:[o.jsx(j,{variant:"subtitle1",text:r,color:"white"}),o.jsx(q,{size:16,icon:"cancel",color:"white",onClick:t})]}),o.jsxs("div",{className:`${k} flex flex-row justify-between py-1 px-4`,children:[o.jsxs("div",{children:[o.jsx(j,{variant:"captionBold",text:i==null?void 0:i.betTitle}),o.jsx(j,{variant:"caption",text:i==null?void 0:i.betDescription})]}),o.jsxs("div",{className:"text-right",children:[o.jsx(j,{text:s.pLValueTitle,variant:"subtitle2"}),o.jsx(j,{text:f,variant:"caption"})]})]}),o.jsx("div",{className:`${k} px-4 pb-2 flex flex-wrap gap-3`,children:a.map(V=>o.jsx(o1,{text:`+${V}`,size:"extraSmall",variant:"outline",onClick:()=>N(w+V)},V))}),o.jsxs("div",{className:`${k} px-3 pb-1`,children:[o.jsxs("div",{className:"grid grid-cols-2 text-center mb-2",children:[o.jsx(j,{text:s.oddsTitle,variant:"captionBold"}),o.jsx(j,{text:s.stakeTitle,variant:"captionBold"})]}),o.jsxs("div",{className:"px-4 pb-1 grid grid-cols-2 gap-4",children:[o.jsx("input",{type:"number",step:T1.NUMBER_FILED_STEPS,value:L,min:C-T1.LIMIT,max:C+T1.LIMIT,disabled:["Yes","No","Odd","Even"].includes(n),onChange:Z,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"}),o.jsx("input",{type:"text",value:w,onChange:V=>{const F=V.target.value;u3.NUMBER_INPUT_REGEX.test(F)&&N(Number(F))},className:"w-full px-4 py-2 bg-white rounded-md shadow-sm text-center text-black outline-none"})]}),u&&w>u.amount?o.jsx("div",{className:"px-5 flex justify-end",children:o.jsx(j,{text:`${u.errorMessage} ${u.amount}`,variant:"caption",color:"error"})}):c&&w<c.amount&&o.jsx("div",{className:" px-5 flex justify-end",children:o.jsx(j,{text:`${c.errorMessage} ${c.amount}`,variant:"caption",color:"error"})})]}),o.jsxs("div",{className:`flex justify-end gap-4 px-4 py-1 border-t border-b ${b} ${v}`,children:[o.jsx(j,{variant:"caption",text:`${c.title}: ${c.amount}`}),u&&o.jsx(j,{variant:"caption",text:`${u.title}: ${u.amount}`})]}),h&&o.jsx("div",{className:"px-2 mt-1",children:o.jsx(j,{variant:"caption",color:"error",text:h})}),d&&o.jsxs("div",{className:"flex items-center justify-between px-4 py-1",children:[o.jsx(o1,{text:"Clear",variant:"ghost",size:"small",onClick:()=>{N(0)}}),o.jsx("div",{className:"flex gap-3",children:d.map((V,F)=>o.jsx(o1,{...V},`${V==null?void 0:V.text}-${F}`))})]})]})}):null},X7=e=>{const{isVisible:t,typographyProps:n,color:r="error"}=e;return t?o.jsx("div",{className:`flex justify-center rounded-lg border-4 border-double animate-pulse [animation-duration:0.6s] bg-${r} border-${r} bg-clip-padding p-2 md:px-4`,children:o.jsx(j,{text:n.text,variant:n.variant??"overline",color:n.color??"white"})}):null},D3=()=>o.jsxs("div",{className:"flex gap-1 pr-23 md:pr-26 lg:pr-34",children:[o.jsx("div",{className:"flex justify-center items-center lg:min-w-18 min-w-14 h-7 bg-babyBlue rounded-t-lg",children:o.jsx(j,{text:"Back All",color:"black",variant:"captionBold"})}),o.jsx("div",{className:"flex justify-center items-center lg:min-w-18 min-w-14 h-7 bg-watermelonRed rounded-t-lg",children:o.jsx(j,{text:"Lay All",color:"black",variant:"captionBold"})})]}),$5=({title:e,variant:t,eventId:n="0",level:r=3,min:s=10,max:i=100,selectionCount:a=0,totalMatched:l=0,isSubHeader:C=!1,showBetsButton:c=!1,viewBetCTA:u,onClick:f,eventDetails:d="",onInfoClick:h})=>{const m=["1","X","2"].slice(0,r),{isMobile:x}=O1(),p=()=>o.jsxs("div",{className:"flex gap-1 bg-slategray px-1 md:px-2 py-1 rounded-md",children:[o.jsx(j,{color:"white",variant:"caption",text:"Min/Max:"}),o.jsx(j,{color:"white",variant:"caption",text:`${K1(s)}/${K1(i)}`})]});return t==="EventTitle"?o.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:[o.jsxs("div",{className:"flex gap-2 justify-between",children:[o.jsx(j,{variant:"captionBold",text:e,color:"white"}),h&&o.jsx(q,{icon:"info",onClick:h,cursorPointer:!0,color:"white"})]}),d&&o.jsxs("div",{className:"flex gap-1",children:[o.jsx(q,{icon:"calendar",color:"white",size:16}),o.jsx("div",{className:"w-max",children:o.jsx(j,{color:"success",text:d,variant:"caption"})})]})]}):o.jsxs(o.Fragment,{children:[t!=="MatchOdds"?o.jsxs("div",{className:"bg-primary rounded-t-lg px-2 py-2 flex flex-row items-center gap-4 w-full justify-between",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[t==="MultiMarket"&&o.jsx("div",{className:"bg-success w-6 h-6 rounded flex items-center justify-center",children:o.jsx(q,{icon:"pin"})}),o.jsx(j,{variant:"subtitle2",text:e,color:"white"})]}),t==="OtherMarket"&&c&&o.jsx(o1,{...u}),t==="FancyMarket"&&o.jsxs("div",{className:"flex md:gap-8 lg:mr-24 mr-18 gap-6",children:[o.jsx(j,{variant:"caption",text:"No",color:"white"}),o.jsx(j,{variant:"caption",text:"Yes",color:"white"})]}),t==="MultiMarket"&&o.jsx("div",{className:"ml-auto md:block",children:o.jsx(o1,{variant:"primary",size:"extraSmall",text:"Match Odds",onClick:()=>f==null?void 0:f(n)})})]}):o.jsxs("div",{className:"bg-brightgray flex justify-between gap-2 items-center pr-5",children:[o.jsx("div",{className:"flex gap-1 md:gap-3 items-center",children:o.jsx("div",{className:"bg-primary px-2 py-2",children:o.jsx(j,{color:"white",text:e,variant:"subtitle2"})})}),o.jsxs("div",{className:"hidden md:flex gap-2",children:[o.jsx(j,{color:"neutralGray",text:"Matched",variant:"subtitle2"}),o.jsx(j,{color:"black",text:`PTH ${l}`,variant:"subtitle2"})]})]}),t==="MultiMarket"&&o.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:[o.jsx(j,{variant:"caption",text:`${a} Selections`}),!x&&o.jsx(D3,{})]}),t==="Sports"&&C&&o.jsxs("div",{className:"flex items-center justify-end bg-brightgray px-4 py-2",children:[o.jsx("div",{className:"min-w-10 px-2 text-center",children:o.jsx(j,{variant:"body1",color:"black",text:"Matched"})}),o.jsx("div",{className:"flex items-center justify-center",children:m.map(y=>o.jsx("div",{className:"min-w-36 mx-1 flex justify-center",children:o.jsx(j,{variant:"body1",color:"black",text:y})},y))}),o.jsx("div",{className:"w-9"})]}),(t==="OtherMarket"||t==="MatchOdds")&&o.jsxs("div",{className:"flex justify-between border border-b border-brightgray py-1 px-2",children:[p(),r===3&&o.jsx("div",{className:"ml-1 max-[430px]:hidden",children:o.jsx(D3,{})})]})]})},t4=({marketId:e,eventId:t,providerId:n,runnerId:r,runnerName:s,item:i,index:a,color:l,type:C,disabled:c,showSize:u,min:f,max:d,onClick:h})=>{const m=C===m1.BACK&&a===2||C===m1.LAY&&a===0,x=[m1.YES,m1.NO,m1.ODD,m1.EVEN].includes(C),p={marketId:e,eventId:t,providerId:n,runnerId:r,runnerName:s,type:C,odds:i==null?void 0:i.odds,size:(i==null?void 0:i.oddsSize)||0,min:f,max:d,acceptBestOdds:!(m||x)},[y,M]=g.useState(!1),v=g.useRef(i==null?void 0:i.odds);return g.useEffect(()=>{if(v.current!==(i==null?void 0:i.odds)){M(!0);const k=setTimeout(()=>{M(!1)},200);return v.current=i==null?void 0:i.odds,()=>clearTimeout(k)}},[i==null?void 0:i.odds]),o.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 min-w-11.5 min-[420px]:min-w-12 lg:min-w-16 min-h-8 text-center cursor-pointer disabled:cursor-not-allowed flex-1 ${l} transition-colors duration-300
|
|
64
|
+
`,children:d&&o.jsx("span",{className:"w-4 h-4 rounded-full bg-secondary"})}),o.jsx("span",{children:f.label})]},f.value.toString())})})},P7=e=>{const{data:t,scrollSpeed:n=100,defaultTitle:r="No upcoming events. Stay tuned!"}=e,s=g.useRef(null),i=g.useRef(null);return g.useEffect(()=>{const a=s.current,l=i.current;if(a&&l){a.style.cursor="pointer";const C=a.offsetWidth,c=l.offsetWidth,f=(c+C)/n,d=[{transform:`translateX(${C}px)`},{transform:`translateX(-${c}px)`}],h=l.animate(d,{duration:f*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]),o.jsx("div",{className:"overflow-hidden h-9 flex items-center bg-primary",ref:s,children:o.jsx("div",{ref:i,className:"whitespace-nowrap will-change-transform flex items-center",children:(t==null?void 0:t.length)>0?o.jsx(o.Fragment,{children:t==null?void 0:t.map((a,l)=>{var C;return o.jsxs("div",{className:"flex items-center mx-10",children:[o.jsx(j,{text:a==null?void 0:a.title,variant:"captionBold",color:"error"}),o.jsx(q,{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,u)=>o.jsxs("span",{className:"mr-10 whitespace-nowrap flex items-center",children:[o.jsx("span",{className:"mr-2",children:o.jsx(j,{text:c.timeLabel,variant:"caption",color:"secondary",underline:!0})}),o.jsx(j,{text:c.description,variant:"captionBold",color:"secondary"})]},`${u+1}-${c.timeLabel}`))]},`${l}${a==null?void 0:a.title}`)})}):o.jsx(j,{variant:"captionBold",text:r,color:"error"})})})},F7=e=>{const{titles:t,bets:n,showHeader:r=!1}=e,[s,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=u=>{const{odds:f,showTitles:d=!1}=u;return o.jsx("div",{className:"flex items-center ml-auto justify-between min-w-32 lg:min-w-40",children:f==null?void 0:f.map(h=>o.jsx("div",{children:o.jsx(j,{variant:d?"caption":"captionBold",text:d?h.title:h.value})},h.title))})},c=({label:u,value:f})=>o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx(j,{variant:"caption",text:u,color:"slategray"}),o.jsx(j,{variant:"caption",text:f,color:"slategray"})]});return o.jsxs("div",{className:"w-full",children:[r&&o.jsx($5,{variant:"EventTitle",title:t.slipTitle||""}),o.jsx("div",{className:"max-h-64 overflow-y-auto p-1 bg-tertiary",children:o.jsx("div",{className:"space-y-1",children:n==null?void 0:n.map(u=>{const f=l.includes(u.type)?"Back":"Lay",{typeColor:d,bgColor:h}=a[f];return s?o.jsxs("div",{children:[o.jsxs("div",{className:`py-1 px-2 flex items-center ${d}`,children:[o.jsx(j,{variant:"caption",text:`${u.type} ${u.type===m1.BACK?`(${t.betFor})`:`(${t.betAgainst})`}`}),o.jsx(C,{odds:u.oddsDetails,showTitles:!0})]}),o.jsxs("div",{className:h,children:[o.jsxs("div",{className:"p-1 gap-4 flex items-center",children:[o.jsx(c,{label:t.reference,value:u.reference}),o.jsx(c,{label:t.time,value:u.time})]}),o.jsx("hr",{className:`border-t ${d}`}),o.jsxs("div",{className:"flex p-1 gap-2",children:[o.jsxs("div",{children:[o.jsx(j,{variant:"captionBold",text:u.subTitle}),o.jsx(j,{variant:"caption",text:u.result,color:"slategray"})]}),o.jsx(C,{odds:u.oddsDetails})]})]})]},u.id):o.jsxs("div",{className:`px-2 py-1 flex items-center ${h} gap-2`,children:[o.jsx("div",{className:`flex items-center justify-center p-1 min-w-12 rounded-md ${d}`,children:o.jsx(j,{variant:"captionBold",text:u.type})}),o.jsxs("div",{children:[o.jsx(j,{variant:"captionBold",text:u.subTitle}),o.jsx(j,{variant:"smallMedium",text:u.result,color:"slategray"})]}),o.jsx(C,{odds:u.oddsDetails})]},u.id)})})}),o.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&&o.jsx(T2,{checked:s,onChange:u=>i(u.target.checked)}),o.jsx(j,{variant:"caption",text:(n==null?void 0:n.length)>0?t.betInfo:t.nullMessage})]})]})},B7=({slides:e,isLoading:t=!1,altImageUrl:n="",interval:r=3e3,loop:s=!0,pauseOnHover:i=!0,className:a=""})=>{const[l,C]=g.useState(0),c=g.useRef(null),[u,f]=g.useState(!1),d=g.useCallback(()=>{C(h=>h===e.length-1?s?0:h:h+1)},[e.length,s]);return g.useEffect(()=>{if(i&&u)return;function h(){d(),c.current=setTimeout(h,r)}return c.current=setTimeout(h,r),()=>{c.current&&clearTimeout(c.current)}},[u,r,i,d]),o.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:()=>f(!0),onMouseLeave:()=>f(!1),children:t?o.jsx("div",{className:"flex justify-center items-center h-30 md:h-96",children:o.jsx(H5,{className:"animate-spin w-30 md:w-full"})}):o.jsxs(o.Fragment,{children:[e==null?void 0:e.map((h,m)=>o.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:o.jsx("img",{src:h.imageURL||n,alt:h.alt||"slide image",className:"relative w-full h-full object-fill"})},h.id)),o.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)=>o.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))})]})})},$7=({betSlipVariant:e,slipTitle:t,betSlipLabels:n,betDetails:r,betButtonAmounts:s=[],defaultStake:i=0,defaultOdds:a,minBet:l,maxBet:C,errorMessage:c,footerCTA:u,projectedPL:f,handleBetPlacement:d})=>{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],[v,k]=g.useState(i),[b,w]=g.useState(a);g.useEffect(()=>{k(i),w(a)},[i,a]);const N=g.useRef(d);g.useEffect(()=>{N.current=d},[d]),g.useEffect(()=>{N.current({stake:v,odds:b})},[v,b]);const L=H=>o.jsx("div",{className:"text-center",children:o.jsx(j,{variant:"caption",text:H})},H),E=H=>{const Z=Number(H.target.value),V=a-T1.LIMIT,F=a+T1.LIMIT;Z<V||Z>F||w(Z)};return o.jsxs("div",{className:"pb-2 bg-brightgray",children:[o.jsxs("div",{className:`p-2 grid grid-cols-2 items-center ${p}`,children:[o.jsx(j,{variant:"caption",text:t}),o.jsxs("div",{className:"flex items-center justify-end mr-10",children:[L(n.pLValueTitle),o.jsx("div",{className:"mx-1 min-w-8 max-w-16 text-right",children:o.jsx(j,{variant:"captionBold",text:f})})]})]}),o.jsxs("div",{className:y,children:[o.jsxs("div",{className:"grid grid-cols-2 gap-4 pt-2",children:[o.jsxs("div",{className:"flex flex-col justify-center m-2",children:[o.jsx(j,{variant:"captionBold",text:r.betTitle}),o.jsx(j,{variant:"caption",text:r.betDescription})]}),o.jsxs("div",{className:"flex items-center gap-1 justify-end px-2",children:[o.jsxs("div",{className:"flex flex-col flex-start items-center gap-1",children:[L(n.oddsTitle),o.jsx("input",{type:"number",step:T1.NUMBER_FILED_STEPS,value:b,min:a-T1.LIMIT,max:a+T1.LIMIT,onChange:E,onKeyDown:H=>H.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"})]}),o.jsxs("div",{className:"relative",children:[o.jsxs("div",{className:"flex flex-col items-center gap-1",children:[L(n.stakeTitle),o.jsx("input",{type:"text",value:v,onChange:H=>{const Z=H.target.value;u3.NUMBER_INPUT_REGEX.test(Z)&&k(Number(Z))},className:"min-w-12 max-w-16 h-10 rounded-sm p-1 bg-white border-0"})]}),v<l.amount&&o.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&&v>C.amount&&o.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]})]})]})]}),o.jsx("div",{className:"h-auto flex flex-wrap gap-2 overflow-x-auto mt-4 mx-2 mb-2 whitespace-nowrap no-scrollbar",children:s.length>0&&s.map(H=>o.jsx(o1,{text:`+${K1(H)}`,size:"small",variant:"outline",onClick:()=>k(Z=>Z+H)},H))}),o.jsxs("div",{className:`h-6 flex items-center justify-end border-t border-b p-2 gap-4 ${M}`,children:[o.jsx(j,{variant:"captionBold",text:`${l.title}: ${l.amount}`}),C&&o.jsx(j,{variant:"captionBold",text:`${C.title}: ${C.amount}`})]})]}),c&&o.jsx("div",{className:"px-2 mt-1",children:o.jsx(j,{variant:"caption",color:"error",text:c})}),u&&o.jsxs("div",{className:"flex items-center justify-between px-2 py-1",children:[o.jsx(o1,{text:"Clear",variant:"ghost",size:"small",onClick:()=>{k(0)}}),o.jsx("div",{className:"flex items-center justify-end mt-1 mr-2 gap-2",children:u.map((H,Z)=>o.jsx(o1,{...H},H.text||Z))})]})]})},X2=[{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"}],T7={true:"border-error focus-within:border-error",false:"border-brightgray focus-within:border-smokyblack"},I7={true:"bg-brightgray",false:"bg-white"},A7=e=>{const{label:t,id:n="",name:r="",value:s="",onChange:i=()=>{},placeholder:a="",isRequired:l=!1,className:C="",isDisabled:c=!1,hasError:u=!1,errorMessage:f="",...d}=e,[h,m]=s.split("-"),[x,p]=g.useState(!1),y=X2.find(L=>L.code===h)||X2[0],M=g.useRef(null);g.useEffect(()=>{const L=E=>{M.current&&!M.current.contains(E.target)&&p(!1)};return document.addEventListener("click",L),()=>{document.removeEventListener("click",L)}},[]);const v=L=>{p(!1),i==null||i(`${L}-${m||""}`)},k=L=>{i==null||i(`${h||X2[0].code}-${L}`)},b=`${x?"relative":""} flex items-center border rounded-lg px-7 py-4 min-h-16 ${T7[`${u}`]} ${I7[`${c}`]}`,w=`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}`,N=`${t}${l?"*":""}`;return o.jsxs("div",{className:"flex flex-col gap-2",children:[o.jsx(j,{variant:"body1",text:N,color:u?"error":"slategray"}),o.jsxs("div",{className:b,children:[o.jsxs("div",{className:"mr-2",ref:M,children:[o.jsxs("button",{type:"button",className:"flex items-center cursor-pointer gap-1",onClick:()=>!c&&p(!x),children:[o.jsx(j,{variant:"subtitle1",text:y.shortName,color:"smokyblack"}),o.jsx(q,{icon:x?"caretUp":"caretDown",color:"smokyblack"}),o.jsx("div",{className:"h-7 border border-neutralGray"}),o.jsx(j,{variant:"subtitle1",text:y.code,color:"smokyblack"})]}),x&&o.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:X2.map((L,E)=>{const H=L.code===y.code,Z=H?"white":"slategray";return o.jsx("li",{className:`px-3 py-2 flex items-center gap-2 cursor-pointer hover:bg-brightgray ${H?"bg-secondary text-white hover:bg-secondary/85":""}`,onClick:()=>v(L.code),onKeyUp:V=>{(V.key==="Enter"||V.key===" ")&&v(L.code)},children:o.jsx(j,{variant:"caption",text:`${L.code} ${L.fullName} (${L.shortName})`,color:Z})},`${L.code}-${E}`)})})]}),o.jsx("input",{id:n,name:r,type:"tel",value:m||"",onChange:L=>{k(L.target.value)},placeholder:a,className:w,disabled:c,...d})]}),u&&f&&o.jsx("div",{className:"flex justify-end",children:o.jsx(j,{variant:"caption",text:f,color:"error"})})]})},W7=e=>{const{text:t,onClick:n,iconName:r,variant:s="default"}=e,i=s==="action";return o.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:o.jsxs("div",{className:"flex justify-between items-center gap-2 w-full",children:[o.jsx(j,{variant:i?"subtitle2":"caption",text:t}),i&&r&&o.jsx(q,{icon:r,color:"black"})]})})},Y7=e=>{const{items:t,lastItem:n,variant:r="default"}=e,s=r==="action";return o.jsx("div",{className:`${s?"w-full":"w-fit shadow-md rounded-lg"} bg-white`,children:o.jsxs("ul",{className:"flex flex-col",children:[t.length===0?o.jsx("div",{className:`flex justify-center ${s?"w-full py-3":"w-40 py-2"}`,children:o.jsx(j,{variant:"caption",text:"No data available!",color:"slategray"})}):t.map(i=>o.jsx("li",{className:`${s?"border-b border-brightgray":""}`,children:o.jsx(W7,{...i,variant:r})},i.text)),!!n&&o.jsx("li",{children:o.jsxs("button",{type:"button",onClick:n.onClick,className:`${s?"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&&o.jsx(j,{text:n.text,variant:"subtitle2",color:"techBlue"}),!!n.iconName&&o.jsx(q,{icon:n.iconName,color:"techBlue"})]})})]})})},z7=e=>{const{steps:t}=e;return o.jsx("div",{className:"flex items-center justify-between w-full",children:t==null?void 0:t.map((n,r)=>{var c;const s=r===t.length-1,i=(c=t[r+1])==null?void 0:c.status,a=n.status==="completed"?o.jsx("div",{className:"p-[6px] md:p-4 bg-secondary rounded-full flex items-center justify-center shadow-lg",children:o.jsx("div",{className:"p-[2px] md:p-1 bg-white/40 rounded-full flex items-center justify-center",children:o.jsx("div",{className:"p-[2px] md:p-[6px] bg-white/30 rounded-full flex items-center justify-center",children:o.jsx("div",{className:"flex items-center justify-center bg-secondary/60 rounded-full",children:o.jsx(q,{icon:"doneFill",size:20,color:"white"})})})})}):n.status==="inProgress"?o.jsx("div",{className:"p-3 md:p-5 rounded-full bg-secondary flex items-center justify-center",children:o.jsx("div",{className:"p-1 md:p-2 bg-white/30 rounded-full flex items-center justify-center",children:o.jsx("div",{className:"w-2 h-2 md:w-4 md:h-4 bg-white rounded-full"})})}):o.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 o.jsxs("div",{className:"flex-1 flex flex-col items-center",children:[o.jsxs("div",{className:"relative flex items-center justify-center w-full",children:[o.jsx("div",{className:"flex justify-center",children:a}),!s&&o.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:o.jsx("div",{className:`h-[2px] w-full ${l}`})})]}),o.jsx("div",{className:"mt-2 md:mt-4 text-center",children:o.jsx(j,{variant:n.title.variant??"caption",...C})})]},`${r+1}`)})})},G7=e=>{const{walletData:t,footerCTA:n,redirectLinks:r}=e||{},{isMobile:s}=O1();return o.jsxs("div",{className:"max-w-56 rounded-md bg-primary shadow-md shadow-white p-2",children:[o.jsxs("div",{className:"pb-2",children:[t==null?void 0:t.map(i=>{var a,l,C;return o.jsxs("div",{className:"flex items-center justify-between gap-2",children:[o.jsx("div",{className:"flex-1",children:o.jsx(j,{text:(i==null?void 0:i.key)??"",variant:"caption",color:"white"})}),o.jsx("div",{className:"flex-1 text-left",children:o.jsx(j,{text:(i==null?void 0:i.value)??"",variant:"captionBold",color:(i==null?void 0:i.color)??"white"})}),!s&&((a=i==null?void 0:i.info)==null?void 0:a.title)&&o.jsx(C4,{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:o.jsx(q,{icon:"info",color:"white"})})]},i.key)}),o.jsx("div",{className:"flex justify-between pt-2 px-3 gap-2 flex-wrap",children:n==null?void 0:n.map((i,a)=>o.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}`))})]}),o.jsx("div",{className:"border-t border-brightgray pt-2 px-2",children:r==null?void 0:r.map((i,a)=>o.jsxs("button",{onClick:i==null?void 0:i.onClick,type:"button",className:"flex justify-between gap-2 py-1 w-full",children:[o.jsx(j,{text:(i==null?void 0:i.title)??"",variant:"caption",color:"white"}),o.jsx(q,{icon:"caretRight",color:"white"})]},`${a+1}-${i==null?void 0:i.title}`))})]})},q7=({id:e="",name:t="",label:n="",isRequired:r=!1,hasError:s=!1,errorMessage:i="",isDisabled:a=!1,onChange:l,instructionText:C,supportText:c,supportFormate:u,maxFiles:f=10,maxLimitMessage:d="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,v]=g.useState([]),[k,b]=g.useState(null),w=g.useRef(null),N=u.map(R=>`.${R.toLowerCase().replace(u3.FILE_FORMAT_REGEX,"")}`).join(","),L=M.length>=f,E=`${n}${r?" *":""}`,H=u.join(", ").toUpperCase(),Z=s?"border-error":p?"border-secondary":"border-slategray",V=R=>{var _;return((_=R.name.split(".").pop())==null?void 0:_.toLowerCase())??""},F=R=>{l==null||l({target:{name:t,files:R},currentTarget:{name:t,files:R}})},z=R=>{b(R)},W=R=>{R.target.value=""},c1=R=>{const _=V(R);return u.map(a1=>a1.toLowerCase()).includes(_)},h1=R=>R.size<=m*1024*1024,x1=R=>R.filter(_=>c1(_)&&h1(_)),Q=R=>{if(a)return;if(R.some(g1=>!c1(g1))){z(h);return}if(R.some(g1=>!h1(g1))){z(x);return}const _=x1(R);if(_.length===0){z(h);return}const a1=[...M,..._].slice(0,f);v(a1),b(null),F(a1)},r1=R=>{if(a)return;const _=M.filter((a1,g1)=>g1!==R);v(_),F(_)},S=R=>{R.preventDefault(),R.stopPropagation(),!(a||L)&&y(R.type==="dragenter"||R.type==="dragover")},D=R=>{var _;R.preventDefault(),R.stopPropagation(),!a&&(y(!1),Q(Array.from(((_=R.dataTransfer)==null?void 0:_.files)??[])))},Y=R=>{var _;R.stopPropagation(),!(a||L)&&((_=w.current)==null||_.click())},B=R=>{var _;a||L||(R.key==="Enter"||R.key===" ")&&(R.preventDefault(),(_=w.current)==null||_.click())},f1=R=>{const _=Array.from(R.target.files??[]);_.length>0&&Q(_),W(R)};return o.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[n&&o.jsx(j,{variant:"body1",text:E,color:s?"error":"slategray"}),o.jsxs("div",{"aria-disabled":a,onClick:Y,onKeyDown:B,onDragEnter:S,onDragOver:S,onDragLeave:S,onDrop:D,className:`border-2 border-dashed rounded-md transition-all duration-200 p-6 md:p-8 text-center focus:outline-none ${Z} ${L||a?"cursor-not-allowed opacity-60":"cursor-pointer hover:border-secondary"}`,children:[o.jsx("input",{id:e,name:t,type:"file",ref:w,accept:N,multiple:!0,disabled:a,onChange:f1,className:"hidden"}),o.jsxs("div",{className:"flex flex-col items-center justify-center pointer-events-none",children:[o.jsx(q,{icon:"upload"}),o.jsxs("div",{children:[o.jsx("div",{className:"flex gap-1 items-center justify-center",children:o.jsx(j,{variant:"subtitle2",text:C})}),o.jsxs("div",{className:"flex gap-2 justify-center my-2 flex-wrap",children:[o.jsx(j,{variant:"caption",text:`${c} :`}),o.jsx(j,{variant:"caption",text:`${H} (Max : ${m}MB)`})]}),(k||s)&&o.jsx(j,{variant:"caption",color:"error",text:k||i})]})]})]}),L&&d&&o.jsx(j,{variant:"caption",color:"error",text:d}),M.length>0&&o.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((R,_)=>{const a1=V(R);return o.jsxs("div",{className:"flex justify-between items-center rounded-md py-2 px-4 bg-offwhite",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(q,{icon:a1||"file"}),o.jsx(j,{variant:"body2",text:`${R.name} (${(R.size/(1024*1024)).toFixed(2)} MB)`})]}),!a&&o.jsx(q,{icon:"cancel",color:"slategray",size:20,onClick:()=>r1(_)})]},`${_+1}`)})})]})},U7=()=>{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,r=n*.4,s=30,i=n+(e.length-1)*s+16;return o.jsx(o.Fragment,{children:o.jsxs("div",{className:"p-6 space-y-6",children:[o.jsx("div",{className:"relative overflow-visible rounded-lg",style:{height:i},children:e.map((a,l)=>{const C=l*r,c=l*s,u=t[l%t.length];return o.jsx("div",{className:`absolute ${a.className} ${u} text-white rounded-xl shadow-md flex justify-center p-3`,style:{width:n,height:n,left:C,top:c},children:o.jsx(j,{variant:"captionBold",text:a.label,color:"white"})},a.className)})}),o.jsxs("div",{className:"p-5 bg-gray-100 rounded-xl shadow-inner",children:[o.jsx(j,{variant:"captionBold",text:"Z-Index Usage Details"}),o.jsx("div",{className:"mt-3 space-y-1",children:e.map(a=>o.jsxs("div",{className:"flex items-start gap-2",children:[o.jsx("span",{className:"font-mono text-sm text-gray-700 w-40",children:a.label}),o.jsxs("span",{className:"text-gray-600 text-sm",children:["→ ",a.usage]})]},a.className))})]})]})})},K7=({isOpen:e,onClose:t,betSlipVariant:n,slipTitle:r,betSlipLabels:s,betDetails:i,betButtonAmounts:a,defaultStake:l=0,defaultOdds:C,minBet:c,maxBet:u,projectedPL:f,footerCTA:d,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:v,secondaryBg:k,border:b}=x[y],[w,N]=g.useState(l),[L,E]=g.useState(C);g.useEffect(()=>{N(l),E(C)},[l,C]);const H=g.useRef(m);g.useEffect(()=>{H.current=m},[m]),g.useEffect(()=>{H.current({stake:w,odds:L})},[w,L]);const Z=V=>{const F=Number(V.target.value),z=C-T1.LIMIT,W=C+T1.LIMIT;F<z||F>W||E(F)};return e?o.jsx("div",{className:"fixed inset-0 z-level-6 flex items-start justify-center pointer-events-none",tabIndex:-1,children:o.jsxs("div",{className:"bg-white shadow-lg w-full pointer-events-auto",onMouseDown:V=>V.stopPropagation(),role:"presentation",children:[o.jsxs("div",{className:`flex items-center justify-between px-4 py-1 ${M}`,children:[o.jsx(j,{variant:"subtitle1",text:r,color:"white"}),o.jsx(q,{size:16,icon:"cancel",color:"white",onClick:t})]}),o.jsxs("div",{className:`${k} flex flex-row justify-between py-1 px-4`,children:[o.jsxs("div",{children:[o.jsx(j,{variant:"captionBold",text:i==null?void 0:i.betTitle}),o.jsx(j,{variant:"caption",text:i==null?void 0:i.betDescription})]}),o.jsxs("div",{className:"text-right",children:[o.jsx(j,{text:s.pLValueTitle,variant:"subtitle2"}),o.jsx(j,{text:f,variant:"caption"})]})]}),o.jsx("div",{className:`${k} px-4 pb-2 flex flex-wrap gap-3`,children:a.map(V=>o.jsx(o1,{text:`+${V}`,size:"extraSmall",variant:"outline",onClick:()=>N(w+V)},V))}),o.jsxs("div",{className:`${k} px-3 pb-1`,children:[o.jsxs("div",{className:"grid grid-cols-2 text-center mb-2",children:[o.jsx(j,{text:s.oddsTitle,variant:"captionBold"}),o.jsx(j,{text:s.stakeTitle,variant:"captionBold"})]}),o.jsxs("div",{className:"px-4 pb-1 grid grid-cols-2 gap-4",children:[o.jsx("input",{type:"number",step:T1.NUMBER_FILED_STEPS,value:L,min:C-T1.LIMIT,max:C+T1.LIMIT,disabled:["Yes","No","Odd","Even"].includes(n),onChange:Z,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"}),o.jsx("input",{type:"text",value:w,onChange:V=>{const F=V.target.value;u3.NUMBER_INPUT_REGEX.test(F)&&N(Number(F))},className:"w-full px-4 py-2 bg-white rounded-md shadow-sm text-center text-black outline-none"})]}),u&&w>u.amount?o.jsx("div",{className:"px-5 flex justify-end",children:o.jsx(j,{text:`${u.errorMessage} ${u.amount}`,variant:"caption",color:"error"})}):c&&w<c.amount&&o.jsx("div",{className:" px-5 flex justify-end",children:o.jsx(j,{text:`${c.errorMessage} ${c.amount}`,variant:"caption",color:"error"})})]}),o.jsxs("div",{className:`flex justify-end gap-4 px-4 py-1 border-t border-b ${b} ${v}`,children:[o.jsx(j,{variant:"caption",text:`${c.title}: ${c.amount}`}),u&&o.jsx(j,{variant:"caption",text:`${u.title}: ${u.amount}`})]}),h&&o.jsx("div",{className:"px-2 mt-1",children:o.jsx(j,{variant:"caption",color:"error",text:h})}),d&&o.jsxs("div",{className:"flex items-center justify-between px-4 py-1",children:[o.jsx(o1,{text:"Clear",variant:"ghost",size:"small",onClick:()=>{N(0)}}),o.jsx("div",{className:"flex gap-3",children:d.map((V,F)=>o.jsx(o1,{...V},`${V==null?void 0:V.text}-${F}`))})]})]})}):null},X7=e=>{const{isVisible:t,typographyProps:n,color:r="error"}=e;return t?o.jsx("div",{className:`flex justify-center rounded-lg border-4 border-double animate-pulse [animation-duration:0.6s] bg-${r} border-${r} bg-clip-padding p-2 md:px-4`,children:o.jsx(j,{text:n.text,variant:n.variant??"overline",color:n.color??"white"})}):null},D3=()=>o.jsxs("div",{className:"flex gap-1 pr-23 md:pr-26 lg:pr-34",children:[o.jsx("div",{className:"flex justify-center items-center lg:min-w-18 min-w-14 h-7 bg-babyBlue rounded-t-lg",children:o.jsx(j,{text:"Back All",color:"black",variant:"captionBold"})}),o.jsx("div",{className:"flex justify-center items-center lg:min-w-18 min-w-14 h-7 bg-watermelonRed rounded-t-lg",children:o.jsx(j,{text:"Lay All",color:"black",variant:"captionBold"})})]}),$5=({title:e,variant:t,eventId:n="0",level:r=3,min:s=10,max:i=100,selectionCount:a=0,totalMatched:l=0,isSubHeader:C=!1,showBetsButton:c=!1,viewBetCTA:u,onClick:f,eventDetails:d="",onInfoClick:h})=>{const m=["1","X","2"].slice(0,r),{isMobile:x}=O1(),p=()=>o.jsxs("div",{className:"flex gap-1 bg-slategray px-1 md:px-2 py-1 rounded-md",children:[o.jsx(j,{color:"white",variant:"caption",text:"Min/Max:"}),o.jsx(j,{color:"white",variant:"caption",text:`${K1(s)}/${K1(i)}`})]});return t==="EventTitle"?o.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:[o.jsxs("div",{className:"flex gap-2 justify-between",children:[o.jsx(j,{variant:"captionBold",text:e,color:"white"}),h&&o.jsx(q,{icon:"info",onClick:h,cursorPointer:!0,color:"white"})]}),d&&o.jsxs("div",{className:"flex gap-1",children:[o.jsx(q,{icon:"calendar",color:"white",size:16}),o.jsx("div",{className:"w-max",children:o.jsx(j,{color:"success",text:d,variant:"caption"})})]})]}):o.jsxs(o.Fragment,{children:[t!=="MatchOdds"?o.jsxs("div",{className:"bg-primary rounded-t-lg px-2 py-2 flex flex-row items-center gap-4 w-full justify-between",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[t==="MultiMarket"&&o.jsx("div",{className:"bg-success w-6 h-6 rounded flex items-center justify-center",children:o.jsx(q,{icon:"pin"})}),o.jsx(j,{variant:"subtitle2",text:e,color:"white"})]}),t==="OtherMarket"&&c&&o.jsx(o1,{...u}),t==="FancyMarket"&&o.jsxs("div",{className:"flex md:gap-8 lg:mr-24 mr-18 gap-6",children:[o.jsx(j,{variant:"caption",text:"No",color:"white"}),o.jsx(j,{variant:"caption",text:"Yes",color:"white"})]}),t==="MultiMarket"&&o.jsx("div",{className:"ml-auto md:block",children:o.jsx(o1,{variant:"primary",size:"extraSmall",text:"Match Odds",onClick:()=>f==null?void 0:f(n)})})]}):o.jsxs("div",{className:"bg-brightgray flex justify-between gap-2 items-center pr-5",children:[o.jsx("div",{className:"flex gap-1 md:gap-3 items-center",children:o.jsx("div",{className:"bg-primary px-2 py-2",children:o.jsx(j,{color:"white",text:e,variant:"subtitle2"})})}),o.jsxs("div",{className:"hidden md:flex gap-2",children:[o.jsx(j,{color:"neutralGray",text:"Matched",variant:"subtitle2"}),o.jsx(j,{color:"black",text:`PTH ${l}`,variant:"subtitle2"})]})]}),t==="MultiMarket"&&o.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:[o.jsx(j,{variant:"caption",text:`${a} Selections`}),!x&&o.jsx(D3,{})]}),t==="Sports"&&C&&o.jsxs("div",{className:"flex items-center justify-end bg-brightgray px-4 py-2",children:[o.jsx("div",{className:"min-w-10 px-2 text-center",children:o.jsx(j,{variant:"body1",color:"black",text:"Matched"})}),o.jsx("div",{className:"flex items-center justify-center",children:m.map(y=>o.jsx("div",{className:"min-w-36 mx-1 flex justify-center",children:o.jsx(j,{variant:"body1",color:"black",text:y})},y))}),o.jsx("div",{className:"w-9"})]}),(t==="OtherMarket"||t==="MatchOdds")&&o.jsxs("div",{className:"flex justify-between border border-b border-brightgray py-1 px-2",children:[p(),r===3&&o.jsx("div",{className:"ml-1 max-[430px]:hidden",children:o.jsx(D3,{})})]})]})},t4=({marketId:e,eventId:t,providerId:n,runnerId:r,runnerName:s,item:i,index:a,color:l,type:C,disabled:c,showSize:u,min:f,max:d,onClick:h})=>{const m=C===m1.BACK&&a===2||C===m1.LAY&&a===0,x=[m1.YES,m1.NO,m1.ODD,m1.EVEN].includes(C),p={marketId:e,eventId:t,providerId:n,runnerId:r,runnerName:s,type:C,odds:i==null?void 0:i.odds,size:(i==null?void 0:i.oddsSize)||0,min:f,max:d,acceptBestOdds:!(m||x)},[y,M]=g.useState(!1),v=g.useRef(i==null?void 0:i.odds);return g.useEffect(()=>{if(v.current!==(i==null?void 0:i.odds)){M(!0);const k=setTimeout(()=>{M(!1)},200);return v.current=i==null?void 0:i.odds,()=>clearTimeout(k)}},[i==null?void 0:i.odds]),o.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 min-w-11.5 min-[420px]:min-w-12 lg:min-w-16 min-h-8 text-center cursor-pointer disabled:cursor-not-allowed flex-1 ${l} transition-colors duration-300
|
|
65
65
|
${y?"bg-yellow":""}`,children:[o.jsx(j,{variant:"smallBold",color:"black",text:i!=null&&i.odds?i.odds:"-"}),u&&o.jsx(j,{variant:"smallMedium",color:"black",text:i!=null&&i.oddsSize?K1(i.oddsSize):"-"})]})},Q7=({marketId:e="0",eventId:t="0",providerId:n="0",runnerId:r,runnerName:s="",currentValue:i=0,projectedValue:a=0,notes:l="",batb:C=[],batl:c=[],showOddsSize:u=!1,isFreezed:f=!1,isSuspended:d=!1,suspendedMsg:h="Suspended",min:m=10,max:x=100,isYesNO:p=!0,onRowClick:y=()=>{},onOddClick:M=()=>{}})=>{const v=f||d,k=a!==0,b=Math.max(C==null?void 0:C.length,c==null?void 0:c.length),w=Array.from({length:b},(H,Z)=>C[Z]),N=Array.from({length:b},(H,Z)=>c[Z]),L=p?m1.YES:m1.EVEN,E=p?m1.NO:m1.ODD;return o.jsx("div",{className:"w-full border-x border-b border-brightgray py-1 px-2 md:px-4",children:o.jsxs("div",{className:"flex items-start gap-2 justify-between align-center",children:[o.jsxs("div",{className:"flex justify-between w-full cursor-pointer",onClick:()=>y(r),onKeyDown:()=>y(r),children:[o.jsxs("div",{children:[o.jsx(j,{variant:"subtitle2",color:"black",text:s}),l&&o.jsx(j,{variant:"smallMedium",color:"black",text:l})]}),(i||k)&&o.jsx(j,{text:Number((i+a).toFixed(2)),variant:"captionBold",isNumberTypography:!0})]}),o.jsxs("div",{className:"flex gap-1 md:gap-2 items-start",children:[o.jsxs("div",{className:"relative",children:[f&&o.jsx("div",{className:"absolute inset-0 bg-freeze-pattern rounded pointer-events-auto cursor-not-allowed"}),d&&o.jsx("div",{className:"absolute inset-0 flex items-center justify-center rounded border-2 border-error bg-white/30 backdrop-blur-sm",children:o.jsx(j,{variant:"captionBold",color:"error",text:h})}),o.jsxs("div",{className:"flex gap-1",children:[o.jsx("div",{className:"flex flex-col gap-1",children:N.map((H,Z)=>o.jsx(t4,{marketId:e,eventId:t,providerId:n,runnerId:r,runnerName:s,item:H,index:Z,color:p?w2.NO_COLOR:w2.ODD_COLOR,type:E,disabled:v,showSize:u,min:m,max:x,onClick:M},c2(m1.NO)))}),o.jsx("div",{className:"flex flex-col gap-1",children:w.map((H,Z)=>o.jsx(t4,{marketId:e,eventId:t,providerId:n,runnerId:r,runnerName:s,item:H,index:Z,color:p?w2.YES_COLOR:w2.ODD_COLOR,type:L,disabled:v,showSize:u,min:m,max:x,onClick:M},c2(m1.YES)))})]})]}),o.jsxs("div",{className:"text-right w-14",children:[o.jsx(j,{variant:"smallMedium",text:"Min/Max"}),o.jsx(j,{variant:"smallMedium",text:`${K1(m)}/${K1(x)}`})]})]})]})})},J7=({marketId:e="0",eventId:t="0",providerId:n="0",runnerId:r,runnerName:s="",currentValue:i=0,projectedValue:a=0,batb:l=[],batl:C=[],level:c=3,showOddsSize:u=!1,isFreezed:f=!1,isSuspended:d=!1,suspendedMsg:h="Suspended",min:m=10,max:x=100,onOddClick:p=()=>{},notes:y=""})=>{const M=f||d,v=i!==0,k=a!==0,b=Array.from({length:c},(N,L)=>l[L]),w=Array.from({length:c},(N,L)=>C[L]);return o.jsxs("div",{className:"w-full border-x border-b border-brightgray py-1 px-1 md:px-4",children:[o.jsxs("div",{className:"flex flex-col min-[420px]:flex-row min-[420px]:items-center gap-2 min-[420px]:justify-between",children:[o.jsxs("div",{className:"flex min-[420px]:flex-col justify-between",children:[o.jsx(j,{text:s,variant:"subtitle2",color:"black"}),!v&&!k?null:o.jsxs("div",{className:"flex gap-1 items-center",children:[(v||k)&&o.jsx(j,{variant:"captionBold",text:i,isNumberTypography:!0}),k&&o.jsxs(o.Fragment,{children:[o.jsx(q,{icon:"forwardArrow",size:12,cursorPointer:!1}),o.jsx(j,{variant:"captionBold",isNumberTypography:!0,text:Number((i+a).toFixed(2))})]})]})]}),o.jsxs("div",{className:"relative flex gap-0.5 sm:gap-1",children:[f&&o.jsx("div",{className:"absolute inset-0 rounded bg-freeze-pattern pointer-events-auto cursor-not-allowed"}),d&&o.jsx("div",{className:"absolute inset-0 flex items-center justify-center rounded border-2 border-error bg-white/30 backdrop-blur-sm",children:o.jsx(j,{variant:"captionBold",color:"error",text:h})}),o.jsx("div",{className:"flex gap-0.5 sm:gap-1 flex-1",children:b.map((N,L)=>o.jsx(t4,{marketId:e,eventId:t,providerId:n,runnerId:r,runnerName:s,item:N,color:w2.BACK_COLORS[L],index:L,type:m1.BACK,disabled:M,showSize:u,min:m,max:x,onClick:p},`${r}-${e}-${L+1}`))}),o.jsx("div",{className:"flex gap-0.5 sm:gap-1 flex-1",children:w.map((N,L)=>o.jsx(t4,{runnerId:r,runnerName:s,marketId:e,eventId:t,providerId:n,item:N,index:L,color:w2.LAY_COLORS[L],type:m1.LAY,disabled:M,showSize:u,min:m,max:x,onClick:p},`${r}-${L+1}`))})]})]}),y&&o.jsx(j,{variant:"caption",color:"black",text:y})]})},e0=({id:e,eventName:t="",inPlay:n=!1,openDate:r="",showBookmakerIcon:s=!1,showFancyIcon:i=!1,showTotalMatched:a=!1,totalMatched:l=0,batb:C=[],batl:c=[],level:u=3,showOddsSize:f=!1,pinned:d=!1,isFreezed:h=!1,isSuspended:m=!1,suspendedMsg:x="Suspended",onClickRedirect:p=()=>{},onOddClick:y=()=>{},onPinClick:M=()=>{}})=>{const{isMobile:v}=O1(),k=Array.from({length:u},(b,w)=>({Back:C[w],Lay:c[w]}));return o.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:[o.jsxs("div",{className:`flex justify-between gap-1 ${n?"md:flex-col":"flex-col"}`,children:[o.jsx("button",{onClick:()=>p(e),type:"button",className:"cursor-pointer text-left",children:o.jsx(j,{variant:v?"captionBold":"body1",text:t,underline:!0,color:"techBlue"})}),o.jsxs("div",{className:"flex gap-1 items-center",children:[o.jsxs("div",{className:"",children:[n&&o.jsx("div",{className:"hidden md:block",children:o.jsx(j,{variant:"caption",text:Z3.IN_PLAY_MSG,color:"success"})}),r&&o.jsx(j,{variant:"caption",text:r,color:"neutralGray"})]}),o.jsxs("div",{className:"flex gap-1 items-center",children:[s&&o.jsx(q,{icon:"letterB",size:16}),i&&o.jsx(q,{icon:"letterF",size:16}),n&&o.jsx("div",{className:"md:hidden w-4 h-4 bg-success rounded-full"})]})]})]}),o.jsxs("div",{className:"flex flex-row md:items-center justify-between gap-1",children:[a&&!v&&o.jsx("div",{className:"min-w-10 px-2",children:o.jsx(j,{variant:"caption",color:"slategray",text:`${Z3.MATCHED_POINTS} ${K1(l)}`})}),o.jsxs("div",{className:"relative flex gap-1 flex-1",children:[h&&o.jsx("div",{className:"absolute inset-0 z-level-1 rounded bg-freeze-pattern pointer-events-auto cursor-not-allowed"}),m&&o.jsx("div",{className:"absolute inset-0 z-level-1 flex items-center justify-center rounded border-2 border-error backdrop-blur-xs",children:o.jsx(j,{variant:"captionBold",color:"error",text:x})}),k.map(b=>o.jsx("div",{className:"flex gap-1 flex-1",children:[m1.BACK,m1.LAY].map(w=>{const N=b[w],L=w===m1.BACK,E=L?"bg-babyBlue":"bg-peachyPink";return o.jsxs("button",{type:"button",disabled:!(N!=null&&N.odds)||h||m,onClick:()=>!h&&!m&&(y==null?void 0:y(L?m1.BACK:m1.LAY,N==null?void 0:N.odds)),className:`${E} flex-1 min-[420px]:px-1 md:px-2 min-[420px]:py-1 rounded min-w-10 min-[420px]:min-w-12 md:min-w-18 min-h-8 text-center cursor-pointer disabled:cursor-not-allowed`,children:[o.jsx(j,{variant:"smallBold",color:"black",text:N!=null&&N.odds?N.odds:"-"}),f&&o.jsx(j,{variant:"smallMedium",color:"black",text:N!=null&&N.oddsSize?K1(N.oddsSize):"-"})]},c2(w))})},c2("Pair_Odds")))]}),o.jsx("button",{type:"button",onClick:()=>M==null?void 0:M(!d),className:"sm:ml-2",children:o.jsx(q,{icon:d?"pinned":"pin",color:d?"error":"slategray",size:v?20:24})})]})]})},t0=e=>{switch(e.variant){case"fancy":return o.jsx(Q7,{...e});case"layered":return o.jsx(J7,{...e});case"pair":return o.jsx(e0,{...e});default:return null}},T5=e=>{const{checked:t,onChange:n,disabled:r=!1,ariaLabel:s="Toggle",onColor:i,offColor:a,size:l="md"}=e,C=()=>{r||n==null||n(!t)},c=t?i??"bg-techBlue":a??"bg-primary";return o.jsx("button",{type:"button",role:"switch","aria-checked":t,"aria-label":s,disabled:r,onClick:C,className:`relative ${l==="sm"?"w-12 h-6":"w-16 h-8"} rounded-full transition-colors duration-200 bg-offwhite border border-neutralGray ${r?"opacity-50 cursor-not-allowed":"cursor-pointer"}`,children:o.jsx("span",{className:`absolute top-[3px] left-1 ${l==="sm"?"w-4 h-4":"w-6 h-6"} rounded-full transition-all duration-200 ease-in-out ${c} ${t?l==="sm"?"translate-x-6":"translate-x-8":"translate-x-0"}`})})},n0=e=>{const{competition:t,startStatus:n,title:r,time:s,id:i,isLive:a,onClick:l}=e;return o.jsxs("div",{className:"w-full overflow-hidden rounded-xl border border-brightgray bg-white",children:[o.jsxs("div",{className:"flex items-center justify-between bg-primary px-7 py-2",children:[o.jsx(j,{variant:"body1",color:"secondary",text:t}),o.jsx($4,{text:"Live",state:a?"active":"locked",variant:"filled"})]}),o.jsxs("div",{className:"py-6 md:py-4 flex flex-col gap-3 md:gap-4 pr-3 pl-7",children:[o.jsx(j,{variant:"h4",color:"black",text:r}),o.jsxs("div",{className:"flex items-center justify-between ",children:[o.jsxs("div",{className:"flex items-center gap-2 md:gap-3",children:[o.jsx($4,{text:n,state:a?"active":"info",variant:"outlined",iconName:"timer"}),o.jsx(j,{variant:"caption",color:"slategray",text:s})]}),o.jsx("div",{children:o.jsx(o1,{variant:"ghost",text:"View",iconName:"caretRight",textColor:"techBlue",size:"small",onClick:()=>l==null?void 0:l(i)})})]})]})]})},r0={matchOdds:{supportsLimits:!0},bookmaker:{supportsLimits:!0},fancy:{supportsLimits:!1}},o0=e=>{const{eventId:t,eventName:n,eventStartTime:r,betTiming:s,betLimits:i,visible:a,onToggle:l,onEdit:C,onView:c}=e,{isMobile:u}=O1();return o.jsxs("div",{className:"w-full max-w-lg mx-auto bg-white rounded-xl shadow-sm border border-brightgray overflow-hidden",children:[o.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:[o.jsxs("div",{className:"flex w-full justify-between md:flex-col",children:[o.jsx(j,{variant:u?"captionBold":"subtitle1",text:n,color:"white"}),o.jsx(j,{variant:"caption",text:r,color:"white"})]}),o.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:[o.jsx(T5,{checked:a,onChange:f=>l(t,f),onColor:"bg-success",offColor:"bg-error"}),o.jsx(o1,{text:"Edit",iconName:"edit",variant:"secondary",iconPosition:"right",size:"small",onClick:()=>C(t)})]})]}),o.jsxs("div",{className:"py-1 md:py-2",children:[o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-1 md:gap-6 items-center px-2 py-1",children:[o.jsx(j,{variant:u?"captionBold":"subtitle1",text:"Bet Timer"}),o.jsx("div",{className:"col-span-1 md:col-span-3 grid grid-cols-3 gap-3 md:gap-6",children:s.map(({key:f,label:d,value:h})=>o.jsxs("div",{className:"flex flex-col items-center text-center space-y-1",children:[o.jsx(j,{variant:"caption",text:d,color:"smokyblack"}),o.jsx(j,{variant:u?"captionBold":"subtitle2",text:h,color:"smokyblack"})]},f))})]}),o.jsx("div",{className:"h-px w-full bg-brightgray"}),o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-1 md:gap-6 items-center px-2 py-1",children:[o.jsx(j,{variant:u?"captionBold":"subtitle1",text:"Bet Limits"}),o.jsx("div",{className:"col-span-1 md:col-span-3 grid grid-cols-3 gap-3 md:gap-6",children:Object.keys(r0).map(f=>{const d=i[f];return o.jsx("div",{className:"text-center space-y-1 md:space-y-2 flex justify-end flex-col",children:d?o.jsxs(o.Fragment,{children:[o.jsx(j,{variant:"caption",text:"Min / Max",color:"smokyblack"}),o.jsx(j,{variant:u?"captionBold":"subtitle2",text:`${d.min} / ${K1(d.max)}`,color:"black"})]}):o.jsx(o1,{size:"small",variant:"ghost",text:"View",textColor:"techBlue",iconName:"caretRight",onClick:()=>c(t)})},f)})})]})]})]})};var w1=function(e,t,n){if(n||arguments.length===2)for(var r=0,s=t.length,i;r<s;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))},s0=["onCopy","onCut","onPaste"],i0=["onCompositionEnd","onCompositionStart","onCompositionUpdate"],a0=["onFocus","onBlur"],l0=["onInput","onInvalid","onReset","onSubmit"],C0=["onLoad","onError"],c0=["onKeyDown","onKeyPress","onKeyUp"],u0=["onAbort","onCanPlay","onCanPlayThrough","onDurationChange","onEmptied","onEncrypted","onEnded","onError","onLoadedData","onLoadedMetadata","onLoadStart","onPause","onPlay","onPlaying","onProgress","onRateChange","onSeeked","onSeeking","onStalled","onSuspend","onTimeUpdate","onVolumeChange","onWaiting"],d0=["onClick","onContextMenu","onDoubleClick","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp"],f0=["onDrag","onDragEnd","onDragEnter","onDragExit","onDragLeave","onDragOver","onDragStart","onDrop"],h0=["onSelect"],g0=["onTouchCancel","onTouchEnd","onTouchMove","onTouchStart"],m0=["onPointerDown","onPointerMove","onPointerUp","onPointerCancel","onGotPointerCapture","onLostPointerCapture","onPointerEnter","onPointerLeave","onPointerOver","onPointerOut"],p0=["onScroll"],x0=["onWheel"],v0=["onAnimationStart","onAnimationEnd","onAnimationIteration"],w0=["onTransitionEnd"],y0=["onToggle"],j0=["onChange"],M0=w1(w1(w1(w1(w1(w1(w1(w1(w1(w1(w1(w1(w1(w1(w1(w1(w1(w1([],s0,!0),i0,!0),a0,!0),l0,!0),C0,!0),c0,!0),u0,!0),d0,!0),f0,!0),h0,!0),g0,!0),m0,!0),p0,!0),x0,!0),v0,!0),w0,!0),j0,!0),y0,!0);function b0(e,t){var n={};return M0.forEach(function(r){var s=e[r];s&&(n[r]=s)}),n}function I5(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=I5(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function I2(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=I5(e))&&(r&&(r+=" "),r+=t);return r}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 r=parseInt(n,10);if(!isNaN(r))return r}}}throw new Error("Failed to get hours from date: ".concat(e,"."))}function U1(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",r=parseInt(n,10);if(!isNaN(r))return r}}throw new Error("Failed to get minutes from date: ".concat(e,"."))}function u2(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",r=parseInt(n,10);if(!isNaN(r))return r}}throw new Error("Failed to get seconds from date: ".concat(e,"."))}function H4(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",r=n.split(".")[1]||"0",s=parseInt(r,10);if(!isNaN(s))return s}}throw new Error("Failed to get seconds from date: ".concat(e,"."))}function F2(e,t){t===void 0&&(t=2);var n="".concat(e);return n.length>=t?e:"0000".concat(n).slice(-t)}function A5(e){var t=F2(L1(e)),n=F2(U1(e));return"".concat(t,":").concat(n)}function W5(e){var t=F2(L1(e)),n=F2(U1(e)),r=F2(u2(e));return"".concat(t,":").concat(n,":").concat(r)}function V4(e){var t=e.angle,n=t===void 0?0:t,r=e.name,s=e.length,i=s===void 0?100:s,a=e.oppositeLength,l=a===void 0?10:a,C=e.width,c=C===void 0?1:C;return o.jsx("div",{className:"react-clock__hand react-clock__".concat(r,"-hand"),style:{transform:"rotate(".concat(n,"deg)")},children:o.jsx("div",{className:"react-clock__hand__body react-clock__".concat(r,"-hand__body"),style:{width:"".concat(c,"px"),top:"".concat(50-i/2,"%"),bottom:"".concat(50-l/2,"%")}})})}var R3=g.memo(function(t){var n=t.angle,r=n===void 0?0:n,s=t.length,i=s===void 0?10:s,a=t.name,l=t.width,C=l===void 0?1:l;return o.jsx("div",{className:"react-clock__mark react-clock__".concat(a,"-mark"),style:{transform:"rotate(".concat(r,"deg)")},children:o.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,"%")}})})}),L0=g.memo(function(t){var n=t.angle,r=n===void 0?0:n,s=t.length,i=s===void 0?10:s,a=t.name,l=t.number;return o.jsx("div",{className:"react-clock__mark react-clock__".concat(a,"-mark"),style:{transform:"rotate(".concat(r,"deg)")},children:o.jsx("div",{className:"react-clock__mark__number",style:{transform:"rotate(-".concat(r,"deg)"),top:"".concat(i/2,"%")},children:l})})}),E4,P3;function S0(){if(P3)return E4;P3=1;const e=(C,c,u,f)=>{if(u==="length"||u==="prototype"||u==="arguments"||u==="caller")return;const d=Object.getOwnPropertyDescriptor(C,u),h=Object.getOwnPropertyDescriptor(c,u);!t(d,h)&&f||Object.defineProperty(C,u,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 u=Object.getPrototypeOf(c);u!==Object.getPrototypeOf(C)&&Object.setPrototypeOf(C,u)},r=(C,c)=>`/* Wrapped ${C}*/
|
|
66
66
|
${c}`,s=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),i=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),a=(C,c,u)=>{const f=u===""?"":`with ${u.trim()}() `,d=r.bind(null,f,c.toString());Object.defineProperty(d,"name",i),Object.defineProperty(C,"toString",{...s,value:d})};return E4=(C,c,{ignoreNonConfigurable:u=!1}={})=>{const{name:f}=C;for(const d of Reflect.ownKeys(c))e(C,c,d,u);return n(C,c),a(C,c,f),C},E4}var R2={exports:{}},O4,F3;function k0(){return F3||(F3=1,O4=()=>{const e={};return e.promise=new Promise((t,n)=>{e.resolve=t,e.reject=n}),e}),O4}var Q2=R2.exports,B3;function N0(){return B3||(B3=1,(function(e,t){var n=Q2&&Q2.__awaiter||function(a,l,C,c){return new(C||(C=Promise))(function(u,f){function d(x){try{m(c.next(x))}catch(p){f(p)}}function h(x){try{m(c.throw(x))}catch(p){f(p)}}function m(x){x.done?u(x.value):new C(function(p){p(x.value)}).then(d,h)}m((c=c.apply(a,l||[])).next())})},r=Q2&&Q2.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(k0());function i(a,l="maxAge"){let C,c,u;const f=()=>n(this,void 0,void 0,function*(){if(C!==void 0)return;const m=x=>n(this,void 0,void 0,function*(){u=s.default();const p=x[1][l]-Date.now();if(p<=0){a.delete(x[0]),u.resolve();return}return C=x[0],c=setTimeout(()=>{a.delete(x[0]),u&&u.resolve()},p),typeof c.unref=="function"&&c.unref(),u.promise});try{for(const x of a)yield m(x)}catch{}C=void 0}),d=()=>{C=void 0,c!==void 0&&(clearTimeout(c),c=void 0),u!==void 0&&(u.reject(void 0),u=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&&d(),f(),p},f(),a}t.default=i,e.exports=i,e.exports.default=i})(R2,R2.exports)),R2.exports}var Z4,$3;function H0(){if($3)return Z4;$3=1;const e=S0(),t=N0(),n=new WeakMap,r=new WeakMap,s=(i,{cacheKey:a,cache:l=new Map,maxAge:C}={})=>{typeof C=="number"&&t(l);const c=function(...u){const f=a?a(u):u[0],d=l.get(f);if(d)return d.data;const h=i.apply(this,u);return l.set(f,{data:h,maxAge:C?Date.now()+C:Number.POSITIVE_INFINITY}),h};return e(c,i,{ignoreNonConfigurable:!0}),r.set(c,l),c};return s.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 u=s(c,i);return n.set(this,u),u}return n.get(this)}},s.clear=i=>{const a=r.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()},Z4=s,Z4}var V0=H0();const Y5=Q3(V0);function E0(e){return typeof e=="string"}function O0(e,t,n){return n.indexOf(e)===t}function Z0(e){return e.toLowerCase()===e}function T3(e){return e.indexOf(",")===-1?e:e.split(",")}function q4(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 q4(n)}if(e.indexOf("@")!==-1){var r=e.split("@")[0],n=r===void 0?"":r;return q4(n)}if(e.indexOf("-")===-1||!Z0(e))return e;var s=e.split("-"),i=s[0],a=s[1],l=a===void 0?"":a;return"".concat(i,"-").concat(l.toUpperCase())}function _0(e){var t=e===void 0?{}:e,n=t.useFallbackLocale,r=n===void 0?!0:n,s=t.fallbackLocale,i=s===void 0?"en-US":s,a=[];if(typeof navigator<"u"){for(var l=navigator.languages||[],C=[],c=0,u=l;c<u.length;c++){var f=u[c];C=C.concat(T3(f))}var d=navigator.language,h=d&&T3(d);a=a.concat(C,h)}return r&&a.push(i),a.filter(E0).map(q4).filter(O0)}var D0=Y5(_0,{cacheKey:JSON.stringify});function R0(e){return D0(e)[0]||null}var d3=Y5(R0,{cacheKey:JSON.stringify});function P0(e,t){return t.toLocaleString(e||d3()||void 0)}function F0(e){return e!==null&&e!==!1&&!Number.isNaN(Number(e))}function B0(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Math.max.apply(Math,e.filter(F0))}function $0(e){var t=e.className,n=e.formatHour,r=n===void 0?P0:n,s=e.hourHandLength,i=s===void 0?50:s,a=e.hourHandOppositeLength,l=e.hourHandWidth,C=l===void 0?4:l,c=e.hourMarksLength,u=c===void 0?10:c,f=e.hourMarksWidth,d=f===void 0?3:f,h=e.locale,m=e.minuteHandLength,x=m===void 0?70:m,p=e.minuteHandOppositeLength,y=e.minuteHandWidth,M=y===void 0?2:y,v=e.minuteMarksLength,k=v===void 0?6:v,b=e.minuteMarksWidth,w=b===void 0?1:b,N=e.renderHourMarks,L=N===void 0?!0:N,E=e.renderMinuteHand,H=E===void 0?!0:E,Z=e.renderMinuteMarks,V=Z===void 0?!0:Z,F=e.renderNumbers,z=e.renderSecondHand,W=z===void 0?!0:z,c1=e.secondHandLength,h1=c1===void 0?90:c1,x1=e.secondHandOppositeLength,Q=e.secondHandWidth,r1=Q===void 0?1:Q,S=e.size,D=S===void 0?150:S,Y=e.useMillisecondPrecision,B=e.value;function f1(){if(!V)return null;for(var d1=[],s1=1;s1<=60;s1+=1){var W1=L&&!(s1%5);W1||d1.push(o.jsx(R3,{angle:s1*6,length:k,name:"minute",width:w},"minute_".concat(s1)))}return d1}function R(){if(!L)return null;for(var d1=[],s1=1;s1<=12;s1+=1)d1.push(o.jsx(R3,{angle:s1*30,length:u,name:"hour",width:d},"hour_".concat(s1)));return d1}function _(){if(!F)return null;for(var d1=[],s1=1;s1<=12;s1+=1)d1.push(o.jsx(L0,{angle:s1*30,length:B0(L&&u,V&&k,0),name:"number",number:r(h,s1)},"number_".concat(s1)));return d1}function a1(){return o.jsxs("div",{className:"react-clock__face",children:[f1(),R(),_()]})}function g1(){var d1=B?L1(B)*30+U1(B)/2+u2(B)/120+(Y?H4(B)/12e4:0):0;return o.jsx(V4,{angle:d1,length:i,name:"hour",oppositeLength:a,width:C})}function u1(){if(!H)return null;var d1=B?L1(B)*360+U1(B)*6+u2(B)/10+(Y?H4(B)/1e4:0):0;return o.jsx(V4,{angle:d1,length:x,name:"minute",oppositeLength:p,width:M})}function F1(){if(!W)return null;var d1=B?U1(B)*360+u2(B)*6+(Y?H4(B)*.006:0):0;return o.jsx(V4,{angle:d1,length:h1,name:"second",oppositeLength:x1,width:r1})}return o.jsxs("time",{className:I2("react-clock",t),dateTime:B instanceof Date?B.toLocaleTimeString("en",{hourCycle:"h23",hour:"2-digit",minute:H?"2-digit":void 0,second:W?"2-digit":void 0}):B||void 0,style:{width:D,height:D},children:[a1(),g1(),u1(),F1()]})}function M1(e){return e.getBoundingClientRect()}function I3(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 _4,A3;function T0(){if(A3)return _4;A3=1;var e=process.env.NODE_ENV!=="production",t=function(){};if(e){var n=function(s,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: "+s.replace(/%s/g,function(){return i[C++]});typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}};t=function(r,s,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(s===void 0)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");r||n.apply(null,[s].concat(i))}}return _4=t,_4}var I0=T0();const W3=Q3(I0);var e2=function(){return e2=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s])}return e},e2.apply(this,arguments)},A0=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]]);return n},W0=typeof document<"u",Y0=W0&&"MutationObserver"in window;function J2(e){return e.charAt(0).toUpperCase()+e.slice(1)}function z0(e){for(var t=e.parentElement;t;){var n=window.getComputedStyle(t).overflow;if(n.split(" ").every(function(r){return r==="auto"||r==="scroll"}))return t;t=t.parentElement}return document.documentElement}function z5(e){var t=e.axis,n=e.container,r=e.element,s=e.invertAxis,i=e.scrollContainer,a=e.secondary,l=e.spacing,C=window.getComputedStyle(r),c=n.parentElement;if(!c)return;var u=I3(c,i),f=I3(c,document.documentElement),d=t==="x",h=d?"left":"top",m=d?"right":"bottom",x=d?"width":"height",p="overflow".concat(J2(h)),y="overflow".concat(J2(m)),M="scroll".concat(J2(h)),v=J2(x),k="offset".concat(v),b="client".concat(v),w="min-".concat(x),N=i[k]-i[b],L=typeof l=="object"?l[h]:l,E=-Math.max(u[p],f[p]+document.documentElement[M])-L,H=typeof l=="object"?l[m]:l,Z=-Math.max(u[y],f[y]-document.documentElement[M])-H-N;a&&(E+=c[b],Z+=c[b]);var V=r[k];function F(){r.style[h]="auto",r.style[m]=a?"0":"100%"}function z(){r.style[h]=a?"0":"100%",r.style[m]="auto"}function W(r1,S){var D=V<=r1;return D&&S(),D}function c1(){return W(E,F)}function h1(){return W(Z,z)}function x1(){var r1=E>Z,S=C.getPropertyValue(w),D=S?parseInt(S,10):null;function Y(B){W3(!D||B>=D,"<Fit />'s child will not fit anywhere with its current ".concat(w," of ").concat(D,"px."));var f1=Math.max(B,D||0);W3(!1,"<Fit />'s child needed to have its ".concat(x," decreased to ").concat(f1,"px.")),r.style[x]="".concat(f1,"px")}r1?(Y(E),F()):(Y(Z),z())}var Q;s?Q=c1()||h1():Q=h1()||c1(),Q||x1()}function G0(e){z5(e)}function q0(e){z5(e2(e2({},e),{axis:e.axis==="x"?"y":"x",secondary:!0}))}function U0(e){var t=e.invertAxis,n=e.invertSecondaryAxis,r=A0(e,["invertAxis","invertSecondaryAxis"]);G0(e2(e2({},r),{invertAxis:t})),q0(e2(e2({},r),{invertAxis:n}))}function K0(e){var t=e.children,n=e.invertAxis,r=e.invertSecondaryAxis,s=e.mainAxis,i=s===void 0?"y":s,a=e.spacing,l=a===void 0?8:a,C=g.useRef(void 0),c=g.useRef(void 0),u=g.useRef(void 0),f=g.useRef(void 0),d=g.useRef(void 0),h=g.useCallback(function(){if(!(!d.current||!C.current||!c.current)){var p=c.current.clientWidth,y=c.current.clientHeight;if(!(u.current===p&&f.current===y)){u.current=p,f.current=y;var M=C.current.parentElement;if(M){var v=window.getComputedStyle(c.current),k=v.position;k!=="absolute"&&(c.current.style.position="absolute");var b=window.getComputedStyle(M),w=b.position;w!=="relative"&&w!=="absolute"&&(M.style.position="relative"),U0({axis:i,container:C.current,element:c.current,invertAxis:n,invertSecondaryAxis:r,scrollContainer:d.current,spacing:l})}}}},[n,r,i,l]),m=g.Children.only(t);g.useEffect(function(){h();function p(){h()}if(Y0&&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,d.current=z0(p))}return o.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 X0(e){var t=e.children;return o.jsx("span",{className:"react-time-picker__inputGroup__divider",children:t})}var Q0=["normal","small-caps"];function G5(e){if(!e)return"";var t=window.getComputedStyle(e);if(t.font)return t.font;var n=t.fontFamily!=="";if(!n)return"";var r=Q0.includes(t.fontVariant)?t.fontVariant:"normal";return"".concat(t.fontStyle," ").concat(r," ").concat(t.fontWeight," ").concat(t.fontSize," / ").concat(t.lineHeight," ").concat(t.fontFamily)}var Y3;function J0(e,t){var n=Y3||(Y3=document.createElement("canvas")),r=n.getContext("2d");if(!r)return null;r.font=t;var s=r.measureText(e).width;return Math.ceil(s)}function n4(e){if(typeof document>"u"||!e)return null;var t=G5(e),n=e.value||e.placeholder,r=J0(n,t);return r===null?null:(e.style.width="".concat(r,"px"),r)}var f3=typeof document<"u",et=f3?g.useLayoutEffect:g.useEffect,tt=f3&&/(MSIE|Trident\/|Edge\/)/.test(navigator.userAgent),nt=f3&&/Firefox/.test(navigator.userAgent);function rt(e){var t=e.target;tt?requestAnimationFrame(function(){return t.select()}):t.select()}function ot(e){if(document.readyState==="complete")return;function t(){n4(e)}window.addEventListener("load",t)}function st(e){if(!document.fonts)return;var t=G5(e);if(!t)return;var n=document.fonts.check(t);if(n)return;function r(){n4(e)}document.fonts.addEventListener("loadingdone",r)}function it(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 at(e){if(e!==null)return function(n){if(!nt){var r=n.key,s=n.target,i=s.value,a=r.length===1&&/\d/.test(r),l=it(s);(!a||!(l||i.length<e))&&n.preventDefault()}}}function i4(e){var t=e.ariaLabel,n=e.autoFocus,r=e.className,s=e.disabled,i=e.inputRef,a=e.max,l=e.min,C=e.name,c=e.nameForClass,u=e.onChange,f=e.onKeyDown,d=e.onKeyUp,h=e.placeholder,m=h===void 0?"--":h,x=e.required,p=e.showLeadingZeros,y=e.step,M=e.value;et(function(){!i||!i.current||(n4(i.current),ot(i.current),st(i.current))},[i,M]);var v=p&&M&&Number(M)<10&&(M==="0"||!M.toString().startsWith("0")),k=a?a.toString().length:null;return o.jsxs(o.Fragment,{children:[v?o.jsx("span",{className:"".concat(r,"__leadingZero"),children:"0"}):null,o.jsx("input",{"aria-label":t,autoComplete:"off",autoFocus:n,className:I2("".concat(r,"__input"),"".concat(r,"__").concat(c||C),v&&"".concat(r,"__input--hasLeadingZero")),"data-input":"true",disabled:s,inputMode:"numeric",max:a,min:l,name:C,onChange:u,onFocus:rt,onKeyDown:f,onKeyPress:at(k),onKeyUp:function(b){n4(b.target),d&&d(b)},placeholder:m,ref:i,required:x,step:y,type:"number",value:M!==null?M:""})]})}function z3(e,t){var n=Number(e);return t==="am"&&n===12?n=0:t==="pm"&&n<12&&(n+=12),n}function y2(e){var t=Number(e)%12||12;return[t,Number(e)<12?"am":"pm"]}var D4=new Map;function q5(e){return function(n,r){var s=n||d3();D4.has(s)||D4.set(s,new Map);var i=D4.get(s);return i.has(e)||i.set(e,new Intl.DateTimeFormat(s||void 0,e).format),i.get(e)(r)}}var R4=new Map;function lt(e){return function(t,n){var r=t||d3();R4.has(r)||R4.set(r,new Map);var s=R4.get(r);return s.has(e)||s.set(e,new Intl.NumberFormat(r||void 0,e).format),s.get(e)(n)}}var Ct=["9","٩"],G3=new RegExp("[".concat(Ct.join(""),"]")),q3=q5({hour:"numeric"});function U5(e){var t=q3(e,new Date(2017,0,1,9)),n=q3(e,new Date(2017,0,1,21)),r=t.split(G3),s=r[0],i=r[1],a=n.split(G3),l=a[0],C=a[1];if(C!==void 0){if(s!==l)return[s,l].map(function(c){return c.trim()});if(i!==C)return[i,C].map(function(c){return c.trim()})}return["AM","PM"]}function K5(e){return e!==null&&e!==!1&&!Number.isNaN(Number(e))}function a4(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Math.min.apply(Math,e.filter(K5))}function l4(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Math.max.apply(Math,e.filter(K5))}var U4=function(){return U4=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s])}return e},U4.apply(this,arguments)},ct=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]]);return n};function ut(e){var t=e.amPm,n=e.maxTime,r=e.minTime,s=e.value,i=ct(e,["amPm","maxTime","minTime","value"]),a=a4(12,n&&(function(){var c=y2(L1(n)),u=c[0],f=c[1];return f!==t?null:u})()),l=l4(1,r&&(function(){var c=y2(L1(r)),u=c[0],f=c[1];return f!==t||u===12?null:u})()),C=s?y2(s)[0].toString():"";return o.jsx(i4,U4({max:a,min:l,name:"hour12",nameForClass:"hour",value:C},i))}var K4=function(){return K4=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s])}return e},K4.apply(this,arguments)},dt=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]]);return n};function ft(e){var t=e.maxTime,n=e.minTime,r=dt(e,["maxTime","minTime"]),s=a4(23,t&&L1(t)),i=l4(0,n&&L1(n));return o.jsx(i4,K4({max:s,min:i,name:"hour24",nameForClass:"hour"},r))}var X4=function(){return X4=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s])}return e},X4.apply(this,arguments)},ht=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]]);return n};function gt(e){var t=e.hour,n=e.maxTime,r=e.minTime,s=e.showLeadingZeros,i=s===void 0?!0:s,a=ht(e,["hour","maxTime","minTime","showLeadingZeros"]);function l(u){return t===L1(u).toString()}var C=a4(59,n&&l(n)&&U1(n)),c=l4(0,r&&l(r)&&U1(r));return o.jsx(i4,X4({max:C,min:c,name:"minute",showLeadingZeros:i},a))}var Q4=function(){return Q4=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s])}return e},Q4.apply(this,arguments)},mt=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]]);return n};function pt(e){var t=e.hour,n=e.maxTime,r=e.minTime,s=e.minute,i=e.showLeadingZeros,a=i===void 0?!0:i,l=mt(e,["hour","maxTime","minTime","minute","showLeadingZeros"]);function C(f){return t===L1(f).toString()&&s===U1(f).toString()}var c=a4(59,n&&C(n)&&u2(n)),u=l4(0,r&&C(r)&&u2(r));return o.jsx(i4,Q4({max:c,min:u,name:"second",showLeadingZeros:a},l))}function xt(e){var t=e.ariaLabel,n=e.disabled,r=e.maxTime,s=e.minTime,i=e.name,a=e.onChange,l=e.required,C=e.value,c=e.valueType,u=(function(){switch(c){case"hour":return function(h){return"".concat(L1(h),":00")};case"minute":return A5;case"second":return W5;default:throw new Error("Invalid valueType")}})(),f=(function(){switch(c){case"hour":return 3600;case"minute":return 60;case"second":return 1;default:throw new Error("Invalid valueType")}})();function d(h){h.stopPropagation()}return o.jsx("input",{"aria-label":t,disabled:n,hidden:!0,max:r?u(r):void 0,min:s?u(s):void 0,name:i,onChange:a,onFocus:d,required:l,step:f,style:{visibility:"hidden",position:"absolute",zIndex:"-999"},type:"time",value:C?u(C):""})}function vt(e){var t=e.ariaLabel,n=e.autoFocus,r=e.className,s=e.disabled,i=e.inputRef,a=e.locale,l=e.maxTime,C=e.minTime,c=e.onChange,u=e.onKeyDown,f=e.required,d=e.value,h=C?y2(L1(C))[1]==="pm":!1,m=l?y2(L1(l))[1]==="am":!1,x="amPm",p=U5(a),y=p[0],M=p[1];return o.jsxs("select",{"aria-label":t,autoFocus:n,className:I2("".concat(r,"__input"),"".concat(r,"__").concat(x)),"data-input":"true","data-select":"true",disabled:s,name:x,onChange:c,onKeyDown:u,ref:i,required:f,value:d!==null?d:"",children:[!d&&o.jsx("option",{value:"",children:"--"}),o.jsx("option",{disabled:h,value:"am",children:y}),o.jsx("option",{disabled:m,value:"pm",children:M})]})}var l2=function(){return l2=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s])}return e},l2.apply(this,arguments)},U3={},wt=["hour","minute","second"];function yt(e){return e.dataset.input==="true"}function K3(e,t){var n=e;do n=n[t];while(n&&!yt(n));return n}function P4(e){e&&e.focus()}function jt(e,t,n){var r=[],s=new RegExp(Object.keys(t).map(function(a){return"".concat(a,"+")}).join("|"),"g"),i=e.match(s);return e.split(s).reduce(function(a,l,C){var c=l&&o.jsx(X0,{children:l},"separator_".concat(C));a.push(c);var u=i&&i[C];if(u){var f=t[u]||t[Object.keys(t).find(function(d){return u.match(d)})];if(!f)return a;!n&&r.includes(f)?a.push(u):(a.push(f(u,C)),r.push(f))}return a},[])}var e4=lt({useGrouping:!1});function Mt(e){var t=e.amPmAriaLabel,n=e.autoFocus,r=e.className,s=e.disabled,i=e.format,a=e.hourAriaLabel,l=e.hourPlaceholder,C=e.isClockOpen,c=C===void 0?null:C,u=e.locale,f=e.maxDetail,d=f===void 0?"minute":f,h=e.maxTime,m=e.minTime,x=e.minuteAriaLabel,p=e.minutePlaceholder,y=e.name,M=y===void 0?"time":y,v=e.nativeInputAriaLabel,k=e.onChange,b=e.onInvalidChange,w=e.required,N=e.secondAriaLabel,L=e.secondPlaceholder,E=e.value,H=g.useState(null),Z=H[0],V=H[1],F=g.useState(null),z=F[0],W=F[1],c1=g.useState(null),h1=c1[0],x1=c1[1],Q=g.useState(null),r1=Q[0],S=Q[1],D=g.useState(null),Y=D[0],B=D[1],f1=g.useRef(null),R=g.useRef(null),_=g.useRef(null),a1=g.useRef(null),g1=g.useRef(null),u1=g.useState(c),F1=u1[0],d1=u1[1],s1=g.useRef(void 0);g.useEffect(function(){d1(c)},[c]),g.useEffect(function(){var O=E;O?(V(y2(L1(O))[1]),W(L1(O).toString()),x1(U1(O).toString()),S(u2(O).toString()),B(O)):(V(null),W(null),x1(null),S(null),B(null))},[E,m,h,d,F1]);var W1=d,Z1=(function(){var O=wt.indexOf(d),G=U3[O]||(function(){var e1={hour:"numeric"};return O>=1&&(e1.minute="numeric"),O>=2&&(e1.second="numeric"),U3[O]=e1,e1})();return q5(G)})();function b2(O){var G=(function(){switch(W1){case"hour":case"minute":return A5;case"second":return W5;default:throw new Error("Invalid valueType")}})();return G(O)}var n2=i||(function(){var O=21,G=9,e1=13,i1=14,i2=new Date(2017,0,1,O,e1,i1);return Z1(u,i2).replace(e4(u,G),"h").replace(e4(u,O),"H").replace(e4(u,e1),"mm").replace(e4(u,i1),"ss").replace(new RegExp(U5(u).join("|")),"a")})(),L2=(function(){var O=n2.match(/[^0-9a-z]/i);return O?O[0]:null})();function r2(O){if(O.target===O.currentTarget){var G=O.target.children[1];P4(G)}}function S2(O){switch(s1.current=O.key,O.key){case"ArrowLeft":case"ArrowRight":case L2:{O.preventDefault();var G=O.target,e1=O.key==="ArrowLeft"?"previousElementSibling":"nextElementSibling",i1=K3(G,e1);P4(i1);break}}}function f2(O){var G=O.key,e1=O.target,i1=s1.current===G;if(i1){var i2=!isNaN(Number(G));if(i2){var X1=e1.getAttribute("max");if(X1){var A=e1.value;if(Number(A)*10>Number(X1)||A.length>=X1.length){var K="nextElementSibling",$=K3(e1,K);P4($)}}}}}function o2(){if(!k)return;function O(v1){return!!v1}var G=[f1.current,R.current,_.current,a1.current,g1.current].filter(O),e1=G.slice(1),i1={};G.forEach(function(v1){i1[v1.name]=v1.type==="number"?"valueAsNumber"in v1?v1.valueAsNumber:Number(v1.value):v1.value});var i2=e1.every(function(v1){return!v1.value});if(i2){k(null,!1);return}var X1=G.every(function(v1){return v1.value}),A=G.every(function(v1){return v1.validity.valid});if(X1&&A){var K=Number(i1.hour24||i1.hour12&&i1.amPm&&z3(i1.hour12,i1.amPm)||0),$=Number(i1.minute||0),X=Number(i1.second||0),y1=function(v1){return"0".concat(v1).slice(-2)},U="".concat(y1(K),":").concat(y1($),":").concat(y1(X)),c4=b2(U);k(c4,!1);return}b&&b()}function Y1(O){var G=O.target,e1=G.name,i1=G.value;switch(e1){case"amPm":V(i1);break;case"hour12":W(i1?z3(i1,Z||"am").toString():"");break;case"hour24":W(i1);break;case"minute":x1(i1);break;case"second":S(i1);break}o2()}function s2(O){var G=O.target.value;if(k){var e1=G||null;k(e1,!1)}}var _1={className:r,disabled:s,maxTime:h,minTime:m,onChange:Y1,onKeyDown:S2,onKeyUp:f2,required:!!(w||F1)};function k2(O,G){if(O&&O.length>2)throw new Error("Unsupported token: ".concat(O));var e1=O?O.length===2:!1;return o.jsx(ut,l2({},_1,{amPm:Z,ariaLabel:a,autoFocus:G===0&&n,inputRef:R,placeholder:l,showLeadingZeros:e1,value:z}),"hour12")}function J(O,G){if(O&&O.length>2)throw new Error("Unsupported token: ".concat(O));var e1=O?O.length===2:!1;return o.jsx(ft,l2({},_1,{ariaLabel:a,autoFocus:G===0&&n,inputRef:_,placeholder:l,showLeadingZeros:e1,value:z}),"hour24")}function l1(O,G){return/h/.test(O)?k2(O,G):J(O,G)}function V1(O,G){if(O&&O.length>2)throw new Error("Unsupported token: ".concat(O));var e1=O?O.length===2:!1;return o.jsx(gt,l2({},_1,{ariaLabel:x,autoFocus:G===0&&n,hour:z,inputRef:a1,placeholder:p,showLeadingZeros:e1,value:h1}),"minute")}function B1(O,G){if(O&&O.length>2)throw new Error("Unsupported token: ".concat(O));var e1=O?O.length===2:!0;return o.jsx(pt,l2({},_1,{ariaLabel:N,autoFocus:G===0&&n,hour:z,inputRef:g1,minute:h1,placeholder:L,showLeadingZeros:e1,value:r1}),"second")}function h2(O,G){return o.jsx(vt,l2({},_1,{ariaLabel:t,autoFocus:G===0&&n,inputRef:f1,locale:u,onChange:Y1,value:Z}),"ampm")}function N2(){var O={h:l1,H:l1,m:V1,s:B1,a:h2},G=typeof i<"u";return jt(n2,O,G)}function g2(){return o.jsx(xt,{ariaLabel:v,disabled:s,maxTime:h,minTime:m,name:M,onChange:s2,required:w,value:Y,valueType:W1},"time")}return o.jsxs("div",{className:r,onClick:r2,children:[g2(),N2()]})}var d2=function(){return d2=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s])}return e},d2.apply(this,arguments)},bt=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]]);return n},S1="react-time-picker",Lt=["mousedown","focusin","touchstart"],X5={xmlns:"http://www.w3.org/2000/svg",width:19,height:19,viewBox:"0 0 19 19",stroke:"black",strokeWidth:2},St=o.jsxs("svg",d2({},X5,{className:"".concat(S1,"__clock-button__icon ").concat(S1,"__button__icon"),fill:"none",children:[o.jsx("circle",{cx:"9.5",cy:"9.5",r:"7.5"}),o.jsx("path",{d:"M9.5 4.5 v5 h4"})]})),kt=o.jsxs("svg",d2({},X5,{className:"".concat(S1,"__clear-button__icon ").concat(S1,"__button__icon"),children:[o.jsx("line",{x1:"4",x2:"15",y1:"4",y2:"15"}),o.jsx("line",{x1:"15",x2:"4",y1:"4",y2:"15"})]}));function Nt(e){var t=e.amPmAriaLabel,n=e.autoFocus,r=e.className,s=e.clearAriaLabel,i=e.clearIcon,a=i===void 0?kt:i,l=e.clockAriaLabel,C=e.clockIcon,c=C===void 0?St:C,u=e.closeClock,f=u===void 0?!0:u,d=e["data-testid"],h=e.hourAriaLabel,m=e.hourPlaceholder,x=e.disableClock,p=e.disabled,y=e.format,M=e.id,v=e.isOpen,k=v===void 0?null:v,b=e.locale,w=e.maxTime,N=e.maxDetail,L=N===void 0?"minute":N,E=e.minTime,H=e.minuteAriaLabel,Z=e.minutePlaceholder,V=e.name,F=V===void 0?"time":V,z=e.nativeInputAriaLabel,W=e.onClockClose,c1=e.onClockOpen,h1=e.onChange,x1=e.onFocus,Q=e.onInvalidChange,r1=e.openClockOnFocus,S=r1===void 0?!0:r1,D=e.required,Y=e.value,B=e.secondAriaLabel,f1=e.secondPlaceholder,R=e.shouldCloseClock,_=e.shouldOpenClock,a1=bt(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"]),g1=g.useState(k),u1=g1[0],F1=g1[1],d1=g.useRef(null),s1=g.useRef(null);g.useEffect(function(){F1(k)},[k]);function W1(J){var l1=J.reason;_&&!_({reason:l1})||(F1(!0),c1&&c1())}var Z1=g.useCallback(function(J){var l1=J.reason;R&&!R({reason:l1})||(F1(!1),W&&W())},[W,R]);function b2(){u1?Z1({reason:"buttonClick"}):W1({reason:"buttonClick"})}function n2(J,l1){l1===void 0&&(l1=f),l1&&Z1({reason:"select"}),h1&&h1(J)}function L2(J){x1&&x1(J),!(p||u1||!S||J.target.dataset.select==="true")&&W1({reason:"focus"})}var r2=g.useCallback(function(J){J.key==="Escape"&&Z1({reason:"escape"})},[Z1]);function S2(){n2(null)}function f2(J){J.stopPropagation()}var o2=g.useCallback(function(J){var l1=d1.current,V1=s1.current,B1="composedPath"in J?J.composedPath()[0]:J.target;B1&&l1&&!l1.contains(B1)&&(!V1||!V1.contains(B1))&&Z1({reason:"outsideAction"})},[s1,Z1,d1]),Y1=g.useCallback(function(J){J===void 0&&(J=u1),Lt.forEach(function(l1){J?document.addEventListener(l1,o2):document.removeEventListener(l1,o2)}),J?document.addEventListener("keydown",r2):document.removeEventListener("keydown",r2)},[u1,o2,r2]);g.useEffect(function(){return Y1(),function(){Y1(!1)}},[Y1]);function s2(){var J=(Array.isArray(Y)?Y:[Y])[0],l1={amPmAriaLabel:t,hourAriaLabel:h,minuteAriaLabel:H,nativeInputAriaLabel:z,secondAriaLabel:B},V1={hourPlaceholder:m,minutePlaceholder:Z,secondPlaceholder:f1};return o.jsxs("div",{className:"".concat(S1,"__wrapper"),children:[o.jsx(Mt,d2({},l1,V1,{autoFocus:n,className:"".concat(S1,"__inputGroup"),disabled:p,format:y,isClockOpen:u1,locale:b,maxDetail:L,maxTime:w,minTime:E,name:F,onChange:n2,onInvalidChange:Q,required:D,value:J})),a!==null&&o.jsx("button",{"aria-label":s,className:"".concat(S1,"__clear-button ").concat(S1,"__button"),disabled:p,onClick:S2,onFocus:f2,type:"button",children:typeof a=="function"?g.createElement(a):a}),c!==null&&!x&&o.jsx("button",{"aria-expanded":u1||!1,"aria-label":l,className:"".concat(S1,"__clock-button ").concat(S1,"__button"),disabled:p,onClick:b2,onFocus:f2,type:"button",children:typeof c=="function"?g.createElement(c):c})]})}function _1(){if(u1===null||x)return null;var J=e.clockProps,l1=e.portalContainer,V1=e.value,B1="".concat(S1,"__clock"),h2=I2(B1,"".concat(B1,"--").concat(u1?"open":"closed")),N2=(Array.isArray(V1)?V1:[V1])[0],g2=o.jsx($0,d2({locale:b,value:N2},J));return l1?X3.createPortal(o.jsx("div",{ref:s1,className:h2,children:g2}),l1):o.jsx(K0,{children:o.jsx("div",{ref:function(O){O&&!u1&&O.removeAttribute("style")},className:h2,children:g2})})}var k2=g.useMemo(function(){return b0(a1)},[a1]);return o.jsxs("div",d2({className:I2(S1,"".concat(S1,"--").concat(u1?"open":"closed"),"".concat(S1,"--").concat(p?"disabled":"enabled"),r),"data-testid":d,id:M},k2,{onFocus:L2,ref:d1,children:[s2(),_1()]}))}const Ht=e=>{const{title:t="Select Time",selectedTime:n,fullWidth:r,errorMessage:s="Invalid time range. Start time must be earlier than end time."}=e,[i,a]=g.useState(!1),[l,C]=g.useState(null),[c,u]=g.useState(null),[f,d]=g.useState(t),[h,m]=g.useState(!1),x=g.useRef(null);g.useEffect(()=>{const b=w=>{x.current&&!x.current.contains(w.target)&&a(!1)};return document.addEventListener("click",b),()=>document.removeEventListener("click",b)},[]);const p=()=>!l||!c?!0:new Date(`1970-01-01T${c}`).getTime()<new Date(`1970-01-01T${l}`).getTime(),y=b=>{const[w,N,L]=b.split(":").map(Number);let E=w;const H=E>=12?"PM":"AM";return E=E%12,E===0&&(E=12),`${E.toString().padStart(2,"0")}:${N.toString().padStart(2,"0")}:${L.toString().padStart(2,"0")} ${H}`},M=()=>{d(t),C(null),u(null),n({from:null,to:null})},v=()=>{if(!p()&&l&&c){const b=h?{from:l,to:c}:{from:y(l),to:y(c)};n(b),d(h?`${l} - ${c}`:`${y(l)} - ${y(c)}`),a(!1)}},k=(b,w)=>o.jsx(Nt,{onChange:N=>w(N),value:b,format:h?"HH:mm:ss":"hh:mm:ss a",locale:"en-US",maxDetail:"second",clearIcon:null,disableClock:!0,amPmAriaLabel:"Select AM/PM",className:h?"w-30":"min-w-max",hourPlaceholder:"hh",minutePlaceholder:"mm",secondPlaceholder:"ss"});return o.jsxs("div",{ref:x,className:`relative inline-block ${r?"w-full":""}`,children:[o.jsx("div",{className:r?"w-full":"w-auto",children:o.jsx(o1,{type:"button",variant:"outline",onClick:()=>a(b=>!b),text:f,iconName:"timer",fullWidth:r})}),i&&o.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:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx(j,{variant:"body1",text:"Select Time Range"}),o.jsx("button",{type:"button",onClick:()=>m(b=>!b),className:`cursor-pointer text-xs px-3 py-1 rounded-full border transition-all ${h?"bg-black text-white border-black":"bg-white text-gray-600 border-gray-300 hover:bg-gray-100"}`,children:h?"24H":"12H"})]}),o.jsxs("div",{className:`flex flex-row items-center justify-center ${h?"gap-2":"gap-1"}`,children:[o.jsx("div",{className:"flex items-center",children:k(l,C)}),o.jsx("div",{className:"flex items-center",children:o.jsx(j,{variant:"body1",text:"To"})}),o.jsx("div",{className:"flex items-center",children:k(c,u)})]}),l&&c&&p()&&o.jsx(j,{variant:"caption",color:"error",text:s}),o.jsxs("div",{className:"flex justify-between gap-3",children:[o.jsx(o1,{text:"Clear",size:"extraSmall",variant:"ghost",onClick:M}),o.jsxs("div",{className:"flex gap-2",children:[o.jsx(o1,{text:"Cancel",size:"extraSmall",variant:"outline",onClick:()=>a(!1)}),o.jsx(o1,{text:"Apply",size:"extraSmall",variant:"primary",disabled:p(),onClick:v})]})]})]})]})},C4=e=>{const{title:t="",children:n,position:r="top"}=e,[s,i]=g.useState(!1),[a,l]=g.useState(r),[C,c]=g.useState({top:0,left:0}),u=g.useRef(null),f=g.useRef(null),d=g.useCallback(()=>{if(!u.current||!f.current)return;const p=u.current.getBoundingClientRect(),y=document.elementFromPoint(p.left+p.width/2,p.top+p.height/2);if(!u.current.contains(y)){i(!1);return}const M=u.current.parentElement;if(M){const V=M.getBoundingClientRect();if(p.right<V.left||p.left>V.right||p.bottom<V.top||p.top>V.bottom){i(!1);return}}if(p.right<0||p.left>window.innerWidth||p.bottom<0||p.top>window.innerHeight){i(!1);return}const v=f.current.getBoundingClientRect(),k=p.top,b=window.innerHeight-p.bottom,w=p.left,N=window.innerWidth-p.right;let L=r;r==="top"&&k<v.height&&(L="bottom"),r==="bottom"&&b<v.height&&(L="top"),r==="left"&&w<v.width&&(L="right"),r==="right"&&N<v.width&&(L="left"),l(L);let E=0,H=0;L==="top"&&(E=p.top-v.height-8,H=p.left+p.width/2-v.width/2),L==="bottom"&&(E=p.bottom+8,H=p.left+p.width/2-v.width/2),L==="left"&&(E=p.top+p.height/2-v.height/2,H=p.left-v.width-8),L==="right"&&(E=p.top+p.height/2-v.height/2,H=p.right+8);const Z=8;H<Z&&(H=Z),H+v.width>window.innerWidth-Z&&(H=window.innerWidth-v.width-Z),E<Z&&(E=Z),E+v.height>window.innerHeight-Z&&(E=window.innerHeight-v.height-Z),c({top:E,left:H})},[r]);g.useLayoutEffect(()=>{s&&d()},[s,d]),g.useLayoutEffect(()=>{if(!s)return;const p=()=>{d()};return window.addEventListener("resize",p),window.addEventListener("scroll",p,!0),()=>{window.removeEventListener("resize",p),window.removeEventListener("scroll",p,!0)}},[s,d]);const h={top:{arrow:"left-1/2 -bottom-1 translate-x-[-50%]"},bottom:{arrow:"left-1/2 -top-1 translate-x-[-50%]"},left:{arrow:"top-1/2 -right-1 translate-y-[-50%]"},right:{arrow:"top-1/2 -left-1 translate-y-[-50%]"}},m="fixed z-level-2 p-3 max-w-2xs md:max-w-sm break-words rounded-lg bg-white shadow-md",x=`absolute h-3 w-3 bg-white shadow-lg rotate-45 ${h[a].arrow}`;return o.jsxs("div",{className:"relative inline-block",ref:u,children:[o.jsx("div",{onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),children:n}),s&&o.jsxs("div",{ref:f,className:m,style:{top:C.top,left:C.left},children:[o.jsx("div",{className:x}),o.jsx("div",{className:"wrap-break-word whitespace-normal",children:typeof t=="string"||typeof t=="number"?o.jsx(j,{text:String(t),variant:"caption"}):t})]})]})},Vt=e=>{const{title:t,image:n,buttonProps:r,iconProps:s}=e;return o.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:o.jsxs("div",{className:"flex flex-col w-full items-center gap-2 sm:flex-row sm:justify-between",children:[o.jsxs("div",{className:"flex gap-2",children:[o.jsx(j,{variant:"subtitle2",text:t,color:"white"}),s&&o.jsx(q,{...s})]}),r&&o.jsx(o1,{...r})]})})},Et=e=>{const{imageUrl:t,title:n,onClick:r}=e,{isMobile:s}=O1();return o.jsxs("div",{onClick:r,onKeyDown:i=>i.key==="Enter"&&(r==null?void 0:r()),className:"w-26 md:w-40 cursor-pointer active:scale-95 transition shadow-md",children:[o.jsx("div",{className:"overflow-hidden h-26 md:h-40",children:o.jsx("img",{src:t,alt:n,className:"w-full object-cover"})}),o.jsx("div",{className:"bg-primary flex items-center justify-center p-0.5 md:p-1",children:o.jsx(j,{variant:s?"smallCaps":"captionBold",text:n,color:"white"})})]})};exports.AdminBetSlip=D7;exports.Avatar=J4;exports.BannerCard=Vt;exports.BetSlip=$7;exports.BetSlipModal=K7;exports.Button=o1;exports.Checkbox=T2;exports.Chip=$4;exports.CommonMarketHeader=$5;exports.CommonMarketRow=t0;exports.DatePicker=s8;exports.Dropdown=i8;exports.EventCard=o0;exports.EventDisplayCard=b7;exports.EventInfoCard=n0;exports.FileUploader=q7;exports.FlashNotification=X7;exports.Icon=q;exports.ImageCard=Et;exports.InputField=T4;exports.Loader=j7;exports.MaintenancePage=_7;exports.Menu=Y7;exports.Modal=h8;exports.MultiSelectDropdown=L7;exports.NotFoundPage=Z7;exports.NotificationBanner=P7;exports.NullState=V5;exports.Pagination=v8;exports.PasswordFieldGroup=w8;exports.PhoneNumberInput=A7;exports.ProgressBar=z7;exports.RadioGroup=R7;exports.SearchBar=j8;exports.Skeleton=D2;exports.SnackbarProvider=O7;exports.StatsList=M8;exports.StatusDisplayCard=y7;exports.Swiper=B7;exports.TabList=v7;exports.Table=p7;exports.TimePicker=Ht;exports.TitleBar=S7;exports.Toggle=T5;exports.Tooltip=M7;exports.TooltipExt=C4;exports.Typography=j;exports.UserBetSlip=F7;exports.WalletInfo=G7;exports.ZIndexPreview=U7;exports.snackbar=N7;
|
package/dist/index.js
CHANGED
|
@@ -3548,7 +3548,11 @@ const st = ({
|
|
|
3548
3548
|
};
|
|
3549
3549
|
}, [g]);
|
|
3550
3550
|
const x = (H, F) => {
|
|
3551
|
-
|
|
3551
|
+
if (!H) {
|
|
3552
|
+
p(null);
|
|
3553
|
+
return;
|
|
3554
|
+
}
|
|
3555
|
+
F === "single" && (i == null || i(H), p(null)), F === "from" && (a == null || a(H), p(null)), F === "to" && (l == null || l(H), p(null));
|
|
3552
3556
|
}, k = {
|
|
3553
3557
|
sm: "min-w-28 w-auto",
|
|
3554
3558
|
lg: "min-w-64 w-auto",
|
|
@@ -11828,7 +11832,7 @@ const Z4 = {
|
|
|
11828
11832
|
onChange: V,
|
|
11829
11833
|
onKeyDown: (N) => N.preventDefault(),
|
|
11830
11834
|
disabled: ["Yes", "No", "Odd", "Even"].includes(e),
|
|
11831
|
-
className: "min-w-12 max-w-14 h-10 rounded-sm
|
|
11835
|
+
className: "min-w-12 max-w-14 h-10 rounded-sm p-1 bg-white border-0"
|
|
11832
11836
|
}
|
|
11833
11837
|
)
|
|
11834
11838
|
] }),
|
|
@@ -11844,7 +11848,7 @@ const Z4 = {
|
|
|
11844
11848
|
const Z = N.target.value;
|
|
11845
11849
|
f3.NUMBER_INPUT_REGEX.test(Z) && k(Number(Z));
|
|
11846
11850
|
},
|
|
11847
|
-
className: "min-w-12 max-w-16 h-10 rounded-sm p-
|
|
11851
|
+
className: "min-w-12 max-w-16 h-10 rounded-sm p-1 bg-white border-0"
|
|
11848
11852
|
}
|
|
11849
11853
|
)
|
|
11850
11854
|
] }),
|